chiark / gitweb /
Merge remote branches 'ponder' and 'crybaby'
authorMark Wooding <mdw@distorted.org.uk>
Sun, 20 Dec 2009 22:58:29 +0000 (22:58 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 20 Dec 2009 22:58:29 +0000 (22:58 +0000)
* ponder:
  el/dot-emacs.el: Aliases for `eshell'.
  el/dot-emacs.el: Remove menu bar from dumb terminals.
  el/dot-emacs.el: Remove stray debugging code.
  el/dot-emacs.el: Emacs 22 doesn't have `whitespace-mode'.
  dot/bash_profile: Use Perforce configuration files.

* crybaby:
  emacs: Yet another spelling of `git' in `vc-handled-backends'.
  el/dot-emacs.el: Clobber `comint-highlight-input' properly.

1  2 
dot/emacs
el/dot-emacs.el

diff --combined dot/emacs
index fe58c97421423e86f8bf9eaab4e9424dd283fe61,054f9dab60a80edecb7943fe1e88d4da02c07c9b..2a7796a6b09479800ec4f0bf40fc353b4a5fbe72
+++ b/dot/emacs
@@@ -45,7 -45,7 +45,7 @@@
       (add-to-list 'auto-mode-alist
                  `(,(concat "/debian/"
                               "\\("
 -                               "[" "[:lower:][:digit:]]"
 +                               "[" "[:lower:][:digit:]]"
                                     "[[:lower:][:digit:].+-" "]+"
                                 "\\."
                               "\\)?"
@@@ -55,6 -55,7 +55,7 @@@
  (and (library-exists-p "vc-git")
       (not (memq 'GIT vc-handled-backends))
       (not (memq 'Git vc-handled-backends))
+      (not (memq 'git vc-handled-backends))
       (setq vc-handled-backends (cons 'GIT vc-handled-backends)))
  
  (trap (or mdw-fast-startup (require 'p4)))
  (setq-default fill-column 77)         ;I use rather narrow windows
  (setq-default comment-column 40)      ;Set a standard comment column
  (setq-default truncate-partial-width-windows nil)
 -(setq woman-use-own-frame nil)                ;Keep man pages somewhere sensible
 +(setq default-indicate-empty-lines t)
 +(setq whitespace-style
 +      '(trailing space-before-tab space-after-tab empty indentation))
 +(setq woman-use-own-frame nil         ;Keep man pages somewhere sensible
 +      woman-fill-column 72)           ;Right margin position.
  (setq diff-switches "-u"              ;I like reading unified diffs
        cvs-diff-flags (list diff-switches))
  (setq echo-keystrokes 10)             ;Long delay before keystrokes echo
diff --combined el/dot-emacs.el
index 5a152f000d4ca9c6e027f310ba052e3fe92a5daa,1d2ddeca85ea98474a55b8690c5d43ffd91626c5..4969f2933afc0a766ad025a2b4471605a0c76fde
@@@ -349,6 -349,7 +349,6 @@@ probably become garbage.
                          (car alists)
                          (cdr alists)))))
  
 -
  (defun mdw-do-uniquify (done end l rest)
    "A helper function for mdw-uniquify-alist.
  The DONE argument is a list whose first element is `nil'.  It
@@@ -681,8 -682,6 +681,8 @@@ case.
    (auto-fill-mode 1)
    (setq fill-column 77)
    (setq show-trailing-whitespace t)
 +  (let ((whitespace-style (remove 'trailing whitespace-style)))
 +    (trap (whitespace-mode t)))
    (and (fboundp 'gtags-mode)
         (gtags-mode))
    (outline-minor-mode t)
    (reveal-mode t)
    (trap (turn-on-font-lock)))
  
 +(defun mdw-post-config-mode-hack ()
 +  (let ((whitespace-style (remove 'trailing whitespace-style)))
 +    (trap (whitespace-mode t))))
 +
  (eval-after-load 'gtags
    '(progn
       (dolist (key '([mouse-2] [mouse-3]))
@@@ -739,20 -734,10 +739,20 @@@ doesn't match any of the regular expres
                                          frame-display)
                                 (progn "frame %s still uses us" nil)))
                          (frame-list))))
 -      (message "turn out the lights")
        (run-with-idle-timer 0 nil #'x-close-connection frame-display))))
  (add-hook 'delete-frame-functions 'mdw-last-one-out-turn-off-the-lights)
  
 +(defvar mdw-frame-parameters-alist
 +  '((nil (menu-bar-lines . 0))))
 +(defun mdw-set-frame-parameters (frame)
 +  (let ((params (assq (if (fboundp 'window-system)
 +                        (window-system frame)
 +                      window-system)
 +                    mdw-frame-parameters-alist)))
 +    (when params
 +      (modify-frame-parameters frame (cdr params)))))
 +(add-hook 'after-make-frame-functions 'mdw-set-frame-parameters)
 +
  ;;;--------------------------------------------------------------------------
  ;;; General fontification.
  
  
  (mdw-define-face comint-highlight-prompt
    (t :weight bold))
- (mdw-define-face comint-highlight-input)
+ (mdw-define-face comint-highlight-input
+   (t nil))
  
  (mdw-define-face trailing-whitespace
    (((class color)) :background "red")
    (t :foreground "green"))
  (mdw-define-face diff-removed
    (t :foreground "red"))
- (mdw-define-face diff-context)
+ (mdw-define-face diff-context
+   (t nil))
  
  (mdw-define-face erc-input-face
    (t :foreground "red"))
  
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -               '(0 mdw-punct-face))))))
 +               '(0 mdw-punct-face))))
 +
 +    (mdw-post-config-mode-hack)))
  
  ;;;--------------------------------------------------------------------------
  ;;; AP calc mode.
  
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -               '(0 mdw-punct-face))))))
 +               '(0 mdw-punct-face)))))
 +
 +  (mdw-post-config-mode-hack))
  
  ;;;--------------------------------------------------------------------------
  ;;; Java programming configuration.
  
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -               '(0 mdw-punct-face))))))
 +               '(0 mdw-punct-face)))))
 +
 +  (mdw-post-config-mode-hack))
  
  ;;;--------------------------------------------------------------------------
  ;;; C# programming configuration.
  
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -               '(0 mdw-punct-face))))))
 +               '(0 mdw-punct-face)))))
 +
 +  (mdw-post-config-mode-hack))
  
  (define-derived-mode csharp-mode java-mode "C#"
    "Major mode for editing C# code.")
  
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -               '(0 mdw-punct-face))))))
 +               '(0 mdw-punct-face)))))
 +
 +  (mdw-post-config-mode-hack))
  
  ;;;--------------------------------------------------------------------------
  ;;; Awk programming configuration.
  
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -               '(0 mdw-punct-face))))))
 +               '(0 mdw-punct-face)))))
 +
 +  (mdw-post-config-mode-hack))
  
  ;;;--------------------------------------------------------------------------
  ;;; Perl programming style.
  
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -               '(0 mdw-punct-face))))))
 +               '(0 mdw-punct-face)))))
 +
 +  (mdw-post-config-mode-hack))
  
  (defun perl-number-tests (&optional arg)
    "Assign consecutive numbers to lines containing `#t'.  With ARG,
@@@ -1521,9 -1494,7 +1523,9 @@@ strip numbers instead.
  
         ;; And anything else is punctuation.
         (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -             '(0 mdw-punct-face)))))
 +             '(0 mdw-punct-face))))
 +
 +  (mdw-post-config-mode-hack))
  
  ;; Define Python fontification styles.
  
  
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -               '(0 mdw-punct-face))))))
 +               '(0 mdw-punct-face)))))
 +
 +  (mdw-post-config-mode-hack))
  
  ;;;--------------------------------------------------------------------------
  ;;; ARM assembler programming configuration.
  
         ;; And anything else is punctuation.
         (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -             '(0 mdw-punct-face))))
 +             '(0 mdw-punct-face)))
  
 +  (mdw-post-config-mode-hack))
    (run-hooks 'arm-assembler-mode-hook))
  
  ;;;--------------------------------------------------------------------------
                       "\\([eE]\\([-+]\\|\\)[0-9_]+\\|\\)")
               '(0 mdw-number-face))
         (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -             '(0 mdw-punct-face)))))
 +             '(0 mdw-punct-face))))
 +  (mdw-post-config-mode-hack))
  
  ;;;--------------------------------------------------------------------------
  ;;; REXX configuration.
  
           ;; And everything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -               '(0 mdw-punct-face))))))
 +               '(0 mdw-punct-face)))))
 +
 +  (mdw-post-config-mode-hack))
  
  ;;;--------------------------------------------------------------------------
  ;;; Standard ML programming style.
  
           ;; And anything else is punctuation.
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -               '(0 mdw-punct-face))))))
 +               '(0 mdw-punct-face)))))
 +
 +  (mdw-post-config-mode-hack))
  
  ;;;--------------------------------------------------------------------------
  ;;; Haskell configuration.
                         "\\([eE]\\([-+]\\|\\)[0-9]+\\|\\)")
                 '(0 mdw-number-face))
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -               '(0 mdw-punct-face))))))
 +               '(0 mdw-punct-face)))))
 +
 +  (mdw-post-config-mode-hack))
  
  ;;;--------------------------------------------------------------------------
  ;;; Erlang configuration.
           (list "\\<[0-9]+\\(\\|#[0-9a-zA-Z]+\\|[eE][+-]?[0-9]+\\)\\>"
                 '(0 mdw-number-face))
           (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -               '(0 mdw-punct-face))))))
 +               '(0 mdw-punct-face)))))
 +
 +  (mdw-post-config-mode-hack))
  
  ;;;--------------------------------------------------------------------------
  ;;; Texinfo configuration.
  
         ;; Fontify TeX special characters as punctuation.
         (list "[{}]+"
 -             '(0 mdw-punct-face)))))
 +             '(0 mdw-punct-face))))
 +
 +  (mdw-post-config-mode-hack))
  
  ;;;--------------------------------------------------------------------------
  ;;; TeX and LaTeX configuration.
  
         ;; Fontify TeX special characters as punctuation.
         (list "[$^_{}#&]"
 -             '(0 mdw-punct-face)))))
 +             '(0 mdw-punct-face))))
 +
 +  (mdw-post-config-mode-hack))
  
  ;;;--------------------------------------------------------------------------
  ;;; SGML hacking.
    (setq sh-indentation 2)
    (setq sh-basic-offset 2))
  
 +;;;--------------------------------------------------------------------------
 +;;; Emacs shell mode.
 +
 +(defun mdw-eshell-prompt ()
 +  (let ((left "[") (right "]"))
 +    (when (= (user-uid) 0)
 +      (setq left "«" right "»"))
 +    (concat left
 +          (save-match-data
 +            (replace-regexp-in-string "\\..*$" "" (system-name)))
 +          " "
 +          (eshell/pwd)
 +          right)))
 +(setq eshell-prompt-function 'mdw-eshell-prompt)
 +(setq eshell-prompt-regexp "^\\[[^]]+\\]")
 +
 +(defalias 'eshell/e 'find-file)
 +(defalias 'eshell/w3m 'w3m-goto-url)
 +
 +(mdw-define-face eshell-prompt (t :weight bold))
 +(mdw-define-face eshell-ls-archive (t :weight bold :foreground "red"))
 +(mdw-define-face eshell-ls-backup (t :foreground "lightgrey" :slant italic))
 +(mdw-define-face eshell-ls-product (t :foreground "lightgrey" :slant italic))
 +(mdw-define-face eshell-ls-clutter (t :foreground "lightgrey" :slant italic))
 +(mdw-define-face eshell-ls-executable (t :weight bold))
 +(mdw-define-face eshell-ls-directory (t :foreground "cyan" :weight bold))
 +(mdw-define-face eshell-ls-readonly (t nil))
 +(mdw-define-face eshell-ls-symlink (t :foreground "cyan"))
 +
  ;;;--------------------------------------------------------------------------
  ;;; Messages-file mode.
  
                       "\\([eE]\\([-+]\\|\\)[0-9_]+\\|\\)")
               '(0 mdw-number-face))
         (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -             '(0 mdw-punct-face)))))
 +             '(0 mdw-punct-face))))
 +  (mdw-post-config-mode-hack))
  
  ;; Lispy languages.
  
    (setq font-lock-keywords
        (list
         (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
 -             '(0 mdw-punct-face)))))
 +             '(0 mdw-punct-face))))
 +
 +  (mdw-post-config-mode-hack))
  
  (defun comint-send-and-indent ()
    (interactive)