diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/files.el | 6 | ||||
-rw-r--r-- | lisp/frame.el | 22 | ||||
-rw-r--r-- | lisp/server.el | 44 | ||||
-rw-r--r-- | lisp/startup.el | 4 | ||||
-rw-r--r-- | lisp/talk.el | 8 | ||||
-rw-r--r-- | lisp/termdev.el | 8 | ||||
-rw-r--r-- | lisp/xt-mouse.el | 6 |
7 files changed, 49 insertions, 49 deletions
diff --git a/lisp/files.el b/lisp/files.el index 8b8a1444ba6..12384543fe9 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4879,7 +4879,7 @@ With prefix arg, silently save all file-visiting buffers, then kill." (funcall confirm-kill-emacs "Really exit Emacs? ")) (kill-emacs))) -(defun save-buffers-kill-display (&optional arg) +(defun save-buffers-kill-terminal (&optional arg) "Offer to save each buffer, then kill the current connection. If the current frame has no client, kill Emacs itself. @@ -4892,7 +4892,7 @@ only these files will be asked to be saved." (frame (selected-frame))) (if (null proc) (save-buffers-kill-emacs) - (server-save-buffers-kill-display proc arg)))) + (server-save-buffers-kill-terminal proc arg)))) ;; We use /: as a prefix to "quote" a file name @@ -4991,7 +4991,7 @@ only these files will be asked to be saved." (define-key ctl-x-map "i" 'insert-file) (define-key esc-map "~" 'not-modified) (define-key ctl-x-map "\C-d" 'list-directory) -(define-key ctl-x-map "\C-c" 'save-buffers-kill-display) +(define-key ctl-x-map "\C-c" 'save-buffers-kill-terminal) (define-key ctl-x-map "\C-q" 'toggle-read-only) (define-key ctl-x-4-map "f" 'find-file-other-window) diff --git a/lisp/frame.el b/lisp/frame.el index 339100bbff5..818bd9368e1 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -651,7 +651,7 @@ You cannot specify either `width' or `height', you must use neither or both. (window-system . nil) The frame should be displayed on a terminal device. (window-system . x) The frame should be displayed in an X window. - (device . ID) The frame should use the display device identified by ID. + (terminal . ID) The frame should use the terminal identified by ID. Before the frame is created (via `frame-creation-function-alist'), functions on the hook `before-make-frame-hook' are run. After the frame is created, functions @@ -664,11 +664,11 @@ instance if the frame appears under the mouse pointer and your setup is for focus to follow the pointer." (interactive) (let* ((w (cond - ((assq 'device parameters) - (let ((type (display-live-p (cdr (assq 'device parameters))))) + ((assq 'terminal parameters) + (let ((type (terminal-live-p (cdr (assq 'terminal parameters))))) (cond ((eq type t) nil) - ((eq type nil) (error "Display %s does not exist" (cdr (assq 'device parameters)))) + ((eq type nil) (error "Terminal %s does not exist" (cdr (assq 'terminal parameters)))) (t type)))) ((assq 'window-system parameters) (cdr (assq 'window-system parameters))) @@ -682,7 +682,7 @@ setup is for focus to follow the pointer." (setq frame (funcall frame-creation-function (append parameters (cdr (assq w window-system-default-frame-alist))))) (normal-erase-is-backspace-setup-frame frame) ;; Set up the frame-local environment, if needed. - (when (eq (frame-display frame) (frame-display oldframe)) + (when (eq (frame-terminal frame) (frame-terminal oldframe)) (let ((env (frame-parameter oldframe 'environment))) (if (not (framep env)) (setq env oldframe)) @@ -718,7 +718,7 @@ If TERMINAL is omitted or nil, it defaults to the selected frame's terminal device." (let* ((terminal (terminal-id terminal)) (func #'(lambda (frame) - (eq (frame-display frame) terminal)))) + (eq (frame-terminal frame) terminal)))) (filtered-frame-list func))) (defun framep-on-display (&optional terminal) @@ -727,7 +727,7 @@ TERMINAL may be a terminal id, a display name or a frame. If it is a frame, its type is returned. If TERMINAL is omitted or nil, it defaults to the selected frame's terminal device. All frames on a given display are of the same type." - (or (display-live-p terminal) + (or (terminal-live-p terminal) (framep terminal) (framep (car (frames-on-display-list terminal))))) @@ -815,7 +815,7 @@ Calls `suspend-emacs' if invoked from the controlling tty device, (cond ((eq type 'x) (iconify-or-deiconify-frame)) ((eq type t) - (if (display-controlling-tty-p) + (if (controlling-tty-p) (suspend-emacs) (suspend-tty))) (t (suspend-emacs))))) @@ -1068,9 +1068,9 @@ bars (top, bottom, or nil)." (cons vert hor))) ;;;; Frame/display capabilities. -(defun selected-display () - "Return the display that is now selected." - (frame-display (selected-frame))) +(defun selected-terminal () + "Return the terminal that is now selected." + (frame-terminal (selected-frame))) (defun display-mouse-p (&optional display) "Return non-nil if DISPLAY has a mouse available. diff --git a/lisp/server.el b/lisp/server.el index f98be109c92..9de88d55896 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -247,7 +247,7 @@ ENV should be in the same format as `process-environment'." (setenv (car ,pair) (cdr ,pair))))))) (defun server-delete-client (client &optional noframe) - "Delete CLIENT, including its buffers, devices and frames. + "Delete CLIENT, including its buffers, terminals and frames. If NOFRAME is non-nil, let the frames live. (To be used from `delete-frame-functions'." ;; Force a new lookup of client (prevents infinite recursion). @@ -271,9 +271,9 @@ If NOFRAME is non-nil, let the frames live. (To be used from (kill-buffer (current-buffer)))))) ;; Delete the client's tty. - (let ((device (server-client-get client 'device))) - (when (eq (display-live-p device) t) - (delete-display device))) + (let ((terminal (server-client-get client 'terminal))) + (when (eq (terminal-live-p terminal) t) + (delete-terminal terminal))) ;; Delete the client's frames. (unless noframe @@ -323,18 +323,18 @@ message." ;; there are other frames on it. (< 0 (let ((frame-num 0)) (mapc (lambda (f) - (when (eq (frame-display f) - (frame-display frame)) + (when (eq (frame-terminal f) + (frame-terminal frame)) (setq frame-num (1+ frame-num)))) (frame-list)) frame-num)))) (server-log (format "server-handle-delete-frame, frame %s" frame) proc) (server-delete-client proc 'noframe)))) ; Let delete-frame delete the frame later. -(defun server-handle-suspend-tty (device) +(defun server-handle-suspend-tty (terminal) "Notify the emacsclient process to suspend itself when its tty device is suspended." - (dolist (proc (server-clients-with 'device device)) - (server-log (format "server-handle-suspend-tty, device %s" device) proc) + (dolist (proc (server-clients-with 'terminal terminal)) + (server-log (format "server-handle-suspend-tty, terminal %s" terminal) proc) (condition-case err (server-send-string proc "-suspend \n") (file-error (condition-case nil (server-delete-client proc) (error nil)))))) @@ -618,7 +618,7 @@ The following commands are accepted by the client: ;; Flag frame as client-created, but use a dummy client. ;; This will prevent the frame from being deleted when ;; emacsclient quits while also preventing - ;; `server-save-buffers-kill-display' from unexpectedly + ;; `server-save-buffers-kill-terminal' from unexpectedly ;; killing emacs on that frame. (list (cons 'client 'nowait) (cons 'environment env)) (list (cons 'client proc) (cons 'environment env))))) @@ -636,7 +636,7 @@ The following commands are accepted by the client: (modify-frame-parameters frame params) (select-frame frame) (server-client-set client 'frame frame) - (server-client-set client 'device (frame-display frame)) + (server-client-set client 'terminal (frame-terminal frame)) (setq dontkill t)) ;; This emacs does not support X. (server-log "Window system unsupported" proc) @@ -645,19 +645,19 @@ The following commands are accepted by the client: ;; -resume: Resume a suspended tty frame. ((equal "-resume" arg) - (let ((device (server-client-get client 'device))) + (let ((terminal (server-client-get client 'terminal))) (setq dontkill t) - (when (eq (display-live-p device) t) - (resume-tty device)))) + (when (eq (terminal-live-p terminal) t) + (resume-tty terminal)))) ;; -suspend: Suspend the client's frame. (In case we ;; get out of sync, and a C-z sends a SIGTSTP to ;; emacsclient.) ((equal "-suspend" arg) - (let ((device (server-client-get client 'device))) + (let ((terminal (server-client-get client 'terminal))) (setq dontkill t) - (when (eq (display-live-p device) t) - (suspend-tty device)))) + (when (eq (terminal-live-p terminal) t) + (suspend-tty terminal)))) ;; -ignore COMMENT: Noop; useful for debugging emacsclient. ;; (The given comment appears in the server log.) @@ -687,8 +687,8 @@ The following commands are accepted by the client: (environment . ,env))))) (select-frame frame) (server-client-set client 'frame frame) - (server-client-set client 'tty (display-name frame)) - (server-client-set client 'device (frame-display frame)) + (server-client-set client 'tty (terminal-name frame)) + (server-client-set client 'terminal (frame-terminal frame)) ;; Reply with our pid. (server-send-string proc (concat "-emacs-pid " (number-to-string (emacs-pid)) "\n")) @@ -1037,8 +1037,8 @@ done that." (get-window-with-predicate (lambda (w) (and (not (window-dedicated-p w)) - (equal (frame-parameter (window-frame w) 'device) - (frame-parameter (selected-frame) 'device)))) + (equal (frame-terminal (window-frame w)) + (frame-terminal (selected-frame))))) 'nomini 'visible (selected-window)))) (condition-case nil (switch-to-buffer next-buffer) @@ -1047,7 +1047,7 @@ done that." (error (pop-to-buffer next-buffer))))))))) ;;;###autoload -(defun server-save-buffers-kill-display (proc &optional arg) +(defun server-save-buffers-kill-terminal (proc &optional arg) "Offer to save each buffer, then kill PROC. With prefix arg, silently save all file-visiting buffers, then kill. diff --git a/lisp/startup.el b/lisp/startup.el index 155ef1d3e79..cef38411dc9 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1430,7 +1430,7 @@ Copyright (C) 2005 Free Software Foundation, Inc.")) ;; use precomputed string to save lots of time. (if (and (eq (key-binding "\C-h") 'help-command) (eq (key-binding "\C-xu") 'advertised-undo) - (eq (key-binding "\C-x\C-c") 'save-buffers-kill-display) + (eq (key-binding "\C-x\C-c") 'save-buffers-kill-terminal) (eq (key-binding "\C-ht") 'help-with-tutorial) (eq (key-binding "\C-hi") 'info) (eq (key-binding "\C-hr") 'info-emacs-manual) @@ -1447,7 +1447,7 @@ Browse manuals C-h i") Get help %s Emacs manual \\[info-emacs-manual] Emacs tutorial \\[help-with-tutorial]\tUndo changes\t\\[advertised-undo] -Buy manuals \\[view-order-manuals]\tExit Emacs\t\\[save-buffers-kill-display] +Buy manuals \\[view-order-manuals]\tExit Emacs\t\\[save-buffers-kill-terminal] Browse manuals \\[info]" (let ((where (where-is-internal 'help-command nil t))) diff --git a/lisp/talk.el b/lisp/talk.el index a008a0ef3fd..0807e655703 100644 --- a/lisp/talk.el +++ b/lisp/talk.el @@ -50,22 +50,22 @@ Each element has the form (DISPLAY FRAME BUFFER).") "Connect to the Emacs talk group from the current X display or tty frame." (interactive) (let ((type (frame-live-p (selected-frame))) - (display (frame-display (selected-frame)))) + (display (frame-terminal (selected-frame)))) (cond ((eq type t) (talk-add-display (selected-frame))) ((eq type 'x) - (talk-add-display (frame-display (selected-frame)))) + (talk-add-display (frame-terminal (selected-frame)))) (t (error "Unknown frame type")))) (talk-update-buffers)) (defun talk-add-display (frame) (let* ((display (if (frame-live-p frame) - (frame-display frame) + (frame-terminal frame) frame)) (elt (assoc display talk-display-alist)) - (name (concat "*talk-" (display-name display) "*")) + (name (concat "*talk-" (terminal-name display) "*")) buffer) (unless (frame-live-p frame) (setq frame (make-frame-on-display display (list (cons 'name name))))) diff --git a/lisp/termdev.el b/lisp/termdev.el index 5e12740e11c..c73fe017046 100644 --- a/lisp/termdev.el +++ b/lisp/termdev.el @@ -34,17 +34,17 @@ TERMINAL may be the name of an X display device (HOST.SERVER.SCREEN) or a tty device file." (cond ((integerp terminal) - (if (display-live-p terminal) + (if (terminal-live-p terminal) terminal - (signal 'wrong-type-argument (list 'display-live-p terminal)))) + (signal 'wrong-type-argument (list 'terminal-live-p terminal)))) ((or (null terminal) (framep terminal)) - (frame-display terminal)) + (frame-terminal terminal)) ((stringp terminal) (let ((f (car (filtered-frame-list (lambda (frame) (or (equal (frame-parameter frame 'display) terminal) (equal (frame-parameter frame 'tty) terminal))))))) (or f (error "Display %s does not exist" terminal)) - (frame-display f))) + (frame-terminal f))) (t (error "Invalid argument %s in `terminal-id'" terminal)))) diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 1268994ba89..075ea879270 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -197,18 +197,18 @@ down the SHIFT key while pressing the mouse button." (defun turn-on-xterm-mouse-tracking-on-terminal (terminal) "Enable xterm mouse tracking on TERMINAL." - (when (and xterm-mouse-mode (eq t (display-live-p terminal))) + (when (and xterm-mouse-mode (eq t (terminal-live-p terminal))) (send-string-to-terminal "\e[?1000h" terminal))) (defun turn-off-xterm-mouse-tracking-on-terminal (terminal) "Disable xterm mouse tracking on TERMINAL." - (when (and xterm-mouse-mode (eq t (display-live-p terminal))) + (when (and xterm-mouse-mode (eq t (terminal-live-p terminal))) (send-string-to-terminal "\e[?1000l" terminal))) (defun xterm-mouse-handle-delete-frame (frame) "Turn off xterm mouse tracking if FRAME is the last frame on its device." (when (and (eq t (frame-live-p frame)) - (<= 1 (length (frames-on-display-list (frame-display frame))))) + (<= 1 (length (frames-on-display-list (frame-terminal frame))))) (turn-off-xterm-mouse-tracking-on-terminal frame))) ;; Frame creation and deletion. |