diff options
| author | Lars Magne Ingebrigtsen | 2011-07-19 17:01:49 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2011-07-19 17:01:49 +0200 |
| commit | 1bfd59e52c910539dea41e86204fd86b38024239 (patch) | |
| tree | 951ef65958d8e50e3dff7d722bcac2ff140a0201 | |
| parent | fd99fde61fbdd83fd6462a6dec62c0fe7af66c83 (diff) | |
| download | emacs-1bfd59e52c910539dea41e86204fd86b38024239.tar.gz emacs-1bfd59e52c910539dea41e86204fd86b38024239.zip | |
(view-buffer): Allow running in `special' modes if we're visiting a file.
Fixes: debbugs:8615
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/view.el | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 50e4cd49f4c..0699a93ac9b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * view.el (view-buffer): Allow running in `special' modes if we're | ||
| 4 | visiting a file (bug#8615). | ||
| 5 | |||
| 1 | 2011-07-19 Martin Rudalics <rudalics@gmx.at> | 6 | 2011-07-19 Martin Rudalics <rudalics@gmx.at> |
| 2 | 7 | ||
| 3 | * window.el (display-buffer-alist-of-strings-p) | 8 | * window.el (display-buffer-alist-of-strings-p) |
diff --git a/lisp/view.el b/lisp/view.el index ee85b4e7823..21479a70a72 100644 --- a/lisp/view.el +++ b/lisp/view.el | |||
| @@ -311,9 +311,10 @@ file: Users may suspend viewing in order to modify the buffer. | |||
| 311 | Exiting View mode will then discard the user's edits. Setting | 311 | Exiting View mode will then discard the user's edits. Setting |
| 312 | EXIT-ACTION to `kill-buffer-if-not-modified' avoids this." | 312 | EXIT-ACTION to `kill-buffer-if-not-modified' avoids this." |
| 313 | (interactive "bView buffer: ") | 313 | (interactive "bView buffer: ") |
| 314 | (if (eq (with-current-buffer buffer | 314 | (if (with-current-buffer buffer |
| 315 | (get major-mode 'mode-class)) | 315 | (and (eq (get major-mode 'mode-class) |
| 316 | 'special) | 316 | 'special) |
| 317 | (null buffer-file-name))) | ||
| 317 | (progn | 318 | (progn |
| 318 | (switch-to-buffer buffer) | 319 | (switch-to-buffer buffer) |
| 319 | (message "Not using View mode because the major mode is special")) | 320 | (message "Not using View mode because the major mode is special")) |