[slime-cvs] CVS slime

heller heller at common-lisp.net
Sun Dec 2 08:43:30 UTC 2007


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv27110

Modified Files:
	slime.el 
Log Message:
Add hook to customize the region used by C-c C-c.
Useful to recognize block declarations in CMUCL sources.

* slime.el (slime-region-for-defun-function): New variable.
(slime-region-for-defun-at-point): Use it.


--- /project/slime/cvsroot/slime/slime.el	2007/11/29 12:26:39	1.881
+++ /project/slime/cvsroot/slime/slime.el	2007/12/02 08:43:30	1.882
@@ -7694,7 +7694,7 @@
 
 (slime-define-keys slime-inspector-mode-map
   ([return] 'slime-inspector-operate-on-point)
-  ([(meta return)] 'slime-inspector-copy-down)
+  ((kbd "M-RET") 'slime-inspector-copy-down)
   ("\C-m"   'slime-inspector-operate-on-point)
   ([mouse-2] 'slime-inspector-operate-on-click)
   ("l" 'slime-inspector-pop)
@@ -9107,14 +9107,18 @@
   (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."
-  (save-excursion
-    (save-match-data
-      (end-of-defun)
-      (let ((end (point)))
-        (beginning-of-sexp)
-        (list (point) end)))))
+  (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))))))
 
 (defun slime-beginning-of-symbol ()
   "Move point to the beginning of the current symbol."




More information about the slime-cvs mailing list