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:
parent
cd0351b202
commit
a27cd28f95
8 changed files with 28 additions and 15 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue