# HG changeset patch # User Richard M. Stallman # Date 762129264 0 # Node ID 33f42f5f74483a9e3c4beb751e395b31fc881002 # Parent 2f23436468cebfda24430dc6a59cb51890c3757e (c-mode): Set outline-regexp and outline-level. (c-outline-level): New function. diff -r 2f23436468ce -r 33f42f5f7448 lisp/progmodes/c-mode.el --- a/lisp/progmodes/c-mode.el Thu Feb 24 22:00:11 1994 +0000 +++ b/lisp/progmodes/c-mode.el Thu Feb 24 22:34:24 1994 +0000 @@ -230,6 +230,10 @@ (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 @@ (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