X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/9b6931c8eb467c55783d444b2f96b9ecf9e68b17..23a624ca1d40fa9cefd7229ac6152b79278a6517:/packages/names/names-dev.el diff --git a/packages/names/names-dev.el b/packages/names/names-dev.el index 5457f7279..013360427 100644 --- a/packages/names/names-dev.el +++ b/packages/names/names-dev.el @@ -118,12 +118,7 @@ If KILL is non-nil, kill the temp buffer afterwards." command)) (entire-namespace (save-excursion - (when (progn - (end-of-defun) - (beginning-of-defun) - (ignore-errors - (backward-up-list) - (names--looking-at-namespace))) + (when (names--top-of-namespace) (cdr (read (current-buffer)))))) b keylist spec name expanded-form) @@ -156,6 +151,14 @@ If KILL is non-nil, kill the temp buffer afterwards." (when (and ,kill (buffer-live-p b)) (kill-buffer b)))))) +(defun names--top-of-namespace () + "" + (progn + (beginning-of-defun) + (ignore-errors + (backward-up-list) + (names--looking-at-namespace)))) + (defun names-eval-defun (edebug-it) "Identical to `eval-defun', except it works for forms inside namespaces. Argument EDEBUG-IT is the same as `eval-defun', causes the form @@ -208,9 +211,7 @@ Argument EVAL-LAST-SEXP-ARG-INTERNAL is the same as `eval-print-last-sexp'." (defalias 'find-function-read 'names--find-function-read) (defun names--find-function-read (&optional type) - "Identical to `eval-print-last-sexp', except it works for forms inside namespaces. -Argument EVAL-LAST-SEXP-ARG-INTERNAL is the same as `eval-print-last-sexp'." - (interactive "P") + "Identical to `find-function-read', except it works inside namespaces." (let ((buf (current-buffer))) (names--wrapped-in-namespace (names--find-function-read-original type) nil t