# HG changeset patch # User youngs # Date 1063991227 0 # Node ID 0a85daf64258a659eb16027e85eee0565a6d43d9 # Parent 68169b2a743e8046c8a744a6f9fe604b0a3d2030 [xemacs-hg @ 2003-09-19 17:07:05 by youngs] 2002-09-20 James LewisMoss * gnuserv.el (gnuserv-edit-files): fallback to gtk if x device fails. Fixes problem where gnuclient fails for gtk instances when gnuclient was built with X configure. diff -r 68169b2a743e -r 0a85daf64258 lisp/ChangeLog --- a/lisp/ChangeLog Fri Sep 19 16:39:43 2003 +0000 +++ b/lisp/ChangeLog Fri Sep 19 17:07:07 2003 +0000 @@ -1,3 +1,9 @@ +2002-09-20 James LewisMoss + + * gnuserv.el (gnuserv-edit-files): fallback to gtk if x device + fails. Fixes problem where gnuclient fails for gtk instances when + gnuclient was built with X configure. + 2003-09-20 Mike Alexander * code-init.el (eol-detection-enabled-p): eval the initialization diff -r 68169b2a743e -r 0a85daf64258 lisp/gnuserv.el --- a/lisp/gnuserv.el Fri Sep 19 16:39:43 2003 +0000 +++ b/lisp/gnuserv.el Fri Sep 19 17:07:07 2003 +0000 @@ -408,6 +408,13 @@ (eval form)) + +(defun make-x-device-with-gtk-fallback (device) + (or (condition-case () + (make-x-device device) + (error nil)) + (make-gtk-device))) + ;; "Execute" a client connection, called by gnuclient. This is the ;; backbone of gnuserv.el. (defun gnuserv-edit-files (type list &rest flags) @@ -440,7 +447,7 @@ (case (car type) (tty (apply 'make-tty-device (cdr type))) (gtk (make-gtk-device)) - (x (make-x-device (cadr type))) + (x (make-x-device-with-gtk-fallback (cadr type))) (mswindows (make-mswindows-device)) (t (error "Invalid device type")))) (t