* mu4e: make the byte-compiler happy

This commit is contained in:
djcb 2013-06-29 13:07:32 +03:00
parent 06b3142e60
commit 72e6fb997a
4 changed files with 28 additions and 18 deletions

View File

@ -51,8 +51,16 @@ a length cookie:
(purecopy (concat mu4e~cookie-pre "\\([[:xdigit:]]+\\)" mu4e~cookie-post))
"Regular expression matching the length cookie.
Match 1 will be the length (in hex).")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defsubst mu4e~proc-send-command (frm &rest args)
"Send as command to the mu server process.
Start the process if needed."
(unless (mu4e~proc-running-p)
(mu4e~proc-start))
(let ((cmd (apply 'format frm args)))
(mu4e-log 'to-server "%s" cmd)
(process-send-string mu4e~proc-process (concat cmd "\n"))))
(defun mu4e~proc-start ()
"Start the mu server process."
@ -291,7 +299,7 @@ The server output is as follows:
(t
(error "Something bad happened to the mu server process")))))
(defsubst mu4e--docid-msgid-param (docid-or-msgid)
(defsubst mu4e~docid-msgid-param (docid-or-msgid)
"Construct a backend parameter based on DOCID-OR-MSGID."
(format
(if (stringp docid-or-msgid)
@ -299,15 +307,6 @@ The server output is as follows:
"docid:%d")
docid-or-msgid))
(defsubst mu4e~proc-send-command (frm &rest args)
"Send as command to the mu server process.
Start the process if needed."
(unless (mu4e~proc-running-p)
(mu4e~proc-start))
(let ((cmd (apply 'format frm args)))
(mu4e-log 'to-server "%s" cmd)
(process-send-string mu4e~proc-process (concat cmd "\n"))))
(defun mu4e~proc-remove (docid)
"Remove message identified by docid.
The results are reporter through either (:update ... ) or (:error)
@ -388,7 +387,7 @@ or (:error ) sexp, which are handled my `mu4e-update-func' and
(mu4e-error "At least one of maildir and flags must be specified"))
(unless (or (not maildir) (file-exists-p (concat mu4e-maildir "/" maildir "/")))
(mu4e-error "Target dir does not exist"))
(let* ((idparam (mu4e--docid-msgid-param docid-or-msgid))
(let* ((idparam (mu4e~docid-msgid-param docid-or-msgid))
(flagstr
(when flags
(concat " flags:"
@ -499,7 +498,7 @@ The result will be delivered to the function registered as
`mu4e-message-func'."
(mu4e~proc-send-command
"cmd:view %s extract-images:%s extract-encrypted:%s use-agent:true"
(mu4e--docid-msgid-param docid-or-msgid)
(mu4e~docid-msgid-param docid-or-msgid)
(if images "true" "false")
(if decrypt "true" "false")))

View File

@ -36,8 +36,20 @@
(require 'mu4e-lists)
;;(require 'mu4e-proc)
(require 'doc-view)
(require 'org)
;; keep the byte-compiler happy
(declare-function mu4e~proc-mkdir "mu4e-proc")
(declare-function mu4e~proc-ping "mu4e-proc")
(declare-function mu4e~proc-contacts "mu4e-proc")
(declare-function mu4e~proc-kill "mu4e-proc")
(declare-function mu4e~proc-index "mu4e-proc")
(declare-function mu4e~proc-add "mu4e-proc")
(declare-function mu4e~proc-mkdir "mu4e-proc")
(declare-function mu4e~proc-running-p "mu4e-proc")
(declare-function show-all "org")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; the following is taken from org.el; we copy it here since we don't want to
;; depend on org-mode directly (it causes byte-compilation errors) TODO: a

View File

@ -614,6 +614,9 @@ Note, :sortable does not work for custom header fields.")
(defvar mu4e~view-msg nil "The message being viewed in view mode.")
(defvar mu4e~view-headers-buffer nil
"The headers buffer connected to this view.")
(defvar mu4e~contacts-for-completion nil
"List of contacts (ie. 'name <e-mail>').
This is used by the completion functions in mu4e-compose, and

View File

@ -113,10 +113,6 @@ The first letter of NAME is used as a shortcut character.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; some buffer-local variables / constants
(defvar mu4e~view-headers-buffer nil
"The headers buffer connected to this view.")
(defvar mu4e~view-cited-hidden nil "Whether cited lines are hidden.")
(defvar mu4e~view-link-map nil
"A map of some number->url so we can jump to url by number.")