From e885e267ce4504e33fc94cefea65f228ff372155 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 28 Apr 2021 15:48:37 -0500 Subject: Automatically 'view' read-only buffers, and 'read' view buffers --- init.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index 3d47b44..00c9295 100644 --- a/init.el +++ b/init.el @@ -228,7 +228,8 @@ w32-pass-apps-to-system nil w32-apps-modifier 'hyper visible-bell nil - ring-bell-function #'flash-mode-line) + ring-bell-function #'flash-mode-line + view-read-only t) (defun flash-mode-line () "Flash the modeline as a bell." @@ -243,6 +244,9 @@ (tooltip-mode -1) (winner-mode +1) + (add-hook 'view-mode-hook (defun acdw/read-view-mode () + (acdw/reading-mode (if view-mode +1 -1)))) + ;;; Bindings (:global "M-SPC" cycle-spacing "M-/" hippie-expand -- cgit 1.4.1-21-gabe81