* mu4e-utils.el: warn when no actions are defined + some cosmetics

This commit is contained in:
djcb
2012-04-20 08:46:05 +03:00
parent bff93c9962
commit e0db2dcfb2

View File

@ -397,11 +397,13 @@ point in eiter the headers buffer or the view buffer."
"Ask user with PROMPT to choose some action from ACTIONS. ACTIONS "Ask user with PROMPT to choose some action from ACTIONS. ACTIONS
is a list of actions like `mu4e-view-attachments-actions', is a list of actions like `mu4e-view-attachments-actions',
`mu4e-view-actions', `mu4e-header-actions'. Then, call the function `mu4e-view-actions', `mu4e-header-actions'. Then, call the function
for this action, with the currrent message plist as the argument." for this action, with the currrent message plist as the argument."
(let ((kar (mu4e-read-option prompt actions))) (if (null actions)
(dolist (action actions) (message "No actions of this type defined")
(let ((shortcut (cadr action)) (func (nth 2 action))) (let ((kar (mu4e-read-option prompt actions)))
(when (eq kar shortcut) (dolist (action actions)
(let ((shortcut (cadr action)) (func (nth 2 action)))
(when (eq kar shortcut)
(funcall func msg))))))) (funcall func msg)))))))
(defun mu4e-capture-message () (defun mu4e-capture-message ()