[slime-cvs] CVS update: slime/swank.lisp
Luke Gorrie
lgorrie at common-lisp.net
Sat Mar 12 16:02:09 UTC 2005
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv20015
Modified Files:
swank.lisp
Log Message:
(value-for-editing, commit-edited-value): New functions for
slime-edit-value.
Date: Sat Mar 12 17:02:05 2005
Author: lgorrie
Index: slime/swank.lisp
diff -u slime/swank.lisp:1.285 slime/swank.lisp:1.286
--- slime/swank.lisp:1.285 Mon Mar 7 09:46:55 2005
+++ slime/swank.lisp Sat Mar 12 17:02:04 2005
@@ -1772,6 +1772,18 @@
(t what))))
(send-oob-to-emacs `(:ed ,target))))
+(defslimefun value-for-editing (form)
+ "Return a readable value of FORM for editing in Emacs.
+FORM is expected, but not required, to be SETF'able."
+ ;; FIXME: Can we check FORM for setfability? -luke (12/Mar/2005)
+ (prin1-to-string (eval (read-from-string form))))
+
+(defslimefun commit-edited-value (form value)
+ "Set the value of a setf'able FORM to VALUE.
+FORM and VALUE are both strings from Emacs."
+ (eval `(setf ,(read-from-string form) ',(read-from-string value)))
+ t)
+
;;;; Debugger
More information about the slime-cvs
mailing list