diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
commit | 07fcbb558d797272b9f43547da60beda485873a3 (patch) | |
tree | 77d5da14e9f9d9d8b1d877c70c01296fd3893796 /lisp/tooltip.el | |
parent | c9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff) | |
parent | fb81c8c3adf8633f2f617c82f6019aef630860c7 (diff) | |
download | emacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz |
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'lisp/tooltip.el')
-rw-r--r-- | lisp/tooltip.el | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 8e00aa5c2a9..23b67ee2cab 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el @@ -131,7 +131,11 @@ of the `tooltip' face are used instead." :inherit variable-pitch) (t :inherit variable-pitch)) - "Face for tooltips." + "Face for tooltips. + +When using the GTK toolkit, this face will only be used if +`x-gtk-use-system-tooltips' is non-nil." + :group 'tooltip :group 'basic-faces) (defcustom tooltip-use-echo-area nil @@ -248,7 +252,12 @@ in echo area." (setf (alist-get 'border-color params) fg)) (when (stringp bg) (setf (alist-get 'background-color params) bg)) - (x-show-tip (propertize text 'face 'tooltip) + ;; Use non-nil APPEND argument below to avoid overriding any + ;; faces used in our TEXT. Among other things, this allows + ;; tooltips to use the `help-key-binding' face used in + ;; `substitute-command-keys' substitutions. + (add-face-text-property 0 (length text) 'tooltip t text) + (x-show-tip text (selected-frame) params tooltip-hide-delay @@ -337,7 +346,7 @@ It is also called if Tooltip mode is on, for text-only displays." (not cursor-in-echo-area)) ;Don't overwrite a prompt. (cond ((stringp help) - (setq help (replace-regexp-in-string "\n" ", " help)) + (setq help (string-replace "\n" ", " help)) (unless (or tooltip-previous-message (equal-including-properties help (current-message)) (and (stringp tooltip-help-message) |