diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-02-24 22:34:24 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-02-24 22:34:24 +0000 |
commit | bd133320961b10e7abda6ffa86b3cc3fe78f981f (patch) | |
tree | 7c8e6ff84209a496fc05b30d8e791f5bbe2d6b96 | |
parent | 080d8166d8834cf2eb260b7e9bbfd5f95b8ecfaf (diff) | |
download | emacs-bd133320961b10e7abda6ffa86b3cc3fe78f981f.tar.gz emacs-bd133320961b10e7abda6ffa86b3cc3fe78f981f.tar.bz2 emacs-bd133320961b10e7abda6ffa86b3cc3fe78f981f.zip |
(c-mode): Set outline-regexp and outline-level.
(c-outline-level): New function.
-rw-r--r-- | lisp/progmodes/c-mode.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/progmodes/c-mode.el b/lisp/progmodes/c-mode.el index e057a4a4ca4..964f566f2d9 100644 --- a/lisp/progmodes/c-mode.el +++ b/lisp/progmodes/c-mode.el @@ -230,6 +230,10 @@ if that value is non-nil." (setq indent-region-function 'c-indent-region) (make-local-variable 'require-final-newline) (setq require-final-newline t) + (make-local-variable 'outline-regexp) + (setq outline-regexp "[^#\n\^M]") + (make-local-variable 'outline-level) + (setq outline-level 'c-outline-level) (make-local-variable 'comment-start) (setq comment-start "/* ") (make-local-variable 'comment-end) @@ -243,6 +247,11 @@ if that value is non-nil." (make-local-variable 'parse-sexp-ignore-comments) (setq parse-sexp-ignore-comments t) (run-hooks 'c-mode-hook)) + +(defun c-outline-level () + (save-excursion + (skip-chars-forward "\t ") + (current-column))) ;; This is used by indent-for-comment ;; to decide how much to indent a comment in C code |