changeset 60074:65b1f2f4ce8f

(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>.
author Lute Kamstra <lute@gnu.org>
date Tue, 15 Feb 2005 09:19:32 +0000
parents 6fba1da8f37e
children 856ded869c54
files lisp/emacs-lisp/lisp-mode.el
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/lisp-mode.el	Tue Feb 15 09:19:13 2005 +0000
+++ b/lisp/emacs-lisp/lisp-mode.el	Tue Feb 15 09:19:32 2005 +0000
@@ -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)))