* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
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
* 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
* 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
(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
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
`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
* 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
* 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
(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
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
`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
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
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
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
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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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