summaryrefslogtreecommitdiff
path: root/emacs/custom
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-10-17 18:26:02 -0700
committerFranck Cuny <franck@fcuny.net>2022-10-17 18:26:02 -0700
commite66b59c9c965eef4038cd276d9cc9aadc5662dc1 (patch)
treea41da3c5e6f545fca7891ce001da1fe0af584646 /emacs/custom
parentref(completion): remove vertico-multiform and reorganize the module (diff)
downloademacs.d-e66b59c9c965eef4038cd276d9cc9aadc5662dc1.tar.gz
ref(edit): reorganize the module
Change-Id: I62d5734643113e51a5b1ddaf59b4773a9c06598a
Diffstat (limited to 'emacs/custom')
-rw-r--r--emacs/custom/my-edit.el29
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