* Bug in cus-edit.
@ 2006-09-26 19:37 Michaël Cadilhac
2006-09-27 18:43 ` Richard Stallman
0 siblings, 1 reply; 3+ messages in thread
From: Michaël Cadilhac @ 2006-09-26 19:37 UTC (permalink / 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug in cus-edit.
2006-09-26 19:37 Bug in cus-edit Michaël Cadilhac
@ 2006-09-27 18:43 ` Richard Stallman
2006-09-29 18:34 ` Chong Yidong
0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2006-09-27 18:43 UTC (permalink / raw)
Cc: emacs-devel
Thanks for that fix. Would someone please install it ASAP?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug in cus-edit.
2006-09-27 18:43 ` Richard Stallman
@ 2006-09-29 18:34 ` Chong Yidong
0 siblings, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2006-09-29 18:34 UTC (permalink / raw)
Cc: Michaël Cadilhac, emacs-devel
Richard Stallman <rms@gnu.org> writes:
> Thanks for that fix. Would someone please install it ASAP?
Done.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-09-29 18:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-26 19:37 Bug in cus-edit Michaël Cadilhac
2006-09-27 18:43 ` Richard Stallman
2006-09-29 18:34 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.