[slime-cvs] CVS update: slime/slime.el
Luke Gorrie
lgorrie at common-lisp.net
Mon Jul 26 11:47:29 UTC 2004
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv30976
Modified Files:
slime.el
Log Message:
(slime-first-change-hook): Add `save-match-data' to avoid breaking
e.g. query-replace. Also added `save-excursion' just to be safe.
Date: Mon Jul 26 04:47:29 2004
Author: lgorrie
Index: slime/slime.el
diff -u slime/slime.el:1.378 slime/slime.el:1.379
--- slime/slime.el:1.378 Fri Jul 23 09:35:37 2004
+++ slime/slime.el Mon Jul 26 04:47:29 2004
@@ -4651,10 +4651,15 @@
(defun slime-first-change-hook ()
"Notify Lisp that a source file's buffer has been modified."
- (when (and (buffer-file-name)
- (slime-connected-p))
- (let ((filename (slime-to-lisp-filename (buffer-file-name))))
- (slime-eval-async `(swank:buffer-first-change ,filename)))))
+ ;; Be careful not to disturb anything!
+ ;; In particular if we muck up the match-data then query-replace
+ ;; breaks. -luke (26/Jul/2004)
+ (save-excursion
+ (save-match-data
+ (when (and (buffer-file-name)
+ (slime-connected-p))
+ (let ((filename (slime-to-lisp-filename (buffer-file-name))))
+ (slime-eval-async `(swank:buffer-first-change ,filename)))))))
(defun slime-setup-first-change-hook ()
(add-hook (make-local-variable 'first-change-hook)
More information about the slime-cvs
mailing list