Permalink
Browse files

Add a whitespace-mode function.

  • Loading branch information...
1 parent 0b52845 commit a4a57d50b73279881dda287624a37cfc34fe7469 @technomancy committed May 20, 2009
Showing with 8 additions and 0 deletions.
  1. +8 −0 starter-kit-defuns.el
View
@@ -64,6 +64,11 @@ Symbols matching the text at point are put first in the completion list."
;;; These belong in coding-hook:
+;; We have a number of turn-on-* functions since it's advised that lambda
+;; functions not go in hooks. Repeatedly evaling an add-to-list with a
+;; hook value will repeatedly add it since there's no way to ensure
+;; that a lambda doesn't already exist in the list.
+
(defun local-column-number-mode ()
(make-local-variable 'column-number-mode)
(column-number-mode t))
@@ -78,6 +83,9 @@ Symbols matching the text at point are put first in the completion list."
(defun turn-on-save-place-mode ()
(setq save-place t))
+(defun turn-on-whitespace ()
+ (whitespace-mode t))
+
(add-hook 'coding-hook 'local-column-number-mode)
(add-hook 'coding-hook 'local-comment-auto-fill)
(add-hook 'coding-hook 'turn-on-hl-line-mode)

0 comments on commit a4a57d5

Please sign in to comment.