aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/net/eww.el30
1 files changed, 15 insertions, 15 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 7cb324e2399..6872be4edaa 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1469,21 +1469,21 @@ Differences in #targets are ignored."
1469 string))) 1469 string)))
1470 1470
1471(defun eww-make-unique-file-name (file directory) 1471(defun eww-make-unique-file-name (file directory)
1472 (cond 1472 (cond
1473 ((zerop (length file)) 1473 ((zerop (length file))
1474 (setq file "!")) 1474 (setq file "!"))
1475 ((string-match "\\`[.]" file) 1475 ((string-match "\\`[.]" file)
1476 (setq file (concat "!" file)))) 1476 (setq file (concat "!" file))))
1477 (let ((count 1) 1477 (let ((count 1)
1478 (stem file) 1478 (stem file)
1479 (suffix "")) 1479 (suffix ""))
1480 (when (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file) 1480 (when (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file)
1481 (setq stem (match-string 1) 1481 (setq stem (match-string 1 file)
1482 suffix (match-string 2))) 1482 suffix (match-string 2)))
1483 (while (file-exists-p (expand-file-name file directory)) 1483 (while (file-exists-p (expand-file-name file directory))
1484 (setq file (format "%s(%d)%s" stem count suffix)) 1484 (setq file (format "%s(%d)%s" stem count suffix))
1485 (setq count (1+ count))) 1485 (setq count (1+ count)))
1486 (expand-file-name file directory))) 1486 (expand-file-name file directory)))
1487 1487
1488(defun eww-set-character-encoding (charset) 1488(defun eww-set-character-encoding (charset)
1489 "Set character encoding to CHARSET. 1489 "Set character encoding to CHARSET.