+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.
* 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>
(autoload 'tramp-tramp-file-p "tramp")
(autoload 'tramp-file-name-handler "tramp")
- (autoload 'tramp-handle-file-remote-p "tramp")
-
- ;; 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"
+
+ ;; 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-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.
(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)))
(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.
`("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=")
(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
;; 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))))
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)))
;; ------------------------------------------------------------
;; 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