diff lisp/x-misc.el @ 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 e29fcfd8df5f
children 6506fcb40fcf
line wrap: on
line diff
--- 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