unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: William Xu <william.xwl@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Some way to have cursor focus on help windows automatically?
Date: Fri, 19 Oct 2007 22:33:43 +0900	[thread overview]
Message-ID: <m21wbrteiw.fsf@gmail.com> (raw)
In-Reply-To: 1192754215.200986.134870@i13g2000prf.googlegroups.com

Philip@kime.org.uk writes:

> When I do C-h <whatever> 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

  parent reply	other threads:[~2007-10-19 13:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-19  0:36 Some way to have cursor focus on help windows automatically? Philip
2007-10-19 13:00 ` Juanma Barranquero
2007-10-19 13:30   ` William Xu
2007-10-19 13:42     ` Juanma Barranquero
2007-10-19 14:06       ` William Xu
2007-10-19 14:12         ` Juanma Barranquero
2007-10-19 14:29           ` William Xu
2007-10-19 14:36             ` Juanma Barranquero
2007-10-20 22:00   ` Allan Gottlieb
2007-10-19 13:33 ` William Xu [this message]
2007-10-19 18:43 ` Andrew Walrond
     [not found] ` <mailman.2295.1192798813.18990.help-gnu-emacs@gnu.org>
2007-10-19 22:45   ` Philip

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m21wbrteiw.fsf@gmail.com \
    --to=william.xwl@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).