unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <jwv8tp8ootc.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 871sv6mxt3.fsf@zigzag.favinet

>    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




  reply	other threads:[~2017-02-14 14:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170208091858.6699.16542@vcs.savannah.gnu.org>
     [not found] ` <20170208091858.F26CA220010@vcs.savannah.gnu.org>
2017-02-08 22:28   ` [elpa] master 550ae83 1/2: [gnugo int] Decruft: Don't declare hook and keymap vars Stefan Monnier
2017-02-09 17:39     ` Thien-Thi Nguyen
2017-02-09 18:02       ` Stefan Monnier
2017-02-10  5:15         ` Thien-Thi Nguyen
2017-02-14 14:04           ` Stefan Monnier [this message]
2017-02-16  9:41             ` Thien-Thi Nguyen
2017-02-12 11:12         ` Philipp Stephani
2017-02-13  7:29           ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv8tp8ootc.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).