0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 22:47:56 +00:00

Install w3m copying command in w3m-minor-mode-map.

Gnus uses w3m to wash HTML messages and installs w3m-minor-mode-map in
these buffers.  Therefore, this patch makes sure that the special copy
command that converts HTML links to Org-mode links also gets installed
into the minor mode map.

This is as yet untested.
This commit is contained in:
Carsten Dominik 2008-12-03 16:10:41 +01:00
parent 6e31b9eace
commit bac235cb67
2 changed files with 14 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2008-12-03 Carsten Dominik <carsten.dominik@gmail.com>
* org-w3m.el (w3m-minor-mode-hook): Also add the special copy
command to the `w3m-minor-mode-map'.
* org-archive.el (org-archive-to-archive-sibling): Protect
`this-command' to avoid appending kills during archiving.

View file

@ -27,7 +27,8 @@
;; This file implements copying HTML content from a w3m buffer and
;; transfomring the text on the fly so that it can be pasted into
;; an org-mode buffer with hot links.
;; an org-mode buffer with hot links. It will also work for regions
;; in gnus buffers that have ben washed with w3m.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
@ -141,11 +142,20 @@ Otherwise, return nil."
(keymapp w3m-mode-map))
(define-key w3m-mode-map "\C-c\C-x\M-w" 'org-w3m-copy-for-org-mode)
(define-key w3m-mode-map "\C-c\C-x\C-w" 'org-w3m-copy-for-org-mode))
(when (and (boundp 'w3m-minor-mode-map)
(keymapp w3m-minor-mode-map))
(define-key w3m-minor-mode-map "\C-c\C-x\M-w" 'org-w3m-copy-for-org-mode)
(define-key w3m-minor-mode-map "\C-c\C-x\C-w" 'org-w3m-copy-for-org-mode))
(add-hook
'w3m-mode-hook
(lambda ()
(define-key w3m-mode-map "\C-c\C-x\M-w" 'org-w3m-copy-for-org-mode)
(define-key w3m-mode-map "\C-c\C-x\C-w" 'org-w3m-copy-for-org-mode)))
(add-hook
'w3m-minor-mode-hook
(lambda ()
(define-key w3m-minor-mode-map "\C-c\C-x\M-w" 'org-w3m-copy-for-org-mode)
(define-key w3m-minor-mode-map "\C-c\C-x\C-w" 'org-w3m-copy-for-org-mode)))
(provide 'org-w3m)