[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112054: Fix command-line-normalize-f
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112054: Fix command-line-normalize-file-name for DOS/Windows file names. |
Date: |
Sat, 16 Mar 2013 10:20:36 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 112054
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2013-03-16 10:20:36 +0200
message:
Fix command-line-normalize-file-name for DOS/Windows file names.
lisp/startup.el (command-line-normalize-file-name): Fix handling of
backslashes in DOS and Windows file names. Reported by Xue Fuqiao
<address@hidden> in
http://lists.gnu.org/archive/html/help-gnu-emacs/2013-03/msg00245.html.
modified:
lisp/ChangeLog
lisp/startup.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-03-15 14:17:25 +0000
+++ b/lisp/ChangeLog 2013-03-16 08:20:36 +0000
@@ -1,3 +1,10 @@
+2013-03-16 Eli Zaretskii <address@hidden>
+
+ * startup.el (command-line-normalize-file-name): Fix handling of
+ backslashes in DOS and Windows file names. Reported by Xue Fuqiao
+ <address@hidden> in
+ http://lists.gnu.org/archive/html/help-gnu-emacs/2013-03/msg00245.html.
+
2013-03-15 Michael Albinus <address@hidden>
Sync with Tramp 2.2.7.
=== modified file 'lisp/startup.el'
--- a/lisp/startup.el 2013-02-12 04:46:18 +0000
+++ b/lisp/startup.el 2013-03-16 08:20:36 +0000
@@ -2399,13 +2399,17 @@
;; Use arg 1 so that we don't collapse // at the start of the file name.
;; That is significant on some systems.
;; However, /// at the beginning is supposed to mean just /, not //.
- (if (string-match "^///+" file)
+ (if (string-match
+ (if (memq system-type '(ms-dos windows-nt))
+ "^\\([\\/][\\/][\\/]\\)+"
+ "^///+")
+ file)
(setq file (replace-match "/" t t file)))
- (and (memq system-type '(ms-dos windows-nt))
- (string-match "^[A-Za-z]:\\(\\\\[\\\\/]\\)" file) ; C:\/ or C:\\
- (setq file (replace-match "/" t t file 1)))
- (while (string-match "//+" file 1)
- (setq file (replace-match "/" t t file)))
+ (if (memq system-type '(ms-dos windows-nt))
+ (while (string-match "\\([\\/][\\/]\\)+" file 1)
+ (setq file (replace-match "/" t t file)))
+ (while (string-match "//+" file 1)
+ (setq file (replace-match "/" t t file))))
file))
;;; startup.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112054: Fix command-line-normalize-file-name for DOS/Windows file names.,
Eli Zaretskii <=