[slime-cvs] CVS slime
CVS User sboukarev
sboukarev at common-lisp.net
Fri Nov 23 15:32:13 UTC 2012
Update of /project/slime/cvsroot/slime
In directory tiger.common-lisp.net:/tmp/cvs-serv7885
Modified Files:
ChangeLog slime.el
Log Message:
* slime.el (slime-edit-definition): Don't ask the user for a name
to search if it's missing before running
slime-edit-definition-hooks, the hooks might search for name in a
different manner (for example, presentations).
--- /project/slime/cvsroot/slime/ChangeLog 2012/11/13 15:44:39 1.2369
+++ /project/slime/cvsroot/slime/ChangeLog 2012/11/23 15:32:12 1.2370
@@ -1,3 +1,8 @@
+2012-11-23 Stas Boukarev <stassats at gmail.com>
+
+ * slime.el (slime-edit-definition): Don't ask the user for a name
+ to search if it's missing before running slime-edit-definition-hooks
+
2012-11-13 Francois-Rene Rideau <tunes at google.com>
* swank.lisp (*compile-file-for-emacs-hook*): A hook for
--- /project/slime/cvsroot/slime/slime.el 2012/11/11 09:31:07 1.1422
+++ /project/slime/cvsroot/slime/slime.el 2012/11/23 15:32:13 1.1423
@@ -3909,15 +3909,27 @@
;;; `slime-edit-definition'.
(defvar slime-edit-definition-hooks)
-(defun slime-edit-definition (name &optional where)
+(defun slime-edit-definition (&optional name where)
"Lookup the definition of the name at point.
If there's no name at point, or a prefix argument is given, then the
function name is prompted."
- (interactive (list (slime-read-symbol-name "Edit Definition of: ")))
- (or (run-hook-with-args-until-success 'slime-edit-definition-hooks
- name where)
- (slime-edit-definition-cont (slime-find-definitions name)
- name where)))
+ (interactive)
+ (let ((name (cond ((not (called-interactively-p))
+ name)
+ (current-prefix-arg
+ (slime-read-symbol-name "Edit Definition of: "))
+ (t
+ (slime-symbol-at-point)))))
+ ;; The hooks might search for a name in a different manner, so don't
+ ;; ask the user if it's missing before the hooks are run
+ (or (run-hook-with-args-until-success 'slime-edit-definition-hooks
+ name where)
+ (let ((name (or name
+ (if (called-interactively-p)
+ (slime-read-symbol-name "Edit Definition of: ")
+ name))))
+ (slime-edit-definition-cont (slime-find-definitions name)
+ name where)))))
(defun slime-edit-definition-cont (xrefs name where)
(destructuring-bind (1loc file-alist) (slime-analyze-xrefs xrefs)
More information about the slime-cvs
mailing list