summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-04-28 15:48:37 -0500
committerCase Duckworth2021-04-28 15:48:37 -0500
commite885e267ce4504e33fc94cefea65f228ff372155 (patch)
tree6a35b738956e9584a47377e823b0a1d1df857a23
parentAdvise `eval-region' to pulse (diff)
downloademacs-e885e267ce4504e33fc94cefea65f228ff372155.tar.gz
emacs-e885e267ce4504e33fc94cefea65f228ff372155.zip
Automatically 'view' read-only buffers, and 'read' view buffers
-rw-r--r--init.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/init.el b/init.el index 3d47b44..00c9295 100644 --- a/init.el +++ b/init.el
@@ -228,7 +228,8 @@
228 w32-pass-apps-to-system nil 228 w32-pass-apps-to-system nil
229 w32-apps-modifier 'hyper 229 w32-apps-modifier 'hyper
230 visible-bell nil 230 visible-bell nil
231 ring-bell-function #'flash-mode-line) 231 ring-bell-function #'flash-mode-line
232 view-read-only t)
232 233
233 (defun flash-mode-line () 234 (defun flash-mode-line ()
234 "Flash the modeline as a bell." 235 "Flash the modeline as a bell."
@@ -243,6 +244,9 @@
243 (tooltip-mode -1) 244 (tooltip-mode -1)
244 (winner-mode +1) 245 (winner-mode +1)
245 246
247 (add-hook 'view-mode-hook (defun acdw/read-view-mode ()
248 (acdw/reading-mode (if view-mode +1 -1))))
249
246 ;;; Bindings 250 ;;; Bindings
247 (:global "M-SPC" cycle-spacing 251 (:global "M-SPC" cycle-spacing
248 "M-/" hippie-expand 252 "M-/" hippie-expand