539 |
(beginning-of-line) |
(beginning-of-line) |
540 |
(when (re-search-forward regexp nil t) |
(when (re-search-forward regexp nil t) |
541 |
(list (string-equal "Ref:" (match-string 1)) |
(list (string-equal "Ref:" (match-string 1)) |
542 |
(1+ (read (current-buffer))) |
(+ (point-min) (read (current-buffer))) |
543 |
major-mode))))) |
major-mode))))) |
544 |
|
|
545 |
(defun Info-find-in-tag-table (marker regexp) |
(defun Info-find-in-tag-table (marker regexp) |
929 |
thisfilepos thisfilename) |
thisfilepos thisfilename) |
930 |
(search-forward ": ") |
(search-forward ": ") |
931 |
(setq thisfilename (buffer-substring beg (- (point) 2))) |
(setq thisfilename (buffer-substring beg (- (point) 2))) |
932 |
(setq thisfilepos (read (current-buffer))) |
(setq thisfilepos (+ (point-min) (read (current-buffer)))) |
933 |
;; read in version 19 stops at the end of number. |
;; read in version 19 stops at the end of number. |
934 |
;; Advance to the next line. |
;; Advance to the next line. |
935 |
(forward-line 1) |
(forward-line 1) |
1074 |
;; It does completion using the alist in Info-read-node-completion-table |
;; It does completion using the alist in Info-read-node-completion-table |
1075 |
;; unless STRING starts with an open-paren. |
;; unless STRING starts with an open-paren. |
1076 |
(defun Info-read-node-name-1 (string predicate code) |
(defun Info-read-node-name-1 (string predicate code) |
1077 |
(let ((no-completion (and (> (length string) 0) (eq (aref string 0) ?\()))) |
(cond |
1078 |
(cond ((eq code nil) |
;; First complete embedded file names. |
1079 |
(if no-completion |
((string-match "\\`([^)]*\\'" string) |
1080 |
string |
(let ((file (substring string 1))) |
1081 |
(try-completion string Info-read-node-completion-table predicate))) |
(cond |
1082 |
((eq code t) |
((eq code nil) |
1083 |
(if no-completion |
(let ((comp (try-completion file 'locate-file-completion |
1084 |
nil |
(cons Info-directory-list |
1085 |
(all-completions string Info-read-node-completion-table predicate))) |
(mapcar 'car Info-suffix-list))))) |
1086 |
((eq code 'lambda) |
(cond |
1087 |
(if no-completion |
((eq comp t) (concat string ")")) |
1088 |
t |
(comp (concat "(" comp))))) |
1089 |
(assoc string Info-read-node-completion-table)))))) |
((eq code t) (all-completions file 'locate-file-completion |
1090 |
|
(cons Info-directory-list |
1091 |
|
(mapcar 'car Info-suffix-list)))) |
1092 |
|
(t nil)))) |
1093 |
|
;; If a file name was given, then any node is fair game. |
1094 |
|
((string-match "\\`(" string) |
1095 |
|
(cond |
1096 |
|
((eq code nil) string) |
1097 |
|
((eq code t) nil) |
1098 |
|
(t t))) |
1099 |
|
;; Otherwise use Info-read-node-completion-table. |
1100 |
|
((eq code nil) |
1101 |
|
(try-completion string Info-read-node-completion-table predicate)) |
1102 |
|
((eq code t) |
1103 |
|
(all-completions string Info-read-node-completion-table predicate)) |
1104 |
|
(t |
1105 |
|
(test-completion string Info-read-node-completion-table predicate)))) |
1106 |
|
|
1107 |
(defun Info-read-node-name (prompt &optional default) |
(defun Info-read-node-name (prompt &optional default) |
1108 |
(let* ((completion-ignore-case t) |
(let* ((completion-ignore-case t) |
1459 |
(while |
(while |
1460 |
(progn |
(progn |
1461 |
(while (re-search-forward pattern nil t) |
(while (re-search-forward pattern nil t) |
1462 |
(push (cons (match-string-no-properties 1) |
(push (match-string-no-properties 1) |
|
(match-beginning 1)) |
|
1463 |
completions)) |
completions)) |
1464 |
;; Check subsequent nodes if applicable. |
;; Check subsequent nodes if applicable. |
1465 |
(and Info-complete-next-re |
(and Info-complete-next-re |