dot/emacs: Error detection when sending mail using sendmail(8).
[profile] / dot / emacs
index 7d60a19..c0f4022 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
 (trap (show-paren-mode t))
 (or window-system (menu-bar-mode -1))
 
+;; Multiple cursors.
+
+(setq load-path (nconc load-path (list "~/lib/emacs/multiple-cursors/")))
+(global-set-key [?\C-c ?r] 'mdw-multiple-cursors-keymap)
+(autoload 'mdw-multiple-cursors-keymap "mdw-multiple-cursors.el"
+  "A keymap for Magnar Sveen's awesome multiple-cursors." nil 'keymap)
+
 ;; Temporary directory handling.
 
 (defun mdw-check-dir-exists (dir)
 (setq rmail-display-summary t)
 (setq rmail-file-name "~/Mail/rmail")
 
-(setq sendmail-program "~/bin/sendmail-hack")
+(setq sendmail-program "~/bin/sendmail-hack"
+      send-mail-function 'sendmail-send-it
+      mail-interactive t
+      sendmail-error-reporting-interactive '("-odb" "-oee"))
 
 (setq mail-user-agent 'message-user-agent
       read-mail-command 'gnus)
       message-yank-prefix "> "
       message-yank-cited-prefix "> "
       message-send-mail-function 'message-send-mail-with-sendmail
+      message-interactive t
+      message-sendmail-extra-arguments '("-odb" "-oee")
       message-sendmail-envelope-from 'header
       message-indent-citation-function '(message-indent-citation
                                         mdw-trim-spaces-after-citing))
 
 (setq default-frame-alist
       (mdw-uniquify-alist
-       '((width . 78)
+       `((width . ,(if (>= emacs-major-version 21) 77 78))
         (height . 33)
         (vertical-scroll-bars . right)
         (cursor-type . bar)
         (left-fringe . 5)
         (right-fringe . 5)
         (scroll-bar-width . 15)
-        (cursor-color . "red"))
-       (if mdw-black-background
-          '((background-mode . dark))
-        '((background-mode . light)))))
+        (cursor-color . "red")
+        (background-mode . ,(if mdw-black-background 'dark 'light)))))
 (setq window-system-default-frame-alist
       '((pm (font . "-os2-System VIO-medium-r-normal--*-40-*-*-m-*-cp850")
            (menu-font . "8.Helv")
 (or mdw-fast-startup
     (trap (progn
            (org-remember-insinuate)
-           (global-set-key [?\C-c ?r] 'org-remember))))
+           (global-set-key [?\C-c ?o ?r] 'org-remember))))
 
 ;; Minor mode listing
 
                ("\\.go$" . go-mode)
                ("\\.org$" . org-mode)
                ("\\.make$" . makefile-mode)
-               ("\\.mkd$" . markdown-mode)
+               ("\\.mk?d$" . markdown-mode)
                ;; ("/[ch]/" . c-mode)
                (,(concat "/\\("
                          "\\.stgit\\.msg" "\\|"
        tcl-mode-hook go-mode-hook js-mode-hook javascript-mode-hook
        conf-mode-hook m4-mode-hook autoconf-mode-hook autotest-mode-hook
        a68-mode-hook a68-mode-hooks asm-mode-hook fsharp-mode-hook
-       TeX-mode-hook LaTeX-mode-hook
+       scala-mode-hook TeX-mode-hook LaTeX-mode-hook
        TeXinfo-mode-hook tex-mode-hook latex-mode-hook
        texinfo-mode-hook emacs-lisp-mode-hook scheme-mode-hook
        lisp-mode-hook lisp-interaction-mode-hook makefile-mode-hook
   (add-hook 'apcalc-mode-hook 'mdw-fontify-apcalc t)
 
   (add-hook 'java-mode-hook 'mdw-fontify-java t)
+  (add-hook 'scala-mode-hook 'mdw-fontify-scala t)
   (add-hook 'js-mode-hook 'mdw-fontify-javascript t)
   (add-hook 'csharp-mode-hook 'mdw-fontify-csharp t)
   (add-hook 'fsharp-mode-hook 'mdw-fontify-fsharp t)