diff options
| author | Katsumi Yamaoka | 2008-12-04 01:58:01 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2008-12-04 01:58:01 +0000 |
| commit | 886367d85eb6cb28a899b1f7213c88bdc4ff6c94 (patch) | |
| tree | 2374d2f37eb3894b04e44072b91df17b5af425e0 | |
| parent | 1bd6cd6c649d0f6d43ed4986c9d2e49757be4d9e (diff) | |
| download | emacs-886367d85eb6cb28a899b1f7213c88bdc4ff6c94.tar.gz emacs-886367d85eb6cb28a899b1f7213c88bdc4ff6c94.zip | |
* mm-view.el (mm-inline-text-html-render-with-w3m): Put special keymap on links.
* gnus-art.el (gnus-article-wash-html-with-w3m): Ditto.
| -rw-r--r-- | lisp/gnus/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 33 | ||||
| -rw-r--r-- | lisp/gnus/mm-view.el | 36 |
3 files changed, 66 insertions, 10 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7e8ca0c44f8..37a6355ce31 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2008-12-04 Naohiro Aota <nao.aota@gmail.com> | ||
| 2 | |||
| 3 | * mm-view.el (mm-inline-text-html-render-with-w3m): Put special keymap | ||
| 4 | on links. | ||
| 5 | |||
| 6 | * gnus-art.el (gnus-article-wash-html-with-w3m): Ditto. | ||
| 7 | |||
| 1 | 2008-12-03 Katsumi Yamaoka <yamaoka@jpl.org> | 8 | 2008-12-03 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 9 | ||
| 3 | * message.el (message-idna-to-ascii-rhs-1): Protect against local | 10 | * message.el (message-idna-to-ascii-rhs-1): Protect against local |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 025d5b5e0d8..7d96a347b0b 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -2731,11 +2731,34 @@ charset defined in `gnus-summary-show-article-charset-alist' is used." | |||
| 2731 | (when (and mm-inline-text-html-with-w3m-keymap | 2731 | (when (and mm-inline-text-html-with-w3m-keymap |
| 2732 | (boundp 'w3m-minor-mode-map) | 2732 | (boundp 'w3m-minor-mode-map) |
| 2733 | w3m-minor-mode-map) | 2733 | w3m-minor-mode-map) |
| 2734 | (add-text-properties | 2734 | (if (and (boundp 'w3m-link-map) |
| 2735 | (point-min) (point-max) | 2735 | w3m-link-map) |
| 2736 | (list 'keymap w3m-minor-mode-map | 2736 | (let ((begin (point-min)) |
| 2737 | ;; Put the mark meaning this part was rendered by emacs-w3m. | 2737 | (map (copy-keymap w3m-link-map)) |
| 2738 | 'mm-inline-text-html-with-w3m t)))) | 2738 | end) |
| 2739 | (set-keymap-parent map w3m-minor-mode-map) | ||
| 2740 | (while (setq end (next-single-property-change begin | ||
| 2741 | 'w3m-href-anchor)) | ||
| 2742 | (add-text-properties | ||
| 2743 | begin end | ||
| 2744 | (list 'keymap (if (get-text-property begin 'w3m-href-anchor) | ||
| 2745 | map | ||
| 2746 | w3m-minor-mode-map) | ||
| 2747 | ;; Put the mark meaning this part was rendered by emacs-w3m. | ||
| 2748 | 'mm-inline-text-html-with-w3m t)) | ||
| 2749 | (setq begin end)) | ||
| 2750 | (add-text-properties | ||
| 2751 | begin (point-max) | ||
| 2752 | (list 'keymap (if (get-text-property begin 'w3m-href-anchor) | ||
| 2753 | map | ||
| 2754 | w3m-minor-mode-map) | ||
| 2755 | ;; Put the mark meaning this part was rendered by emacs-w3m. | ||
| 2756 | 'mm-inline-text-html-with-w3m t))) | ||
| 2757 | (add-text-properties | ||
| 2758 | (point-min) (point-max) | ||
| 2759 | (list 'keymap w3m-minor-mode-map | ||
| 2760 | ;; Put the mark meaning this part was rendered by emacs-w3m. | ||
| 2761 | 'mm-inline-text-html-with-w3m t))))) | ||
| 2739 | 2762 | ||
| 2740 | (defvar charset) ;; Bound by `article-wash-html'. | 2763 | (defvar charset) ;; Bound by `article-wash-html'. |
| 2741 | 2764 | ||
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 473948e19c5..fd01a0132f6 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el | |||
| @@ -261,11 +261,37 @@ | |||
| 261 | (when (and mm-inline-text-html-with-w3m-keymap | 261 | (when (and mm-inline-text-html-with-w3m-keymap |
| 262 | (boundp 'w3m-minor-mode-map) | 262 | (boundp 'w3m-minor-mode-map) |
| 263 | w3m-minor-mode-map) | 263 | w3m-minor-mode-map) |
| 264 | (add-text-properties | 264 | (if (and (boundp 'w3m-link-map) |
| 265 | (point-min) (point-max) | 265 | w3m-link-map) |
| 266 | (list 'keymap w3m-minor-mode-map | 266 | (let ((begin (point-min)) |
| 267 | ;; Put the mark meaning this part was rendered by emacs-w3m. | 267 | (map (copy-keymap w3m-link-map)) |
| 268 | 'mm-inline-text-html-with-w3m t))) | 268 | end) |
| 269 | (set-keymap-parent map w3m-minor-mode-map) | ||
| 270 | (while (setq end (next-single-property-change | ||
| 271 | begin 'w3m-href-anchor)) | ||
| 272 | (add-text-properties | ||
| 273 | begin end | ||
| 274 | (list 'keymap (if (get-text-property begin 'w3m-href-anchor) | ||
| 275 | map | ||
| 276 | w3m-minor-mode-map) | ||
| 277 | ;; Put the mark meaning this part was rendered | ||
| 278 | ;; by emacs-w3m. | ||
| 279 | 'mm-inline-text-html-with-w3m t)) | ||
| 280 | (setq begin end)) | ||
| 281 | (add-text-properties | ||
| 282 | begin (point-max) | ||
| 283 | (list 'keymap (if (get-text-property begin 'w3m-href-anchor) | ||
| 284 | map | ||
| 285 | w3m-minor-mode-map) | ||
| 286 | ;; Put the mark meaning this part was rendered | ||
| 287 | ;; by emacs-w3m. | ||
| 288 | 'mm-inline-text-html-with-w3m t))) | ||
| 289 | (add-text-properties | ||
| 290 | (point-min) (point-max) | ||
| 291 | (list 'keymap w3m-minor-mode-map | ||
| 292 | ;; Put the mark meaning this part was rendered | ||
| 293 | ;; by emacs-w3m. | ||
| 294 | 'mm-inline-text-html-with-w3m t)))) | ||
| 269 | (mm-handle-set-undisplayer | 295 | (mm-handle-set-undisplayer |
| 270 | handle | 296 | handle |
| 271 | `(lambda () | 297 | `(lambda () |