Mercurial > emacs
comparison lisp/gnus/html2text.el @ 57923:d7def5572cf3
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-668
Merge from gnus--rel--5.10
Patches applied:
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-66
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-68
Update from CVS
2004-11-04 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-art. (gnus-article-edit-article): Don't associate the
article buffer with a draft file. This is a temporary measure
against the 2004-08-22 change to gnus-article-edit-mode.
2004-11-02 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/html2text.el (html2text-get-attr): Remove unused argument `tag'.
(html2text-format-tags): Remove unused variable `attr'.
* lisp/gnus/mm-util.el (mm-enrich-utf-8-by-mule-ucs): Fix cleaning of
after-load-alist.
* lisp/gnus/mm-util.el (mm-mime-mule-charset-alist): Add the windows-1251
entry. From Ilya N. Golubev <gin@mo.msk.ru>.
(mm-enrich-utf-8-by-mule-ucs): New function run when Mule-UCS is
loaded under XEmacs.
(): Don't make duplicated entries in mm-mime-mule-charset-alist.
* lisp/gnus/mm-util.el (mm-coding-system-p): Return a coding-system.
(mm-mime-mule-charset-alist): Use shift_jis instead of
iso-2022-jp-2 for the katakana-jisx0201 mule charset; add new
entries for the mime charsets iso-2022-jp-3 and shift_jis.
(mm-coding-system-priorities): Use shift_jis and iso-8859-1
instead of japanese-shift-jis and iso-latin-1 respectively in
order to share the default value with both Emacs and XEmacs-mule.
(mm-mule-charset-to-mime-charset): Make
mm-coding-system-priorities effective.
(mm-sort-coding-systems-predicate): Canonicalize coding-systems
while predicating of candidates upon the priorities.
2004-11-02 Katsumi Yamaoka <yamaoka@jpl.org>
* man/emacs-mime.texi (Encoding Customization): Fix
mm-coding-system-priorities entry.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 04 Nov 2004 08:12:39 +0000 |
parents | df80d19d7a2e |
children | 11d53dd5abd9 |
comparison
equal
deleted
inserted
replaced
57922:8089248edf3c | 57923:d7def5572cf3 |
---|---|
142 | 142 |
143 (defun html2text-attr-value (list attribute) | 143 (defun html2text-attr-value (list attribute) |
144 "Get value of ATTRIBUTE from LIST." | 144 "Get value of ATTRIBUTE from LIST." |
145 (nth 1 (assoc attribute list))) | 145 (nth 1 (assoc attribute list))) |
146 | 146 |
147 (defun html2text-get-attr (p1 p2 tag) | 147 (defun html2text-get-attr (p1 p2) |
148 (goto-char p1) | 148 (goto-char p1) |
149 (re-search-forward " +[^ ]" p2 t) | 149 (re-search-forward " +[^ ]" p2 t) |
150 (let* ((attr-string (buffer-substring-no-properties (1- (point)) (1- p2))) | 150 (let* ((attr-string (buffer-substring-no-properties (1- (point)) (1- p2))) |
151 (tmp-list (split-string attr-string)) | 151 (tmp-list (split-string attr-string)) |
152 (attr-list) | 152 (attr-list) |
318 | 318 |
319 (defun html2text-clean-anchor (p1 p2 p3 p4) | 319 (defun html2text-clean-anchor (p1 p2 p3 p4) |
320 ;; If someone can explain how to make the URL clickable I will surely | 320 ;; If someone can explain how to make the URL clickable I will surely |
321 ;; improve upon this. | 321 ;; improve upon this. |
322 ;; Maybe `goto-addr.el' can be used here. | 322 ;; Maybe `goto-addr.el' can be used here. |
323 (let* ((attr-list (html2text-get-attr p1 p2 "a")) | 323 (let* ((attr-list (html2text-get-attr p1 p2)) |
324 (href (html2text-attr-value attr-list "href"))) | 324 (href (html2text-attr-value attr-list "href"))) |
325 (delete-region p1 p4) | 325 (delete-region p1 p4) |
326 (when href | 326 (when href |
327 (goto-char p1) | 327 (goto-char p1) |
328 (insert (substring href 1 -1 )) | 328 (insert (substring href 1 -1 )) |
416 (goto-char (point-min)) | 416 (goto-char (point-min)) |
417 (while (re-search-forward (format "\\(<%s\\( [^>]*\\)?>\\)" tag) | 417 (while (re-search-forward (format "\\(<%s\\( [^>]*\\)?>\\)" tag) |
418 (point-max) t) | 418 (point-max) t) |
419 (let ((p1) | 419 (let ((p1) |
420 (p2 (point)) | 420 (p2 (point)) |
421 (p3) (p4) | 421 (p3) (p4)) |
422 (attr (match-string 1))) | |
423 (search-backward "<" (point-min) t) | 422 (search-backward "<" (point-min) t) |
424 (setq p1 (point)) | 423 (setq p1 (point)) |
425 (re-search-forward (format "</%s>" tag) (point-max) t) | 424 (re-search-forward (format "</%s>" tag) (point-max) t) |
426 (setq p4 (point)) | 425 (setq p4 (point)) |
427 (search-backward "</" (point-min) t) | 426 (search-backward "</" (point-min) t) |