]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (tramp-drop-volume-letter): Make it an ordinary
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 25 Mar 2013 09:16:31 +0000 (10:16 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 25 Mar 2013 09:16:31 +0000 (10:16 +0100)
defun.  Defining it as defalias could introduce too eager
byte-compiler optimization.  (Bug#14030)

lisp/ChangeLog
lisp/net/tramp.el

index bd4f0494123fabc61c25474c7e65bec4183d1240..d843e0fa7034759df34f3baea6cc3c24cdf52c62 100644 (file)
@@ -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.
index e392116d1572dc099fa99dffbe015a24156de280..c4c8efcbfe888c7d616825343fdfd1d827f6aeae 100644 (file)
@@ -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."