Stefan Monnier
370ceb2210
Fix some indentation problem with \; and pipes.
...
* lisp/progmodes/sh-script.el (sh-mode-syntax-table): Set syntax of ;|&.
(sh-smie--default-forward-token, sh-smie--default-backward-token):
New functions.
(sh-smie-sh-forward-token, sh-smie-sh-backward-token)
(sh-smie-rc-forward-token, sh-smie-rc-backward-token): Use them.
(sh-smie-sh-rules): Fix indentation of a pipe at BOL.
Fixes: debbugs:17842
2014-06-24 16:16:10 -04:00
Stefan Monnier
9e248ebdc7
* lisp/progmodes/sh-script.el (sh-smie-sh-rules): For { after &&, don't
...
align with the surrounding parent.
Fixes: debbugs:17721
2014-06-20 10:23:30 -04:00
Stefan Monnier
500dce5f4d
* lisp/emacs-lisp/smie.el (smie--hanging-eolp-function): New var.
...
(smie-indent--hanging-p): Use it.
* lisp/progmodes/sh-script.el (sh-set-shell): Set it.
Fixes: debbugs:17621
2014-06-19 21:05:40 -04:00
Stefan Monnier
e9638b49e5
* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Use same rule for && as
...
for |.
Fixes: debbugs:17621
2014-06-19 18:52:12 -04:00
Stefan Monnier
dee4ba5979
* src/eval.c (run_hook_with_args): Use FUNCTIONP.
...
* test/indent/css-mode.css (.x2): Test alignement inside braces.
* test/indent/prolog.prolog: Test alignment of ->; with operator at bol.
2013-10-29 10:46:23 -04:00
Stefan Monnier
85527ff309
* lisp/progmodes/sh-script.el (sh-find-prev-matching): Disable SMIE's
...
forward-sexp-function while we redo its job.
Fixes: debbugs:15613
2013-10-16 23:56:51 -04:00
Stefan Monnier
4a74c81880
* lisp/view.el (view--enable, view--disable): Rename from view-mode-enable
...
and view-mode-disable and assume it's called from view-mode.
(view-mode-enable, view-mode-disable): Redefine as obsolete
compatibility layer above view-mode.
(view-mode-enter): Call `view-mode'.
* lisp/files.el (after-find-file): Call `view-mode'.
2013-01-03 21:53:48 -05:00
Stefan Monnier
3618df4590
* lisp/progmodes/sh-script.el (sh--inside-noncommand-expression):
...
Rename from sh--inside-arithmetic-expression, handle more cases.
Fixes: debbugs:11263
2012-10-30 23:10:25 -04:00
Stefan Monnier
b08b6da7fe
* lisp/progmodes/sh-script.el (sh--inside-arithmetic-expression): New func.
...
(sh-font-lock-open-heredoc): Use it.
Fixes: debbugs:12770
2012-10-30 22:45:34 -04:00
Stefan Monnier
d7f9cc8528
* lisp/vc/diff-mode.el (diff-context->unified): Don't get confused by "hunk
...
header comments".
(diff-unified->context, diff-context->unified)
(diff-reverse-direction, diff-fixup-modifs): Use `use-region-p'.
2012-10-29 11:14:10 -04:00
Stefan Monnier
efc26dbecd
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR"
...
as not-a-comment.
* test/indent/shell.sh: Add test case for ${#VAR}.
Fixes: debbugs:11946
2012-07-17 04:38:12 -04:00
Stefan Monnier
461ef3c518
Add some shell indentation test cases.
...
* test/indent/shell.sh:
* test/indent/shell.rc: Add some test cases.
2012-04-28 16:04:34 -04:00
Stefan Monnier
ccded26c1e
* lisp/progmodes/sh-script.el (sh-font-lock-open-heredoc): Fix case
...
of here-doc that immediately follows a comment.
* .bzrignore: Ignore globals.h and related stamp.
* test/indent/shell.sh:
* test/indent/shell.rc: New files.
2011-02-09 13:59:55 -05:00