unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Richard Copley <rcopley@gmail.com>,
	38219@debbugs.gnu.org, juri@linkov.net
Subject: bug#38219: Error on leaving Ediff after killing vital buffer
Date: Fri, 15 Nov 2019 17:35:58 +0100	[thread overview]
Message-ID: <a01c8ef8-b249-a69e-f8eb-4ca5c5e1d62a@gmx.at> (raw)
In-Reply-To: <CAPM58ojXQnHWQ2DZ2405C_iZd4JdnEM20R3VB=cKrp_-cd75Cg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 337 bytes --]

 > If you kill one of Ediff's vital buffers, then try to leave Ediff (by
 > typing q in the control window), there is an error.
 >
 > The error is:
 > ediff-visible-region: You have killed a vital Ediff buffer---you must leave
 > Ediff now!

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

martin

[-- Attachment #2: subr.el.diffs --]
[-- Type: text/plain, Size: 645 bytes --]

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-15 16:35 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 [this message]
2019-11-16 20:18   ` Juri Linkov
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=a01c8ef8-b249-a69e-f8eb-4ca5c5e1d62a@gmx.at \
    --to=rudalics@gmx.at \
    --cc=38219@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=rcopley@gmail.com \
    /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).