Open more outline-mode' files in read-only-mode'

This commit is contained in:
Gerard Vermeulen 2024-06-11 09:38:28 +02:00
parent 6d7d8e1893
commit 23ae951280

View File

@ -2064,7 +2064,9 @@ file.
;; GAV: `fnsd' is nil during Org export to LaTeX. ;; GAV: `fnsd' is nil during Org export to LaTeX.
(when fnsd (when fnsd
(setq fnsd (file-name-nondirectory fnsd)) (setq fnsd (file-name-nondirectory fnsd))
(when (member fnsd '("NEWS" "ORG-NEWS" "PROBLEMS")) ;; These are files from the EMACS and ORG git repositories.
(when (member fnsd '("EGLOT-NEWS" "NEWS" "ORG-NEWS" "PROBLEMS"
"org.org" "org-guide.org" "org-manual.org"))
(message "Visit `%s' in `read-only-mode'" fnsd) (message "Visit `%s' in `read-only-mode'" fnsd)
(read-only-mode +1))))) (read-only-mode +1)))))
(add-hook 'outline-mode-hook #'maybe-read-only-in-outline-mode) (add-hook 'outline-mode-hook #'maybe-read-only-in-outline-mode)