]> git.donarmstrong.com Git - lib.git/blobdiff - emacs_el/configuration/don-configuration.org
flyspell is turned on in its own mode
[lib.git] / emacs_el / configuration / don-configuration.org
index 015d15b7d52ee0f77c9fc56b9b3dcac682759f12..7b21a6dc0eb9eff340e5f9f32eead7bfcc7d345b 100644 (file)
 ** [[https://github.com/jwiegley/use-package/][use-package]]
 #+BEGIN_SRC emacs-lisp
   (package-initialize)
-  (require 'use-package)
+  (condition-case nil
+      (require 'use-package)
+    (progn (package-install 'use-package)
+           (require 'use-package)))
 #+END_SRC
 ** Paradox
 #+BEGIN_SRC emacs-lisp
@@ -84,7 +87,6 @@
     :ensure t
     :diminish flyspell-mode 🐝
     :config
-    (add-hook 'message-mode-hook 'turn-on-flyspell)
     (add-hook 'text-mode-hook 'turn-on-flyspell)
     (add-hook 'c-mode-common-hook 'flyspell-prog-mode)
     (add-hook 'cperl-mode-hook 'flyspell-prog-mode)
@@ -778,27 +780,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]+-"
-    :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 
-    (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))))
-      (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: ")))
-        (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: ")
@@ -814,8 +816,6 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
               (message (concat "Attached '" file "'."))
               (setq post-has-attachment t))))))
 
-
-
     (setq mail-yank-prefix "> ")
   )
 #+END_SRC
@@ -1806,9 +1806,6 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
   (setq display-time-24hr-format t)
   (setq display-time-day-and-date t)
   (display-time-mode 1)
-  (setq font-latex-fontify-script nil)
-  (setq font-latex-fontify-sectioning (quote color))
-  (setq font-latex-script-display (quote (nil)))
   (global-auto-revert-mode 1)
   (global-font-lock-mode 1)
   (icomplete-mode 1)