emacs-devel
[Top][All Lists]
Advanced

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

Re: major mode in new buffers


From: Juri Linkov
Subject: Re: major mode in new buffers
Date: Fri, 02 Apr 2010 19:04:19 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

> With your patch applied, do this:
>
>   emacs -Q -l ehelp --eval '(global-set-key [?\C-h] 'ehelp-command)'
>   C-h f car <RET> r    ;; now the *help* buffer is help-mode
>   <RET>    ==>  "End of buffer.  Type q to quit viewing"
>
> so after restoring the previous major mode, *Help* is in help-mode but
> the bindings are not OK.

The direct call to `help-mode' can't set Help mode correctly.
This should be done by calling `with-help-window' that uses
`with-output-to-temp-buffer' that calls `help-mode-setup'
as one of its hooks in `temp-buffer-setup-hook'.

But at least, after the direct call to `help-mode', RET works correctly
on links (due to its text property's local keymap).  This is most
important.  It's not a big problem when typing RET outside a link
says "End of buffer." instead of "No cross-reference here".

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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