From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 258F3431E64 for ; Sun, 29 Jan 2012 23:06:03 -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 WC39kNYQcPrx for ; Sun, 29 Jan 2012 23:06:02 -0800 (PST) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6376D431FBC for ; Sun, 29 Jan 2012 23:06:02 -0800 (PST) Received: by werb10 with SMTP id b10so3515617wer.26 for ; Sun, 29 Jan 2012 23:05:59 -0800 (PST) Received: by 10.216.133.213 with SMTP id q63mr6561687wei.49.1327907159720; Sun, 29 Jan 2012 23:05:59 -0800 (PST) Received: from localhost ([109.131.39.11]) by mx.google.com with ESMTPS id l6sm28020098wiv.11.2012.01.29.23.05.58 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 29 Jan 2012 23:05:58 -0800 (PST) From: Pieter Praet To: David Bremner , David Edmondson , Jani Nikula Subject: Re: [PATCH] emacs: globally replace non-branching "(if COND (progn ..." with "(when ..." In-Reply-To: <87y5ssxam7.fsf@zancas.localnet> References: <87k44uprvy.fsf@praet.org> <1326532638-22068-1-git-send-email-pieter@praet.org> <87y5ssxam7.fsf@zancas.localnet> User-Agent: Notmuch/0.11+132~ga81001f (http://notmuchmail.org) Emacs/23.3.1 (x86_64-unknown-linux-gnu) Date: Mon, 30 Jan 2012 08:03:59 +0100 Message-ID: <8739ax7jts.fsf@praet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Notmuch Mail 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: Mon, 30 Jan 2012 07:06:03 -0000 On Sat, 28 Jan 2012 08:41:36 -0400, David Bremner wrote: > On Sat, 14 Jan 2012 10:17:18 +0100, Pieter Praet wrote: > > Less code, same results, without sacrificing readability. > > > > This looks OK, although the re-indenting makes these kind of changes > painful to review (not that I'm suggesting we should re-indent, just > some random complaining). > You can use `diff-refine-hunk' to see what the actual changes are. Try this: #+begin_src emacs-lisp (global-set-key (kbd "C-c /") (lambda() "Refine display of unified diff hunks" (interactive) (save-excursion (goto-char (point-min)) (while (re-search-forward diff-hunk-header-re-unified nil t) (diff-refine-hunk))))) #+end_src Work pretty much *anywhere*. Note: it does NOT work in `notmuch-show-mode' (not even with `notmuch-wash-convert-inline-patch-to-part' disabled), but this is easily solved by first running `notmuch-show-view-raw-message' ("V") and `diff-mode' (to fontify the buffer)... > d > > Peace -- Pieter