Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (27 sloc) 1.07 KB
;;; config-coding.el --- configuration for programming modes
(defvar coding-hook nil
"Hook that gets run on activation of any programming mode.")
(defun local-column-number-mode ()
(make-local-variable 'column-number-mode)
(column-number-mode t))
(defun local-comment-auto-fill ()
(set (make-local-variable 'comment-auto-fill-only-comments) t)
(auto-fill-mode t))
(defun turn-on-hl-line-mode ()
(if window-system (hl-line-mode t)))
(defun turn-on-save-place-mode ()
(setq save-place 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)
(add-hook 'coding-hook 'pretty-lambdas)
(defun run-coding-hook ()
"Enable things that are convenient across all coding buffers."
(run-hooks 'coding-hook))
(defun pretty-lambdas ()
(font-lock-add-keywords
nil `(("(?\\(lambda\\>\\)"
(0 (progn (compose-region (match-beginning 1) (match-end 1)
,(make-char 'greek-iso8859-7 107))
nil))))))
(provide 'config-coding)
Jump to Line
Something went wrong with that request. Please try again.