summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2013-03-25 10:16:31 +0100
committerMichael Albinus <michael.albinus@gmx.de>2013-03-25 10:16:31 +0100
commit4430bd53998ea752ce99b1c25384cf7cfabcef88 (patch)
tree491703f4653c1adf7ac86c228f01e1d9e0867232 /lisp
parent89468837dbba9ae8c1bb662ade79670eeb97e65c (diff)
downloademacs-4430bd53998ea752ce99b1c25384cf7cfabcef88.tar.gz
* net/tramp.el (tramp-drop-volume-letter): Make it an ordinary
defun. Defining it as defalias could introduce too eager byte-compiler optimization. (Bug#14030)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/tramp.el19
2 files changed, 12 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bd4f0494123..d843e0fa703 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2013-03-25 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-drop-volume-letter): Make it an ordinary
+ defun. Defining it as defalias could introduce too eager
+ byte-compiler optimization. (Bug#14030)
+
2013-03-25 Chong Yidong <cyd@gnu.org>
* iswitchb.el (iswitchb-read-buffer): Fix typo.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index e392116d157..c4c8efcbfe8 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1565,23 +1565,16 @@ FILE must be a local file name on a connection identified via VEC."
(tramp-compat-font-lock-add-keywords
'emacs-lisp-mode '("\\<with-tramp-connection-property\\>"))
-(defalias 'tramp-drop-volume-letter
- (if (memq system-type '(cygwin windows-nt))
- (lambda (name)
- "Cut off unnecessary drive letter from file NAME.
+(defun tramp-drop-volume-letter (name)
+ "Cut off unnecessary drive letter from file NAME.
The functions `tramp-*-handle-expand-file-name' call `expand-file-name'
locally on a remote file name. When the local system is a W32 system
but the remote system is Unix, this introduces a superfluous drive
letter into the file name. This function removes it."
- (save-match-data
- (if (string-match "\\`[a-zA-Z]:/" name)
- (replace-match "/" nil t name)
- name)))
-
- 'identity))
-
-(if (featurep 'xemacs)
- (defalias 'tramp-drop-volume-letter 'identity))
+ (save-match-data
+ (if (string-match "\\`[a-zA-Z]:/" name)
+ (replace-match "/" nil t name)
+ name)))
(defun tramp-cleanup (vec)
"Cleanup connection VEC, but keep the debug buffer."