# HG changeset patch # User Gerd Moellmann # Date 944129964 0 # Node ID 57098e9f96e8f4885cc63e561c05da1f00627fb1 # Parent 50893d4feeb660e4a3c1929d78bd2d0d9f7e9476 (lisp-mode-variables): Change outline-regexp, add outline-level. (lisp-outline-level): New. diff -r 50893d4feeb6 -r 57098e9f96e8 lisp/emacs-lisp/lisp-mode.el --- a/lisp/emacs-lisp/lisp-mode.el Thu Dec 02 08:04:03 1999 +0000 +++ b/lisp/emacs-lisp/lisp-mode.el Thu Dec 02 10:19:24 1999 +0000 @@ -128,7 +128,9 @@ (make-local-variable 'parse-sexp-ignore-comments) (setq parse-sexp-ignore-comments t) (make-local-variable 'outline-regexp) - (setq outline-regexp ";;; \\|(....") + (setq outline-regexp ";;;;* \\|(") + (make-local-variable 'outline-level) + (setq outline-level 'lisp-outline-level) (make-local-variable 'comment-start) (setq comment-start ";") (make-local-variable 'comment-start-skip) @@ -141,6 +143,14 @@ (setq comment-indent-function 'lisp-comment-indent) (make-local-variable 'imenu-generic-expression) (setq imenu-generic-expression lisp-imenu-generic-expression)) + +(defun lisp-outline-level () + "Lisp mode `outline-level' function." + (if (looking-at "(") + 1000 + (looking-at outline-regexp) + (- (match-end 0) (match-beginning 0)))) + (defvar shared-lisp-mode-map () "Keymap for commands shared by all sorts of Lisp modes.")