1. 11 Oct, 2013 1 commit
  2. 09 Oct, 2013 1 commit
  3. 07 Oct, 2013 4 commits
  4. 06 Oct, 2013 1 commit
  5. 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.
      34d1a133
    • 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'.
      aa0214da
    • 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.
      0106e5b3
  6. 15 Sep, 2013 1 commit
  7. 12 Sep, 2013 1 commit
  8. 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.
      2a08047a
  9. 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
      1af4c220
  10. 05 Sep, 2013 1 commit
  11. 03 Sep, 2013 1 commit
  12. 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
      f069bba8
  13. 16 Jul, 2013 2 commits
  14. 13 Jul, 2013 1 commit
  15. 12 Jul, 2013 2 commits
  16. 09 Jul, 2013 1 commit
  17. 03 Jul, 2013 2 commits
  18. 30 Jun, 2013 1 commit
  19. 22 Jun, 2013 2 commits
  20. 21 Jun, 2013 3 commits
  21. 18 Jun, 2013 1 commit
  22. 31 May, 2013 2 commits
  23. 24 May, 2013 1 commit
  24. 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.
      462388b6
    • 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-expansions'.
      (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-regexp-skips-over-interpolation)
      (ruby-regexp-continues-till-end-when-unclosed)
      (ruby-regexp-can-be-multiline)
      (ruby-interpolation-inside-percent-literal): New tests.
      
      * test/indent/ruby.rb: Add multiline regexp example.
      1a0a0a8a
  25. 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.
      a9e4425b
  26. 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
      `end-of-defun-function'.
      (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
      functions.
      fb549d64
  27. 06 Mar, 2013 1 commit