diff options
| author | Richard M. Stallman | 1997-05-31 07:16:13 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-05-31 07:16:13 +0000 |
| commit | 7393255738fe7d30880c75e9dc98b02508a67ea3 (patch) | |
| tree | e4c71611c94234a91c3063f12594f2df70b69784 /lisp/progmodes/cpp.el | |
| parent | b7c09257ad80d025c0edbffb4bcef30b6f467b67 (diff) | |
| download | emacs-7393255738fe7d30880c75e9dc98b02508a67ea3.tar.gz emacs-7393255738fe7d30880c75e9dc98b02508a67ea3.zip | |
(cpp-highlight-buffer): Make sure
buffer-invisibility-spec contains `cpp'.
(cpp-make-overlay-hidden): Use `cpp' as an invisible property.
Diffstat (limited to 'lisp/progmodes/cpp.el')
| -rw-r--r-- | lisp/progmodes/cpp.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index d8a062cf7a8..f5a3c912eea 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el | |||
| @@ -168,6 +168,8 @@ This command pops up a buffer which you should edit to specify | |||
| 168 | what kind of highlighting to use, and the criteria for highlighting. | 168 | what kind of highlighting to use, and the criteria for highlighting. |
| 169 | A prefix arg suppresses display of that buffer." | 169 | A prefix arg suppresses display of that buffer." |
| 170 | (interactive "P") | 170 | (interactive "P") |
| 171 | (unless (memq 'cpp buffer-invisibility-spec) | ||
| 172 | (add-to-invisibility-spec 'cpp)) | ||
| 171 | (setq cpp-parse-symbols nil) | 173 | (setq cpp-parse-symbols nil) |
| 172 | (cpp-parse-reset) | 174 | (cpp-parse-reset) |
| 173 | (if (null cpp-edit-list) | 175 | (if (null cpp-edit-list) |
| @@ -332,7 +334,7 @@ A prefix arg suppresses display of that buffer." | |||
| 332 | 334 | ||
| 333 | (defun cpp-make-overlay-hidden (overlay) | 335 | (defun cpp-make-overlay-hidden (overlay) |
| 334 | ;; Make overlay hidden and intangible. | 336 | ;; Make overlay hidden and intangible. |
| 335 | (overlay-put overlay 'invisible t) | 337 | (overlay-put overlay 'invisible 'cpp) |
| 336 | (overlay-put overlay 'intangible t) | 338 | (overlay-put overlay 'intangible t) |
| 337 | ;; Unfortunately `intangible' is not implemented for overlays yet, | 339 | ;; Unfortunately `intangible' is not implemented for overlays yet, |
| 338 | ;; so we make is read-only instead. | 340 | ;; so we make is read-only instead. |