From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Problems with whole buffer Custom functions. Date: Sun, 22 Jan 2006 02:45:17 +0200 Organization: JURTA Message-ID: <877j8tcsyt.fsf@jurta.org> References: <200601130332.k0D3WKo16648@raven.dms.auburn.edu> <87psmrr3vg.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1137894126 1203 80.91.229.2 (22 Jan 2006 01:42:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 22 Jan 2006 01:42:06 +0000 (UTC) Cc: teirllm@dms.auburn.edu, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 22 02:42:04 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 1F0UEq-0001TH-OJ for ged-emacs-devel@m.gmane.org; Sun, 22 Jan 2006 02:41:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F0UHP-0002pt-Is for ged-emacs-devel@m.gmane.org; Sat, 21 Jan 2006 20:44:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F0UGO-00024G-Vu for emacs-devel@gnu.org; Sat, 21 Jan 2006 20:43:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F0UGO-00023W-7X for emacs-devel@gnu.org; Sat, 21 Jan 2006 20:43:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F0UGN-00023H-Vd for emacs-devel@gnu.org; Sat, 21 Jan 2006 20:43:28 -0500 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1F0UKq-000567-CL; Sat, 21 Jan 2006 20:48:04 -0500 Original-Received: from mail.neti.ee (80-235-32-6-dsl.mus.estpak.ee [80.235.32.6]) by Relayhost1.neti.ee (Postfix) with ESMTP id 625E916D0; Sun, 22 Jan 2006 03:40:36 +0200 (EET) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Thu, 19 Jan 2006 12:44:48 -0500") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee 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:49369 Archived-At: > More keys are not enabled in editable fields, for instance, `n' and `p': > > I like the idea of using M-n and M-p for them. Those keys > could be bound in the keymap used for editable fields, and then they > would work everywhere in the buffer. I'd reserve M-n and M-p in editable fields for history navigation. Since editable fields are very like the minibuffer where M-n and M-p are used to navigate in the minibuffer history, it makes sense to implement something similar for editable fields (after the release). > Perhaps cus-edit should bind `C-c C-c' and `C-x C-s' in a new keymap > inheriting from widget-field-keymap. > > I think that is a good idea. > > Can one of you do these things? Below is a patch that implement this. Index: lisp/cus-edit.el =================================================================== RCS file: /sources/emacs/emacs/lisp/cus-edit.el,v retrieving revision 1.279 diff -c -r1.279 cus-edit.el *** lisp/cus-edit.el 19 Jan 2006 23:26:04 -0000 1.279 --- lisp/cus-edit.el 22 Jan 2006 00:43:55 -0000 *************** *** 4400,4405 **** --- 4396,4410 ---- ["Erase Customization" Custom-reset-standard t] ["Info" (info "(emacs)Easy Customization") t])) + (defvar custom-field-keymap + (let ((map (copy-keymap widget-field-keymap))) + (define-key map "\C-c\C-c" 'Custom-set) + (define-key map "\C-x\C-s" 'Custom-save) + map) + "Keymap used inside editable fields in customization buffers.") + + (widget-put (get 'editable-field 'widget-type) :keymap custom-field-keymap) + (defun Custom-goto-parent () "Go to the parent group listed at the top of this buffer. If several parents are listed, go to the first of them." -- Juri Linkov http://www.jurta.org/emacs/