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
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