diff options
author | Miles Bader <miles@gnu.org> | 2007-11-11 00:56:44 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-11-11 00:56:44 +0000 |
commit | f23d76bdefbd4c06e14d69e99e50d35ce91c8226 (patch) | |
tree | ded28d1da6df2d0135514bac83074f4ca1c9099a /lisp/info.el | |
parent | e2d092da5980a7d05a5428074f8eb4925fa801e8 (diff) | |
parent | a457417ee5ba797ab1c91d35ee957bb7a7f8d4b6 (diff) | |
download | emacs-f23d76bdefbd4c06e14d69e99e50d35ce91c8226.tar.gz |
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-283
Diffstat (limited to 'lisp/info.el')
-rw-r--r-- | lisp/info.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/info.el b/lisp/info.el index 70edf10e0b8..a9a81b9aaf5 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -706,8 +706,8 @@ otherwise, that defaults to `Top'." (Info-find-node-2 nil nodename)) ;; It's perhaps a bit nasty to kill the *info* buffer to force a re-read, -;; but at least it keeps this routine (which is only for the benefit of -;; makeinfo-buffer) out of the way of normal operations. +;; but at least it keeps this routine (which is for makeinfo-buffer and +;; Info-revert-buffer-function) out of the way of normal operations. ;; (defun Info-revert-find-node (filename nodename) "Go to an Info node FILENAME and NODENAME, re-reading disk contents. @@ -739,6 +739,11 @@ is preserved, if possible." (if new-history (setq Info-history (cons new-history Info-history)))))) +(defun Info-revert-buffer-function (ignore-auto noconfirm) + (when (or noconfirm (y-or-n-p "Revert info buffer? ")) + (Info-revert-find-node Info-current-file Info-current-node) + (message "Reverted %s" Info-current-file))) + (defun Info-find-in-tag-table-1 (marker regexp case-fold) "Find a node in a tag table. MARKER specifies the buffer and position to start searching at. @@ -3353,7 +3358,7 @@ With a zero prefix arg, put the name inside a function call to `info'." (unless Info-current-node (error "No current Info node")) (let ((node (if (stringp Info-current-file) - (concat "(" (file-name-nondirectory Info-current-file) ")" + (concat "(" (file-name-nondirectory Info-current-file) ") " Info-current-node)))) (if (zerop (prefix-numeric-value arg)) (setq node (concat "(info \"" node "\")"))) @@ -3478,6 +3483,8 @@ Advanced commands: 'Info-isearch-push-state) (set (make-local-variable 'search-whitespace-regexp) Info-search-whitespace-regexp) + (set (make-local-variable 'revert-buffer-function) + 'Info-revert-buffer-function) (Info-set-mode-line) (run-mode-hooks 'Info-mode-hook)) |