emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer comp


From: Stefan Monnier
Subject: Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695).
Date: Wed, 15 Jun 2016 09:16:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

>>> -  (let ((map minibuffer-local-completion-map))
>>> -    (define-key map " " nil)
>>> +  (let ((minibuffer-local-completion-map
>>> +         (copy-keymap minibuffer-local-completion-map)))
>>> +    (define-key minibuffer-local-completion-map " " 'self-insert-command)
>> Why bind it to `self-insert-command` rather than to nil?
> Is that a general recommendation,
> e.g. to make the `?' key insert `?' in the minibuffer also bind it to
> nil?

The question is: do you want to hide the "SPC is completion" binding, or
do you want to force SPC to insert a space.

> I guess that answers the question.)

Right, IMO what we want here is to hide the "SPC is completion" binding.
Also, the old code used nil (as can be seen in the chunk of patch still
quoted above).

> Are you saying it is generally better to use the latter?

Yes, it's more efficient.

> If so, when is it better to use the former?

Never.  Copying is a bad idea.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]