# HG changeset patch # User Richard M. Stallman # Date 825711181 0 # Node ID b072589a6e57fe8c8986d67dcb7d38ac49c35ef5 # Parent 3ce3907bd21597daa08cf5902391e0e82a77bcc7 (command-line-normalize-file-name): Do save-match-data. diff -r 3ce3907bd215 -r b072589a6e57 lisp/startup.el --- a/lisp/startup.el Fri Mar 01 20:11:49 1996 +0000 +++ b/lisp/startup.el Fri Mar 01 20:13:01 1996 +0000 @@ -911,13 +911,14 @@ (defun command-line-normalize-file-name (file) "Collapse multiple slashes to one, to handle non-Emacs file names." - ;; 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) - (setq file (replace-match "/" t t file))) - (while (string-match "//+" file 1) - (setq file (replace-match "/" t t file))) - file) + (save-match-data + ;; 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) + (setq file (replace-match "/" t t file))) + (while (string-match "//+" file 1) + (setq file (replace-match "/" t t file))) + file)) ;;; startup.el ends here