[#18987] WinCE patch — "uema2@..." <mail@...2.cjb.net>
植松と申します。
なかだです。
[#18989] caller(0) from toplevel — "NAKAMURA, Hiroshi" <nahi@...>
なひです。
[#19002] Why to_ary is defined in URI? — Tanaka Akira <akr@...17n.org>
ふと気がついたのですが、URI を puts すると、
まつもと ゆきひろです
In article <1039071939.726071.943.nullmailer@picachu.netlab.jp>,
[#19009] ipaddr.rb — "Akinori MUSHA" <knu@...>
ipaddr.rb というライブラリを rough に入れました。IP アドレスを
[#19010] Rational#zero? causes SystemStackError — "NAKAMURA, Hiroshi" <nakahiro@...>
なひです。
まつもと ゆきひろです
[#19011] open-uri - very easy net access library — Tanaka Akira <akr@...17n.org>
HTTP, FTP に簡単にアクセスするための open-uri というライブラリを作って
西山和広です。
なひです。
In article <032b01c2a0fb$2f9981a0$96222fc0@godiva>,
[#19030] NT -> _WIN32 patch — "uema2@..." <mail@...2.cjb.net>
植松です。
[#19066] ruby 1.6.9 preview4 予告 — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
なひです。自明ですけど一応。。。
At Fri, 13 Dec 2002 15:28:47 +0900,
In article <86adj6fmj1.wl@archon.local.idaemons.org>,
うえのです。
まつもと ゆきひろです
うえのです。
At Tue, 17 Dec 2002 23:09:36 +0900,
なひです。
[#19072] ruby 1.6.8 bug? on freebsd 4.7 stable — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
[#19083] Re: [ruby-cvs] ruby: * file.c (utimbuf): need to define for VC++. — WATANABE Hirofumi <eban@...>
わたなべです。
こんにちは、なかむら(う)です。
わたなべです。
こんにちは、なかむら(う)です。
こんにちは、なかむら(う)です。
わたなべです。
[#19104] lib/mkmf.rb; Shellwords.shellwords — WATANABE Hirofumi <eban@...>
わたなべです。
[#19116] allocator (Re: core dump by removing String.allocate (PR#369)) — nobu.nakada@...
なかだです。
まつもと ゆきひろです
[#19127] Re: 1.6.8-preview4 build failed (on Vine Linux 2.1.5) (PR#373) — nobu.nakada@...
なかだです。
わたなべです。
なかだです。
なかだです。
わたなべです。
[#19147] Ruby 1.7 での Object#to_a — ABE Shigeru <shiger-a@...>
みなさん、こんにちは。阿部といいます。
[#19163] [PATCH] ruby-{forward,backward}-sexp — nobu.nakada@...
なかだです。
[#19169] version.h — WATANABE Hirofumi <eban@...>
わたなべです。
[#19181] regular expression: begin position anchor — "K.Kosako" <kosako@...>
正規表現のテストスクリプトを作成していて、
[#19186] Process::times による SEGV? — ABE Shigeru <shiger-a@...>
こんにちは。阿部です。
[#19196] replace 1.7 with 1.8 in macros under wince/ — Ryo HAYASAKA <ryoh@...>
早坂@北陸先端といいます.
植松です。
植松です。
[#19198] ruby-1.8.0 / yield(nil)とyield()のちがい — m_seki@...
なかだです。
まつもと ゆきひろです
まつもと ゆきひろです
まつもと ゆきひろです
In article <1041383157.631472.21307.nullmailer@picachu.netlab.jp>,
まつもと ゆきひろです
In article <1041394108.920587.21729.nullmailer@picachu.netlab.jp>,
まつもと ゆきひろです
In article <1041420724.492653.22355.nullmailer@picachu.netlab.jp>,
咳といいます。
In article <537C480E-1D9A-11D7-A418-000393814512@mva.biglobe.ne.jp>,
咳といいます。
まつもと ゆきひろです
In article <1041521460.248415.5532.nullmailer@picachu.netlab.jp>,
まつもと ゆきひろです
In article <1041554769.892566.13140.nullmailer@picachu.netlab.jp>,
[#19200] replace-resolv.rb 使用で内部ループ — Teruki Shigitani <shigitani@...>
鴫谷と申します。
[#19221] Re: [ruby-cvs] ruby: * instruby.rb: use getopts.rb. — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
わたなべです。
[#19233] Re: [1.8] speed — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
なかだです。
まつもと ゆきひろです
なかだです。
まつもと ゆきひろです
うえのです。
[#19239] CRLF (here document) — Daisuke Aoki <dai@...>
青木@横浜です。
青木@横浜です。
わたなべです。
なかだです。
[#19258] Re: [ruby-cvs] ruby: * node.h (struct RNode): Change argc from int to long. Otherwize — "Akinori MUSHA" <knu@...>
At Tue, 31 Dec 2002 19:24:29 +0000,
[ruby-dev:19163] [PATCH] ruby-{forward,backward}-sexp
なかだです。
ruby-modeにforward-sexpとbackward-sexpを追加してみました。一応
Emacs 21.1.1とXEmacs 21.4.6で動くことは確認しましたが、なんだか
結構動作が違う感じ。
Index: ruby-mode.el
===================================================================
RCS file: /cvs/ruby/src/ruby/misc/ruby-mode.el,v
retrieving revision 1.61
diff -u -2 -p -r1.61 ruby-mode.el
--- ruby-mode.el 20 Dec 2002 22:27:30 -0000 1.61
+++ ruby-mode.el 22 Dec 2002 00:10:39 -0000
@@ -80,6 +80,6 @@
(define-key ruby-mode-map "\e\C-a" 'ruby-beginning-of-defun)
(define-key ruby-mode-map "\e\C-e" 'ruby-end-of-defun)
- (define-key ruby-mode-map "\e\C-b" 'ruby-beginning-of-block)
- (define-key ruby-mode-map "\e\C-f" 'ruby-end-of-block)
+ (define-key ruby-mode-map "\e\C-b" 'ruby-backward-sexp)
+ (define-key ruby-mode-map "\e\C-f" 'ruby-forward-sexp)
(define-key ruby-mode-map "\e\C-p" 'ruby-beginning-of-block)
(define-key ruby-mode-map "\e\C-n" 'ruby-end-of-block)
@@ -133,5 +133,5 @@ Also ignores spaces after parenthesis wh
(eval-when-compile (require 'cl))
(defun ruby-imenu-create-index-in-block (prefix beg end)
- (let ((index-alist '()) (nest '()) (case-fold-search nil)
+ (let ((index-alist '()) (case-fold-search nil)
name next pos decl sing)
(goto-char beg)
@@ -307,5 +307,5 @@ The variable ruby-indent-level controls
(cond ((zerop n))
(no-error nil)
- (error "unterminated string"))))
+ ((error "unterminated string")))))
(defun ruby-parse-partial (&optional end in-string nest depth pcol indent)
@@ -531,6 +531,5 @@ The variable ruby-indent-level controls
(goto-char (cdr (nth 1 state)))
(if (and (eq (car (nth 1 state)) ?\( ) ruby-deep-arglist)
- (let ((column (current-column))
- (s (ruby-parse-region (point) indent-point)))
+ (let ((s (ruby-parse-region (point) indent-point)))
(cond
((and (nth 2 s) (> (nth 2 s) 0))
@@ -648,5 +647,15 @@ The variable ruby-indent-level controls
(ruby-indent-line t))
-(defun ruby-beginning-of-defun (&optional arg)
+(eval-when-compile
+ (defmacro defun-region-command (func args &rest body)
+ (let ((intr (car body)))
+ (when (featurep 'xemacs)
+ (if (stringp intr) (setq intr (cadr body)))
+ (and (eq (car intr) 'interactive)
+ (setq intr (cdr intr))
+ (setcar intr (concat "_" (car intr)))))
+ (cons 'defun (cons func (cons args body))))))
+
+(defun-region-command ruby-beginning-of-defun (&optional arg)
"Move backward to next beginning-of-defun.
With argument, do this that many times.
@@ -664,5 +673,5 @@ Returns t unless search stops due to end
t)))
-(defun ruby-end-of-defun (&optional arg)
+(defun-region-command ruby-end-of-defun (&optional arg)
"Move forward to next end of defun.
An end of a defun is found by moving forward from the beginning of one."
@@ -702,13 +711,76 @@ An end of a defun is found by moving for
(back-to-indentation))
-(defun ruby-beginning-of-block ()
+(defun-region-command ruby-beginning-of-block (&optional arg)
"Move backward to next beginning-of-block"
- (interactive)
- (ruby-move-to-block -1))
+ (interactive "p")
+ (ruby-move-to-block (- (or arg 1))))
-(defun ruby-end-of-block ()
+(defun-region-command ruby-end-of-block (&optional arg)
"Move forward to next beginning-of-block"
- (interactive)
- (ruby-move-to-block 1))
+ (interactive "p")
+ (ruby-move-to-block (or arg 1)))
+
+(defun-region-command ruby-forward-sexp (&optional cnt)
+ (interactive "p")
+ (if (< cnt 0)
+ (ruby-backward-sexp (- cnt))
+ (dotimes (i cnt)
+ (skip-chars-forward " \n,.:;|&^~=!?\\+\\-\\*")
+ (cond ((looking-at "\\s(")
+ (goto-char (scan-sexps (point) 1)))
+ ((looking-at ruby-block-beg-re)
+ (ruby-end-of-block)
+ (forward-word 1))
+ ((looking-at "\\(\\$\\|@@?\\)?\\sw")
+ (while (progn
+ (while (progn (forward-word 1) (looking-at "_")))
+ (cond ((looking-at "::") (forward-char 2) t)
+ ((> (skip-chars-forward ".") 0))
+ ((looking-at "\\?\\|!\\(=[~=>]\\|[^~=]\\)")
+ (forward-char 1) nil)))))
+ ((let (state expr)
+ (while
+ (progn
+ (setq expr (or expr (ruby-expr-beg)
+ (looking-at "%\\sw?\\Sw\\|[\"'`/]")))
+ (nth 1 (setq state (apply 'ruby-parse-partial nil state))))
+ (setq expr t)
+ (skip-chars-forward "<"))
+ (not expr)))))))
+
+(defun-region-command ruby-backward-sexp (&optional cnt)
+ (interactive "p")
+ (dotimes (i (or cnt 1))
+ (skip-chars-backward " \n,.:;|&^~=!?\\+\\-\\*")
+ (forward-char -1)
+ (cond ((looking-at "\\s)")
+ (goto-char (scan-sexps (1+ (point)) -1))
+ (case (char-before)
+ (?% (forward-char -1))
+ ('(?q ?Q ?w ?W ?r ?x)
+ (if (eq (char-before (1- (point))) ?%) (forward-char -2))))
+ nil)
+ ((looking-at "\\s\"\\|\\\\\\S_")
+ (let ((c (char-to-string (char-before (match-end 0)))))
+ (while (and (search-backward c)
+ (oddp (skip-chars-backward "\\")))))
+ nil)
+ ((looking-at "\\s.\\|\\s\\"))
+ ((looking-at "\\s(") nil)
+ (t
+ (forward-char 1)
+ (while (progn (forward-word -1)
+ (case (char-before)
+ (?_ t)
+ (?. (forward-char -1) t)
+ ((?$ ?@)
+ (forward-char -1)
+ (and (eq (char-before) (char-after)) (forward-char -1)))
+ (?:
+ (forward-char -1)
+ (eq (char-before) :)))))
+ (if (looking-at ruby-block-end-re)
+ (ruby-beginning-of-block))
+ nil))))
(defun ruby-reindent-then-newline-and-indent ()
--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦