From a8050bff074281701a3ac20d3e54f1d70d881b3b Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 2 Dec 1999 10:20:22 +0000 Subject: [PATCH] (lisp-mode-variables): Change outline-regexp, add outline-level. (lisp-outline-level): New. --- lisp/ChangeLog | 4 ++++ lisp/emacs-lisp/lisp-mode.el | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 041b558ccad..8ec8be4dd61 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 1999-12-02 Gerd Moellmann + * emacs-lisp/lisp-mode.el (lisp-mode-variables): Change + outline-regexp, add outline-level. + (lisp-outline-level): New. + * calendar/appt.el (appt-convert-time): Handle "12:MMam", remove extraneous string-match. diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 2f09c352811..bfd94311f17 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -128,7 +128,9 @@ (make-local-variable 'parse-sexp-ignore-comments) (setq parse-sexp-ignore-comments t) (make-local-variable 'outline-regexp) - (setq outline-regexp ";;; \\|(....") + (setq outline-regexp ";;;;* \\|(") + (make-local-variable 'outline-level) + (setq outline-level 'lisp-outline-level) (make-local-variable 'comment-start) (setq comment-start ";") (make-local-variable 'comment-start-skip) @@ -141,6 +143,14 @@ (setq comment-indent-function 'lisp-comment-indent) (make-local-variable 'imenu-generic-expression) (setq imenu-generic-expression lisp-imenu-generic-expression)) + +(defun lisp-outline-level () + "Lisp mode `outline-level' function." + (if (looking-at "(") + 1000 + (looking-at outline-regexp) + (- (match-end 0) (match-beginning 0)))) + (defvar shared-lisp-mode-map () "Keymap for commands shared by all sorts of Lisp modes.") -- 2.39.5