1. 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.
      7132e457
  2. 28 Jan, 2013 2 commits
  3. 27 Jan, 2013 1 commit
  4. 01 Jan, 2013 1 commit
  5. 26 Dec, 2012 2 commits
  6. 24 Dec, 2012 1 commit
  7. 14 Dec, 2012 3 commits
    • Paul Eggert's avatar
      Spelling fixes. · cccaebd2
      Paul Eggert authored
      My favorite was that the word "dictionary" was misspelled.
      Also, correct the title in the DeRemer & Pennello 1982 citation,
      and add a URL.
      cccaebd2
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function): · bb808526
      Dmitry Gutov authored
      Extract `ruby-syntax-propertize-expansions'.
      (ruby-syntax-propertize-expansions): Only change syntax on
      certain string delimiters, to punctuation.  This way the common
      functions like forward-word and thing-at-point still work.
      (ruby-match-expression-expansion): Improve readability.
      (ruby-block-contains-point): New function.
      (ruby-add-log-current-method): Handle several edge cases.
      
      * test/automated/ruby-mode-tests.el
      Rename one interpolation test; add three more.
      (ruby-with-temp-buffer): New macro, use it where appropriate.
      (ruby-add-log-current-method-examples): Use "_" for target point.
      Add four tests for ruby-add-log-current-method.
      bb808526
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function): · dbb530d9
      Dmitry Gutov authored
      Extract `ruby-syntax-propertize-expansions'.
      (ruby-syntax-propertize-expansions): Only change syntax on
      certain string delimiters, to punctuation.  This way the common
      functions like forward-word and thing-at-point still work.
      
      * test/automated/ruby-mode-tests.el
      Rename one interpolation test; add three more.
      dbb530d9
  8. 14 Nov, 2012 3 commits
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el · c62792e7
      Dmitry Gutov authored
      (ruby-syntax-propertize-function): After everything else, search
      for expansions in string literals, mark their insides as
      whitespace syntax and save match data for font-lock.
      (ruby-font-lock-keywords): Highlight just the 2nd group from
      expression expansion matches.
      (ruby-match-expression-expansion): Use the match data saved to the
      text property in ruby-syntax-propertize-function.
      
      * test/automated/ruby-mode-tests.el
      Change direct font-lock face references to var references.
      (ruby-interpolation-suppresses-syntax-inside): New test.
      (ruby-interpolation-inside-percent-literal-with-paren): New
      failing test.
      c62792e7
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-expr-beg): Make heredoc detection · 8619323f
      Dmitry Gutov authored
      more strict.  Add docstring.
      
      * test/automated/ruby-mode-tests.el (ruby-indent-singleton-class): Pass.
      (ruby-indent-inside-heredoc-after-operator)
      (ruby-indent-inside-heredoc-after-space): New tests.
      8619323f
    • Paul Eggert's avatar
      Spelling fixes. · 7831fb1b
      Paul Eggert authored
      7831fb1b
  9. 13 Nov, 2012 3 commits
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-move-to-block): Looks for a block · 5e9419e8
      Dmitry Gutov authored
      start/end keyword a bit harder.  Works with different values of N.
      Add more comments.
      (ruby-end-of-block): Update accordingly.
      
      * test/automated/ruby-mode-tests.el (ruby-heredoc-font-lock)
      (ruby-singleton-class-no-heredoc-font-lock)
      (ruby-add-log-current-method-examples): New tests.
      (ruby-test-string): Extract from ruby-should-indent-buffer.
      (ruby-deftest-move-to-block): New macro.
      Add several move-to-block tests.
      5e9419e8
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-add-log-current-method): Print the · 5745cae6
      Dmitry Gutov authored
      period before class method names, not after.  Remove handling of
      one impossible case.  Add comments.
      
      * test/automated/ruby-mode-tests.el 
      (ruby-add-log-current-method-examples): New test.
      (ruby-test-string): Extract from ruby-should-indent-buffer.
      5745cae6
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Never · f178c32d
      Dmitry Gutov authored
      font-lock the beginning of singleton class as heredoc.
      
      * test/automated/ruby-mode-tests.el (ruby-heredoc-font-lock)
      (ruby-singleton-class-no-heredoc-font-lock): New tests.
      f178c32d
  10. 12 Nov, 2012 1 commit
  11. 08 Nov, 2012 1 commit
  12. 24 Sep, 2012 1 commit
    • Chong Yidong's avatar
      Fix uses of long-obsolete font-lock-reference face. · 6c27f0f8
      Chong Yidong authored
      * generic-x.el (rul-generic-mode): Use font-lock-constant-face.
      * calendar/calendar.el (calendar-font-lock-keywords):
      * calendar/diary-lib.el (diary-font-lock-keywords)
      (diary-fancy-font-lock-keywords):
      * textmodes/reftex-sel.el (reftex-insert-docstruct):
      * textmodes/reftex-index.el (reftex-insert-index):
      * textmodes/reftex-cite.el (reftex-format-bib-entry):
      * progmodes/ruby-mode.el (ruby-font-lock-keywords):
      * progmodes/ps-mode.el (ps-mode-font-lock-keywords-1):
      * progmodes/prolog.el (prolog-font-lock-keywords):
      * progmodes/idlwave.el (idlwave-idl-keywords):
      * progmodes/ada-mode.el (ada-font-lock-keywords):
      * net/snmp-mode.el (snmp-font-lock-keywords-3): Likewise.
      
      * font-lock.el (font-lock-reference-face): Use
      define-obsolete-variable-alias.
      6c27f0f8
  13. 18 Sep, 2012 1 commit
  14. 08 Sep, 2012 3 commits
  15. 07 Sep, 2012 3 commits
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el · 8f06acce
      Dmitry Gutov authored
      (ruby-beginning-of-defun): Only consider 3 keywords defun beginners.
      (ruby-end-of-defun): Expect that the point is at the beginning of
      the defun.
      8f06acce
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-end-of-defun) · d81ceaaf
      Dmitry Gutov authored
      (ruby-beginning-of-defun): Simplify, allow indentation before
      block beginning and end keywords.  Also, fix accidental change in the former.
      d81ceaaf
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-indent-beg-re): Add pieces from · 0ba2d4b6
      Dmitry Gutov authored
      ruby-beginning-of-indent, simplify, allow all keywords to have
      indentation before them.
      (ruby-beginning-of-indent): Adjust for above.  Search until the
      found point is not inside a string or comment.
      (ruby-font-lock-keywords): Allow symbols to start with "@"
      character, give them higher priority than variables.
      (ruby-syntax-propertize-function)
      (ruby-font-lock-syntactic-keywords): Remove the "not comments"
      matchers.  Expression expansions are not comments when inside a
      string, and there comment syntax status is irrelevant.
      (ruby-match-expression-expansion): New function.  Check that
      expression expansion is inside a string, and it's not escaped.
      (ruby-font-lock-keywords): Use it.
      
      * test/automated/ruby-mode-tests.el: New tests (Bug#11613).
      0ba2d4b6
  16. 04 Sep, 2012 1 commit
    • Dmitry Gutov's avatar
      * ruby-mode.el: Clean up keybindings. · 4489104f
      Dmitry Gutov authored
      (ruby-mode-map): Don't bind ruby-electric-brace,
      ruby-beginning-of-defun, ruby-end-of-defun, ruby-mark-defun,
      backward-kill-word, reindent-then-newline-and-indent.
      (ruby-mark-defun): Remove.
      (ruby-electric-brace): Remove.  Obsoleted by electric-indent-chars.
      (ruby-mode): Set local beginning-of-defun-function and
      end-of-defun-function values.
      4489104f
  17. 14 Aug, 2012 2 commits
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el (ruby-syntax-methods-before-regexp): New const. · f063063a
      Dmitry Gutov authored
      (ruby-syntax-propertize-function): Use it to recognize regexps.
      Don't look at the text after regexp, just use the whitelist.
      * test/indent/ruby.rb: Rearrange examples, add new ones.
      
      Fixes: debbugs:6286
      f063063a
    • Dmitry Gutov's avatar
      * lisp/progmodes/ruby-mode.el: Improve percent literals. · e636fafe
      Dmitry Gutov authored
      (ruby-percent-literal-beg-re): New constant.
      (ruby-syntax-general-delimiters-goto-beg): Rename to
      `ruby-syntax-enclosing-percent-literal', improve literal type check.
      (ruby-syntax-propertize-general-delimiters): Rename to
      `ruby-syntax-propertize-percent-literal', it's a shorter and more
      popular term.  Adjust comments everywhere.
      (ruby-syntax-propertize-percent-literal): Only propertize when not
      inside a simple string or comment.  When the literal is unclosed,
      leave the text after it unpropertized.
      
      Fixes: debbugs:6286
      e636fafe
  18. 12 Aug, 2012 1 commit
    • Nobuyoshi Nakada's avatar
      Merge from upstream ruby-mode.el · 0d9e2599
      Nobuyoshi Nakada authored
      * lisp/progmodes/ruby-mode.el (ruby-mode-map): Remove unnecessary
      binding for `newline'.
      (ruby-move-to-block): When moving backward, stop at block opening,
      not indentation.
      * progmodes/ruby-mode.el (ruby-brace-to-do-end)
      (ruby-do-end-to-brace, ruby-toggle-block): New functions.
      * progmodes/ruby-mode.el (ruby-mode-map): Add binding for
      `ruby-toggle-block'.
      * test/automated/ruby-mode-tests.el (ruby-move-to-block-stops-at-opening)
      (ruby-toggle-block-to-do-end, ruby-toggle-block-to-brace): New test.
      0d9e2599
  19. 10 Aug, 2012 1 commit
    • Dmitry Gutov's avatar
      Merge stuff from upsteam ruby-mode, part 1. · 9cd80478
      Dmitry Gutov authored
      * lisp/progmodes/ruby-mode.el (ruby-mode-map): Remove deprecated
      binding (use `M-;' instead).
      (ruby-expr-beg, ruby-parse-partial): ?, _, and : are symbol
      constituents, ! is not (but kinda should be).
      (ruby-singleton-class-p): New function.
      (ruby-expr-beg, ruby-in-here-doc-p)
      (ruby-syntax-propertize-heredoc): Use it.
      (ruby-syntax-propertize-function): Adjust for changes in
      `ruby-syntax-propertize-heredoc'.
      
      * test/automated/ruby-mode-tests.el (ruby-should-indent)
      (ruby-assert-state): New functions.
      Add new tests.
      
      Fixes: debbugs:12169
      9cd80478
  20. 20 Jul, 2012 1 commit
  21. 24 Apr, 2012 3 commits
  22. 21 Mar, 2012 1 commit
  23. 11 Jan, 2012 1 commit
  24. 05 Jan, 2012 1 commit
  25. 15 Mar, 2011 1 commit
    • Stefan Monnier's avatar
      Fix misuse of quote in `case'. · 0adf5618
      Stefan Monnier authored
      * lisp/progmodes/ruby-mode.el (ruby-backward-sexp):
      * lisp/progmodes/ebrowse.el (ebrowse-draw-file-member-info):
      * lisp/play/gamegrid.el (gamegrid-make-face):
      * lisp/play/bubbles.el (bubbles--grid-width, bubbles--grid-height)
      (bubbles--colors, bubbles--shift-mode, bubbles--initialize-images):
      * lisp/notifications.el (notifications-notify):
      * lisp/net/xesam.el (xesam-search-engines):
      * lisp/net/quickurl.el (quickurl-list-insert):
      * lisp/vc/vc-hg.el (vc-hg-dir-printer): Fix use of case.
      * lisp/gnus/auth-source.el (auth-source-netrc-create):
      * lisp/gnus/message.el (message-yank-original): Fix use of `case'.
      * lisp/org/org-src.el (org-src-switch-to-buffer):
      * lisp/org/org-plot.el (org-plot/gnuplot-script, org-plot/gnuplot):
      * lisp/org/org-mouse.el (org-mouse-agenda-type):
      * lisp/org/org-freemind.el (org-freemind-node-to-org):
      * lisp/org/ob-sql.el (org-babel-execute:sql):
      * lisp/org/ob-exp.el (org-babel-exp-do-export, org-babel-exp-code):
      * lisp/org/ob-ref.el (org-babel-ref-resolve): Fix use of case.
      0adf5618