branch: externals/do-at-point commit f356ba25b2371c4927344fa6f9be907b76220947 Author: Philip Kaludercic <phil...@posteo.net> Commit: Philip Kaludercic <phil...@posteo.net>
Add key to attach messages in Gnus --- do-at-point.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/do-at-point.el b/do-at-point.el index a15a4a4952..e932028cf0 100644 --- a/do-at-point.el +++ b/do-at-point.el @@ -92,6 +92,8 @@ but not `do-at-point-user-actions'. Refer to the user option `do-at-point-actions' for details on the structure of the values of this variable.") +(declare-function gnus-dired-attach "gnus-dired" (files-to-attach)) + (defcustom do-at-point-actions `((region (?\s "Mark" ,(lambda (start end) @@ -135,7 +137,11 @@ of this variable.") (?m "Compose message" ,(lambda (to) (compose-mail to)))) (existing-filename (?f "Find file" ,#'find-file) - (?4 "Find file other window" ,#'find-file-other-window)) + (?4 "Find file other window" ,#'find-file-other-window) + (?a "Attach to message" + ,(lambda (path) + (require 'gnus-dired) + (gnus-dired-attach (list path))))) (url (?b "Browse" ,#'browse-url) (?d "Download" ,#'(lambda (url)