diff options
author | Sam Steingold <sds@gnu.org> | 2000-09-26 13:05:29 +0000 |
---|---|---|
committer | Sam Steingold <sds@gnu.org> | 2000-09-26 13:05:29 +0000 |
commit | 63900fcf00b94b4e474fbc07b66eeb4354bd084f (patch) | |
tree | 5d71671cf8d3d00c55f16263cd83f44e5d89d250 /lisp/net/browse-url.el | |
parent | c98863bfb9eb38e1f14a62d2094c2498e51b6cc8 (diff) | |
download | emacs-63900fcf00b94b4e474fbc07b66eeb4354bd084f.tar.gz |
(browse-url-file-url): Check for null maps.
Diffstat (limited to 'lisp/net/browse-url.el')
-rw-r--r-- | lisp/net/browse-url.el | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 27b7aabb095..5b37ea1ea88 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -405,7 +405,7 @@ These might set its size, for instance." :type '(repeat (string :tag "Argument")) :group 'browse-url) -(defcustom browse-url-lynx-emacs-args (and (not window-system) +(defcustom browse-url-lynx-emacs-args (and (not window-system) '("-show_cursor")) "A list of strings defining options for Lynx in an Emacs buffer. @@ -540,14 +540,9 @@ Use variable `browse-url-filename-alist' to map filenames to URLs." (while (string-match "[*\"()',=;? ]" file) (let ((enc (format "%%%x" (aref file (match-beginning 0))))) (setq file (replace-match enc t t file)))) - (let ((maps browse-url-filename-alist)) - (while maps - (let* ((map (car maps)) - (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)))))) + (dolist (map browse-url-filename-alist) + (when (and map (string-match (car map) file)) + (setq file (replace-match (cdr map) t nil file)))) file) ;;;###autoload |