/[emacs]/emacs/lisp/info-look.el
ViewVC logotype

Diff of /emacs/lisp/info-look.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29 by rms, Sat Dec 28 21:28:56 2002 UTC revision 1.30 by lektu, Sun Mar 30 20:28:18 2003 UTC
# Line 795  Return nil if there is nothing appropria Line 795  Return nil if there is nothing appropria
795                   (t nil)))                   (t nil)))
796                nil; "^ - [^:]+:[ ]+" don't think this prefix is useful here.                nil; "^ - [^:]+:[ ]+" don't think this prefix is useful here.
797                nil)))                nil)))
798    
799    ;; coreutils and bash builtins overlap in places, eg. printf, so there's a
800    ;; question which should come first.  Some of the sh-utils descriptions are
801    ;; more detailed, but if bash is usually /bin/sh on a GNU system then the
802    ;; builtins will be what's normally run.
803    ;;
804    ;; Maybe special variables like $? should be matched as $?, not just ?.
805    ;; This would avoid a clash between variable $! and negation !, or variable
806    ;; $# and comment # (though comment # is not currently indexed in bash).
807    ;; Unfortunately if $? etc is the symbol, then we wouldn't be taken to the
808    ;; exact spot in the relevant node, since the bash manual has just `?' etc
809    ;; there.  Maybe an extension to the prefix/suffix scheme could help this.
810    
811    (info-lookup-maybe-add-help
812     :mode 'sh-mode :topic 'symbol
813     ;; bash has "." and ":" in its index, but those chars will probably never
814     ;; work in info, so don't bother matching them in the regexp.
815     :regexp "\\([a-zA-Z0-9_-]+\\|[!{}@*#?$]\\|\\[\\[?\\|]]?\\)"
816     :doc-spec '(("(bash)Builtin Index"       nil "^`" "[ .']")
817                 ("(bash)Reserved Word Index" nil "^`" "[ .']")
818                 ("(bash)Variable Index"      nil "^`" "[ .']")
819                 ;; coreutils (version 4.5.10) doesn't have a separate program
820                 ;; index, so exclude extraneous stuff (most of it) by demanding
821                 ;; "[a-z]+" in the trans-func.
822                 ("(coreutils)Index"
823                  (lambda (item) (if (string-match "\\`[a-z]+\\'" item) item)))
824                 ;; diff (version 2.8.1) has only a few programs, index entries
825                 ;; are things like "foo invocation".
826                 ("(diff)Index"
827                  (lambda (item)
828                    (if (string-match "\\`\\([a-z]+\\) invocation\\'" item)
829                        (match-string 1 item))))
830                 ;; there's no plain "sed" index entry as such, mung another
831                 ;; hopefully unique one to get to the invocation section
832                 ("(sed)Concept Index"
833                  (lambda (item)
834                    (if (string-equal item "Standard input, processing as input")
835                        "sed")))
836                 ;; there's no plain "awk" or "gawk" index entries, mung other
837                 ;; hopefully unique ones to get to the command line options
838                 ("(gawk)Index"
839                  (lambda (item)
840                    (cond ((string-equal item "gawk, extensions, disabling")
841                           "awk")
842                          ((string-equal item "gawk, versions of, information about, printing")
843                           "gawk"))))))
844    
845  (provide 'info-look)  (provide 'info-look)
846    

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26