From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: redefine C-h Date: Sun, 10 Aug 2008 21:07:40 -0700 Message-ID: <005201c8fb67$cc429ce0$0200a8c0@us.oracle.com> References: <6c2a4df0-eaa7-4617-9cb5-94f0ca4bd888@w7g2000hsa.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1218427795 14678 80.91.229.12 (11 Aug 2008 04:09:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Aug 2008 04:09:55 +0000 (UTC) To: "'YSK'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 11 06:10:46 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KSOk1-0004lg-5J for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Aug 2008 06:10:45 +0200 Original-Received: from localhost ([127.0.0.1]:60624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSOj4-0005yf-OL for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Aug 2008 00:09:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSOik-0005wa-VG for help-gnu-emacs@gnu.org; Mon, 11 Aug 2008 00:09:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSOij-0005vA-7x for help-gnu-emacs@gnu.org; Mon, 11 Aug 2008 00:09:26 -0400 Original-Received: from [199.232.76.173] (port=59207 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSOij-0005uu-1o for help-gnu-emacs@gnu.org; Mon, 11 Aug 2008 00:09:25 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]:11101) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KSOii-0004cx-Qx for help-gnu-emacs@gnu.org; Mon, 11 Aug 2008 00:09:25 -0400 Original-Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.186.110]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m7B49Jj9004449; Sun, 10 Aug 2008 22:09:20 -0600 Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by rgmgw1.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m7B49Gme019467; Sun, 10 Aug 2008 22:09:16 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt356.oracle.com with ESMTP id 11374348461218427653; Sun, 10 Aug 2008 21:07:33 -0700 Original-Received: from dradamslap1 (/69.181.100.12) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 10 Aug 2008 21:07:33 -0700 X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 In-Reply-To: Thread-Index: Acj7U2GySg9MeW5QRWa0XV6b8bXB/AADWlcQ X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56434 Archived-At: > > Icicles does not bind `C-h'. `C-h' with Icicle mode is the > > same as it is without it. > > I must have turned on an icicles setting to override these keys, > since commenting out these lines in icicles-mode.el gave me the > C-h behavior I was looking for: > > ; (icicle-remap 'where-is 'icicle-where-is > ; icicle-mode-map (current-global-map)) ; `C-h w' > ; (define-key icicle-mode-map "\C-h\C-o" 'icicle-describe-option- > of-type) ; `C-h C-o' 1. That should have nothing to do with your binding of `C-h'. 2. The right way to remove those Icicle mode bindings, if you want to, is to customize option `icicle-top-level-key-bindings', as I mentioned. That is the way to customize all top-level (i.e., non-minibuffer) Icicles bindings. You don't need to know any Lisp to do this; it's very simple. > I'm not exactly sure why, actually. Possibly I made another change at > around the same time that I can't recall right now that actually > "fixed" my C-h issue. I expect so. I don't think Icicles is related to your problem in any way. > > Similarly, for `C-M-h': Icicles should not affect it.... > > Yes, C-M-h worked correctly right away. It's the 'C-h' rebinding that > was not taking. Others have explained why. See below for a summary recipe. > > Icicle mode does, however make some changes in the > > minibuffer keymaps. One that is pertinent here is that > > it remaps command `delete-backward-char' to > > `icicle-delete-backward-char' in the minibuffer completion > > keymaps. This is so that whenever you delete a character > > in the minibuffer the set of candidate completions is > > updated to reflect your edited input... > > Yes..I would prefer to keep the iciciles minibuffer features intact > since I do use icicles entirely for its minibuffer enhancements. > > In my current setup, C-h does do the right thing in the minibuffer - > delete the char before point, and update the completion list. And it does the right thing outside the minibuffer too, right? Doesn't it delete a char there too? If so, then the only thing that is not yet working is `C-M-h' for `help-command', is that correct? Or is that working now also? The following should do what you need. It should work whether or not you use Icicles (it does for me). (global-set-key "\C-h" 'delete-backward-char) (setq help-char ?\C-\M-h) (define-key global-map (char-to-string help-char) 'help-command) `C-M-h w' should then give you `where-is', and so on. Note, BTW, that `C-M-h C-h' gives you `help-for-help' - don't expect this to be `C-M-h C-M-h'. [Instead of using `setq' to set `help-char', you can use Customize: `M-x customize-option help-char'. In the Customize buffer, type: C-q C-M-h (that is, Control-q key followed by Control-Meta-h chord) `C-q' quotes the key you hit after it. You will see \210 as the displayed new value of `help-char' in Customize, but that's OK. (Sometimes Customize is less user-friendly than Lisp. ;-)) But you might as well just use (setq help-char ?\C-\M-h), to keep all of this stuff together.]