help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some way to have cursor focus on help windows automatically?


From: William Xu
Subject: Re: Some way to have cursor focus on help windows automatically?
Date: Fri, 19 Oct 2007 22:33:43 +0900
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (darwin)

address@hidden 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]