[slime-cvs] CVS slime
CVS User heller
heller at common-lisp.net
Fri Nov 2 08:14:16 UTC 2012
Update of /project/slime/cvsroot/slime
In directory tiger.common-lisp.net:/tmp/cvs-serv22007
Modified Files:
ChangeLog slime.el
Log Message:
* slime.el ([test] find-definition): Test defstruct and defvar.
([test] find-definition.3): New.
--- /project/slime/cvsroot/slime/ChangeLog 2012/10/30 18:38:33 1.2359
+++ /project/slime/cvsroot/slime/ChangeLog 2012/11/02 08:14:16 1.2360
@@ -1,3 +1,8 @@
+2012-11-02 Helmut Eller <heller at common-lisp.net>
+
+ * slime.el ([test] find-definition): Test defstruct and defvar.
+ ([test] find-definition.3): New.
+
2012-10-30 Helmut Eller <heller at common-lisp.net>
* swank-cmucl.lisp (dd-location): Use info db as fallback.
--- /project/slime/cvsroot/slime/slime.el 2012/10/27 17:53:39 1.1418
+++ /project/slime/cvsroot/slime/slime.el 2012/11/02 08:14:16 1.1419
@@ -7878,7 +7878,10 @@
"Find the definition of a function or macro in swank.lisp."
'(("start-server" "SWANK" "(defun start-server ")
("swank::start-server" "CL-USER" "(defun start-server ")
- ("swank:start-server" "CL-USER" "(defun start-server "))
+ ("swank:start-server" "CL-USER" "(defun start-server ")
+ ("swank::connection" "CL-USER" "(defstruct (connection")
+ ("swank::*emacs-connection*" "CL-USER" "(defvar \\*emacs-connection\\*")
+ )
(switch-to-buffer "*scratch*") ; not buffer of definition
(slime-check-top-level)
(let ((orig-buffer (current-buffer))
@@ -7928,6 +7931,35 @@
(slime-check "Definition now at point." (looking-at snippet)))
)))
+(def-slime-test (find-definition.3)
+ (name source regexp)
+ "Extra tests for defstruct."
+ '(("swank::foo-struct"
+ "(progn
+ (defun foo-fun ())
+ (defstruct foo-struct (:constructor nil) (:predicate nil))
+)"
+ "(defstruct foo-struct"))
+ (switch-to-buffer "*scratch*")
+ (with-temp-buffer
+ (insert source)
+ (let ((slime-buffer-package "SWANK"))
+ (slime-eval
+ `(swank:compile-string-for-emacs
+ ,source
+ ,(buffer-name)
+ '((:position 0) (:line 1 1))
+ ,nil
+ ,nil)))
+ (let ((temp-buffer (current-buffer)))
+ (with-current-buffer "*scratch*"
+ (slime-edit-definition name)
+ (slime-check ("Definition of %S is in buffer `%s'."
+ name temp-buffer)
+ (eq (current-buffer) temp-buffer))
+ (slime-check "Definition now at point." (looking-at regexp)))
+ )))
+
(def-slime-test complete-symbol
(prefix expected-completions)
"Find the completions of a symbol-name prefix."
More information about the slime-cvs
mailing list