emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change behaviour of Copy/Cut/Paste from the menu bar.


From: Jan D.
Subject: Re: Change behaviour of Copy/Cut/Paste from the menu bar.
Date: Wed, 21 Jan 2004 10:30:37 +0100

- ;; 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]