From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: [Bug] "You can't edit this part of the Custom buffer" Date: Thu, 27 Jul 2006 18:22:14 -0400 Message-ID: <87vepiy9gp.fsf@stupidchicken.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1154038900 28352 80.91.229.2 (27 Jul 2006 22:21:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Jul 2006 22:21:40 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 28 00:21:36 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G6EEZ-0005Cb-9I for ged-emacs-devel@m.gmane.org; Fri, 28 Jul 2006 00:21:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G6EEY-000169-H7 for ged-emacs-devel@m.gmane.org; Thu, 27 Jul 2006 18:21:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G6EEL-000163-Vh for emacs-devel@gnu.org; Thu, 27 Jul 2006 18:21:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G6EEK-00015r-Eh for emacs-devel@gnu.org; Thu, 27 Jul 2006 18:21:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G6EEK-00015o-5P for emacs-devel@gnu.org; Thu, 27 Jul 2006 18:21:20 -0400 Original-Received: from [18.19.1.138] (helo=cyd) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G6EGB-0007q8-55 for emacs-devel@gnu.org; Thu, 27 Jul 2006 18:23:15 -0400 Original-Received: by cyd (Postfix, from userid 1000) id 158B94E2CA; Thu, 27 Jul 2006 18:22:14 -0400 (EDT) Original-To: "Drew Adams" In-Reply-To: (Drew Adams's message of "Thu, 27 Jul 2006 08:21:32 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:57698 Archived-At: "Drew Adams" 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.=20=20 >=20=20=20=20=20 > 2006-07-27 Johan Bockg=C3=A5rd >=20=20=20=20=20 > * cus-edit.el (custom-mode-map): Don't bind RET to custom-no-edit. >=20=20=20=20=20 > --- cus-edit.el 18 Jul 2006 01:13:54 +0200 1.297 > +++ cus-edit.el 27 Jul 2006 15:30:20 +0200=09 > @@ -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)