3248 |
\(FILENAME NODENAME BUFFERPOS\)." |
\(FILENAME NODENAME BUFFERPOS\)." |
3249 |
(let ((where '()) |
(let ((where '()) |
3250 |
(cmd-desc (concat "^\\* +" (regexp-quote (symbol-name command)) |
(cmd-desc (concat "^\\* +" (regexp-quote (symbol-name command)) |
3251 |
"\\( <[0-9]+>\\)?:\\s *\\(.*\\)\\.$")) |
"\\( <[0-9]+>\\)?:\\s *\\(.*\\)\\." |
3252 |
|
"\\([ \t]*(line[ \t]*[0-9]*)\\)?$")) |
3253 |
(info-file "emacs")) ;default |
(info-file "emacs")) ;default |
3254 |
;; Determine which info file this command is documented in. |
;; Determine which info file this command is documented in. |
3255 |
(if (get command 'info-file) |
(if (get command 'info-file) |
3446 |
(fontify-visited-p ; visited nodes need to be re-fontified |
(fontify-visited-p ; visited nodes need to be re-fontified |
3447 |
(and Info-fontify-visited-nodes |
(and Info-fontify-visited-nodes |
3448 |
;; Don't take time to refontify visited nodes in huge nodes |
;; Don't take time to refontify visited nodes in huge nodes |
3449 |
(< (- (point-max) (point-min)) Info-fontify-maximum-menu-size)))) |
(< (- (point-max) (point-min)) Info-fontify-maximum-menu-size))) |
3450 |
|
rbeg rend) |
3451 |
|
|
3452 |
;; Fontify header line |
;; Fontify header line |
3453 |
(goto-char (point-min)) |
(goto-char (point-min)) |
3572 |
"mouse-2: go to this node") |
"mouse-2: go to this node") |
3573 |
'mouse-face 'highlight))) |
'mouse-face 'highlight))) |
3574 |
(when (or not-fontified-p fontify-visited-p) |
(when (or not-fontified-p fontify-visited-p) |
3575 |
(add-text-properties |
(setq rbeg (match-beginning 2) |
3576 |
(match-beginning 2) (match-end 2) |
rend (match-end 2)) |
3577 |
(list |
(put-text-property |
3578 |
'font-lock-face |
rbeg rend |
3579 |
;; Display visited nodes in a different face |
'font-lock-face |
3580 |
(if (and Info-fontify-visited-nodes |
;; Display visited nodes in a different face |
3581 |
(save-match-data |
(if (and Info-fontify-visited-nodes |
3582 |
(let* ((node (replace-regexp-in-string |
(save-match-data |
3583 |
"^[ \t]+" "" |
(let* ((node (replace-regexp-in-string |
3584 |
(replace-regexp-in-string |
"^[ \t]+" "" |
3585 |
"[ \t\n]+" " " |
(replace-regexp-in-string |
3586 |
(or (match-string 5) |
"[ \t\n]+" " " |
3587 |
(and (not (equal (match-string 4) "")) |
(or (match-string 5) |
3588 |
(match-string 4)) |
(and (not (equal (match-string 4) "")) |
3589 |
(match-string 2))))) |
(match-string 4)) |
3590 |
(file (file-name-nondirectory |
(match-string 2))))) |
3591 |
Info-current-file)) |
(file (file-name-nondirectory |
3592 |
(hl Info-history-list) |
Info-current-file)) |
3593 |
res) |
(hl Info-history-list) |
3594 |
(if (string-match "(\\([^)]+\\))\\([^)]*\\)" node) |
res) |
3595 |
(setq file (file-name-nondirectory |
(if (string-match "(\\([^)]+\\))\\([^)]*\\)" node) |
3596 |
(match-string 1 node)) |
(setq file (file-name-nondirectory |
3597 |
node (if (equal (match-string 2 node) "") |
(match-string 1 node)) |
3598 |
"Top" |
node (if (equal (match-string 2 node) "") |
3599 |
(match-string 2 node)))) |
"Top" |
3600 |
(while hl |
(match-string 2 node)))) |
3601 |
(if (and (string-equal node (nth 1 (car hl))) |
(while hl |
3602 |
(string-equal file |
(if (and (string-equal node (nth 1 (car hl))) |
3603 |
(file-name-nondirectory |
(string-equal file |
3604 |
(nth 0 (car hl))))) |
(file-name-nondirectory |
3605 |
(setq res (car hl) hl nil) |
(nth 0 (car hl))))) |
3606 |
(setq hl (cdr hl)))) |
(setq res (car hl) hl nil) |
3607 |
res))) 'info-xref-visited 'info-xref)))) |
(setq hl (cdr hl)))) |
3608 |
|
res))) 'info-xref-visited 'info-xref)) |
3609 |
|
;; For multiline ref, unfontify newline and surrounding whitespace |
3610 |
|
(save-excursion |
3611 |
|
(goto-char rbeg) |
3612 |
|
(save-match-data |
3613 |
|
(while (re-search-forward "\\s-*\n\\s-*" rend t nil) |
3614 |
|
(remove-text-properties (match-beginning 0) |
3615 |
|
(match-end 0) |
3616 |
|
'(font-lock-face t)))))) |
3617 |
(when not-fontified-p |
(when not-fontified-p |
3618 |
(when (memq Info-hide-note-references '(t hide)) |
(when (memq Info-hide-note-references '(t hide)) |
3619 |
(add-text-properties (match-beginning 3) (match-end 3) |
(add-text-properties (match-beginning 3) (match-end 3) |