]> git.eshelyaron.com Git - emacs.git/commitdiff
(ebrowse-view-file-other-window): Delete function.
authorEli Zaretskii <eliz@gnu.org>
Sat, 12 Jan 2008 14:04:05 +0000 (14:04 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 12 Jan 2008 14:04:05 +0000 (14:04 +0000)
(ebrowse-view/find-file-and-search-pattern): Call view-file-other-window
instead of ebrowse-view-file-other-window.
(ebrowse-view-file-other-frame): Don't call current-window-configuration.
Fix second argument in the call to view-mode-enter.  Doc fix.

lisp/ChangeLog
lisp/progmodes/ebrowse.el

index 69f537f916c51282ba780dbe9c4199b36455b0bf..19248cb4f4cba5a4cd8e7e8f27d50cf3779088a9 100644 (file)
@@ -1,3 +1,13 @@
+2008-01-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * progmodes/ebrowse.el (ebrowse-view-file-other-window): Delete
+       function.
+       (ebrowse-view/find-file-and-search-pattern): Call
+       view-file-other-window instead of ebrowse-view-file-other-window.
+       (ebrowse-view-file-other-frame): Don't call
+       current-window-configuration.  Fix second argument in the call to
+       view-mode-enter.  Doc fix.
+
 2008-01-11  Richard Stallman  <rms@gnu.org>
 
        * subr.el (atomic-change-group): Prevent undo list truncation.
index 8099656827ed3c7ea43a8faf031e990447a6c100..7f13971bdb11b635e8275975006c7b9c42f0de09 100644 (file)
@@ -1613,21 +1613,6 @@ and (b) in the directories named in `ebrowse-search-path'."
     file-name))
 
 
-(defun ebrowse-view-file-other-window (file)
-  "View a file FILE in another window.
-This is a replacement for `view-file-other-window' which does not
-seem to work. It should be removed when `view.el' is fixed."
-  (interactive)
-  (let ((old-arrangement (current-window-configuration))
-       (had-a-buf (get-file-buffer file))
-       (buf-to-view (find-file-noselect file)))
-    (switch-to-buffer-other-window buf-to-view)
-    (view-mode-enter old-arrangement
-                    (and (not had-a-buf)
-                         (not (buffer-modified-p buf-to-view))
-                         'kill-buffer))))
-
-
 (defun ebrowse-view-exit-fn (buffer)
   "Function called when exiting View mode in BUFFER.
 Restore frame configuration active before viewing the file,
@@ -1648,10 +1633,9 @@ and possibly kill the viewed buffer."
 
 (defun ebrowse-view-file-other-frame (file)
   "View a file FILE in another frame.
-The new frame is deleted when it is no longer used."
+The new frame is deleted when you quit viewing the file in that frame."
   (interactive)
   (let ((old-frame-configuration (current-frame-configuration))
-       (old-arrangement (current-window-configuration))
        (had-a-buf (get-file-buffer file))
        (buf-to-view (find-file-noselect file)))
     (switch-to-buffer-other-frame buf-to-view)
@@ -1662,8 +1646,8 @@ The new frame is deleted when it is no longer used."
          (and (not had-a-buf)
               (not (buffer-modified-p buf-to-view))
               'kill-buffer))
-    (view-mode-enter old-arrangement 'ebrowse-view-exit-fn)))
-
+    (view-mode-enter (cons (selected-window) (cons (selected-window) t))
+                    'ebrowse-view-exit-fn)))
 
 (defun ebrowse-view/find-file-and-search-pattern
   (struc info file tags-file-name &optional view where)
@@ -1698,7 +1682,7 @@ specifies where to find/view the result."
           (setq view-mode-hook nil))
         (push 'ebrowse-find-pattern view-mode-hook)
         (case where
-          (other-window (ebrowse-view-file-other-window file))
+          (other-window (view-file-other-window file))
           (other-frame  (ebrowse-view-file-other-frame file))
           (t            (view-file file))))
        (t