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

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

RE: Minor bug in help+ libraries


From: Drew Adams
Subject: RE: Minor bug in help+ libraries
Date: Wed, 7 Sep 2011 06:48:50 -0700

> I think I found a small bug in the help+ libraries. When in a lisp
> buffer the point is on a variable or function, hitting C-h f or C-h v
> doesn't show the default choice is the function/variable at point.
> However hitting RET without entering any text takes you to the correct
> documentation.

Yes, it's actually a feature, not a bug. :-)
Use `M-n' if you need to see the default value.

If you really want to see the default value in the prompt, then do surgery on
the definitions of `describe-function' and `describe-variable', to replace the
prompts in their calls to `completing-read'.  Just compare the `completing-read'
calls in `help-fns.el' (vanilla) and `help-fns+.el':

vanilla (what you like):
(if fn
    (format "Describe function (default %s): " fn)
  "Describe function: ")

+ (what I like):
(if current-prefix-arg
    "Describe command: "
  "Describe function: ")

You would replace each of those prompt strings by a conditional such as the one
in help-fns.el.

---

[FWIW, I use Icicles, which lets the _user_ decide whether to put the default
value in the prompt.  That's one reason I do not hard-code it into prompts.

Option `icicle-default-value':
  nil               - Do not insert default value or add it to prompt.
  t                 - Add default value to prompt.  Do not insert it.
  `insert-start'    - Insert default value and leave cursor at start.
  `insert-end'      - Insert default value and leave cursor at end.
  `preselect-start' - Insert and preselect default value;
                      leave cursor at beginning.
  `preselect-end'   - Insert and preselect default value;
                      leave cursor at end.

The default value is `t', which gives the behavior you like.  Personally, I use
the value `insert-end'.]




reply via email to

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