[slime-cvs] CVS update: slime/slime.el

Luke Gorrie lgorrie at common-lisp.net
Fri Jun 18 19:26:12 UTC 2004


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv25323

Modified Files:
	slime.el 
Log Message:
(slime-recenter-window): Avoid moving the point. This the keeps the
point in the right place when showing debugger-frame locations in
Emacs 21.

Date: Fri Jun 18 12:26:12 2004
Author: lgorrie

Index: slime/slime.el
diff -u slime/slime.el:1.319 slime/slime.el:1.320
--- slime/slime.el:1.319	Fri Jun 18 10:50:03 2004
+++ slime/slime.el	Fri Jun 18 12:26:12 2004
@@ -5071,13 +5071,13 @@
 
 (defun slime-recenter-window (window line)
   "Set window-start in WINDOW LINE lines before point."
-  (let ((line (if (not line)
-                  (/ (window-height window) 2)
-                line)))
-    (let ((start (ignore-errors (loop repeat line do (forward-line -1))
-                                (point))))
-      (when start
-        (set-window-start w (point))))))
+  (let* ((line (if (not line)
+                   (/ (window-height window) 2)
+                 line))
+         (start (save-excursion
+                  (loop repeat line do (forward-line -1))
+                  (point))))
+    (set-window-start w start)))
 
 (defun sldb-highlight-sexp (&optional start end)
   "Highlight the first sexp after point."





More information about the slime-cvs mailing list