hook-functions.el 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ;;; TODO: Replace useless individual comments with a single global comment.
  2. (defun ambrevar/turn-on-column-number-mode ()
  3. "Unconditionally turn on `column-number-mode' for the current buffer."
  4. (set (make-variable-buffer-local 'column-number-mode) t))
  5. (defun ambrevar/turn-on-complete-filename ()
  6. "Unconditionally turn on `comint-dynamic-complete-filename' for the current buffer."
  7. (add-to-list 'completion-at-point-functions 'comint-dynamic-complete-filename t))
  8. (defun ambrevar/turn-off-indent-tabs ()
  9. "Unconditionally turn off tab indentation."
  10. (setq indent-tabs-mode nil))
  11. (defun ambrevar/turn-on-indent-tabs ()
  12. "Unconditionally turn on tab indentation."
  13. (setq indent-tabs-mode t))
  14. (defun ambrevar/turn-off-line-number-mode ()
  15. "Unconditionally turn off `line-number-mode' fur the current buffer.."
  16. (set (make-variable-buffer-local 'line-number-mode) nil))
  17. (defun ambrevar/turn-on-newline-paragraph ()
  18. "Unconditionally make of newlines the start of a paragraph."
  19. (set (make-local-variable 'paragraph-start) "
  20. "))
  21. (defun ambrevar/turn-off-nobreak-char-display ()
  22. (set (make-local-variable 'nobreak-char-display) nil))
  23. (defun ambrevar/turn-on-skeleton-markers ()
  24. "Allow skeletons to make markers to ease field navigation."
  25. (require 'patch-skeletons)
  26. (add-hook 'skeleton-end-hook 'ambrevar/skeleton-make-markers))
  27. (defun ambrevar/turn-on-tab-width-to-4 ()
  28. "Unconditionally set tab width to 4."
  29. (setq tab-width 4))
  30. (defun ambrevar/turn-on-tab-width-to-8 ()
  31. "Unconditionally set tab width to 8."
  32. (setq tab-width 8))
  33. (provide 'hook-functions)