Coverity: Negative RETURNS: CID 106
[sxemacs] / lisp / gnuserv.el
index a3d737c..39c84f5 100644 (file)
 ;; XEmacs, and will be removed once you are done with the buffer.
 
 ;; To evaluate a Lisp form in a running Emacs, use the `-eval'
-;; argument of gnuclient.  To simplify this, we provide the `gnudoit'
-;; shell script.  For example `gnudoit "(+ 2 3)"' will print `5',
-;; whereas `gnudoit "(gnus)"' will fire up your favorite newsreader.
-;; Like gnuclient, `gnudoit' requires the server to be started prior
-;; to using it.
+;; argument of gnuclient.
 
 ;; For more information you can refer to man pages of gnuclient,
-;; gnudoit and gnuserv, distributed with XEmacs.
+;; and gnuserv, distributed with SXEmacs.
 
 ;; gnuserv.el was originally written by Andy Norman as an improvement
 ;; over William Sommerfeld's server.el.  Since then, a number of
@@ -277,8 +273,7 @@ Each element is a gnuclient structure that identifies a client.")
 
 (defun gnuserv-main-frame-function (type)
   "Return a sensible value for the main Emacs frame."
-  (if (or (eq type 'x)
-         (eq type 'gtk))
+  (if (eq type 'x)
       (car (frame-list))
     nil))
 
@@ -286,8 +281,7 @@ Each element is a gnuclient structure that identifies a client.")
   "Return a frame if there is a frame that is truly visible, nil otherwise.
 This is meant in the X sense, so it will not return frames that are on another
 visual screen.  Totally visible frames are preferred.  If none found, return nil."
-  (if (or (eq type 'x)
-         (eq type 'gtk))
+  (if (eq type 'x)
       (cond ((car (filtered-frame-list 'frame-totally-visible-p
                                       (selected-device))))
            ((car (filtered-frame-list (lambda (frame)
@@ -405,12 +399,6 @@ This order is important as not to keep the client waiting."
 
 \f
 
-(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)
@@ -442,8 +430,7 @@ If a flag is `view', view the files read-only."
                         ((null dest-frame)
                          (case (car type)
                            (tty (apply 'make-tty-device (cdr type)))
-                           (gtk (make-gtk-device))
-                           (x   (make-x-device-with-gtk-fallback (cadr type)))
+                           (x   (make-x-device (cadr type)))
                            (t   (error "Invalid device type"))))
                         (t
                          (selected-device))))
@@ -748,9 +735,9 @@ All the clients will be disposed of via the normal methods."
 ;;;###autoload
 (defun gnuserv-start (&optional leave-dead)
   "Allow this Emacs process to be a server for client processes.
-This starts a gnuserv communications subprocess through which
-client \"editors\" (gnuclient and gnudoit) can send editing commands to
-this Emacs job.  See the gnuserv(1) manual page for more details.
+This starts a gnuserv communications subprocess through which client
+\"editors\" (gnuclient) can send editing commands to this Emacs job.
+See the gnuserv(1) manual page for more details.
 
 Prefix arg means just kill any existing server communications subprocess."
   (interactive "P")