From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel 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 Message-ID: References: <20160614214332.2901.16184@vcs.savannah.gnu.org> <20160614214332.C030F220116@vcs.savannah.gnu.org> <87h9cuyeip.fsf@gmx.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1465996566 32647 80.91.229.3 (15 Jun 2016 13:16:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jun 2016 13:16:06 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 15 15:15:57 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bDAfk-0003yQ-Hj for ged-emacs-devel@m.gmane.org; Wed, 15 Jun 2016 15:15:56 +0200 Original-Received: from localhost ([::1]:42088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDAfe-0004sd-Lp for ged-emacs-devel@m.gmane.org; Wed, 15 Jun 2016 09:15:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDAf1-0004rP-V7 for emacs-devel@gnu.org; Wed, 15 Jun 2016 09:15:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDAew-0000uE-Uf for emacs-devel@gnu.org; Wed, 15 Jun 2016 09:15:10 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:35868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDAew-0000tq-P3 for emacs-devel@gnu.org; Wed, 15 Jun 2016 09:15:06 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bDAet-0003OM-V3 for emacs-devel@gnu.org; Wed, 15 Jun 2016 15:15:04 +0200 Original-Received: from modemcable222.169-23-96.mc.videotron.ca ([96.23.169.222]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Jun 2016 15:15:03 +0200 Original-Received: from monnier by modemcable222.169-23-96.mc.videotron.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Jun 2016 15:15:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: modemcable222.169-23-96.mc.videotron.ca User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:CoB+IT4okk1SxqQgNlhnAdbqWNo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:204382 Archived-At: >>> - (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