[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: Strange behavior of emacs-lisp-mode with outline-minor-m

From: Richard Stallman
Subject: address@hidden: Strange behavior of emacs-lisp-mode with outline-minor-mode]
Date: Sun, 05 Mar 2006 19:51:15 -0500

Does anyone disagree with this change?
It is really a matter of what outline commands should do in Lisp mode,
and I don't use them.

------- Start of forwarded message -------
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
To: address@hidden
From: Zhang Wei <address@hidden>
Date: Wed, 01 Mar 2006 01:08:40 +0800
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: Strange behavior of emacs-lisp-mode with outline-minor-mode

If we turn on outline-minor-mode in emacs-lisp-mode, and press
`C-c @ C-q', only three dots there, nothing left!

Accoding to the doc of `C-c @ C-q' runs the command
`hide-sublevels', it should hide everything but the top levels
levels of headers, in whole buffer.

The value of outline-regexp of emacs-lisp-mode is 

";;;\\(;* [^    \n]\\|###autoload\\)\\|("

That means every line start with a "(" or ";;; x" will be
considered as top level headers. When we run `hide-sublevels',
these lines shouled be left.

This bug could be fixed by the following patch:

- --8<---------------cut here---------------start------------->8---
- --- orig/lisp/emacs-lisp/lisp-mode.el
+++ mod/lisp/emacs-lisp/lisp-mode.el
@@ -251,9 +251,11 @@
 (defun lisp-outline-level ()
   "Lisp mode `outline-level' function."
   (let ((len (- (match-end 0) (match-beginning 0))))
- -    (if (looking-at "(\\|;;;###autoload")
+    (if (looking-at ";;;###autoload")
- -      len)))
+      (if (looking-at "(") 
+         1
+       (- len 4)))))
 (defvar lisp-mode-shared-map
   (let ((map (make-sparse-keymap)))
- --8<---------------cut here---------------end--------------->8---

emacs-pretest-bug mailing list
------- End of forwarded message -------

reply via email to

[Prev in Thread] Current Thread [Next in Thread]