]> code.delx.au - gnu-emacs/blobdiff - lisp/info.el
(goto-address-mail-regexp): Allow = in username.
[gnu-emacs] / lisp / info.el
index cc7ed2ae59b26939cf2a6ce445d262c465cd4d9e..750f302d4227ee28b024f8388b38591b77ebd688 100644 (file)
@@ -86,7 +86,7 @@ The Lisp code is executed when the node is selected.")
   :group 'info)
 
 (defface info-xref-visited
-  '((t :inherit info-xref)
+  '((default :inherit info-xref)
     (((class color) (background light)) :foreground "magenta4")
     (((class color) (background dark)) :foreground "magenta3")) ;"violet"?
   "Face for visited Info cross-references."
@@ -188,7 +188,7 @@ file, so be prepared for a few surprises if you enable this feature."
   :type 'boolean
   :group 'info)
 
-(defcustom Info-search-whitespace-regexp "\\(?:\\s-+\\)"
+(defcustom Info-search-whitespace-regexp "\\s-+"
   "*If non-nil, regular expression to match a sequence of whitespace chars.
 This applies to Info search for regular expressions.
 You might want to use something like \"[ \\t\\r\\n]+\" instead.
@@ -1468,10 +1468,6 @@ If DIRECTION is `backward', search in the reverse direction."
          (opoint-max (point-max))
          (ostart (window-start))
          (osubfile Info-current-subfile))
-      (when Info-search-whitespace-regexp
-        (setq regexp
-              (mapconcat 'identity (split-string regexp "[ \t\n]+")
-                         Info-search-whitespace-regexp)))
       (setq Info-search-case-fold case-fold-search)
       (save-excursion
        (save-restriction
@@ -1490,24 +1486,27 @@ If DIRECTION is `backward', search in the reverse direction."
                                (isearch-range-invisible found beg-found)
                              (isearch-range-invisible beg-found found))
                            ;; Skip node header line
-                           (save-excursion (forward-line -1)
-                                           (looking-at "\^_"))
+                           (and (save-excursion (forward-line -1)
+                                                (looking-at "\^_"))
+                                (forward-line 1))
                            ;; Skip Tag Table node
                            (save-excursion
                              (and (search-backward "\^_" nil t)
                                   (looking-at "\^_\nTag Table"))))))
-           (if (if backward
-                    (re-search-backward regexp bound t)
-                  (re-search-forward regexp bound t))
-               (setq found (point) beg-found (if backward (match-end 0)
-                                                (match-beginning 0)))
-             (setq give-up t)))))
+           (let ((search-spaces-regexp Info-search-whitespace-regexp))
+             (if (if backward
+                     (re-search-backward regexp bound t)
+                   (re-search-forward regexp bound t))
+                 (setq found (point) beg-found (if backward (match-end 0)
+                                                 (match-beginning 0)))
+               (setq give-up t))))))
       ;; If no subfiles, give error now.
       (if give-up
          (if (null Info-current-subfile)
-             (if backward
-                  (re-search-backward regexp)
-                (re-search-forward regexp))
+             (let ((search-spaces-regexp Info-search-whitespace-regexp))
+               (if backward
+                   (re-search-backward regexp)
+                 (re-search-forward regexp)))
            (setq found nil)))
 
       (unless (or found bound)
@@ -1563,18 +1562,20 @@ If DIRECTION is `backward', search in the reverse direction."
                                      (isearch-range-invisible found beg-found)
                                    (isearch-range-invisible beg-found found))
                                  ;; Skip node header line
-                                 (save-excursion (forward-line -1)
-                                                 (looking-at "\^_"))
+                                 (and (save-excursion (forward-line -1)
+                                                      (looking-at "\^_"))
+                                      (forward-line 1))
                                  ;; Skip Tag Table node
                                  (save-excursion
                                    (and (search-backward "\^_" nil t)
                                         (looking-at "\^_\nTag Table"))))))
-                 (if (if backward
-                          (re-search-backward regexp nil t)
-                        (re-search-forward regexp nil t))
-                     (setq found (point) beg-found (if backward (match-end 0)
-                                                      (match-beginning 0)))
-                   (setq give-up t)))
+                 (let ((search-spaces-regexp Info-search-whitespace-regexp))
+                   (if (if backward
+                           (re-search-backward regexp nil t)
+                         (re-search-forward regexp nil t))
+                       (setq found (point) beg-found (if backward (match-end 0)
+                                                       (match-beginning 0)))
+                     (setq give-up t))))
                (if give-up
                    (setq found nil))
                (if found
@@ -2833,8 +2834,7 @@ if point is in a menu item description, follow that menu item."
   "Follow a node reference near point.  Return non-nil if successful."
   (let (node)
     (cond
-     ((and (Info-get-token (point) "[hf]t?tp://" "[hf]t?tp://\\([^ \t\n\"`({<>})']+\\)")
-           (or (featurep 'browse-url) (require 'browse-url nil t)))
+     ((Info-get-token (point) "[hf]t?tp://" "[hf]t?tp://\\([^ \t\n\"`({<>})']+\\)")
       (setq node t)
       (browse-url (browse-url-url-at-point)))
      ((setq node (Info-get-token (point) "\\*note[ \n\t]+"