unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Glenn Morris <rgm@gnu.org>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [alinsoar@voila.fr: EVAL and mouse selection in *Completions*]
Date: Mon, 05 Mar 2007 22:12:11 -0500	[thread overview]
Message-ID: <87y7mbf4l0.fsf@stupidchicken.com> (raw)
In-Reply-To: <vld53ngk5o.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon\, 05 Mar 2007 21\:50\:27 -0500")

Glenn Morris <rgm@gnu.org> writes:

> Richard Stallman wrote:
>
>> Would someone please fix this, then ack?
>>
>> 1. M-:
>> (setq indent- <TAB>
>>
>> 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;

  reply	other threads:[~2007-03-06  3:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-05 21:50 [alinsoar@voila.fr: EVAL and mouse selection in *Completions*] Richard Stallman
2007-03-06  2:50 ` Glenn Morris
2007-03-06  3:12   ` Chong Yidong [this message]
2007-03-06  3:22   ` Nick Roberts
2007-03-06  3:57     ` Glenn Morris
2007-03-06  3:59       ` Glenn Morris
2007-03-06  9:10         ` martin rudalics
2007-03-06 14:45           ` Stefan Monnier
2007-03-07  4:35           ` Glenn Morris
2007-03-07 10:24             ` martin rudalics
2007-03-08  9:28               ` Glenn Morris
2007-03-06 22:36   ` Richard Stallman
2007-03-07  4:22     ` Glenn Morris
2007-03-07 17:26       ` Richard Stallman
2007-03-07 18:35         ` Stefan Monnier
2007-03-08 17:40           ` Richard Stallman
2007-03-08 19:07             ` Stefan Monnier
2007-03-09 21:27               ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2007-03-06  9:57 A Soare
2007-03-08  8:28 A Soare
2007-03-08  8:41 ` Nick Roberts
2007-03-08 21:47 ` Richard Stallman
2007-03-08  8:31 A Soare

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://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87y7mbf4l0.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=rgm@gnu.org \
    --cc=rms@gnu.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://git.savannah.gnu.org/cgit/emacs.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).