From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Xu Newsgroups: gmane.emacs.help Subject: Re: Some way to have cursor focus on help windows automatically? Date: Fri, 19 Oct 2007 22:33:43 +0900 Organization: the Church of Emacs Message-ID: References: <1192754215.200986.134870@i13g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1192801018 20395 80.91.229.12 (19 Oct 2007 13:36:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Oct 2007 13:36:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 19 15:36:58 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iis1v-0000ru-CD for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Oct 2007 15:36:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iis1n-0004FX-Rc for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Oct 2007 09:36:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iis0w-0003vA-PC for help-gnu-emacs@gnu.org; Fri, 19 Oct 2007 09:35:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iis0u-0003uW-4c for help-gnu-emacs@gnu.org; Fri, 19 Oct 2007 09:35:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iis0t-0003uT-W2 for help-gnu-emacs@gnu.org; Fri, 19 Oct 2007 09:35:44 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Iis0t-0002u1-DB for help-gnu-emacs@gnu.org; Fri, 19 Oct 2007 09:35:43 -0400 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Iis0E-00075Y-82 for help-gnu-emacs@gnu.org; Fri, 19 Oct 2007 13:35:02 +0000 Original-Received: from khp059140005246.ppp-bb.dion.ne.jp ([59.140.5.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Oct 2007 13:35:02 +0000 Original-Received: from william.xwl by khp059140005246.ppp-bb.dion.ne.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Oct 2007 13:35:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: khp059140005246.ppp-bb.dion.ne.jp User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (darwin) Cancel-Lock: sha1:XBfRSd/m/AZ2hK0k0HMfsY2I2q0= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48561 Archived-At: Philip@kime.org.uk writes: > When I do C-h and the buffer-window splits to display the > help buffer, I want the focus to go to the help buffer so I can just > to "q" to get rid of it. So much more convenient what C-x 1 in the > original buffer. Any way to set this? I have the following in my .emacs. ;; help/doc buffers ;; ---------------- (defun xwl-jump-to-help () "Focus cusor on the help-mode buffer." (unless (eq major-mode 'help-mode) (other-window 1))) (defadvice describe-mode (after jump-to-help) (xwl-jump-to-help)) (defadvice describe-bindings (after jump-to-help) (xwl-jump-to-help)) (defadvice describe-function (after jump-to-help) (xwl-jump-to-help)) (defadvice describe-variable (after jump-to-help) (xwl-jump-to-help)) (defadvice describe-key (after jump-to-help) (xwl-jump-to-help)) (ad-activate 'describe-mode) (ad-activate 'describe-bindings) (ad-activate 'describe-function) (ad-activate 'describe-variable) (ad-activate 'describe-key) -- William http://williamxu.net9.org