diff options
| author | Juanma Barranquero | 2003-03-30 20:31:23 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2003-03-30 20:31:23 +0000 |
| commit | c0e7fbb88eaff9808ec4a6ca058846d5f5c0c872 (patch) | |
| tree | 237f3ad01fbc721b832d3777b209ec4913e92ef8 | |
| parent | 7b7b454e76880ea18ec375277af655ba9891ba0a (diff) | |
| download | emacs-c0e7fbb88eaff9808ec4a6ca058846d5f5c0c872.tar.gz emacs-c0e7fbb88eaff9808ec4a6ca058846d5f5c0c872.zip | |
(sh-mode): Add doc-specs for commands and variables.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/info-look.el | 46 |
2 files changed, 52 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cb9d00766ad..a280903e00b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2003-03-30 Kevin Ryde <user42@zip.com.au> | ||
| 2 | |||
| 3 | * info-look.el (sh-mode): Add doc-specs for commands and variables. | ||
| 4 | |||
| 1 | 2003-03-29 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> | 5 | 2003-03-29 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> |
| 2 | 6 | ||
| 3 | * international/utf-8.el (utf-translate-cjk-mode): Minor mode, | 7 | * international/utf-8.el (utf-translate-cjk-mode): Minor mode, |
| @@ -14,7 +18,7 @@ | |||
| 14 | expands to itself, rather than "/foo". This is intended to work | 18 | expands to itself, rather than "/foo". This is intended to work |
| 15 | in conjunction with a change in `file-relative-name' which makes | 19 | in conjunction with a change in `file-relative-name' which makes |
| 16 | sure to use absolute file names if FILE and DIRECTORY have | 20 | sure to use absolute file names if FILE and DIRECTORY have |
| 17 | different handlers. | 21 | different handlers. |
| 18 | (tramp-handle-insert-directory): Comment out XEmacs | 22 | (tramp-handle-insert-directory): Comment out XEmacs |
| 19 | kludge. Suggested by Katsumi Yamaoka <yamaoka@jpl.org>. | 23 | kludge. Suggested by Katsumi Yamaoka <yamaoka@jpl.org>. |
| 20 | 24 | ||
| @@ -36,7 +40,7 @@ | |||
| 36 | to avoid variable capture. Set table within `unwind-protect'. | 40 | to avoid variable capture. Set table within `unwind-protect'. |
| 37 | Ensure table is restored in correct buffer. Add docstring. | 41 | Ensure table is restored in correct buffer. Add docstring. |
| 38 | 42 | ||
| 39 | 2003-03-29 Kenichi Handa <handa@etlken2> | 43 | 2003-03-29 Kenichi Handa <handa@m17n.org> |
| 40 | 44 | ||
| 41 | * language/japan-util.el: If system-type is not for Windows, | 45 | * language/japan-util.el: If system-type is not for Windows, |
| 42 | prefer japanese-iso-8bit. | 46 | prefer japanese-iso-8bit. |
diff --git a/lisp/info-look.el b/lisp/info-look.el index 1de84d3e421..9639a3cdab0 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el | |||
| @@ -795,6 +795,52 @@ Return nil if there is nothing appropriate in the buffer near point." | |||
| 795 | (t nil))) | 795 | (t nil))) |
| 796 | nil; "^ - [^:]+:[ ]+" don't think this prefix is useful here. | 796 | nil; "^ - [^:]+:[ ]+" don't think this prefix is useful here. |
| 797 | nil))) | 797 | 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")))))) | ||
| 798 | 844 | ||
| 799 | (provide 'info-look) | 845 | (provide 'info-look) |
| 800 | 846 | ||