| Age | Commit message (Collapse) | Author |
|
The output of helpful--keymaps-containing changed since Emacs 30.x.
This patch adapts its test for newer Emacs versions.
|
|
|
|
|
|
|
|
Fixes #301
|
|
|
|
|
|
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
|
|
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 #225
|
|
|
|
* helpful.el (helpful--propertize-info): Follow Emacs convention for
function documentation. Consider lowercase "info" and angular
quotation marks in docstrings. Default to the Emacs manual if there's
no manual reference (ie. see the `blink-cursor-mode' variable).
* test/helpful-unit-test.el (helpful--format-docstring--info): Add new
testcases for the now covered cases.
|
|
Typos found with codespell.
|
|
Fixes #212
|
|
|
|
For example, say "ace-window is an autoloaded, interactive and
compiled function" rather than comma-separating everywhere.
Also simplify button logic and add a test for "an" in descriptions.
|
|
I don't know how these got mixed up, but they did.
|
|
Fixes #207
|
|
Fixes #199
|
|
|
|
Fixes #202
|
|
Fixes #197
|
|
This requires `foo' to be handled as part of the loop in
`helpful--format-command-keys' rather than a separate function.
Helps with #197
|
|
Helps with #197
|
|
|
|
Previously, we'd render "\\<foo-map>\n" as "\n", leading to an
unwanted blank line in the output. See `org-capture` (on MELPA) for an
example.
|
|
Fixes #117
|
|
In Emacs's C core, Lisp functions and variables take on slightly
different names: dashes are replaced with underscores, and functions
and variables are prefixed with "F" and "V" respectively. This change
allows for looking up those symbols. For example, if I am looking at
the source for `purecopy':
DEFUN ("purecopy", Fpurecopy, Spurecopy, 1, 1, 0,
doc: /* Make a copy of object OBJ in pure storage.
Recursively copies contents of vectors and cons cells.
Does not copy symbols. Copies strings without text properties. */)
(register Lisp_Object obj)
{
if (NILP (Vpurify_flag))
return obj;
else if (MARKERP (obj) || OVERLAYP (obj) || SYMBOLP (obj))
/* Can't purify those. */
return obj;
else
return purecopy (obj);
}
I can run `helpful-at-point' on `Vpurify_flag'.
This doesn't support running C-style names through `helpful-callable'
etc, but that doesn't seem like a useful feature.
|
|
Previously, we would only remove the outermost advice. This led to
`helpful--primitive-p` returning the wrong answer for primitive
functions with more than one active advice.
Fixes #185.
|
|
If we can't find the location but know the buffer, try expanding forms
in the buffer to see if we can find the relevant function.
This is largely code from elisp-def, but it wasn't in a terribly
reusable form and I've copied it.
|
|
Fixes #189
|
|
Fixes #172
|
|
This test depends on what buffers are currently open in the active
Emacs instance, so can fail when running the test suite whilst
developing.
|
|
helpful--aliases is expensive, so as usual we'll call it just once at
the beginning of helpful-update. This sacrifices a little elegance for
a significant peformance boost. Here are before and after times
running (helpful-callable #'move-beginning-of-line) 50 times on my
crappy little Thinkpad:
Before:
Elapsed time: 61.507899s (23.391894s in 148 GCs)
Elapsed time: 56.855148s (24.392109s in 133 GCs)
Elapsed time: 58.082409s (25.796263s in 146 GCs)
After:
Elapsed time: 43.519486s (17.412847s in 95 GCs)
Elapsed time: 43.171007s (17.036012s in 92 GCs)
Elapsed time: 44.725709s (18.705316s in 102 GCs)
So the time per call goes from a little over a second to a little
under a second.
|
|
This ensures the tests pass across different Emacs versions (which
might have more/less verbose information).
|
|
helpful.el (helpful--obsolete-info): new function.
(helpful--format-alias): obsolescence info code extracted.
(helpful-update): display the obsolescence info.
(helpful--format-obsolete-info): new function.
Closes #152.
|
|
beginning-of-defun just uses open-paren-in-column-0-is-defun-start,
which fooled functions like face-attribute where the docstring
contains a open paren at the start of the line.
Fixes #170
|
|
|
|
Fixes #159
|
|
|
|
We need an absolute path for opening the file, but
`find-function-search-for-symbol` expects a relative path for
primitive functions.
Using the library name allows us to avoid `find-function-C-source`,
which doesn't support Rust primitives. This should fix Remacs support.
See discussion in
https://github.com/Wilfred/remacs/pull/800
|
|
Don't bother reporting about file decompression, and use proper ERT
test skipping.
|
|
|
|
Resolves #141
|
|
The summary given by (helpful-callable 'rename-buffer) is
rename-buffer is an interactive function without a source file.
Needless to say, this is not correct. The problem stems from
helpful--primitive-p's inability to handle advised primitive
functions.
|