From: Petr Hracek <phracek@redhat.com>
To: emacs-devel@gnu.org
Subject: Question about PRIMARY saved-region-selection
Date: Wed, 27 May 2015 12:00:02 +0200 [thread overview]
Message-ID: <556595A2.3060900@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1838 bytes --]
Hi folks,
I saw that you have fixed the bug with PRIMARY issue.
Is this bug also relevant for emacs-24.3 or only for 24.4?
$ git show c3c4b758c6d3e33d7fa7621ba4a50ec75c121247
commit c3c4b758c6d3e33d7fa7621ba4a50ec75c121247
Author: Jan D <jan.h.d@swipnet.se>
Date: Sun Mar 22 19:31:46 2015 +0100
Fixes: debbugs:18939
* simple.el (deactivate-mark): Only modify PRIMARY if we own PRIMARY.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8f888e3..7c7c66d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-22 Jan Djärv <jan.h.d@swipnet.se>
+
+ * simple.el (deactivate-mark): Only modify PRIMARY if we own
+ PRIMARY (Bug#18939).
+
2015-03-22 Martin Rudalics <rudalics@gmx.at>
* emacs-lisp/debug.el (debug): Don't try using "previous" window
diff --git a/lisp/simple.el b/lisp/simple.el
index ae07f62..5e5cd87 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4420,7 +4420,8 @@ run `deactivate-mark-hook'."
;; the region prior to the last command modifying the buffer.
;; Set the selection to that, or to the current region.
(cond (saved-region-selection
- (x-set-selection 'PRIMARY saved-region-selection)
+ (if (x-selection-owner-p 'PRIMARY)
+ (x-set-selection 'PRIMARY saved-region-selection))
(setq saved-region-selection nil))
;; If another program has acquired the selection, region
;; deactivation should not clobber it (Bug#11772).
$
Greetings and thank you in advance
--
Petr Hracek
Software Engineer
Developer Experience
Red Hat, Inc
Mob: +420777056169
email: phracek@redhat.com
--
Petr Hracek
Software Engineer
Developer Experience
Red Hat, Inc
Mob: +420777056169
email: phracek@redhat.com
[-- Attachment #2: Type: text/html, Size: 3702 bytes --]
reply other threads:[~2015-05-27 10:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=556595A2.3060900@redhat.com \
--to=phracek@redhat.com \
--cc=emacs-devel@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 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).