Mercurial > hg > xemacs-beta
comparison lisp/gnuserv.el @ 1700:0a85daf64258
[xemacs-hg @ 2003-09-19 17:07:05 by youngs]
2002-09-20 James LewisMoss <dres@lewismoss.org>
* 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.
author | youngs |
---|---|
date | Fri, 19 Sep 2003 17:07:07 +0000 |
parents | a00780ef853d |
children | 807b51903ed4 |
comparison
equal
deleted
inserted
replaced
1699:68169b2a743e | 1700:0a85daf64258 |
---|---|
406 (gnuserv-write-to-client gnuserv-current-client nil) | 406 (gnuserv-write-to-client gnuserv-current-client nil) |
407 (setq gnuserv-current-client nil) | 407 (setq gnuserv-current-client nil) |
408 (eval form)) | 408 (eval form)) |
409 | 409 |
410 | 410 |
411 | |
412 (defun make-x-device-with-gtk-fallback (device) | |
413 (or (condition-case () | |
414 (make-x-device device) | |
415 (error nil)) | |
416 (make-gtk-device))) | |
417 | |
411 ;; "Execute" a client connection, called by gnuclient. This is the | 418 ;; "Execute" a client connection, called by gnuclient. This is the |
412 ;; backbone of gnuserv.el. | 419 ;; backbone of gnuserv.el. |
413 (defun gnuserv-edit-files (type list &rest flags) | 420 (defun gnuserv-edit-files (type list &rest flags) |
414 "For each (line-number . file) pair in LIST, edit the file at line-number. | 421 "For each (line-number . file) pair in LIST, edit the file at line-number. |
415 The visited buffers are memorized, so that when \\[gnuserv-edit] is invoked | 422 The visited buffers are memorized, so that when \\[gnuserv-edit] is invoked |
438 (frame-device dest-frame)) | 445 (frame-device dest-frame)) |
439 ((null dest-frame) | 446 ((null dest-frame) |
440 (case (car type) | 447 (case (car type) |
441 (tty (apply 'make-tty-device (cdr type))) | 448 (tty (apply 'make-tty-device (cdr type))) |
442 (gtk (make-gtk-device)) | 449 (gtk (make-gtk-device)) |
443 (x (make-x-device (cadr type))) | 450 (x (make-x-device-with-gtk-fallback (cadr type))) |
444 (mswindows (make-mswindows-device)) | 451 (mswindows (make-mswindows-device)) |
445 (t (error "Invalid device type")))) | 452 (t (error "Invalid device type")))) |
446 (t | 453 (t |
447 (selected-device)))) | 454 (selected-device)))) |
448 (frame (cond ((frame-live-p dest-frame) | 455 (frame (cond ((frame-live-p dest-frame) |