(view-buffer): Allow running in `special' modes if we're visiting a file.
Fixes: debbugs:8615
This commit is contained in:
parent
fd99fde61f
commit
1bfd59e52c
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* view.el (view-buffer): Allow running in `special' modes if we're
|
||||
visiting a file (bug#8615).
|
||||
|
||||
2011-07-19 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* window.el (display-buffer-alist-of-strings-p)
|
||||
|
|
|
@ -311,9 +311,10 @@ file: Users may suspend viewing in order to modify the buffer.
|
|||
Exiting View mode will then discard the user's edits. Setting
|
||||
EXIT-ACTION to `kill-buffer-if-not-modified' avoids this."
|
||||
(interactive "bView buffer: ")
|
||||
(if (eq (with-current-buffer buffer
|
||||
(get major-mode 'mode-class))
|
||||
'special)
|
||||
(if (with-current-buffer buffer
|
||||
(and (eq (get major-mode 'mode-class)
|
||||
'special)
|
||||
(null buffer-file-name)))
|
||||
(progn
|
||||
(switch-to-buffer buffer)
|
||||
(message "Not using View mode because the major mode is special"))
|
||||
|
|
Loading…
Add table
Reference in a new issue