[slime-cvs] CVS update: slime/slime.el
Luke Gorrie
lgorrie at common-lisp.net
Tue May 25 01:31:54 UTC 2004
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv7777
Modified Files:
slime.el
Log Message:
(slime-kill-without-query-p): Default to T.
(sldb-highlight): Variable to control face-based highlighting of SLDB
locations. (In Emacs21 the point is visible even in unselected
windows, which is sufficient for me.)
(sldb-show-location-recenter-arg): Argument to `recenter' when showing
SLDB locations. Default to nil, i.e. location appears in the middle of
the window.
Date: Mon May 24 21:31:54 2004
Author: lgorrie
Index: slime/slime.el
diff -u slime/slime.el:1.307 slime/slime.el:1.308
--- slime/slime.el:1.307 Mon May 24 12:10:51 2004
+++ slime/slime.el Mon May 24 21:31:53 2004
@@ -132,7 +132,7 @@
If you want to fallback on TAGS you can set this to `find-tag'.")
-(defvar slime-kill-without-query-p nil
+(defvar slime-kill-without-query-p t
"If non-nil, kill Slime processes without query when quitting Emacs.")
@@ -4893,6 +4893,12 @@
;;;;; SLDB commands
+(defvar sldb-highlight t
+ "When non-nil use temporary face attributes to mark buffer expressions.")
+
+(defvar sldb-show-location-recenter-arg nil
+ "Argument to pass to `recenter' when displaying a source location.")
+
(defun sldb-default-action/mouse (event)
"Invoke the action pointed at by the mouse."
(interactive "e")
@@ -4911,16 +4917,6 @@
(defun sldb-delete-overlays ()
(mapc #'delete-overlay sldb-overlays)
(setq sldb-overlays '()))
-
-(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 (forward-sexp) (point)))))
- (push (make-overlay start (1+ start)) sldb-overlays)
- (push (make-overlay (1- end) end) sldb-overlays)
- (dolist (overlay sldb-overlays)
- (overlay-put overlay 'face 'secondary-selection))))
(defun sldb-frame-number-at-point ()
(let ((frame (get-text-property (point) 'frame)))
@@ -4949,17 +4945,25 @@
(slime-show-source-location source-location)))))))
(defun slime-show-source-location (source-location)
- (save-selected-window
- (slime-goto-source-location source-location)
- (sldb-highlight-sexp)
- (display-buffer (current-buffer) t)
- (save-excursion
- (beginning-of-line -4)
- (let ((window (get-buffer-window (current-buffer) t))
- (pos (point)))
- (set-window-start (get-buffer-window (current-buffer) t) (point))
- (select-window window)
- (goto-char pos)))))
+ (slime-goto-source-location source-location)
+ (when sldb-highlight (sldb-highlight-sexp))
+ (let ((position (point)))
+ (save-selected-window
+ (select-window (or (get-buffer-window (current-buffer) t)
+ (display-buffer (current-buffer) t)))
+ (goto-char position)
+ (unless (pos-visible-in-window-p)
+ (recenter sldb-show-location-recenter-arg)))))
+
+(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 (forward-sexp) (point)))))
+ (push (make-overlay start (1+ start)) sldb-overlays)
+ (push (make-overlay (1- end) end) sldb-overlays)
+ (dolist (overlay sldb-overlays)
+ (overlay-put overlay 'face 'secondary-selection))))
(defun sldb-toggle-details (&optional on)
More information about the slime-cvs
mailing list