[slime-cvs] CVS slime
CVS User trittweiler
trittweiler at common-lisp.net
Tue Feb 24 17:24:07 UTC 2009
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv8967
Modified Files:
ChangeLog slime.el
Log Message:
Re-checkin my change from 2009-02-14. It seems I didn't actually
commit it.
--- /project/slime/cvsroot/slime/ChangeLog 2009/02/24 16:51:46 1.1684
+++ /project/slime/cvsroot/slime/ChangeLog 2009/02/24 17:24:07 1.1685
@@ -1,4 +1,9 @@
-2009-02-22 2009-02-14 Tobias C. Rittweiler <tcr at freebits.de>
+2009-02-24 Tobias C. Rittweiler <tcr at freebits.de>
+
+ Re-checkin my change from 2009-02-14. It seems I didn't actually
+ commit it.
+
+2009-02-22 Tobias C. Rittweiler <tcr at freebits.de>
`M-x slime-format-string-expand' displays the expansion of a
format string.
--- /project/slime/cvsroot/slime/slime.el 2009/02/22 14:18:47 1.1125
+++ /project/slime/cvsroot/slime/slime.el 2009/02/24 17:24:07 1.1126
@@ -401,8 +401,19 @@
(match-string 1 name))
((string-match "^\"\\(.*\\)\"$" name)
(match-string 1 name))
- (t name))))
- (format "%s" (read name))))
+ ((string-match slime-reader-conditionals-regexp name)
+ ;; This is kind of a sledge hammer, but as it's a rare
+ ;; case we don't care.
+ (with-temp-buffer
+ (insert name)
+ (goto-char (point-min))
+ (slime-forward-sexp) ; skip reader conditionals
+ (let ((old (point)))
+ (backward-sexp)
+ (buffer-substring-no-properties (point) old))))
+ (t
+ (error "FALL THROUGH")))))
+ (format "%s" name)))
(defun slime-compute-modeline-connection ()
(let ((conn (slime-current-connection)))
@@ -7993,12 +8004,14 @@
(goto-char comment-start)
(forward-comment (buffer-size))))
+(defvar slime-reader-conditionals-regexp
+ ;; #!+, #!- are SBCL specific reader-conditional syntax.
+ ;; We need this for the source files of SBCL itself.
+ (regexp-opt '("#+" "#-" "#!+" "#!-")))
+
(defun slime-forward-reader-conditional ()
"Move past any reader conditional (#+ or #-) at point."
- (when (or (looking-at "#[\\+\\-]")
- ;; #!+, #!- are SBCL specific reader-conditional syntax.
- ;; We need this for the source files of SBCL itself.
- (looking-at "#![\\+\\-]"))
+ (when (looking-at slime-reader-conditionals-regexp)
(goto-char (match-end 0))
(let* ((plus-conditional-p (eq (char-before) ?+))
(result (slime-eval-feature-conditional (read (current-buffer)))))
More information about the slime-cvs
mailing list