emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug] "You can't edit this part of the Custom buffer"


From: Chong Yidong
Subject: Re: [Bug] "You can't edit this part of the Custom buffer"
Date: Thu, 27 Jul 2006 18:22:14 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Drew Adams" <address@hidden> writes:

> Uh, are you sure this is the right thing to do? IIUC, RMS just added
> custom-no-edit, and bound it, to raise an error when you try to edit
> a non-editable part of the buffer.
>
> Simply removing the binding seems pointless. Perhaps the fix to the
> new problem should be to better determine which are the non-editable
> parts of the buffer, and make sure the error is only raised there?

That was an incorrect fix.  `widget-keymap' defines "\C-m" to
'widget-field-activate, which is supposed to find the widget under
point and activate it.  It is incorrect to bind "\C-m" to
`custom-no-edit' in `custom-mode', which inherits from
`widget-keymap'.

Why was this change made in the first place?  It seems
pointless---Custom buffers are read-only, so self-insertion commands
do nothing anyway; we don't have to bind them to a 'custom-no-edit'
command that does nothing but raise an error.

>     > In this build from CVS:
>     >
>     >   GNU Emacs 22.0.50.1 (i386-mingw-nt5.1.2600) of 2006-07-26 on I9300
>     >
>     > Trying to use the keyboard (e.g. `Ret') to do customization (in a
>     > *Customize Apropos* buffer, for example) fails with the error in the
>     > title line of this post.  
>     
>     2006-07-27  Johan Bockgård  <address@hidden>
>     
>       * cus-edit.el (custom-mode-map): Don't bind RET to custom-no-edit.
>     
>     --- cus-edit.el   18 Jul 2006 01:13:54 +0200      1.297
>     +++ cus-edit.el   27 Jul 2006 15:30:20 +0200      
>     @@ -4432,7 +4432,6 @@
>          (set-keymap-parent map widget-keymap)
>          (define-key map [remap self-insert-command]
>            'custom-no-edit)
>     -    (define-key map "\^m" 'custom-no-edit)
>          (define-key map " " 'scroll-up)
>          (define-key map "\177" 'scroll-down)
>          (define-key map "\C-c\C-c" 'Custom-set)




reply via email to

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