unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: martin rudalics <rudalics@gmx.at>
Cc: Richard Copley <rcopley@gmail.com>, 38219@debbugs.gnu.org
Subject: bug#38219: Error on leaving Ediff after killing vital buffer
Date: Sat, 16 Nov 2019 22:18:24 +0200	[thread overview]
Message-ID: <87o8xbu3wn.fsf@mail.linkov.net> (raw)
In-Reply-To: <a01c8ef8-b249-a69e-f8eb-4ca5c5e1d62a@gmx.at> (martin rudalics's message of "Fri, 15 Nov 2019 17:35:58 +0100")

> 'y-or-n-p' mangles 'this-command'.  Something like the attached patch
> should fix that.

Can the same be said about read-from-minibuffer?
Shouldn't read-from-minibuffer mangle 'this-command'?
What it some command wants to check if 'this-command'
is 'exit-minibuffer' afterwards?  Shouldn't this change better
to be localized to callers in ediff, instead of adding such hack?

> diff --git a/lisp/subr.el b/lisp/subr.el
> index eaec223585..68e25c96d9 100644
> --- a/lisp/subr.el
> +++ b/lisp/subr.el
> @@ -2828,7 +2828,8 @@ y-or-n-p
>  		    (concat prompt
>  			    (if (or (zerop l) (eq ?\s (aref prompt (1- l))))
>  				"" " ")
> -			    (if dialog "" "(y or n) "))))))
> +			    (if dialog "" "(y or n) ")))))
> +        (old-this-command this-command))
>      (cond
>       (noninteractive
>        (setq prompt (funcall padded prompt))
> @@ -2858,6 +2859,7 @@ y-or-n-p
>      (let ((ret (eq answer 'act)))
>        (unless noninteractive
>          (message "%s%c" prompt (if ret ?y ?n)))
> +      (setq this-command old-this-command)
>        ret)))
>  
>  \f





  reply	other threads:[~2019-11-16 20:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15 13:50 bug#38219: Error on leaving Ediff after killing vital buffer Richard Copley
2019-11-15 16:35 ` martin rudalics
2019-11-16 20:18   ` Juri Linkov [this message]
2019-11-17  9:02     ` martin rudalics
2019-11-17 21:28       ` Juri Linkov
2019-11-18 21:53         ` Juri Linkov

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=87o8xbu3wn.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=38219@debbugs.gnu.org \
    --cc=rcopley@gmail.com \
    --cc=rudalics@gmx.at \
    /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).