]> git.eshelyaron.com Git - emacs.git/commitdiff
(cpp-highlight-buffer): Make sure
authorRichard M. Stallman <rms@gnu.org>
Sat, 31 May 1997 07:16:13 +0000 (07:16 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 31 May 1997 07:16:13 +0000 (07:16 +0000)
buffer-invisibility-spec contains `cpp'.
(cpp-make-overlay-hidden): Use `cpp' as an invisible property.

lisp/progmodes/cpp.el

index d8a062cf7a8eb32e031fd9120cfeeb747169a304..f5a3c912eeac9482a5763df20b833b6dd05775a0 100644 (file)
@@ -168,6 +168,8 @@ This command pops up a buffer which you should edit to specify
 what kind of highlighting to use, and the criteria for highlighting.
 A prefix arg suppresses display of that buffer."
   (interactive "P")
+  (unless (memq 'cpp buffer-invisibility-spec) 
+    (add-to-invisibility-spec 'cpp))
   (setq cpp-parse-symbols nil)
   (cpp-parse-reset)
   (if (null cpp-edit-list)
@@ -332,7 +334,7 @@ A prefix arg suppresses display of that buffer."
 
 (defun cpp-make-overlay-hidden (overlay)
   ;; Make overlay hidden and intangible.
-  (overlay-put overlay 'invisible t)
+  (overlay-put overlay 'invisible 'cpp)
   (overlay-put overlay 'intangible t)
   ;; Unfortunately `intangible' is not implemented for overlays yet,
   ;; so we make is read-only instead.