diff options
| author | Chong Yidong | 2005-12-04 04:31:59 +0000 |
|---|---|---|
| committer | Chong Yidong | 2005-12-04 04:31:59 +0000 |
| commit | d8fbba2278109c5fff861858d2a4421735bc79a9 (patch) | |
| tree | 3b026707aa57ec017410f4bb16656fa04af84947 | |
| parent | 4d4a3fb3978179dffee04b05df2b10d79bb0671a (diff) | |
| download | emacs-d8fbba2278109c5fff861858d2a4421735bc79a9.tar.gz emacs-d8fbba2278109c5fff861858d2a4421735bc79a9.zip | |
* info.el (Info-fontify-node): Match external links using
non-directory part of filename.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/info.el | 45 |
2 files changed, 35 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c0f6517bcb2..48adb28ca70 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-12-03 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * info.el (Info-fontify-node): Match external links using | ||
| 4 | non-directory part of filename. | ||
| 5 | |||
| 1 | 2005-12-04 Juri Linkov <juri@jurta.org> | 6 | 2005-12-04 Juri Linkov <juri@jurta.org> |
| 2 | 7 | ||
| 3 | * font-core.el (global-font-lock-mode): Use define-global-minor-mode | 8 | * font-core.el (global-font-lock-mode): Use define-global-minor-mode |
diff --git a/lisp/info.el b/lisp/info.el index 8b6828f8a94..2853a0f94ee 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -3800,17 +3800,25 @@ the variable `Info-file-list-for-emacs'." | |||
| 3800 | (and (not (equal (match-string 4) "")) | 3800 | (and (not (equal (match-string 4) "")) |
| 3801 | (match-string 4)) | 3801 | (match-string 4)) |
| 3802 | (match-string 2))))) | 3802 | (match-string 2))))) |
| 3803 | (file Info-current-file) | 3803 | (external-link-p |
| 3804 | (string-match "(\\([^)]+\\))\\([^)]*\\)" node)) | ||
| 3805 | (file (if external-link-p | ||
| 3806 | (file-name-nondirectory | ||
| 3807 | (match-string 1 node)) | ||
| 3808 | Info-current-file)) | ||
| 3804 | (hl Info-history-list) | 3809 | (hl Info-history-list) |
| 3805 | res) | 3810 | res) |
| 3806 | (if (string-match "(\\([^)]+\\))\\([^)]*\\)" node) | 3811 | (if external-link-p |
| 3807 | (setq file (Info-find-file (match-string 1 node) t) | 3812 | (setq node (if (equal (match-string 2 node) "") |
| 3808 | node (if (equal (match-string 2 node) "") | ||
| 3809 | "Top" | 3813 | "Top" |
| 3810 | (match-string 2 node)))) | 3814 | (match-string 2 node)))) |
| 3811 | (while hl | 3815 | (while hl |
| 3812 | (if (and (string-equal node (nth 1 (car hl))) | 3816 | (if (and (string-equal node (nth 1 (car hl))) |
| 3813 | (string-equal file (nth 0 (car hl)))) | 3817 | (string-equal |
| 3818 | file (if external-link-p | ||
| 3819 | (file-name-nondirectory | ||
| 3820 | (caar hl)) | ||
| 3821 | (caar hl)))) | ||
| 3814 | (setq res (car hl) hl nil) | 3822 | (setq res (car hl) hl nil) |
| 3815 | (setq hl (cdr hl)))) | 3823 | (setq hl (cdr hl)))) |
| 3816 | res))) 'info-xref-visited 'info-xref)) | 3824 | res))) 'info-xref-visited 'info-xref)) |
| @@ -3902,20 +3910,27 @@ the variable `Info-file-list-for-emacs'." | |||
| 3902 | ;; Display visited menu items in a different face | 3910 | ;; Display visited menu items in a different face |
| 3903 | (if (and Info-fontify-visited-nodes | 3911 | (if (and Info-fontify-visited-nodes |
| 3904 | (save-match-data | 3912 | (save-match-data |
| 3905 | (let ((node (if (equal (match-string 3) "") | 3913 | (let* ((node (if (equal (match-string 3) "") |
| 3906 | (match-string 1) | 3914 | (match-string 1) |
| 3907 | (match-string 3))) | 3915 | (match-string 3))) |
| 3908 | (file Info-current-file) | 3916 | (external-link-p |
| 3909 | (hl Info-history-list) | 3917 | (string-match "(\\([^)]+\\))\\([^)]*\\)" node)) |
| 3910 | res) | 3918 | (file (if external-link-p |
| 3911 | (if (string-match "(\\([^)]+\\))\\([^)]*\\)" node) | 3919 | (file-name-nondirectory |
| 3912 | (setq file (Info-find-file (match-string 1 node) t) | 3920 | (match-string 1 node)) |
| 3913 | node (if (equal (match-string 2 node) "") | 3921 | Info-current-file)) |
| 3922 | (hl Info-history-list) | ||
| 3923 | res) | ||
| 3924 | (if external-link-p | ||
| 3925 | (setq node (if (equal (match-string 2 node) "") | ||
| 3914 | "Top" | 3926 | "Top" |
| 3915 | (match-string 2 node)))) | 3927 | (match-string 2 node)))) |
| 3916 | (while hl | 3928 | (while hl |
| 3917 | (if (and (string-equal node (nth 1 (car hl))) | 3929 | (if (and (string-equal node (nth 1 (car hl))) |
| 3918 | (string-equal file (nth 0 (car hl)))) | 3930 | (string-equal |
| 3931 | file (if external-link-p | ||
| 3932 | (file-name-nondirectory (caar hl)) | ||
| 3933 | (caar hl)))) | ||
| 3919 | (setq res (car hl) hl nil) | 3934 | (setq res (car hl) hl nil) |
| 3920 | (setq hl (cdr hl)))) | 3935 | (setq hl (cdr hl)))) |
| 3921 | res))) 'info-xref-visited 'info-xref))) | 3936 | res))) 'info-xref-visited 'info-xref))) |