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 454A2431FD0 for ; Sat, 17 Dec 2011 15:50:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 eFdFuVYk-6T5 for ; Sat, 17 Dec 2011 15:50:22 -0800 (PST) Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU [18.9.25.12]) by olra.theworths.org (Postfix) with ESMTP id 37FF6431FB6 for ; Sat, 17 Dec 2011 15:50:22 -0800 (PST) X-AuditID: 1209190c-b7fad6d000000920-45-4eed2abc4c5b Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id FF.D4.02336.CBA2DEE4; Sat, 17 Dec 2011 18:50:20 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id pBHNoJh3021647; Sat, 17 Dec 2011 18:50:20 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pBHNoHj6002293 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sat, 17 Dec 2011 18:50:18 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1Rc42S-0007IV-QC; Sat, 17 Dec 2011 18:51:36 -0500 Date: Sat, 17 Dec 2011 18:51:36 -0500 From: Austin Clements To: Aaron Ecay Subject: Re: [PATCH] [emacs] Don't quote lambda forms Message-ID: <20111217235136.GJ19427@mit.edu> References: <1324136868-6662-1-git-send-email-aaronecay@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1324136868-6662-1-git-send-email-aaronecay@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IRYrdT192j9dbPoGs5u8W05V/YLa7fnMns wOSxc9Zddo9nq24xBzBFcdmkpOZklqUW6dslcGW8e/2HseBCSMX5o9wNjI/tuhg5OSQETCSe 9T1hgbDFJC7cW8/WxcjFISSwj1Hi3oNfLBDOBkaJf/u3s4JUCQmcZJI4Pk0MIrGEUWLD9q9g 7SwCqhKHrz8FK2IT0JDYtn85I4gtIqAiMXvefDCbWUBa4tvvZiYQW1jAVOLWz79g9bwCOhK7 nuyBWuAkcX76RBaIuKDEyZkQ5zELaEnc+PcSqJcDbM7yfxwgYU4BZ4l1u3+BjRQFWjXl5Da2 CYxCs5B0z0LSPQuhewEj8ypG2ZTcKt3cxMyc4tRk3eLkxLy81CJdQ73czBK91JTSTYygoOaU 5NnB+Oag0iFGAQ5GJR7ezOrXfkKsiWXFlbmHGCU5mJREees03voJ8SXlp1RmJBZnxBeV5qQW H2KU4GBWEuFVC3/jJ8SbklhZlVqUD5OS5mBREuet3vXQT0ggPbEkNTs1tSC1CCYrw8GhJMFr AIxeIcGi1PTUirTMnBKENBMHJ8hwHqDhKiA1vMUFibnFmekQ+VOMilLivP80gRICIImM0jy4 XljSecUoDvSKMMQKHmDCgut+BTSYCWhwXyDI1cUliQgpqQbGJSt0568XT3ZZ1yrE91TvY/nd /54y+3fw1l06ziPiY6o4dbnT0l0Krj8Cw/zlT+/huOa644WJUl3QjcojKcl+S+2mzhUqOvA7 /JZXlL/t50lXrk4RMCh4HagldWuzwszMaxvvxfwy+hZaMOeClMGm46fPJ+82cI4s5/4wp0lA p4zf2X52wJu3SizFGYmGWsxFxYkAimY4OBUDAAA= Cc: notmuch@notmuchmail.org 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: Sat, 17 Dec 2011 23:50:24 -0000 LGTM. Too bad it requires so much re-indenting, but such is the nature of Lisp. Quoth Aaron Ecay on Dec 17 at 10:47 am: > 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 | 4 +- > emacs/notmuch-hello.el | 64 +++++++++++++++++++++--------------------- > emacs/notmuch-maildir-fcc.el | 12 ++++---- > emacs/notmuch-message.el | 8 ++-- > emacs/notmuch-show.el | 20 ++++++------ > emacs/notmuch.el | 20 ++++++------ > 6 files changed, 64 insertions(+), 64 deletions(-) > > diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el > index 44fccae..8974af1 100644 > --- a/emacs/notmuch-crypto.el > +++ b/emacs/notmuch-crypto.el > @@ -63,7 +63,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.") > > @@ -72,7 +72,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)))) > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el > index 0582cae..d0dcf97 100644 > --- a/emacs/notmuch-hello.el > +++ b/emacs/notmuch-hello.el > @@ -331,8 +331,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) > @@ -502,36 +502,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))) > > diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el > index e678868..6fbf82d 100644 > --- a/emacs/notmuch-maildir-fcc.el > +++ b/emacs/notmuch-maildir-fcc.el > @@ -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)) > diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el > index aefd3fb..08e5b17 100644 > --- a/emacs/notmuch-message.el > +++ b/emacs/notmuch-message.el > @@ -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))))) > > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el > index d7fbbca..bbad094 100644 > --- a/emacs/notmuch-show.el > +++ b/emacs/notmuch-show.el > @@ -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) > @@ -667,7 +667,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))) > @@ -785,11 +785,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) > diff --git a/emacs/notmuch.el b/emacs/notmuch.el > index 8936149..6bf4a08 100644 > --- a/emacs/notmuch.el > +++ b/emacs/notmuch.el > @@ -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)