mu4e: make eldoc support configurable

Add new defcustom, mu4e-eldoc-support, turn it off by default.
This commit is contained in:
Dirk-Jan C. Binnema 2023-01-31 00:34:41 +02:00
parent 4f4568a39a
commit 0ee86ac923
4 changed files with 23 additions and 7 deletions

View File

@ -92,6 +92,9 @@
- When searching, the number of hidden messages is now shown in the
message footer along with the number of Found messages
- The ~eldoc~ support in header-mode is now optional and disabled by default;
set ~mu4e-eldoc-support~ to non-nil to enable it.
- all the obsolete function and variable aliases have been moved to
~mu4e-obsolete.el~ so we can unclutter the non-obsolete code a bit.

View File

@ -1121,15 +1121,14 @@ The following specs are supported:
(set (make-local-variable 'hl-line-face) 'mu4e-header-highlight-face)
;; Eldoc support
(when (featurep 'eldoc)
(when (and (featurep 'eldoc) mu4e-eldoc-support)
(if (boundp 'eldoc-documentation-functions)
;; Emacs 28 or newer
(add-hook 'eldoc-documentation-functions
#'mu4e-headers-eldoc-function nil t)
;; Emacs 27 or older
(when (fboundp 'add-function) ;; add-function was added in 24.4.
(add-function :before-until (local 'eldoc-documentation-function)
#'mu4e-headers-eldoc-function))))
(add-function :before-until (local 'eldoc-documentation-function)
#'mu4e-headers-eldoc-function)))
;; support bookmarks.
(set (make-local-variable 'bookmark-make-record-function)

View File

@ -69,6 +69,12 @@
:type 'boolean
:group 'mu4e)
(defcustom mu4e-eldoc-support nil
"Support eldoc help in the headers-view."
:type 'boolean
:group 'mu4e)
(when mu4e-speedbar-support
(require 'mu4e-speedbar)) ;; support for speedbar
(when mu4e-org-support

View File

@ -3087,6 +3087,7 @@ ways. Here we focus on Emacs built-ins; for dealing with external tools,
* Modeline::Showing mu4e's status in the modeline
* Desktop notifications::Get desktop notifications for new mail
* Emacs bookmarks::Using Emacs' bookmark system
* Eldoc::Information about the current header in the echo area
* Org-mode links::Adding mu4e to your organized life
* iCalendar::Enabling iCalendar invite processing
* Speedbar::A special frame with your folders
@ -3206,13 +3207,21 @@ want tweak the details, have a look at @code{mu4e-notification-filter} and
@section Emacs bookmarks
@cindex Emacs bookmarks
Note, emacs bookmarks are not to be confused with mu4e's bookmarks; the former
are a generic linking system, while the latter are remember stored queries.
Note, Emacs bookmarks are not to be confused with mu4e's bookmarks; the former
are a generic linking system across Emacs, while the latter are stored queries
within @t{mu4e}.
@t{mu4e} supports linking to the message-at-point through the normal Emacs
built-in bookmark system. The links are based on the message's message-id, and
thus the bookmarks stay valid even if you move the message around.
@node Eldoc
@section Eldoc
@cindex eldoc
It is possible to get information about the current header in the echo-area.
You can enable this by setting @t{mu4e-eldoc-support} to non-@t{nil}.
@node Org-mode links
@section Org-mode links
@ -3366,7 +3375,6 @@ functions use that to set the @code{datetree} location:
If you do this, you'll want to omit the @code{:timeprompt t} setting
from your capture template.
@node Speedbar
@section Speedbar
@cindex speedbar