Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Add a whitespace-mode function.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed May 20, 2009
1 parent 0b52845 commit a4a57d5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions starter-kit-defuns.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)
Expand Down

0 comments on commit a4a57d5

Please sign in to comment.