unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: edef <edef@edef.eu>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: remap send-message and send-message-and-exit
Date: Mon, 07 Jun 2021 19:09:32 +0300	[thread overview]
Message-ID: <m2k0n5k66b.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <b3994223-5c5c-411c-9570-8b1efbc3fad0@www.fastmail.com>

On Fri, Jun 04 2021, edef@edef.eu wrote:

>> >  (defvar notmuch-message-mode-map
>> >    (let ((map (make-sparse-keymap)))
>> > -    (define-key map (kbd "C-c C-c") #'notmuch-mua-send-and-exit)
>> > -    (define-key map (kbd "C-c C-s") #'notmuch-mua-send)
>> > +    (define-key map [remap message-send-and-exit] 'notmuch-mua-send-and-exit)
>> > +    (define-key map [remap message-send] 'notmuch-mua-send)
>> 
>> where did the # characters disappear here ?
>> 
>> afaic #' is the recommended way here...

> I'm not sure where to find that recommendation — the Emacs manual and
> information I've found in the wild don't use it for define-key.

In this particular case, around the change #' is used, 
and in change ' is used.

(in some other parts in notmuch elisp source there is only ' used
-- consistency -- in one way or another, would be nice...)

emacs sharp quote   can be used in internet searches to find more info,

then, in

http://www.gnu.org/software/emacs/manual/html_node/elisp/Anonymous-Functions.html


  Special Form: function function-object

      This special form returns function-object without evaluating it. In
      this, it is similar to quote (see Quoting). But unlike quote, it also
      serves as a note to the Emacs evaluator and byte-compiler that
      function-object is intended to be used as a function. Assuming
      function-object is a valid lambda expression, this has two effects:

          When the code is byte-compiled, function-object is compiled into a
          byte-code function object (see Byte Compilation).
          When lexical binding is enabled, function-object is converted into
          a closure. See Closures. 

      When function-object is a symbol and the code is byte compiled, the
      byte-compiler will warn if that function is not defined or might not be
      known at run time. 

  The read syntax #' is a short-hand for using function. 

Tomi

  reply	other threads:[~2021-06-07 16:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-30 10:28 [PATCH] emacs: rebind the "Send Message" toolbar/menu items edef
2021-05-31 23:21 ` David Bremner
2021-06-01  6:15   ` [PATCH] emacs: remap send-message and send-message-and-exit edef
2021-06-02 19:03     ` Tomi Ollila
2021-06-04 16:50       ` edef
2021-06-07 16:09         ` Tomi Ollila [this message]
2021-06-13  8:23           ` [PATCH v2] " edef
2021-06-27 17:25             ` David Bremner

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://notmuchmail.org/

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

  git send-email \
    --in-reply-to=m2k0n5k66b.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=edef@edef.eu \
    --cc=notmuch@notmuchmail.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://yhetil.org/notmuch.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).