From 27b1b62bdd239f3ae1885de3cb3fa961162af840 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 19 Dec 2007 09:26:35 +0000 Subject: [PATCH] (info-lookup, info-lookup-setup-mode) (info-lookup-make-completions): Avoid clobbering Info-history and Info-history-list. --- lisp/ChangeLog | 14 ++++++++++++++ lisp/info-look.el | 18 +++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 41c6f9a17c1..5998b697a85 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2007-12-19 Martin Rudalics + + * man.el (Man-default-man-entry): When looking for default man + entry title search text preceding point. Use when instead of if. + + * indent.el (indent-for-tab-command): Fix doc-string typo. + + * vc.el (vc-ensure-vc-buffer): Avoid infinite looping when + vc-parent-buffer is the current buffer. + + * info-look.el (info-lookup, info-lookup-setup-mode) + (info-lookup-make-completions): Avoid clobbering Info-history and + Info-history-list. + 2007-12-19 Glenn Morris * progmodes/verilog-mode.el (top-level): Don't require compile. diff --git a/lisp/info-look.el b/lisp/info-look.el index 4ed13ba08e0..b3eff223533 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -328,6 +328,14 @@ If optional argument QUERY is non-nil, query for the help mode." (error "Not documented as a %s: %s" topic (or item "")))) (modes (info-lookup->all-modes topic mode)) (window (selected-window)) + (new-Info-history + ;; Avoid clobbering Info-history with nodes searched during + ;; lookup. If lookup succeeds set `Info-history' to + ;; `new-Info-history'. + (when (get-buffer "*info*") + (with-current-buffer "*info*" + (cons (list Info-current-file Info-current-node (point)) + Info-history)))) found doc-spec node prefix suffix doc-found) (if (not (eq major-mode 'Info-mode)) (if (not info-lookup-other-window-flag) @@ -355,7 +363,8 @@ If optional argument QUERY is non-nil, query for the help mode." (progn ;; Don't need Index menu fontifications here, and ;; they slow down the lookup. - (let (Info-fontify-maximum-menu-size) + (let (Info-fontify-maximum-menu-size + Info-history-list) (Info-goto-node node) (setq doc-found t))) (error @@ -400,6 +409,8 @@ If optional argument QUERY is non-nil, query for the help mode." (unless (or ignore-case (string-equal item (car entry))) (message "Found in different case: %s" (car entry))) + (when found + (setq Info-history new-Info-history)) (or doc-found (error "Info documentation for lookup was not found")) ;; Don't leave the Info buffer if the help item couldn't be looked up. @@ -409,7 +420,8 @@ If optional argument QUERY is non-nil, query for the help mode." (defun info-lookup-setup-mode (topic mode) "Initialize the internal data structure." (or (info-lookup->initialized topic mode) - (let (cell data (initialized 0) completions refer-modes) + (let ((initialized 0) + cell data completions refer-modes Info-history-list) (if (not (info-lookup->mode-value topic mode)) (message "No %s help available for `%s'" topic mode) ;; Recursively setup cross references. @@ -444,7 +456,7 @@ If optional argument QUERY is non-nil, query for the help mode." (let ((doc-spec (info-lookup->doc-spec topic mode)) (regexp (concat "^\\(" (info-lookup->regexp topic mode) "\\)\\([ \t].*\\)?$")) - Info-fontify-maximum-menu-size + Info-history-list Info-fontify-maximum-menu-size node trans entry item prefix result doc-found (buffer (get-buffer-create " temp-info-look"))) (with-current-buffer buffer -- 2.11.4.GIT