Merge remote-tracking branch 'origin/master' into for-steve
[sxemacs] / lisp / gnuserv.el
index a3d737c..faba993 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
@@ -131,7 +127,7 @@ only argument, and its return value will be interpreted as above."
   :tag "Gnuserv Frame"
   :type '(radio (const :tag "Create new frame each time" nil)
                (const :tag "Use selected frame" t)
-               (function-item :tag "Use main Emacs frame"
+               (function-item :tag "Use main Emacs frame"
                               gnuserv-main-frame-function)
                (function-item :tag "Use visible frame, otherwise create new"
                               gnuserv-visible-frame-function)
@@ -233,11 +229,11 @@ will request editing of several files.
 
 ID       - Client id (integer).
 BUFFERS  - List of buffers that \"belong\" to the client.
-           NOTE: one buffer can belong to several clients.
+          NOTE: one buffer can belong to several clients.
 DEVICE   - The device this client is on.  If the device was also created.
-           by a client, it will be placed to `gnuserv-devices' list.
+          by a client, it will be placed to `gnuserv-devices' list.
 FRAME    - Frame created by the client, or nil if the client didn't
-           create a frame.
+          create a frame.
 
 All the slots default to nil."
   (id nil)
@@ -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")