diff options
author | Eli Zaretskii <eliz@gnu.org> | 2017-10-07 15:04:37 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2017-10-07 15:04:37 +0300 |
commit | 9b3ce6252115980802adaa562af575bcd73a2c55 (patch) | |
tree | aa1ea098b0dbbddd572832873f29a81eb19d30cb /lisp/tooltip.el | |
parent | 53da55b8cc45e76b836ebaadd23f46e92d25abce (diff) | |
download | emacs-9b3ce6252115980802adaa562af575bcd73a2c55.tar.gz |
New defcustom 'tooltip-resize-echo-area'
* lisp/tooltip.el (tooltip-resize-echo-area): New defcustom.
(tooltip-show-help-non-mode): Use it to avoid truncating the
tooltip text in the echo area. (Bug#28724)
* etc/NEWS: Mention 'tooltip-resize-echo-area'.
Diffstat (limited to 'lisp/tooltip.el')
-rw-r--r-- | lisp/tooltip.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 18ddd25703c..44b6938a6fd 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) |