[slime-cvs] CVS slime

trittweiler trittweiler at common-lisp.net
Mon Aug 27 16:55:31 UTC 2007


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv21054

Modified Files:
	slime.el 
Log Message:
	* slime.el (slime-make-extended-operator-parser/look-ahead): Move
	to end of symbol at point.
	(slime-make-form-spec-from-string): Fixes unexpected behaviour of
	`save-excursion'.


--- /project/slime/cvsroot/slime/slime.el	2007/08/27 15:48:25	1.829
+++ /project/slime/cvsroot/slime/slime.el	2007/08/27 16:55:31	1.830
@@ -9957,13 +9957,9 @@
     (byte-compile
      #'(lambda (name user-point current-forms current-indices current-points)
          (let ((old-forms (rest current-forms)))
-           (goto-char user-point)
-           (slime-end-of-symbol)
-           (let* ((nesting  (slime-nesting-until-point (1- (first current-points))))
-                  (args-str (concat (slime-incomplete-sexp-at-point nesting)
-                                    (make-string nesting ?\))))
-                  (args     (slime-make-form-spec-from-string args-str t)))
-             (setq current-forms (cons `(,name , at args) old-forms))))
+           (let* ((args (slime-ensure-list (slime-sexp-at-point n)))
+                  (arg-specs (mapcar #'slime-make-form-spec-from-string args)))
+             (setq current-forms (cons `(,name , at arg-specs) old-forms))))
          (values current-forms current-indices current-points)
          ))))
 
@@ -10021,23 +10017,24 @@
   (if (slime-length= string 0)
       ""
       (with-current-buffer (or temp-buffer slime-internal-scratch-buffer)
+        (common-lisp-mode) ; important for `slime-sexp-at-point'.
         (erase-buffer)
         (insert string)
         (when strip-operator-p
-          (beginning-of-line)
+          (beginning-of-buffer)
           (when (string= (thing-at-point 'char) "(")
             (ignore-errors (forward-char 1)
                            (forward-sexp)
                            (slime-forward-blanks))
             (delete-region (point-min) (point))
             (insert "(")))
-        (end-of-line) (backward-char 1)
+        (end-of-buffer) (backward-char 1) ; for `slime-enclosing-form-specs'
         (multiple-value-bind (forms indices points)
             (slime-enclosing-form-specs 1)
           (if (null forms)
               string
               (progn
-                (beginning-of-line) (forward-char 1)
+                (beginning-of-buffer) (forward-char 1)
                 (mapcar #'(lambda (s)
                             (assert (not (equal s string)))
                             (slime-make-form-spec-from-string s temp-buffer))




More information about the slime-cvs mailing list