[slime-cvs] CVS slime
CVS User sboukarev
sboukarev at common-lisp.net
Tue Dec 6 15:09:04 UTC 2011
Update of /project/slime/cvsroot/slime
In directory tiger.common-lisp.net:/tmp/cvs-serv26230
Modified Files:
ChangeLog slime.el
Log Message:
* slime.el (slime-compile-region): Check connection before running
hooks, invoking slime-flash-region doesn't make much sense when
there's no connection.
--- /project/slime/cvsroot/slime/ChangeLog 2011/12/05 11:29:12 1.2269
+++ /project/slime/cvsroot/slime/ChangeLog 2011/12/06 15:09:04 1.2270
@@ -1,3 +1,9 @@
+2011-12-06 Stas Boukarev <stassats at gmail.com>
+
+ * slime.el (slime-compile-region): Check connection before running
+ hooks, invoking slime-flash-region doesn't make much sense when
+ there's no connection.
+
2011-12-05 Helmut Eller <heller at common-lisp.net>
Move flow control into dispatch-event.
--- /project/slime/cvsroot/slime/slime.el 2011/12/05 11:29:00 1.1383
+++ /project/slime/cvsroot/slime/slime.el 2011/12/06 15:09:04 1.1384
@@ -2667,10 +2667,14 @@
(defun slime-compile-region (start end)
"Compile the region."
(interactive "r")
- (slime-flash-region start end)
+ ;; Check connection before running hooks
+ ;; things like slime-flash-region don't make much sense if there's no connection
+ (slime-connection)
(run-hook-with-args 'slime-before-compile-functions start end)
(slime-compile-string (buffer-substring-no-properties start end) start))
+(add-hook 'slime-before-compile-functions 'slime-flash-region)
+
(defun slime-flash-region (start end &optional timeout)
"Temporarily highlight region from START to END."
(let ((overlay (make-overlay start end)))
More information about the slime-cvs
mailing list