* mu4e: make elint-clean

This commit is contained in:
djcb 2012-08-14 10:20:27 +03:00
parent 020bf110cb
commit 12226c19c0
5 changed files with 20 additions and 15 deletions

View File

@ -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}."

View File

@ -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."

View File

@ -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}."

View File

@ -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

View File

@ -85,14 +85,10 @@ display with `mu4e-view-toggle-hide-cited (default keybinding:
<w>)."
: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))