]> code.delx.au - gnu-emacs/commitdiff
Preserve text properties when saving primary selection.
authorChong Yidong <cyd@gnu.org>
Tue, 7 Aug 2012 04:52:15 +0000 (12:52 +0800)
committerChong Yidong <cyd@gnu.org>
Tue, 7 Aug 2012 04:52:15 +0000 (12:52 +0800)
* lisp/simple.el (deactivate-mark): Preserve text properties when
saving the primary selection.

Fixes: debbugs:8384
lisp/ChangeLog
lisp/simple.el

index d0d4a31ab65226fe0767be73e2d7ebdd36952894..7ec5cdb5565b8638099dd3febb13c702a07473ec 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-07  Chong Yidong  <cyd@gnu.org>
+
+       * simple.el (deactivate-mark): Preserve text properties when
+       saving the primary selection (Bug#8384).
+
 2012-08-07  Kevin Ryde  <user42@zip.com.au>
 
        * woman.el (woman0-if): Quietly treat ".if v" as false (Bug#12109).
index 6b5da29b3bbdd66018773a27445bf398b90d2042..0877f396faacb8483eb6b650820d447088baf281 100644 (file)
@@ -3960,9 +3960,8 @@ run `deactivate-mark-hook'."
                  (or (x-selection-owner-p 'PRIMARY)
                      (null (x-selection-exists-p 'PRIMARY))))
             (x-set-selection 'PRIMARY
-                             (buffer-substring-no-properties
-                              (region-beginning)
-                              (region-end))))))
+                             (buffer-substring (region-beginning)
+                                               (region-end))))))
     (if (and (null force)
             (or (eq transient-mark-mode 'lambda)
                 (and (eq (car-safe transient-mark-mode) 'only)