aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatsumi Yamaoka2010-10-05 01:23:11 +0000
committerKatsumi Yamaoka2010-10-05 01:23:11 +0000
commit97ab3539e0676ef78c2bced0f0c9ce48439fa2ee (patch)
tree61932b3c37d7e6d73a49c15934e87fb238215d76
parentca1bd56c49ca8a47d8eca011fa814d76c8d53b13 (diff)
downloademacs-97ab3539e0676ef78c2bced0f0c9ce48439fa2ee.tar.gz
emacs-97ab3539e0676ef78c2bced0f0c9ce48439fa2ee.zip
shr.el: Revert last change.
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/shr.el21
2 files changed, 1 insertions, 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 @@
12010-10-05 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * shr.el (shr-encode-url-chars): New function, that's an alias to
4 browse-url-url-encode-chars or a copy of it.
5 (shr-tag-img): Use it.
6
72010-10-04 Lars Magne Ingebrigtsen <larsi@gnus.org> 12010-10-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
8 2
9 * shr.el (shr-tag-blockquote): Ensure paragraph after quote, too. 3 * 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."
191 (copy-region-as-kill (point-min) (point-max)) 191 (copy-region-as-kill (point-min) (point-max))
192 (message "Copied %s" url)))))) 192 (message "Copied %s" url))))))
193 193
194(eval-and-compile
195 (defalias 'shr-encode-url-chars
196 ;; Neither Emacs 22 nor XEmacs provides this function.
197 (if (fboundp 'browse-url-url-encode-chars)
198 'browse-url-url-encode-chars
199 (lambda (text chars)
200 "URL-encode the chars in TEXT that match CHARS.
201CHARS is a regexp-like character alternative (e.g., \"[)$]\")."
202 (let ((encoded-text (copy-sequence text))
203 (s 0))
204 (while (setq s (string-match chars encoded-text s))
205 (setq encoded-text
206 (replace-match (format "%%%x"
207 (string-to-char
208 (match-string 0 encoded-text)))
209 t t encoded-text)
210 s (1+ s)))
211 encoded-text)))))
212
213(defun shr-tag-img (cont) 194(defun shr-tag-img (cont)
214 (when (and (> (current-column) 0) 195 (when (and (> (current-column) 0)
215 (not (eq shr-state 'image))) 196 (not (eq shr-state 'image)))
@@ -223,7 +204,7 @@ CHARS is a regexp-like character alternative (e.g., \"[)$]\")."
223 ((and shr-blocked-images 204 ((and shr-blocked-images
224 (string-match shr-blocked-images url)) 205 (string-match shr-blocked-images url))
225 (insert alt)) 206 (insert alt))
226 ((url-is-cached (shr-encode-url-chars url "[&)$ ]")) 207 ((url-is-cached (browse-url-url-encode-chars url "[&)$ ]"))
227 (shr-put-image (shr-get-image-data url) (point) alt)) 208 (shr-put-image (shr-get-image-data url) (point) alt))
228 (t 209 (t
229 (insert alt) 210 (insert alt)