diff options
| author | Alan Mackenzie | 2022-01-22 11:02:50 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2022-01-22 11:02:50 +0000 |
| commit | 14d64a8adcc866deecd758b898e8ef2d836b354a (patch) | |
| tree | 83cff9669e266f8e283ccb8cd7518e909240f1e1 /lisp/tooltip.el | |
| parent | bdd9b5b8a0d37dd09ee530c1dab3a44bee09e0f8 (diff) | |
| parent | ebe334cdc234de2897263aed4c05ac7088c11857 (diff) | |
| download | emacs-scratch/correct-warning-pos.tar.gz emacs-scratch/correct-warning-pos.zip | |
Merge branch 'master' into scratch/correct-warning-posscratch/correct-warning-pos
Diffstat (limited to 'lisp/tooltip.el')
| -rw-r--r-- | lisp/tooltip.el | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 1cf16fdb5d2..2aa487d0454 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el | |||
| @@ -339,6 +339,8 @@ This is used by `tooltip-show-help' and | |||
| 339 | (defvar tooltip-previous-message nil | 339 | (defvar tooltip-previous-message nil |
| 340 | "The previous content of the echo area.") | 340 | "The previous content of the echo area.") |
| 341 | 341 | ||
| 342 | (defvar haiku-use-system-tooltips) | ||
| 343 | |||
| 342 | (defun tooltip-show-help-non-mode (help) | 344 | (defun tooltip-show-help-non-mode (help) |
| 343 | "Function installed as `show-help-function' when Tooltip mode is off. | 345 | "Function installed as `show-help-function' when Tooltip mode is off. |
| 344 | It is also called if Tooltip mode is on, for text-only displays." | 346 | It is also called if Tooltip mode is on, for text-only displays." |
| @@ -374,8 +376,10 @@ It is also called if Tooltip mode is on, for text-only displays." | |||
| 374 | "Function installed as `show-help-function'. | 376 | "Function installed as `show-help-function'. |
| 375 | MSG is either a help string to display, or nil to cancel the display." | 377 | MSG is either a help string to display, or nil to cancel the display." |
| 376 | (if (and (display-graphic-p) | 378 | (if (and (display-graphic-p) |
| 377 | (or (not (eq window-system 'haiku)) ;; On Haiku, there isn't a reliable way to show tooltips | 379 | ;; On Haiku, system tooltips can't be displayed above |
| 378 | ;; above menus. | 380 | ;; menus. |
| 381 | (or (not (and (eq window-system 'haiku) | ||
| 382 | haiku-use-system-tooltips)) | ||
| 379 | (not (menu-or-popup-active-p)))) | 383 | (not (menu-or-popup-active-p)))) |
| 380 | (let ((previous-help tooltip-help-message)) | 384 | (let ((previous-help tooltip-help-message)) |
| 381 | (setq tooltip-help-message msg) | 385 | (setq tooltip-help-message msg) |
| @@ -383,9 +387,12 @@ MSG is either a help string to display, or nil to cancel the display." | |||
| 383 | ;; Cancel display. This also cancels a delayed tip, if | 387 | ;; Cancel display. This also cancels a delayed tip, if |
| 384 | ;; there is one. | 388 | ;; there is one. |
| 385 | (tooltip-hide)) | 389 | (tooltip-hide)) |
| 386 | ((equal-including-properties previous-help msg) | 390 | ((equal previous-help msg) |
| 387 | ;; Same help as before (but possibly the mouse has moved). | 391 | ;; Same help as before (but possibly the mouse has |
| 388 | ;; Keep what we have. | 392 | ;; moved or the text properties have changed). Keep |
| 393 | ;; what we have. If only text properties have changed, | ||
| 394 | ;; the tooltip won't be updated, but that shouldn't | ||
| 395 | ;; occur. | ||
| 389 | ) | 396 | ) |
| 390 | (t | 397 | (t |
| 391 | ;; A different help. Remove a previous tooltip, and | 398 | ;; A different help. Remove a previous tooltip, and |