diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2017-08-27 13:24:57 +0100 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2017-08-27 13:24:57 +0100 |
| commit | ab93fa3e23ce3bc58ec1ffaaede3efc4faa7721f (patch) | |
| tree | 112b784948c5cae1b2cb69c8b1115981a3c80919 | |
| parent | b59ce5c64010b85a32e293c12bd7bdff6874d720 (diff) | |
Return a definition path even if we don't have a position
| -rw-r--r-- | helpful.el | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -323,8 +323,9 @@ If the source code cannot be found, return the sexp used." (defun helpful--source-path (sym callable-p) "Return the path where SYM is defined." - (-when-let ((buf . pos) (helpful--definition sym callable-p)) - (buffer-file-name buf))) + (-let [(buf . _) (helpful--definition sym callable-p)] + (when buf + (buffer-file-name buf)))) (defun helpful--source-pos (sym callable-p) "Return the file position where SYM is defined." |
