From 43817a7520247657839eed5705ab22192c4c94b3 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Tue, 15 Feb 2005 09:23:22 +0000 Subject: [PATCH] (lisp-mode-variables): Add ;;;###autoload to `outline-regexp'. Suggested by Stefan Monnier (lisp-outline-level): Improve efficiency. Suggested by David Kastrup . --- lisp/ChangeLog | 8 ++++++++ lisp/emacs-lisp/lisp-mode.el | 11 +++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 89bfdbf94a1..3eabad53563 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-02-15 Lute Kamstra + + * emacs-lisp/lisp-mode.el (lisp-mode-variables): Add + ;;;###autoload to `outline-regexp'. Suggested by Stefan Monnier + + (lisp-outline-level): Improve efficiency. Suggested by David + Kastrup . + 2005-02-15 Nick Roberts * progmodes/gdb-ui.el (gdb-find-file-unhook): New variable. 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))) -- 2.11.4.GIT