Flip read-only-mode and text-mode to make it work with view-mode.
This commit is contained in:
parent
b510145d24
commit
f29d88e845
@ -50,8 +50,8 @@ comes down to opening the correct file. So we can copy the code of
|
||||
(if (listp value)
|
||||
(mapcar 'pop-to-buffer-same-window (nreverse value))
|
||||
(pop-to-buffer-same-window value))
|
||||
(read-only-mode)
|
||||
(text-mode)))
|
||||
(text-mode)
|
||||
(read-only-mode)))
|
||||
|
||||
;; RFCs are stored in 'in-notes/'
|
||||
(defun ietf-rfc (filename &optional wildcards)
|
||||
@ -66,10 +66,15 @@ comes down to opening the correct file. So we can copy the code of
|
||||
(if (listp value)
|
||||
(mapcar 'pop-to-buffer-same-window (nreverse value))
|
||||
(pop-to-buffer-same-window value))
|
||||
(read-only-mode)
|
||||
(text-mode)))
|
||||
(text-mode)
|
||||
(read-only-mode)))
|
||||
#+end_src
|
||||
|
||||
*Update 2024-03-25*: Flipping the order of ~(text-mode)~ and
|
||||
~(read-only-mode)~ so that ~(read-only-mode)~ gets activated last
|
||||
makes it work correctly with ~view-mode~ if that mode is automatically
|
||||
activated by ~(setq view-read-only t)~ on read-only buffers.
|
||||
|
||||
Setting a global key binding lets us open RFCs and drafts from
|
||||
anywhere within Emacs:
|
||||
#+begin_src emacs-lisp
|
||||
|
Loading…
Reference in New Issue
Block a user