| Age | Commit message (Collapse) | Author |
|
Change "helful" to "helpful"
|
|
Emacs 30.x added interpreted-function which is different from
byte-code-function, and hence helpful--signature will try to treat it
like a lambda which will fail with
,----
| (wrong-type-argument listp #[(x) (x) (t) nil "Foo"])
`----
This patch adds tests for such case using interpreted-function-p when
it's available.
|
|
|
|
When `package-version' is not what we expect (e.g a simple string), a `listp`
error is thrown and you are unable to view the variable documentation due to it.
This now handles it and provides a fallback value.
|
|
|
|
|
|
|
|
Fixes #326
|
|
|
|
|
|
User options are variables declared with defcustom. It is useful to
know if a variable is a user option or not, because if it isn't, it's
usually not safe to set it in the init file.
Calling user options "customizable variables" makes it clear that a
user option is still a variable. This is kind of like how interactive
functions are not referred to as "commands" in the summary.
|
|
Uses the native `describe-face`, possible to switch to a `helpful-face`
command if implemented in the future.
|
|
Uses read-char-choice for selecting between callable (press "c") and
variable (press "v") when the symbol is ambiguous, eg.
`buffer-file-name'.
Less mental effort required than parsing a y-or-n-p prompt and answering
in the negative to "show variable?" to show help for a function.
|
|
I accidentally released 0.20 on an older checkout, so 0.21 has been
released today too.
|
|
Fixes #327
|
|
Prior to this commit, setting attribute :extend of the face
helpful--heading to t did not take any effect. This is fixed by this
commit by propertizing the newline right after the heading as well.
|
|
|
|
|
|
|
|
Closes #38
|
|
This use has been made obsolete since Emacs 29.
|
|
This, for example, skips an unnecessary "show variable?" for local
minor mode variables.
Whereas recentf-mode (global) says:
> Non-nil if Recentf mode is enabled.
>
> See the recentf-mode command
> for a description of this minor mode.
, whitespace-mode (local) says:
> Non-nil if Whitespace mode is enabled.
>
> Use the command whitespace-mode to change this variable.
. This change catches the latter case.
|
|
Closes #287
|
|
This can be slow, even with major mode hooks disabled. Minor mode
hooks may do non-trivial amounts of work.
Instead, just set the syntax table, so we can search the buffer for
definitions accurately.
Fixes #287
|
|
|
|
Fixes #301
|
|
|
|
This displays the help topic in `M-x list-buffers` instead of showing an
empty path column.
|
|
`helpful--signature': unquote \=, as added by `help--quote-signature'.
An example where this is needed is `\(setf\ seq-first\)'.
|
|
In Emacs 28, subrp is t for a native-compiled function; to check
whether a function is a primitive, there is a new function
subr-primitive-p.
Previously, unadvised functions have an extra check that does the same
thing as subr-primitive-p, but that was not applied to advised
functions. This applies it to both.
|
|
|
|
Emacs 28 added shortdoc.el and added many builtin functions into
shortdoc groups accessed through the help buffer. For example, this is
the help buffer for `mapcar`:
Apply FUNCTION to each element of SEQUENCE, and make a list of the results.
The result is a list just as long as SEQUENCE.
SEQUENCE may be a list, a vector, a bool-vector, or a string.
Other relevant functions are documented in the vector, list and
string groups.
Probably introduced at or before Emacs version 1.4.
This commit adds the same line into Helpful so it looks like this:
Signature
(mapcar FUNCTION SEQUENCE)
Documentation
Apply FUNCTION to each element of SEQUENCE, and make a list of the results.
The result is a list just as long as SEQUENCE.
SEQUENCE may be a list, a vector, a bool-vector, or a string.
Other relevant functions are documented in the vector, list and string groups.
View in manual
|
|
Fix `helpful--autoloaded-p` in Emacs 29.0.50
|
|
Calls `helpful-update` in the help buffer before switching to it with
`helpful-switch-buffer-function`. Currently, this is done in the
opposite order.
Switching to an empty buffer prevents window resize logic from working
properly. For example, it makes the window too small when the
`window-height` action alist key is set to
`#'shrink-window-if-larger-than-buffer` or `#'fit-window-to-buffer` in
`display-buffer-alist`.
|
|
argdesc in byte-code function objects may be an integer rather than a
list, so handle that case gracefully.
|
|
|
|
Spotted when debugging #278.
|
|
Fixes #279
|
|
With the introduction of native compilation, this change makes the
distinction between it and byte-compilation clearer.
https://akrl.sdf.org/gccemacs.html
|
|
How to reproduce from emacs -Q in the *scratch* buffer:
0. If needed, do `(package-initialize)` and `(require 'helpful)`.
1. Type `(something some-undefined-variable|` where | represents
point. (Note that there is no closing parenthesis!)
2. Call helpful-variable.
This will give you an `End of file during parsing` from
`helpful--variable-defined-at-point` because the sexp at point can't
be read due to the missing parenthesis. This commit suppresses the
error
Fix #251
Close #254
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #179.
Fixes #191.
|
|
|
|
|
|
Fixes #163
Closes #245
Particular thanks to @matzebond for the first implementation of this
feature!
|
|
|