summaryrefslogtreecommitdiff
path: root/lisp/progmodes/hideif.el
diff options
context:
space:
mode:
authorZhiwei Chen <chenzhiwei03@kuaishou.com>2021-03-21 08:09:14 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-03-21 08:17:41 +0100
commit3cbf92323c544df516ac28da5e6eac9a241103c4 (patch)
tree3da2616c948e77f9390d538b1a5c4519a885e9e7 /lisp/progmodes/hideif.el
parente9e691093ab843911b0ac7a9a9188d477415db2e (diff)
downloademacs-3cbf92323c544df516ac28da5e6eac9a241103c4.tar.gz
Allow hide-ifdef-guts to work in buffers not visiting files
* lisp/progmodes/hideif.el (hide-ifdef-guts): Allow working in buffers not visiting files (bug#47279). Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/progmodes/hideif.el')
-rw-r--r--lisp/progmodes/hideif.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 923f85fd4dd..6f1a8781b49 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -1743,10 +1743,10 @@ first arg will be `hif-etc'."
(defun hide-ifdef-guts ()
"Does most of the work of `hide-ifdefs'.
It does not do the work that's pointless to redo on a recursive entry."
- ;; (message "hide-ifdef-guts")
(save-excursion
(let* ((case-fold-search t) ; Ignore case for `hide-ifdef-header-regexp'
(expand-header (and hide-ifdef-expand-reinclusion-protection
+ (buffer-file-name)
(string-match hide-ifdef-header-regexp
(buffer-file-name))
(zerop hif-recurse-level)))