emacs-devel
[Top][All Lists]
Advanced

[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;
        
h=received:to:subject:from:date:message-id:user-agent:mime-version:content-type;
        
b=fJAxfaRpRWx1MXRB+xzUNsLJg1QRsAJNWzI8L3csmFYNTFXVlN6L8XuxKy/GE9oJ/hz6OVPIuALbhwRvP3AUpCNPmcEeufwrk3CRmXRPkhu6oRWrZYxBdfE+FyNF0ZPIE9+dWb7Kg42Z1vfkjLVcmKnJngGEIj8bVLwC00DIDEE=
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")
        1000
- -      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
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------




reply via email to

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