| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
used as a variable.
Fixes: debbugs:17174
|
|
|
|
|
|
| |
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Don't propertize `?' or `!' as symbol constituent when after
colon.
|
|
|
|
|
| |
* lisp/progmodes/ruby-mode.el (ruby-smie-rules):
Add indentation rule for ` @ '.
|
|
|
|
|
|
| |
regexp options.
Fixes: debbugs:16914
|
| |
|
|
|
|
|
|
|
| |
inconsistent second element of the list returned by
`smie-indent--parent'.
(ruby-font-lock-keywords): Disqualify any identifier before `=' as
method call.
|
|
|
|
|
|
| |
after `=>'.
Fixes: debbugs:16811
|
|
|
|
|
|
|
| |
* lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Check for
`:' before binary operators. Don't check for `:'
before `[' and `(', or their syntax status. A percent literal
can't end with either.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/ruby-mode.el (ruby-align-chained-calls): New option.
(ruby-smie-grammar): Make "." right-associative. Make its priority
lower than the ternary and all binary operators.
(ruby-smie-rules): Indent "(" relative to the first non-"."
parent, or the first "." parent at indentation. Use
`ruby-align-chained-calls' for indentation of "." tokens.
* test/automated/ruby-mode-tests.el (ruby-align-chained-calls):
New test.
Fixes: debbugs:16593
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/ruby-mode.el (ruby-alignable-keywords): New constant.
(ruby-align-to-stmt-keywords): Change the default value. Use
`ruby-alignable-keywords' to generate the possible customization
choices.
(ruby-smie-rules): Instead of using a hardcoded list of alignable
keywords, check against the value of `ruby-alignable-keywords'
(http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01439.html).
|
|
|
|
|
|
| |
* mail/unrmail.el (unrmail-mbox-format): Choice is mboxo, not mboxro.
* woman.el (woman-mark-horizontal-position):
Rename from woman-mark-horizonal-position. Use changed.
|
| |
|
|
|
|
|
| |
after `{'. We need it after block openers, and it doesn't seem
to hurt after hash openers.
|
|
|
|
|
| |
docstring.
(ruby-smie-rules): Indent plus one level after `=>'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
option.
(ruby-smie--indent-to-stmt-p): Use it.
(ruby-smie-rules): Revert the logic in the handling of `when'.
Expand the `begin' clause to handle `ruby-align-to-stmt-keywords'.
(ruby-deep-arglist, ruby-deep-indent-paren)
(ruby-deep-indent-paren-style): Update docstrings to note that the
vars don't have any effect with SMIE.
* test/automated/ruby-mode-tests.el: Add tests for
`ruby-align-to-stmt-keywords'.
* test/indent/ruby.rb: Update examples to reflect the lack of change in
default indentation of `begin' blocks.
Fixes: debbugs:16182
|
|
|
|
| |
keywords to their parent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
first arg to be a string (fixed dead code), or an operator symbol.
(ruby-smie--forward-token): Tokenize ` @ ' before strings and
operator symbols.
(ruby-smie-rules): Remove parent token check in the `.' clause, it
did nothing. Don't respond to `(:after ".")', it will be called
with :before anyway. Remove the ` @ ' rule, it didn't seem to
change anything. Only return indentation for binary operators
when they are hanging. De-dent opening paren when its parent is
`.', otherwise it looks bad when the dot is not at bol or eol.
Fixes: debbugs:16182
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* lisp/emacs-lisp/smie.el (smie-indent--rule): Extract `smie-indent--rule-1'.
(smie-indent-close): Call `smie-indent--rule-1' with METHOD
:close-all, to see which indentation method to use.
(smie-rules-function): Document the method :close-all.
* test/indent/ruby.rb: Update examples according to the change
in `smie-indent-close'.
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Return nil before
open-paren tokens when preceded by a open-paren, too.
(ruby-smie-rules): Handle virtual indentation after open-paren
tokens specially. If there is code between it and eol, return the
column where is starts.
* test/indent/ruby.rb: New examples.
|
|
|
|
| |
after the end of a percent literal.
|
|
|
|
| |
* test/indent/js.js: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/js.el (js-auto-indent-flag): Remove, was unused.
(js-switch-indent-offset): New option.
(js--proper-indentation): Use it. And handle the case when
"default" is actually a key in an object literal.
(js--same-line): New function.
(js--multi-line-declaration-indentation): Use it.
(js--indent-in-array-comp, js--array-comp-indentation): New
functions.
(js--proper-indentation): Use them, to handle array comprehension
continuations.
|
|
|
|
|
|
|
|
|
| |
binary "|" operator and closing block args delimiter. Remove
FIXME comment referring to Ruby 1.8-only syntax.
(ruby-smie--implicit-semi-p): Not after "|" operator.
(ruby-smie--closing-pipe-p): New function.
(ruby-smie--forward-token, ruby-smie--backward-token): Use it.
(ruby-smie-rules): Indent after "|".
|
|
|
|
|
|
| |
Not after "||".
(ruby-smie-rules): Indent non-hanging "begin" blocks as part of
their parent.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of "and", "or", "&&" and "||".
(ruby-smie--args-separator-p): Prohibit keyword "do" as the first
argument. Prohibit opening curly brace because it could only be a
block opener in that position.
(ruby-smie--forward-token, ruby-smie--backward-token): Separate
"|" from "&" or "*" going after it. That can happen in block
arguments.
(ruby-smie--indent-to-stmt): New function, seeks the end of
previous statement or beginning of buffer.
(ruby-smie-rules): Use it.
(ruby-smie-rules): Check if there's a ":" before a curly block
opener candidate; if there is, it's a hash.
* test/indent/ruby.rb: New examples.
|
|
|
|
|
|
|
|
|
|
| |
No implicit semi after "^", "and" or "or".
(ruby-smie-grammar): New tokens: "and" and "or".
(ruby-smie--args-separator-p): Fix the check for tokens at POS.
Exclude "and" and "or". Remove "do" in order to work around token
priorities.
(ruby-smie-rules): Add all infix tokens. Handle the case of
beginning-of-buffer.
|
|
|
|
| |
"." compared to "do".
|
| |
|
|
|
|
|
|
|
|
| |
(ruby-smie--backward-token): Tokenize heredocs as semicolons.
* test/automated/ruby-mode-tests.el: Remove outdated comment.
* test/indent/ruby.rb: Add a statement on the line after heredoc.
|
|
|
|
|
|
| |
function, replacement for `smie-rule-parent' for when we want to
skip over our direct parent if it's an assignment token..
(ruby-smie-rules): Use it.
|
|
|
|
|
| |
* test/indent/css-mode.css (.x2): Test alignement inside braces.
* test/indent/prolog.prolog: Test alignment of ->; with operator at bol.
|
|
|
|
| |
after `=' is probably a new expression.
|
| |
|
|
|
|
|
|
|
|
|
| |
specific in what the first arg can be: a non-keyword word,
string/regexp/percent literal opener, opening paren, or unary
operator followed directly by word.
* test/automated/ruby-mode-tests.el (ruby-toggle-block-to-brace): Fix
the test, in respect to adding the space after the curly.
|
|
|
|
|
|
|
| |
with parameters" example. Simplify the "is it block or is it
hash" check, but also make it more thorough.
* test/indent/ruby.rb: Fix syntax error in the latest example.
|
|
|
|
| |
{ if it is hanging.
|
|
|
|
| |
more.
|
|
|
|
|
|
|
|
|
|
|
| |
TODO. Add "." after " @ ".
(ruby-smie--at-dot-call): New function. Checks if point at method
call with explicit target.
(ruby-smie--forward-token, ruby-smie--backward-token): Prepend "."
to the method name tokens when it precedes them.
(ruby-smie--backward-id, ruby-smie--forward-id): Remove.
(ruby-smie-rules): Add rule for indentation before and after "."
token.
|
|
|
|
| |
an instruction.
|
| |
|
|
|
|
|
| |
infix operators.
(ruby-smie--implicit-semi-p): Add new operator chars.
|
|
|
|
|
|
|
|
|
|
|
|
| |
`smie-down-list'.
(ruby-smie--args-separator-p): Check that there's no newline
between method call and its arguments.
(ruby-smie-rules): Handle new cases: curly block with and without
parameters, hash surrounded with parens, block passed to
paren-less method call.
* test/indent/ruby.rb: New examples for indentation of blocks. Example
of hash inside parens that inflooped before this commit.
|
|
|
|
|
|
| |
forward-sexp-function while we redo its job.
Fixes: debbugs:15613
|
| |
|
|
|
|
|
|
|
| |
methods ending with `?' and `!'.
* test/indent/ruby.rb: More examples for bug#15594, both failing and
now passing.
|
|
|
|
|
|
|
| |
method calls (bug#bug#15594).
(ruby-smie--args-separator-p): New function.
(ruby-smie--forward-token, ruby-smie--backward-token): Use it to
recognize paren-free method calls.
|
| |
|
|
|
|
|
|
|
| |
cases of ? and =.
(ruby-smie-rules): Simplify the "do" rule. The cases when the
predicate would return nil are almost non-existent.
(ruby-smie--redundant-do-p): Include "until" and "for" statements.
|