From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [elpa] master 550ae83 1/2: [gnugo int] Decruft: Don't declare hook and keymap vars. Date: Tue, 14 Feb 2017 09:04:56 -0500 Message-ID: References: <20170208091858.6699.16542@vcs.savannah.gnu.org> <20170208091858.F26CA220010@vcs.savannah.gnu.org> <87a89vmff5.fsf@zigzag.favinet> <871sv6mxt3.fsf@zigzag.favinet> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1487081250 22654 195.159.176.226 (14 Feb 2017 14:07:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2017 14:07:30 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 14 15:07:17 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cddlD-00054P-Um for ged-emacs-devel@m.gmane.org; Tue, 14 Feb 2017 15:07:16 +0100 Original-Received: from localhost ([::1]:35094 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cddlJ-0003Gd-MP for ged-emacs-devel@m.gmane.org; Tue, 14 Feb 2017 09:07:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cddjE-0001uP-RI for emacs-devel@gnu.org; Tue, 14 Feb 2017 09:05:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cddjA-0000pQ-2E for emacs-devel@gnu.org; Tue, 14 Feb 2017 09:05:12 -0500 Original-Received: from [195.159.176.226] (port=44134 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cddj9-0000mE-Qx for emacs-devel@gnu.org; Tue, 14 Feb 2017 09:05:07 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cddiz-0004qm-Ee for emacs-devel@gnu.org; Tue, 14 Feb 2017 15:04:57 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:QwH5d9wTYL5rA32lmnUIE3pBjnY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212368 Archived-At: > The main benefit is that there's a clear place where the mode > map is defined and `C-h o` will get you there. > Thanks for the tip. ‘C-h o’ is new to me. It's indeed newish, but it's just a combination of C-h f and C-h v. C-h v would also get you there: I just used `C-h o` because I'm trying to advertise this new functionality. > I'll release, wait a year or two for complaints, and revisit the > decision then -- perhaps ‘C-h o’ will in the meantime learn how > to accomodate some non-idiomatic forms, such as this one. `C-h o` and `C-h v` work by making you jump to "the definition" but in your case, "the definition" is in define-derived-mode and is just not very interesting. `C-h v` might get there, but that's not what the user wants to see. Instead she'll probably want to see the place where the default bindings are set up, but it's difficult for Emacs to distinguish a define-key executed within your `if` from a define-key executed anywhere else, and it's even more difficult for Emacs to guess that your `if` test is trying to guess if the map is already defined. So there's very little hope for `C-h o` to improve in this respect. Stefan