From: michael@cadilhac.name (Michaël Cadilhac)
Subject: Bug in cus-edit.
Date: Tue, 26 Sep 2006 21:37:05 +0200 [thread overview]
Message-ID: <87fyeel8ri.fsf@lrde.org> (raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 641 bytes --]
Hi there!
I've a little bug with cus-edit.
My custom-file has something looking like the following :
(custom-set-variables
'(netsoul-user-data ":-)")
'(other "blah"))
or whatever. As you may have noticed, in text-mode, the `)' of the
second line is matched with the opening `('. If you use `forward-sexp'
on this first `(', you will not end up at the « real » end of the
custom-set-variables.
The problem is that custom-file is not opened with emacs-lisp-mode,
and uses `forward-sexp' (okey, I probably have to use local variables
in my custom-file, but whatever).
I can propose the following fix:
[-- Attachment #1.1.2: Proposal --]
[-- Type: text/x-patch, Size: 1237 bytes --]
Index: lisp/cus-edit.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/cus-edit.el,v
retrieving revision 1.305
diff -c -r1.305 cus-edit.el
*** lisp/cus-edit.el 22 Sep 2006 21:47:00 -0000 1.305
--- lisp/cus-edit.el 26 Sep 2006 19:24:10 -0000
***************
*** 4157,4162 ****
--- 4157,4164 ----
recentf-exclude)))
(old-buffer (find-buffer-visiting filename)))
(with-current-buffer (or old-buffer (find-file-noselect filename))
+ (unless (eq major-mode 'emacs-lisp-mode)
+ (emacs-lisp-mode))
(let ((inhibit-read-only t))
(custom-save-variables)
(custom-save-faces))
Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.10121
diff -c -0 -r1.10121 ChangeLog
*** lisp/ChangeLog 24 Sep 2006 13:48:59 -0000 1.10121
--- lisp/ChangeLog 26 Sep 2006 19:24:40 -0000
***************
*** 0 ****
--- 1,5 ----
+ 2006-09-26 Michaël Cadilhac <michael.cadilhac@lrde.org>
+
+ * cus-edit.el (custom-save-all): Switch to emacs-lisp mode before
+ saving anything to be sure that `forward-sexp' behaves correctly.
+
[-- Attachment #1.1.3: Type: text/plain, Size: 400 bytes --]
TIA !
--
/!\ My mail address changed, please update your files accordingly.
| Michaël `Micha' Cadilhac | «Tu aimeras ton prochain.» |
| Epita/LRDE Promo 2007 | D'abord, Dieu ou pas, |
| http://michael.cadilhac.name | j'ai horreur qu'on me tutoie. |
`-- - JID: micha@amessage.be --' -- P. Desproges - --'
[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]
[-- Attachment #2: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next reply other threads:[~2006-09-26 19:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-26 19:37 Michaël Cadilhac [this message]
2006-09-27 18:43 ` Bug in cus-edit Richard Stallman
2006-09-29 18:34 ` Chong Yidong
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=87fyeel8ri.fsf@lrde.org \
--to=michael@cadilhac.name \
/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).