[slime-cvs] CVS slime
CVS User trittweiler
trittweiler at common-lisp.net
Thu Nov 5 16:43:05 UTC 2009
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv14749
Modified Files:
ChangeLog slime.el
Log Message:
Make C-c C-c operate on region if mark is active (and Transient
Mark mode is enabled.)
* slime.el (slime-compile-defun): Operate on region if
transient-mark-mode is active.
--- /project/slime/cvsroot/slime/ChangeLog 2009/11/03 18:22:58 1.1911
+++ /project/slime/cvsroot/slime/ChangeLog 2009/11/05 16:43:05 1.1912
@@ -1,3 +1,11 @@
+2009-11-05 Tobias C. Rittweiler <tcr at freebits.de>
+
+ Make C-c C-c operate on region if mark is active (and Transient
+ Mark mode is enabled.)
+
+ * slime.el (slime-compile-defun): Operate on region if
+ transient-mark-mode is active.
+
2009-11-03 Helmut Eller <heller at common-lisp.net>
Ask gdb for source lines of foreign functions.
--- /project/slime/cvsroot/slime/slime.el 2009/11/03 15:14:41 1.1248
+++ /project/slime/cvsroot/slime/slime.el 2009/11/05 16:43:05 1.1249
@@ -2615,7 +2615,9 @@
compile with a debug setting of that number."
(interactive "P")
(let ((slime-compilation-policy (slime-compute-policy raw-prefix-arg)))
- (apply #'slime-compile-region (slime-region-for-defun-at-point))))
+ (if (use-region-p)
+ (slime-compile-region (region-beginning) (region-end))
+ (apply #'slime-compile-region (slime-region-for-defun-at-point)))))
(defun slime-compile-region (start end)
"Compile the region."
@@ -8573,6 +8575,15 @@
(defun slime-local-variable-p (var &optional buffer)
(local-variable-p var (or buffer (current-buffer)))) ; XEmacs
+(slime-DEFUN-if-undefined region-active-p ()
+ (and transient-mark-mode mark-active))
+
+(if (featurep 'xemacs)
+ (slime-DEFUN-if-undefined use-region-p ()
+ (region-active-p))
+ (slime-DEFUN-if-undefined use-region-p ()
+ (and transient-mark-mode mark-active)))
+
(slime-DEFUN-if-undefined next-single-char-property-change
(position prop &optional object limit)
(let ((limit (typecase limit
More information about the slime-cvs
mailing list