Mercurial > emacs
comparison lisp/startup.el @ 14729:b072589a6e57
(command-line-normalize-file-name): Do save-match-data.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 01 Mar 1996 20:13:01 +0000 |
parents | f70d94fe685f |
children | 20f4c4a078b2 |
comparison
equal
deleted
inserted
replaced
14728:3ce3907bd215 | 14729:b072589a6e57 |
---|---|
909 (progn (other-window 1) | 909 (progn (other-window 1) |
910 (buffer-menu))))))) | 910 (buffer-menu))))))) |
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 |