aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/info.el
diff options
context:
space:
mode:
authorJuri Linkov2010-06-17 23:56:17 +0300
committerJuri Linkov2010-06-17 23:56:17 +0300
commitdbd6da78650014d997dceeecaa4392fc79f6ca8b (patch)
treed23eff2c0dd4f6dbad8c9edd9159c1b2eac356ae /lisp/info.el
parent64eba874f5977eb99d9f1bdaa26010cc5fd9e689 (diff)
downloademacs-dbd6da78650014d997dceeecaa4392fc79f6ca8b.tar.gz
emacs-dbd6da78650014d997dceeecaa4392fc79f6ca8b.zip
Fix revert-buffer functionality of Help mode and Info.
* lisp/help-mode.el (help-mode): Set buffer-local variable revert-buffer-function to help-mode-revert-buffer. (help-mode-revert-buffer): New function. * lisp/info.el (Info-revert-find-node): Check for major-mode Info-mode before popping to "*info*" (like in other Info functions). Keep buffer-name in old-buffer-name. Keep Info-history-forward in old-history-forward. Pop to old-buffer-name or "*info*" to recreate the killed buffer. Set Info-history-forward from old-history-forward. (Info-breadcrumbs-depth): Add :group and :version.
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el11
1 files changed, 9 insertions, 2 deletions
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.
2400 means do not display breadcrumbs." 2400 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.
801When *info* is already displaying FILENAME and NODENAME, the window position 803When *info* is already displaying FILENAME and NODENAME, the window position
802is preserved, if possible." 804is 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))