unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Subject: [id.brep@gmail.com: Strange behavior of emacs-lisp-mode with outline-minor-mode]
Date: Sun, 05 Mar 2006 19:51:15 -0500	[thread overview]
Message-ID: <E1FG3wR-0000gD-QI@fencepost.gnu.org> (raw)

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: emacs-pretest-bug@gnu.org
From: Zhang Wei <id.brep@gmail.com>
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
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

             reply	other threads:[~2006-03-06  0:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-06  0:51 Richard Stallman [this message]
2006-03-06  1:55 ` Fwd: Strange behavior of emacs-lisp-mode with outline-minor-mode Stefan Monnier
2006-03-06  2:46   ` Zhang Wei
2006-03-06  4:49     ` Stefan Monnier
2006-03-06  5:24       ` Zhang Wei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1FG3wR-0000gD-QI@fencepost.gnu.org \
    --to=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).