aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-03-01 20:13:01 +0000
committerRichard M. Stallman1996-03-01 20:13:01 +0000
commit6b9e794f8cc0af8cd8e2eaf041e19d5d41e927e1 (patch)
treee393b76570958805bf16d6f782926525fbae3772
parent6a21225cd1052b665c583fa34904a23c49de0af6 (diff)
downloademacs-6b9e794f8cc0af8cd8e2eaf041e19d5d41e927e1.tar.gz
emacs-6b9e794f8cc0af8cd8e2eaf041e19d5d41e927e1.zip
(command-line-normalize-file-name): Do save-match-data.
-rw-r--r--lisp/startup.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 16214b17656..db74a389f66 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -911,13 +911,14 @@ Type \\[describe-distribution] for information on getting the latest version."))
911 911
912(defun command-line-normalize-file-name (file) 912(defun command-line-normalize-file-name (file)
913 "Collapse multiple slashes to one, to handle non-Emacs file names." 913 "Collapse multiple slashes to one, to handle non-Emacs file names."
914 ;; Use arg 1 so that we don't collapse // at the start of the file name. 914 (save-match-data
915 ;; That is significant on some systems. 915 ;; Use arg 1 so that we don't collapse // at the start of the file name.
916 ;; However, /// at the beginning is supposed to mean just /, not //. 916 ;; That is significant on some systems.
917 (if (string-match "^///+" file) 917 ;; However, /// at the beginning is supposed to mean just /, not //.
918 (setq file (replace-match "/" t t file))) 918 (if (string-match "^///+" file)
919 (while (string-match "//+" file 1) 919 (setq file (replace-match "/" t t file)))
920 (setq file (replace-match "/" t t file))) 920 (while (string-match "//+" file 1)
921 file) 921 (setq file (replace-match "/" t t file)))
922 file))
922 923
923;;; startup.el ends here 924;;; startup.el ends here