* etc/publicsuffix.txt: Update from source.
[bpt/emacs.git] / lisp / server.el
index 05ac345..0c64588 100644 (file)
@@ -1,10 +1,10 @@
 ;;; server.el --- Lisp code for GNU Emacs running as server process -*- lexical-binding: t -*-
 
-;; Copyright (C) 1986-1987, 1992, 1994-2013 Free Software Foundation,
+;; Copyright (C) 1986-1987, 1992, 1994-2014 Free Software Foundation,
 ;; Inc.
 
 ;; Author: William Sommerfeld <wesommer@athena.mit.edu>
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: processes
 
 ;; Changes by peck@sun.com and by rms.
   "The name or IP address to use as host address of the server process.
 If set, the server accepts remote connections; otherwise it is local.
 
-DO NOT give this a non-nil value unless you know what you are
-doing!  On unsecured networks, accepting remote connections is
-very dangerous, because server-client communication (including
-session authentication) is not encrypted."
+DO NOT give this a non-nil value unless you know what you are doing!
+On unsecured networks, accepting remote connections is very dangerous,
+because server-client communication (including session authentication)
+is not encrypted."
   :group 'server
   :type '(choice
           (string :tag "Name or IP address")
@@ -1557,7 +1557,7 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)."
                (setq next-buffer (car (process-get proc 'buffers))))
              (setq rest (cdr rest)))))
        (and next-buffer (server-switch-buffer next-buffer killed-one))
-       (unless (or next-buffer killed-one (window-dedicated-p (selected-window)))
+       (unless (or next-buffer killed-one (window-dedicated-p))
          ;; (switch-to-buffer (other-buffer))
          (message "No server buffers remain to edit")))
     (if (not (buffer-live-p next-buffer))
@@ -1584,16 +1584,16 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)."
                   (unless (frame-live-p server-window)
                     (setq server-window (make-frame)))
                   (select-window (frame-selected-window server-window))))
-           (when (window-minibuffer-p (selected-window))
+           (when (window-minibuffer-p)
              (select-window (next-window nil 'nomini 0)))
            ;; Move to a non-dedicated window, if we have one.
-           (when (window-dedicated-p (selected-window))
+           (when (window-dedicated-p)
              (select-window
               (get-window-with-predicate
                (lambda (w)
                  (and (not (window-dedicated-p w))
                       (equal (frame-terminal (window-frame w))
-                             (frame-terminal (selected-frame)))))
+                             (frame-terminal))))
                'nomini 'visible (selected-window))))
            (condition-case nil
                (switch-to-buffer next-buffer)
@@ -1601,7 +1601,7 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)."
              ;; a minibuffer/dedicated-window (if there's no other).
              (error (pop-to-buffer next-buffer)))))))
     (when server-raise-frame
-      (select-frame-set-input-focus (window-frame (selected-window))))))
+      (select-frame-set-input-focus (window-frame)))))
 
 ;;;###autoload
 (defun server-save-buffers-kill-terminal (arg)
@@ -1611,7 +1611,7 @@ With ARG non-nil, silently save all file-visiting buffers, then kill.
 
 If emacsclient was started with a list of filenames to edit, then
 only these files will be asked to be saved."
-  (let ((proc (frame-parameter (selected-frame) 'client)))
+  (let ((proc (frame-parameter nil 'client)))
     (cond ((eq proc 'nowait)
           ;; Nowait frames have no client buffer list.
           (if (cdr (frame-list))
@@ -1634,7 +1634,7 @@ only these files will be asked to be saved."
 (define-key ctl-x-map "#" 'server-edit)
 
 (defun server-unload-function ()
-  "Unload the server library."
+  "Unload the Server library."
   (server-mode -1)
   (substitute-key-definition 'server-edit nil ctl-x-map)
   (save-current-buffer
@@ -1648,7 +1648,7 @@ only these files will be asked to be saved."
   "Contact the Emacs server named SERVER and evaluate FORM there.
 Returns the result of the evaluation, or signals an error if it
 cannot contact the specified server.  For example:
-  \(server-eval-at \"server\" '(emacs-pid))
+  (server-eval-at \"server\" '(emacs-pid))
 returns the process ID of the Emacs instance running \"server\"."
   (let* ((server-dir (if server-use-tcp server-auth-dir server-socket-dir))
         (server-file (expand-file-name server server-dir))