Mercurial > emacs
changeset 57463:40298ea4d83f
Sync with Tramp 2.0.45.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Tue, 12 Oct 2004 21:02:43 +0000 |
parents | c6d72c23a106 |
children | 1d5bc0282257 |
files | lisp/ChangeLog lisp/net/tramp-smb.el lisp/net/tramp.el lisp/net/trampver.el man/ChangeLog man/tramp.texi man/trampver.texi |
diffstat | 7 files changed, 72 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Oct 12 18:01:36 2004 +0000 +++ b/lisp/ChangeLog Tue Oct 12 21:02:43 2004 +0000 @@ -1,3 +1,23 @@ +2004-10-12 Michael Albinus <michael.albinus@gmx.de> + + Sync with Tramp 2.0.45. + + * net/tramp.el (top): Apply `def-edebug-spec' only if function is + defined. This is not the case for XEmacs without package + "edebug". + (tramp-set-auto-save-file-modes): Set permissions of autosaved + remote files to the permissions of the original file. This is not + the case for Emacs < 21.3.50 and XEmacs < 21.5. Add function to + `auto-save-hook'. Reported by Thomas Prokosch <thomas@nadev.net>. + (tramp-perl-decode): Fixed an error in Perl implementation. + $pending must be cleared every loop. Reported by Benjamin Place + <benjaminplace@sprintmail.com> + + * net/tramp-smb.el (tramp-smb-advice-PC-do-completion): Don't + activate advice during definition. This is done later on, + depending on test result of `substitute-in-file-name'. Suggested + by Stefan Monnier <monnier@iro.umontreal.ca>. + 2004-10-12 David Ponce <david@dponce.com> * recentf.el (recentf-edit-list): Update the menu when the recentf
--- a/lisp/net/tramp-smb.el Tue Oct 12 18:01:36 2004 +0000 +++ b/lisp/net/tramp-smb.el Tue Oct 12 21:02:43 2004 +0000 @@ -1087,7 +1087,7 @@ ;; `PC-do-completion' touches the returning "$$" by `substitute-in-file-name'. ;; Must be corrected. -(defadvice PC-do-completion (around tramp-smb-advice-PC-do-completion activate) +(defadvice PC-do-completion (around tramp-smb-advice-PC-do-completion) "Changes \"$\" back to \"$$\" in minibuffer." (if (funcall PC-completion-as-file-name-predicate) @@ -1123,6 +1123,13 @@ ;; No file names. Behave unchanged. ad-do-it)) +;; Activate advice. Recent Emacsen don't need that. +(when (functionp 'PC-do-completion) + (condition-case nil + (substitute-in-file-name "C$/") + (error + (ad-activate 'PC-do-completion)))) + (provide 'tramp-smb) ;;; TODO:
--- a/lisp/net/tramp.el Tue Oct 12 18:01:36 2004 +0000 +++ b/lisp/net/tramp.el Tue Oct 12 21:02:43 2004 +0000 @@ -1668,6 +1668,7 @@ my $len = length($pending); my $chunk = substr($pending, 0, $len & ~3); + $pending = substr($pending, $len & ~3 + 1); # Easy method: translate from chars to (pregenerated) six-bit packets, join, # split in 8-bit chunks and convert back to char. @@ -1883,7 +1884,11 @@ (put 'with-parsed-tramp-file-name 'lisp-indent-function 2) ;; To be activated for debugging containing this macro -(def-edebug-spec with-parsed-tramp-file-name t) +;; It works only when VAR is nil. Otherwise, it can be deactivated by +;; (def-edebug-spec with-parsed-tramp-file-name 0) +;; I'm too stupid to write a precise SPEC for it. +(if (functionp 'def-edebug-spec) + (def-edebug-spec with-parsed-tramp-file-name t)) (defmacro tramp-let-maybe (variable value &rest body) "Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete. @@ -6731,6 +6736,31 @@ (tramp-make-auto-save-file-name (buffer-file-name))) ad-do-it)) +;; In Emacs < 21.4 and XEmacs < 21.5 autosaved remote files have +;; permission 666 minus umask. This is a security threat. + +(defun tramp-set-auto-save-file-modes () + "Set permissions of autosaved remote files to the original permissions." + (let ((bfn (buffer-file-name))) + (when (and (stringp bfn) + (tramp-tramp-file-p bfn) + (stringp buffer-auto-save-file-name) + (not (equal bfn buffer-auto-save-file-name)) + (not (file-exists-p buffer-auto-save-file-name))) + (write-region "" nil buffer-auto-save-file-name) + (set-file-modes buffer-auto-save-file-name (file-modes bfn))))) + +(unless (or (> emacs-major-version 21) + (and (featurep 'xemacs) + (= emacs-major-version 21) + (> emacs-minor-version 4)) + (and (not (featurep 'xemacs)) + (= emacs-major-version 21) + (or (> emacs-minor-version 3) + (and (string-match "^21\\.3\\.\\([0-9]+\\)" emacs-version) + (>= (string-to-int (match-string 1 emacs-version)) 50))))) + (add-hook 'auto-save-hook 'tramp-set-auto-save-file-modes)) + (defun tramp-subst-strs-in-string (alist string) "Replace all occurrences of the string FROM with TO in STRING. ALIST is of the form ((FROM . TO) ...)."
--- a/lisp/net/trampver.el Tue Oct 12 18:01:36 2004 +0000 +++ b/lisp/net/trampver.el Tue Oct 12 21:02:43 2004 +0000 @@ -30,7 +30,7 @@ ;; are auto-frobbed from configure.ac, so you should edit that file and run ;; "autoconf && ./configure" to change them. -(defconst tramp-version "2.0.44" +(defconst tramp-version "2.0.45" "This version of Tramp.") (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org"
--- a/man/ChangeLog Tue Oct 12 18:01:36 2004 +0000 +++ b/man/ChangeLog Tue Oct 12 21:02:43 2004 +0000 @@ -1,3 +1,11 @@ +2004-10-12 Michael Albinus <michael.albinus@gmx.de> + + Sync with Tramp 2.0.45. + + * tramp.texi (Frequently Asked Questions): Comment paragraph about + plink link. The URL is outdated. Originator contacted for + clarification. + 2004-10-10 Juri Linkov <juri@jurta.org> * gnus.texi (Top, Marking Articles): Join two menus in one node
--- a/man/tramp.texi Tue Oct 12 18:01:36 2004 +0000 +++ b/man/tramp.texi Tue Oct 12 21:02:43 2004 +0000 @@ -1952,9 +1952,12 @@ many thanks to Joe Stoy for providing the information: @uref{ftp://ftp.comlab.ox.ac.uk/tmp/Joe.Stoy/} +@c The link is broken. I've contacted Tom for clarification. Michael. +@ignore The above mostly contains patches to old ssh versions; Tom Roche has a Web page with instructions: @uref{http://www4.ncsu.edu/~tlroche/plinkTramp.html} +@end ignore ??? Is the XEmacs info correct?
--- a/man/trampver.texi Tue Oct 12 18:01:36 2004 +0000 +++ b/man/trampver.texi Tue Oct 12 21:02:43 2004 +0000 @@ -4,7 +4,7 @@ @c In the Tramp CVS, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.0.44 +@set trampver 2.0.45 @c Other flags from configuration @set prefix /usr/local