mu4e: re-indent function prior to mark-hook change

Signed-off-by: Magnus Therning <magnus@therning.org>
This commit is contained in:
Magnus Therning 2016-01-30 13:04:45 +01:00 committed by djcb
parent 8f5df6cca0
commit 974d728bd4
1 changed files with 23 additions and 23 deletions

View File

@ -386,29 +386,29 @@ work well.
If NO-CONFIRMATION is non-nil, don't ask user for confirmation."
(interactive)
(mu4e~mark-in-context
(let ((marknum (hash-table-count mu4e~mark-map)))
(if (zerop marknum)
(message "Nothing is marked")
(mu4e-mark-resolve-deferred-marks)
(when (or no-confirmation
(y-or-n-p
(format "Are you sure you want to execute %d mark%s?"
marknum (if (> marknum 1) "s" ""))))
(maphash
(lambda (docid val)
(let* ((mark (car val)) (target (cdr val))
(markdescr (assq mark mu4e-marks))
(msg (save-excursion
(mu4e~headers-goto-docid docid)
(mu4e-message-at-point))))
;; note: whenever you do something with the message,
;; it looses its N (new) flag
(if markdescr
(funcall (plist-get (cdr markdescr) :action) docid msg target)
(mu4e-error "Unrecognized mark %S" mark))))
mu4e~mark-map))
(mu4e-mark-unmark-all)
(message nil)))))
(let ((marknum (hash-table-count mu4e~mark-map)))
(if (zerop marknum)
(message "Nothing is marked")
(mu4e-mark-resolve-deferred-marks)
(when (or no-confirmation
(y-or-n-p
(format "Are you sure you want to execute %d mark%s?"
marknum (if (> marknum 1) "s" ""))))
(maphash
(lambda (docid val)
(let* ((mark (car val)) (target (cdr val))
(markdescr (assq mark mu4e-marks))
(msg (save-excursion
(mu4e~headers-goto-docid docid)
(mu4e-message-at-point))))
;; note: whenever you do something with the message,
;; it looses its N (new) flag
(if markdescr
(funcall (plist-get (cdr markdescr) :action) docid msg target)
(mu4e-error "Unrecognized mark %S" mark))))
mu4e~mark-map))
(mu4e-mark-unmark-all)
(message nil)))))
(defun mu4e-mark-unmark-all ()
"Unmark all marked messages."