Mercurial > emacs
comparison lisp/emacs-lisp/lisp-mode.el @ 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 (2005-02-15) |
parents | d992bb330d29 |
children | 7b87c7b7cc11 7e3f621f1dd4 |
comparison
equal
deleted
inserted
replaced
60073:6fba1da8f37e | 60074:65b1f2f4ce8f |
---|---|
180 (make-local-variable 'indent-region-function) | 180 (make-local-variable 'indent-region-function) |
181 (setq indent-region-function 'lisp-indent-region) | 181 (setq indent-region-function 'lisp-indent-region) |
182 (make-local-variable 'parse-sexp-ignore-comments) | 182 (make-local-variable 'parse-sexp-ignore-comments) |
183 (setq parse-sexp-ignore-comments t) | 183 (setq parse-sexp-ignore-comments t) |
184 (make-local-variable 'outline-regexp) | 184 (make-local-variable 'outline-regexp) |
185 (setq outline-regexp ";;;;* [^ \t\n]\\|(") | 185 (setq outline-regexp ";;;\\(;* [^ \t\n]\\|###autoload\\)\\|(") |
186 (make-local-variable 'outline-level) | 186 (make-local-variable 'outline-level) |
187 (setq outline-level 'lisp-outline-level) | 187 (setq outline-level 'lisp-outline-level) |
188 (make-local-variable 'comment-start) | 188 (make-local-variable 'comment-start) |
189 (setq comment-start ";") | 189 (setq comment-start ";") |
190 (make-local-variable 'comment-start-skip) | 190 (make-local-variable 'comment-start-skip) |
210 (font-lock-syntactic-face-function | 210 (font-lock-syntactic-face-function |
211 . lisp-font-lock-syntactic-face-function)))) | 211 . lisp-font-lock-syntactic-face-function)))) |
212 | 212 |
213 (defun lisp-outline-level () | 213 (defun lisp-outline-level () |
214 "Lisp mode `outline-level' function." | 214 "Lisp mode `outline-level' function." |
215 (if (looking-at "(\\|;;;###autoload") | 215 (let ((len (- (match-end 0) (match-beginning 0)))) |
216 1000 | 216 (if (looking-at "(\\|;;;###autoload") |
217 (looking-at outline-regexp) | 217 1000 |
218 (- (match-end 0) (match-beginning 0)))) | 218 len))) |
219 | |
220 | 219 |
221 (defvar lisp-mode-shared-map | 220 (defvar lisp-mode-shared-map |
222 (let ((map (make-sparse-keymap))) | 221 (let ((map (make-sparse-keymap))) |
223 (define-key map "\t" 'lisp-indent-line) | 222 (define-key map "\t" 'lisp-indent-line) |
224 (define-key map "\e\C-q" 'indent-sexp) | 223 (define-key map "\e\C-q" 'indent-sexp) |