diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2019-02-27 09:54:47 +0000 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2019-02-27 09:54:47 +0000 |
| commit | 5058dda83c22b490120977368edd3ac64d463bc9 (patch) | |
| tree | f61143c7f74be0fcc5daa1236259d4e15745e8a7 /test | |
| parent | 4cf4381aca731db2f9473cc39c64413ddedcde63 (diff) | |
Better source detection for functions defined by macros
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.
Diffstat (limited to 'test')
| -rw-r--r-- | test/helpful-unit-test.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/helpful-unit-test.el b/test/helpful-unit-test.el index 756bc76..541639c 100644 --- a/test/helpful-unit-test.el +++ b/test/helpful-unit-test.el @@ -352,6 +352,13 @@ variables defined without `defvar'." (-let [(buf pos opened) (helpful--definition 'test-foo-edebug-defn t)] (should buf)))))) +(ert-deftest helpful--definition-defstruct () + "Ensure we find the position of struct functions." + (-let [(buf pos _) + (helpful--definition #'make-ert-test t)] + (should buf) + (should pos))) + (ert-deftest helpful-variable () "Smoke test for `helpful-variable'." (helpful-variable 'tab-width)) |
