1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 11:00:45 -08:00

* lisp/select.el (gui-selection-exists-p-alist): New method.

* lisp/menu-bar.el (menu-bar-edit-menu, clipboard-yank):
* lisp/simple.el (deactivate-mark): Use it.
* lisp/term/x-win.el (gui-selection-exists-p):
* lisp/term/w32-win.el (gui-selection-exists-p):
* lisp/term/pc-win.el (gui-selection-exists-p):
* lisp/term/ns-win.el (gui-selection-exists-p): Provide a backend instance.
This commit is contained in:
Stefan Monnier 2014-10-09 23:28:24 -04:00
parent cd0351b202
commit a27cd28f95
8 changed files with 28 additions and 15 deletions

View file

@ -961,6 +961,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
(gui-method-define gui-own-selection ns #'ns-own-selection-internal)
(gui-method-define gui-disown-selection ns #'ns-disown-selection-internal)
(gui-method-define gui-selection-owner-p ns #'ns-selection-owner-p)
(gui-method-define gui-selection-exists-p ns #'x-selection-exists-p)
(gui-method-define gui-get-selection ns #'x-get-selection-internal) ;FIXME:name!
(provide 'ns-win)

View file

@ -228,6 +228,7 @@ Consult the selection. Treat empty strings as if they were unset."
(w16-get-clipboard-data))))
;; gui-selection-owner-p is used in simple.el.
(gui-method-define gui-selection-exists-p pc #'x-selection-exists-p)
(gui-method-define gui-selection-owner-p pc #'w16-selection-owner-p)
(defun w16-selection-owner-p (_selection)
;; FIXME: Other systems don't obey gui-select-enable-clipboard here.

View file

@ -420,6 +420,7 @@ Consult the selection. Treat empty strings as if they were unset."
(lambda (selection)
(and (memq selection '(nil PRIMARY SECONDARY))
(get 'x-selections (or selection 'PRIMARY)))))
(gui-method-define gui-selection-exists-p w32 #'x-selection-exists-p)
;; The "Windows" keys on newer keyboards bring up the Start menu
;; whether you want it or not - make Emacs ignore these keystrokes

View file

@ -1473,6 +1473,7 @@ This returns an error if any Emacs frames are X frames."
(gui-method-define gui-own-selection x #'x-own-selection-internal)
(gui-method-define gui-disown-selection x #'x-disown-selection-internal)
(gui-method-define gui-selection-owner-p x #'x-selection-owner-p)
(gui-method-define gui-selection-exists-p x #'x-selection-exists-p)
(gui-method-define gui-get-selection x #'x-get-selection-internal)
;; Initiate drag and drop