Don't quote lambda forms
authorAaron Ecay <aaronecay@gmail.com>
Sat, 17 Dec 2011 15:47:48 +0000 (10:47 -0500)
committerDavid Bremner <bremner@debian.org>
Wed, 21 Dec 2011 11:27:38 +0000 (07:27 -0400)
This generates byte-compiler warnings on (at least) current trunk
versions of Emacs.  The quote is not necessary; lambda forms are
self-quoting.

emacs/notmuch-crypto.el
emacs/notmuch-hello.el
emacs/notmuch-maildir-fcc.el
emacs/notmuch-message.el
emacs/notmuch-show.el
emacs/notmuch.el

index 67c26af997934e9c74d8f9e251af00e31862953a..ac30098734283e76c88eb6cb97df5badd04cf3e1 100644 (file)
@@ -68,7 +68,7 @@ mode."
   :group 'notmuch)
 
 (define-button-type 'notmuch-crypto-status-button-type
-  'action '(lambda (button) (message (button-get button 'help-echo)))
+  'action (lambda (button) (message (button-get button 'help-echo)))
   'follow-link t
   'help-echo "Set notmuch-crypto-process-mime to process cryptographic mime parts.")
 
@@ -77,7 +77,7 @@ mode."
         (help-msg nil)
         (label "Signature not processed")
         (face 'notmuch-crypto-signature-unknown)
-        (button-action '(lambda (button) (message (button-get button 'help-echo)))))
+        (button-action (lambda (button) (message (button-get button 'help-echo)))))
     (cond
      ((string= status "good")
       (let ((fingerprint (concat "0x" (plist-get sigstatus :fingerprint))))
index 81b26059ab1a01dfbfdd5d93bd2f1a385f219511..45cda2ec750617cd941a773bf199f882ef4d5093 100644 (file)
@@ -336,8 +336,8 @@ should be. Returns a cons cell `(tags-per-line width)'."
 (defvar notmuch-hello-mode-map
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map widget-keymap)
-    (define-key map "v" '(lambda () "Display the notmuch version" (interactive)
-                           (message "notmuch version %s" (notmuch-version))))
+    (define-key map "v" (lambda () "Display the notmuch version" (interactive)
+                         (message "notmuch version %s" (notmuch-version))))
     (define-key map "?" 'notmuch-help)
     (define-key map "q" 'notmuch-kill-this-buffer)
     (define-key map "=" 'notmuch-hello-update)
@@ -513,36 +513,36 @@ Complete list of currently available key bindings:
          (widget-insert "\n\n")
          (let ((start (point))
                (nth 0))
-           (mapc '(lambda (search)
-                    (let ((widget-symbol (intern (format "notmuch-hello-search-%d" nth))))
-                      (set widget-symbol
-                           (widget-create 'editable-field
-                                      ;; Don't let the search boxes be
-                                      ;; less than 8 characters wide.
-                                      :size (max 8
-                                                 (- (window-width)
-                                                    ;; Leave some space
-                                                    ;; at the start and
-                                                    ;; end of the
-                                                    ;; boxes.
-                                                    (* 2 notmuch-hello-indent)
-                                                    ;; 1 for the space
-                                                    ;; before the
-                                                    ;; `[save]' button. 6
-                                                    ;; for the `[save]'
-                                                    ;; button.
-                                                    1 6))
-                                      :action (lambda (widget &rest ignore)
-                                                (notmuch-hello-search (widget-value widget)))
-                                      search))
-                      (widget-insert " ")
-                      (widget-create 'push-button
-                                     :notify (lambda (widget &rest ignore)
-                                               (notmuch-hello-add-saved-search widget))
-                                     :notmuch-saved-search-widget widget-symbol
-                                     "save"))
-                    (widget-insert "\n")
-                    (setq nth (1+ nth)))
+           (mapc (lambda (search)
+                   (let ((widget-symbol (intern (format "notmuch-hello-search-%d" nth))))
+                     (set widget-symbol
+                          (widget-create 'editable-field
+                                         ;; Don't let the search boxes be
+                                         ;; less than 8 characters wide.
+                                         :size (max 8
+                                                    (- (window-width)
+                                                       ;; Leave some space
+                                                       ;; at the start and
+                                                       ;; end of the
+                                                       ;; boxes.
+                                                       (* 2 notmuch-hello-indent)
+                                                       ;; 1 for the space
+                                                       ;; before the
+                                                       ;; `[save]' button. 6
+                                                       ;; for the `[save]'
+                                                       ;; button.
+                                                       1 6))
+                                         :action (lambda (widget &rest ignore)
+                                                   (notmuch-hello-search (widget-value widget)))
+                                         search))
+                     (widget-insert " ")
+                     (widget-create 'push-button
+                                    :notify (lambda (widget &rest ignore)
+                                              (notmuch-hello-add-saved-search widget))
+                                    :notmuch-saved-search-widget widget-symbol
+                                    "save"))
+                   (widget-insert "\n")
+                   (setq nth (1+ nth)))
                  notmuch-hello-recent-searches)
            (indent-rigidly start (point) notmuch-hello-indent)))
 
index e67886853eeb341989191044241352100c08a56a..6fbf82d220b667286c63d13615f814931b1ee5be 100644 (file)
@@ -65,8 +65,8 @@ 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)
-             (notmuch-maildir-fcc-write-buffer-to-maildir destdir t)))
+          (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))
 
@@ -131,10 +131,10 @@ will NOT be removed or replaced."
  
 (defun notmuch-maildir-fcc-host-fixer (hostname)
   (replace-regexp-in-string "/\\|:"
-                           '(lambda (s)
-                               (cond ((string-equal s "/") "\\057")
-                                     ((string-equal s ":") "\\072")
-                                     (t s)))
+                           (lambda (s)
+                             (cond ((string-equal s "/") "\\057")
+                                   ((string-equal s ":") "\\072")
+                                   (t s)))
                            hostname
                            t
                            t))
index aefd3fbc7a5c3d7f53a9be1942f5c2bc142d8df9..08e5b1749af8e4d11813826f23675f6c6676806a 100644 (file)
@@ -39,10 +39,10 @@ the \"inbox\" and \"todo\", you would set
     (when (and notmuch-message-replied-tags rep)
       ;; add a "+" to any tag that is doesn't already begin with a "+"
       ;; or "-"
-      (let ((tags (mapcar '(lambda (str)
-                            (if (not (string-match "^[+-]" str))
-                                (concat "+" str)
-                              str))
+      (let ((tags (mapcar (lambda (str)
+                           (if (not (string-match "^[+-]" str))
+                               (concat "+" str)
+                             str))
                          notmuch-message-replied-tags)))
        (apply 'notmuch-tag (concat "id:" (car (car rep))) tags)))))
 
index 63b01e53961faa4620f24a3f748e3c6ffa7267bc..98db8f22e2e0333d02d72afcc98afb79f48cd9b8 100644 (file)
@@ -265,12 +265,12 @@ message at DEPTH in the current thread."
 (defun notmuch-show-insert-headers (headers)
   "Insert the headers of the current message."
   (let ((start (point)))
-    (mapc '(lambda (header)
-            (let* ((header-symbol (intern (concat ":" header)))
-                   (header-value (plist-get headers header-symbol)))
-              (if (and header-value
-                       (not (string-equal "" header-value)))
-                  (notmuch-show-insert-header header header-value))))
+    (mapc (lambda (header)
+           (let* ((header-symbol (intern (concat ":" header)))
+                  (header-value (plist-get headers header-symbol)))
+             (if (and header-value
+                      (not (string-equal "" header-value)))
+                 (notmuch-show-insert-header header header-value))))
          notmuch-message-headers)
     (save-excursion
       (save-restriction
@@ -344,7 +344,7 @@ current buffer, if possible."
     ))
 
 (defun notmuch-show-multipart/*-to-list (part)
-  (mapcar '(lambda (inner-part) (plist-get inner-part :content-type))
+  (mapcar (lambda (inner-part) (plist-get inner-part :content-type))
          (plist-get part :content)))
 
 (defun notmuch-show-multipart/alternative-choose (types)
@@ -657,7 +657,7 @@ current buffer, if possible."
 
 (defun notmuch-show-insert-body (msg body depth)
   "Insert the body BODY at depth DEPTH in the current thread."
-  (mapc '(lambda (part) (notmuch-show-insert-bodypart msg part depth)) body))
+  (mapc (lambda (part) (notmuch-show-insert-bodypart msg part depth)) body))
 
 (defun notmuch-show-make-symbol (type)
   (make-symbol (concat "notmuch-show-" type)))
@@ -775,11 +775,11 @@ current buffer, if possible."
 
 (defun notmuch-show-insert-thread (thread depth)
   "Insert the thread THREAD at depth DEPTH in the current forest."
-  (mapc '(lambda (tree) (notmuch-show-insert-tree tree depth)) thread))
+  (mapc (lambda (tree) (notmuch-show-insert-tree tree depth)) thread))
 
 (defun notmuch-show-insert-forest (forest)
   "Insert the forest of threads FOREST."
-  (mapc '(lambda (thread) (notmuch-show-insert-thread thread 0)) forest))
+  (mapc (lambda (thread) (notmuch-show-insert-thread thread 0)) forest))
 
 (defvar notmuch-show-thread-id nil)
 (make-variable-buffer-local 'notmuch-show-thread-id)
index 982b7d3ff7a2f713eec3f99e02860d5f9b0a741b..270f9833bd0e437a527255de73a5eaf03d445153 100644 (file)
@@ -662,16 +662,16 @@ foreground and blue background."
   ;; Create the overlay only if the message has tags which match one
   ;; of those specified in `notmuch-search-line-faces'.
   (let (overlay)
-    (mapc '(lambda (elem)
-            (let ((tag (car elem))
-                  (attributes (cdr elem)))
-              (when (member tag line-tag-list)
-                (when (not overlay)
-                  (setq overlay (make-overlay start end)))
-                ;; Merge the specified properties with any already
-                ;; applied from an earlier match.
-                (overlay-put overlay 'face
-                             (append (overlay-get overlay 'face) attributes)))))
+    (mapc (lambda (elem)
+           (let ((tag (car elem))
+                 (attributes (cdr elem)))
+             (when (member tag line-tag-list)
+               (when (not overlay)
+                 (setq overlay (make-overlay start end)))
+               ;; Merge the specified properties with any already
+               ;; applied from an earlier match.
+               (overlay-put overlay 'face
+                            (append (overlay-get overlay 'face) attributes)))))
          notmuch-search-line-faces)))
 
 (defun notmuch-search-author-propertize (authors)