;;; server.el --- Lisp code for GNU Emacs running as server process -*- lexical-binding: t -*-
-;; Copyright (C) 1986-1987, 1992, 1994-2015 Free Software Foundation,
+;; Copyright (C) 1986-1987, 1992, 1994-2016 Free Software Foundation,
;; Inc.
;; Author: William Sommerfeld <wesommer@athena.mit.edu>
(if server-auth-key
(if (string-match-p "^[!-~]\\{64\\}$" server-auth-key)
server-auth-key
- (error "The key ā%sā is invalid" server-auth-key))
+ (error "The key `%s' is invalid" server-auth-key))
(server-generate-key)))
;;;###autoload
;; Allow Cygwin's emacsclient to be used as a file
;; handler on MS-Windows, in which case FILENAME
;; might start with a drive letter.
- (when (and (eq system-type 'cygwin)
+ (when (and (fboundp 'cygwin-convert-file-name-from-windows)
(string-match "\\`[A-Za-z]:" file))
(setq file (cygwin-convert-file-name-from-windows file)))
(setq file (expand-file-name file dir))
(defun server-kill-emacs-query-function ()
"Ask before exiting Emacs if it has live clients."
- (or (not server-clients)
- (let (live-client)
- (dolist (proc server-clients)
- (when (memq t (mapcar 'buffer-live-p (process-get
- proc 'buffers)))
- (setq live-client t)))
- live-client)
+ (or (not (let (live-client)
+ (dolist (proc server-clients)
+ (when (memq t (mapcar 'buffer-live-p (process-get
+ proc 'buffers)))
+ (setq live-client t)))
+ live-client))
(yes-or-no-p "This Emacs session has clients; exit anyway? ")))
(defun server-kill-buffer ()