[slime-cvs] CVS update: slime/ChangeLog slime/slime.el slime/swank.lisp
Christophe Rhodes
crhodes at common-lisp.net
Sun Jun 12 16:33:55 UTC 2005
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv1688
Modified Files:
ChangeLog slime.el swank.lisp
Log Message:
Minor changes to ED-IN-EMACS / slime-ed. Now
(push 'swank:ed-in-emacs sb-ext:*ed-functions*)
works more-or-less as required. (We don't obey the constraint that
file-error conditions be signalled on file system errors, but...)
Date: Sun Jun 12 18:33:50 2005
Author: crhodes
Index: slime/ChangeLog
diff -u slime/ChangeLog:1.711 slime/ChangeLog:1.712
--- slime/ChangeLog:1.711 Sat Jun 11 18:22:23 2005
+++ slime/ChangeLog Sun Jun 12 18:33:49 2005
@@ -1,3 +1,12 @@
+2005-06-12 Christophe Rhodes <csr21 at cam.ac.uk>
+
+ * swank.lisp (ed-in-emacs): allow strings as well as pathnames;
+ don't call emacs for things that the emacs editor doesn't know how
+ to deal with. Return T if we called emacs and NIL if not.
+
+ * slime.el (slime-ed): Change a listp to consp, so that NIL
+ arguments are correctly handled.
+
2005-06-11 Nikodemus Siivola <nikodemus at random-state.net>
* swank-sbcl.lisp: Patched for SBCL HEAD: utilize the new
Index: slime/slime.el
diff -u slime/slime.el:1.507 slime/slime.el:1.508
--- slime/slime.el:1.507 Fri Jun 10 19:51:32 2005
+++ slime/slime.el Sun Jun 12 18:33:49 2005
@@ -5651,7 +5651,7 @@
(select-frame slime-ed-frame))
(cond ((stringp what)
(find-file (slime-from-lisp-filename what)))
- ((listp 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
Index: slime/swank.lisp
diff -u slime/swank.lisp:1.306 slime/swank.lisp:1.307
--- slime/swank.lisp:1.306 Fri Jun 10 19:54:22 2005
+++ slime/swank.lisp Sun Jun 12 18:33:50 2005
@@ -1881,17 +1881,23 @@
"Edit WHAT in Emacs.
WHAT can be:
- A filename (string),
- A list (FILENAME LINE [COLUMN]),
+ A pathname or a string,
+ A list (PATHNAME-OR-STRING LINE [COLUMN]),
A function name (symbol),
- nil."
- (let ((target
- (cond ((and (listp what) (pathnamep (first what)))
- (cons (canonicalize-filename (car what)) (cdr what)))
- ((pathnamep what)
- (canonicalize-filename what))
- (t what))))
- (send-oob-to-emacs `(:ed ,target))))
+ NIL.
+
+Returns true if it actually called emacs, or NIL if not."
+ (flet ((pathname-or-string-p (thing)
+ (or (pathnamep thing) (typep thing 'string))))
+ (let ((target
+ (cond ((and (listp what) (pathname-or-string-p (first what)))
+ (cons (canonicalize-filename (car what)) (cdr what)))
+ ((pathname-or-string-p what)
+ (canonicalize-filename what))
+ ((symbolp what) what)
+ (t (return-from ed-in-emacs nil)))))
+ (send-oob-to-emacs `(:ed ,target))
+ t)))
(defslimefun value-for-editing (form)
"Return a readable value of FORM for editing in Emacs.
More information about the slime-cvs
mailing list