aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2004-03-26 04:35:08 +0000
committerKaroly Lorentey2004-03-26 04:35:08 +0000
commit026ad6ba8148d468a0a61a1c863a63ef58054e50 (patch)
tree050282708d227f6431d38f978a62c4222fca670e
parent945c3bbb15ab1af18e94ab6f81e9c72c8ce1402f (diff)
downloademacs-026ad6ba8148d468a0a61a1c863a63ef58054e50.tar.gz
emacs-026ad6ba8148d468a0a61a1c863a63ef58054e50.zip
Fix cut'n'paste during a multi-display session (Mark Plaksin, Robert Chassell).
lisp/simple.el: Make interprogram-cut-function and interprogram-paste-function frame-local. (Reported by Mark Plaksin and Robert Chassell). lisp/faces.el (x-create-frame-with-faces) (tty-create-frame-with-faces): Set the interprogram-cut-function and interprogram-paste-function frame parameters. lisp/x-win.el (x-initialize-window-system): Don't set interprogram-cut-function and interprogram-paste-function. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-124
-rw-r--r--README.multi-tty23
-rw-r--r--lisp/faces.el8
-rw-r--r--lisp/simple.el4
-rw-r--r--lisp/term/x-win.el4
4 files changed, 28 insertions, 11 deletions
diff --git a/README.multi-tty b/README.multi-tty
index 66b58639cd7..64103609a81 100644
--- a/README.multi-tty
+++ b/README.multi-tty
@@ -164,13 +164,14 @@ THANKS
164The following is an (incomplete) list of people who have contributed 164The following is an (incomplete) list of people who have contributed
165to the project by testing, bug reports, and suggestions. Thanks! 165to the project by testing, bug reports, and suggestions. Thanks!
166 166
167Robert J. Chassel <bob at rattlesnake dot com> 167Robert J. Chassell <bob at rattlesnake dot com>
168Romain Francoise <romain at orebokech dot com> 168Romain Francoise <romain at orebokech dot com>
169Ami Fischman <ami at fischman dot org> 169Ami Fischman <ami at fischman dot org>
170Istvan Marko <mi-mtty ar kismala dot com> 170Istvan Marko <mi-mtty ar kismala dot com>
171Dan Nicolaescu <dann at ics dot uci dot edu> 171Dan Nicolaescu <dann at ics dot uci dot edu>
172Gergely Nagy <algernon at debian dot org> 172Gergely Nagy <algernon at debian dot org>
173Mark Plaksin <happy at mcplaksin dot org> 173Mark Plaksin <happy at mcplaksin dot org>
174Francisco Borges <borges at let dot rug dot nl>
174 175
175Richard Stallman was kind enough to review my patches. 176Richard Stallman was kind enough to review my patches.
176 177
@@ -182,11 +183,6 @@ See arch logs.
182THINGS TO DO 183THINGS TO DO
183------------ 184------------
184 185
185** Robert Chassell has found serious copy-paste bugs with the
186 multi-tty branch. There seem to be redisplay bugs while copying
187 from X to a terminal frame. Copying accented characters do not
188 work for me.
189
190** Emacs assumes that all terminal frames have the same locale 186** Emacs assumes that all terminal frames have the same locale
191 settings as Emacs itself. This may lead to bogus results in a 187 settings as Emacs itself. This may lead to bogus results in a
192 multi-locale setup. (E.g., while logging in from a remote client 188 multi-locale setup. (E.g., while logging in from a remote client
@@ -196,7 +192,8 @@ THINGS TO DO
196 sometimes; Emacs does not respond to stimuli from other keyboards. 192 sometimes; Emacs does not respond to stimuli from other keyboards.
197 At least a beep or a message would be important, if the single-mode 193 At least a beep or a message would be important, if the single-mode
198 is still required to prevent interference. (Reported by Dan 194 is still required to prevent interference. (Reported by Dan
199 Nicolaescu.) 195 Nicolaescu.) (Update: selecting a region with the mouse enables
196 single_kboard under X. This is very confusing.)
200 197
201** Change Lisp code not to (getenv "TERM"); use the `tty-type' frame 198** Change Lisp code not to (getenv "TERM"); use the `tty-type' frame
202 parameter or the frame-tty-type function instead. 199 parameter or the frame-tty-type function instead.
@@ -736,5 +733,17 @@ DIARY OF CHANGES
736 733
737 (This is gone.) 734 (This is gone.)
738 735
736-- Robert Chassell has found serious copy-paste bugs with the
737 multi-tty branch. There seem to be redisplay bugs while copying
738 from X to a terminal frame. Copying accented characters do not
739 work for me.
740
741 (Patch-124 should fix this, by changing the interprogram-*-function
742 variables to be frame-local, as suggested by Mark Plaksin
743 (thanks!). I think that the redisplay bugs are in fact not bugs,
744 but delays caused by single_kboard --> perhaps MULTI_KBOARD should
745 be removed.)
746
747
739 748
740;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d 749;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d
diff --git a/lisp/faces.el b/lisp/faces.el
index c7123e0229e..2c9fbb8206e 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1680,6 +1680,11 @@ Value is the new frame created."
1680 (if (or (null frame-list) (null visibility-spec)) 1680 (if (or (null frame-list) (null visibility-spec))
1681 (make-frame-visible frame) 1681 (make-frame-visible frame)
1682 (modify-frame-parameters frame (list visibility-spec))) 1682 (modify-frame-parameters frame (list visibility-spec)))
1683 ;; Arrange for the kill and yank functions to set and check the clipboard.
1684 (modify-frame-parameters
1685 frame '((interprogram-cut-function . x-select-text)))
1686 (modify-frame-parameters
1687 frame '((interprogram-paste-function . x-cut-buffer-or-selection-value)))
1683 (setq success t)) 1688 (setq success t))
1684 (unless success 1689 (unless success
1685 (delete-frame frame))) 1690 (delete-frame frame)))
@@ -1777,6 +1782,9 @@ created."
1777 (if (setq hyphend (string-match "[-_][^-_]+$" term)) 1782 (if (setq hyphend (string-match "[-_][^-_]+$" term))
1778 (substring term 0 hyphend) 1783 (substring term 0 hyphend)
1779 nil))))) 1784 nil)))))
1785 ;; Make sure the kill and yank functions do not touch the X clipboard.
1786 (modify-frame-parameters frame '((interprogram-cut-function . nil)))
1787 (modify-frame-parameters frame '((interprogram-paste-function . nil)))
1780 (setq success t)) 1788 (setq success t))
1781 (unless success 1789 (unless success
1782 (select-frame old-frame) 1790 (select-frame old-frame)
diff --git a/lisp/simple.el b/lisp/simple.el
index 6bc89ae1750..13cb63af240 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1788,6 +1788,8 @@ the text which should be made available.
1788The second, optional, argument PUSH, has the same meaning as the 1788The second, optional, argument PUSH, has the same meaning as the
1789similar argument to `x-set-cut-buffer', which see.") 1789similar argument to `x-set-cut-buffer', which see.")
1790 1790
1791(make-variable-frame-local 'interprogram-cut-function)
1792
1791(defvar interprogram-paste-function nil 1793(defvar interprogram-paste-function nil
1792 "Function to call to get text cut from other programs. 1794 "Function to call to get text cut from other programs.
1793 1795
@@ -1808,6 +1810,8 @@ most recent string, the function should return nil. If it is
1808difficult to tell whether Emacs or some other program provided the 1810difficult to tell whether Emacs or some other program provided the
1809current string, it is probably good enough to return nil if the string 1811current string, it is probably good enough to return nil if the string
1810is equal (according to `string=') to the last text Emacs provided.") 1812is equal (according to `string=') to the last text Emacs provided.")
1813
1814(make-variable-frame-local 'interprogram-paste-function)
1811 1815
1812 1816
1813 1817
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index da5ac04a6c9..cd26352a962 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -2445,10 +2445,6 @@ order until succeed.")
2445 ;; Don't let Emacs suspend under X. 2445 ;; Don't let Emacs suspend under X.
2446 (add-hook 'suspend-hook 'x-win-suspend-error) 2446 (add-hook 'suspend-hook 'x-win-suspend-error)
2447 2447
2448 ;; Arrange for the kill and yank functions to set and check the clipboard.
2449 (setq interprogram-cut-function 'x-select-text)
2450 (setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
2451
2452 ;; Turn off window-splitting optimization; X is usually fast enough 2448 ;; Turn off window-splitting optimization; X is usually fast enough
2453 ;; that this is only annoying. 2449 ;; that this is only annoying.
2454 (setq split-window-keep-point t) 2450 (setq split-window-keep-point t)