Mercurial > emacs
comparison lisp/emacs-lisp/lisp-mode.el @ 26682:57098e9f96e8
(lisp-mode-variables): Change
outline-regexp, add outline-level.
(lisp-outline-level): New.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 02 Dec 1999 10:19:24 +0000 |
parents | 5984b9cfea66 |
children | baffb2de5ce9 |
comparison
equal
deleted
inserted
replaced
26681:50893d4feeb6 | 26682:57098e9f96e8 |
---|---|
126 (make-local-variable 'indent-region-function) | 126 (make-local-variable 'indent-region-function) |
127 (setq indent-region-function 'lisp-indent-region) | 127 (setq indent-region-function 'lisp-indent-region) |
128 (make-local-variable 'parse-sexp-ignore-comments) | 128 (make-local-variable 'parse-sexp-ignore-comments) |
129 (setq parse-sexp-ignore-comments t) | 129 (setq parse-sexp-ignore-comments t) |
130 (make-local-variable 'outline-regexp) | 130 (make-local-variable 'outline-regexp) |
131 (setq outline-regexp ";;; \\|(....") | 131 (setq outline-regexp ";;;;* \\|(") |
132 (make-local-variable 'outline-level) | |
133 (setq outline-level 'lisp-outline-level) | |
132 (make-local-variable 'comment-start) | 134 (make-local-variable 'comment-start) |
133 (setq comment-start ";") | 135 (setq comment-start ";") |
134 (make-local-variable 'comment-start-skip) | 136 (make-local-variable 'comment-start-skip) |
135 ;; Look within the line for a ; following an even number of backslashes | 137 ;; Look within the line for a ; following an even number of backslashes |
136 ;; after either a non-backslash or the line beginning. | 138 ;; after either a non-backslash or the line beginning. |
139 (setq comment-column 40) | 141 (setq comment-column 40) |
140 (make-local-variable 'comment-indent-function) | 142 (make-local-variable 'comment-indent-function) |
141 (setq comment-indent-function 'lisp-comment-indent) | 143 (setq comment-indent-function 'lisp-comment-indent) |
142 (make-local-variable 'imenu-generic-expression) | 144 (make-local-variable 'imenu-generic-expression) |
143 (setq imenu-generic-expression lisp-imenu-generic-expression)) | 145 (setq imenu-generic-expression lisp-imenu-generic-expression)) |
146 | |
147 (defun lisp-outline-level () | |
148 "Lisp mode `outline-level' function." | |
149 (if (looking-at "(") | |
150 1000 | |
151 (looking-at outline-regexp) | |
152 (- (match-end 0) (match-beginning 0)))) | |
153 | |
144 | 154 |
145 (defvar shared-lisp-mode-map () | 155 (defvar shared-lisp-mode-map () |
146 "Keymap for commands shared by all sorts of Lisp modes.") | 156 "Keymap for commands shared by all sorts of Lisp modes.") |
147 | 157 |
148 (if shared-lisp-mode-map | 158 (if shared-lisp-mode-map |