Allow showing show-paren context in an overlay

* lisp/paren.el (show-paren-context-when-offscreen): Add new
possibility `overlay'.
(show-paren--context-overlay): New defvar.
(show-paren--delete-context-overlay): New function.
(show-paren--show-context-in-overlay): New function.
(show-paren-function): Handle the new `overlay' case.
* lisp/emacs-lisp/eldoc.el (eldoc-display-message-no-interference-p):
There's no interference if `show-paren-context-when-offscreen' is
overlay or child-frame.
This commit is contained in:
Tassilo Horn 2022-02-08 21:54:56 +01:00
parent f7d16d93fd
commit 2755e6bba0
2 changed files with 47 additions and 10 deletions

View file

@ -387,6 +387,10 @@ Also store it in `eldoc-last-message' and return that value."
;; conflicts with eldoc.
(and (boundp 'show-paren-context-when-offscreen)
show-paren-context-when-offscreen
;; There's no conflict with the child-frame and
;; overlay versions.
(not (memq show-paren-context-when-offscreen
'(child-frame overlay)))
(not (pos-visible-in-window-p
(overlay-end show-paren--overlay)))))))