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

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

Re: describe-mode "some-mode"?


From: Emanuel Berg
Subject: Re: describe-mode "some-mode"?
Date: Sun, 24 Aug 2014 03:56:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> `help-documentation' is defined in `help-fns+.el'
> (http://www.emacswiki.org/emacs-en/download/help-fns%2b.el).
> It is like the vanilla function `documentation', but
> it uses `help-substitute-command-keys' so that keys
> mentioned in the help become links to their doc.

Why isn't such a helpful feature itself vanilla?

> Using only vanilla functions:
>
> (defun my-describe-mode (mode) (interactive (list
> (intern (read-string "Mode: ")))) (with-help-window
> (help-buffer) (with-current-buffer (help-buffer)
> (insert (substitute-command-keys (documentation
> mode))))))
>
> ...
>
> (defun my-describe-mode (mode) (interactive (list
> (intern (read-string "Mode: ")))) (with-temp-buffer
> (funcall mode) (describe-mode)))

And make one of those vanilla as well!

And then - as it seems only the lowercase m is employed
by the help system, for describing the current buffer
modes:

(global-set-key "\C-hM" 'my-describe-mode)

But, for message-mode, those don't give identical
output for me with respect to the minor modes. Perhaps
Gnus enables something in a hook that is not part of
plain message-mode. So you should be careful separating
when you want to describe a mode in general, and the
mode specifically in effect for the current buffer!

my-describe-mode:

    Enabled minor modes: Abbrev Auto-Composition
    Auto-Fill Global-Font-Lock Shell-Dirtrack
    Show-Paren Transient-Mark

describe-mode:

    Enabled minor modes: Abbrev Auto-Composition
    Auto-Fill Font-Lock Global-Font-Lock
    Gnus-Message-Citation Shell-Dirtrack Show-Paren
    Transient-Mark

-- 
underground experts united


reply via email to

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