summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-05-18 13:21:11 +0000
committerGerd Moellmann <gerd@gnu.org>2001-05-18 13:21:11 +0000
commita724ed38f57fca26f7c973a87b396409da4e191b (patch)
treedc0c5b28b99375ed0ba9e9e48149da11215ec426 /lisp
parent0595722b7c732d17c22859ca5327c41e4d93b72e (diff)
downloademacs-a724ed38f57fca26f7c973a87b396409da4e191b.tar.gz
emacs-a724ed38f57fca26f7c973a87b396409da4e191b.tar.bz2
emacs-a724ed38f57fca26f7c973a87b396409da4e191b.zip
(ange-ftp-fix-name-for-vms): Reverse args of
subst-char-in-string. (ange-ftp-after-parse-ls-hook): New variable. (ange-ftp-ls): Run that hook. From Peter Milliken <Peter.Milliken@GTECH.COM>.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/ange-ftp.el12
2 files changed, 16 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 735ed5f3182..b32a3154ed2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
2001-05-18 Gerd Moellmann <gerd@gnu.org>
+ * net/ange-ftp.el (ange-ftp-fix-name-for-vms): Reverse args of
+ subst-char-in-string.
+ (ange-ftp-after-parse-ls-hook): New variable.
+ (ange-ftp-ls): Run that hook.
+ From Peter Milliken <Peter.Milliken@GTECH.COM>.
+
* tmm.el (tmm-get-keymap): Fix handling of :filter.
(tmm-add-prompt): Bind buffer-read-only to nil when inserting
text into *Completions*.
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 9f3a2ed752e..a74a7799fa0 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -2431,6 +2431,9 @@ which can parse the output from a DIR listing for a host of type TYPE.")
(defvar ange-ftp-before-parse-ls-hook nil
"Normal hook run before parsing the text of an ftp directory listing.")
+(defvar ange-ftp-after-parse-ls-hook nil
+ "Normal hook run after parsing the text of an ftp directory listing.")
+
(defun ange-ftp-ls (file lsargs parse &optional no-error wildcard)
"Return the output of an `DIR' or `ls' command done over ftp.
FILE is the full name of the remote file, LSARGS is any args to pass to the
@@ -2502,6 +2505,11 @@ away in the internal cache."
ange-ftp-parse-list-func-alist)))
(funcall parse-func)
(ange-ftp-parse-dired-listing lsargs))))
+ ;; Place this hook here to convert the contents of the
+ ;; buffer to a ls compatible format if the host system
+ ;; that is being queried is other than Unix i.e. VMS
+ ;; returns an ls format that really sucks.
+ (run-hooks 'ange-ftp-after-parse-ls-hook)
(setq ange-ftp-ls-cache-file key
ange-ftp-ls-cache-lsargs lsargs
; For dumb hosts-types this is
@@ -4767,7 +4775,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
(substring name (match-beginning 3) (match-end 3))))
(and dir
(setq dir (subst-char-in-string
- ?. ?/ (substring dir 1 -1) t)))
+ ?/ ?. (substring dir 1 -1) t)))
(concat (and drive
(concat "/" drive "/"))
dir (and dir "/")
@@ -4780,7 +4788,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
name (substring name (match-end 0))))
(setq tmp (file-name-directory name))
(if tmp
- (setq dir (subst-char-in-string ?. ?/ (substring tmp 0 -1) t)))
+ (setq dir (subst-char-in-string ?/ ?. (substring tmp 0 -1) t)))
(setq file (file-name-nondirectory name))
(concat drive
(and dir (concat "[" (if drive nil ".") dir "]"))