(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>.
This commit is contained in:
Lute Kamstra 2005-02-15 09:23:22 +00:00
parent e7212bb36e
commit 43817a7520
2 changed files with 13 additions and 6 deletions

View file

@ -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)))