[slime-cvs] CVS slime
mkoeppe
mkoeppe at common-lisp.net
Wed Mar 22 02:48:26 UTC 2006
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv18017
Modified Files:
slime.el
Log Message:
(slime-ed): Handle (FILENAME :charpos CHARPOS).
--- /project/slime/cvsroot/slime/slime.el 2006/03/19 23:15:10 1.600
+++ /project/slime/cvsroot/slime/slime.el 2006/03/22 02:48:26 1.601
@@ -6411,10 +6411,11 @@
WHAT can be:
A filename (string),
A list (FILENAME LINE [COLUMN]),
+ A list (FILENAME :charpos CHARPOS),
A function name (symbol),
nil.
-This for use in the implementation of COMMON-LISP:ED."
+This is for use in the implementation of COMMON-LISP:ED."
;; Without `save-excursion' very strange things happen if you call
;; (swank:ed-in-emacs X) from the REPL. -luke (18/Jan/2004)
(save-excursion
@@ -6426,14 +6427,18 @@
(find-file (slime-from-lisp-filename what)))
((consp what)
(find-file (first (slime-from-lisp-filename what)))
- (goto-line (second what))
- ;; Find the correct column, without going past the end of
- ;; the line.
- (let ((col (third what)))
- (while (and col
- (< (point) (point-at-eol))
- (/= (decf col) -1))
- (forward-char 1))))
+ (cond
+ ((eql (second what) :charpos)
+ (goto-char (third what)))
+ (t
+ (goto-line (second what))
+ ;; Find the correct column, without going past the end of
+ ;; the line.
+ (let ((col (third what)))
+ (while (and col
+ (< (point) (point-at-eol))
+ (/= (decf col) -1))
+ (forward-char 1))))))
((and what (symbolp what))
(slime-edit-definition (symbol-name what)))
(t nil)))) ; nothing in particular
More information about the slime-cvs
mailing list