[slime-devel] Re: More slime.el fixes --- now even fixed
Lawrence Mitchell
wence at gmx.li
Fri Apr 9 20:09:37 UTC 2004
Luke Gorrie wrote:
[...] (slime-same-line-p)
> This looks broken, I think it tests if two positions are on the
> same line as (point) rather than the same line as one another?
> I left that part out.
How about this one. The second part of the patch fixes a
problem with the defparameter repl command, it just used the
wrong variable name in the function.
Index: ChangeLog
===================================================================
RCS file: /project/slime/cvsroot/slime/ChangeLog,v
retrieving revision 1.330
diff -u -r1.330 ChangeLog
--- ChangeLog 8 Apr 2004 15:26:44 -0000 1.330
+++ ChangeLog 9 Apr 2004 20:08:56 -0000
@@ -1,3 +1,9 @@
+2004-04-09 Lawrence Mitchell <wence at gmx.li>
+
+ * slime.el (slime-same-line-p): Use `line-end-position', rather
+ than searching for a newline manually.
+ (slime-repl-defparameter): Use VALUE, not VALUE-FORM.
+
2004-04-08 Marco Baringer <mb at bese.it>
* slime.el (slime-repl-package-stack): New buffer local variable.
Index: slime.el
===================================================================
RCS file: /project/slime/cvsroot/slime/slime.el,v
retrieving revision 1.258
diff -u -r1.258 slime.el
--- slime.el 8 Apr 2004 15:26:44 -0000 1.258
+++ slime.el 9 Apr 2004 20:04:02 -0000
@@ -2951,9 +2951,9 @@
(point))))))))
(defun slime-same-line-p (pos1 pos2)
- "Return true if buffer positions PoS1 and POS2 are on the same line."
- (save-excursion (goto-char (min pos1 pos2))
- (not (search-forward "\n" (max pos1 pos2) t))))
+ "Return t if buffer positions POS1 and POS2 are on the same line."
+ (save-excursion (goto-char (min pos1 pos2))
+ (<= (max pos1 pos2) (line-end-position))))
(defun slime-severity-face (severity)
"Return the name of the font-lock face representing SEVERITY."
@@ -5839,7 +5839,7 @@
(:handler (lambda (name value)
(interactive (list (slime-read-symbol-name "Name (symbol): " t)
(slime-read-from-minibuffer "Value: " "nil")))
- (insert "(cl:defparameter " name " " value-form " \"REPL generated global variable.\")")
+ (insert "(cl:defparameter " name " " value " \"REPL generated global variable.\")")
(slime-repl-send-input)))
(:one-liner "Define a new global, special, variable."))
--
Lawrence Mitchell <wence at gmx.li>
More information about the slime-devel
mailing list