diff options
| author | Eli Zaretskii | 2008-01-12 14:04:05 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2008-01-12 14:04:05 +0000 |
| commit | 26a30fea51c6d583e87cf82f83f4f3545d1a112c (patch) | |
| tree | bb393a94d12bff9f52767db3f0e67a2dbcef97be | |
| parent | 374c0cd617cdeb36b253da56df9e6c3d9f06337f (diff) | |
| download | emacs-26a30fea51c6d583e87cf82f83f4f3545d1a112c.tar.gz emacs-26a30fea51c6d583e87cf82f83f4f3545d1a112c.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/progmodes/ebrowse.el | 24 |
2 files changed, 14 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 69f537f916c..19248cb4f4c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2008-01-12 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * progmodes/ebrowse.el (ebrowse-view-file-other-window): Delete | ||
| 4 | function. | ||
| 5 | (ebrowse-view/find-file-and-search-pattern): Call | ||
| 6 | view-file-other-window instead of ebrowse-view-file-other-window. | ||
| 7 | (ebrowse-view-file-other-frame): Don't call | ||
| 8 | current-window-configuration. Fix second argument in the call to | ||
| 9 | view-mode-enter. Doc fix. | ||
| 10 | |||
| 1 | 2008-01-11 Richard Stallman <rms@gnu.org> | 11 | 2008-01-11 Richard Stallman <rms@gnu.org> |
| 2 | 12 | ||
| 3 | * subr.el (atomic-change-group): Prevent undo list truncation. | 13 | * subr.el (atomic-change-group): Prevent undo list truncation. |
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 8099656827e..7f13971bdb1 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el | |||
| @@ -1613,21 +1613,6 @@ and (b) in the directories named in `ebrowse-search-path'." | |||
| 1613 | file-name)) | 1613 | file-name)) |
| 1614 | 1614 | ||
| 1615 | 1615 | ||
| 1616 | (defun ebrowse-view-file-other-window (file) | ||
| 1617 | "View a file FILE in another window. | ||
| 1618 | This is a replacement for `view-file-other-window' which does not | ||
| 1619 | seem to work. It should be removed when `view.el' is fixed." | ||
| 1620 | (interactive) | ||
| 1621 | (let ((old-arrangement (current-window-configuration)) | ||
| 1622 | (had-a-buf (get-file-buffer file)) | ||
| 1623 | (buf-to-view (find-file-noselect file))) | ||
| 1624 | (switch-to-buffer-other-window buf-to-view) | ||
| 1625 | (view-mode-enter old-arrangement | ||
| 1626 | (and (not had-a-buf) | ||
| 1627 | (not (buffer-modified-p buf-to-view)) | ||
| 1628 | 'kill-buffer)))) | ||
| 1629 | |||
| 1630 | |||
| 1631 | (defun ebrowse-view-exit-fn (buffer) | 1616 | (defun ebrowse-view-exit-fn (buffer) |
| 1632 | "Function called when exiting View mode in BUFFER. | 1617 | "Function called when exiting View mode in BUFFER. |
| 1633 | Restore frame configuration active before viewing the file, | 1618 | Restore frame configuration active before viewing the file, |
| @@ -1648,10 +1633,9 @@ and possibly kill the viewed buffer." | |||
| 1648 | 1633 | ||
| 1649 | (defun ebrowse-view-file-other-frame (file) | 1634 | (defun ebrowse-view-file-other-frame (file) |
| 1650 | "View a file FILE in another frame. | 1635 | "View a file FILE in another frame. |
| 1651 | The new frame is deleted when it is no longer used." | 1636 | The new frame is deleted when you quit viewing the file in that frame." |
| 1652 | (interactive) | 1637 | (interactive) |
| 1653 | (let ((old-frame-configuration (current-frame-configuration)) | 1638 | (let ((old-frame-configuration (current-frame-configuration)) |
| 1654 | (old-arrangement (current-window-configuration)) | ||
| 1655 | (had-a-buf (get-file-buffer file)) | 1639 | (had-a-buf (get-file-buffer file)) |
| 1656 | (buf-to-view (find-file-noselect file))) | 1640 | (buf-to-view (find-file-noselect file))) |
| 1657 | (switch-to-buffer-other-frame buf-to-view) | 1641 | (switch-to-buffer-other-frame buf-to-view) |
| @@ -1662,8 +1646,8 @@ The new frame is deleted when it is no longer used." | |||
| 1662 | (and (not had-a-buf) | 1646 | (and (not had-a-buf) |
| 1663 | (not (buffer-modified-p buf-to-view)) | 1647 | (not (buffer-modified-p buf-to-view)) |
| 1664 | 'kill-buffer)) | 1648 | 'kill-buffer)) |
| 1665 | (view-mode-enter old-arrangement 'ebrowse-view-exit-fn))) | 1649 | (view-mode-enter (cons (selected-window) (cons (selected-window) t)) |
| 1666 | 1650 | 'ebrowse-view-exit-fn))) | |
| 1667 | 1651 | ||
| 1668 | (defun ebrowse-view/find-file-and-search-pattern | 1652 | (defun ebrowse-view/find-file-and-search-pattern |
| 1669 | (struc info file tags-file-name &optional view where) | 1653 | (struc info file tags-file-name &optional view where) |
| @@ -1698,7 +1682,7 @@ specifies where to find/view the result." | |||
| 1698 | (setq view-mode-hook nil)) | 1682 | (setq view-mode-hook nil)) |
| 1699 | (push 'ebrowse-find-pattern view-mode-hook) | 1683 | (push 'ebrowse-find-pattern view-mode-hook) |
| 1700 | (case where | 1684 | (case where |
| 1701 | (other-window (ebrowse-view-file-other-window file)) | 1685 | (other-window (view-file-other-window file)) |
| 1702 | (other-frame (ebrowse-view-file-other-frame file)) | 1686 | (other-frame (ebrowse-view-file-other-frame file)) |
| 1703 | (t (view-file file)))) | 1687 | (t (view-file file)))) |
| 1704 | (t | 1688 | (t |