[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ineffient code in tramp.el
From: |
Kim F. Storm |
Subject: |
Ineffient code in tramp.el |
Date: |
Mon, 06 Jun 2005 14:16:28 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Tramp has this function:
(defun tramp-match-string-list (&optional string)
"Returns list of all match strings.
That is, (list (match-string 0) (match-string 1) ...), according to the
number of matches."
(let* ((nmatches (/ (length (match-data)) 2))
(i (- nmatches 1))
(res nil))
(while (>= i 0)
(setq res (cons (match-string i string) res))
(setq i (- i 1)))
res))
It is used in function tramp-wait-for-regexp only, and all uses of
that function only tests whether the return value is nil or non-nil.
So the above code seems like vast overkill to me :-)
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Ineffient code in tramp.el,
Kim F. Storm <=