1. 14 Oct, 2013 1 commit
    • Akinori MUSHA's avatar
      * progmodes/ruby-mode.el (ruby-encoding-map): Add a mapping from · e70181b8
      Akinori MUSHA authored
      `japanese-cp932' to `cp932' to fix the problem where saving a
      source file written in Shift_JIS twice would end up having
      `coding: japanese-cp932' which Ruby could not recognize.
      (ruby-mode-set-encoding): Add support for encodings mapped to nil
      in `ruby-encoding-map'.
      (ruby-encoding-map): Map `us-ascii' to nil by default, meaning it
      doesn't need to be explicitly declared in magic comment.
      (ruby-encoding-map): Add type declaration for better customize UI.
  2. 13 Oct, 2013 1 commit
  3. 12 Oct, 2013 1 commit
  4. 11 Oct, 2013 1 commit
  5. 09 Oct, 2013 1 commit
  6. 07 Oct, 2013 4 commits
  7. 06 Oct, 2013 1 commit
  8. 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.
  9. 15 Sep, 2013 1 commit
  10. 12 Sep, 2013 1 commit
  11. 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.
  12. 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
  13. 05 Sep, 2013 1 commit
  14. 03 Sep, 2013 1 commit
  15. 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
  16. 16 Jul, 2013 2 commits
  17. 13 Jul, 2013 1 commit
  18. 12 Jul, 2013 2 commits
  19. 09 Jul, 2013 1 commit
  20. 03 Jul, 2013 2 commits
  21. 30 Jun, 2013 1 commit
  22. 22 Jun, 2013 2 commits
  23. 21 Jun, 2013 3 commits
  24. 18 Jun, 2013 1 commit
  25. 31 May, 2013 2 commits
  26. 24 May, 2013 1 commit
  27. 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.