mu4e: get rid of mu4e-is-mode-or-derived-p

derived-mode-p is enough
This commit is contained in:
Dirk-Jan C. Binnema
2023-12-06 20:30:47 +02:00
parent 8bdf6b42a2
commit 8c1466773f
2 changed files with 2 additions and 6 deletions

View File

@ -518,10 +518,6 @@ in an external program."
(lambda () (ignore-errors (delete-file tmpfile)))) (lambda () (ignore-errors (delete-file tmpfile))))
tmpfile)) tmpfile))
(defsubst mu4e-is-mode-or-derived-p (mode)
"Is the current mode equal to MODE or derived from it?"
(or (eq major-mode mode) (derived-mode-p mode)))
(defun mu4e-display-manual () (defun mu4e-display-manual ()
"Display the mu4e manual page for the current mode. "Display the mu4e manual page for the current mode.
Or go to the top level if there is none." Or go to the top level if there is none."

View File

@ -112,8 +112,8 @@ It links to the last known query when in `mu4e-headers-mode' with
a specific message, based on its message-id, so that links stay a specific message, based on its message-id, so that links stay
valid even after moving the message around." valid even after moving the message around."
(cond (cond
((mu4e-is-mode-or-derived-p 'mu4e-view-mode) (mu4e--org-store-link-message)) ((derived-mode-p 'mu4e-view-mode) (mu4e--org-store-link-message))
((mu4e-is-mode-or-derived-p 'mu4e-headers-mode) ((derived-mode-p 'mu4e-headers-mode)
(if mu4e-org-link-query-in-headers-mode (if mu4e-org-link-query-in-headers-mode
(mu4e--org-store-link-query) (mu4e--org-store-link-query)
(mu4e--org-store-link-message))))) (mu4e--org-store-link-message)))))