Граф коммитов

338 Коммитов

Автор SHA1 Сообщение Дата
nobu 0affebd72e ruby-additional.el: adjust heredoc line number
* misc/ruby-additional.el (ruby-insert-heredoc-code-block): insert
  a newline adjust the line number for "begin" line.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-07 08:57:37 +00:00
nobu 452eba30c5 ruby-mode.el: squiggly heredoc
* misc/ruby-mode.el (ruby-here-doc-beg-re),
  (ruby-here-doc-beg-match, ruby-parse-partial): Support for
  `squiggly heredoc' syntax in ruby-mode.  [Fix GH-1372]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-02 07:51:36 +00:00
nobu a552fa2d66 ruby-insert-heredoc-code-block
* misc/ruby-additional.el (ruby-insert-heredoc-code-block): insert
  here document code block for assert_separately mainly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-28 11:40:58 +00:00
nobu f7228ad8e4 ruby-style.el: add an instruction to load
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-29 05:54:24 +00:00
nobu 8d6d6116ac ruby-additional.el: ruby-decode-unicode
* misc/ruby-additional.el (ruby-decode-unicode): new function to
  convert escaped Unicode to raw string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-18 13:49:51 +00:00
nobu 3e0f09dbe5 ruby-additional.el: escape control code
* misc/ruby-additional.el (ruby-encode-unicode): escape control
  code except for LF.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-31 01:38:28 +00:00
nobu 34167345ac ruby-additional.el: encode non-ASCII code only
* misc/ruby-additional.el (ruby-encode-unicode): encode non-ASCII
  code only, excluding ASCII control code, e.g. \t, \n, etc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-31 00:39:03 +00:00
nobu 68e16ddd79 parse.y: ANDDOT fluent interface
* parse.y (parser_yylex): ANDDOT at the head of the line denote
  line continuation from previous one to support fluent interface,
  as well as single dot.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12 05:17:06 +00:00
knu 9955bb0130 Import ruby-electric.el version 2.2.3 from upstream
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-24 14:52:31 +00:00
nobu dd939a3886 ruby-additional.el: monkey-patching ruby-mode.el
* misc/ruby-additional.el: monkey-patch ruby-mode.el in Emacs 24,
  to fix regexp parsing as r49872.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 01:59:32 +00:00
nobu fe2440261c ruby-mode.el: fix regexp syntax
* misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): division
  operator can't follow '{' and '|' too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-06 12:12:11 +00:00
knu 210357fad0 * misc/ruby-electric.el: Import version 2.2.2 from
https://github.com/knu/ruby-electric.el.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-26 09:06:54 +00:00
knu e65fa1f467 Import ruby-electric.el 2.2.1.
* misc/ruby-electric.el: Import version 2.2.1 from
  https://github.com/knu/ruby-electric.el.  Improve compatibility
  with and optimize for Emacs 24.4.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-21 13:39:25 +00:00
nobu 9a8b21b3b6 ruby-additional.el: change key
* misc/ruby-additional.el (ruby-encode-unicode): change key
  binding to get rid of conflict with uncomment-region.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-29 07:41:42 +00:00
nobu c82b44e1b4 ruby-additional.el: track by marker
* misc/ruby-additional.el (ruby-encode-unicode): use marker
  instead of offset to track insertion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-29 07:41:35 +00:00
hsbt f4e9aa370d * misc/README: use github link instead of rubyforge.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-05 03:47:46 +00:00
nobu 4332617032 ruby-additional.el: ruby-encode-unicode
* misc/ruby-additional.el (ruby-encode-unicode): convert non-ascii
  string to \\u{} form.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23 02:03:24 +00:00
nobu a6c8346da1 rdoc-mode.el: fill indented block
* misc/rdoc-mode.el (rdoc-fill-paragraph): fill indented block by
  list.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-14 04:29:35 +00:00
knu f38a2926e0 misc/ruby-electric.el: Import version 2.1.1.
* ruby-electric-delete-backward-char: Enable support for number
    prefix.

  * ruby-electric-curlies: Fix electric operation after an open
    curly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17 08:33:01 +00:00
nobu 378d20f80d ruby-mode.el: expand/unexpand block
* misc/ruby-mode.el (ruby-brace-to-do-end): split single line block.
* misc/ruby-mode.el (ruby-do-end-to-brace): shrink single line block
  to one line.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 07:47:47 +00:00
knu 9f01bdae2a Record dependency on Emacs 24.3 and update commentary.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-31 04:13:43 +00:00
knu 6ca6820a56 misc/ruby-additional.el: Remove functions implemented in Emacs 24.3.
* misc/ruby-additional.el (ruby-brace-to-do-end)
  (ruby-do-end-to-brace, ruby-toggle-block): Remove functions that
  are already in the latest released version of Emacs (24.3).
  [Bug #7565]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-30 10:11:20 +00:00
knu 3701549796 * misc/ruby-electric.el: Import ruby-electric.el 2.1 from
https://github.com/knu/ruby-electric.el.

  * Hitting the newline-and-indent key within a comment fires
    comment-indent-new-line.

  * Introduce a new feature
    `ruby-electric-autoindent-on-closing-char`.

  * Fix fallback behavior of ruby-electric-space/return that
    caused error with auto-complete.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 05:45:23 +00:00
knu 73e014407f Import ruby-electric.el 2.0.1, a bug fix release.
* misc/ruby-electric.el: Import ruby-electric.el 2.0.1 which fixes
  a bug and a flaw with auto-end introduced in the revamp.

  * ruby-forward-sexp is inappropriate here because it moves the
    cursor past the keyword.

  * Fix a reversed looking-back check in
    ruby-electric--block-beg-keyword-at-point-p.

  * Do not add end again if space or return is hit repeatedly
    after a block beginning keyword.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-11 10:31:03 +00:00
knu 86597752f7 Import ruby-electric.el 2.0.
* misc/ruby-electric.el: Import ruby-electric.el 2.0 from
  https://github.com/knu/ruby-electric.el which integrates changes
  from another fork by @qoobaa.
  * Allow ruby-electric-mode to be disabled by introducing a
    dedicated key map.  Electric key bindings are now defined in
    ruby-electric-mode-map instead of overwriting ruby-mode-map.
  * Add ruby-electric-mode-hook.
  * Use a remap in binding ruby-electric-delete-backward-char.
  * Totally revamp electric keywords and then introduce electric
    return.  Modifier keywords are now properly detected making
    use of ruby-mode's indentation level calculator, and
  * block-mid keywords (then, else, elsif, when, rescue and
    ensure) also become electric with automatic reindentation.
  * Add standarized comments for ELPA integration.
  * Fix interaction with smartparens-mode by disabling its end
    keyword completion, since ruby-electric has become more clever
    at it.
  * The custom variable `ruby-electric-keywords` is changed to
    `ruby-electric-keywords-alist`, allowing user to fine-grained
    configuration.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-11 08:38:52 +00:00
knu 6fa584e2a5 Fix a typo: s/preceging/preceding/
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-08 12:42:37 +00:00
knu 20eff9bd7c * misc/ruby-mode.el: Use preceding-char/following-char
(returning 0 at BOF/EOF) instead of char-before/char-after
  (returning nil at BOF/EOF) to avoid error from char-syntax when
  at BOF/EOF.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 19:29:41 +00:00
knu 593855a0ff * misc/ruby-additional.el (ruby-mode-set-encoding): Add a missing
else clause to unbreak with `cp932`, etc.

* misc/ruby-mode.el (ruby-mode-set-encoding): Ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 19:15:11 +00:00
knu 449822c76c * misc/ruby-additional.el (ruby-mode-set-encoding): Use
`default-buffer-file-coding-system` if the :prefer-utf-8
  property is not available.

* misc/ruby-mode.el (ruby-mode-set-encoding): Ditto.

* misc/ruby-additional.el (ruby-encoding-map): Override the
  default value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 19:03:03 +00:00
knu 1ecf20cda2 misc/ruby-mode.el: Improve `ruby-mode-set-encoding`.
* misc/ruby-additional.el (ruby-mode-set-encoding): Add support
  for `prefer-utf-8` which was introduced in Emacs trunk.

* misc/ruby-additional.el (ruby-encoding-map): Add a mapping from
  `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.

* misc/ruby-additional.el (ruby-mode-set-encoding): Add support
  for encodings mapped to nil in `ruby-encoding-map`.

* misc/ruby-additional.el (ruby-encoding-map): Map `us-ascii` and
  `utf-8` to nil by default, meaning they need not be explicitly
  declared in magic comment.

* misc/ruby-additional.el (ruby-encoding-map): Add type
  declaration for better customize UI.

* misc/ruby-mode.el: Ditto for the above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 18:21:21 +00:00
knu 965854205b * misc/ruby-additional.el: Add a standard header and footer,
including (provide 'ruby-additional).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 15:16:38 +00:00
knu 1189b5fe99 Make ruby-electric play nicely with smartparens-mode.
* misc/ruby-electric.el (ruby-electric-space-can-be-expanded-p):
  Return nil to avoid "end" insertion when in smartparens-mode
  that is configured to insert "end" for the same keyword.

* misc/ruby-electric.el (ruby-electric-keywords): New custom
  variable to replace `ruby-electric-simple-keywords-re` with.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 14:47:32 +00:00
knu ae8870e9e0 * misc/ruby-additional.el: Use preceding-char/following-char
(returning 0 at BOF/EOF) instead of char-before/char-after
  (returning nil at BOF/EOF) to avoid error from char-syntax when
  at BOF/EOF.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 14:47:29 +00:00
knu 42b72a08d1 * misc/ruby-additional.el: Properly quote the body. An unquoted
body given to eval-after-load is evaluated immediately!

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-02 15:25:34 +00:00
knu e59f453e88 * misc/ruby-electric.el (ruby-electric-delete-backward-char): Add
support for smartparen-mode.

* misc/ruby-electric.el (ruby-electric-cua-replace-region-maybe)
  (ruby-electric-cua-delete-region-maybe): New functions that
  combine `ruby-electric-cua-*-region` with
  `ruby-electric-cua-*-region-p`, using a slightly better way to
  detect if it is in cua-mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-26 12:16:22 +00:00
knu 26f7f7da27 * misc/ruby-electric.el: Avoid use of the interactive function
`self-insert-command` which fires `post-self-insert-hook` and
  `post-command-hook`, to make the ruby-electric commands work
  nicely with those minor modes that make use of them to do
  similar input assistance, such as electric-pair-mode,
  autopair-mode and smartparens-mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-26 07:50:19 +00:00
knu afcabde71b Add magic autoload comments to misc/*.el.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 09:29:22 +00:00
knu 0687ed1e59 * misc/ruby-electric.el (ruby-electric-delete-backward-char): Use
delete-char instead of delete-backward-char, which is an
  interactive function.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 01:41:47 +00:00
knu 041224017c * misc/ruby-electric.el (ruby-electric-setup-keymap): Make
backquotes electric as well.  It was listed in
  ruby-electric-expand-delimiters-list but not activated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-18 17:38:08 +00:00
knu 616084fd97 * misc/ruby-electric.el (ruby-electric-delete-backward-char):
Introduce electric DEL that deletes what the previous electric
  command has input.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-18 17:38:04 +00:00
knu 30034b5536 * misc/ruby-electric.el (ruby-electric-matching-char): Make
electric quotes work again at the end of buffer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-18 17:38:02 +00:00
knu 53fa01d060 * misc/ruby-electric.el (ruby-electric-matching-char): Do not put
a closing quote when the quote typed does not start a string, as
  in $', ?\' or ?\".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-17 10:27:32 +00:00
hsbt 595825dc57 Replace use of obsolete variable `last-command-char` by @maser [fix GH-290]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-21 10:04:54 +00:00
knu 7190cc5df9 misc/ruby-electric.el: Decrease the excess voltage of automatic matching.
* misc/ruby-electric.el (ruby-electric-closing-char): New
  interactive function bound to closing characters.  Typing one of
  those closing characters right after the matching counterpart
  cancels the effect of automatic closing.  For example, typing
  "{" followed by "}" simply makes "{}" instead of "{ } }".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-15 13:15:20 +00:00
knu ed3b657d7d misc/ruby-electric.el: Minor refactoring.
* misc/ruby-electric.el (ruby-electric-insert): Check
  ruby-electric-is-last-command-char-expandable-punct-p here.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-15 13:15:17 +00:00
nobu fa93be2f05 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08 20:27:01 +00:00
knu 59eacb45e5 Improve ruby-electric-mode.
* misc/ruby-electric.el (ruby-electric-hash): New electric
  function that expands a hash sign inside a string or regexp to
  "#{}".

* misc/ruby-electric.el (ruby-electric-curlies): Do not insert
  spaces inside when the curly brace is a delimiter of %r, %w,
  etc.

* misc/ruby-electric.el (ruby-electric-curlies): Insert another
  space before a closing curly brace when
  ruby-electric-newline-before-closing-bracket is nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 16:43:32 +00:00
knu 5b7d2440ca misc/ruby-electric.el: Avoid electric insertion in some cases.
* misc/ruby-electric.el (ruby-electric-curlies)
  (ruby-electric-matching-char, ruby-electric-bar): Avoid electric
  insertion when there is a prefix argument.

* misc/ruby-electric.el (ruby-electric-insert)
  (ruby-electric-cua-replace-region-p)
  (ruby-electric-cua-replace-region): Avoid electric insertion and
  fall back when cua-mode is enabled and a region is active.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-23 03:55:39 +00:00
knu 9545483ad3 Fix ruby-electric-curlies.
* misc/ruby-electric.el (ruby-electric-curlies): Fix the bug where
  an open curly is always replaced with a hash sign.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-22 14:05:40 +00:00
knu 7bc4cfe479 ruby-electric.el (ruby-electric-curlies): Automatically indent "}".
* misc/ruby-electric.el (ruby-electric-curlies): Automatically
  indent closing curly brackets when
  ruby-electric-newline-before-closing-bracket is true.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28 08:10:01 +00:00
knu ca4a5bd9d7 Fix a typo in misc/ruby-additional.el.
* misc/ruby-additional.el (ruby-mode-set-encoding): Unbreak by
  fixing a typo, s/set/setq/.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-03 06:52:47 +00:00
nobu 983c2e874f ruby-mode.el: fix argument indent
* misc/ruby-mode.el (ruby-block-end-re, ruby-delimiter)
  (ruby-mode-syntax-table, ruby-parse-partial, ruby-beginning-of-indent):
  merge from Emacs.
* misc/ruby-mode.el (ruby-calculate-indent): fix indentation of
  argument lines in parentheses.  [Bug #5140]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-03 03:43:40 +00:00
nobu f9aef18497 ruby-electric.el: use kill-region
* misc/ruby-electric.el (ruby-electric-curlies): use kill-region
  instead of interactive command delete-backward-char.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-01 08:17:05 +00:00
nobu 5852d901b5 inf-ruby.el: fix compilation-shell-minor-mode
* misc/inf-ruby.el (inferior-ruby-mode): fix the
  compilation-shell-minor-mode configuration.  a patch by
  j2petkov (Jean-Christophe Petkovich) in [ruby-core:46518].
  [Bug #6742]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-01 08:13:04 +00:00
nobu 1c5104ac9c ruby-additional.el: set encoding
* misc/ruby-additional.el (ruby-mode-set-encoding): now encoding needs
  to be set always explicitly actually.  [Feature #6679]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-07 02:48:19 +00:00
nobu ec007f72cf ruby-electric.el: fix #198
* misc/ruby-electric.el using variable `last-command-event' instead of
  obsolete `last-command-char', so that work with Emacs trunk.
  a patch by Victor Deryagin <vderyagin AT gmail.com>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-23 05:20:45 +00:00
nobu 98fded61f8 ruby-additional.el
* misc/ruby-additional.el: missing functions in Emacs 24.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-03 09:31:37 +00:00
knu e21d7c1284 * misc/rdoc-mode.el (rdoc-imenu-create-index): Add imenu support
to rdoc-mode.

* misc/rdoc-mode.el (rdoc-mode): Fix regexp patterns containing
  "\s " where CR/LF is not supposed to match.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-22 15:56:03 +00:00
knu 10e85b7f84 * misc/rdoc-mode.el (rdoc-mode): Add provide so that requiring
this library succeeds.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-18 09:12:54 +00:00
mrkn be5e17704c * misc/ruby-mode.el (ruby-indent-beg-re): Fix broken regular
expression.  Fixes #4546

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 14:54:11 +00:00
nobu d9e6b7d6a5 * misc/ruby-mode.el (ruby-parse-partial): use position of open paren.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-19 15:02:16 +00:00
nobu 2cda63027d * misc/ruby-mode.el (ruby-brace-to-do-end, ruby-do-end-to-brace):
adjust space between block beginning and block arguments

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-31 14:15:48 +00:00
nobu 633cf770f0 * misc/ruby-mode.el (ruby-toggle-block): toggle do/end and {}.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-30 13:55:50 +00:00
nobu 764c486b84 * misc/ruby-mode.el (ruby-move-to-block): move to opening of
block.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-30 13:54:26 +00:00
nobu 1f1c31e355 * misc/ruby-mode.el (ruby-mode-map): remove unnecessary
binding. fixes
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468952

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-27 07:55:43 +00:00
nobu 69a6b860ef * misc/ruby-mode.el: suppress warnings at byte compile. fixes
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502926

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-27 06:45:56 +00:00
nobu 862048e28d * misc/ruby-mode.el (ruby-parse-partial): fix indent after aref.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-09 14:06:15 +00:00
nobu 9652eae6e7 * misc/ruby-electric.el: remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-08 14:12:48 +00:00
nobu 6b0dc7fd81 * misc/ruby-mode.el (ruby-parse-partial): fix for array in block.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-08 14:10:19 +00:00
nobu 85df40e9ab * misc/ruby-mode.el (ruby-deep-indent-paren-p, ruby-calculate-indent):
do not apply deep-indent inside parens at the beginning of
  expressions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-08 03:30:23 +00:00
nobu 787686ffa7 * misc/ruby-mode.el (ruby-expr-beg): fix for invalid nest errors.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-08 10:38:01 +00:00
nobu 5f3e191f95 * misc/ruby-mode.el (ruby-expr-beg, ruby-in-here-doc-p): tell
singleton class definitions from here documents.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-07 15:56:34 +00:00
nobu 360e0b93fd * misc/ruby-mode.el (ruby-expr-beg, ruby-parse-partial): keyword
followed by colon is label.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-07 15:53:15 +00:00
nobu c5b45d252a * misc/ruby-mode.el (ruby-mode-map): remove deprecated binding.
use M-; instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 14:14:24 +00:00
nobu 594793f588 * misc/rdoc-mode.el (rdoc-mode): show trailing whitespace.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-10 04:51:20 +00:00
kazu 1ca8760902 * misc/README: mention rdoc-mode.el and ruby-style.el.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-09 22:44:19 +00:00
nobu 29ed2f308c * misc/ruby-mode.el (ruby-mode-variables), misc/ruby-style.el:
show trailing whitespace.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-07 12:57:34 +00:00
nobu a262f71f37 * misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): highlight
regexp after open bracket.  [ruby-core:34183]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-07 12:54:10 +00:00
nobu 281bdd3125 * NEWS (optparse): shell completion support.
* misc/README (rb_optparse.{bash,zzh}): for shell completion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-01 02:03:59 +00:00
kazu d298593f56 * misc/rb_optparse.zsh: add compdef for generator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-26 23:30:38 +00:00
kazu 90e1ed91c4 update how to install again.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-12 12:06:36 +00:00
kazu 89c7efed6f * misc/rb_optparse.zsh: update how to install.
* misc/rb_optparse.zsh: avoid error when setopt noclobber.

* lib/optparse.rb: fix typo. pointed out at
  <http://d.hatena.ne.jp/nagachika/20101207>.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-12 11:40:29 +00:00
nobu 11ef87461a * lib/optparse.rb (OptionParser::Officious): separate completion
options from --help.  [ruby-dev:42690]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-07 13:31:11 +00:00
kazu 6c715d1de8 * misc/rb_optparse.zsh: fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-06 10:01:53 +00:00
nobu f4c909b965 * misc/ruby-mode.el (ruby-forward-sexp): stop after literal hash
key labels.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-29 12:12:54 +00:00
nobu 05a0c30adc * misc/ruby-mode.el (ruby-font-lock-keywords): highlight literal
hash key labels as symbols.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-29 12:11:19 +00:00
nobu 91c0ff4f7d * lib/optparse.rb: shell completion support for zsh. based on
<http://d.hatena.ne.jp/rubikitch/20071002/zshcomplete>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-19 12:07:09 +00:00
nobu 644f0445e8 * lib/optparse.rb: shell completion support for bash.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-19 11:26:54 +00:00
nobu 671b498070 Commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-19 03:25:29 +00:00
nobu 12cbb58819 * test/ruby/test_sprintf.rb: fix ML ref. [ruby-core:32848]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-19 03:22:03 +00:00
nobu 4acf013ffd * misc/ruby-mode.el (ruby-mode-set-encoding): commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-31 09:27:06 +00:00
nobu 97a1d656f8 * misc/ruby-mode.el (ruby-mode-set-encoding): skip shebang line
always regardless of ruby.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-31 09:22:25 +00:00
nobu 42c16a3b07 * misc/ruby-style.el (ruby-style-version): take revision if
keyword is expanded. [ruby-dev:41408]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-25 07:37:41 +00:00
kosaki ceb62c31a1 * misc/ruby-mode.el (ruby-mode-map): binded C-c C-c and C-c C-c C-u
to comment-region and uncomment-region. Thanks Michael Klishin!
         [Feature #872] [ruby-core:20552]




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-07 14:39:28 +00:00
nobu 33ede4d01c * misc/ruby-mode.el (ruby-here-doc-beg-match): fix for here-doc
which ends with an underscore.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 03:49:42 +00:00
nobu 96ac194811 * misc/rdoc-mode.el: added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18 01:11:30 +00:00
knu 4d0e9c4515 * misc/ruby-style.el: It is too late to set c-file-style in
c-mode-hook (at least on Emacs 23).  Call c-set-style instead.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-24 02:41:57 +00:00
knu ae846f9fb8 * lib/irb/completion.rb (IRB::InputCompletor::Operators): Add
overloadable negative operators.

* lib/irb/ruby-lex.rb (RubyLex#lex_init): Support overloadable
  negative operators.

* lib/irb/ruby-lex.rb (RubyLex#identify_identifier): Minus signs
  need to be escaped in regexp character class.

* misc/ruby-mode.el (ruby-font-lock-keywords, ruby-parse-partial):
  Support overloadable negative operators.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-03 05:04:02 +00:00
matz 568b743442 * misc/ruby-mode.el: added comment to mention newer version
bundled with Emacs 23 or later.  a patch from Phil Hagelberg
  <phil at hagelb.org> in [ruby-core:20838].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 18:23:15 +00:00
nobu fd8ca75663 * misc/ruby-style.el (ruby-style-c-mode): buffer may not have file
name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 14:53:26 +00:00
nobu 00ae128346 * misc/ruby-mode.el: safe custimizable variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-26 09:24:31 +00:00
matz fb01457265 * misc/ruby-mode.el (ruby-keyword-end-re): emacs21 support. a
patch from Hiroshi Moriyama <hiroshi at kvd.biglobe.ne.jp> in
  [ruby-dev:36471].

* misc/ruby-mode.el (ruby-in-ppss-context-p): ditto.

* misc/ruby-mode.el (ruby-here-doc-end-syntax):

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-22 23:09:21 +00:00
matz 120772041e * misc/emacs-mode.el: don't set case-fold-search globally to nil;
instead just set it when we need it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:38:08 +00:00
matz e39aa51dfa * misc/ruby-mode.el: fix a variable-name error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:37:17 +00:00
matz 4cbbf3bdfc * misc/*.el: untabify, for interal consistency and consistency
with standard Emacs elisp files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:36:10 +00:00
matz d250d79e5b * misc/ruby-mode.el, misc/ruby-electric.el: use regexp-opt where
possible for more efficient regexps.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:34:46 +00:00
matz 3f3584d623 * misc/ruby-mode.el: don't highlight keywords when they're the
beginning of non-keyword symbols.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:33:43 +00:00
matz ce231cdbdd * misc/ruby-mode.el: don't crash the whole mode if the Subversion
$ keyword isn't interpolated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:32:38 +00:00
matz 2d1c5d2c24 * misc/*.el: merged the following patches from Nathan Weizenbaum
<nex342 at gmail.com>.   [ruby-core:18424]

* misc/ruby-mode.el: improve here-doc performance.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:30:34 +00:00
knu 3f91366caf * misc/ruby-mode.el (ruby-imenu-create-index-in-block): Fix the
regexp to only pick definition lines properly.  `module_funtion'
  is not a definition of a module named `_function'.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-07 09:04:27 +00:00
nobu 1bcbc29d95 * misc/ruby-mode.el: fix here-doc strings with inner quotes. patches
by Nathan Weizenbaum <nex342 AT gmail.com> from [ruby-core:17615]
  through [ruby-core:17910].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22 00:51:35 +00:00
matz cf5cf236d7 * misc/ruby-mode.el (ruby-mode): use run-hooks if run-mode-hook is
not available.  a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com>
  in [ruby-dev:34853].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-26 07:51:21 +00:00
matz f145325797 * misc/ruby-mode.el: move fontifying code from hook.
[ruby-core:16636]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 06:01:13 +00:00
nobu 9f9a532d98 * misc/ruby-style.el (ruby-style-{case,label}-indent): up list from
indentation point.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 13:15:56 +00:00
nobu 6a98d417f0 * misc/ruby-mode.el (ruby-encoding-map): added shift-jis for older
versions.

* misc/ruby-mode.el (ruby-mode-set-encoding):
  coding-system-to-mime-charset is not a standard function.
  [carbon-emacs:795]
  fix for the case that magic comment exists but coding system is
  absent.

* misc/ruby-mode.el (ruby-mode): use write-contents-functions or
  write-contents-hooks for older versions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 06:38:13 +00:00
knu 69327a9d2e * misc/rdebug.el, misc/README: Remove rdebug.el as per request
from the maintainer and mention the ruby-debug project at
  RubyForge in README.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 11:37:46 +00:00
knu 4a1d5cfafe Mention the ruby-debug project at RubyForge.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 11:36:29 +00:00
nobu c97735b53c * misc/ruby-mode.el (ruby-mode): should use `run-mode-hooks' instead
of calling `run-hooks' directly to run the mode hook.  patch from
  Chiyuan Zhang <pluskid AT gmail.com> in [ruby-core:15915]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-17 08:11:15 +00:00
nobu 05eeb60259 * misc/ruby-mode.el (ruby-encoding-map, ruby-use-encoding-map): added
to customize.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-14 02:24:32 +00:00
nobu c7e829292a * misc/ruby-mode.el (ruby-mode-set-encoding): special treat for
compatibility with -Ks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-12 08:01:08 +00:00
nobu 53577db05b * misc/ruby-mode.el (ruby-add-log-current-method): use ruby style
method name format.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 02:14:17 +00:00
matz 99e8314b3b * misc/ruby-mode.el (ruby-calculate-indent): should distinguish
comment and # in strings.  [ruby-dev:33874]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-26 07:53:40 +00:00
nobu f11ac55489 * misc/ruby-style.el (ruby-style-label-indent): fix for labels inside
blocks in switch.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-23 20:09:46 +00:00
nobu f7ed47355e * misc/ruby-mode.el (ruby-mode-set-encoding): updates magic comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28 15:10:02 +00:00
nobu ce26086b01 * misc/ruby-mode.el (ruby-mode): set ruby-mode-set-encoding to buffer
local before-save-hook.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 13:31:47 +00:00
nobu c9ca560ce8 * misc/ruby-mode.el (ruby-mode-set-encoding): automatically insert
encoding magic comment.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 12:49:01 +00:00
akr 6cdef2dc7e * $Date$ keyword removed to avoid inclusion of locale dependent
string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06 15:49:38 +00:00
matz 8110d52333 * misc/ruby-mode.el (ruby-parse-partial): handle stringified
symbols properly using ruby-forward-string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-12 04:54:00 +00:00
nobu 32865ef821 * misc/ruby-style.el (ruby-style-{case,label}-indent): adjust for
labels inside switch block.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-26 06:00:52 +00:00
matz bbe0af6be1 * parse.y (parser_yylex): dot at the head of the line denote line
continuation from previous one to support fluent interface.
  [experimental]

* misc/ruby-mode.el (ruby-calculate-indent): support fluent dot.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-25 17:06:29 +00:00
nobu ac907e669a * misc/ruby-style.el (ruby-style-label-indent): fix for function top
level labels.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-20 19:58:41 +00:00
nobu b21d410d4e * misc/ruby-style.el (ruby-style-label-indent): for yacc rules.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-17 08:02:02 +00:00
nobu da4ad54e47 * misc/ruby-style.el: new file. C/C++ style for ruby source code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-26 04:54:01 +00:00
knu 5a347e064f * misc/ruby-mode.el (ruby-block-end-re): Support for the
exprimental ';;' terminator had been dropped.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-11 09:46:46 +00:00
knu af2b2755cc * misc/README, misc/rdebug.el: Add rdebug.el, Emacs ruby-debug
interface based on rubydb3x.el; submitted by Martin Nordholts
  <enselic AT gmail.com> in [ruby-bugs:PR#9023].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-10 20:52:31 +00:00
matz 14476c3bea * misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): fix
regexp font-lock bug.  [ruby-talk:235758]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-24 09:09:51 +00:00
matz bf74ef51a2 * lib/matrix.rb (Matrix::rank): use quo method to avoid integer
division problem.  [ruby-core:09644]

* lib/matrix.rb (Matrix::rank_e): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-05 09:59:45 +00:00
matz f2e069ad2b * misc/ruby-mode.el (ruby-parse-partial): better here-doc support.
a patch from Marshall T. Vandegrift <llasram at gmail.com>.
  [ruby-core:08804]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-13 09:29:41 +00:00
matz cced56ef7c * misc/ruby-mode.el (ruby-expr-beg): support $! at the end of
expression.   [ruby-dev:27868]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-30 04:50:04 +00:00
nobu 9e12dc5ce9 * misc/ruby-mode.el (ruby-calculate-indent): arrange deep-indent
closing parenthesis at same column as the opening.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-24 16:47:20 +00:00
nobu 62c220a74a * misc/ruby-mode.el (ruby-expr-beg): deal with heredoc separately.
fixed: [ruby-list:41168]

* misc/ruby-mode.el (ruby-calculate-indent): not to deepen indent
  level for continuous line inside parentheses.
  http://nabeken.tdiary.net/20050915.html#p02


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-24 15:43:17 +00:00
matz 8db3dc39d6 * signal.c (sigexit): call rb_thread_signal_exit() instead of
rb_exit().  [ruby-dev:26347]

* eval.c (rb_thread_signal_exit): a new function to exit on main
  thread.

* eval.c (rb_thread_switch): exit status should be retrieved from
  ruby_errinfo.

* eval.c (rb_f_exit): ensure exit(0) should call
  exit(EXIT_SUCCESS).

* missing/mkdir.c: remove. [ruby-core:05177]

* hash.c (env_aset): do not treat nil as key-removing value.
  [ruby-list:40865]

* parse.y (method_call): allow aref expression ([]) to take a
  block.

* parse.y (block_dup_check): a function to check duplication of
  a block argument and an actual block.

* lib/delegate.rb (SimpleDelegator::__setobj__): need check for
  recursive delegation.  [ruby-core:04940]

* lib/cgi.rb: add underscore aliases CGI::escape_html,
  CGI::unescape_html, CGI::escape_element, CGI::unescape_element.
  [ruby-core:05058]

* misc/ruby-mode.el (ruby-expr-beg): fix looking point drift.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-12 16:56:06 +00:00
matz 549c345cef * parse.y (parser_yylex): allow ';;' to be block terminator in
place of 'end'.  [highly experimental]

* misc/ruby-mode.el (ruby-block-end-re): allow ';;' for a negative
  indent trigger.  [highly experimental]

* parse.y (parser_yylex): "respond_to?:foo" should be interpreted
  as "respond_to? :foo" at the command level.  [ruby-talk:144303]

* sprintf.c (rb_f_sprintf): raise exception on debug mode (-d),
  not verbose mode (-w/-w).  [ruby-core:05123]

* sprintf.c (rb_f_sprintf): warn always on verbose mode.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-07 08:22:42 +00:00
nobu f7ca291dd1 * misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): string
literals to be matched non-greedy.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-23 21:46:18 +00:00
matz ce3eb0b204 * eval.c (rb_attr): attribute name check added.
* numeric.c (flo_plus): small typo fix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-18 06:38:30 +00:00
nobu f870f12334 * misc/ruby-mode.el (ruby-expr-beg): returned true always.
fixed: [ruby-list:40683]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-19 14:48:35 +00:00
zsombor 5a4f8179fe add ruby-electric.el
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-06 12:20:30 +00:00
matz 70bbad3cfd * array.c: replace rb_protect_inspect() and rb_inspecting_p() by
rb_exec_recursive() in eval.c.

* eval.c (rb_exec_recursive): new function.

* array.c (rb_ary_join): use rb_exec_recursive().

* array.c (rb_ary_inspect, rb_ary_hash): ditto.

* file.c (rb_file_join): ditto.

* hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto.

* io.c (rb_io_puts): ditto.

* object.c (rb_obj_inspect): ditto

* struct.c (rb_struct_inspect): ditto.

* lib/set.rb (SortedSet::setup): a hack to shut up warning.
  [ruby-talk:132866]

* lib/time.rb (Time::strptime): add new function.  inspired by
  [ruby-talk:132815].

* lib/parsedate.rb (ParseDate::strptime): ditto.

* regparse.c: move st_*_strend() functions from st.c.  fixed some
  potential memory leaks.

* exception error messages updated.  [ruby-core:04497]

* ext/socket/socket.c (Init_socket): add bunch of Socket
  constants.  Patch from Sam Roberts <sroberts@uniserve.com>.
  [ruby-core:04409]

* array.c (rb_ary_s_create): no need for negative argc check.
  [ruby-core:04463]

* array.c (rb_ary_unshift_m): ditto.

* lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass
  of StandardError class, not Exception class.  [ruby-core:04429]

* parse.y (fcall_gen): lvar(arg) will be evaluated as
  lvar.call(arg) when lvar is a defined local variable. [new]

* object.c (rb_class_initialize): call inherited method before
  calling initializing block.

* eval.c (rb_thread_start_1): initialize newly pushed frame.

* lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE.
  fixed: [ruby-core:04444]

* eval.c (is_defined): NODE_IASGN is an assignment.

* ext/readline/readline.c (Readline.readline): use rl_outstream
  and rl_instream.  [ruby-dev:25699]

* ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check
  [ruby-dev:25675]

* misc/ruby-mode.el: [ruby-core:04415]

* lib/rdoc/generators/html_generator.rb: [ruby-core:04412]

* lib/rdoc/generators/ri_generator.rb: ditto.

* struct.c (make_struct): fixed: [ruby-core:04402]

* ext/curses/curses.c (window_color_set): [ruby-core:04393]

* ext/socket/socket.c (Init_socket): SO_REUSEPORT added.
  [ruby-talk:130092]

* object.c: [ruby-doc:818]

* parse.y (open_args): fix too verbose warnings for the space
  before argument parentheses.  [ruby-dev:25492]

* parse.y (parser_yylex): ditto.

* parse.y (parser_yylex): the first expression in the parentheses
  should not be a command.  [ruby-dev:25492]

* lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330]

* object.c (Init_Object): remove Object#type.  [ruby-core:04335]

* st.c (st_foreach): report success/failure by return value.
  [ruby-Bugs-1396]

* parse.y: forgot to initialize parser struct.  [ruby-dev:25492]

* parse.y (parser_yylex): no tLABEL on EXPR_BEG.
  [ruby-talk:127711]

* document updates - [ruby-core:04296], [ruby-core:04301],
  [ruby-core:04302], [ruby-core:04307]

* dir.c (rb_push_glob): should work for NUL delimited patterns.

* dir.c (rb_glob2): should aware of offset in the pattern.

* string.c (rb_str_new4): should propagate taintedness.

* env.h: rename member names in struct FRAME; last_func -> callee,
  orig_func -> this_func, last_class -> this_class.

* struct.c (rb_struct_set): use original method name, not callee
  name, to retrieve member slot.  [ruby-core:04268]

* time.c (time_strftime): protect from format modification from GC
  finalizers.

* object.c (Init_Object): remove rb_obj_id_obsolete()

* eval.c (rb_mod_define_method): incomplete subclass check.
  [ruby-dev:25464]

* gc.c (rb_data_object_alloc): klass may be NULL.
  [ruby-list:40498]

* bignum.c (rb_big_rand): should return positive random number.
  [ruby-dev:25401]

* bignum.c (rb_big_rand): do not use rb_big_modulo to generate
  random bignums.  [ruby-dev:25396]

* variable.c (rb_autoload): [ruby-dev:25373]

* eval.c (svalue_to_avalue): [ruby-dev:25366]

* string.c (rb_str_justify): [ruby-dev:25367]

* io.c (rb_f_select): [ruby-dev:25312]

* ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072]

* struct.c (make_struct): [ruby-dev:25249]

* dir.c (dir_open_dir): new function.  [ruby-dev:25242]

* io.c (rb_f_open): add type check for return value from to_open.

* lib/pstore.rb (PStore#transaction): Use the empty content when a
  file is not found.  [ruby-dev:24561]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04 06:47:45 +00:00
matz f50136a311 * file.c (rb_file_chown): integer conversion should be prior to
GetOpenFile().  [ruby-dev:24947]

* file.c (rb_file_truncate): ditto.

* file.c (rb_file_s_truncate): ditto.

* dir.c (dir_seek): use NUM2OFFT().

* misc/ruby-mode.el (ruby-non-block-do-re): [ruby-core:03719]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-22 15:26:02 +00:00
nobu e77fc75802 * misc/ruby-mode.el (ruby-special-char-p, ruby-parse-partial): handle
operator symbols.  [ruby-talk:120177]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-15 02:51:10 +00:00