mirror of https://github.com/djcb/mu.git
mu4e: re-indent function prior to mark-hook change
Signed-off-by: Magnus Therning <magnus@therning.org>
This commit is contained in:
parent
8f5df6cca0
commit
974d728bd4
|
@ -386,29 +386,29 @@ work well.
|
||||||
If NO-CONFIRMATION is non-nil, don't ask user for confirmation."
|
If NO-CONFIRMATION is non-nil, don't ask user for confirmation."
|
||||||
(interactive)
|
(interactive)
|
||||||
(mu4e~mark-in-context
|
(mu4e~mark-in-context
|
||||||
(let ((marknum (hash-table-count mu4e~mark-map)))
|
(let ((marknum (hash-table-count mu4e~mark-map)))
|
||||||
(if (zerop marknum)
|
(if (zerop marknum)
|
||||||
(message "Nothing is marked")
|
(message "Nothing is marked")
|
||||||
(mu4e-mark-resolve-deferred-marks)
|
(mu4e-mark-resolve-deferred-marks)
|
||||||
(when (or no-confirmation
|
(when (or no-confirmation
|
||||||
(y-or-n-p
|
(y-or-n-p
|
||||||
(format "Are you sure you want to execute %d mark%s?"
|
(format "Are you sure you want to execute %d mark%s?"
|
||||||
marknum (if (> marknum 1) "s" ""))))
|
marknum (if (> marknum 1) "s" ""))))
|
||||||
(maphash
|
(maphash
|
||||||
(lambda (docid val)
|
(lambda (docid val)
|
||||||
(let* ((mark (car val)) (target (cdr val))
|
(let* ((mark (car val)) (target (cdr val))
|
||||||
(markdescr (assq mark mu4e-marks))
|
(markdescr (assq mark mu4e-marks))
|
||||||
(msg (save-excursion
|
(msg (save-excursion
|
||||||
(mu4e~headers-goto-docid docid)
|
(mu4e~headers-goto-docid docid)
|
||||||
(mu4e-message-at-point))))
|
(mu4e-message-at-point))))
|
||||||
;; note: whenever you do something with the message,
|
;; note: whenever you do something with the message,
|
||||||
;; it looses its N (new) flag
|
;; it looses its N (new) flag
|
||||||
(if markdescr
|
(if markdescr
|
||||||
(funcall (plist-get (cdr markdescr) :action) docid msg target)
|
(funcall (plist-get (cdr markdescr) :action) docid msg target)
|
||||||
(mu4e-error "Unrecognized mark %S" mark))))
|
(mu4e-error "Unrecognized mark %S" mark))))
|
||||||
mu4e~mark-map))
|
mu4e~mark-map))
|
||||||
(mu4e-mark-unmark-all)
|
(mu4e-mark-unmark-all)
|
||||||
(message nil)))))
|
(message nil)))))
|
||||||
|
|
||||||
(defun mu4e-mark-unmark-all ()
|
(defun mu4e-mark-unmark-all ()
|
||||||
"Unmark all marked messages."
|
"Unmark all marked messages."
|
||||||
|
|
Loading…
Reference in New Issue