[slime-cvs] CVS update: slime/ChangeLog slime/slime.el
Peter Seibel
pseibel at common-lisp.net
Thu Feb 26 22:31:13 UTC 2004
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv866
Modified Files:
ChangeLog slime.el
Log Message:
Changing connection list to use text-properties instead of regexp to find connection.
Date: Thu Feb 26 17:31:13 2004
Author: pseibel
Index: slime/ChangeLog
diff -u slime/ChangeLog:1.270 slime/ChangeLog:1.271
--- slime/ChangeLog:1.270 Thu Feb 26 14:20:04 2004
+++ slime/ChangeLog Thu Feb 26 17:31:13 2004
@@ -1,5 +1,11 @@
2004-02-26 Peter Seibel <peter at javamonkey.com>
+ * slime.el (slime-draw-connection-list): Use text-properties to
+ associate the connections each line of the connections list
+ buffer.
+
+2004-02-26 Peter Seibel <peter at javamonkey.com>
+
* slime.el (slime-list-connections): Make the buffer created by
this function do a bit more: Can use it to switch to different
connections and change the default.
Index: slime/slime.el
diff -u slime/slime.el:1.221 slime/slime.el:1.222
--- slime/slime.el:1.221 Thu Feb 26 14:20:04 2004
+++ slime/slime.el Thu Feb 26 17:31:13 2004
@@ -4709,24 +4709,16 @@
(defun slime-goto-connection ()
(interactive)
(let ((slime-dispatching-connection
- (slime-find-connection-by-type-name
- (slime-extract-type-name-from-line))))
+ (get-text-property (point) 'slime-connection)))
(slime-switch-to-output-buffer)))
(defun slime-connection-list-make-default ()
(interactive)
(let ((slime-dispatching-connection
- (slime-find-connection-by-type-name
- (slime-extract-type-name-from-line))))
+ (get-text-property (point) 'slime-connection)))
(slime-make-default-connection)
(slime-draw-connection-list)))
-(defun slime-extract-type-name-from-line ()
- (save-excursion
- (beginning-of-line)
- (search-forward-regexp "[0-9]\\s *\\([0-9a-zA-Z]+\\)")
- (match-string 1)))
-
(defun slime-list-connections ()
"Display a list of all connections."
(interactive)
@@ -4744,8 +4736,9 @@
(insert
(format "%s%2s %-7s %-17s %-7s %-s\n" " " "--" "----" "----" "---" "----"))
(dolist (p (reverse slime-net-processes))
- (let ((slime-dispatching-connection p))
- (if (eq default p) (setf default-pos (point)))
+ (let ((slime-dispatching-connection p)
+ (line-start (point)))
+ (if (eq default p) (setf default-pos line-start))
(insert
(slime-with-connection-buffer (p)
(format "%s%2d %-7s %-17s %-7s %-s\n"
@@ -4754,7 +4747,8 @@
(slime-lisp-implementation-type-name)
(or (process-id p) (process-contact p))
(slime-pid)
- (slime-lisp-implementation-type))))))))
+ (slime-lisp-implementation-type))))
+ (add-text-properties line-start (point) (list 'slime-connection p))))))
(with-current-buffer (get-buffer "*SLIME connections*")
(goto-char default-pos))))
More information about the slime-cvs
mailing list