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
a5bfbd4e
Commit
a5bfbd4e
authored
Jan 21, 2004
by
Jan Djärv
Browse files
Enable clipboard on the menu bar and make Paste from the menu bar first
use clipboard. For compliance with freedesktop.org.
parent
371b1542
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/term/x-win.el
lisp/term/x-win.el
+17
-6
No files found.
lisp/ChangeLog
View file @
a5bfbd4e
2004-01-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* term/x-win.el: Call menu-bar-enable-clipboard and make Paste
use clipboard first.
2004-01-20 Stefan Monnier <monnier@iro.umontreal.ca>
* outline.el (outline-insert-heading): Tighten up match.
...
...
lisp/term/x-win.el
View file @
a5bfbd4e
...
...
@@ -2385,12 +2385,6 @@ order until succeed.")
;; generated from FONT.
(create-fontset-from-ascii-font font resolved-name "
startup
"))))
;; Sun expects the menu bar cut and paste commands to use the clipboard.
;; This has ,? to match both on Sunos and on Solaris.
(if (string-match "
Sun
Microsystems,?
Inc\\.
"
(x-server-vendor))
(menu-bar-enable-clipboard))
;; Apply a geometry resource to the initial frame. Put it at the end
;; of the alist, so that anything specified on the command line takes
;; precedence.
...
...
@@ -2456,5 +2450,22 @@ order until succeed.")
;; Turn on support for mouse wheels.
(mouse-wheel-mode 1)
;; Enable CLIPBOARD copy/paste through menu bar commands.
(menu-bar-enable-clipboard)
;; Override Paste so it looks at CLIPBOARD first.
(defun x-clipboard-yank ()
"
Insert
the
clipboard
contents,
or
the
last
stretch
of
killed
text.
"
(interactive)
(let ((clipboard-text (x-get-selection 'CLIPBOARD))
(x-select-enable-clipboard t))
(if (and clipboard-text (> (length clipboard-text) 0))
(kill-new clipboard-text))
(yank)))
(define-key menu-bar-edit-menu [paste]
(cons "
Paste
" (cons "
Paste
text
from
clipboard
or
kill
ring
"
'x-clipboard-yank
)))
;;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78
;;; x-win.el ends here
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