Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6AFFB429E21 for ; Wed, 11 Jan 2012 07:13:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id anz1R9eh5K+S for ; Wed, 11 Jan 2012 07:13:46 -0800 (PST) Received: from mail-gw3.nixu.fi (mail-gw3.nixu.fi [193.209.237.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D9775431FB6 for ; Wed, 11 Jan 2012 07:13:45 -0800 (PST) Received: from pps.filterd (mail-gw3 [127.0.0.1]) by mail-gw3.nixu.fi (8.14.4/8.14.4) with SMTP id q0BFAl0n029043; Wed, 11 Jan 2012 17:13:37 +0200 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) by mail-gw3.nixu.fi with ESMTP id 114cs0yvhj-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Wed, 11 Jan 2012 17:13:37 +0200 Received: from taco2.nixu.fi (localhost [127.0.0.1]) by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q0BFDa7b031962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 11 Jan 2012 17:13:36 +0200 Received: (from too@localhost) by taco2.nixu.fi (8.14.3/8.14.3/Submit) id q0BFDasP031961; Wed, 11 Jan 2012 17:13:36 +0200 From: Tomi Ollila To: notmuch@notmuchmail.org Subject: [PATCH] emacs: whitespace-cleanup for emacs/*.el files Date: Wed, 11 Jan 2012 17:13:35 +0200 Message-Id: <1326294815-31926-1-git-send-email-tomi.ollila@iki.fi> X-Mailer: git-send-email 1.7.7.3 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110, 1.0.211, 0.0.0000 definitions=2012-01-11_03:2012-01-11, 2012-01-11, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1201110119 Cc: Tomi Ollila X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 15:13:47 -0000 Executed for f in emacs/*.el do emacs -q --batch --eval \ "(progn (find-file \"$f\") (whitespace-cleanup) (save-buffer))" done which removed trailing whitespace and empty lines at the end of file removed spaces before tab (if any) converted 8 spaces to tabs in the beginning of line --- emacs/coolj.el | 16 ++++++------ emacs/notmuch-lib.el | 3 +- emacs/notmuch-maildir-fcc.el | 7 ++--- emacs/notmuch-show.el | 52 +++++++++++++++++++++--------------------- emacs/notmuch.el | 42 +++++++++++++++++----------------- 5 files changed, 59 insertions(+), 61 deletions(-) diff --git a/emacs/coolj.el b/emacs/coolj.el index 60af60a..173eb2f 100644 --- a/emacs/coolj.el +++ b/emacs/coolj.el @@ -108,11 +108,11 @@ If the line should not be broken, return nil; point remains on the line." (move-to-column fill-column) (if (and (re-search-forward "[^ ]" (line-end-position) 1) - (> (current-column) fill-column)) + (> (current-column) fill-column)) ;; This line is too long. Can we break it? (or (coolj-find-break-backward prefix) - (progn (move-to-column fill-column) - (coolj-find-break-forward))))) + (progn (move-to-column fill-column) + (coolj-find-break-forward))))) (defun coolj-find-break-backward (prefix) "Move point backward to the first available breakpoint and return t. @@ -135,11 +135,11 @@ If no breakpoint is found, return nil." If no break point is found, return nil." (and (search-forward " " (line-end-position) 1) (progn (skip-chars-forward " " (line-end-position)) - (null (eolp))) + (null (eolp))) (if (and fill-nobreak-predicate - (run-hook-with-args-until-success - 'fill-nobreak-predicate)) - (coolj-find-break-forward) - t))) + (run-hook-with-args-until-success + 'fill-nobreak-predicate)) + (coolj-find-break-forward) + t))) (provide 'coolj) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 0f856bf..4a4505c 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -110,7 +110,7 @@ the user hasn't set this variable with the old or new value." (let (out) (while list (when (funcall predicate (car list)) - (push (car list) out)) + (push (car list) out)) (setq list (cdr list))) (nreverse out))) @@ -156,4 +156,3 @@ was called." (make-variable-buffer-local 'notmuch-show-process-crypto) (provide 'notmuch-lib) - diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el index 6fbf82d..06a6486 100644 --- a/emacs/notmuch-maildir-fcc.el +++ b/emacs/notmuch-maildir-fcc.el @@ -65,7 +65,7 @@ yet when sending a mail." ;; Set up the message-fcc-handler to move mails to the maildir in Fcc ;; The parameter is set to mark messages as "seen" (setq message-fcc-handler-function - (lambda (destdir) + (lambda (destdir) (notmuch-maildir-fcc-write-buffer-to-maildir destdir t))) ;; add a hook to actually insert the Fcc header when sending (add-hook 'message-header-setup-hook 'notmuch-fcc-header-setup)) @@ -116,7 +116,7 @@ will NOT be removed or replaced." (if (= (elt subdir 0) ?/) subdir (concat (notmuch-database-path) "/" subdir))))) - + ;; finally test if fcc points to a valid maildir (let ((fcc-header (message-field-value "Fcc"))) (unless (notmuch-maildir-fcc-dir-is-maildir-p fcc-header) @@ -128,7 +128,7 @@ will NOT be removed or replaced." (notmuch-maildir-fcc-create-maildir fcc-header)) (t (error "Message not sent")))))))) - + (defun notmuch-maildir-fcc-host-fixer (hostname) (replace-regexp-in-string "/\\|:" (lambda (s) @@ -216,4 +216,3 @@ return t if successful, and nil otherwise." (notmuch-fcc-initialization) (provide 'notmuch-maildir-fcc) - diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 5502efd..1ff871f 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -115,9 +115,9 @@ indentation." `(save-excursion (let ((id (notmuch-show-get-message-id))) (let ((buf (generate-new-buffer (concat "*notmuch-msg-" id "*")))) - (with-current-buffer buf + (with-current-buffer buf (call-process notmuch-command nil t nil "show" "--format=raw" id) - ,@body) + ,@body) (kill-buffer buf))))) (defun notmuch-show-view-all-mime-parts () @@ -143,23 +143,23 @@ indentation." (defun notmuch-foreach-mime-part (function mm-handle) (cond ((stringp (car mm-handle)) - (dolist (part (cdr mm-handle)) - (notmuch-foreach-mime-part function part))) - ((bufferp (car mm-handle)) - (funcall function mm-handle)) - (t (dolist (part mm-handle) - (notmuch-foreach-mime-part function part))))) + (dolist (part (cdr mm-handle)) + (notmuch-foreach-mime-part function part))) + ((bufferp (car mm-handle)) + (funcall function mm-handle)) + (t (dolist (part mm-handle) + (notmuch-foreach-mime-part function part))))) (defun notmuch-count-attachments (mm-handle) (let ((count 0)) (notmuch-foreach-mime-part (lambda (p) (let ((disposition (mm-handle-disposition p))) - (and (listp disposition) - (or (equal (car disposition) "attachment") - (and (equal (car disposition) "inline") - (assq 'filename disposition))) - (incf count)))) + (and (listp disposition) + (or (equal (car disposition) "attachment") + (and (equal (car disposition) "inline") + (assq 'filename disposition))) + (incf count)))) mm-handle) count)) @@ -168,13 +168,13 @@ indentation." (lambda (p) (let ((disposition (mm-handle-disposition p))) (and (listp disposition) - (or (equal (car disposition) "attachment") - (and (equal (car disposition) "inline") - (assq 'filename disposition))) - (or (not queryp) - (y-or-n-p - (concat "Save '" (cdr (assq 'filename disposition)) "' "))) - (mm-save-part p)))) + (or (equal (car disposition) "attachment") + (and (equal (car disposition) "inline") + (assq 'filename disposition))) + (or (not queryp) + (y-or-n-p + (concat "Save '" (cdr (assq 'filename disposition)) "' "))) + (mm-save-part p)))) mm-handle)) (defun notmuch-show-save-attachments () @@ -236,15 +236,15 @@ unchanged ADDRESS if parsing fails." ;; Remove double quotes. They might be required during transport, ;; but we don't need to see them. (when name - (setq name (replace-regexp-in-string "\"" "" name))) + (setq name (replace-regexp-in-string "\"" "" name))) ;; If the address is 'foo@bar.com ' then show just ;; 'foo@bar.com'. (when (string= name address) - (setq name nil)) + (setq name nil)) (if (not name) - address - (concat name " <" address ">"))) + address + (concat name " <" address ">"))) (error address))) (defun notmuch-show-insert-headerline (headers date tags depth) @@ -755,7 +755,7 @@ current buffer, if possible." (put-text-property message-start message-end :notmuch-message-extent (cons message-start message-end)) (let ((headers-overlay (make-overlay headers-start headers-end)) - (invis-specs (list headers-invis-spec message-invis-spec))) + (invis-specs (list headers-invis-spec message-invis-spec))) (overlay-put headers-overlay 'invisible invis-specs) (overlay-put headers-overlay 'priority 10)) (overlay-put (make-overlay body-start body-end) 'invisible message-invis-spec) @@ -1307,7 +1307,7 @@ than only the current message." (interactive "P\nsPipe message to command: ") (let (shell-command) (if entire-thread - (setq shell-command + (setq shell-command (concat notmuch-command " show --format=mbox " (shell-quote-argument (mapconcat 'identity (notmuch-show-get-message-ids-for-open-messages) " OR ")) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 1e61775..aab26c5 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -84,23 +84,23 @@ For example: (defun notmuch-foreach-mime-part (function mm-handle) (cond ((stringp (car mm-handle)) - (dolist (part (cdr mm-handle)) - (notmuch-foreach-mime-part function part))) - ((bufferp (car mm-handle)) - (funcall function mm-handle)) - (t (dolist (part mm-handle) - (notmuch-foreach-mime-part function part))))) + (dolist (part (cdr mm-handle)) + (notmuch-foreach-mime-part function part))) + ((bufferp (car mm-handle)) + (funcall function mm-handle)) + (t (dolist (part mm-handle) + (notmuch-foreach-mime-part function part))))) (defun notmuch-count-attachments (mm-handle) (let ((count 0)) (notmuch-foreach-mime-part (lambda (p) (let ((disposition (mm-handle-disposition p))) - (and (listp disposition) - (or (equal (car disposition) "attachment") - (and (equal (car disposition) "inline") - (assq 'filename disposition))) - (incf count)))) + (and (listp disposition) + (or (equal (car disposition) "attachment") + (and (equal (car disposition) "inline") + (assq 'filename disposition))) + (incf count)))) mm-handle) count)) @@ -109,13 +109,13 @@ For example: (lambda (p) (let ((disposition (mm-handle-disposition p))) (and (listp disposition) - (or (equal (car disposition) "attachment") - (and (equal (car disposition) "inline") - (assq 'filename disposition))) - (or (not queryp) - (y-or-n-p - (concat "Save '" (cdr (assq 'filename disposition)) "' "))) - (mm-save-part p)))) + (or (equal (car disposition) "attachment") + (and (equal (car disposition) "inline") + (assq 'filename disposition))) + (or (not queryp) + (y-or-n-p + (concat "Save '" (cdr (assq 'filename disposition)) "' "))) + (mm-save-part p)))) mm-handle)) (defun notmuch-documentation-first-line (symbol) @@ -655,7 +655,7 @@ Here is an example of how to color search results based on tags. (setq notmuch-search-line-faces '((\"delete\" . (:foreground \"red\" :background \"blue\")) - (\"unread\" . (:foreground \"green\")))) + (\"unread\" . (:foreground \"green\")))) The attributes defined for matching tags are merged, with later attributes overriding earlier. A message having both \"delete\" @@ -920,9 +920,9 @@ The optional parameters are used as follows: oldest-first: A Boolean controlling the sort order of returned threads target-thread: A thread ID (with the thread: prefix) that will be made - current if it appears in the search results. + current if it appears in the search results. target-line: The line number to move to if the target thread does not - appear in the search results." + appear in the search results." (interactive (list (notmuch-read-query "Notmuch search: "))) (let ((buffer (get-buffer-create (notmuch-search-buffer-title query)))) (switch-to-buffer buffer) -- 1.7.7.3