From 1a785abdca056e470ac8281a7c3c841afa877170 Mon Sep 17 00:00:00 2001 From: djcb Date: Mon, 1 Oct 2012 21:18:42 +0300 Subject: [PATCH] * minor --- mu4e/mu4e-message.el | 4 +++- mu4e/mu4e-vars.el | 36 +++++++++++++----------------------- mu4e/mu4e-view.el | 18 +++++------------- 3 files changed, 21 insertions(+), 37 deletions(-) diff --git a/mu4e/mu4e-message.el b/mu4e/mu4e-message.el index ae10d73a..4d3a3ee7 100644 --- a/mu4e/mu4e-message.el +++ b/mu4e/mu4e-message.el @@ -87,7 +87,9 @@ Some notes on the format: :attachments. :body-txt or :body-html fields. Message in the Message view use the actual message file, and do include these fields." ;; after all this documentation, the spectacular implementation - (plist-get msg field)) + (if msg + (plist-get msg field) + (mu4e-error "message must be non-nil"))) (defsubst mu4e-message-at-point (&optional noerror) "Get the message s-expression for the message at point in either diff --git a/mu4e/mu4e-vars.el b/mu4e/mu4e-vars.el index 2e0ca8a1..d44a9f02 100644 --- a/mu4e/mu4e-vars.el +++ b/mu4e/mu4e-vars.el @@ -213,13 +213,9 @@ regexp." "Your folder for draft messages, relative to `mu4e-maildir', e.g. \"/drafts\". Instead of a string, may also be a function that takes a message (a msg plist, see `mu4e-message-get-field'), and -returns a folder. -Note, the message parameter refers to the -original message being replied to / being forwarded / re-edited and is nil -otherwise. -`mu4e-drafts-folder' is evaluated once when composing the message, -and the value is used throughout the message composition. When re-editing messages, -the value of `mu4e-drafts-folder' is ignored." +returns a folder. Note, the message parameter refers to the +original message being replied to / being forwarded / re-edited and +is nil otherwise. `mu4e-drafts-folder' is only evaluated once." :type 'string :safe 'stringp :group 'mu4e-folders) @@ -228,8 +224,8 @@ the value of `mu4e-drafts-folder' is ignored." "Your folder for refiling messages, relative to `mu4e-maildir', e.g. \"/Archive\". Instead of a string, may also be a function that takes a message (a msg plist, see `mu4e-message-get-field'), and -returns a folder. -Note, the message parameter refers to the message-at-point." +returns a folder. Note that the message parameter refers to the +message-at-point." :type 'string :safe 'stringp :group 'mu4e-folders) @@ -238,12 +234,9 @@ Note, the message parameter refers to the message-at-point." "Your folder for sent messages, relative to `mu4e-maildir', e.g. \"/Sent Items\". Instead of a string, may also be a function that takes a message (a msg plist, see `mu4e-message-get-field'), -and returns a folder. -Note, the message parameter refers to the -original message being replied to / being forwarded / re-edited, and is nil -otherwise. -`mu4e-sent-folder' is evaluated once when composing the message, -and the value is used throughout the message composition." +and returns a folder. Note that the message parameter refers to +the original message being replied to / being forwarded / +re-edited, and is nil otherwise." :type 'string :safe 'stringp :group 'mu4e-folders) @@ -253,14 +246,11 @@ and the value is used throughout the message composition." e.g. \"/trash\". Instead of a string, may also be a function that takes a message (a msg plist, see `mu4e-message-get-field'), and returns a folder. When using `mu4e-trash-folder' in the headers -view (when marking messages for trash). -Note, the message parameter -refers to the message-at-point. When using it when composing a -message (see `mu4e-sent-messages-behavior'), this refers to the -original message being replied to / being forwarded / re-edited, and is nil -otherwise. -`mu4e-trash-folder' is evaluated once when composing the message, -and the value is used throughout the message composition." +view (when marking messages for trash). Note that the message +parameter refers to the message-at-point. When using it when +composing a message (see `mu4e-sent-messages-behavior'), this +refers to the original message being replied to / being forwarded / +re-edited, and is nil otherwise." :type 'string :safe 'stringp :group 'mu4e-folders) diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index ddb396c1..32b553fd 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -501,12 +501,12 @@ at POINT, or if nil, at (point)." (define-key map "a" 'mu4e-view-action) ;; change the number of headers - (define-key map (kbd "C-+") 'mu4e~view-split-view-resize) + (define-key map (kbd "C-+") 'mu4e-headers-split-view-resize) (define-key map (kbd "C--") - (lambda () (interactive) (mu4e~view-split-view-resize -1))) - (define-key map (kbd "") 'mu4e~view-split-view-resize) + (lambda () (interactive) (mu4e-headers-split-view-resize -1))) + (define-key map (kbd "") 'mu4e-headers-split-view-resize) (define-key map (kbd "") - (lambda () (interactive) (mu4e~view-split-view-resize -1))) + (lambda () (interactive) (mu4e-headers-split-view-resize -1))) ;; intra-message navigation (define-key map (kbd "SPC") 'scroll-up) @@ -1053,15 +1053,7 @@ attachments) in response to a (mu4e~proc-extract 'temp ... )." (defun mu4e~view-split-view-p () "Return t if we're in split-view, nil otherwise." (member mu4e-split-view '(horizontal vertical))) - -(defun mu4e~view-split-view-resize (n) - "In horizontal split-view, increase the number of lines shown by -N; in vertical split-view, increase the number of columns shown by -N. Otherwise, don't do anything." - (interactive "P") - (mu4e~view-in-headers-context - (mu4e-headers-split-view-resize n))) - + (defun mu4e-view-unmark-all () "If we're in split-view, unmark all messages. Otherwise, warn user that unmarking only works in the header list."