[slime-cvs] CVS slime
heller
heller at common-lisp.net
Thu Mar 13 10:43:26 UTC 2008
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv12736
Modified Files:
ChangeLog slime.el
Log Message:
* slime.el (slime-region-for-defun-function): Deleted.
(slime-region-for-defun-at-point): Use beginning-of-defun
and not beginning-of-sexp.
(slime-flash-region): New function.
(slime-compile-region): Use it.
--- /project/slime/cvsroot/slime/ChangeLog 2008/03/13 10:43:17 1.1316
+++ /project/slime/cvsroot/slime/ChangeLog 2008/03/13 10:43:26 1.1317
@@ -1,5 +1,13 @@
2008-03-13 Helmut Eller <heller at common-lisp.net>
+ * slime.el (slime-region-for-defun-function): Deleted.
+ (slime-region-for-defun-at-point): Use beginning-of-defun
+ and not beginning-of-sexp.
+ (slime-flash-region): New function.
+ (slime-compile-region): Use it.
+
+2008-03-13 Helmut Eller <heller at common-lisp.net>
+
* slime.el (slime-xref-group): Renamed from slime-location-to-string.
Handle source-form locations.
--- /project/slime/cvsroot/slime/slime.el 2008/03/13 10:43:17 1.920
+++ /project/slime/cvsroot/slime/slime.el 2008/03/13 10:43:26 1.921
@@ -3890,9 +3890,15 @@
(defun slime-compile-region (start end)
"Compile the region."
(interactive "r")
+ (slime-flash-region start end)
(run-hook-with-args 'slime-before-compile-functions start end)
(slime-compile-string (buffer-substring-no-properties start end) start))
+(defun slime-flash-region (start end &optional timeout)
+ (let ((overlay (make-overlay start end)))
+ (overlay-put overlay 'face 'secondary-selection)
+ (run-with-timer (or timeout 0.2) nil 'delete-overlay overlay)))
+
(defun slime-compile-string (string start-offset)
(slime-eval-async
`(swank:compile-string-for-emacs
@@ -9116,18 +9122,14 @@
(apply #'buffer-substring-no-properties
(slime-region-for-defun-at-point)))
-(defvar slime-region-for-defun-function nil)
-
(defun slime-region-for-defun-at-point ()
"Return the start and end position of the toplevel form at point."
- (or (and slime-region-for-defun-function
- (funcall slime-region-for-defun-function))
- (save-excursion
- (save-match-data
- (end-of-defun)
- (let ((end (point)))
- (beginning-of-sexp)
- (list (point) end))))))
+ (save-excursion
+ (save-match-data
+ (end-of-defun)
+ (let ((end (point)))
+ (beginning-of-defun)
+ (list (point) end)))))
(defun slime-beginning-of-symbol ()
"Move point to the beginning of the current symbol."
More information about the slime-cvs
mailing list