diff options
| author | Richard M. Stallman | 1994-09-14 18:48:45 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-09-14 18:48:45 +0000 |
| commit | daf4206bafc71c6c22b23b5fb5f9744b1c2ecd78 (patch) | |
| tree | a7f8b5e333abfc1bd5dd8e5604f19fdec2b26d04 /lisp/progmodes/cpp.el | |
| parent | fe441eb769a57d80af43e07777f4aedc11b3bad9 (diff) | |
| download | emacs-daf4206bafc71c6c22b23b5fb5f9744b1c2ecd78.tar.gz emacs-daf4206bafc71c6c22b23b5fb5f9744b1c2ecd78.zip | |
entered into RCS
Diffstat (limited to 'lisp/progmodes/cpp.el')
| -rw-r--r-- | lisp/progmodes/cpp.el | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index a637385c349..08ef427e2a9 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el | |||
| @@ -26,13 +26,6 @@ | |||
| 26 | ;; Parse a text for C preprocessor conditionals, and highlight or hide | 26 | ;; Parse a text for C preprocessor conditionals, and highlight or hide |
| 27 | ;; the text inside the conditionals as you wish. | 27 | ;; the text inside the conditionals as you wish. |
| 28 | 28 | ||
| 29 | ;; You might want to bind keys as follows. | ||
| 30 | ;; | ||
| 31 | ;; '(progn | ||
| 32 | ;; (define-key c-mode-map "\C-c\C-x" 'cpp-parse-buffer) | ||
| 33 | ;; (define-key-after (lookup-key c-mode-map [ menu-bar c ]) | ||
| 34 | ;; [ cpp-parse ] '("Parse Conditionals" . cpp-parse-buffer) 'up)) | ||
| 35 | |||
| 36 | ;; This package is inspired by Jim Coplien's delta editor for SCCS. | 29 | ;; This package is inspired by Jim Coplien's delta editor for SCCS. |
| 37 | 30 | ||
| 38 | ;;; Todo: | 31 | ;;; Todo: |
| @@ -85,9 +78,11 @@ screens, and none if you don't use a window system.") | |||
| 85 | "elif\\|else\\|endif\\)\\b\\)")) | 78 | "elif\\|else\\|endif\\)\\b\\)")) |
| 86 | 79 | ||
| 87 | ;;;###autoload | 80 | ;;;###autoload |
| 88 | (defun cpp-parse-buffer (arg) | 81 | (defun cpp-highlight-buffer (arg) |
| 89 | "Parse all conditionals in the current buffer end edit symbols. | 82 | "Highlight C code according to preprocessor conditionals. |
| 90 | A prefix arg supress editing the symbols." | 83 | This command pops up a buffer which you should edit to specify |
| 84 | what kind of highlighting to use, and the criteria for highlighting. | ||
| 85 | A prefix arg supresses display of that buffer." | ||
| 91 | (interactive "P") | 86 | (interactive "P") |
| 92 | (setq cpp-parse-symbols nil) | 87 | (setq cpp-parse-symbols nil) |
| 93 | (cpp-parse-reset) | 88 | (cpp-parse-reset) |
| @@ -342,7 +337,7 @@ Each entry is a list with the following elements: | |||
| 342 | (make-variable-buffer-local 'cpp-edit-symbols) | 337 | (make-variable-buffer-local 'cpp-edit-symbols) |
| 343 | 338 | ||
| 344 | (defun cpp-edit-mode () | 339 | (defun cpp-edit-mode () |
| 345 | "Major mode for editing cpp display information. | 340 | "Major mode for editing the criteria for highlighting cpp conditionals. |
| 346 | Click on objects to change them. | 341 | Click on objects to change them. |
| 347 | You can also use the keyboard accelerators indicated like this: [K]ey." | 342 | You can also use the keyboard accelerators indicated like this: [K]ey." |
| 348 | (kill-all-local-variables) | 343 | (kill-all-local-variables) |