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

Luke Gorrie lgorrie at common-lisp.net
Sun Nov 23 12:13:00 UTC 2003


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

Modified Files:
	slime.el 
Log Message:
* slime.el (slime-goto-source-location): Added optional `align-p'
argument for :file and :emacs-buffer location types. This is for
OpenMCL - unlike CMUCL its positions are not character-accurate so it
needs to be aligned to the beginning of the sexp.

Date: Sun Nov 23 07:13:00 2003
Author: lgorrie

Index: slime/slime.el
diff -u slime/slime.el:1.102 slime/slime.el:1.103
--- slime/slime.el:1.102	Sun Nov 23 02:15:02 2003
+++ slime/slime.el	Sun Nov 23 07:12:59 2003
@@ -1975,20 +1975,28 @@
 LOCATION is a plist and defines a position in a buffer.  Several kinds
 of locations are supported:
 
- (:file ,filename ,position)             -- A position in a file.
- (:emacs-buffer ,buffername ,position)   -- A position in a buffer.
- (:sexp ,string)                         -- A sexp where no file is available."
+ (:file ,filename ,position[ ,align-p])
+   A position in a file. 
+ (:emacs-buffer ,buffername ,position[ ,align-p])
+   A position in a buffer.
+ (:sexp ,string)
+   A sexp where no file is available.
+
+align-p means the location is not character-accurate, and should be
+aligned to the start of the sexp in front."
   (destructure-case location
-    ((:file filename position)
+    ((:file filename position &optional align-p)
      (set-buffer (find-file-noselect filename t))
      (goto-char position)
-     (slime-forward-sexp)
-     (beginning-of-sexp))
-    ((:emacs-buffer buffer position)
+     (when align-p
+       (slime-forward-sexp)
+       (beginning-of-sexp)))
+    ((:emacs-buffer buffer position &optional align-p)
      (set-buffer buffer)
      (goto-char position)
-     (slime-forward-sexp)
-     (beginning-of-sexp))
+     (when align-p
+       (slime-forward-sexp)
+       (beginning-of-sexp)))
     ((:sexp string)
      (with-output-to-temp-buffer "*SLIME SEXP*"
        (princ string)))





More information about the slime-cvs mailing list