1. 14 Nov, 2012 1 commit
  2. 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
  3. 12 Nov, 2012 1 commit
  4. 08 Nov, 2012 1 commit
  5. 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
  6. 18 Sep, 2012 1 commit
  7. 08 Sep, 2012 3 commits
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 20 Jul, 2012 1 commit
  14. 24 Apr, 2012 3 commits
  15. 21 Mar, 2012 1 commit
  16. 11 Jan, 2012 1 commit
  17. 05 Jan, 2012 1 commit
  18. 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
  19. 27 Jan, 2011 1 commit
  20. 26 Jan, 2011 1 commit
  21. 25 Jan, 2011 1 commit
  22. 24 Jan, 2011 1 commit
  23. 23 Jan, 2011 1 commit
    • Nobuyoshi Nakada's avatar
      Merge several fixes from upsteam ruby-mode. · cc9c9831
      Nobuyoshi Nakada authored
      * lisp/progmodes/ruby-mode.el (ruby-here-doc-beg-match): Fix for
      here-doc which ends with an underscore.
      (ruby-mode-set-encoding): Skip shebang line always.
      (ruby-mode-map): Bind C-c C-c to comment-region.
      (ruby-expr-beg, ruby-font-lock-keywords): Highlight literal hash
      key labels as symbols.
      (ruby-forward-sexp): Stop after literal hash key labels.
      (ruby-font-lock-syntactic-keywords): Highlight regexp after open
      bracket.
      cc9c9831
  24. 16 Jan, 2011 1 commit
  25. 02 Jan, 2011 1 commit
  26. 07 Nov, 2010 1 commit
    • Glenn Morris's avatar
      Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol. · e180ab9f
      Glenn Morris authored
      * lisp/mh-e/mh-seq.el (mh-read-msg-list): Use point-at-eol.
      
      * lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-show-infos)
      (gnus-bookmark-kill-line): Use point-at-eol.
      
      * lisp/cedet/ede/proj-elisp.el (ede-proj-flush-autoconf): Use point-at-bol.
      
      * lisp/emacs-lisp/chart.el (chart-zap-chars):
      * lisp/play/decipher.el (decipher-set-map):
      * lisp/progmodes/ada-mode.el (ada-get-current-indent)
      (ada-search-ignore-string-comment, ada-tab-hard, ada-untab-hard):
      * lisp/progmodes/ada-prj.el (ada-prj-load-from-file, ada-prj-display-help):
      * lisp/progmodes/ada-xref.el (ada-initialize-runtime-library)
      (ada-get-all-references):
      * lisp/progmodes/cperl-mode.el (cperl-electric-paren)
      (cperl-electric-rparen, cperl-electric-keyword, cperl-electric-else)
      (cperl-linefeed, cperl-sniff-for-indent, cperl-to-comment-or-eol)
      (cperl-find-pods-heres, cperl-indent-exp, cperl-fix-line-spacing)
      (cperl-word-at-point-hard):
      * lisp/progmodes/idlw-shell.el (idlwave-shell-move-or-history)
      (idlwave-shell-filename-string, idlwave-shell-batch-command)
      (idlwave-shell-display-line):
      * lisp/progmodes/idlwave.el (idlwave-show-begin, idlwave-fill-paragraph)
      (idlwave-calc-hanging-indent, idlwave-auto-fill, idlwave-template):
      * lisp/progmodes/js.el (js--re-search-forward-inner)
      (js--re-search-backward-inner):
      * lisp/progmodes/vhdl-mode.el (vhdl-align-region-1, vhdl-align-region-2)
      (vhdl-fix-clause, vhdl-compose-configuration-architecture):
      * lisp/progmodes/ruby-mode.el (ruby-parse-partial, eval-when-compile):
      * lisp/textmodes/flyspell.el (flyspell-process-localwords):
      * lisp/textmodes/ispell.el (ispell-buffer-local-parsing)
      (ispell-buffer-local-dict, ispell-buffer-local-words):
      Use point-at-bol and point-at-eol.
      e180ab9f
  27. 01 Nov, 2010 1 commit
  28. 27 Oct, 2010 1 commit
  29. 10 Sep, 2010 1 commit
    • Stefan Monnier's avatar
      New syntax-propertize functionality. · cf38dd42
      Stefan Monnier authored
      * lisp/font-lock.el (font-lock-syntactic-keywords): Make obsolete.
      (font-lock-fontify-syntactic-keywords-region): Move handling of
      font-lock-syntactically-fontified to...
      (font-lock-default-fontify-region): ...here.
      Let syntax-propertize-function take precedence.
      (font-lock-fontify-syntactically-region): Cal syntax-propertize.
      
      * lisp/emacs-lisp/regexp-opt.el (regexp-opt-depth): Skip named groups.
      
      * lisp/emacs-lisp/syntax.el (syntax-propertize-function)
      (syntax-propertize-chunk-size, syntax-propertize--done)
      (syntax-propertize-extend-region-functions): New vars.
      (syntax-propertize-wholelines, syntax-propertize-multiline)
      (syntax-propertize--shift-groups, syntax-propertize-via-font-lock)
      (syntax-propertize): New functions.
      (syntax-propertize-rules): New macro.
      (syntax-ppss-flush-cache): Set syntax-propertize--done.
      (syntax-ppss): Call syntax-propertize.
      
      * lisp/progmodes/ada-mode.el (ada-set-syntax-table-properties)
      (ada-after-change-function, ada-initialize-syntax-table-properties)
      (ada-handle-syntax-table-properties): Only define when
      syntax-propertize is not available.
      (ada-mode): Use syntax-propertize-function.
      
      * lisp/progmodes/autoconf.el (autoconf-mode):
      Use syntax-propertize-function.
      (autoconf-font-lock-syntactic-keywords): Remove.
      
      * lisp/progmodes/cfengine.el (cfengine-mode):
      Use syntax-propertize-function.
      (cfengine-font-lock-syntactic-keywords): Remove.
      
      * lisp/progmodes/cperl-mode.el (cperl-mode): Use syntax-propertize-function.
      
      * lisp/progmodes/fortran.el (fortran-mode): Use syntax-propertize-function.
      (fortran--font-lock-syntactic-keywords): New var.
      (fortran-line-length): Update syntax-propertize-function and
      fortran--font-lock-syntactic-keywords.
      
      * lisp/progmodes/gud.el (gdb-script-syntax-propertize-function): New var;
      replaces gdb-script-font-lock-syntactic-keywords.
      (gdb-script-mode): Use it.
      
      * lisp/progmodes/js.el (js--regexp-literal): Define while compiling.
      (js-syntax-propertize-function): New var; replaces
      js-font-lock-syntactic-keywords.
      (js-mode): Use it.
      
      * lisp/progmodes/make-mode.el (makefile-syntax-propertize-function):
      New var; replaces makefile-font-lock-syntactic-keywords.
      (makefile-mode): Use it.
      (makefile-imake-mode): Adjust.
      
      * lisp/progmodes/mixal-mode.el (mixal-syntax-propertize-function): New var;
      replaces mixal-font-lock-syntactic-keywords.
      (mixal-mode): Use it.
      
      * lisp/progmodes/octave-mod.el (octave-syntax-propertize-sqs): New function
      to replace octave-font-lock-close-quotes.
      (octave-syntax-propertize-function): New function to replace
      octave-font-lock-syntactic-keywords.
      (octave-mode): Use it.
      
      * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): New fun to
      replace perl-font-lock-syntactic-keywords.
      (perl-syntax-propertize-special-constructs): New fun to replace
      perl-font-lock-special-syntactic-constructs.
      (perl-font-lock-syntactic-face-function): New fun.
      (perl-mode): Use it.
      
      * lisp/progmodes/python.el (python-syntax-propertize-function): New var to
      replace python-font-lock-syntactic-keywords.
      (python-mode): Use it.
      (python-quote-syntax): Simplify and adjust to new use.
      
      * lisp/progmodes/ruby-mode.el (ruby-here-doc-beg-re):
      Define while compiling.
      (ruby-here-doc-end-re, ruby-here-doc-beg-match)
      (ruby-font-lock-syntactic-keywords, ruby-comment-beg-syntax)
      (syntax-ppss, ruby-in-ppss-context-p, ruby-in-here-doc-p)
      (ruby-here-doc-find-end, ruby-here-doc-beg-syntax)
      (ruby-here-doc-end-syntax): Only define when
      syntax-propertize is not available.
      (ruby-syntax-propertize-function, ruby-syntax-propertize-heredoc):
      New functions.
      (ruby-in-ppss-context-p): Update to new syntax of heredocs.
      (electric-indent-chars): Silence bytecompiler.
      (ruby-mode): Use prog-mode, syntax-propertize-function, and
      electric-indent-chars.
      
      * lisp/progmodes/sh-script.el (sh-st-symbol): Remove.
      (sh-font-lock-close-heredoc, sh-font-lock-open-heredoc): Add eol arg.
      (sh-font-lock-flush-syntax-ppss-cache, sh-font-lock-here-doc): Remove.
      (sh-font-lock-quoted-subshell): Assume we've already matched $(.
      (sh-font-lock-paren): Set syntax-multiline.
      (sh-font-lock-syntactic-keywords): Remove.
      (sh-syntax-propertize-function): New function to replace it.
      (sh-mode): Use it.
      
      * lisp/progmodes/simula.el (simula-syntax-propertize-function): New var to
      replace simula-font-lock-syntactic-keywords.
      (simula-mode): Use it.
      
      * lisp/progmodes/tcl.el (tcl-syntax-propertize-function): New var to
      replace tcl-font-lock-syntactic-keywords.
      (tcl-mode): Use it.
      
      * lisp/progmodes/vhdl-mode.el (vhdl-mode): Use syntax-propertize-function
      if available.
      (vhdl-fontify-buffer): Adjust.
      
      * lisp/textmodes/bibtex.el (bibtex-mode): Use syntax-propertize-function.
      
      * lisp/textmodes/reftex.el (font-lock-syntactic-keywords): Don't declare
      since we don't use it.
      
      * lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-function): New var to
      replace sgml-font-lock-syntactic-keywords.
      (sgml-mode): Use it.
      
      * lisp/textmodes/tex-mode.el (tex-common-initialization, doctex-mode):
      Use syntax-propertize-function.
      
      * lisp/textmodes/texinfo.el (texinfo-syntax-propertize-function): New fun
      to replace texinfo-font-lock-syntactic-keywords.
      (texinfo-mode): Use it.
      
      * test/indent/octave.m: Remove some `fixindent' not needed any more.
      cf38dd42
  30. 24 Aug, 2010 1 commit
  31. 27 Jun, 2010 1 commit