From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: [alinsoar@voila.fr: EVAL and mouse selection in *Completions*] Date: Mon, 05 Mar 2007 22:12:11 -0500 Message-ID: <87y7mbf4l0.fsf@stupidchicken.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173150772 4756 80.91.229.12 (6 Mar 2007 03:12:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 6 Mar 2007 03:12:52 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 06 04:12:45 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HOQ6W-0001eT-Ci for ged-emacs-devel@m.gmane.org; Tue, 06 Mar 2007 04:12:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOQ6V-0005lO-Si for ged-emacs-devel@m.gmane.org; Mon, 05 Mar 2007 22:12:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HOQ6J-0005l0-L0 for emacs-devel@gnu.org; Mon, 05 Mar 2007 22:12:31 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOQ6J-0005ks-7g for emacs-devel@gnu.org; Mon, 05 Mar 2007 22:12:31 -0500 Original-Received: from south-station-annex.mit.edu ([18.72.1.2]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HOQ6G-0003bH-N7; Mon, 05 Mar 2007 22:12:29 -0500 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id l263CM1k004749; Mon, 5 Mar 2007 22:12:22 -0500 (EST) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id l263CD1R024661; Mon, 5 Mar 2007 22:12:14 -0500 (EST) Original-Received: from localhost (SYDNEYPACIFIC-SIX-O-SIX.MIT.EDU [18.95.7.95]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id l263CCJm003745; Mon, 5 Mar 2007 22:12:13 -0500 (EST) Original-Received: from cyd by localhost with local (Exim 3.36 #1 (Debian)) id 1HOQ60-0000e4-00; Mon, 05 Mar 2007 22:12:12 -0500 In-Reply-To: (Glenn Morris's message of "Mon\, 05 Mar 2007 21\:50\:27 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) X-Scanned-By: MIMEDefang 2.42 X-Spam-Score: -2.599 X-detected-kernel: Solaris 9.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:67396 Archived-At: Glenn Morris writes: > Richard Stallman wrote: > >> Would someone please fix this, then ack? >> >> 1. M-: >> (setq indent- >> >> select with the mouse indent-tabs-mode >> >> In the minibuffer appears just indent-tabs-mode. >> > This bug was already mentioned by Martin Rudalics in reply to your > mail "[bojohan+mail@bogus.example.com: Partial completion]" of Feb > 24th. > > I suggest the following fix, but it seems both this bug and the other > one need input from the OPs (or those who use partial completion), to > test that the suggested fixes do not break anything else. This bug does not refer to partial completion: it happens even for the ordinary completion mechanism. The basic problem is that completion-base-size is set to 0 for minibuffer input, whereas we want it to be nil when completing a symbol. The following is the minimal fix I've managed to find. I don't know if a less invasive change is possible. *** emacs/lisp/simple.el.~1.847.~ 2007-03-05 09:28:25.000000000 -0500 --- emacs/lisp/simple.el 2007-03-05 21:46:47.000000000 -0500 *************** *** 1056,1064 **** If `eval-expression-debug-on-error' is non-nil, which is the default, this command arranges for all errors to enter the debugger." (interactive ! (list (read-from-minibuffer "Eval: " nil read-expression-map t ! 'read-expression-history) current-prefix-arg)) (if (null eval-expression-debug-on-error) --- 1056,1065 ---- If `eval-expression-debug-on-error' is non-nil, which is the default, this command arranges for all errors to enter the debugger." (interactive ! (list (let ((minibuffer-completing-symbol t)) ! (read-from-minibuffer "Eval: " nil read-expression-map t ! 'read-expression-history)) current-prefix-arg)) (if (null eval-expression-debug-on-error) *************** *** 5109,5114 **** --- 5110,5117 ---- (save-excursion (skip-chars-backward completion-root-regexp) (- (point) (minibuffer-prompt-end))))) + (minibuffer-completing-symbol + nil) ;; Otherwise, in minibuffer, the base size is 0. ((minibufferp mainbuf) 0))) (setq common-string-length *** emacs/src/minibuf.c.~1.326.~ 2007-02-23 11:24:42.000000000 -0500 --- emacs/src/minibuf.c 2007-03-05 21:46:15.000000000 -0500 *************** *** 139,144 **** --- 139,145 ---- Lisp_Object Vminibuffer_completion_predicate, Qminibuffer_completion_predicate; Lisp_Object Vminibuffer_completion_confirm, Qminibuffer_completion_confirm; Lisp_Object Vminibuffer_completing_file_name; + Lisp_Object Vminibuffer_completing_symbol; Lisp_Object Quser_variable_p; *************** *** 2929,2934 **** --- 2930,2940 ---- doc: /* Non-nil and non-`lambda' means completing file names. */); Vminibuffer_completing_file_name = Qnil; + DEFVAR_LISP ("minibuffer-completing-symbol", + &Vminibuffer_completing_symbol, + doc: /* Non-nil means completing a Lisp symbol in the minibuffer. */); + Vminibuffer_completing_symbol = Qnil; + DEFVAR_LISP ("minibuffer-help-form", &Vminibuffer_help_form, doc: /* Value that `help-form' takes on inside the minibuffer. */); Vminibuffer_help_form = Qnil;