From 97ab3539e0676ef78c2bced0f0c9ce48439fa2ee Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Tue, 5 Oct 2010 01:23:11 +0000 Subject: [PATCH] shr.el: Revert last change. --- lisp/gnus/ChangeLog | 6 ------ lisp/gnus/shr.el | 21 +-------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 95486cbca3f..a2371a51b48 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,9 +1,3 @@ -2010-10-05 Katsumi Yamaoka - - * shr.el (shr-encode-url-chars): New function, that's an alias to - browse-url-url-encode-chars or a copy of it. - (shr-tag-img): Use it. - 2010-10-04 Lars Magne Ingebrigtsen * shr.el (shr-tag-blockquote): Ensure paragraph after quote, too. diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index e97ca1da47a..59d7b784a1f 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -191,25 +191,6 @@ redirects somewhere else." (copy-region-as-kill (point-min) (point-max)) (message "Copied %s" url)))))) -(eval-and-compile - (defalias 'shr-encode-url-chars - ;; Neither Emacs 22 nor XEmacs provides this function. - (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 shr-tag-img (cont) (when (and (> (current-column) 0) (not (eq shr-state 'image))) @@ -223,7 +204,7 @@ CHARS is a regexp-like character alternative (e.g., \"[)$]\")." ((and shr-blocked-images (string-match shr-blocked-images url)) (insert alt)) - ((url-is-cached (shr-encode-url-chars url "[&)$ ]")) + ((url-is-cached (browse-url-url-encode-chars url "[&)$ ]")) (shr-put-image (shr-get-image-data url) (point) alt)) (t (insert alt) -- 2.39.2