bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find-file-read-only-other-frame broken


From: Sven Joachim
Subject: Re: find-file-read-only-other-frame broken
Date: Sun, 23 Dec 2007 16:31:35 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

On 2007-12-23 10:44 +0100, Jörg-Volker Peetz wrote:

> since version 22 the function 'find-file-read-only-other-frame' does
> *not switch to read-only mode* indicated by the two percent-signs in
> the status line and the contents of the new buffer can be changed.

Can you please try the following patch, which should fix the issue?

--8<---------------cut here---------------start------------->8---
--- files.el    23 Dez 2007 15:07:56 +0100      1.896.2.32
+++ files.el    23 Dez 2007 15:24:27 +0100      
@@ -1015,9 +1015,11 @@
 documentation for additional customization information."
   (interactive "BSwitch to buffer in other frame: ")
   (let ((pop-up-frames t)
+       ret
        same-window-buffer-names same-window-regexps)
-    (pop-to-buffer buffer t norecord)
-    (raise-frame (window-frame (selected-window)))))
+    (setq ret (pop-to-buffer buffer t norecord)) ; save return value
+    (raise-frame (window-frame (selected-window)))
+    ret))
 
 (defun display-buffer-other-frame (buffer)
   "Switch to buffer BUFFER in another frame.
--8<---------------cut here---------------end--------------->8---

In case somebody wants to install it into EMACS_22_BASE, here's a
ChangeLog entry as well:

2007-12-23  Sven Joachim <address@hidden>

        * files.el (switch-to-buffer-other-frame): Return the buffer, not
        nil.

Cheers,
       Sven




reply via email to

[Prev in Thread] Current Thread [Next in Thread]