aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-05-26 18:27:47 +0000
committerRichard M. Stallman1998-05-26 18:27:47 +0000
commite197b151dfa8c6c2eae48c4dc2bed2a7d677c9f3 (patch)
tree6d67fd715e1d8d919bc3e66134600ba345fb69aa
parentf5f727f8ffa2e674601875b2f2fe7ce3f0030c93 (diff)
downloademacs-e197b151dfa8c6c2eae48c4dc2bed2a7d677c9f3.tar.gz
emacs-e197b151dfa8c6c2eae48c4dc2bed2a7d677c9f3.zip
Changes so bookmark list mode works with Info:
(bookmark-jump-noselect): Use an inner save-window-excursion. (bookmark-bmenu-switch-other-window): Temporarily set pop-up-windows, same-window-buffer-names, and same-window-regexps, to override Info's special display behaviors.
-rw-r--r--lisp/bookmark.el53
1 files changed, 29 insertions, 24 deletions
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 138512053ff..69ca3e1f865 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1112,29 +1112,31 @@ of the old one in the permanent bookmark record."
1112 (and (file-exists-p altname) 1112 (and (file-exists-p altname)
1113 altname))))) 1113 altname)))))
1114 (save-excursion 1114 (save-excursion
1115 (if info-node 1115 (save-window-excursion
1116 ;; Info nodes must be visited with care. 1116 (if info-node
1117 (progn 1117 ;; Info nodes must be visited with care.
1118 (require 'info) 1118 (progn
1119 (Info-find-node file info-node)) 1119 (require 'info)
1120 ;; Else no Info. Can do an ordinary find-file: 1120 (Info-find-node file info-node))
1121 (set-buffer (find-file-noselect file)) 1121 ;; Else no Info. Can do an ordinary find-file:
1122 (goto-char place)) 1122 (set-buffer (find-file-noselect file))
1123 1123 (goto-char place))
1124 ;; Go searching forward first. Then, if forward-str exists and 1124
1125 ;; was found in the file, we can search backward for behind-str. 1125 ;; Go searching forward first. Then, if forward-str exists and
1126 ;; Rationale is that if text was inserted between the two in the 1126 ;; was found in the file, we can search backward for behind-str.
1127 ;; file, it's better to be put before it so you can read it, 1127 ;; Rationale is that if text was inserted between the two in the
1128 ;; rather than after and remain perhaps unaware of the changes. 1128 ;; file, it's better to be put before it so you can read it,
1129 (if forward-str 1129 ;; rather than after and remain perhaps unaware of the changes.
1130 (if (search-forward forward-str (point-max) t) 1130 (if forward-str
1131 (goto-char (match-beginning 0)))) 1131 (if (search-forward forward-str (point-max) t)
1132 (if behind-str 1132 (goto-char (match-beginning 0))))
1133 (if (search-backward behind-str (point-min) t) 1133 (if behind-str
1134 (goto-char (match-end 0)))) 1134 (if (search-backward behind-str (point-min) t)
1135 ;; added by db 1135 (goto-char (match-end 0))))
1136 (setq bookmark-current-bookmark str) 1136 ;; added by db
1137 (cons (current-buffer) (point))) 1137 (setq bookmark-current-bookmark str)
1138 (cons (current-buffer) (point))))
1139
1138 ;; Else unable to find the marked file, so ask if user wants to 1140 ;; Else unable to find the marked file, so ask if user wants to
1139 ;; relocate the bookmark, else remind them to consider deletion. 1141 ;; relocate the bookmark, else remind them to consider deletion.
1140 (ding) 1142 (ding)
@@ -1896,7 +1898,10 @@ With a prefix arg, prompts for a file to save them in."
1896 "Make the other window select this line's bookmark. 1898 "Make the other window select this line's bookmark.
1897The current window remains selected." 1899The current window remains selected."
1898 (interactive) 1900 (interactive)
1899 (let ((bookmark (bookmark-bmenu-bookmark))) 1901 (let ((bookmark (bookmark-bmenu-bookmark))
1902 (pop-up-windows t)
1903 same-window-buffer-names
1904 same-window-regexps)
1900 (if (bookmark-bmenu-check-position) 1905 (if (bookmark-bmenu-check-position)
1901 (let* ((pair (bookmark-jump-noselect bookmark)) 1906 (let* ((pair (bookmark-jump-noselect bookmark))
1902 (buff (car pair)) 1907 (buff (car pair))