summaryrefslogtreecommitdiff
path: root/lisp/frame.el
diff options
context:
space:
mode:
authorAlexander Gramiak <agrambot@gmail.com>2019-04-03 13:57:16 -0600
committerAlexander Gramiak <agrambot@gmail.com>2019-04-06 22:43:59 -0600
commit8f6e4798459a881b0a1602a1a0e30f0b73d49d22 (patch)
tree3e8960e9d1a1e7642bad7b2402fbc10a0303ca44 /lisp/frame.el
parent08235af38c92e95d8ec9d268916d8910ea50ab2d (diff)
downloademacs-8f6e4798459a881b0a1602a1a0e30f0b73d49d22.tar.gz
Use display-graphic-p and display-multi-frame-p in more cases
* lisp/disp-table.el: * lisp/faces.el: * lisp/frame.el: * lisp/info.el (Info-fontify-node): * lisp/window.el (handle-select-window): Use display-graphic-p and display-multi-frame-p instead of explicit memq calls.
Diffstat (limited to 'lisp/frame.el')
-rw-r--r--lisp/frame.el19
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index 6cb12473725..acf6a46716a 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -974,7 +974,7 @@ recently selected windows nor the buffer list."
(select-frame frame norecord)
(raise-frame frame)
;; Ensure, if possible, that FRAME gets input focus.
- (when (memq (window-system frame) '(x w32 ns))
+ (when (display-multi-frame-p frame)
(x-focus-frame frame))
;; Move mouse cursor if necessary.
(cond
@@ -1027,16 +1027,15 @@ that variable should be nil."
"Do whatever is right to suspend the current frame.
Calls `suspend-emacs' if invoked from the controlling tty device,
`suspend-tty' from a secondary tty device, and
-`iconify-or-deiconify-frame' from an X frame."
+`iconify-or-deiconify-frame' from a graphical frame."
(interactive)
- (let ((type (framep (selected-frame))))
- (cond
- ((memq type '(x ns w32)) (iconify-or-deiconify-frame))
- ((eq type t)
- (if (controlling-tty-p)
- (suspend-emacs)
- (suspend-tty)))
- (t (suspend-emacs)))))
+ (cond
+ ((display-multi-frame-p) (iconify-or-deiconify-frame))
+ ((eq (framep (selected-frame)) t)
+ (if (controlling-tty-p)
+ (suspend-emacs)
+ (suspend-tty)))
+ (t (suspend-emacs))))
(defun make-frame-names-alist ()
;; Only consider the frames on the same display.