GNU bug report logs - #38219
Error on leaving Ediff after killing vital buffer

Previous Next

Package: emacs;

Reported by: Richard Copley <rcopley <at> gmail.com>

Date: Fri, 15 Nov 2019 13:52:02 UTC

Severity: normal

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Richard Copley <rcopley <at> gmail.com>, 38219 <at> debbugs.gnu.org
Subject: bug#38219: Error on leaving Ediff after killing vital buffer
Date: Sat, 16 Nov 2019 22:18:24 +0200
> '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)))
>  
>  




This bug report was last modified 5 years and 190 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.