Consolidate management/ownership of selections.mastertrunk
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 2 Oct 2014 03:19:32 +0000 (23:19 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 2 Oct 2014 03:19:32 +0000 (23:19 -0400)
commitcd55c6fb7df43fcabce48c907d76ac4ad6aa7baa
treefb7bd257cefe36899b47a9f72b54236413633684
parentefe65cb985a9810e6b5c88631522931b3fda478b
Consolidate management/ownership of selections.
* lisp/select.el (gui-get-selection-alist): New method.
(gui-get-selection): Use it.  Rename from x-get-selection.
(x-get-selection): Define as obsolete alias.
(x-get-clipboard): Mark obsolete.
(gui-get-primary-selection): New function.
(x-get-selection-value): Mark obsolete.
(gui-own-selection-alist, gui-disown-selection-alist)
(gui-selection-owner-p-alist): New methods.
(gui-set-selection): Use them.  Rename from x-set-selection.
(x-set-selection): Define as obsolete alias.
(gui--valid-simple-selection-p): Rename from
x-valid-simple-selection-p.
* lisp/w32-common-fns.el (gui-own-selection, gui-disown-selection)
(gui-selection-owner-p, gui-get-selection): Define for w32.
(w32-get-selection-value): Rename from x-get-selection-value.
Use the new gui-last-selected-text.
* lisp/term/x-win.el (x-get-selection-value): Remove.
(x-clipboard-yank): Declare obsolete.
(gui-own-selection, gui-disown-selection, gui-get-selection)
(gui-selection-owner-p): Define for x.
* lisp/term/w32-win.el (w32-win-suspend-error): Rename from
x-win-suspend-error.
* lisp/term/pc-win.el (w16-get-selection-value): Rename from
x-get-selection-value.
(w16-selection-owner-p): Rename from x-selection-owner-p.
(gui-own-selection, gui-disown-selection, gui-get-selection)
(gui-selection-owner-p): Define for pc.
(w16--select-text): New function.
* lisp/term/ns-win.el (gui-own-selection, gui-disown-selection)
(gui-get-selection, gui-selection-owner-p): Define for ns.
* lisp/term.el (term-mouse-paste):
* lisp/mouse.el (mouse-yank-primary): Use gui-get-primary-selection.
* src/nsselect.m (ns-own-selection-internal, ns-disown-selection-internal):
Rename from the "x-" prefix.
15 files changed:
etc/NEWS
lisp/ChangeLog
lisp/mouse-copy.el
lisp/mouse.el
lisp/obsolete/mouse-sel.el
lisp/select.el
lisp/simple.el
lisp/term.el
lisp/term/ns-win.el
lisp/term/pc-win.el
lisp/term/w32-win.el
lisp/term/x-win.el
lisp/w32-common-fns.el
src/ChangeLog
src/nsselect.m