[slime-cvs] CVS slime
trittweiler
trittweiler at common-lisp.net
Fri Sep 12 15:51:06 UTC 2008
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv24829
Modified Files:
slime.el ChangeLog
Log Message:
In an SLDB buffer, `C-c C-c' will now recompile the source behind
a frame. In particular, `C-u C-c C-c' will recompile the frame
with high debug settings.
* slime.el (sldb-recompile-frame-source): New function.
(sldb-mode-map): Bind `C-c C-c' to it.
* slime.el (sldb-overlays, sldb-delete-overlays, slime-xref-cleanup):
Removed. Sldb-overlays weren't created anymore since 2008-08-17.
--- /project/slime/cvsroot/slime/slime.el 2008/09/12 12:27:38 1.1012
+++ /project/slime/cvsroot/slime/slime.el 2008/09/12 15:51:02 1.1013
@@ -6109,7 +6109,6 @@
"Kill the current xref buffer, restore the window configuration
if appropriate."
(interactive)
- (slime-xref-cleanup)
;; We can't simply use `slime-popup-buffer-quit' because we also
;; want the Xref window be deleted.
(if (slime-popup-buffer-snapshot-unchanged-p)
@@ -6124,17 +6123,10 @@
(defun slime-xref-retract ()
"Leave the Xref buffer, and make everything as of before."
(interactive)
- (slime-xref-cleanup)
(let ((buffer (current-buffer)))
(slime-popup-buffer-restore-snapshot)
(kill-buffer buffer)))
-(defun slime-xref-cleanup ()
- "Delete overlays created by xref mode and kill the xref buffer."
- (sldb-delete-overlays))
-
-
-
(defun slime-insert-xrefs (xref-alist)
"Insert XREF-ALIST in the current-buffer.
XREF-ALIST is of the form ((GROUP . ((LABEL LOCATION) ...)) ...).
@@ -6656,8 +6648,7 @@
(set-syntax-table sldb-mode-syntax-table)
(slime-set-truncate-lines)
;; Make original slime-connection "sticky" for SLDB commands in this buffer
- (setq slime-buffer-connection (slime-connection))
- (slime-add-local-hook 'kill-buffer-hook 'sldb-delete-overlays))
+ (setq slime-buffer-connection (slime-connection)))
(slime-define-keys sldb-mode-map
("h" 'describe-mode)
@@ -6692,6 +6683,7 @@
("P" 'sldb-print-condition)
("C" 'sldb-inspect-condition)
(":" 'slime-interactive-eval)
+ ("\C-c\C-c" 'sldb-recompile-frame-source)
("\C-c\C-d" slime-doc-map))
;; Inherit bindings from slime-mode
@@ -6817,6 +6809,8 @@
(setq sldb-level nil))
(when (and (= level 1) (not stepping))
(kill-buffer sldb))))
+
+;;;;;; SLDB buffer insertion
(defun sldb-insert-condition (condition)
"Insert the text for CONDITION.
@@ -7119,16 +7113,12 @@
;;;;;; SLDB show source
-(defvar sldb-overlays '()
- "List of overlays created in source code buffers to highlight expressions.")
-
(defun sldb-show-source ()
"Highlight the frame at point's expression in a source code buffer."
(interactive)
(sldb-show-frame-source (sldb-frame-number-at-point)))
(defun sldb-show-frame-source (frame-number)
- (sldb-delete-overlays)
(slime-eval-async
`(swank:frame-source-location-for-emacs ,frame-number)
(lambda (source-location)
@@ -7147,14 +7137,10 @@
(defun sldb-highlight-sexp (&optional start end)
"Highlight the first sexp after point."
- (sldb-delete-overlays)
(let ((start (or start (point)))
(end (or end (save-excursion (ignore-errors (forward-sexp)) (point)))))
(slime-flash-region start end)))
-(defun sldb-delete-overlays ()
- (mapc #'delete-overlay sldb-overlays)
- (setq sldb-overlays '()))
;;;;;; SLDB toggle details
@@ -7196,9 +7182,9 @@
(let* ((frame (get-text-property (point) 'frame))
(num (car frame))
(catches (sldb-catch-tags num))
- (locals (sldb-frame-locals num))
+ (locals (sldb-frame-locals num)))
(destructuring-bind (start end) (sldb-frame-region)
- (list start end frame locals catches)))))
+ (list start end frame locals catches))))
(defvar sldb-insert-frame-variable-value-function 'sldb-insert-frame-variable-value)
@@ -7433,6 +7419,28 @@
((:abort)))))
+;;;;;; SLDB recompilation commands
+
+(defun sldb-recompile-frame-source (&optional raw-prefix-arg)
+ (interactive "P")
+ (slime-eval-async
+ `(swank:frame-source-location-for-emacs ,(sldb-frame-number-at-point))
+ (lexical-let ((debug-level (slime-normalize-optimization-level
+ (and raw-prefix-arg
+ (prefix-numeric-value raw-prefix-arg)))))
+ (lambda (source-location)
+ (destructure-case source-location
+ ((:error message)
+ (message "%s" message)
+ (ding))
+ (t
+ (slime-recompile-location source-location debug-level)))))))
+
+
+
+
+
+
;;;; Thread control panel
(defvar slime-threads-buffer-name "*SLIME Threads*")
--- /project/slime/cvsroot/slime/ChangeLog 2008/09/12 12:27:38 1.1502
+++ /project/slime/cvsroot/slime/ChangeLog 2008/09/12 15:51:02 1.1503
@@ -1,5 +1,17 @@
2008-09-12 Tobias C. Rittweiler <tcr at freebits.de>
+ In an SLDB buffer, `C-c C-c' will now recompile the source behind
+ a frame. In particular, `C-u C-c C-c' will recompile the frame
+ with high debug settings.
+
+ * slime.el (sldb-recompile-frame-source): New function.
+ (sldb-mode-map): Bind `C-c C-c' to it.
+
+ * slime.el (sldb-overlays, sldb-delete-overlays, slime-xref-cleanup):
+ Removed. Sldb-overlays weren't created anymore since 2008-08-17.
+
+2008-09-12 Tobias C. Rittweiler <tcr at freebits.de>
+
New faces: `sldb-restartable-frame-line-face',
`sldb-non-restartable-frame-line-face'.
More information about the slime-cvs
mailing list