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: master f995fbd: * lisp/server.el (server-name): Add autoload cookie. (Bug#23576) Date: Fri, 17 Jun 2016 18:35:46 -0400 Message-ID: References: <20160518194708.27363.47377@vcs.savannah.gnu.org> <20160518194708.86FE0220157@vcs.savannah.gnu.org> <834m9u9dis.fsf@gnu.org> <83r3cx8eg2.fsf@gnu.org> <83mvnl894y.fsf@gnu.org> <83lh3583tb.fsf@gnu.org> <83eg8w97kf.fsf@gnu.org> <8337pc8sjc.fsf@gnu.org> <83a8jc3k39.fsf@gnu.org> <57645F28.9040602@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466202979 9481 80.91.229.3 (17 Jun 2016 22:36:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Jun 2016 22:36:19 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 18 00:36:09 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 1bE2My-0006NY-JK for ged-emacs-devel@m.gmane.org; Sat, 18 Jun 2016 00:36:08 +0200 Original-Received: from localhost ([::1]:60542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bE2Mx-0006Pn-Se for ged-emacs-devel@m.gmane.org; Fri, 17 Jun 2016 18:36:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bE2Mr-0006Pi-Uo for emacs-devel@gnu.org; Fri, 17 Jun 2016 18:36:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bE2Mm-0000GB-Ss for emacs-devel@gnu.org; Fri, 17 Jun 2016 18:36:01 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:38634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bE2Mm-0000G7-LG for emacs-devel@gnu.org; Fri, 17 Jun 2016 18:35:56 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bE2Mj-0006BZ-0v for emacs-devel@gnu.org; Sat, 18 Jun 2016 00:35:53 +0200 Original-Received: from 45.72.244.67 ([45.72.244.67]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 Jun 2016 00:35:53 +0200 Original-Received: from monnier by 45.72.244.67 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 Jun 2016 00:35:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 45.72.244.67 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:97ayR6KyjBIwWiuCGg6R48FVzpE= 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:204459 Archived-At: >> emacs -Q >> C-h v server- TAB >> will load server.el and show all the variables defined there in. > Sounds neat. I wonder, though: how does this interact with ido? It "just works" with icomplete-mode and I guess it should work just as well with ido-everywhere: i.e., as soon as you type the "-" after "server", server.el will be loaded and extra entries will appear. > What about M-x completion (and smex)? Currently only C-h f and C-h v have been changed to make use of the functionality. Every place where we want this auto-loading to happen needs to be modified so as to use #'help--symbol-completion-table instead of `obarray' as completion table. See below the two hunks that do that for C-h f and C-h v. Stefan @@ -58,8 +114,9 @@ describe-function (setq val (completing-read (if fn (format "Describe function (default %s): " fn) "Describe function: ") - obarray 'fboundp t nil nil - (and fn (symbol-name fn)))) + #'help--symbol-completion-table + #'fboundp + t nil nil (and fn (symbol-name fn)))) (list (if (equal val "") fn (intern val))))) (or (and function (symbolp function)) @@ -706,7 +763,7 @@ describe-variable (format "Describe variable (default %s): " v) "Describe variable: ") - obarray + #'help--symbol-completion-table (lambda (vv) ;; In case the variable only exists in the buffer ;; the command we switch back to that buffer before