From 12226c19c0dba98d78894c1723fc1edda3d9a572 Mon Sep 17 00:00:00 2001 From: djcb Date: Tue, 14 Aug 2012 10:20:27 +0300 Subject: [PATCH] * mu4e: make elint-clean --- mu4e/mu4e-compose.el | 2 ++ mu4e/mu4e-headers.el | 5 ++--- mu4e/mu4e-main.el | 3 +++ mu4e/mu4e-vars.el | 9 +++++++-- mu4e/mu4e-view.el | 16 ++++++---------- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el index b14e184a..62cb1a10 100644 --- a/mu4e/mu4e-compose.el +++ b/mu4e/mu4e-compose.el @@ -31,6 +31,7 @@ (eval-when-compile (byte-compile-disable-warning 'cl-functions)) (require 'cl) +(require 'startup) ;; silence elint re `user-mail-address'. (require 'message) (require 'mail-parse) (require 'smtpmail) @@ -469,6 +470,7 @@ needed, set the Fcc header, and register the handler function." (cons mu4e~compose-address-fields-regexp 'completion-at-point) message-completion-alist))))) +(defvar mu4e-compose-mode-abbrev-table nil) (define-derived-mode mu4e-compose-mode message-mode "mu4e:compose" "Major mode for the mu4e message composition, derived from `message-mode'. \\{message-mode-map}." diff --git a/mu4e/mu4e-headers.el b/mu4e/mu4e-headers.el index 6a59703d..3a6973f9 100644 --- a/mu4e/mu4e-headers.el +++ b/mu4e/mu4e-headers.el @@ -565,6 +565,7 @@ after the end of the search results." mu4e-headers-fields))) +(defvar mu4e-headers-mode-abbrev-table nil) (define-derived-mode mu4e-headers-mode special-mode "mu4e:headers" "Major mode for displaying mu4e search results. @@ -897,8 +898,6 @@ limited to the message at point and its descendants." "Stack of queries before the present one.") (defvar mu4e~headers-query-future nil "Stack of queries after the present one.") -(defvar mu4e~headers-last-query nil - "The present (most recent) query.") (defvar mu4e~headers-query-stack-size 20 "Maximum size for the query stacks.") @@ -1077,7 +1076,7 @@ current window. " (mu4e-error "Cannot get a message view")) (select-window viewwin) (switch-to-buffer (mu4e~headers-get-loading-buf)) - (mu4e~proc-view docid mu4e-view-show-images))) + (mu4e~proc-view docid mu4e-show-images))) (defun mu4e-headers-rerun-search () "Rerun the search for the last search expression." diff --git a/mu4e/mu4e-main.el b/mu4e/mu4e-main.el index e0b617af..6f8affd9 100644 --- a/mu4e/mu4e-main.el +++ b/mu4e/mu4e-main.el @@ -24,8 +24,10 @@ ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(require 'smtpmail) ;; the queing stuff (silence elint) (require 'mu4e-utils) ;; utility functions + (defconst mu4e~main-buffer-name "*mu4e-main*" "*internal* Name of the mu4e main view buffer.") @@ -52,6 +54,7 @@ "Keymap for the *mu4e-main* buffer.") (fset 'mu4e-main-mode-map mu4e-main-mode-map) +(defvar mu4e-main-mode-abbrev-table nil) (define-derived-mode mu4e-main-mode special-mode "mu4e:main" "Major mode for the mu4e main screen. \\{mu4e-main-mode-map}." diff --git a/mu4e/mu4e-vars.el b/mu4e/mu4e-vars.el index 6e751c8b..1ad2b74d 100644 --- a/mu4e/mu4e-vars.el +++ b/mu4e/mu4e-vars.el @@ -28,6 +28,7 @@ ;; Customization (require 'mu4e-meta) (require 'message) +(require 'startup) ;; silence elint re `user-mail-address'. (defgroup mu4e nil "mu4e - mu for emacs" @@ -123,8 +124,10 @@ else: don't split (show either headers or messages, not both) Also see `mu4e-headers-visible-lines' and `mu4e-headers-visible-columns'.") - - +(defcustom mu4e-show-images nil + "Whether to automatically display attached images in the message +view buffer." + :group 'mu4e-view) ;; crypto (defgroup mu4e-crypto nil @@ -496,6 +499,8 @@ mu4e starts.") "Properties we receive from the mu4e server process (in the 'pong-handler').") +(defvar mu4e~headers-last-query nil + "The present (most recent) query.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; our handlers funcs diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index 79c5e34b..0b98a7bd 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -85,14 +85,10 @@ display with `mu4e-view-toggle-hide-cited (default keybinding: )." :group 'mu4e-view) -(defcustom mu4e-view-show-images nil - "Whether to automatically display attached images in the message -buffer." - :group 'mu4e-view) - (defcustom mu4e-view-image-max-width 800 "The maximum width for images to display; this is only effective - if you're using an emacs with Imagemagick support." + if you're using an emacs with Imagemagick support, and + `mu4e-show-image' is non-nil." :group 'mu4e-view) (defvar mu4e-view-actions @@ -147,7 +143,7 @@ The first letter of NAME is used as a shortcut character.") (defun mu4e-view-message-with-msgid (msgid) "View message with MSGID. This is meant for external programs wanting to show specific messages - for example, `mu4e-org'." - (mu4e~proc-view msgid mu4e-view-show-images)) + (mu4e~proc-view msgid mu4e-show-images)) (defun mu4e-view-message-text (msg) "Return the message to display (as a string), based on the MSG @@ -620,7 +616,7 @@ is nil, and otherwise open it." (fset 'mu4e-view-mode-map mu4e-view-mode-map) - +(defvar mu4e-view-mode-abbrev-table nil) (define-derived-mode mu4e-view-mode special-mode "mu4e:view" "Major mode for viewing an e-mail message in mu4e. \\{mu4e-view-mode-map}." @@ -714,8 +710,8 @@ browser is called is depending on `browse-url-browser-function' and (browse-url url)))))) (defun mu4e~view-show-images-maybe (msg) - "Show attached images, if `mu4e-view-show-images' is non-nil." - (when (and (display-images-p) mu4e-view-show-images) + "Show attached images, if `mu4e-show-images' is non-nil." + (when (and (display-images-p) mu4e-show-images) (mu4e-view-for-each-part msg (lambda (msg part) (when (string-match "^image/" (plist-get part :mime-type))