aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2006-11-18 13:16:58 +0000
committerJan Djärv2006-11-18 13:16:58 +0000
commitccf17b26dca875afcc350c7393eaaf0659f36fab (patch)
treec24d11fa29391e530d7c778a0db8c6f64aea900c
parent3a6df531dba198b7a979ccb90f74e6770dc410db (diff)
downloademacs-ccf17b26dca875afcc350c7393eaaf0659f36fab.tar.gz
emacs-ccf17b26dca875afcc350c7393eaaf0659f36fab.zip
(x-cut-buffer-or-selection-value): Decode text from
cut-buffers with next-selection-coding-system if not nil.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/term/x-win.el19
2 files changed, 13 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6d5538d63e4..4e616ac7a2a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12006-11-18 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2
3 * term/x-win.el (x-cut-buffer-or-selection-value): Decode text from
4 cut-buffers with next-selection-coding-system if not nil.
5
12006-11-17 Carsten Dominik <dominik@science.uva.nl> 62006-11-17 Carsten Dominik <dominik@science.uva.nl>
2 7
3 * textmodes/org.el (org-fix-decoded-time): New function. 8 * textmodes/org.el (org-fix-decoded-time): New function.
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 0e68fa575eb..b0e2dc85a04 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -2334,20 +2334,17 @@ order until succeed.")
2334 (cond;; check cut buffer 2334 (cond;; check cut buffer
2335 ((or (not cut-text) (string= cut-text "")) 2335 ((or (not cut-text) (string= cut-text ""))
2336 (setq x-last-selected-text-cut nil)) 2336 (setq x-last-selected-text-cut nil))
2337 ;; This short cut doesn't work because x-get-cut-buffer
2338 ;; always returns a newly created string.
2339 ;; ((eq cut-text x-last-selected-text-cut) nil)
2340 ((string= cut-text x-last-selected-text-cut-encoded)
2341 ;; See the comment above. No need of this recording.
2342 ;; Record the newer string,
2343 ;; so subsequent calls can use the `eq' test.
2344 ;; (setq x-last-selected-text-cut cut-text)
2345 nil)
2346 (t 2337 (t
2338 ;; We can not compare x-last-selected-text-cut-encoded with
2339 ;; cut-text because the next-selection-coding-system may have changed
2340 ;; so we need to re-decode anyway.
2347 (setq x-last-selected-text-cut-encoded cut-text 2341 (setq x-last-selected-text-cut-encoded cut-text
2348 x-last-selected-text-cut 2342 x-last-selected-text-cut
2349 ;; ICCCM says cut buffer always contain ISO-Latin-1 2343 ;; ICCCM says cut buffer always contain ISO-Latin-1, but
2350 (decode-coding-string cut-text 'iso-latin-1))))) 2344 ;; use next-selection-coding-system if not nil.
2345 (decode-coding-string
2346 cut-text
2347 (or next-selection-coding-system 'iso-latin-1))))))
2351 2348
2352 ;; As we have done one selection, clear this now. 2349 ;; As we have done one selection, clear this now.
2353 (setq next-selection-coding-system nil) 2350 (setq next-selection-coding-system nil)