summaryrefslogtreecommitdiff
path: root/lisp/tooltip.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/tooltip.el')
-rw-r--r--lisp/tooltip.el15
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index ac26f86ac9d..81df229a132 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -155,6 +155,18 @@ This variable is obsolete; instead of setting it to t, disable
(make-obsolete-variable 'tooltip-use-echo-area
"disable Tooltip mode instead" "24.1" 'set)
+(defcustom tooltip-resize-echo-area nil
+ "If non-nil, using the echo area for tooltips will resize the echo area.
+By default, when the echo area is used for displaying tooltips,
+the tooltip text is truncated if it exceeds a single screen line.
+When this variable is non-nil, the text is not truncated; instead,
+the echo area is resized as needed to accommodate the full text
+of the tooltip.
+This variable has effect only on GUI frames."
+ :type 'boolean
+ :group 'tooltip
+ :version "27.1")
+
;;; Variables that are not customizable.
@@ -347,7 +359,8 @@ It is also called if Tooltip mode is on, for text-only displays."
(current-message))))
(setq tooltip-previous-message (current-message)))
(setq tooltip-help-message help)
- (let ((message-truncate-lines t)
+ (let ((message-truncate-lines
+ (or (not (display-graphic-p)) (not tooltip-resize-echo-area)))
(message-log-max nil))
(message "%s" help)))
((stringp tooltip-previous-message)