diff options
author | Lute Kamstra <lute@gnu.org> | 2005-02-15 09:23:22 +0000 |
---|---|---|
committer | Lute Kamstra <lute@gnu.org> | 2005-02-15 09:23:22 +0000 |
commit | 43817a7520247657839eed5705ab22192c4c94b3 (patch) | |
tree | 58478e67e69a81d4c262d8024f8d08aa59060d9c /lisp/emacs-lisp | |
parent | e7212bb36eb43c99a23b7698566c3d94357a153d (diff) | |
download | emacs-43817a7520247657839eed5705ab22192c4c94b3.tar.gz emacs-43817a7520247657839eed5705ab22192c4c94b3.tar.bz2 emacs-43817a7520247657839eed5705ab22192c4c94b3.zip |
(lisp-mode-variables): Add ;;;###autoload to `outline-regexp'.
Suggested by Stefan Monnier <monnier@iro.umontreal.ca>
(lisp-outline-level): Improve efficiency. Suggested by David Kastrup
<dak@gnu.org>.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 6b5c0b1c0f1..1a7da113c12 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -182,7 +182,7 @@ (make-local-variable 'parse-sexp-ignore-comments) (setq parse-sexp-ignore-comments t) (make-local-variable 'outline-regexp) - (setq outline-regexp ";;;;* [^ \t\n]\\|(") + (setq outline-regexp ";;;\\(;* [^ \t\n]\\|###autoload\\)\\|(") (make-local-variable 'outline-level) (setq outline-level 'lisp-outline-level) (make-local-variable 'comment-start) @@ -212,11 +212,10 @@ (defun lisp-outline-level () "Lisp mode `outline-level' function." - (if (looking-at "(\\|;;;###autoload") - 1000 - (looking-at outline-regexp) - (- (match-end 0) (match-beginning 0)))) - + (let ((len (- (match-end 0) (match-beginning 0)))) + (if (looking-at "(\\|;;;###autoload") + 1000 + len))) (defvar lisp-mode-shared-map (let ((map (make-sparse-keymap))) |