From: Kelly Dean <kellydeanch@yahoo.com>
To: 13169@debbugs.gnu.org
Subject: bug#13169: [PATCH] kill-region fails to deactivate mark after cutting empty region
Date: Thu, 13 Dec 2012 00:19:16 -0800 (PST) [thread overview]
Message-ID: <1355386756.25768.YahooMailClassic@web141106.mail.bf1.yahoo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 512 bytes --]
On 24.2, emacs -Q
C-SPC M-w C-p
kill-ring-save copied an empty region, and deactivated the mark. This is correct. But now do
C-SPC C-w C-p
kill-region cut an empty region, which is correct, but the mark is still active, which is incorrect. When the buffer and text aren't read-only, kill-region relies on the command loop to deactivate the mark after the buffer is modified, but when cutting an empty region, the buffer isn't modified, so the mark is never deactivated.
The attached killregionbug.patch fixes it.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: killregionbug.patch --]
[-- Type: text/x-diff; name="killregionbug.patch", Size: 442 bytes --]
--- emacs-24.2/lisp/simple.el 2012-08-22 22:33:42.000000000 -0700
+++ emacs-24.2/lisp/simple.el.new2 2012-12-12 22:52:46.258462306 -0800
@@ -3233,6 +3233,7 @@
(kill-new string nil yank-handler)))
(when (or string (eq last-command 'kill-region))
(setq this-command 'kill-region))
+ (setq deactivate-mark t)
nil)
((buffer-read-only text-read-only)
;; The code above failed because the buffer, or some of the characters
next reply other threads:[~2012-12-13 8:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-13 8:19 Kelly Dean [this message]
2012-12-21 3:49 ` bug#13169: [PATCH] kill-region fails to deactivate mark after cutting empty region Chong Yidong
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355386756.25768.YahooMailClassic@web141106.mail.bf1.yahoo.com \
--to=kellydeanch@yahoo.com \
--cc=13169@debbugs.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.