Commit 63900fcf authored by Sam Steingold's avatar Sam Steingold
Browse files

(browse-url-file-url): Check for null maps.

parent c98863bf
2000-09-25 Sam Steingold <sds@gnu.org>
* net/browse-url.el (browse-url-file-url): Check for null maps.
2000-09-26 Gerd Moellmann <gerd@gnu.org> 2000-09-26 Gerd Moellmann <gerd@gnu.org>
* frame.el (frame-notice-user-settings): Make tool-bar-mode and * frame.el (frame-notice-user-settings): Make tool-bar-mode and
......
...@@ -540,14 +540,9 @@ Use variable `browse-url-filename-alist' to map filenames to URLs." ...@@ -540,14 +540,9 @@ Use variable `browse-url-filename-alist' to map filenames to URLs."
(while (string-match "[*\"()',=;? ]" file) (while (string-match "[*\"()',=;? ]" file)
(let ((enc (format "%%%x" (aref file (match-beginning 0))))) (let ((enc (format "%%%x" (aref file (match-beginning 0)))))
(setq file (replace-match enc t t file)))) (setq file (replace-match enc t t file))))
(let ((maps browse-url-filename-alist)) (dolist (map browse-url-filename-alist)
(while maps (when (and map (string-match (car map) file))
(let* ((map (car maps)) (setq file (replace-match (cdr map) t nil file))))
(from-re (car map))
(to-string (cdr map)))
(setq maps (cdr maps))
(and (string-match from-re file)
(setq file (replace-match to-string t nil file))))))
file) file)
;;;###autoload ;;;###autoload
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment