Mercurial > emacs
changeset 33322:db55e81c9ccf
2000-11-09 Lars Magne Ingebrigtsen <larsi@gnus.org>
* nnweb.el (nnweb-decode-entities): Work for non-character
entities.
2000-10-08 10:59:13 ShengHuo ZHU <zsh@cs.rochester.edu>
* nnweb.el (nnweb-url-retrieve-asynch): url-retrieve is
asynchronous in Exp version.
author | Dave Love <fx@gnu.org> |
---|---|
date | Wed, 08 Nov 2000 21:04:28 +0000 |
parents | 2f030bbc6aa8 |
children | a740c78bc3ec |
files | lisp/gnus/nnweb.el |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/nnweb.el Wed Nov 08 20:56:26 2000 +0000 +++ b/lisp/gnus/nnweb.el Wed Nov 08 21:04:28 2000 +0000 @@ -350,9 +350,13 @@ (setq url-current-callback-data data url-be-asynchronous t url-current-callback-func callback) - (url-retrieve url)) + (url-retrieve url nil)) (setq-default url-be-asynchronous old-asynch))) +(if (fboundp 'url-retrieve-synchronously) + (defun nnweb-url-retrieve-asynch (url callback &rest data) + (url-retrieve url callback data))) + ;;; ;;; DejaNews functions. ;;; @@ -723,16 +727,17 @@ "Decode all HTML entities." (goto-char (point-min)) (while (re-search-forward "&\\(#[0-9]+\\|[a-z]+\\);" nil t) - (replace-match (char-to-string - (if (eq (aref (match-string 1) 0) ?\#) + (let ((elem (if (eq (aref (match-string 1) 0) ?\#) (let ((c (string-to-number (substring (match-string 1) 1)))) (if (mm-char-or-char-int-p c) c 32)) (or (cdr (assq (intern (match-string 1)) w3-html-entities)) - ?#))) - t t))) + ?#)))) + (unless (stringp elem) + (setq elem (char-to-string elem))) + (replace-match elem t t)))) (defun nnweb-decode-entities-string (str) (with-temp-buffer