[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r107040: Fix view-buffer-other-window
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r107040: Fix view-buffer-other-window/frame handling of special modes. |
Date: |
Wed, 01 Feb 2012 16:31:29 +0800 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107040
fixes bug(s): http://debbugs.gnu.org/10650
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Wed 2012-02-01 16:31:29 +0800
message:
Fix view-buffer-other-window/frame handling of special modes.
* view.el (view-buffer-other-window, view-buffer-other-frame):
Handle special modes like view-buffer.
(view-buffer): Simplify.
modified:
lisp/ChangeLog
lisp/view.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-02-01 08:13:02 +0000
+++ b/lisp/ChangeLog 2012-02-01 08:31:29 +0000
@@ -1,5 +1,9 @@
2012-02-01 Chong Yidong <address@hidden>
+ * view.el (view-buffer-other-window, view-buffer-other-frame):
+ Handle special modes like view-buffer (Bug#10650).
+ (view-buffer): Simplify.
+
* frame.el (set-frame-font): Tweak meaning of third argument.
* dynamic-setting.el (font-setting-change-default-font): Use
=== modified file 'lisp/view.el'
--- a/lisp/view.el 2012-01-19 07:21:25 +0000
+++ b/lisp/view.el 2012-02-01 08:31:29 +0000
@@ -311,13 +311,9 @@
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)
- (progn
- (switch-to-buffer buffer)
- (message "Not using View mode because the major mode is special"))
- (switch-to-buffer buffer)
+ (switch-to-buffer buffer)
+ (if (eq (get major-mode 'mode-class) 'special)
+ (message "Not using View mode because the major mode is special")
(view-mode-enter nil exit-action)))
;;;###autoload
@@ -339,7 +335,9 @@
(interactive "bIn other window view buffer:\nP")
(let ((pop-up-windows t))
(pop-to-buffer buffer t))
- (view-mode-enter nil exit-action))
+ (if (eq (get major-mode 'mode-class) 'special)
+ (message "Not using View mode because the major mode is special")
+ (view-mode-enter nil exit-action)))
;;;###autoload
(defun view-buffer-other-frame (buffer &optional not-return exit-action)
@@ -360,7 +358,9 @@
(interactive "bView buffer in other frame: \nP")
(let ((pop-up-frames t))
(pop-to-buffer buffer t))
- (view-mode-enter nil exit-action))
+ (if (eq (get major-mode 'mode-class) 'special)
+ (message "Not using View mode because the major mode is special")
+ (view-mode-enter nil exit-action)))
;;;###autoload
(define-minor-mode view-mode
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r107040: Fix view-buffer-other-window/frame handling of special modes.,
Chong Yidong <=