changeset:   5382:d0bb90d90736
user:        Aidan Kehoe <kehoea(a)parhasard.net>
date:        Thu Dec 30 13:46:50 2010 +0000
files:       lisp/ChangeLog lisp/x-misc.el
description:
Provide #'device-x-display, as documented in Lispref; thanks, Jeff Mincy.
lisp/ChangeLog addition:
2010-12-30  Aidan Kehoe  <kehoea(a)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.
diff -r f87bb35a6b94 -r d0bb90d90736 lisp/ChangeLog
--- 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(a)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(a)parhasard.net>
 
 	* simple.el (assoc-ignore-case): Remove a duplicate definition of
diff -r f87bb35a6b94 -r d0bb90d90736 lisp/x-misc.el
--- 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
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches