(ido-mode): Initialize with custom-initialize-default. (Bug#947).
[bpt/emacs.git] / lisp / info.el
index f07d089..ac04643 100644 (file)
@@ -221,7 +221,8 @@ when you hit the end of the current node."
   "*If non-nil, hide the tag and section reference in *note and * menu items.
 If value is non-nil but not `hide', also replaces the \"*note\" with \"see\".
 If value is non-nil but not t or `hide', the reference section is still shown.
-`nil' completely disables this feature."
+`nil' completely disables this feature.  If this is non-nil, you might
+want to set `Info-refill-paragraphs'."
   :version "22.1"
   :type '(choice (const :tag "No hiding" nil)
                 (const :tag "Replace tag and hide reference" t)
@@ -232,7 +233,8 @@ If value is non-nil but not t or `hide', the reference section is still shown.
 (defcustom Info-refill-paragraphs nil
   "*If non-nil, attempt to refill paragraphs with hidden references.
 This refilling may accidentally remove explicit line breaks in the Info
-file, so be prepared for a few surprises if you enable this feature."
+file, so be prepared for a few surprises if you enable this feature.
+This only has an effect if `Info-hide-note-references' is non-nil."
   :version "22.1"
   :type 'boolean
   :group 'info)
@@ -543,7 +545,9 @@ appended to the Info buffer name.
 
 The search path for Info files is in the variable `Info-directory-list'.
 The top-level Info directory is made by combining all the files named `dir'
-in all the directories in that path."
+in all the directories in that path.
+
+See a list of available Info commands in `Info-mode'."
   (interactive (list
                 (if (and current-prefix-arg (not (numberp current-prefix-arg)))
                     (read-file-name "Info file name: " nil nil t))
@@ -1209,19 +1213,20 @@ a case-insensitive match is tried."
              (delete-region (1- (point)) (point))))
 
          ;; Now remove duplicate entries under the same heading.
-         (let ((seen nil)
-               (limit (point-marker)))
-           (goto-char start)
-           (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)
-                   (delete-region (match-beginning 0)
-                                  (progn (re-search-forward "^[^ \t]" nil t)
-                                         (match-beginning 0)))
-                 (push x seen))))))))))
+         (let (seen)
+           (save-restriction
+             (narrow-to-region start (point))
+             (goto-char (point-min))
+             (while (re-search-forward "^* \\([^:\n]+:\\(:\\|[^.\n]+\\).\\)" nil 'move)
+               ;; Fold case straight away; `member-ignore-case' here wasteful.
+               (let ((x (downcase (match-string 1))))
+                 (if (member x seen)
+                     (delete-region
+                      (match-beginning 0)
+                      (if (re-search-forward "^[^ \t]" nil 'move)
+                          (goto-char (match-beginning 0))
+                        (point-max)))
+                   (push x seen)))))))))))
 
 ;; Note that on entry to this function the current-buffer must be the
 ;; *info* buffer; not the info tags buffer.
@@ -3094,7 +3099,7 @@ Like \\[Info-menu], \\[Info-follow-reference], \\[Info-next], \\[Info-prev] or \
 At end of the node's text, moves to the next node, or up if none."
   (interactive "e")
   (mouse-set-point click)
-  (and (not (Info-try-follow-nearest-node))
+  (and (not (Info-follow-nearest-node))
        (save-excursion (forward-line 1) (eobp))
        (Info-next-preorder)))
 
@@ -3123,7 +3128,7 @@ If FORK is a string, it is the name to use for the new buffer."
 ;; Common subroutine.
 (defun Info-try-follow-nearest-node (&optional fork)
   "Follow a node reference near point.  Return non-nil if successful.
-If FORK is non-nil, it i spassed to `Info-goto-node'."
+If FORK is non-nil, it ipassed to `Info-goto-node'."
   (let (node)
     (cond
      ((Info-get-token (point) "[hf]t?tps?://" "[hf]t?tps?://\\([^ \t\n\"`({<>})']+\\)")
@@ -3432,6 +3437,7 @@ Advanced commands:
 \\[Info-search-case-sensitively]       Search through this Info file for specified regexp case-sensitively.
 \\[Info-search-next]   Search for another occurrence of regexp
          from a previous \\<Info-mode-map>\\[Info-search] command.
+\\[isearch-forward], \\[isearch-forward-regexp]        Use Isearch to search through multiple Info nodes.
 \\[Info-index] Search for a topic in this manual's Index and go to index entry.
 \\[Info-index-next]    (comma) Move to the next match from a previous \\<Info-mode-map>\\[Info-index] command.
 \\[info-apropos]       Look for a string in the indices of all manuals.
@@ -3831,10 +3837,10 @@ the variable `Info-file-list-for-emacs'."
                ((string-equal (downcase tag) "prev") Info-prev-link-keymap)
                ((string-equal (downcase tag) "next") Info-next-link-keymap)
                ((string-equal (downcase tag) "up"  ) Info-up-link-keymap))))))
-        
+
         (when (> Info-breadcrumbs-depth 0)
           (Info-insert-breadcrumbs))
-        
+
         ;; Treat header line.
         (when Info-use-header-line
           (goto-char (point-min))
@@ -3893,7 +3899,7 @@ the variable `Info-file-list-for-emacs'."
           ;; This is a serious problem for trying to handle multiple
           ;; frame types at once.  We want this text to be invisible
           ;; on frames that can display the font above.
-          (when (memq (framep (selected-frame)) '(x pc w32 mac ns))
+          (when (memq (framep (selected-frame)) '(x pc w32 ns))
             (add-text-properties (1- (match-beginning 2)) (match-end 2)
                                  '(invisible t front-sticky nil rear-nonsticky t)))))