1. 06 Oct, 2013 1 commit
  2. 05 Oct, 2013 3 commits
    • Stefan Monnier's avatar
      Get Ruby's SMIE code to pass the test suite. · 34d1a133
      Stefan Monnier authored
      * lisp/progmodes/ruby-mode.el (ruby-use-smie): Change default.
      (ruby-comment-column): Follow the global default, by default.
      (ruby-smie-grammar): Add assignment syntax.
      (ruby-smie--implicit-semi-p): No implicit semi-colon after an
      open-paren, a comma, or a \.
      (ruby-smie--forward-token, ruby-smie--backward-token): Handle heredocs,
      and line continuations.
      (ruby-smie-rules): Adjust handling of open-paren, now that it's never
      followed by implicit semi-colons.  Add rule for string concatenation
      and for indentation at BOB.
      (ruby-forward-sexp, ruby-backward-sexp): Adjust for when smie is in use.
      * lisp/emacs-lisp/smie.el (smie-next-sexp): Don't go back to pos before
      calling next-sexp, since next-token may have skipped chars which
      next-sexp doesn't know should be skipped!
      * test/indent/ruby.rb: Port a few cases from automated/ruby-mode-tests.el.
      Adjust indentation of continued line to the new SMIE behavior.
    • Dmitry Gutov's avatar
      Revert 2013-10-05T02:26:39Z!dgutov@yandex.ru · aa0214da
      Dmitry Gutov authored
      `last-coding-system-used' is unreliable: it can be modified by other functions
      in `after-save-hook'.
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-mode): Add `ruby-mode-set-encoding' · 0106e5b3
      Dmitry Gutov authored
      to `after-save-hook' instead of `before-save-hook', because then
      we know exactly what encoding was used to write the file.
      (ruby-mode-set-encoding): Use `last-coding-system-used' instead of
      guessing.  Call `basic-save-buffer-1' after modifying the buffer.
  3. 15 Sep, 2013 1 commit
  4. 12 Sep, 2013 1 commit
  5. 11 Sep, 2013 1 commit
    • Glenn Morris's avatar
      Improve previous interpreter-mode-alist change · 2a08047a
      Glenn Morris authored
      * lisp/files.el (interpreter-mode-alist): Remove \\` \\' parts.
      (set-auto-mode): Don't regexp-quote elements.
      * lisp/progmodes/python.el (interpreter-mode-alist): Remove \\` \\'.
      * lisp/progmodes/cc-mode.el (interpreter-mode-alist):
      * lisp/progmodes/ruby-mode.el (interpreter-mode-alist):
      Revert previous change.
      * etc/NEWS: Update.
  6. 10 Sep, 2013 1 commit
    • Glenn Morris's avatar
      Treat interpreter-mode-alist as alist of regexps, not literals · 1af4c220
      Glenn Morris authored
      Cf http://lists.gnu.org/archive/html/emacs-devel/2005-08/msg00472.html
      * lisp/files.el (interpreter-mode-alist): Convert to regexps.
      (set-auto-mode): Adapt for this. 
      * lisp/progmodes/cperl-mode.el (cperl-clobber-mode-lists):
      Comment out unused variable.
      * lisp/progmodes/cc-mode.el (interpreter-mode-alist):
      * lisp/progmodes/python.el (interpreter-mode-alist):
      * lisp/progmodes/ruby-mode.el (interpreter-mode-alist): Convert to regexps.
      * lisp/progmodes/sh-script.el (sh-set-shell):
      No longer use interpreter-mode-alist to get list of shells.
      * etc/NEWS: Mention this.
      Fixes: debbugs:15306
  7. 05 Sep, 2013 1 commit
  8. 03 Sep, 2013 1 commit
  9. 29 Aug, 2013 1 commit
    • Stefan Monnier's avatar
      * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Add rule for formal · f069bba8
      Stefan Monnier authored
      params of lambda expressions.
      (ruby-smie--implicit-semi-p): Refine rule.
      (ruby-smie--opening-pipe-p): New function.
      (ruby-smie--forward-token, ruby-smie--backward-token): Handle Ruby
      symbols and matched |...| for formal params.
      (ruby-smie-rules): Don't let the formal params of a "do" prevent it
      from being treated as hanging.  Handle "rescue".
      Fixes: debbugs:15208
  10. 16 Jul, 2013 2 commits
  11. 13 Jul, 2013 1 commit
  12. 12 Jul, 2013 2 commits
  13. 09 Jul, 2013 1 commit
  14. 03 Jul, 2013 2 commits
  15. 30 Jun, 2013 1 commit
  16. 22 Jun, 2013 2 commits
  17. 21 Jun, 2013 3 commits
  18. 18 Jun, 2013 1 commit
  19. 31 May, 2013 2 commits
  20. 24 May, 2013 1 commit
  21. 19 May, 2013 2 commits
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-heredoc): Leave · 462388b6
      Dmitry Gutov authored
      point at bol following the heredoc openers.
      (ruby-syntax-propertize-expansions): Remove.
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-expression-expansion-re): Allow to · 1a0a0a8a
      Dmitry Gutov authored
      start at point, so that expansion starting right after opening
      slash in a regexp is recognized.
      (ruby-syntax-before-regexp-re): New defvar, extracted from
      ruby-syntax-propertize-function.  Since the value of this regexp
      is looked up at runtime now, we should be able to turn
      `ruby-syntax-methods-before-regexp' into a defcustom later.
      (ruby-syntax-propertize-function): Split regexp matching into two
      parts, for opening and closing slashes.  That allows us to skip
      over string interpolations and support multiline regexps.
      Don't call `ruby-syntax-propertize-expansions', instead use another rule
      for them, which calls `ruby-syntax-propertize-expansion'.
      (ruby-syntax-propertize-expansions): Move `remove-text-properties'
      call to `ruby-syntax-propertize-function'.
      (ruby-syntax-propertize-expansion): Extracted from
      `ruby-syntax-propertize-expansions'.  Handles one expansion.
      (ruby-syntax-propertize-heredoc): Explicitly call
      (ruby-syntax-propertize-percent-literal): Leave point right after
      the percent symbol, so that the expression expansion rule can
      propertize the contents.
      * test/automated/ruby-mode-tests.el (ruby-heredoc-highlights-interpolations)
      (ruby-interpolation-inside-percent-literal): New tests.
      * test/indent/ruby.rb: Add multiline regexp example.
  22. 08 May, 2013 1 commit
    • Stefan Monnier's avatar
      * lisp/progmodes/ruby-mode.el: First cut at SMIE support. · a9e4425b
      Stefan Monnier authored
      (ruby-use-smie): New var.
      (ruby-smie-grammar): New constant.
      (ruby-smie--bosp, ruby-smie--implicit-semi-p)
      (ruby-smie--forward-token, ruby-smie--backward-token)
      (ruby-smie-rules): New functions.
      (ruby-mode-variables): Setup SMIE if applicable.
      * test/indent/ruby.rb: Fix indentation after =; add more cases.
  23. 15 Apr, 2013 1 commit
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-beginning-of-defun) · fb549d64
      Dmitry Gutov authored
      (ruby-end-of-defun, ruby-move-to-block): Bind `case-fold-search'
      to nil.
      (ruby-end-of-defun): Remove the unused arg, change the docstring
      to reflect that this function is only used as the value of
      (ruby-beginning-of-defun): Remove "top-level" from the docstring,
      to reflect an earlier change that beginning/end-of-defun functions
      jump between methods in a class definition, as well as top-level
  24. 06 Mar, 2013 1 commit
  25. 14 Feb, 2013 2 commits
    • Dmitry Gutov's avatar
      (ruby-add-log-current-method): Improve performance at the expense · 71a048c1
      Dmitry Gutov authored
      of accuracy.  `ruby-block-contains-point' is relatively slow, so
      only use it for method and singleton class blocks.
      * test/automated/ruby-mode-tests.el
      (ruby-add-log-current-method-after-inner-class): Lower
      expectations: move point inside a method, initially.
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-parse-partial): Don't increase · 53ca88c4
      Dmitry Gutov authored
      depth for unfinished percent literal.  Not using it in the caller.
      (ruby-move-to-block): Jump over multiline literals of all types,
      ignoring code-looking contents inside them.
      * test/automated/ruby-mode-tests.el
      (ruby-move-to-block-skips-percent-literal): Add depth-affecting
      bits inside the examples.
      (ruby-move-to-block-skips-heredoc): New test.
  26. 13 Feb, 2013 1 commit
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-move-to-block): Improve · 7132e457
      Dmitry Gutov authored
      performance.  Instead of recalculating indentation fully for each
      line, sum up indentation depth based only on visited lines.
      (ruby-parse-partial): Increase the depth after "do" even when END
      is right after it.
      (ruby-parse-partial): When END is in the middle of a percent
      literal, increase the depth if the delimiter chars belong to the
      paren syntax class.
      * test/automated/ruby-mode-tests.el
      (ruby-move-to-block-skips-percent-literal): New test.
  27. 28 Jan, 2013 2 commits
  28. 27 Jan, 2013 1 commit