[PATCH] emacs: whitespace-cleanup for emacs/*.el files
Tomi Ollila
tomi.ollila at iki.fi
Wed Jan 11 07:13:35 PST 2012
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)
- , at body)
+ , at 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 at bar.com <foo at bar.com>' then show just
;; 'foo at 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
More information about the notmuch
mailing list