]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove compat functions from gnus-html.el
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 13 Feb 2016 06:00:05 +0000 (17:00 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 13 Feb 2016 06:00:05 +0000 (17:00 +1100)
* lisp/gnus/gnus-html.el (gnus-html-encode-url-chars): Remove.

lisp/gnus/gnus-html.el

index f3b5b96bfdbb62831d3ac417a99362802789ec33..6d6e094cc4f35e228be3622a88e8ec2f88e9b239 100644 (file)
@@ -88,27 +88,9 @@ fit these criteria."
     (define-key map [tab] 'widget-forward)
     map))
 
-(eval-and-compile
-  (defalias 'gnus-html-encode-url-chars
-    (if (fboundp 'browse-url-url-encode-chars)
-       'browse-url-url-encode-chars
-      (lambda (text chars)
-       "URL-encode the chars in TEXT that match CHARS.
-CHARS is a regexp-like character alternative (e.g., \"[)$]\")."
-       (let ((encoded-text (copy-sequence text))
-             (s 0))
-         (while (setq s (string-match chars encoded-text s))
-           (setq encoded-text
-                 (replace-match (format "%%%x"
-                                        (string-to-char
-                                         (match-string 0 encoded-text)))
-                                t t encoded-text)
-                 s (1+ s)))
-         encoded-text)))))
-
 (defun gnus-html-encode-url (url)
   "Encode URL."
-  (gnus-html-encode-url-chars url "[)$ ]"))
+  (browse-url-url-encode-chars url "[)$ ]"))
 
 (defun gnus-html-cache-expired (url ttl)
   "Check if URL is cached for more than TTL."