Commit ccf17b26 authored by Jan Djärv's avatar Jan Djärv
Browse files

(x-cut-buffer-or-selection-value): Decode text from

cut-buffers with next-selection-coding-system if not nil.
parent 3a6df531
2006-11-18 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* term/x-win.el (x-cut-buffer-or-selection-value): Decode text from
cut-buffers with next-selection-coding-system if not nil.
2006-11-17 Carsten Dominik <dominik@science.uva.nl> 2006-11-17 Carsten Dominik <dominik@science.uva.nl>
   
* textmodes/org.el (org-fix-decoded-time): New function. * textmodes/org.el (org-fix-decoded-time): New function.
...@@ -2334,20 +2334,17 @@ order until succeed.") ...@@ -2334,20 +2334,17 @@ order until succeed.")
(cond;; check cut buffer (cond;; check cut buffer
((or (not cut-text) (string= cut-text "")) ((or (not cut-text) (string= cut-text ""))
(setq x-last-selected-text-cut nil)) (setq x-last-selected-text-cut nil))
;; This short cut doesn't work because x-get-cut-buffer
;; always returns a newly created string.
;; ((eq cut-text x-last-selected-text-cut) nil)
((string= cut-text x-last-selected-text-cut-encoded)
;; See the comment above. No need of this recording.
;; Record the newer string,
;; so subsequent calls can use the `eq' test.
;; (setq x-last-selected-text-cut cut-text)
nil)
(t (t
;; We can not compare x-last-selected-text-cut-encoded with
;; cut-text because the next-selection-coding-system may have changed
;; so we need to re-decode anyway.
(setq x-last-selected-text-cut-encoded cut-text (setq x-last-selected-text-cut-encoded cut-text
x-last-selected-text-cut x-last-selected-text-cut
;; ICCCM says cut buffer always contain ISO-Latin-1 ;; ICCCM says cut buffer always contain ISO-Latin-1, but
(decode-coding-string cut-text 'iso-latin-1))))) ;; use next-selection-coding-system if not nil.
(decode-coding-string
cut-text
(or next-selection-coding-system 'iso-latin-1))))))
;; As we have done one selection, clear this now. ;; As we have done one selection, clear this now.
(setq next-selection-coding-system nil) (setq next-selection-coding-system nil)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment