Merge branch 'master' of git+ssh://ponder.ncipher.com/~mwooding/etc/profile
authorMark Wooding <mdw@distorted.org.uk>
Thu, 15 May 2008 10:46:31 +0000 (11:46 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 15 May 2008 10:46:31 +0000 (11:46 +0100)
* 'master' of git+ssh://ponder.ncipher.com/~mwooding/etc/profile:
  emacs: Initial blogging support.
  emacs: Turn off fontification in shell mode.
  emacs: Force py-shell to start ipython with the right colours.
  bashrc, dircolors: Enable colouring for `dumb' terminals.
  dot-emacs: Clobber message-mode's header colours.

1  2 
dot-emacs.el
emacs

diff --combined dot-emacs.el
@@@ -313,26 -313,23 +313,26 @@@ get itself into a twist.
  (defadvice write-file (after mdw-autorevert activate)
    (mdw-check-autorevert))
  
 -(defun mdwmail-mode ()
 +(define-derived-mode  mdwmail-mode mail-mode "[mdw] mail"
    "Major mode for editing news and mail messages from external programs
  Not much right now.  Just support for doing MailCrypt stuff."
 -  (interactive)
 -  (kill-all-local-variables)
 -  (use-local-map text-mode-map)
 -  (setq local-abbrev-table text-mode-abbrev-table)
 -  (setq major-mode 'mdwmail-mode)
 -  (setq mode-name "[mdw] mail")
 -  (set-buffer-file-coding-system 'utf-8)
 -  (make-local-variable 'paragraph-separate)
 -  (make-local-variable 'paragraph-start)
 -  (setq paragraph-start (concat "[ \t]*[-_][-_][-_]+$\\|^-- \\|-----\\|"
 -                              paragraph-start))
 -  (setq paragraph-separate (concat "[ \t]*[-_][-_][-_]+$\\|^-- \\|-----\\|"
 -                                 paragraph-separate))
 -  (run-hooks 'text-mode-hook 'mdwmail-mode-hook 'mail-setup-hook))
 +  :syntax-table nil
 +  :abbrev-table nil
 +  (run-hooks 'mail-setup-hook))
 +
 +(define-key mdwmail-mode-map [?\C-c ?\C-c] 'disabled-operation)
 +
 +(add-hook 'mdwail-mode-hook
 +        (lambda ()
 +          (set-buffer-file-coding-system 'utf-8)
 +          (make-local-variable 'paragraph-separate)
 +          (make-local-variable 'paragraph-start)
 +          (setq paragraph-start
 +                (concat "[ \t]*[-_][-_][-_]+$\\|^-- \\|-----\\|"
 +                        paragraph-start))
 +          (setq paragraph-separate
 +                (concat "[ \t]*[-_][-_][-_]+$\\|^-- \\|-----\\|"
 +                        paragraph-separate))))
  
  ;; --- How to encrypt in mdwmail ---
  
@@@ -565,7 -562,6 +565,7 @@@ doesn't cope with anything approximatin
    (auto-fill-mode 1)
    (setq fill-column 77)
    (setq show-trailing-whitespace t)
 +  (outline-minor-mode t)
    (mdw-set-font))
  
  ;; --- Set up all sorts of faces ---
@@@ -664,6 -660,30 +664,30 @@@ the regular expressions in `mdw-backup-
      (font-lock-keyword-face :weight bold)
      (font-lock-constant-face :weight bold)
      (font-lock-reference-face :weight bold)
+     (message-cited-text
+        :foreground ,(if window-system "SeaGreen1" "green")
+        :slant italic)
+     (message-separator :background "red" :foreground "white" :weight bold)
+     (message-header-cc
+        :foreground ,(if window-system "SeaGreen1" "green")
+        :weight bold)
+     (message-header-newsgroups
+        :foreground ,(if window-system "SeaGreen1" "green")
+        :weight bold)
+     (message-header-subject
+        :foreground ,(if window-system "SeaGreen1" "green")
+        :weight bold)
+     (message-header-to
+        :foreground ,(if window-system "SeaGreen1" "green")
+        :weight bold)
+     (message-header-xheader
+        :foreground ,(if window-system "SeaGreen1" "green")
+        :weight bold)
+     (message-header-other
+        :foreground ,(if window-system "SeaGreen1" "green")
+        :weight bold)
+     (message-header-name
+        :foreground ,(if window-system "SeaGreen1" "green"))
      (woman-bold :weight bold)
      (woman-italic :slant italic)
      (diff-index :weight bold)
@@@ -1982,17 -2002,6 +2006,17 @@@ strip numbers instead.
     "\\([ \t]*\\([>#|:] ?\\)*[ \t]*\\)" 3)
    (auto-fill-mode 1))
  
 +;;;----- Outline mode -------------------------------------------------------
 +
 +(defun mdw-outline-collapse-all ()
 +  "Completely collapse everything in the entire buffer."
 +  (interactive)
 +  (save-excursion
 +    (goto-char (point-min))
 +    (while (< (point) (point-max))
 +      (hide-subtree)
 +      (forward-line))))
 +
  ;;;----- Shell mode ---------------------------------------------------------
  
  (defun mdw-sh-mode-setup ()
diff --combined emacs
--- 1/emacs
--- 2/emacs
+++ b/emacs
  
  (defvar mdw-black-background t)
  
 +(eval-after-load "outline"
 +  '(progn
 +     (trap (require 'foldout))
 +     (define-key outline-mode-prefix-map [?\C-r] 'reveal-mode)
 +     (define-key outline-mode-prefix-map [?\C--] 'mdw-outline-collapse-all)))
 +
  (setq cltl2-root-url (mdw-config 'cltl-url))
  (setq common-lisp-hyperspec-root (mdw-config 'hyperspec-url))
  
  (global-set-key [?\C-x ?w ?j] 'windmove-down)
  (global-set-key [?\C-x ?w right] 'windmove-right)
  (global-set-key [?\C-x ?w ?l] 'windmove-right)
 +(global-set-key [?\C-x ?g ?l] 'org-store-link)
 +(global-set-key [?\C-x ?g ?a] 'org-agenda)
  (global-set-key [?\C-x ?t ?i] 'timeclock-in)
  (global-set-key [?\C-x ?t ?c] 'timeclock-change)
  (global-set-key [?\C-x ?t ?o] 'timeclock-out)
                ("\\.m$" . objc-mode)
                ("\\.mxd$" . c-mode)
                ("\\.cs" . csharp-mode)
 +              ("\\.org$" . org-mode)
                ;; ("/[ch]/" . c-mode)
                (,(concat "/\\("
                          "\\.stgit\\.msg" "\\|"
  
  (setq-default py-indent-offset 2)
  (add-hook 'python-mode-hook 'mdw-fontify-python t)
+ (setq py-python-command-args `("-i" "-colors" ,(if mdw-black-background
+                                                  "Linux"
+                                                "LightBG")))
  
  (setq-default tcl-indent-level 2)
  (add-hook 'tcl-mode-hook 'mdw-fontify-tcl t)
              (cons head slime-lisp-implementations))))))
  (setq slime-default-lisp 'sbcl)
  
+ ;;;----- Blogging -----------------------------------------------------------
+ (setq weblogger-config-alist
+       '(("vox"
+        ("user" . "mdw")
+        ("server-url" . "http://vox.distorted.org.uk/admin/mt-xmlrpc.cgi")
+        ("weblog" . "1"))))
  ;;;----- Shell mode ---------------------------------------------------------
  
  ;; --- Make the shell mode aware of my prompt ---
  ;; --- Notice passwords, and make C-a work right ---
  
  (add-hook 'shell-mode-hook #'mdw-sh-mode-setup)
+ (setq shell-font-lock-keywords nil)
  
  (add-hook 'term-mode-hook #'mdw-term-mode-setup)