(point)
(if (re-search-forward "^[^* \n\t]" nil t)
(match-beginning 0)
- (or limit (point-max)))) entries))))
+ (or limit (point-max))))
+ entries)
+ (forward-line 0))))
;; Insert the entries just found.
(while (= (line-beginning-position 0) (1- (point)))
(backward-char))
;; Now remove duplicate entries under the same heading.
(let ((seen nil)
- (limit (point)))
+ (limit (point-marker)))
(goto-char start)
- (while (re-search-forward "^* \\([^:\n]+:\\(:\\|[^.\n]+\\).\\)"
- limit 'move)
+ (while (and (> limit (point))
+ (re-search-forward "^* \\([^:\n]+:\\(:\\|[^.\n]+\\).\\)"
+ limit 'move))
;; Fold case straight away; `member-ignore-case' here wasteful.
(let ((x (downcase (match-string 1))))
(if (member x seen)
;; Skip Tag Table node
(save-excursion
(and (search-backward "\^_" nil t)
- (looking-at "\^_\nTag Table"))))))
- (let ((search-spaces-regexp Info-search-whitespace-regexp))
+ (looking-at
+ "\^_\n\\(Tag Table\\|Local Variables\\)"))))))
+ (let ((search-spaces-regexp
+ (if (or (not isearch-mode) isearch-regexp)
+ Info-search-whitespace-regexp)))
(if (if backward
(re-search-backward regexp bound t)
(re-search-forward regexp bound t))
;; If no subfiles, give error now.
(if give-up
(if (null Info-current-subfile)
- (let ((search-spaces-regexp Info-search-whitespace-regexp))
+ (let ((search-spaces-regexp
+ (if (or (not isearch-mode) isearch-regexp)
+ Info-search-whitespace-regexp)))
(if backward
(re-search-backward regexp)
(re-search-forward regexp)))
;; Skip Tag Table node
(save-excursion
(and (search-backward "\^_" nil t)
- (looking-at "\^_\nTag Table"))))))
- (let ((search-spaces-regexp Info-search-whitespace-regexp))
+ (looking-at
+ "\^_\n\\(Tag Table\\|Local Variables\\)"))))))
+ (let ((search-spaces-regexp
+ (if (or (not isearch-mode) isearch-regexp)
+ Info-search-whitespace-regexp)))
(if (if backward
(re-search-backward regexp nil t)
(re-search-forward regexp nil t))
(defun Info-follow-nearest-node (&optional fork)
"Follow a node reference near point.
If point is on a reference, follow that reference. Otherwise,
-if point is in a menu item description, follow that menu item."
+if point is in a menu item description, follow that menu item.
+
+If FORK is non-nil (interactively with a prefix arg), show the node in
+a new Info buffer.
+If FORK is a string, it is the name to use for the new buffer."
(interactive "P")
(or (Info-try-follow-nearest-node fork)
(when (save-excursion