]> git.eshelyaron.com Git - emacs.git/commitdiff
(lisp-mode-variables): Add ;;;###autoload to `outline-regexp'.
authorLute Kamstra <lute@gnu.org>
Tue, 15 Feb 2005 09:23:22 +0000 (09:23 +0000)
committerLute Kamstra <lute@gnu.org>
Tue, 15 Feb 2005 09:23:22 +0000 (09:23 +0000)
Suggested by Stefan Monnier <monnier@iro.umontreal.ca>
(lisp-outline-level): Improve efficiency.  Suggested by David Kastrup
<dak@gnu.org>.

lisp/ChangeLog
lisp/emacs-lisp/lisp-mode.el

index 89bfdbf94a1636da7cfad5f4e0746e5e91604ec9..3eabad53563bcc5bf00e7b20066cb2025278fecb 100644 (file)
@@ -1,3 +1,11 @@
+2005-02-15  Lute Kamstra  <lute@gnu.org>
+
+       * emacs-lisp/lisp-mode.el (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>.
+
 2005-02-15  Nick Roberts  <nickrob@snap.net.nz>
 
        * progmodes/gdb-ui.el (gdb-find-file-unhook): New variable.
index 6b5c0b1c0f1ce1737b619045eb50aa554d0c224d..1a7da113c1216bed42a2d8e56410481c8f1f489a 100644 (file)
   (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)
 
 (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)))