From 3cbf92323c544df516ac28da5e6eac9a241103c4 Mon Sep 17 00:00:00 2001 From: Zhiwei Chen Date: Sun, 21 Mar 2021 08:09:14 +0100 Subject: [PATCH] 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 --- lisp/progmodes/hideif.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))) -- 2.39.2