diff --git a/modules/email/mu4e/autoload/advice.el b/modules/email/mu4e/autoload/advice.el index c053d83e7..29b24d502 100644 --- a/modules/email/mu4e/autoload/advice.el +++ b/modules/email/mu4e/autoload/advice.el @@ -1,37 +1,5 @@ ;;; email/mu4e/autoload/advice.el -*- lexical-binding: t; -*- -;;;###autoload -(defun +mu4e~main-action-str-prettier-a (str &optional func-or-shortcut) - "Highlight the first occurrence of [.] in STR. -If FUNC-OR-SHORTCUT is non-nil and if it is a function, call it -when STR is clicked (using RET or mouse-2); if FUNC-OR-SHORTCUT is -a string, execute the corresponding keyboard action when it is -clicked." - (let ((newstr - (replace-regexp-in-string - "\\[\\(..?\\)\\]" - (lambda(m) - (format "%s" - (propertize (match-string 1 m) 'face 'mu4e-highlight-face))) - (replace-regexp-in-string "\t\\*" (format "\t%s" +mu4e-main-bullet) str))) - (map (make-sparse-keymap)) - (func (if (functionp func-or-shortcut) - func-or-shortcut - (if (stringp func-or-shortcut) - (lambda()(interactive) - (execute-kbd-macro func-or-shortcut)))))) - (define-key map [mouse-2] func) - (define-key map (kbd "RET") func) - (put-text-property 0 (length newstr) 'keymap map newstr) - (put-text-property (string-match "[A-Za-z].+$" newstr) - (- (length newstr) 1) 'mouse-face 'highlight newstr) - newstr)) - -;;;###autoload -(defun +mu4e~main-keyval-str-prettier-a (str) - "Replace '*' with `+mu4e-main-bullet' in STR." - (replace-regexp-in-string "\t\\*" (format "\t%s" +mu4e-main-bullet) str)) - ;; Org msg LaTeX image scaling ;;;###autoload diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el index e3b5c2d99..8ab1418ff 100644 --- a/modules/email/mu4e/config.el +++ b/modules/email/mu4e/config.el @@ -360,18 +360,6 @@ This should already be the case yet it does not always seem to be." :before #'mu4e-compose-resend (read-only-mode -1)) - (defvar +mu4e-main-bullet "⚫" - "Prefix to use instead of \" *\" in the mu4e main view. -This is enacted by `+mu4e--main-action-str-prettier-a' and -`+mu4e--main-keyval-str-prettier-a'.") - - (advice-add #'mu4e--key-val :filter-return #'+mu4e--main-keyval-str-prettier-a) - (advice-add #'mu4e--main-action-str :override #'+mu4e--main-action-str-prettier-a) - (when (modulep! :editor evil) - ;; As +mu4e--main-action-str-prettier replaces [k]ey with key [q]uit should - ;; become quit - (setq evil-collection-mu4e-end-region-misc "quit")) - ;; process lock control (when IS-WINDOWS (setq