1 |
;;; info-look.el --- major-mode-sensitive Info index lookup facility |
;;; info-look.el --- major-mode-sensitive Info index lookup facility |
2 |
;; An older version of this was known as libc.el. |
;; An older version of this was known as libc.el. |
3 |
|
|
4 |
;; Copyright (C) 1995,96,97,98,99,2001,2003,2004 Free Software Foundation, Inc. |
;; Copyright (C) 1995,96,97,98,99,2001,03,04 Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Ralph Schleicher <rs@nunatak.allgaeu.org> |
;; Author: Ralph Schleicher <rs@nunatak.allgaeu.org> |
7 |
;; (did not show signs of life (Nov 2001) -stef) |
;; (did not show signs of life (Nov 2001) -stef) |
408 |
(message "No %s help available for `%s'" topic mode) |
(message "No %s help available for `%s'" topic mode) |
409 |
;; Recursively setup cross references. |
;; Recursively setup cross references. |
410 |
;; But refer only to non-void modes. |
;; But refer only to non-void modes. |
411 |
(mapcar (lambda (arg) |
(dolist (arg (info-lookup->other-modes topic mode)) |
412 |
(or (info-lookup->initialized topic arg) |
(or (info-lookup->initialized topic arg) |
413 |
(info-lookup-setup-mode topic arg)) |
(info-lookup-setup-mode topic arg)) |
414 |
(and (eq (info-lookup->initialized topic arg) t) |
(and (eq (info-lookup->initialized topic arg) t) |
415 |
(setq refer-modes (cons arg refer-modes)))) |
(setq refer-modes (cons arg refer-modes)))) |
|
(info-lookup->other-modes topic mode)) |
|
416 |
(setq refer-modes (nreverse refer-modes)) |
(setq refer-modes (nreverse refer-modes)) |
417 |
;; Build the full completion alist. |
;; Build the full completion alist. |
418 |
(setq completions |
(setq completions |
886 |
"awk") |
"awk") |
887 |
((string-equal item "gawk, versions of, information about, printing") |
((string-equal item "gawk, versions of, information about, printing") |
888 |
"gawk")))))) |
"gawk")))))) |
889 |
|
|
890 |
|
;; This misses some things which occur as node names but not in the |
891 |
|
;; index. Unfortunately it also picks up the wrong one of multiple |
892 |
|
;; entries for the same term in some cases. --fx |
893 |
|
(info-lookup-maybe-add-help |
894 |
|
:mode 'cfengine-mode |
895 |
|
:regexp "[[:alnum:]_]+\\(:?()\\)?" |
896 |
|
:doc-spec '(("(cfengine-Reference)Variable Index" |
897 |
|
(lambda (item) |
898 |
|
;; Index entries may be like `IsPlain()' |
899 |
|
(if (string-match "\\([[:alnum:]_]+\\)()" item) |
900 |
|
(match-string 1 item) |
901 |
|
item)) |
902 |
|
;; This gets functions in evaluated classes. Other |
903 |
|
;; possible patterns don't seem to work too well. |
904 |
|
"`" "("))) |
905 |
|
|
906 |
(provide 'info-look) |
(provide 'info-look) |
907 |
|
|