(other-window 1))
(select-window win)))
+;; Don't raise windows unless I say so.
+
+(defvar mdw-inhibit-raise-frame nil
+ "*Whether `raise-frame' should do nothing when the frame is mapped.")
+
+(defadvice raise-frame
+ (around mdw-inhibit (&optional frame) activate compile)
+ "Don't actually do anything if `mdw-inhibit-raise-frame' is true, and the
+frame is actually mapped on the screen."
+ (if mdw-inhibit-raise-frame
+ (make-frame-visible frame)
+ ad-do-it))
+
+(defmacro mdw-advise-to-inhibit-raise-frame (function)
+ "Advise the FUNCTION not to raise frames, even if it wants to."
+ `(defadvice ,function
+ (around mdw-inhibit-raise (&rest hunoz) activate compile)
+ "Don't raise the window unless you have to."
+ (let ((mdw-inhibit-raise-frame t))
+ ad-do-it)))
+
+(mdw-advise-to-inhibit-raise-frame select-frame-set-input-focus)
+
;; Transient mark mode hacks.
(defadvice exchange-point-and-mark
(((class color)) :foreground "yellow" :background "blue"
:box (:line-width 1 :style released-button))
(t :inverse-video t))
+(mdw-define-face nobreak-space
+ (((type tty)))
+ (t :inherit escape-glyph :underline t))
(mdw-define-face scroll-bar
(t :foreground "black" :background "lightgrey"))
(mdw-define-face fringe
(mdw-define-face magit-item-highlight
(((type tty)) :background "blue")
(t :background "DarkSeaGreen4"))
+(mdw-define-face magit-log-head-label-remote
+ (((type tty)) :background "cyan" :foreground "green")
+ (t :background "grey11" :foreground "DarkSeaGreen2" :box t))
+(mdw-define-face magit-log-head-label-local
+ (((type tty)) :background "cyan" :foreground "yellow")
+ (t :background "grey11" :foreground "LightSkyBlue1" :box t))
+(mdw-define-face magit-log-head-label-tags
+ (((type tty)) :background "red" :foreground "yellow")
+ (t :background "LemonChiffon1" :foreground "goldenrod4" :box t))
+(mdw-define-face magit-log-graph
+ (((type tty)) :foreground "magenta")
+ (t :foreground "grey80"))
(mdw-define-face erc-input-face
(t :foreground "red"))
(indent-for-tab-command)))
(defun mdw-setup-m4 ()
+
+ ;; Inexplicably, Emacs doesn't match braces in m4 mode. This is very
+ ;; annoying: fix it.
+ (modify-syntax-entry ?{ "(")
+ (modify-syntax-entry ?} ")")
+
+ ;; Fill prefix.
(mdw-standard-fill-prefix "\\([ \t]*\\(?:#+\\|\\<dnl\\>\\)[ \t]*\\)"))
;;;--------------------------------------------------------------------------