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: Sun, 17 Nov 2019 23:28:36 +0200 [thread overview]
Message-ID: <87a78uxke3.fsf@mail.linkov.net> (raw)
In-Reply-To: <d9bca70a-37c4-3e14-c0d0-d1706c49516a@gmx.at> (martin rudalics's message of "Sun, 17 Nov 2019 10:02:06 +0100")
> You could argue that 'ediff' already breaks
>
> (defalias 'y-or-n-p 'yes-or-no-p)
>
> They would probably say that consulting 'this-command' after a
> 'y-or-n-p' "has worked ever since". Guess whose argument wins.
Good example. This means that 'ediff' is broken, here is the fix:
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index a481defe29..c85241b2ea 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -1038,6 +1038,7 @@ ediff-toggle-read-only
(format
"File %s is under version control. Check it out? "
(ediff-abbreviate-file-name file))))
+ (setq this-command 'ediff-toggle-read-only)
;; if we checked the file out, we should also change the
;; original state of buffer-read-only to nil. If we don't
;; do this, the mode line will show %%, since the file was
@@ -2379,6 +2380,7 @@ ediff-quit
" & show containing session group" "")))
(progn
(message "")
+ (setq this-command 'ediff-quit)
(set-buffer ctl-buf)
(ediff-really-quit reverse-default-keep-variants))
(select-frame ctl-frm)
next prev parent reply other threads:[~2019-11-17 21:28 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
2019-11-17 9:02 ` martin rudalics
2019-11-17 21:28 ` Juri Linkov [this message]
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=87a78uxke3.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).