From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.bugs Subject: Re: RMAIL, summary/message focus switching with `h' button Date: 12 Feb 2003 19:01:54 -0500 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <200302122113.h1CLDEVI000599@oak.pohoyda.family> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1045094918 1305 80.91.224.249 (13 Feb 2003 00:08:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 13 Feb 2003 00:08:38 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18j6tO-0000Bm-00 for ; Thu, 13 Feb 2003 01:06:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18j6ub-00020a-00 for gnu-bug-gnu-emacs@m.gmane.org; Wed, 12 Feb 2003 19:07:33 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18j6ql-0001I4-00 for bug-gnu-emacs@gnu.org; Wed, 12 Feb 2003 19:03:35 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18j6qJ-0000wS-00 for bug-gnu-emacs@gnu.org; Wed, 12 Feb 2003 19:03:08 -0500 Original-Received: from colo.agora-net.com ([207.245.84.69]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18j6pE-0000dB-00 for bug-gnu-emacs@gnu.org; Wed, 12 Feb 2003 19:02:00 -0500 Original-Received: from ttn by colo.agora-net.com with local (Exim 3.34 #1) id 18j6p8-0001vZ-00; Wed, 12 Feb 2003 19:01:54 -0500 Original-To: Alexander Pohoyda In-Reply-To: Alexander Pohoyda's message of "Wed, 12 Feb 2003 22:13:14 +0100 (CET)" Original-Lines: 21 X-Mailer: Gnus v5.7/Emacs 20.7 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4444 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4444 Alexander Pohoyda writes: + (let (was-in-summary) + (if (eq major-mode 'rmail-summary-mode) + (setq was-in-summary t)) + (rmail-new-summary "All" '(rmail-summary) nil) + ;; Swap the focus. + (if was-in-summary + (other-window 1)))) a minor style nit, that does not address the suitability of the patch: you can tighten the binding construct to something like: (let ((was-in-summary (eq major-mode 'rmail-summary-mode))) ...) this is because `eq' is a predicate and `was-in-summary' is used as a predicate var. also, in the combined form `setq' is unnecessary. thi