summaryrefslogtreecommitdiff
path: root/lisp/view.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/view.el')
-rw-r--r--lisp/view.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/view.el b/lisp/view.el
index 6955fbdfad8..a5349445964 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -311,10 +311,9 @@ 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 (with-current-buffer buffer
- (and (eq (get major-mode 'mode-class)
- 'special)
- (null buffer-file-name)))
+ (if (eq (with-current-buffer buffer
+ (get major-mode 'mode-class))
+ 'special)
(progn
(switch-to-buffer buffer)
(message "Not using View mode because the major mode is special"))