diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/custom/my-edit.el | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/emacs/custom/my-edit.el b/emacs/custom/my-edit.el index bff7e04..6a9911c 100644 --- a/emacs/custom/my-edit.el +++ b/emacs/custom/my-edit.el @@ -3,18 +3,13 @@ ;;; Commentary: ;;; Code: +(require 'autorevert) -(customize-set-variable 'global-auto-revert-non-file-buffers t) -(customize-set-variable 'auto-revert-verbose nil) -(global-auto-revert-mode t) - -(defun my/whitespace-setup () - "Configure whitespace mode." - (setq-local show-trailing-whitespace t)) +;;; settings +(setq global-auto-revert-non-file-buffers t) +(setq auto-revert-verbose nil) -;; turn on my configuration for white spaces on a few modes -(dolist (hook '(prog-mode-hook text-mode-hook conf-mode-hook outline-mode-hook)) - (add-hook hook 'my/whitespace-setup)) +(global-auto-revert-mode t) (setq show-paren-delay 0 show-paren-highlight-openparen t @@ -22,8 +17,6 @@ show-paren-when-point-in-periphery t) (show-paren-mode 1) -(global-set-key (kbd "M-j") 'join-line) - ;; don't assume that sentences should have two spaces after period. (setq sentence-end-double-space nil) @@ -31,5 +24,17 @@ ;; switched to it using C-x C-q). (setq view-read-only t) +;;; bindings +(global-set-key (kbd "M-j") 'join-line) + +;;; hooks +(defun my/whitespace-setup () + "Configure whitespace mode." + (setq-local show-trailing-whitespace t)) + +;; turn on my configuration for white spaces on a few modes +(dolist (hook '(prog-mode-hook text-mode-hook conf-mode-hook outline-mode-hook)) + (add-hook hook 'my/whitespace-setup)) + (provide 'my-edit) ;;; my-edit.el ends here |