]> git.donarmstrong.com Git - lib.git/commitdiff
fix message attachment
authorDon Armstrong <don@donarmstrong.com>
Wed, 10 Jan 2018 19:29:26 +0000 (11:29 -0800)
committerDon Armstrong <don@donarmstrong.com>
Wed, 10 Jan 2018 19:29:26 +0000 (11:29 -0800)
emacs_el/configuration/don-configuration.org

index c4bdfb9ff5af6eedb0820ca52a88b1aa6565fdf4..d07925f1f3971a6bbed10f1fae8356fe2c08f5a4 100644 (file)
@@ -781,27 +781,27 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
 
     :mode "muttng-[a-z0-9]+-[0-9]+-"
     :mode "mutt-[a-z0-9]+-[0-9]+-"
 
     :mode "muttng-[a-z0-9]+-[0-9]+-"
     :mode "mutt-[a-z0-9]+-[0-9]+-"
-    :hook 'my-message-mode-settings
+    :hook 'my/message-mode-settings
+    :hook 'turn-on-flyspell
+    :bind (:map message-mode-map
+                ("C-c C-a" . my/post-attach-file))
     :config 
     :config 
-    (defun my-message-mode-settings ()
+    (defun my/message-mode-settings ()
       (font-lock-add-keywords nil
                               '(("^[ \t]*>[ \t]*>[ \t]*>.*$"
                                  (0 'message-multiply-quoted-text-face))
                                 ("^[ \t]*>[ \t]*>.*$"
                                  (0 'message-double-quoted-text-face))))
       (font-lock-add-keywords nil
                               '(("^[ \t]*>[ \t]*>[ \t]*>.*$"
                                  (0 'message-multiply-quoted-text-face))
                                 ("^[ \t]*>[ \t]*>.*$"
                                  (0 'message-double-quoted-text-face))))
-      (local-set-key (kbd "C-c C-a") 'my-post-attach-file)
       )
 
       )
 
-    (defun my-post-attach-file ()
+    (defun my/post-attach-file ()
       "Prompt for an attachment."
       (interactive)
       (let ((file (read-file-name "Attach file: " nil nil t nil))
             (description (string-read "Description: ")))
       "Prompt for an attachment."
       (interactive)
       (let ((file (read-file-name "Attach file: " nil nil t nil))
             (description (string-read "Description: ")))
-        (my-header-attach-file file description)))
+        (my/header-attach-file file description)))
 
 
-    (symbol-function 'my-post-attach-file)
-
-    (defun my-header-attach-file (file description)
+    (defun my/header-attach-file (file description)
       "Attach a FILE to the current message (works with Mutt).
     Argument DESCRIPTION MIME description."
       (interactive "fAttach file: \nsDescription: ")
       "Attach a FILE to the current message (works with Mutt).
     Argument DESCRIPTION MIME description."
       (interactive "fAttach file: \nsDescription: ")
@@ -817,8 +817,6 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
               (message (concat "Attached '" file "'."))
               (setq post-has-attachment t))))))
 
               (message (concat "Attached '" file "'."))
               (setq post-has-attachment t))))))
 
-
-
     (setq mail-yank-prefix "> ")
   )
 #+END_SRC
     (setq mail-yank-prefix "> ")
   )
 #+END_SRC