(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
;; Miscellaneous fiddling.
(mdw-standard-fill-prefix "\\([ \t]*#+[ \t]*\\)")
+ (setq indent-tabs-mode nil)
;; Now define fontification things.
(make-local-variable 'font-lock-keywords)