aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThien-Thi Nguyen2007-11-04 12:01:35 +0000
committerThien-Thi Nguyen2007-11-04 12:01:35 +0000
commite56f84d7309e73c9dc0732960d4b681bb9a0249a (patch)
treeba7177cfd26cadeb3f2afccb010fc6900800e02d
parent1449012d63a2c88424625a24198f092173b3f542 (diff)
downloademacs-e56f84d7309e73c9dc0732960d4b681bb9a0249a.tar.gz
emacs-e56f84d7309e73c9dc0732960d4b681bb9a0249a.zip
(Info-revert-buffer-function): New func.
(Info-mode): Arrange to use it for reverting.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/info.el13
2 files changed, 15 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4964ad5732e..d1dc9a1a478 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-11-04 Thien-Thi Nguyen <ttn@gnuvola.org>
2
3 * info.el (Info-revert-buffer-function): New func.
4 (Info-mode): Arrange to use it for reverting.
5
12007-11-04 Stefan Monnier <monnier@iro.umontreal.ca> 62007-11-04 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * abbrev.el (expand-abbrev): Move point back to expansion's end. 8 * abbrev.el (expand-abbrev): Move point back to expansion's end.
diff --git a/lisp/info.el b/lisp/info.el
index fb6260585bc..2d396a105d8 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -706,8 +706,8 @@ otherwise, that defaults to `Top'."
706 (Info-find-node-2 nil nodename)) 706 (Info-find-node-2 nil nodename))
707 707
708;; It's perhaps a bit nasty to kill the *info* buffer to force a re-read, 708;; It's perhaps a bit nasty to kill the *info* buffer to force a re-read,
709;; but at least it keeps this routine (which is only for the benefit of 709;; but at least it keeps this routine (which is for makeinfo-buffer and
710;; makeinfo-buffer) out of the way of normal operations. 710;; Info-revert-buffer-function) out of the way of normal operations.
711;; 711;;
712(defun Info-revert-find-node (filename nodename) 712(defun Info-revert-find-node (filename nodename)
713 "Go to an Info node FILENAME and NODENAME, re-reading disk contents. 713 "Go to an Info node FILENAME and NODENAME, re-reading disk contents.
@@ -739,6 +739,11 @@ is preserved, if possible."
739 (if new-history 739 (if new-history
740 (setq Info-history (cons new-history Info-history)))))) 740 (setq Info-history (cons new-history Info-history))))))
741 741
742(defun Info-revert-buffer-function (ignore-auto noconfirm)
743 (when (or noconfirm (y-or-n-p "Revert info buffer? "))
744 (Info-revert-find-node Info-current-file Info-current-node)
745 (message "Reverted %s" Info-current-file)))
746
742(defun Info-find-in-tag-table-1 (marker regexp case-fold) 747(defun Info-find-in-tag-table-1 (marker regexp case-fold)
743 "Find a node in a tag table. 748 "Find a node in a tag table.
744MARKER specifies the buffer and position to start searching at. 749MARKER 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'."
3353 (unless Info-current-node 3358 (unless Info-current-node
3354 (error "No current Info node")) 3359 (error "No current Info node"))
3355 (let ((node (if (stringp Info-current-file) 3360 (let ((node (if (stringp Info-current-file)
3356 (concat "(" (file-name-nondirectory Info-current-file) ")" 3361 (concat "(" (file-name-nondirectory Info-current-file) ") "
3357 Info-current-node)))) 3362 Info-current-node))))
3358 (if (zerop (prefix-numeric-value arg)) 3363 (if (zerop (prefix-numeric-value arg))
3359 (setq node (concat "(info \"" node "\")"))) 3364 (setq node (concat "(info \"" node "\")")))
@@ -3478,6 +3483,8 @@ Advanced commands:
3478 'Info-isearch-push-state) 3483 'Info-isearch-push-state)
3479 (set (make-local-variable 'search-whitespace-regexp) 3484 (set (make-local-variable 'search-whitespace-regexp)
3480 Info-search-whitespace-regexp) 3485 Info-search-whitespace-regexp)
3486 (set (make-local-variable 'revert-buffer-function)
3487 'Info-revert-buffer-function)
3481 (Info-set-mode-line) 3488 (Info-set-mode-line)
3482 (run-mode-hooks 'Info-mode-hook)) 3489 (run-mode-hooks 'Info-mode-hook))
3483 3490