From: Koji Arai Date: 1999-07-02T01:09:01+09:00 Subject: [ruby-dev:7271] Re: [PATCH] rubydb3x.el, ruby-mode.el 新井です。 > 中田です。 > XEmacs 20.4 で rubydb3x.el が gud.el の中でエラーになるので、とりあえ > ずパッチです。gud のバージョンは 1.3 です。他のバージョンでどうなるかは > 確認してませんので、このままではマズい可能性大(^^;;。 GNU Emacs 20.3 において、rubydb3x.el で Symbol's function definition is void: gud-overload-functions というエラーが出ます。添付のパッチはこの関数の存在 チェックで逃げてみました。 ARGV[0] がスクリプト名になる不具合もあって、 |Run rubydb (like this): ruby hoge.rb | |Current directory is /tmp/ |(rdb:-) p ARGV |["hoge.rb"] |(rdb:-) これは元に戻すことで対処しました。XEmacsでは都合が 悪いんですよね?どうしましょう? gud や comintについてよく調べもせずに修正していま す。 以下は、Emacs 20.3での gud-common-init 関数のイン タフェースです。ご参考まで。 ;; Perform initializations common to all debuggers. ;; The first arg is the specified command line, ;; which starts with the program to debug. ;; The other three args specify the values to use ;; for local variables in the debugger buffer. (defun gud-common-init (command-line massage-args marker-filter find-file) 以下、パッチです。 --- misc/rubydb3x.el.org Thu Jul 1 23:24:59 1999 +++ misc/rubydb3x.el Fri Jul 2 00:02:04 1999 @@ -8,7 +8,7 @@ (defvar gud-rubydb-history nil) (defun gud-rubydb-massage-args (file args) - (cons "-r" (cons "debug" (cons file args)))) + (cons "-r" (cons "debug" args))) ;; There's no guarantee that Emacs will hand the filter the entire ;; marker at once; it could be broken up across several strings. We @@ -85,10 +85,13 @@ nil nil '(gud-rubydb-history . 1)))) - (gud-overload-functions '((gud-massage-args . gud-rubydb-massage-args) - (gud-marker-filter . gud-rubydb-marker-filter) - (gud-find-file . gud-rubydb-find-file))) - (gud-common-init command-line rubydb-command-name) + (if (not (fboundp 'gud-overload-functions)) + (gud-common-init command-line 'gud-rubydb-massage-args + 'gud-rubydb-marker-filter 'gud-rubydb-find-file) + (gud-overload-functions '((gud-massage-args . gud-rubydb-massage-args) + (gud-marker-filter . gud-rubydb-marker-filter) + (gud-find-file . gud-rubydb-find-file))) + (gud-common-init command-line rubydb-command-name)) (gud-def gud-break "b %l" "\C-b" "Set breakpoint at current line.") ; (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line")