chiark / gitweb /
Merge remote branch 'crybaby'
authorMark Wooding <mdw@distorted.org.uk>
Thu, 20 May 2010 13:26:24 +0000 (14:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 20 May 2010 13:26:24 +0000 (14:26 +0100)
* crybaby:
  dot/emacs: Turn off Senator again.
  el/dot-emacs.el: Don't use a fancy face for `which-func'.

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

diff --combined dot/emacs
index 3dc2377d3d3363c723d05a8e0ac06173d3e82bb0,c1abaed236edfca5b33f4b55046fb7a38de59e21..29974a64b9f2df8137143547518d794bf8b11140
+++ b/dot/emacs
@@@ -62,7 -62,7 +62,7 @@@
  
  (trap (or mdw-fast-startup (require 'tex-site)))
  
- (trap (or mdw-fast-startup (semantic-load-enable-excessive-code-helpers)))
+ (trap (or mdw-fast-startup t (semantic-load-enable-code-helpers)))
  (setq semanticdb-default-save-directory "~/.emacs.d/semanticdb/")
  (eval-after-load "senator"
    '(setq isearch-mode-hook
    (global-set-key [?\C-x ?t ?s] 'timeclock-status-string)
    (global-set-key [?\C-x ?t ?p] 'nc-timesheet-prepare)
    (global-set-key [?\C-x ?t ?\C-m] 'nc-timesheet-submit)
 +  (global-set-key [?\C-x ?3] 'mdw-split-window-horizontally)
    (global-set-key [?\M-#] 'calc-dispatch)
    (global-set-key [?\C-x ?/] 'auto-fill-mode)
    (global-set-key [?\C-x ?w ?d] 'mdw-divvy-window)
diff --combined el/dot-emacs.el
index 08cc3def997fa881c1871d9da1b825cbb76436b6,bef86959955cdd41fd676e4f8c6a668106ec1005..4cca329c3c9fab068e604915b1ba22538a8dd4d2
@@@ -137,33 -137,6 +137,33 @@@ library.
          ((eq side 'left) 1)
          (t 2))))
  
 +(defun mdw-horizontal-window-overhead ()
 +  "Computes the horizontal window overhead.
 +This is the number of columns used by fringes, scroll bars and other such
 +cruft."
 +  (if (not window-system)
 +      1
 +    (let ((tot 0))
 +      (dolist (what '(scroll-bar fringe))
 +      (dolist (side '(left right))
 +        (incf tot (funcall (intern (concat (symbol-name what) "-columns"))
 +                           side))))
 +      tot)))
 +
 +(defun mdw-split-window-horizontally (&optional width)
 +  "Split a window horizontally.
 +Without a numeric argument, split the window approximately in
 +half.  With a numeric argument WIDTH, allocate WIDTH columns to
 +the left-hand window (if positive) or -WIDTH columns to the
 +right-hand window (if negative).  Space for scroll bars and
 +fringes is not taken out of the allowance for WIDTH, unlike
 +\\[split-window-horizontally]."
 +  (interactive "P")
 +  (split-window-horizontally
 +   (cond ((null width) nil)
 +       ((>= width 0) (+ width (mdw-horizontal-window-overhead)))
 +       ((< width 0) width))))
 +
  (defun mdw-divvy-window (&optional width)
    "Split a wide window into appropriate widths."
    (interactive "P")
                     77)
                    (t 78)))
    (let* ((win (selected-window))
 -       (sb-width (if (not window-system)
 -                     1
 -                   (let ((tot 0))
 -                     (dolist (what '(scroll-bar fringe))
 -                       (dolist (side '(left right))
 -                         (incf tot
 -                               (funcall (intern (concat (symbol-name what)
 -                                                        "-columns"))
 -                                        side))))
 -                     tot)))
 +       (sb-width (mdw-horizontal-window-overhead))
         (c (/ (+ (window-width) sb-width)
               (+ width sb-width))))
      (while (> c 1)
@@@ -922,6 -904,8 +922,8 @@@ doesn't match any of the regular expres
    (((type tty)) :foreground "green") (t :foreground "SeaGreen1"))
  (mdw-define-face message-header-name
    (((type tty)) :foreground "green") (t :foreground "SeaGreen1"))
+ (mdw-define-face which-func
+   (t nil))
  
  (mdw-define-face diff-index
    (t :weight bold))