* info-lookup populates Info-history
@ 2007-12-11 7:31 martin rudalics
0 siblings, 0 replies; only message in thread
From: martin rudalics @ 2007-12-11 7:31 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 373 bytes --]
`info-lookup' populates the `Info-history' stack with all index nodes it
visits when searching for an appropriate entry. This gives annoyance in
`Info-history-back' because I usually never want to visit such nodes.
The attached patch should avoid this and also that such nodes enter
`Info-history-list'. If there are no objections I'd like to apply in
a couple of days.
[-- Attachment #2: info-look.patch --]
[-- Type: text/plain, Size: 3212 bytes --]
*** info-look.el.~1.58.~ Mon Aug 13 16:41:02 2007
--- info-look.el Sun Dec 2 18:17:10 2007
***************
*** 328,333 ****
--- 328,341 ----
(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,361 ****
(progn
;; Don't need Index menu fontifications here, and
;; they slow down the lookup.
! (let (Info-fontify-maximum-menu-size)
(Info-goto-node node)
(setq doc-found t)))
(error
--- 363,370 ----
(progn
;; Don't need Index menu fontifications here, and
;; they slow down the lookup.
! (let (Info-fontify-maximum-menu-size
! Info-history-list)
(Info-goto-node node)
(setq doc-found t)))
(error
***************
*** 400,405 ****
--- 409,416 ----
(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,415 ****
(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)
(if (not (info-lookup->mode-value topic mode))
(message "No %s help available for `%s'" topic mode)
;; Recursively setup cross references.
--- 420,427 ----
(defun info-lookup-setup-mode (topic mode)
"Initialize the internal data structure."
(or (info-lookup->initialized topic mode)
! (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,450 ****
(let ((doc-spec (info-lookup->doc-spec topic mode))
(regexp (concat "^\\(" (info-lookup->regexp topic mode)
"\\)\\([ \t].*\\)?$"))
! Info-fontify-maximum-menu-size
node trans entry item prefix result doc-found
(buffer (get-buffer-create " temp-info-look")))
(with-current-buffer buffer
--- 456,462 ----
(let ((doc-spec (info-lookup->doc-spec topic mode))
(regexp (concat "^\\(" (info-lookup->regexp topic mode)
"\\)\\([ \t].*\\)?$"))
! 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
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-11 7:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-11 7:31 info-lookup populates Info-history martin rudalics
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).