[slime-cvs] CVS slime
mkoeppe
mkoeppe at common-lisp.net
Sat Feb 17 18:17:23 UTC 2007
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv18307
Modified Files:
slime.el
Log Message:
(slime-find-tag-if-tags-table-visited): New function.
(slime-edit-definition-fallback-function): Offer it as a value
for customization.
--- /project/slime/cvsroot/slime/slime.el 2007/02/05 16:25:18 1.760
+++ /project/slime/cvsroot/slime/slime.el 2007/02/17 18:17:23 1.761
@@ -238,12 +238,14 @@
"Function to call when edit-definition fails to find the source itself.
The function is called with the definition name, a string, as its argument.
-If you want to fallback on TAGS you can set this to `find-tag' or
+If you want to fallback on TAGS you can set this to `find-tag',
+`slime-find-tag-if-tags-table-visited', or
`slime-edit-definition-with-etags'."
:type 'symbol
:group 'slime-mode-mode
:options '(nil
slime-edit-definition-with-etags
+ slime-find-tag-if-tags-table-visited
find-tag))
(defcustom slime-compilation-finished-hook 'slime-maybe-list-compiler-notes
@@ -6763,6 +6765,14 @@
(t
(slime-goto-definition name definitions where)))))
+(defun slime-find-tag-if-tags-table-visited (name)
+ "Find tag (in current tags table) whose name contains NAME.
+If no tags table is visited, don't offer to visit one;
+just signal that no definition is known."
+ (if tags-table-list
+ (find-tag name)
+ (error "No known definition for: %s; use M-x visit-tags-table RET" name)))
+
(defun slime-goto-definition (name definitions &optional where)
(slime-push-definition-stack)
(let ((all-locations-equal
More information about the slime-cvs
mailing list