[slime-cvs] CVS slime/contrib
CVS User sboukarev
sboukarev at common-lisp.net
Tue Oct 20 21:28:38 UTC 2009
Update of /project/slime/cvsroot/slime/contrib
In directory cl-net:/tmp/cvs-serv3921/contrib
Modified Files:
ChangeLog slime-parse.el
Log Message:
* contrib/slime-parse.el (slime-parse-sexp-at-point): Remove unused flet.
Check for existence of a sexp before trying to parse, not after.
--- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/10/20 10:43:52 1.257
+++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/10/20 21:28:38 1.258
@@ -1,3 +1,8 @@
+2009-10-20 Stas Boukarev <stassats at gmail.com>
+
+ * slime-parse.el (slime-parse-sexp-at-point): Remove unused flet.
+ Check for existence of a sexp before trying to parse, not after.
+
2009-10-19 Stas Boukarev <stassats at gmail.com>
* slime-asdf.el (slime-open-system): New command for opening all files
--- /project/slime/cvsroot/slime/contrib/slime-parse.el 2009/07/11 19:20:18 1.23
+++ /project/slime/cvsroot/slime/contrib/slime-parse.el 2009/10/20 21:28:38 1.24
@@ -33,26 +33,19 @@
If SKIP-BLANKS-P is true, leading whitespaces &c are skipped.
"
(interactive "p") (or n (setq n 1))
- (flet ((sexp-at-point (first-choice)
- (let ((string (if (eq first-choice :symbol-first)
- (or (slime-symbol-at-point)
- (thing-at-point 'sexp))
- (or (thing-at-point 'sexp)
- (slime-symbol-at-point)))))
- (if string (substring-no-properties string) nil))))
- (save-excursion
- (when skip-blanks-p ; e.g. `( foo bat)' where point is after ?\(.
- (slime-forward-blanks))
- (let ((result nil))
- (dotimes (i n)
- (push (slime-sexp-at-point) result)
- ;; Skip current sexp
- (ignore-errors (forward-sexp) (slime-forward-blanks))
- ;; Is there an additional sexp in front of us?
- (save-excursion
- (unless (slime-point-moves-p (ignore-errors (forward-sexp)))
- (return))))
- (nreverse result)))))
+ (save-excursion
+ (when skip-blanks-p ; e.g. `( foo bat)' where point is after ?\(.
+ (slime-forward-blanks))
+ (let ((result nil))
+ (dotimes (i n)
+ ;; Is there an additional sexp in front of us?
+ (save-excursion
+ (unless (slime-point-moves-p (ignore-errors (forward-sexp)))
+ (return)))
+ (push (slime-sexp-at-point) result)
+ ;; Skip current sexp
+ (ignore-errors (forward-sexp) (slime-forward-blanks)))
+ (nreverse result))))
(defun slime-has-symbol-syntax-p (string)
(if (and string (not (zerop (length string))))
@@ -128,8 +121,7 @@
(let* ((args (slime-parse-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)
- ))))
+ (values current-forms current-indices current-points)))))
;;; FIXME: We display "(proclaim (optimize ...))" instead of the
;;; correct "(proclaim '(optimize ...))".
More information about the slime-cvs
mailing list