From: "Jan D." <jan.h.d@swipnet.se>
Cc: emacs-devel@gnu.org
Subject: Re: Change behaviour of Copy/Cut/Paste from the menu bar.
Date: Wed, 21 Jan 2004 10:30:37 +0100 [thread overview]
Message-ID: <785C5875-4BF4-11D8-902C-00039363E640@swipnet.se> (raw)
In-Reply-To: <E1AjEYA-0001vh-HH@fencepost.gnu.org>
> - ;; 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))
> -
>
> Are you sure this should be deleted?
> Someone should check what other programs do on Solaris.
Well, it is redundant now that menu-bar-enable-clipboard is always
called
below.
>
> + ;; 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"
> 'x-clipboard-yank)))
> +
> ;;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78
>
> This is ok, but I think the help string should say
> "Paste text from clipboard or kill ring".
I'll change it.
Jan D.
prev parent reply other threads:[~2004-01-21 9:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-20 15:11 Change behaviour of Copy/Cut/Paste from the menu bar Jan D.
2004-01-20 16:10 ` Jason Rumney
2004-01-20 22:32 ` Jan D.
2004-01-21 9:21 ` Richard Stallman
2004-01-21 9:30 ` Jan D. [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=785C5875-4BF4-11D8-902C-00039363E640@swipnet.se \
--to=jan.h.d@swipnet.se \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.