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
Gerd Moellmann
f2d20357bb
(sh-mode): If there is no #!-line, use the shell
...
from sh-shell-file.
1999-12-16 13:21:37 +00:00
Gerd Moellmann
b062282286
Fix for when font-lock mode is active.
...
(sh-font-lock-unfontify-region-function): New function.
1999-12-12 13:18:54 +00:00
Gerd Moellmann
f964dfcb0d
Added support for indenting existing scripts.
...
(sh-mode-map): Added new bindings.
(sh-mode): Updated mode doc-string for new commands, added
make-local-variable calls, initialize mode-specific variables.
(sh-indent-line): Renamed to sh-basic-indent-line; sh-indent-line
is now a different function.
(sh-header-marker): Changed docstring.
(sh-set-shell): Initialize mode-specific variables.
(sh-case, sh-for, sh-if, sh-indexed-loop, sh-repeat, sh-select)
(sh-tmp-file, sh-until, sh-until, sh-while, sh-while-getopts):
Changed these define-skeleton calls to work with user-specified
indentation settings.
(sh-basic-indent-line, sh-blink, sh-calculate-indent)
(sh-check-paren-in-case, sh-check-rule, sh-do-nothing)
(sh-electric-hash, sh-electric-less, sh-electric-rparen)
(sh-find-prev-matching, sh-find-prev-switch, sh-get-indent-info)
(sh-get-indent-var-for-line, sh-get-kw, sh-get-word)
(sh-goto-match-for-done, sh-goto-matching-case, sh-goto-matching-if)
(sh-guess-basic-offset, sh-handle-after-case-label)
(sh-handle-prev-case, sh-handle-prev-case-alt-end, sh-handle-prev-do)
(sh-handle-prev-done, sh-handle-prev-else, sh-handle-prev-esac)
(sh-handle-prev-fi, sh-handle-prev-if, sh-handle-prev-open)
(sh-handle-prev-rc-case, sh-handle-prev-then, sh-handle-this-close)
(sh-handle-this-do, sh-handle-this-done, sh-handle-this-else)
(sh-handle-this-esac, sh-handle-this-fi, sh-handle-this-rc-case)
(sh-handle-this-then, sh-help-string-for-variable)
(sh-in-comment-or-string, sh-indent-line, sh-learn-buffer-indent)
(sh-learn-line-indent, sh-load-style, sh-make-vars-local, sh-mark-init)
(sh-mark-line, sh-mkword-regexpr, sh-mkword-regexp)
(sh-must-be-shell-mode, sh-must-support-indent, sh-name-style)
(sh-prev-line, sh-prev-stmt, sh-prev-thing, sh-read-variable)
(sh-remove-our-text-properties, sh-rescan-buffer)
(sh-reset-indent-vars-to-global-values, sh-safe-backward-sexp)
(sh-safe-forward-sexp, sh-save-styles-to-buffer, sh-scan-buffer)
(sh-scan-case, sh-search-word, sh-set-char-syntax)
(sh-set-here-doc-region, sh-set-indent, sh-set-var-value)
(sh-show-indent, sh-this-is-a-continuation, sh-var-value): New
functions.
(sh-debug, sh-electric-rparen-needed, sh-here-doc-syntax)
(sh-indent-supported, sh-kw, sh-kw-alist, sh-kws-for-done)
(sh-learned-buffer-hook, sh-make-vars-local, sh-regexp-for-done)
(sh-special-keywords, sh-special-syntax, sh-st-punc, sh-styles-alist)
(sh-var-list): New variables.
1999-10-12 12:30:38 +00:00
Eli Zaretskii
751d474c0a
(sh-tmp-file): Use $TMPDIR, if defined, for sh.
1999-09-06 09:05:24 +00:00
Richard M. Stallman
1c64011b78
(sh-feature): If nothing is known about the given shell, use the
...
values for `sh'.
1999-07-01 01:00:42 +00:00
Karl Heuer
9a1136f4de
(sh-mode): When setting syntax
...
table, default to the standard one.
1999-06-29 17:06:17 +00:00
Karl Heuer
1448f5894e
(sh-mode): Do not fail if buffer has no
...
magic number and is not associated with a file.
1999-05-15 05:57:39 +00:00
Karl Heuer
3e9103768f
Update comment.
1998-12-14 03:22:44 +00:00
Andreas Schwab
842cc0e685
(sh-canonicalize-shell): Fix regexp.
...
(sh-set-shell): Likewise.
1998-10-30 11:02:42 +00:00
Richard M. Stallman
b946fbad39
(sh-font-lock-keywords): Don't crash for an unrecognized shell.
1998-10-21 03:47:41 +00:00
Richard M. Stallman
547745f5b3
(sh-mode): Handle .spec and .mspec files.
...
(sh-font-lock-keywords): Handle rpm and rpm2.
(sh-ancestor-alist): Handle rpm.
1998-10-20 18:50:13 +00:00
Richard M. Stallman
c8b88e9f92
(sh-set-shell): Remove .exe suffix from shell name.
...
Don't reuse local var `shell' for two different things.
(sh-canonicalize-shell): Remove .exe suffix from shell name.
1998-09-28 13:31:53 +00:00
Richard M. Stallman
a8fa6fc274
(sh-mode): parse-sexp-ignore-comments = t.
1998-07-19 21:58:03 +00:00
Richard M. Stallman
ced7b4a427
(sh-shell-file): Add cmdproxy to MS shells.
1998-05-07 19:18:29 +00:00
Eli Zaretskii
eee86eff46
(sh-shell-file): If $SHELL evaluates to
...
one of MS-DOS or MS-Windows shells, use "bin/sh" instead.
1998-05-03 15:57:33 +00:00
Dan Nicolaescu
cd32a7baa4
*** empty log message ***
1998-04-20 02:34:53 +00:00
Richard M. Stallman
4d7ce99c2f
(sh-font-lock-keywords): Fontify sh-style function names in declarations.
1998-02-15 00:30:24 +00:00
Richard M. Stallman
0775c032ae
(sh-set-shell): Use standard-syntax-table if none other is specified.
1998-02-11 07:14:24 +00:00
Richard M. Stallman
cef926f318
(sh-case): Fix paren error.
1998-01-26 02:33:48 +00:00
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