changeset 5324:d0bb90d90736

Provide #'device-x-display, as documented in Lispref; thanks, Jeff Mincy. lisp/ChangeLog addition: 2010-12-30 Aidan Kehoe <kehoea@parhasard.net> * x-misc.el (device-x-display): Provide this function, documented in the Lispref for years, but not existing previously. Thank you Julian Bradfield, thank you Jeff Mincy.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 30 Dec 2010 13:46:50 +0000
parents f87bb35a6b94
children 47298dcf2e8f 6506fcb40fcf
files lisp/ChangeLog lisp/x-misc.el
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Dec 30 01:14:13 2010 +0000
+++ b/lisp/ChangeLog	Thu Dec 30 13:46:50 2010 +0000
@@ -1,3 +1,10 @@
+2010-12-30  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* x-misc.el (device-x-display):
+	Provide this function, documented in the Lispref for years, but
+	not existing previously.  Thank you Julian Bradfield, thank you
+	Jeff Mincy.
+
 2010-12-30  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* simple.el (assoc-ignore-case): Remove a duplicate definition of
--- a/lisp/x-misc.el	Thu Dec 30 01:14:13 2010 +0000
+++ b/lisp/x-misc.el	Thu Dec 30 13:46:50 2010 +0000
@@ -86,4 +86,10 @@
       (x-bogosity-check-resource name class type))
   (x-get-resource name class type locale nil 'warn))
 
+(defun device-x-display (&optional device)
+  "If DEVICE is an X11 device, return its DISPLAY.
+
+DEVICE defaults to the selected device."
+  (and (eq 'x (device-type device)) (device-connection device)))
+
 ;;; x-misc.el ends here