[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in cus-edit.
From: |
Michaël Cadilhac |
Subject: |
Bug in cus-edit. |
Date: |
Tue, 26 Sep 2006 21:37:05 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
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:
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 <address@hidden>
+
+ * cus-edit.el (custom-save-all): Switch to emacs-lisp mode before
+ saving anything to be sure that `forward-sexp' behaves correctly.
+
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: address@hidden --' -- P. Desproges - --'
pgphUUME20PjF.pgp
Description: PGP signature
- Bug in cus-edit.,
Michaël Cadilhac <=