Commit graph

111 commits

Author SHA1 Message Date
Dave Love
c0b08eb017 Use imenu-case-fold-search. 1997-12-12 17:10:08 +00:00
Simon Marshall
87002f70a3 Deal with `#'s in variable references. 1997-12-04 19:47:59 +00:00
Karl Heuer
aa2c242656 (sh-imenu-generic-expression): New variable.
(sh-mode): Make imenu-generic-expression local.
(sh-set-shell): Set imenu-generic-expression based on which shell.
1997-12-04 04:27:50 +00:00
Dave Love
59c14ec62d (sh-mode): Set `comment-start-skip' always. 1997-11-30 12:21:42 +00:00
Richard M. Stallman
af9944ea8b (sh-indent-line): Delete debugging code. 1997-08-27 17:39:44 +00:00
Richard M. Stallman
54c87e2714 (sh-indent-line): Avoid infinite loop
on indented line at start of buffer, when calculating PREVIOUS.
1997-08-23 05:19:09 +00:00
Richard M. Stallman
43c89a968e Whitespace change. 1997-06-22 18:47:05 +00:00
Simon Marshall
38c979d349 Update for syntax-table text properties.
sh-script.el now directs font-lock.el to add them to instances of # which are not comments.
1997-05-29 07:04:00 +00:00
Richard M. Stallman
c410bd65f5 (sh-case): Make this a simple define-skeleton
as it was originally.  Don't add a menu-enable property.
(sh-assignment-regexp): Renamed from sh-assignment-prefix
undoing a renaming made by mistake.
1997-04-22 04:37:22 +00:00
Richard M. Stallman
ea39159ea2 Remove all menu-enable properties except for sh-case. 1997-04-17 23:08:33 +00:00
Richard M. Stallman
c02f273d17 (sh-while-getopts): Don't add menu-enable property. 1997-04-15 18:16:28 +00:00
Richard M. Stallman
cd482e0573 Add defgroup's; change use defcustom for user vars. 1997-04-12 02:51:38 +00:00
Richard M. Stallman
2718efdd52 (sh-mode): Set font-lock-comment-start-regexp via font-lock-defaults.
(sh-set-shell): Don't set font-lock-keywords or font-lock-syntax-table,
and don't toggle Font Lock mode if it is already on.
1997-04-10 06:38:26 +00:00
Richard M. Stallman
22d5cb5048 (sh-set-shell): If file has no #! line,
set the syntax table based on the default shell.
1997-03-30 02:10:40 +00:00
Richard M. Stallman
ff9c168275 (sh-case): Define with defun and defvar
instead of define-skeleton.
1997-03-22 03:53:10 +00:00
Karl Heuer
2bffb7c4d4 (sh-mode-hook, sh-set-shell-hook): Add defvars. 1997-02-23 08:40:41 +00:00
Richard M. Stallman
5c4491697a (sh-shell-file): Downcase and remove extension on shells in NT. 1997-01-07 09:02:48 +00:00
Richard M. Stallman
d9de8c0454 (sh-shell-file): On MSDOS, collapse $SHELL to lower
case and remove the executable extension, if any.
(sh-other-keywords): Define an entry for `sh' and make `bourne'
inherit from that.

(sh-mode): Always pass nil as 3rd arg to sh-set-shell.
1997-01-02 02:51:05 +00:00
Richard M. Stallman
e3dce9ba22 (sh-set-shell): Pass args no-query-flag
and insert-flag to executable-set-magic.
Don't call executable-set-magic if insert-flag is nil.
(sh-mode): Always call sh-set-shell, but use insert-flag arg
to control whether to call executable-set-magic.
No need to set comment-start-skip directly here.

(sh-mode): Parse the interpreter from the file text.
1996-11-09 22:17:58 +00:00
Richard M. Stallman
c8005e7012 (sh-mode-syntax-table): Turn on comment syntax for #,
comment-end for newline, string for `, and excape for $.
rc can use the same as sh.  Move csh after sh.
(sh-comment-prefix, sh-font-lock-keyw-rds-only): Variables deleted.
(sh-mode): Adjust setting of font-lock-defaults.
(sh-font-lock-keywords): No need for anything special for comments.
(sh-set-shell, sh-mode): Set comment-start-skip to a simple constant.
1996-11-07 06:21:19 +00:00
Richard M. Stallman
a14bf24d3a (sh-mode): Set `comment-start-skip'; otherwise
only set if `sh-set-shell' gets called.
1996-11-07 05:59:43 +00:00
Simon Marshall
f802bd0253 Use new face. 1996-10-28 10:08:07 +00:00
Richard M. Stallman
44d7776b5b (sh-mode): Don't make font-lock-keywords buffer-local. 1996-10-26 16:06:24 +00:00
Richard M. Stallman
6dd4407cdc (sh-alias-alist): Use gnu/linux, not lignux. 1996-08-28 20:09:51 +00:00
Karl Heuer
c14c7a0511 (sh-mode): Call sh-set-shell only for a writable
empty buffer.
1996-07-15 20:17:53 +00:00
Richard M. Stallman
c898fb2821 (sh-while-getopts): Punctuate help message better. 1996-04-15 21:17:59 +00:00
Richard M. Stallman
a124b2795d (sh-alias-alist): Recognize lignux. 1996-03-27 02:39:09 +00:00
Richard M. Stallman
8d31ff153a (sh-shell-arg): Add no options for bash, ksh, or wksh. 1996-03-27 00:09:54 +00:00
Richard M. Stallman
8e46e26749 (sh-shell-arg): Don't add any options for bash, ksh. 1996-03-25 01:42:05 +00:00
Richard M. Stallman
b48a16d28d (sh-font-lock-keywords): Highlight \ only with non-alphanumeric char. 1996-03-20 16:18:23 +00:00
Richard M. Stallman
5d73ac6685 (sh-shell-variables-initialized): New variable.
(sh-mode): Make sh-shell-variables and
sh-shell-variables-initialized local.
(sh-set-shell): Don't scan the buffer for variable assignments.
Set sh-shell-variables-initialized to nil.
(sh-shell-initialize-variables): New function.
(sh-add-completer): New function.  Initialize sh-shell-variables
here if not yet done.
(sh-add): Use sh-add-completer for completion.
1996-01-29 23:11:40 +00:00
Erik Naggum
fc8318f6c8 (sh-mode): Add autoload cookie. 1996-01-19 00:10:34 +00:00
Richard M. Stallman
b46c06dea5 (sh-indent-line): Cope if no previous noncomment line. 1996-01-17 22:41:21 +00:00
Richard M. Stallman
5a989d6ec0 (sh-shell-variables): New variable.
(sh-set-shell, sh-remember-variable):
Set sh-shell-variable, not process-environment.
(sh-mode): Don't make process-environment local.
Add a mode-class property.
(sh-add): Use sh-shell-variable in completion.
Compute alist properly from process-environment.
1996-01-17 00:19:44 +00:00
Erik Naggum
b578f267af Update FSF's address. 1996-01-14 07:34:30 +00:00
Richard M. Stallman
616db04b18 (sh-mode): Don't move point.
(sh-set-shell): New args NO-QUERY-FLAG and INSERT-FLAG.
Pass them to executable-set-magic.
Really set font-lock-syntax-table.  Slight cleanups.
1996-01-11 17:11:39 +00:00
Karl Heuer
aafd074a3e (sh-alias-alist): Don't map sh to bash.
(sh-canonicalize-shell): New function.
(sh-shell-file): Renamed from sh-shell-path.
(sh-set-shell): Don't set local-abbrev-table.
(sh-abbrevs): Variable and function definition commented out.
1996-01-09 23:19:53 +00:00
Richard M. Stallman
6cfd21c904 (interpreter-mode-alist, auto-mode-alist): Don't alter this here. 1996-01-05 02:36:06 +00:00
Karl Heuer
f29601ad4d (sh-mode-syntax-table): Doc fix. 1996-01-04 23:48:07 +00:00
Karl Heuer
f7c7053ea6 Provide sh-script. 1995-12-13 01:37:58 +00:00
Karl Heuer
bfc8e97b47 (sh-mode-map): Make the code more legible.
(sh-font-lock-keywords-1): Allow keyword `in' at eol too.
(sh-font-lock-keywords-only): New variable to prevent an apostrophe
in comment from misfontifying buffer, but to allow users who don't
have such to get strings fontified.
(sh-mode): Use it.
1995-12-13 01:22:05 +00:00
Erik Naggum
2cefc54e03 (sh-mode): Remove ! in column 1. 1995-11-11 14:35:47 +00:00
Richard M. Stallman
a91f616d88 (sh-mode): as above. Use page-delimiter rather than literal "^L". 1995-11-11 05:31:11 +00:00
Richard M. Stallman
fd4ea9a214 (sh-mode-map): Put sh-execute-region on C-M-x.
Put executable-interpret on C-c C-x.
1995-11-10 17:06:28 +00:00
Karl Heuer
84bfbb448d (sh-shells): Eliminated variable redundant with
`interpreter-mode-alist'.
(sh-beginning-of-command): Take into account \quoted newline.
(sh-builtins, sh-leading-keywords, sh-other-keywords): Now three
distinct sets for font-locking.
(sh-font-lock-keywords-1, sh-font-lock-keywords-2): New variables
and functions to give the user finer control over how much to fontify,
including new distinction between keywords and builtins.
(sh-mode): Use new features of `font-lock-defaults' and adaptation
to skeleton changes.
(sh-while): Fix csh, es & rc skeletons.
1995-11-03 03:29:46 +00:00
Karl Heuer
7874dacdaa (sh-remember-variable): Set variable to empty string,
so as not to mess up subprocesses' environment.  Not so nice for
completion.
1995-11-03 03:16:36 +00:00
Karl Heuer
cd76025c78 (sh-newline-and-indent): Don't interpret prefix arg
since `newline-and-indent' doesn't either.  Don't turn a trailing
quoted tab into a space.
(sh-mode): Use new `skeleton-newline-indent-rigidly'.
(sh-set-shell): Make maximum font-locking also hightlight keywords
after ``' and `!'.  (The latter is for ksh '93 but should't hurt other
shells.)
1995-08-19 00:30:56 +00:00
Karl Heuer
81ed2d75e9 (sh-mode-map): Use new name skeleton-pair-insert-maybe.
(sh-mode): Use new names skeleton-pair-alist, skeleton-pair-filter.
1995-08-15 20:05:12 +00:00
Karl Heuer
225f6185df (sh-test): New variable.
(sh-if, sh-until, sh-while): Use it.
(sh-while-getopts): Handle csh passably well.
(sh-font-lock-keywords): Use `font-lock-variable-name-face'.
(sh-set-shell): Respect `font-lock-maximum-decoration'.
1995-08-15 19:50:12 +00:00
Richard M. Stallman
4a789a5143 (interpreter-mode-alist): Delete autoload cookie. 1995-08-09 22:42:34 +00:00