Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
f6c7b4e7
Commit
f6c7b4e7
authored
Sep 29, 1992
by
Jim Blandy
Browse files
*** empty log message ***
parent
60eb4bbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
lisp/term/x-win.el
lisp/term/x-win.el
+18
-6
No files found.
lisp/term/x-win.el
View file @
f6c7b4e7
...
...
@@ -482,12 +482,24 @@ turn off scroll bars; otherwise, turn on scroll bars."
;;; with older X applications, this checks cut buffer 0 before
;;; retrieving the value of the primary selection.
(
defun
x-cut-buffer-or-selection-value
()
(
let
((
text
(
or
(
x-selection-value
))))
(
if
(
or
(
string=
text
x-last-selected-text
)
(
string=
""
))
nil
(
setq
x-last-selected-text
nil
)
text
)))
(
let
(
text
)
;; Consult the cut buffer, then the selection. Treat empty strings
;; as if they were unset.
(
setq
text
(
x-get-cut-buffer
0
))
(
if
(
string=
text
""
)
(
setq
text
nil
))
(
or
text
(
setq
text
(
x-get-cut-buffer
0
)))
(
if
(
string=
text
""
)
(
setq
text
nil
))
(
cond
((
not
text
)
nil
)
((
eq
text
x-last-selected-text
)
nil
)
((
string=
text
x-last-selected-text
)
;; Record the newer string, so subsequent calls can use the `eq' test.
(
setq
x-last-selected-text
text
)
nil
)
(
t
(
setq
x-last-selected-text
text
)))))
;;; Arrange for the kill and yank functions to set and check the clipboard.
(
setq
interprogram-cut-function
'x-select-text
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment