summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2015-12-18 11:03:03 +0100
committerMartin Rudalics <rudalics@gmx.at>2015-12-18 11:03:03 +0100
commita64b71e3cba8bdc11222140fa69fb8c86ce5ca30 (patch)
treecaf2f4a8c730454c9c8400091e13c77dfe6b8cc9 /lisp/help.el
parentf4747f6c51a07522ea4d9863b20357489f03ce69 (diff)
downloademacs-a64b71e3cba8bdc11222140fa69fb8c86ce5ca30.tar.gz
Don't have help functions call x-display-pixel-width/-height on ttys
* lisp/help.el (temp-buffer-max-height, temp-buffer-max-width): Don't call x-display-pixel-width/-height on ttys.
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/help.el b/lisp/help.el
index c558b652b7e..d6cfae44183 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1069,7 +1069,7 @@ is currently activated with completion."
;;; Automatic resizing of temporary buffers.
(defcustom temp-buffer-max-height
(lambda (buffer)
- (if (eq (selected-window) (frame-root-window))
+ (if (and (display-graphic-p) (eq (selected-window) (frame-root-window)))
(/ (x-display-pixel-height) (frame-char-height) 2)
(/ (- (frame-height) 2) 2)))
"Maximum height of a window displaying a temporary buffer.
@@ -1086,7 +1086,7 @@ function is called, the window to be resized is selected."
(defcustom temp-buffer-max-width
(lambda (buffer)
- (if (eq (selected-window) (frame-root-window))
+ (if (and (display-graphic-p) (eq (selected-window) (frame-root-window)))
(/ (x-display-pixel-width) (frame-char-width) 2)
(/ (- (frame-width) 2) 2)))
"Maximum width of a window displaying a temporary buffer.