]> code.delx.au - gnu-emacs/commitdiff
* info.el (Info-fontify-node): Match external links using
authorChong Yidong <cyd@stupidchicken.com>
Sun, 4 Dec 2005 04:31:59 +0000 (04:31 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 4 Dec 2005 04:31:59 +0000 (04:31 +0000)
non-directory part of filename.

lisp/ChangeLog
lisp/info.el

index c0f6517bcb26d0a8ac667eba591550a159ece7a0..48adb28ca70c168a19ebc8922a9cd9ac802a1149 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-03  Chong Yidong  <cyd@stupidchicken.com>
+
+       * info.el (Info-fontify-node): Match external links using
+       non-directory part of filename.
+
 2005-12-04  Juri Linkov  <juri@jurta.org>
 
        * font-core.el (global-font-lock-mode): Use define-global-minor-mode
index 8b6828f8a941eaf06899f5d09b68f6a6dcb4a1c0..2853a0f94eed5faa1b05eed43e421824d3bd85ca 100644 (file)
@@ -3800,17 +3800,25 @@ the variable `Info-file-list-for-emacs'."
                                              (and (not (equal (match-string 4) ""))
                                                   (match-string 4))
                                              (match-string 2)))))
-                                 (file Info-current-file)
+                                (external-link-p
+                                 (string-match "(\\([^)]+\\))\\([^)]*\\)" node))
+                                 (file (if external-link-p
+                                          (file-name-nondirectory
+                                           (match-string 1 node))
+                                        Info-current-file))
                                  (hl Info-history-list)
                                  res)
-                            (if (string-match "(\\([^)]+\\))\\([^)]*\\)" node)
-                                (setq file (Info-find-file (match-string 1 node) t)
-                                      node (if (equal (match-string 2 node) "")
+                            (if external-link-p
+                               (setq node (if (equal (match-string 2 node) "")
                                                "Top"
                                              (match-string 2 node))))
                            (while hl
                              (if (and (string-equal node (nth 1 (car hl)))
-                                      (string-equal file (nth 0 (car hl))))
+                                      (string-equal
+                                       file (if external-link-p
+                                                (file-name-nondirectory
+                                                 (caar hl))
+                                              (caar hl))))
                                  (setq res (car hl) hl nil)
                                (setq hl (cdr hl))))
                             res))) 'info-xref-visited 'info-xref))
@@ -3902,20 +3910,27 @@ the variable `Info-file-list-for-emacs'."
                  ;; Display visited menu items in a different face
                  (if (and Info-fontify-visited-nodes
                           (save-match-data
-                            (let ((node (if (equal (match-string 3) "")
-                                            (match-string 1)
-                                          (match-string 3)))
-                                  (file Info-current-file)
-                                  (hl Info-history-list)
-                                  res)
-                              (if (string-match "(\\([^)]+\\))\\([^)]*\\)" node)
-                                  (setq file (Info-find-file (match-string 1 node) t)
-                                        node (if (equal (match-string 2 node) "")
+                            (let* ((node (if (equal (match-string 3) "")
+                                            (match-string 1)
+                                          (match-string 3)))
+                                  (external-link-p
+                                   (string-match "(\\([^)]+\\))\\([^)]*\\)" node))
+                                  (file (if external-link-p
+                                            (file-name-nondirectory
+                                             (match-string 1 node))
+                                          Info-current-file))
+                                  (hl Info-history-list)
+                                  res)
+                              (if external-link-p
+                                  (setq node (if (equal (match-string 2 node) "")
                                                  "Top"
                                                (match-string 2 node))))
                              (while hl
                                (if (and (string-equal node (nth 1 (car hl)))
-                                        (string-equal file (nth 0 (car hl))))
+                                        (string-equal
+                                         file (if external-link-p
+                                                  (file-name-nondirectory (caar hl))
+                                                (caar hl))))
                                    (setq res (car hl) hl nil)
                                  (setq hl (cdr hl))))
                               res))) 'info-xref-visited 'info-xref)))