all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Using keymap argument of define-minor-mode
Date: Mon, 18 Apr 2016 12:32:55 -0400	[thread overview]
Message-ID: <jwvbn56ande.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAArVCkQgjUGhWf1Cyz5Takbs9WdGyKq=47frg1OdmwFBb5aVNw@mail.gmail.com> (Philipp Stephani's message of "Sat, 16 Apr 2016 13:16:13 +0000")

Thanks, installed in trunk.


        Stefan


>>>>> "Philipp" == Philipp Stephani <p.stephani2@gmail.com> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> schrieb am Fr., 15. Apr. 2016 um
> 23:18 Uhr:

>> > Fair enough, but that doesn't really answer the question. Is the
>> docstring
>> > wrong, or the implementation of define-minor-mode, or my example?
>> 
>> Good question.  The code passes the list as first (and sole) arg to
>> easy-mmode-define-keymap, and given the lack of interest to support this
>> in the future, I guess the code should take precedence over
>> the docstring.
>> 
>> 
>> 
> OK, I've attached a patch to fix the docstring.
> From e84c7f70b4b9394b06944bea3f8e7eed6a1ce6ba Mon Sep 17 00:00:00 2001
> From: Philipp Stephani <phst@google.com>
> Date: Sat, 16 Apr 2016 15:13:44 +0200
> Subject: [PATCH] =?UTF-8?q?Fix=20docstring=20of=20=E2=80=98define-minor-mo?=
>  =?UTF-8?q?de=E2=80=99.?=
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit

> Discussed in
> https://lists.gnu.org/archive/html/help-gnu-emacs/2016-04/msg00071.html.

> * emacs-lisp/easy-mmode.el (define-minor-mode): Fix docstring so that it
> matches the actual implementation.
> ---
>  lisp/emacs-lisp/easy-mmode.el | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

> diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
> index 6a4d835..46d5d0d 100644
> --- a/lisp/emacs-lisp/easy-mmode.el
> +++ b/lisp/emacs-lisp/easy-mmode.el
> @@ -108,9 +108,10 @@ define-minor-mode
>  Optional KEYMAP is the default keymap bound to the mode keymap.
>    If non-nil, it should be a variable name (whose value is a keymap),
>    or an expression that returns either a keymap or a list of
> -  arguments for `easy-mmode-define-keymap'.  If you supply a KEYMAP
> -  argument that is not a symbol, this macro defines the variable
> -  MODE-map and gives it the value that KEYMAP specifies.
> +  (KEY . BINDING) pairs where KEY and BINDING are suitable for
> +  `define-key'.  If you supply a KEYMAP argument that is not a
> +  symbol, this macro defines the variable MODE-map and gives it
> +  the value that KEYMAP specifies.
 
>  BODY contains code to execute each time the mode is enabled or disabled.
>    It is executed after toggling the mode, and before running MODE-hook.
> -- 
> 2.7.4





  reply	other threads:[~2016-04-18 16:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15 11:57 Using keymap argument of define-minor-mode Philipp Stephani
2016-04-15 12:36 ` Stefan Monnier
2016-04-15 20:02   ` Philipp Stephani
2016-04-15 21:18     ` Stefan Monnier
2016-04-16 13:16       ` Philipp Stephani
2016-04-18 16:32         ` Stefan Monnier [this message]
2016-04-18 16:42           ` Kaushal Modi
2016-04-18 18:42             ` John Wiegley
2016-12-07 12:59               ` Philipp Stephani

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

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

  git send-email \
    --in-reply-to=jwvbn56ande.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    --cc=p.stephani2@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.