[slime-cvs] CVS update: slime/slime.el
Helmut Eller
heller at common-lisp.net
Thu Dec 4 07:38:28 UTC 2003
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv9912
Modified Files:
slime.el
Log Message:
(slime-eval-defun): Use slime-re-evaluate-defvar if the defun starts
with "defvar". C-M-x in elisp does this too.
(slime-re-evaluate-defvar): Take the form as argument.
Date: Thu Dec 4 02:38:28 2003
Author: heller
Index: slime/slime.el
diff -u slime/slime.el:1.127 slime/slime.el:1.128
--- slime/slime.el:1.127 Wed Dec 3 17:30:02 2003
+++ slime/slime.el Thu Dec 4 02:38:28 2003
@@ -2781,9 +2781,14 @@
(slime-interactive-eval (slime-last-expression)))
(defun slime-eval-defun ()
- "Evaluate the current toplevel form."
+ "Evaluate the current toplevel form.
+Use `slime-re-evaluate-defvar' the current defun starts with '(defvar'"
(interactive)
- (slime-interactive-eval (slime-defun-at-point)))
+ (let ((form (slime-defun-at-point)))
+ (cond ((string-match "^(defvar " form)
+ (slime-re-evaluate-defvar form))
+ (t
+ (slime-interactive-eval from))(slime-defun-at-point))))
(defun slime-eval-region (start end)
"Evalute region."
@@ -2799,12 +2804,12 @@
(interactive)
(slime-eval-region (point-min) (point-max)))
-(defun slime-re-evaluate-defvar ()
+(defun slime-re-evaluate-defvar (form)
"Force the re-evaluaton of the defvar form before point.
First make the variable unbound, then evaluate the entire form."
- (interactive)
- (slime-eval-async `(swank:re-evaluate-defvar ,(slime-last-expression))
+ (interactive (list (slime-last-expression)))
+ (slime-eval-async `(swank:re-evaluate-defvar ,form)
(slime-buffer-package)
(slime-show-evaluation-result-continuation)))
More information about the slime-cvs
mailing list