aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/net/tramp.el89
-rw-r--r--lisp/net/trampver.el4
3 files changed, 55 insertions, 45 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 358c674639e..4485c992b3a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12010-10-21 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-get-inline-coding): Return `nil' in case of
4 errors.
5
6 * net/trampver.el: Update release number.
7
12010-10-20 Kenichi Handa <handa@m17n.org> 82010-10-20 Kenichi Handa <handa@m17n.org>
2 9
3 * face-remap.el (text-scale-adjust): Call read-event with a proper 10 * face-remap.el (text-scale-adjust): Call read-event with a proper
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 3ee5509276e..426785dd9a4 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -8578,54 +8578,57 @@ If no corresponding command is found, nil is returned.
8578Otherwise, either a string is returned which contains a `%s' mark 8578Otherwise, either a string is returned which contains a `%s' mark
8579to be used for the respective input or output file; or a Lisp 8579to be used for the respective input or output file; or a Lisp
8580function cell is returned to be applied on a buffer." 8580function cell is returned to be applied on a buffer."
8581 (let ((coding 8581 ;; We must catch the errors, because we want to return `nil', when
8582 (with-connection-property vec prop 8582 ;; no inline coding is found.
8583 (tramp-find-inline-encoding vec) 8583 (ignore-errors
8584 (tramp-get-connection-property vec prop nil))) 8584 (let ((coding
8585 (prop1 (if (string-match "encoding" prop) 8585 (with-connection-property vec prop
8586 "inline-compress" "inline-decompress")) 8586 (tramp-find-inline-encoding vec)
8587 compress) 8587 (tramp-get-connection-property vec prop nil)))
8588 ;; The connection property might have been cached. So we must send 8588 (prop1 (if (string-match "encoding" prop)
8589 ;; the script to the remote side - maybe. 8589 "inline-compress" "inline-decompress"))
8590 (when (and coding (symbolp coding) (string-match "remote" prop)) 8590 compress)
8591 (let ((name (symbol-name coding))) 8591 ;; The connection property might have been cached. So we must
8592 (while (string-match (regexp-quote "-") name) 8592 ;; send the script to the remote side - maybe.
8593 (setq name (replace-match "_" nil t name))) 8593 (when (and coding (symbolp coding) (string-match "remote" prop))
8594 (tramp-maybe-send-script vec (symbol-value coding) name) 8594 (let ((name (symbol-name coding)))
8595 (setq coding name))) 8595 (while (string-match (regexp-quote "-") name)
8596 (when coding 8596 (setq name (replace-match "_" nil t name)))
8597 ;; Check for the `compress' command. 8597 (tramp-maybe-send-script vec (symbol-value coding) name)
8598 (setq compress (tramp-get-inline-compress vec prop1 size)) 8598 (setq coding name)))
8599 ;; Return the value. 8599 (when coding
8600 (cond 8600 ;; Check for the `compress' command.
8601 ((and compress (symbolp coding)) 8601 (setq compress (tramp-get-inline-compress vec prop1 size))
8602 (if (string-match "decompress" prop1) 8602 ;; Return the value.
8603 (cond
8604 ((and compress (symbolp coding))
8605 (if (string-match "decompress" prop1)
8606 `(lambda (beg end)
8607 (,coding beg end)
8608 (let ((coding-system-for-write 'binary)
8609 (coding-system-for-read 'binary))
8610 (apply
8611 'call-process-region (point-min) (point-max)
8612 (car (split-string ,compress)) t t nil
8613 (cdr (split-string ,compress)))))
8603 `(lambda (beg end) 8614 `(lambda (beg end)
8604 (,coding beg end)
8605 (let ((coding-system-for-write 'binary) 8615 (let ((coding-system-for-write 'binary)
8606 (coding-system-for-read 'binary)) 8616 (coding-system-for-read 'binary))
8607 (apply 8617 (apply
8608 'call-process-region (point-min) (point-max) 8618 'call-process-region beg end
8609 (car (split-string ,compress)) t t nil 8619 (car (split-string ,compress)) t t nil
8610 (cdr (split-string ,compress))))) 8620 (cdr (split-string ,compress))))
8611 `(lambda (beg end) 8621 (,coding (point-min) (point-max)))))
8612 (let ((coding-system-for-write 'binary) 8622 ((symbolp coding)
8613 (coding-system-for-read 'binary)) 8623 coding)
8614 (apply 8624 ((and compress (string-match "decoding" prop))
8615 'call-process-region beg end 8625 (format "(%s | %s >%%s)" coding compress))
8616 (car (split-string ,compress)) t t nil 8626 (compress
8617 (cdr (split-string ,compress)))) 8627 (format "(%s <%%s | %s)" compress coding))
8618 (,coding (point-min) (point-max))))) 8628 ((string-match "decoding" prop)
8619 ((symbolp coding) 8629 (format "%s >%%s" coding))
8620 coding) 8630 (t
8621 ((and compress (string-match "decoding" prop)) 8631 (format "%s <%%s" coding)))))))
8622 (format "(%s | %s >%%s)" coding compress))
8623 (compress
8624 (format "(%s <%%s | %s)" compress coding))
8625 ((string-match "decoding" prop)
8626 (format "%s >%%s" coding))
8627 (t
8628 (format "%s <%%s" coding))))))
8629 8632
8630(defun tramp-get-method-parameter (method param) 8633(defun tramp-get-method-parameter (method param)
8631 "Return the method parameter PARAM. 8634 "Return the method parameter PARAM.
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index a002ebebbf2..f8b0a8455a4 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -30,14 +30,14 @@
30;; version check is defined in macro AC_EMACS_INFO of aclocal.m4; 30;; version check is defined in macro AC_EMACS_INFO of aclocal.m4;
31;; should be changed only there. 31;; should be changed only there.
32 32
33(defconst tramp-version "2.1.19" 33(defconst tramp-version "2.1.20-pre"
34 "This version of Tramp.") 34 "This version of Tramp.")
35 35
36(defconst tramp-bug-report-address "tramp-devel@gnu.org" 36(defconst tramp-bug-report-address "tramp-devel@gnu.org"
37 "Email address to send bug reports to.") 37 "Email address to send bug reports to.")
38 38
39;; Check for (X)Emacs version. 39;; Check for (X)Emacs version.
40(let ((x (if (or (>= emacs-major-version 22) (and (featurep 'xemacs) (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" (format "Tramp 2.1.19 is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version))))))) 40(let ((x (if (or (>= emacs-major-version 22) (and (featurep 'xemacs) (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" (format "Tramp 2.1.20-pre is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version)))))))
41 (unless (string-match "\\`ok\\'" x) (error "%s" x))) 41 (unless (string-match "\\`ok\\'" x) (error "%s" x)))
42 42
43(provide 'trampver) 43(provide 'trampver)