/[emacs]/emacs/lisp/eshell/esh-util.el
ViewVC logotype

Diff of /emacs/lisp/eshell/esh-util.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by miles, Mon Sep 1 15:45:23 2003 UTC revision 1.21 by johnw, Tue May 31 00:14:26 2005 UTC
# Line 253  If N or M is nil, it means the end of th Line 253  If N or M is nil, it means the end of th
253          parts)          parts)
254      (if (and (eshell-under-windows-p)      (if (and (eshell-under-windows-p)
255               (> len 2)               (> len 2)
256               (eq (aref path 0) directory-sep-char)               (eq (aref path 0) ?/)
257               (eq (aref path 1) directory-sep-char))               (eq (aref path 1) ?/))
258          (setq i 2))          (setq i 2))
259      (while (< i len)      (while (< i len)
260        (if (and (eq (aref path i) directory-sep-char)        (if (and (eq (aref path i) ?/)
261                 (not (get-text-property i 'escaped path)))                 (not (get-text-property i 'escaped path)))
262            (setq parts (cons (if (= li i)            (setq parts (cons (if (= li i) "/"
                                 (char-to-string directory-sep-char)  
263                                (substring path li (1+ i))) parts)                                (substring path li (1+ i))) parts)
264                  li (1+ i)))                  li (1+ i)))
265        (setq i (1+ i)))        (setq i (1+ i)))
# Line 268  If N or M is nil, it means the end of th Line 267  If N or M is nil, it means the end of th
267          (setq parts (cons (substring path li i) parts)))          (setq parts (cons (substring path li i) parts)))
268      (if (and (eshell-under-windows-p)      (if (and (eshell-under-windows-p)
269               (string-match "\\`[A-Za-z]:\\'" (car (last parts))))               (string-match "\\`[A-Za-z]:\\'" (car (last parts))))
270          (setcar (last parts)          (setcar (last parts) (concat (car (last parts)) "/")))
                 (concat (car (last parts))  
                         (char-to-string directory-sep-char))))  
271      (nreverse parts)))      (nreverse parts)))
272    
273  (defun eshell-to-flat-string (value)  (defun eshell-to-flat-string (value)
# Line 450  list." Line 447  list."
447                                   (point) (progn (end-of-line)                                   (point) (progn (end-of-line)
448                                                  (point))) ":")))                                                  (point))) ":")))
449              (if (and (and fields (nth 0 fields) (nth 2 fields))              (if (and (and fields (nth 0 fields) (nth 2 fields))
450                       (not (assq (string-to-int (nth 2 fields)) names)))                       (not (assq (string-to-number (nth 2 fields)) names)))
451                  (setq names (cons (cons (string-to-int (nth 2 fields))                  (setq names (cons (cons (string-to-number (nth 2 fields))
452                                          (nth 0 fields))                                          (nth 0 fields))
453                                    names))))                                    names))))
454            (forward-line))))            (forward-line))))

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26