all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>,
	"'Kelly Dean'" <kellydeanch@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: RE: [PATCH] Unify fn and var help to make learning elisp a littleeasier
Date: Fri, 7 Dec 2012 11:32:02 -0800	[thread overview]
Message-ID: <2DB7099A0FD045F380861FCBD7FC00BD@us.oracle.com> (raw)
In-Reply-To: <jwvk3stg0tr.fsf-monnier+emacs@gnu.org>

> I'm not completely sure we want to use "C-h o" for its
>  binding, tho I don't see any obvious reasons not to.

FWIW, I bind `C-h o' to `describe-option' (in help-fns+.el):

(defun describe-option (variable &optional buffer)
  "Describe an Emacs user variable (option).
Same as using a prefix arg with `describe-variable'."
  (interactive
   (let ((symb  (or (and (fboundp 'symbol-nearest-point)
                         (symbol-nearest-point))
                    (and (symbolp (variable-at-point))
                         (variable-at-point))))
         (enable-recursive-minibuffers  t))
     (list (intern
            (completing-read
             "Describe user option: "
             obarray 'user-variable-p t nil nil
             (and symb  (symbol-name symb)) t)))))
  (describe-variable variable buffer t))

FWIW2, I also have a command `describe-option-of-type', which I bind
to `C-h C-o':

,----
| describe-option-of-type is an interactive compiled Lisp function in
| `help-fns+.el'.
| 
| It is bound to help C-o, menu-bar help-menu describe
| describe-option-of-type.
| 
| (describe-option-of-type TYPE OPTION)
| 
| Describe an Emacs user OPTION (variable) of a given `defcustom' TYPE.
| A prefix argument determines the type-checking behavior:
|  - None:         OPTION is defined with TYPE or a subtype of TYPE.
|  - Plain `C-u':  OPTION is defined with TYPE or a subtype of TYPE,
|                  or its current value is compatible with TYPE.
|  - Negative:     OPTION is defined with TYPE (exact match).
|  - Non-negative: OPTION is defined with TYPE (exact match),
|                  or its current value is compatible with TYPE.
| 
| If TYPE is nil (default value) then *all* `defcustom' variables are
| potential candidates.  That is different from using `describe-option',
| because `describe-option' includes user-variable candidates not
| defined with `defcustom' (with `*'-prefixed doc strings).
`----




      reply	other threads:[~2012-12-07 19:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06 18:59 [PATCH] Unify fn and var help to make learning elisp a little easier Kelly Dean
2012-12-07  2:09 ` Stefan Monnier
2012-12-07 18:12   ` Kelly Dean
2012-12-07 18:30     ` chad
2012-12-07 18:50     ` Stefan Monnier
2012-12-07 19:32       ` Drew Adams [this message]

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

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

  git send-email \
    --in-reply-to=2DB7099A0FD045F380861FCBD7FC00BD@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=kellydeanch@yahoo.com \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.