[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114974: Fix problems found while writing a test sui
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] trunk r114974: Fix problems found while writing a test suite. |
Date: |
Tue, 05 Nov 2013 14:20:42 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114974
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Tue 2013-11-05 15:18:41 +0100
message:
Fix problems found while writing a test suite.
* net/tramp-compat.el (tramp-compat-load): New defun.
* net/tramp.el (tramp-handle-load): Use it.
* net/tramp-sh.el (tramp-sh-handle-add-name-to-file): Handle the case
"(numberp ok-if-already-exists)" correctly.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/net/tramp-compat.el
trampcompat.el-20091113204419-o5vbwnq5f7feedwu-7298
lisp/net/tramp-sh.el trampsh.el-20100913133439-a1faifh29eqoi4nh-1
lisp/net/tramp.el tramp.el-20091113204419-o5vbwnq5f7feedwu-2427
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-11-05 09:54:43 +0000
+++ b/lisp/ChangeLog 2013-11-05 14:18:41 +0000
@@ -1,3 +1,13 @@
+2013-11-05 Michael Albinus <address@hidden>
+
+ Fix problems found while writing a test suite.
+
+ * net/tramp-compat.el (tramp-compat-load): New defun.
+ * net/tramp.el (tramp-handle-load): Use it.
+
+ * net/tramp-sh.el (tramp-sh-handle-add-name-to-file): Handle the case
+ "(numberp ok-if-already-exists)" correctly.
+
2013-11-05 Xue Fuqiao <address@hidden>
* international/characters.el (glyphless-char-display-control):
=== modified file 'lisp/net/tramp-compat.el'
--- a/lisp/net/tramp-compat.el 2013-10-17 19:39:22 +0000
+++ b/lisp/net/tramp-compat.el 2013-11-05 14:18:41 +0000
@@ -416,6 +416,13 @@
directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")))
(delete-directory directory))))
+;; MUST-SUFFIX doesn't exist on XEmacs.
+(defun tramp-compat-load (file &optional noerror nomessage nosuffix
must-suffix)
+ "Like `load' for Tramp files (compat function)."
+ (if must-suffix
+ (tramp-compat-funcall 'load file noerror nomessage nosuffix must-suffix)
+ (load file noerror nomessage nosuffix)))
+
;; `number-sequence' does not exist in XEmacs. Implementation is
;; taken from Emacs 23.
(defun tramp-compat-number-sequence (from &optional to inc)
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2013-11-04 14:32:40 +0000
+++ b/lisp/net/tramp-sh.el 2013-11-05 14:18:41 +0000
@@ -1784,21 +1784,21 @@
(with-parsed-tramp-file-name filename v1
(with-parsed-tramp-file-name newname v2
(let ((ln (when v1 (tramp-get-remote-ln v1))))
- (when (and (not ok-if-already-exists)
+ (when (and (numberp ok-if-already-exists)
(file-exists-p newname)
- (not (numberp ok-if-already-exists))
- (y-or-n-p
+ (yes-or-no-p
(format
"File %s already exists; make it a new name anyway? "
newname)))
(tramp-error
- v2 'file-error
- "add-name-to-file: file %s already exists" newname))
+ v2 'file-error "add-name-to-file: file %s already exists" newname))
+ (when ok-if-already-exists (setq ln (concat ln " -f")))
(tramp-flush-file-property v2 (file-name-directory v2-localname))
(tramp-flush-file-property v2 v2-localname)
(tramp-barf-unless-okay
v1
- (format "%s %s %s" ln (tramp-shell-quote-argument v1-localname)
+ (format "%s %s %s" ln
+ (tramp-shell-quote-argument v1-localname)
(tramp-shell-quote-argument v2-localname))
"error with add-name-to-file, see buffer `%s' for details"
(buffer-name))))))
=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2013-11-04 14:32:40 +0000
+++ b/lisp/net/tramp.el 2013-11-05 14:18:41 +0000
@@ -3150,9 +3150,8 @@
(let ((tramp-message-show-message (not nomessage)))
(with-tramp-progress-reporter v 0 (format "Loading %s" file)
(let ((local-copy (file-local-copy file)))
- ;; MUST-SUFFIX doesn't exist on XEmacs, so let it default to nil.
(unwind-protect
- (load local-copy noerror t t)
+ (tramp-compat-load local-copy noerror t nosuffix must-suffix)
(delete-file local-copy)))))
t)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114974: Fix problems found while writing a test suite.,
Michael Albinus <=