| Age | Commit message (Collapse) | Author |
|
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.
|
|
See discussion in #49
|
|
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.
|
|
In a large function, 1 second isn't always enough to spot the
reference.
|
|
This is another change stemming from Remacs.
|
|
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
|
|
|
|
|
|
|
|
For aliases, we're trying to show the alias definition, not the
underlying function/variable definition.
Closes #168
|
|
0.15 was quickly released due to a nasty crash.
|
|
As of 1d2954b we pretty-print keymaps and hooks by default, but this
broke display of variables of other types. Fix that.
|
|
|
|
|
|
This is often more useful, especially for hooks.
See #160
|
|
This makes it possible to show variables defined in Rust in Remacs.
In general I don't like the idea of modifying Elisp to accomodate
Remacs, but in this case it seems to be necessary because the "c" is
hardcoded. An alternative approach would be to check whether the file
is an Elisp file, but that would require exhaustively enumerating
possibilities: .el, .el.gz, .elc, and maybe more that I don't know
about. This way seems easier, if less elegant.
|
|
Fixes #159
|
|
Previously TAB just did nothing, which was less useful.
|
|
Add support for named keyboard macros
|
|
|
|
Otherwise, users can't run eval-buffer without clobbering their
personal keybindings.
See discussion in https://github.com/Wilfred/elisp-refs/pull/20 .
|
|
Fixes #158
|
|
|
|
|
|
I forgot to do this for the callee-sorting.
|
|
|
|
|
|
Sort callees
|
|
Move helpful--sort-symbols into this function because it is faster to
sort sublists separately than to sort the whole list at once (right?).
|
|
Addresses #150 (at least partially)
|
|
|
|
|
|
|
|
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.
|
|
|
|
|