Mercurial > emacs
changeset 108975:c4552014bea2
* net/tramp.el (tramp-remote-process-environment): Protect version
string by apostroph.
(tramp-shell-prompt-pattern): Do not use a shy group in case of
XEmacs.
(tramp-file-name-for-operation): Add `call-process-region'.
(tramp-set-process-query-on-exit-flag): Fix wrong parentheses.
* net/tramp-compat.el (top): Do not autoload
`tramp-handle-file-remote-p'. Load tramp-util.el and tramp-vc.el
only when `start-file-process' is not bound.
(tramp-advice-file-expand-wildcards): Do not use
`tramp-handle-file-remote-p'.
(tramp-compat-make-temp-file): Handle the case, that
`make-temp-file' has no third argument EXTENSION.
author | Michael Albinus <albinus@detlef> |
---|---|
date | Sat, 12 Jun 2010 10:59:37 +0200 |
parents | f282583957c5 |
children | abd6714f59e4 1d9fd74dc4ac |
files | lisp/ChangeLog lisp/net/tramp-compat.el lisp/net/tramp.el |
diffstat | 3 files changed, 65 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Jun 11 20:35:55 2010 -0700 +++ b/lisp/ChangeLog Sat Jun 12 10:59:37 2010 +0200 @@ -1,3 +1,20 @@ +2010-06-12 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-remote-process-environment): Protect version + string by apostroph. + (tramp-shell-prompt-pattern): Do not use a shy group in case of + XEmacs. + (tramp-file-name-for-operation): Add `call-process-region'. + (tramp-set-process-query-on-exit-flag): Fix wrong parentheses. + + * net/tramp-compat.el (top): Do not autoload + `tramp-handle-file-remote-p'. Load tramp-util.el and tramp-vc.el + only when `start-file-process' is not bound. + (tramp-advice-file-expand-wildcards): Do not use + `tramp-handle-file-remote-p'. + (tramp-compat-make-temp-file): Handle the case, that + `make-temp-file' has no third argument EXTENSION. + 2010-06-11 Juanma Barranquero <lekktu@gmail.com> * makefile.w32-in (WINS_BASIC): Include new directory vc. @@ -45,7 +62,7 @@ * net/notifications.el (notifications-on-action-signal) (notifications-on-closed-signal): Pass notification id as first - argument to the callback functions. Add docstrings. + argument to the callback functions. Add docstrings. (notifications-notify): Fix docstring. 2010-06-10 Glenn Morris <rgm@gnu.org>
--- a/lisp/net/tramp-compat.el Fri Jun 11 20:35:55 2010 -0700 +++ b/lisp/net/tramp-compat.el Sat Jun 12 10:59:37 2010 +0200 @@ -44,33 +44,31 @@ (autoload 'tramp-tramp-file-p "tramp") (autoload 'tramp-file-name-handler "tramp") - (autoload 'tramp-handle-file-remote-p "tramp") + + ;; We check whether `start-file-process' is bound. + (unless (fboundp 'start-file-process) - ;; tramp-util offers integration into other (X)Emacs packages like - ;; compile.el, gud.el etc. Not necessary in Emacs 23. - (eval-after-load "tramp" - ;; We check whether `start-file-process' is an alias. - '(when (or (not (fboundp 'start-file-process)) - (symbolp (symbol-function 'start-file-process))) - (require 'tramp-util) - (add-hook 'tramp-unload-hook - '(lambda () - (when (featurep 'tramp-util) - (unload-feature 'tramp-util 'force)))))) - - ;; Make sure that we get integration with the VC package. When it - ;; is loaded, we need to pull in the integration module. Not - ;; necessary in Emacs 23. - (eval-after-load "vc" + ;; tramp-util offers integration into other (X)Emacs packages like + ;; compile.el, gud.el etc. Not necessary in Emacs 23. (eval-after-load "tramp" - ;; We check whether `start-file-process' is an alias. - '(when (or (not (fboundp 'start-file-process)) - (symbolp (symbol-function 'start-file-process))) - (require 'tramp-vc) + '(progn + (require 'tramp-util) (add-hook 'tramp-unload-hook '(lambda () - (when (featurep 'tramp-vc) - (unload-feature 'tramp-vc 'force))))))) + (when (featurep 'tramp-util) + (unload-feature 'tramp-util 'force)))))) + + ;; Make sure that we get integration with the VC package. When it + ;; is loaded, we need to pull in the integration module. Not + ;; necessary in Emacs 23. + (eval-after-load "vc" + (eval-after-load "tramp" + '(progn + (require 'tramp-vc) + (add-hook 'tramp-unload-hook + '(lambda () + (when (featurep 'tramp-vc) + (unload-feature 'tramp-vc 'force)))))))) ;; Avoid byte-compiler warnings if the byte-compiler supports this. ;; Currently, XEmacs supports this. @@ -176,7 +174,8 @@ (if (and (tramp-tramp-file-p name) (not (string-match - "[[*?]" (tramp-handle-file-remote-p name 'localname)))) + "[[*?]" (tramp-compat-funcall + 'file-remote-p name 'localname)))) (setq ad-return-value (list name)) ;; Otherwise, just run the original function. ad-do-it))) @@ -236,22 +235,23 @@ (tramp-compat-temporary-file-directory))) (extension (file-name-extension filename t)) result) - (if (fboundp 'make-temp-file) + (condition-case nil (setq result (tramp-compat-funcall 'make-temp-file prefix dir-flag extension)) - ;; We use our own implementation, taken from files.el. - (while - (condition-case () - (progn - (setq result (concat (make-temp-name prefix) extension)) - (if dir-flag - (make-directory result) - (write-region "" nil result nil 'silent)) - nil) - (file-already-exists t)) - ;; The file was somehow created by someone else between - ;; `make-temp-name' and `write-region', let's try again. - nil)) + (error + ;; We use our own implementation, taken from files.el. + (while + (condition-case () + (progn + (setq result (concat (make-temp-name prefix) extension)) + (if dir-flag + (make-directory result) + (write-region "" nil result nil 'silent)) + nil) + (file-already-exists t)) + ;; The file was somehow created by someone else between + ;; `make-temp-name' and `write-region', let's try again. + nil))) result)) ;; `most-positive-fixnum' does not exist in XEmacs.
--- a/lisp/net/tramp.el Fri Jun 11 20:35:55 2010 -0700 +++ b/lisp/net/tramp.el Sat Jun 12 10:59:37 2010 +0200 @@ -1065,7 +1065,7 @@ `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "LC_ALL=C" ,(format "TERM=%s" tramp-terminal-type) "EMACS=t" ;; Deprecated. - ,(format "INSIDE_EMACS=%s,tramp:%s" emacs-version tramp-version) + ,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version) "CDPATH=" "HISTORY=" "MAIL=" "MAILCHECK=" "MAILPATH=" "autocorrect=" "correct=") @@ -1091,8 +1091,10 @@ (defcustom tramp-shell-prompt-pattern ;; Allow a prompt to start right after a ^M since it indeed would be - ;; displayed at the beginning of the line (and Zsh uses it). - "\\(?:^\\|\r\\)[^#$%>\n]*#?[#$%>] *\\(\e\\[[0-9;]*[a-zA-Z] *\\)*" + ;; displayed at the beginning of the line (and Zsh uses it). This + ;; regexp works only for GNU Emacs. + (concat (if (featurep 'xemacs) "" "\\(?:^\\|\r\\)") + "[^#$%>\n]*#?[#$%>] *\\(\e\\[[0-9;]*[a-zA-Z] *\\)*") "Regexp to match prompts from remote shell. Normally, Tramp expects you to configure `shell-prompt-pattern' correctly, but sometimes it happens that you are connecting to a @@ -5513,7 +5515,8 @@ ;; XEmacs only. 'dired-print-file 'dired-shell-call-process ;; nowhere yet. - 'executable-find 'start-process 'call-process)) + 'executable-find 'start-process + 'call-process 'call-process-region)) default-directory) ;; Unknown file primitive. (t (error "unknown file I/O primitive: %s" operation)))) @@ -8758,7 +8761,7 @@ exiting if process is running." (if (fboundp 'set-process-query-on-exit-flag) (tramp-compat-funcall 'set-process-query-on-exit-flag process flag) - (tramp-compat-funcall 'process-kill-without-query) process flag)) + (tramp-compat-funcall 'process-kill-without-query process flag))) ;; ------------------------------------------------------------ @@ -8914,7 +8917,7 @@ ;; rsync). ;; * Keep a second connection open for out-of-band methods like scp or ;; rsync. -;; * Support ptys in `tramp-handle-start-file-process'. (Bug#4604) +;; * Support ptys in `tramp-handle-start-file-process'. (Bug#4604, Bug#6360) ;; * IMHO, it's a drawback that currently Tramp doesn't support ;; Unicode in Dired file names by default. Is it possible to ;; improve Tramp to set LC_ALL to "C" only for commands where Tramp