diff options
| -rw-r--r-- | lisp/ChangeLog | 14 | ||||
| -rw-r--r-- | lisp/help-mode.el | 14 | ||||
| -rw-r--r-- | lisp/info.el | 11 |
3 files changed, 37 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 054f97b1255..fffbc555e97 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2010-06-17 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * help-mode.el (help-mode): Set buffer-local variable | ||
| 4 | revert-buffer-function to help-mode-revert-buffer. | ||
| 5 | (help-mode-revert-buffer): New function. | ||
| 6 | |||
| 7 | * info.el (Info-revert-find-node): Check for major-mode Info-mode | ||
| 8 | before popping to "*info*" (like in other Info functions). | ||
| 9 | Keep buffer-name in old-buffer-name. Keep Info-history-forward in | ||
| 10 | old-history-forward. Pop to old-buffer-name or "*info*" to | ||
| 11 | recreate the killed buffer. Set Info-history-forward from | ||
| 12 | old-history-forward. | ||
| 13 | (Info-breadcrumbs-depth): Add :group and :version. | ||
| 14 | |||
| 1 | 2010-06-17 Dan Nicolaescu <dann@ics.uci.edu> | 15 | 2010-06-17 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 16 | ||
| 3 | * emacs-lisp/package.el (package-menu-mode-map): Add a menu. | 17 | * emacs-lisp/package.el (package-menu-mode-map): Add a menu. |
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index f115e425325..c478bf6d16c 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el | |||
| @@ -272,6 +272,9 @@ Commands: | |||
| 272 | (with-current-buffer buffer | 272 | (with-current-buffer buffer |
| 273 | (bury-buffer)))) | 273 | (bury-buffer)))) |
| 274 | 274 | ||
| 275 | (set (make-local-variable 'revert-buffer-function) | ||
| 276 | 'help-mode-revert-buffer) | ||
| 277 | |||
| 275 | (run-mode-hooks 'help-mode-hook)) | 278 | (run-mode-hooks 'help-mode-hook)) |
| 276 | 279 | ||
| 277 | ;;;###autoload | 280 | ;;;###autoload |
| @@ -783,6 +786,17 @@ Show all docs for that symbol as either a variable, function or face." | |||
| 783 | (fboundp sym) (facep sym)) | 786 | (fboundp sym) (facep sym)) |
| 784 | (help-do-xref pos #'help-xref-interned (list sym))))) | 787 | (help-do-xref pos #'help-xref-interned (list sym))))) |
| 785 | 788 | ||
| 789 | (defun help-mode-revert-buffer (ignore-auto noconfirm) | ||
| 790 | (when (or noconfirm (yes-or-no-p "Revert help buffer? ")) | ||
| 791 | (let ((pos (point)) | ||
| 792 | (item help-xref-stack-item) | ||
| 793 | ;; Pretend there is no current item to add to the history. | ||
| 794 | (help-xref-stack-item nil) | ||
| 795 | ;; Use the current buffer. | ||
| 796 | (help-xref-following t)) | ||
| 797 | (apply (car item) (cdr item)) | ||
| 798 | (goto-char pos)))) | ||
| 799 | |||
| 786 | (defun help-insert-string (string) | 800 | (defun help-insert-string (string) |
| 787 | "Insert STRING to the help buffer and install xref info for it. | 801 | "Insert STRING to the help buffer and install xref info for it. |
| 788 | This function can be used to restore the old contents of the help buffer | 802 | This function can be used to restore the old contents of the help buffer |
diff --git a/lisp/info.el b/lisp/info.el index e76a8da146e..9a30f63fff0 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -238,7 +238,9 @@ This only has an effect if `Info-hide-note-references' is non-nil." | |||
| 238 | (defcustom Info-breadcrumbs-depth 4 | 238 | (defcustom Info-breadcrumbs-depth 4 |
| 239 | "Depth of breadcrumbs to display. | 239 | "Depth of breadcrumbs to display. |
| 240 | 0 means do not display breadcrumbs." | 240 | 0 means do not display breadcrumbs." |
| 241 | :type 'integer) | 241 | :version "23.1" |
| 242 | :type 'integer | ||
| 243 | :group 'info) | ||
| 242 | 244 | ||
| 243 | (defcustom Info-search-whitespace-regexp "\\s-+" | 245 | (defcustom Info-search-whitespace-regexp "\\s-+" |
| 244 | "If non-nil, regular expression to match a sequence of whitespace chars. | 246 | "If non-nil, regular expression to match a sequence of whitespace chars. |
| @@ -800,17 +802,22 @@ otherwise, that defaults to `Top'." | |||
| 800 | "Go to an Info node FILENAME and NODENAME, re-reading disk contents. | 802 | "Go to an Info node FILENAME and NODENAME, re-reading disk contents. |
| 801 | When *info* is already displaying FILENAME and NODENAME, the window position | 803 | When *info* is already displaying FILENAME and NODENAME, the window position |
| 802 | is preserved, if possible." | 804 | is preserved, if possible." |
| 803 | (pop-to-buffer "*info*") | 805 | (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) |
| 804 | (let ((old-filename Info-current-file) | 806 | (let ((old-filename Info-current-file) |
| 805 | (old-nodename Info-current-node) | 807 | (old-nodename Info-current-node) |
| 808 | (old-buffer-name (buffer-name)) | ||
| 806 | (pcolumn (current-column)) | 809 | (pcolumn (current-column)) |
| 807 | (pline (count-lines (point-min) (line-beginning-position))) | 810 | (pline (count-lines (point-min) (line-beginning-position))) |
| 808 | (wline (count-lines (point-min) (window-start))) | 811 | (wline (count-lines (point-min) (window-start))) |
| 812 | (old-history-forward Info-history-forward) | ||
| 809 | (old-history Info-history) | 813 | (old-history Info-history) |
| 810 | (new-history (and Info-current-file | 814 | (new-history (and Info-current-file |
| 811 | (list Info-current-file Info-current-node (point))))) | 815 | (list Info-current-file Info-current-node (point))))) |
| 812 | (kill-buffer (current-buffer)) | 816 | (kill-buffer (current-buffer)) |
| 817 | (pop-to-buffer (or old-buffer-name "*info*")) | ||
| 818 | (Info-mode) | ||
| 813 | (Info-find-node filename nodename) | 819 | (Info-find-node filename nodename) |
| 820 | (setq Info-history-forward old-history-forward) | ||
| 814 | (setq Info-history old-history) | 821 | (setq Info-history old-history) |
| 815 | (if (and (equal old-filename Info-current-file) | 822 | (if (and (equal old-filename Info-current-file) |
| 816 | (equal old-nodename Info-current-node)) | 823 | (equal old-nodename Info-current-node)) |