From 3c67aa65912d614a37d785e6dddcd5a5ef35afa8 Mon Sep 17 00:00:00 2001 From: djcb Date: Mon, 3 Jun 2013 21:09:20 +0300 Subject: [PATCH] * mu4e: fix a few compiler warnings / typos --- mu4e/mu4e-actions.el | 1 - mu4e/mu4e-contrib.el | 2 ++ mu4e/mu4e-draft.el | 2 +- mu4e/mu4e-proc.el | 20 ++++++++++---------- mu4e/mu4e-utils.el | 33 +++++++++++++++++++-------------- mu4e/mu4e-vars.el | 4 ++-- mu4e/mu4e.texi | 3 +-- mu4e/org-mu4e.el | 4 ++-- 8 files changed, 37 insertions(+), 32 deletions(-) diff --git a/mu4e/mu4e-actions.el b/mu4e/mu4e-actions.el index 1e0767be..cb7559ca 100644 --- a/mu4e/mu4e-actions.el +++ b/mu4e/mu4e-actions.el @@ -29,7 +29,6 @@ (eval-when-compile (byte-compile-disable-warning 'cl-functions)) (require 'cl) -(require 'mu4e-utils) (require 'mu4e-message) (require 'mu4e-meta) diff --git a/mu4e/mu4e-contrib.el b/mu4e/mu4e-contrib.el index f9847c5b..19c314c5 100644 --- a/mu4e/mu4e-contrib.el +++ b/mu4e/mu4e-contrib.el @@ -23,6 +23,8 @@ ;; Contributed by sabof +(require 'mu4e) + (defun mu4e-headers-mark-all-unread-read () "Put a ! \(read) mark on all visible unread messages." (interactive) diff --git a/mu4e/mu4e-draft.el b/mu4e/mu4e-draft.el index 5221197f..4305c7e9 100644 --- a/mu4e/mu4e-draft.el +++ b/mu4e/mu4e-draft.el @@ -31,7 +31,7 @@ (require 'mu4e-vars) (require 'mu4e-utils) - +(require 'mu4e-message) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/mu4e/mu4e-proc.el b/mu4e/mu4e-proc.el index 26dc18cf..3948e674 100644 --- a/mu4e/mu4e-proc.el +++ b/mu4e/mu4e-proc.el @@ -127,7 +127,7 @@ removed." (car objcons))))))) -(defsubst mu4e~proc-filter (proc str) +(defun mu4e~proc-filter (proc str) "A process-filter for the 'mu server' output. It accumulates the strings into valid sexps by checking of the ';;eox' end-of-sexp marker, and then evaluating them. @@ -263,7 +263,7 @@ The server output is as follows: (setq sexp (mu4e~proc-eat-sexp-from-buf)))))) -;; error codes are defined in src/mu-util.h +;; error codes are defined in src/mu-util ;;(defconst mu4e-xapian-empty 19 "Error code: xapian is empty/non-existent") (defun mu4e~proc-sentinel (proc msg) @@ -291,6 +291,14 @@ The server output is as follows: (t (error "Something bad happened to the mu server process"))))) +(defsubst mu4e--docid-msgid-param (docid-or-msgid) + "Construct a backend parameter based on DOCID-OR-MSGID." + (format + (if (stringp docid-or-msgid) + "msgid:\"%s\"" + "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." @@ -300,14 +308,6 @@ Start the process if needed." (mu4e-log 'to-server "%s" cmd) (process-send-string mu4e~proc-process (concat cmd "\n")))) -(defsubst mu4e--docid-msgid-param (docid-or-msgid) - "Construct a backend parameter based on DOCID-OR-MSGID." - (format - (if (stringp docid-or-msgid) - "msgid:\"%s\"" - "docid:%d") - docid-or-msgid)) - (defun mu4e~proc-remove (docid) "Remove message identified by docid. The results are reporter through either (:update ... ) or (:error) diff --git a/mu4e/mu4e-utils.el b/mu4e/mu4e-utils.el index 0b8e7056..5241ffc9 100644 --- a/mu4e/mu4e-utils.el +++ b/mu4e/mu4e-utils.el @@ -34,7 +34,9 @@ (require 'mu4e-vars) (require 'mu4e-about) (require 'mu4e-lists) +;;(require 'mu4e-proc) (require 'doc-view) +(require 'org) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; the following is taken from org.el; we copy it here since we don't want to @@ -638,6 +640,23 @@ This is used by the completion function in mu4e-compose." Checks whether the server process is live." (mu4e~proc-running-p)) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; starting / getting mail / updating the index +;; +;; +(defvar mu4e~update-timer nil + "The mu4e update timer.") +(defconst mu4e~update-name "*mu4e-update*" + "Name of the process and buffer to update mail.") +(defconst mu4e~update-buffer-height 8 + "Height of the mu4e message retrieval/update buffer.") + +(defvar mu4e~get-mail-ask-password "mu4e get-mail: Enter password: " + "Query string for `mu4e-get-mail-command' password.") +(defvar mu4e~get-mail-password-regexp "^Remote: Enter password: $" + "Regexp to match a password query in the `mu4e-get-mail-command' output.") + + (defun mu4e~start (&optional func) "If mu4e is already running, execute function FUNC (if non-nil). Otherwise, check various requirements, then start mu4e. When @@ -698,21 +717,7 @@ successful, call FUNC (if non-nil) afterwards." (buffer-list))) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; getting mail / updating the index -;; -;; -(defvar mu4e~update-timer nil - "The mu4e update timer.") -(defconst mu4e~update-name "*mu4e-update*" - "Name of the process and buffer to update mail.") -(defconst mu4e~update-buffer-height 8 - "Height of the mu4e message retrieval/update buffer.") -(defvar mu4e~get-mail-ask-password "mu4e get-mail: Enter password: " - "Query string for `mu4e-get-mail-command' password.") -(defvar mu4e~get-mail-password-regexp "^Remote: Enter password: $" - "Regexp to match a password query in the `mu4e-get-mail-command' output.") (defun mu4e~get-mail-process-filter (proc msg) "Filter the output of `mu4e-get-mail-command'. diff --git a/mu4e/mu4e-vars.el b/mu4e/mu4e-vars.el index cf5eb5a9..f6485634 100644 --- a/mu4e/mu4e-vars.el +++ b/mu4e/mu4e-vars.el @@ -1,6 +1,6 @@ ;;; mu4e-vars.el -- part of mu4e, the mu mail user agent ;; -;; Copyright (C) 2011-2012 Dirk-Jan C. Binnema +;; Copyright (C) 2011-2013 Dirk-Jan C. Binnema ;; Author: Dirk-Jan C. Binnema ;; Maintainer: Dirk-Jan C. Binnema @@ -632,7 +632,7 @@ filled when mu4e starts.") ;; from the server (defun mu4e~default-handler (&rest args) "*internal* Dummy handler function." - (mu4e-error "Not handled: %S" args)) + (error "Not handled: %S" args)) (defvar mu4e-error-func 'mu4e~default-handler "A function called for each error returned from the server diff --git a/mu4e/mu4e.texi b/mu4e/mu4e.texi index ac097fba..8016f1bd 100644 --- a/mu4e/mu4e.texi +++ b/mu4e/mu4e.texi @@ -1,4 +1,5 @@ \input texinfo.tex @c -*-texinfo-*- +@include texi.texi @c %**start of header @setfilename mu4e.info @settitle mu4e @value{mu-version} user manual @@ -11,8 +12,6 @@ @documentencoding UTF-8 @c %**end of header -@include texi.texi - @copying Copyright @copyright{} 2012, 2013 Dirk-Jan C. Binnema diff --git a/mu4e/org-mu4e.el b/mu4e/org-mu4e.el index 44d5ea14..4253eb34 100644 --- a/mu4e/org-mu4e.el +++ b/mu4e/org-mu4e.el @@ -33,12 +33,12 @@ (require 'org-exp nil 'noerror) (eval-when-compile (require 'cl)) -(eval-when-compile (require 'mu4e)) +(require 'mu4e) (defgroup org-mu4e nil "Settings for the org-mode related functionality in mu4e." :group 'mu4e - :group 'org) + :group 'org) (defcustom org-mu4e-link-desc-func (lambda (msg) (or (plist-get msg :subject) "No subject"))