Merge remote branch 'crybaby'
authorMark Wooding <mdw@distorted.org.uk>
Thu, 18 Feb 2010 15:33:26 +0000 (15:33 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 18 Feb 2010 15:33:26 +0000 (15:33 +0000)
* crybaby:
  dot/emacs: Support the Chrome edit server.
  dot/vimrc: Use the right font and colours.  Turn on autoindent.
  el/dot-emacs.el: Twiddle `variable-pitch' face size for Emacs 22.

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

diff --combined dot/emacs
+++ b/dot/emacs
  
  (trap (or mdw-fast-startup (require 'tex-site)))
  
 -(trap (or mdw-fast-startup (semantic-load-enable-minimum-features)))
 +(trap (or mdw-fast-startup (semantic-load-enable-excessive-code-helpers)))
  (setq semanticdb-default-save-directory "~/.emacs.d/semanticdb/")
 +(eval-after-load "senator"
 +  '(setq isearch-mode-hook
 +       (remq 'senator-isearch-mode-hook isearch-mode-hook)
 +       isearch-mode-end-hook
 +       (remq 'senator-isearch-mode-hook isearch-mode-end-hook)))
  
  ;; Skeleton stuff.
  
  
  (and (or window-system (>= emacs-major-version 23))
       (progn (setq server-temp-file-regexp (concat "^" tmpdir "\\|/draft$")
+                 edit-server-new-frame nil
                  gnuserv-frame t)
-           (trap (server-start))))
+           (trap (server-start))
+           (trap (progn
+                   (require 'edit-server)
+                   (edit-server-start)))))
  
  ;; Control backup behaviour.
  
  
  (setq sendmail-program "~/bin/sendmail-hack")
  
 -(setq mail-user-agent 'message-user-agent)
 +(setq mail-user-agent 'message-user-agent
 +      read-mail-command 'gnus)
  (setq message-signature-separator "^-- \\(\\|\\[mdw\\]\\)$"
        message-yank-prefix "> "
        message-yank-cited-prefix "> "
  (setq display-buffer-reuse-frames nil ;Don't confuse me by showing buffers
        iswitchb-default-method 'samewindow) ;in other random frames
  (setq dired-deletion-confirmer                ;Make deletion easier in dired
 -      (symbol-function 'y-or-n-p))
 +      (symbol-function 'y-or-n-p)
 +      dired-listing-switches "-alF"   ;Do `ls -F' things in dired windows
 +      wdired-allow-to-change-permissions 'advanced)
  (setq read-quoted-char-radix 16)      ;C-q HEX-STUFF [RET]
 -(setq dired-listing-switches "-alF")  ;Do `ls -F' things in dired windows
 -(setq wdired-allow-to-change-permissions t)
  (setq case-fold-file-names nil)               ;Don't translate file names (grr...)
  (setq scroll-step 5)                  ;Don't scroll too much at a time
  (setq-default fill-column 77)         ;I use rather narrow windows
  
  (setq w3m-default-display-inline-images t)
  
 +(eval-after-load "w3m"
 +  '(let ((entries '(("application/pdf" "\\.pdf\\'" ("evince" file) nil)
 +                  ("application/x-pdf" "\\.pdf\\'" ("evince" file) nil))))
 +     (dolist (e entries)
 +       (setq w3m-content-type-alist
 +           (cons e (remove* (car e) w3m-content-type-alist
 +                            :key #'car :test #'string=))))))
 +
  (setq w3-do-incremental-display t
        w3-use-menus '(file edit view go bookmark options
                     buffers style search emacs nil help)
  
  (setq display-time-24hr-format t)
  (display-time)
 +(column-number-mode 1)
  (trap
    (if window-system
        (let ((view-diary-entries-initially t))
         (cursor-color . "red"))
         (if mdw-black-background
           '((background-mode . dark))
 -       '((background-mode . light)))
 -       (and (eq window-system 'pm)
 -          '((font . "-os2-System VIO-medium-r-normal--*-40-*-*-m-*-cp850")
 -            (menu-font . "8.Helv")
 -            (background-color . "lightgrey")))
 -       default-frame-alist))
 +       '((background-mode . light)))))
 +(setq window-system-default-frame-alist
 +      '((pm (font . "-os2-System VIO-medium-r-normal--*-40-*-*-m-*-cp850")
 +          (menu-font . "8.Helv")
 +          (background-color . "lightgrey"))
 +      (nil (menu-bar-lines . 0))))
  
  ;; Other frame fiddling.
  
  
  (eval-after-load "dired"
    '(progn
 -     (define-key dired-mode-map [?\C-x ?\C-q]
 -       'wdired-change-to-wdired-mode)))
 +     (or (lookup-key dired-mode-map  [?\C-x ?\C-q])
 +       (define-key dired-mode-map [?\C-x ?\C-q]
 +         'wdired-change-to-wdired-mode))
 +     (and (fboundp 'dired-do-relsymlink)
 +        (define-key dired-mode-map [?\C-c ?\C-s] 'dired-do-relsymlink))))
  
  (add-hook 'org-mode-hook
          #'(lambda () (mdw-clobber-evil-keymap org-mode-map)))
  
  (setq completion-ignored-extensions
        (append `(".hc" ".hi") completion-ignored-extensions))
 +(dolist (dir (remove-if-not (lambda (ext)
 +                            (= (aref ext (- (length ext) 1)) ?/))
 +                          completion-ignored-extensions))
 +  (if (/= (aref dir 0) ?/)
 +      (setq completion-ignored-extensions
 +          (cons (concat "/" dir)
 +                (remove dir completion-ignored-extensions)))))
  
  ;; Some common local definitions.
  
  
  (eval-after-load "tramp"
    '(let ((fix-args (if (mdw-version-< tramp-version "2.1")
 -                     #'append #'identity)))
 +                     #'append #'list)))
       (setq tramp-methods
           (mdw-uniquify-alist
            `(("become"
diff --combined el/dot-emacs.el
@@@ -598,7 -598,7 +598,7 @@@ It in turn is a list of things
  
  (defvar mdw-hanging-indents
    (concat "\\(\\("
 -          "\\([*o]\\|-[-#]?\\|[0-9]+\\.\\|\\[[0-9]+\\]\\|([a-zA-Z])\\)"
 +          "\\([*o+]\\|-[-#]?\\|[0-9]+\\.\\|\\[[0-9]+\\]\\|([a-zA-Z])\\)"
            "[ \t]+"
          "\\)?\\)")
    "*Standard regexp matching parts of a hanging indent.
@@@ -699,14 -699,6 +699,14 @@@ case.
  (defvar mdw-auto-indent t
    "Whether to indent automatically after a newline.")
  
 +(defun mdw-whitespace-mode (&optional arg)
 +  "Turn on/off whitespace mode, but don't highlight trailing space."
 +  (interactive "P")
 +  (when (and (boundp 'whitespace-style)
 +           (fboundp 'whitespace-mode))
 +    (let ((whitespace-style (remove 'trailing whitespace-style)))
 +      (whitespace-mode arg))))
 +
  (defun mdw-misc-mode-config ()
    (and mdw-auto-indent
         (cond ((eq major-mode 'lisp-mode)
    (auto-fill-mode 1)
    (setq fill-column 77)
    (setq show-trailing-whitespace t)
 -  (let ((whitespace-style (remove 'trailing whitespace-style)))
 -    (trap (whitespace-mode t)))
 +  (mdw-whitespace-mode 1)
    (and (fboundp 'gtags-mode)
         (gtags-mode))
    (outline-minor-mode t)
    (trap (turn-on-font-lock)))
  
  (defun mdw-post-config-mode-hack ()
 -  (let ((whitespace-style (remove 'trailing whitespace-style)))
 -    (trap (whitespace-mode t))))
 +  (mdw-whitespace-mode 1))
  
  (eval-after-load 'gtags
    '(progn
@@@ -773,13 -767,26 +773,13 @@@ doesn't match any of the regular expres
      (when (and frame-display
               (eq window-system 'x)
               (not (some (lambda (fr)
 -                          (message "checking frame %s" frame)
                            (and (not (eq fr frame))
                                 (string= (frame-parameter fr 'display)
 -                                        frame-display)
 -                               (progn "frame %s still uses us" nil)))
 +                                        frame-display)))
                          (frame-list))))
        (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 variable-pitch
        (((type x)) :family "sans" :height 100))
    (mdw-define-face variable-pitch
-     (((type x)) :family "helvetica" :height 120)))
+     (((type x)) :family "helvetica" :height 90)))
  (mdw-define-face region
    (((type tty) (class color)) :background "blue")
    (((type tty) (class mono)) :inverse-video t)
@@@ -1532,7 -1539,6 +1532,7 @@@ strip numbers instead.
  
    ;; Miscellaneous fiddling.
    (mdw-standard-fill-prefix "\\([ \t]*#+[ \t]*\\)")
 +  (setq indent-tabs-mode nil)
  
    ;; Now define fontification things.
    (make-local-variable 'font-lock-keywords)