aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/ruby-mode.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):Dmitry Gutov2014-05-061-3/+4
| | | | | | | | | Backtrack one char if the global/char-literal var matcher hits inside a string. The next char could be the beginning of an expression expansion. * test/automated/ruby-mode-tests.el (ruby-interpolation-after-dollar-sign): New test.
* Highlight more Module methodsDmitry Gutov2014-04-091-0/+4
| | | | | | | * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight more Module methods. Fixes: debbugs:17216
* * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): HighlightDmitry Gutov2014-03-271-4/+19
| | | | | | special globals with font-lock-builtin-face. Fixes: debbugs:17057
* Fix bug#17097Dmitry Gutov2014-03-271-0/+1
| | | | | | * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function): Don't propertize `?' or `!' as symbol constituent when after colon.
* Match special globals in Ruby betterDmitry Gutov2014-03-241-3/+3
| | | | | | | | | * lisp/progmodes/ruby-mode.el (ruby-expression-expansion-re): Match special global variables without curlies, too. (ruby-font-lock-keywords): Simplify the matcher for special global variables. Don't require a non-word character after the variable. Fixes: debbugs:17057
* Fix bug#17050Dmitry Gutov2014-03-211-0/+4
| | | | | * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Add indentation rule for ` @ '.
* * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): FontifyDmitry Gutov2014-03-131-1/+1
| | | | | | multiple adjacent negation chars. Fixes: debbugs:17004
* * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): HighlightDmitry Gutov2014-03-021-0/+10
| | | | | | regexp options. Fixes: debbugs:16914
* * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Handle theDmitry Gutov2014-02-231-4/+6
| | | | | | | inconsistent second element of the list returned by `smie-indent--parent'. (ruby-font-lock-keywords): Disqualify any identifier before `=' as method call.
* * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Don't indent speciallyDmitry Gutov2014-02-231-1/+0
| | | | | | after `=>'. Fixes: debbugs:16811
* * lisp/progmodes/ruby-mode.el (auto-mode-alist): Add missing "or".Dmitry Gutov2014-02-211-1/+1
|
* * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): `private',Dmitry Gutov2014-02-031-3/+3
| | | | `protected' and `public' can also be called without arguments.
* Fix bug#16610Dmitry Gutov2014-02-011-18/+26
| | | | | | * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): For built-ins that require arguments, check that they're followed by something that looks like argument.
* Fix bug#16609Dmitry Gutov2014-02-011-2/+5
| | | | | | | * 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.
* Fixup the documentation for the previous changeDmitry Gutov2014-01-311-3/+6
| | | | | | | | | * etc/NEWS: Mention `ruby-align-chained-calls'. * lisp/progmodes/ruby-mode.el (ruby-align-chained-calls): Update the docstring and add :version tag. Fixes: debbugs:16593
* Implement user option ruby-align-chained-callsDmitry Gutov2014-01-311-7/+31
| | | | | | | | | | | | | | * 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
* ruby-mode: Align def...end to the beginning of statementDmitry Gutov2014-01-171-10/+9
| | | | | | | | | | * 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).
* * lisp/progmodes/ruby-mode.el (auto-mode-alist): Add .podspec and Podfile.Bozhidar Batsov2014-01-101-2/+2
|
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* Every defcustom should specify its typeGlenn Morris2013-12-281-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * apropos.el (apropos-match-face): * calculator.el (calculator-displayer): * dabbrev.el (dabbrev-search-these-buffers-only): * face-remap.el (buffer-face-mode-face): * simple.el (yank-handled-properties): * emacs-lisp/testcover.el (testcover-potentially-1value-functions): * mail/footnote.el (footnote-mode-line-string, footnote-prefix): * mail/hashcash.el (hashcash-accept-resources, hashcash-program) (hashcash-double-spend-database): * progmodes/ruby-mode.el (ruby-deep-indent-paren) (ruby-deep-indent-paren-style): * textmodes/flyspell.el (flyspell-auto-correct-binding): * textmodes/rst.el (rst-toc-indent, rst-toc-insert-style) (rst-toc-insert-number-separator, rst-toc-insert-max-level): * vc/pcvs-defs.el (cvs-minor-mode-prefix): * erc/erc-log.el (erc-log-file-coding-system): * gnus/gnus-sieve.el (gnus-sieve-select-method): * gnus/gravatar.el (gravatar-automatic-caching, gravatar-cache-ttl) (gravatar-rating, gravatar-size): * gnus/message.el (message-minibuffer-local-map): * gnus/sieve-manage.el (sieve-manage-authenticators) (sieve-manage-authenticator-alist): Specify custom types. * mail/hashcash.el (hashcash-program): Rename from hashcash-path. Update callers.
* * lisp/progmodes/ruby-mode.el (ruby--electric-indent-p): Improve theDmitry Gutov2013-12-221-4/+4
| | | | comments. Handle electric indent after typing `?' and `!'.
* * lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Return tDmitry Gutov2013-12-221-1/+1
| | | | | after `{'. We need it after block openers, and it doesn't seem to hurt after hash openers.
* Integrate ruby-mode with electric-indent-mode betterDmitry Gutov2013-12-221-3/+32
| | | | | | | | | * lisp/progmodes/ruby-mode.el (ruby--at-indentation-p): New function, extracted from `ruby-smie-rules'. (ruby--electric-indent-chars): New variable. (ruby--electric-indent-p): New function. (ruby-mode): Use `electric-indent-functions' instead of `electric-indent-chars'.
* * lisp/progmodes/ruby-mode.el (ruby-align-to-stmt-keywords): Tweak theDmitry Gutov2013-12-221-1/+3
| | | | | docstring. (ruby-smie-rules): Indent plus one level after `=>'.
* * lisp/progmodes/ruby-mode.el (ruby-align-to-stmt-keywords): NewDmitry Gutov2013-12-201-7/+56
| | | | | | | | | | | | | | | | | | 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
* * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Indent middle-of-blockDmitry Gutov2013-12-191-2/+3
| | | | keywords to their parent.
* * lisp/progmodes/ruby-mode.el (ruby-smie--args-separator-p): Allow theDmitry Gutov2013-12-191-20/+22
| | | | | | | | | | | | | | 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/progmodes/ruby-mode.el (ruby-smie-rules): Indent ternary if.Dmitry Gutov2013-12-171-0/+1
|
* Fix comment from the last change to `ruby-smie-rules'Dmitry Gutov2013-12-141-1/+1
|
* Fix bug#16118Dmitry Gutov2013-12-141-3/+14
| | | | | | | | | | * 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.
* * lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Return tDmitry Gutov2013-12-091-2/+2
| | | | after the end of a percent literal.
* * lisp/progmodes/ruby-mode.el (ruby-forward-string): Document.Cameron Desautels2013-12-091-4/+21
| | | | | | Handle caret-delimited strings. Fixes: debbugs:16079
* * lisp/progmodes/ruby-mode.el (ruby-accurate-end-of-block): WhenDmitry Gutov2013-12-091-3/+8
| | | | | | | `ruby-use-smie' is t, use `smie-forward-sexp' instead of `ruby-parse-partial'. Fixes: debbugs:16078
* * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function): TouchDmitry Gutov2013-12-061-2/+2
| | | | up the last change.
* Fix Bug#15874Dmitry Gutov2013-12-061-2/+9
| | | | | | | | | * lisp/progmodes/ruby-mode.el (ruby-mode-syntax-table): Don't modify syntax for `?'. (ruby-expr-beg): Expect that `!' will have syntax class "symbol" where appropriate already. (ruby-syntax-propertize-function): Propertize `?' and `!' at the end of method names.
* * progmodes/ruby-mode.el (ruby-custom-encoding-magic-comment-template),Bozhidar Batsov2013-11-221-2/+4
| | | | (ruby-encoding-magic-comment-style): Add :version.
* * lisp/progmodes/ruby-mode.el (ruby-custom-encoding-magic-comment-template):Bozhidar Batsov2013-11-221-2/+2
| | | | Improve docstring.
* * lisp/progmodes/ruby-mode.el (ruby-custom-encoding-magic-comment-template):Bozhidar Batsov2013-11-201-1/+1
| | | | | Change default to "# encoding: %s" to differentiate it from the default Ruby encoding comment template.
* * lisp/progmodes/ruby-mode.el (ruby-toggle-block): Don't stop atAdam Sokolnicki2013-11-171-1/+2
| | | | | | interpolation curlies. Fixes: debbugs:15914
* * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): End regexp forDmitry Gutov2013-11-151-1/+1
| | | | nil/self/true/false with "end of symbol".
* * lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding):Bozhidar Batsov2013-11-141-6/+2
| | | | Fix and simplify encoding comment update logic.
* * lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding):Bozhidar Batsov2013-11-141-26/+44
| | | | Add support for always inserting an utf-8 encoding comment.
* * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Disambiguate betweenDmitry Gutov2013-11-121-8/+20
| | | | | | | | | 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 "|".
* * lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p):Dmitry Gutov2013-11-091-0/+5
| | | | | | Not after "||". (ruby-smie-rules): Indent non-hanging "begin" blocks as part of their parent.
* * lisp/progmodes/ruby-mode.el: Don't require cl any more. Use pcase instead.Stefan Monnier2013-11-081-166/+176
| | | | (ruby-font-lock-keywords): Use backquote.
* * lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding):Bozhidar Batsov2013-11-081-3/+3
| | | | Fix incorrect case conditions.
* * lisp/progmodes/ruby-mode.el (ruby-smie--forward-token)Dmitry Gutov2013-11-081-2/+2
| | | | (ruby-smie--backward-token): Only consider full-string matches.
* * lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding): UseBozhidar Batsov2013-11-081-1/+22
| | | | | `ruby-encoding-magic-comment-style' to control the style of the auto-inserted encoding comment.
* * lisp/progmodes/ruby-mode.el (ruby-smie--indent-to-stmt): UseDmitry Gutov2013-11-081-7/+2
| | | | `smie-backward-sexp' with token argument.
* * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Improve precedencesDmitry Gutov2013-11-081-12/+30
| | | | | | | | | | | | | | | | | 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.