Commit graph

280 commits

Author SHA1 Message Date
Glenn Morris
3154202d02 (sh-font-lock-keywords): Use something other than
font-lock-string-face to highlight backslashes.
2003-09-02 17:37:01 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Glenn Morris
fa1d74c5d1 (sh-builtins): Add some bash builtins.
(sh-leading-keywords): Add the bash `time' reserved word.
(sh-variables): Add some bash variables.
(sh-add-completer): Fix nil branch of case statement.
2003-08-24 15:26:13 +00:00
Andreas Schwab
cbc72cf5cf (sh-mode): Don't set mode-class property. 2003-08-02 20:09:42 +00:00
Andreas Schwab
29653ebc24 (sh-mode-syntax-table): Change syntax of ?, to "_". 2003-07-21 06:25:33 +00:00
Stefan Monnier
d96da6c47a (sh-font-lock-paren): Add [ and ] to the
set of chars allowed unquoted in a case pattern.
2003-07-04 20:37:49 +00:00
Juanma Barranquero
8f0b0ca5f5 (sh-while-getopts, sh-if, sh-case): Revert part of previous change. 2003-06-16 21:41:18 +00:00
Juanma Barranquero
bc38726909 Fix bug in "Options Loop" skeleton for ksh. Add newlines to a few skeletons,
add "select" keyword for bash.
2003-06-06 15:06:53 +00:00
Stefan Monnier
485219e0a2 (sh-is-quoted-p): New fun.
(sh-font-lock-paren): Use it to allow \C in case patterns.
(sh-get-indent-info): Check the \n before the line for string-status.
(sh-feature): Remove unused var `function'.
(sh-get-indent-info): Remove unused variables.
(sh-prev-thing): Remove unused vars `going', `n', and `found'.
(sh-set-indent): Remove unused var `new-val' and `val0'.
(sh-learn-buffer-indent): Remove unused vars `last-pos' and `lines'.
(sh-guess-basic-offset): Remove unused var `return' and `j'.
2003-06-01 17:36:41 +00:00
Glenn Morris
18368c4a7a (sh-here-document-word): Document new treatment of leading "-".
(sh-maybe-here-document): Strip a leading "-" from closing heredoc
delimiter, if present.
2003-05-27 18:40:55 +00:00
Andreas Schwab
817949efd8 (sh-mode-map): Don't remap
beginning-of-defun to the non-existing command
sh-beginning-of-compound-command.
2003-02-12 10:21:06 +00:00
Stefan Monnier
017708e9dd (sh-indent-line): Use indent-line-to.
(sh-non-closing-paren): New const.
(sh-case, sh-while-getopts): Use it to make props non-sticky.
(sh-add-completer): Use test-completion.
2003-01-18 20:42:47 +00:00
Andreas Schwab
5d1825c6fb (sh-mode-map): Use command remapping instead of
substitute-key-definition.
2003-01-12 20:51:12 +00:00
Juanma Barranquero
54aaebc516 (sh-set-shell): Make sh-shell-file the default shell. 2003-01-10 08:07:26 +00:00
Andreas Schwab
6f37d17b45 (sh-mode-syntax-table): Don't make ^L
end-of-comment syntax.
2002-10-27 23:01:57 +00:00
Juanma Barranquero
b554bbff24 (sh-indent-for-then): Fix typo. 2002-10-18 08:18:29 +00:00
Markus Rost
3ee5ce58f6 (sh-alias-alist): Use append instead of nconc. 2002-10-02 16:31:16 +00:00
Juanma Barranquero
348e141150 (sh-mark-init): Don't set `occur-buffer'.
(sh-mark-line): Likewise. Use 'occur-target and 'occur-match instead of 'occur
and 'occur-point.
2002-09-24 10:18:05 +00:00
Juanma Barranquero
4a9592f6f9 (sh-indent-for-fi, sh-indent-for-done): Fix spacing. 2002-09-06 07:17:05 +00:00
Juanma Barranquero
35cb44585e (sh-electric-rparen-needed): Remove. 2002-06-18 14:37:12 +00:00
Richard M. Stallman
57270c909c (sh-set-shell): Doc fix. 2002-01-22 21:05:13 +00:00
Richard M. Stallman
1fd714a410 (various face definitions): Use :weight, not :bold. 2001-12-31 20:44:44 +00:00
Richard M. Stallman
1c532f0d1c (sh-mode): Run sh-mode-hook. 2001-12-16 17:27:44 +00:00
Richard M. Stallman
b1e851bb95 (sh-mode-syntax-table): Function restored.
Variable set up for use by function sh-mode-syntax-table.
(sh-set-shell): Set the syntax table.
2001-11-21 11:12:45 +00:00
Richard M. Stallman
a7dba40b01 (sh-mode): Don't use define-derived-mode. 2001-11-21 11:06:40 +00:00
Richard M. Stallman
a25b40093a (sh-must-be-shell-mode): Function deleted. All calls deleted. 2001-11-18 06:50:58 +00:00
Richard M. Stallman
4aa3ba0a81 (sh-must-be-shell-mode): Allow modes derived from sh-mode. 2001-11-11 20:07:46 +00:00
Sam Steingold
b52b132fbf sugar: escape a "{" in the first column to pacify font-lock 2001-10-26 15:37:54 +00:00
Sam Steingold
187cd25bb0 (sh-font-lock-close-heredoc): check the args for being non-nil 2001-10-26 13:54:45 +00:00
Sam Steingold
035107fa9c no functional changes - a preparation for the next patch 2001-10-26 13:48:53 +00:00
Stefan Monnier
3e2dd647b7 (sh-font-lock-syntactic-keywords): Handle here-docs differently.
(sh-font-lock-heredoc): Remove.
(sh-here-doc-open-re, sh-here-doc-markers, sh-here-doc-re): New vars.
(sh-font-lock-here-doc, sh-font-lock-close-heredoc)
(sh-font-lock-open-heredoc): New functions.
(sh-mode): Don't copy sh-font-lock-syntactic-keywords any more.
(sh-font-lock-keywords-1): Use regexp-opt.
(sh-in-comment-or-string): Use syntax-ppss.
(sh-case, sh-for, sh-indexed-loop, sh-function, sh-if, sh-repeat)
(sh-select, sh-tmp-file): Add explicit terminating \n.
2001-10-13 19:08:30 +00:00
Eli Zaretskii
06d7490042 (sh-mark-line): Add help-echo to mouse-highlighted text. 2001-06-17 11:22:35 +00:00
Stefan Monnier
b36581fba0 (sh-prev-line): Look for sh-heredoc-face
rather than font-lock-string-face.
(sh-get-indent-info): Treat heredocs like strings.
2001-05-02 13:41:46 +00:00
Gerd Moellmann
3c05ee140a (sh-font-lock-heredoc): Allow
optional backslash at the start of the here-document delimiter.
(sh-font-lock-syntactic-keywords): Likewise.
2001-04-30 15:23:01 +00:00
Gerd Moellmann
cf8b1befd0 (sh-indent-line): Add optional PREFIX-ARG
parameter.
2001-04-10 14:16:51 +00:00
Stefan Monnier
bffd712e4a (sh-st-symbol): New symbol.
(sh-font-lock-syntactic-keywords): Use it and fix bogus comment regexp.
(sh-mode): Remove `make-local-variable' for unused var
`font-lock-unfontify-region-function'.
2001-03-07 15:34:43 +00:00
Dave Love
83c5d68f53 (sh-imenu-generic-expression): Fix doc,
:type.
2001-01-09 15:19:47 +00:00
Stefan Monnier
aace6150c0 (sh-mode-syntax-table) <defvar>:
Make it into a simple syntax-table, shared among all submodes.
(sh-heredoc-face): Re-introduce.
(sh-font-lock-syntactic-face-function): New function.
(sh-mode): Use it.  Also use define-derived-mode.
Remove old bogus setting of indent-region-function.
(sh-set-shell): Don't set the syntax-table any more.
(sh-mode-syntax-table) <defun>: Remove.
2000-11-12 16:48:45 +00:00
Stefan Monnier
34939e2c4a (sh-mode-map): Remove bindings for
sh-electric-rparen, sh-electric-less and sh-electric-hash.
(sh-st-punc, sh-here-doc-syntax): Use string-to-syntax.
(sh-font-lock-heredoc, sh-font-lock-paren): New funs.
(sh-font-lock-syntactic-keywords): Use them.
(sh-heredoc-face, sh-st-face, sh-special-syntax): Remove.
(sh-mkword-regexp, sh-electric-rparen-needed-here): Remove.
(sh-mode): Don't override font-lock-unfontify-region-function.
Use a copy of sh-font-lock-syntactic-keywords.
(sh-set-shell): Don't set sh-electric-rparen-needed-here.
Don't call sh-scan-buffer since font-lock does it on the fly.
(sh-get-indent-info): Use `face' rather than `syntax-table'
text-property to detect here-documents.
Replace sh-special-syntax with sh-st-punc.
(sh-prev-line): Use `face' rather than `syntax-table'
text-property to skip over here-documents.
(sh-font-lock-unfontify-region-function, sh-check-paren-in-case)
(sh-set-char-syntax, sh-electric-rparen, sh-electric-hash)
(sh-electric-less, sh-set-here-doc-region)
(sh-remove-our-text-properties, sh-search-word, sh-scan-case)
(sh-scan-buffer, sh-rescan-buffer): Remove.
2000-10-21 18:06:17 +00:00
Dave Love
d2d001277c Require skeleton and comint when
compiling.
2000-10-15 17:18:02 +00:00
Stefan Monnier
6c5bcbc1b1 (sh-imenu-generic-expression): Fix.
(sh-mode-syntax-table): Add punctuation syntax for < and >.
(sh-mode): Don't make all vars local here.
(sh-kw): Reformat.
(sh-set-shell): Use dolist.  Don't set indent-region-function.
(sh-mode-syntax-table): Use pop.
(sh-remember-variable): Use push.
(sh-help-string-for-variable): Use memq.
(sh-safe-backward-sexp): Remove.
(sh-safe-forward-sexp): Add ARG.
(sh-get-indent-info, sh-prev-stmt): Use it.
(sh-prev-line): Simplify by using forward-comment.
(sh-this-is-a-continuation): Simplify.
(sh-learn-buffer-indent): Use dolist.
(sh-do-nothing): Remove.
(sh-set-char-syntax, sh-set-here-doc-region):
Use inhibit-modification-hooks.
(sh-name-style): Use mapcar and push.
(sh-load-style): Use dolist.
(sh-save-styles-to-buffer): Use with-current-buffer and pp.
(sh-case, sh-while-getopts): Use propertize directly rather
than sh-electric-rparen.
2000-10-15 04:38:24 +00:00
Gerd Moellmann
3c0261ed16 (sh-search-word): Remove call to
`debug'.
2000-09-19 16:02:51 +00:00
Gerd Moellmann
f7e7d5a26b (sh-search-word): Rewritten for
speed.
2000-09-19 15:36:55 +00:00
Stefan Monnier
8db2b9fbbc Big bag of typos. 2000-08-18 21:12:54 +00:00
Gerd Moellmann
16ed8416ae (sh-while-getopts): Fix handling of
empty option string.
2000-06-21 19:54:54 +00:00
Stefan Monnier
d92474ed9d (sh-symbol-list, sh-number-or-symbol-list)
(sh-re-done): Use defconst.
(sh-indent-supported-here, sh-electric-rparen-needed-here): Add defvar.
(sh-help-string-for-variable, sh-guess-basic-offset):
Don't quote lambdas.
(sh-electric-rparen, sh-electric-hash, sh-search-word): Docstring typo.
(sh-regexp-for-done, sh-kw-alist, sh-kw): Moved to before their use.
2000-06-05 07:26:01 +00:00
Gerd Moellmann
457316e950 (sh-ancestor-alist): Add `bash2'. 2000-05-23 11:23:51 +00:00
Gerd Moellmann
119b42eb55 (sh-while-getopts) <sh>: Handle case that
user-specified option string is empty.
2000-05-15 20:18:15 +00:00
Gerd Moellmann
1a8eb6d5b0 (sh-mode): Don't call sh-set-shell
with third argument t.
1999-12-22 09:53:20 +00:00
Gerd Moellmann
5bd471e85a Fix typo. 1999-12-16 13:22:42 +00:00