From: Matt Armstrong Date: 2001-12-20T07:44:04+09:00 Subject: [ruby-talk:29028] Re: Bug fix for ruby-mode.el kamphausen@novelscience.com (SKa) writes: > I was just working on adding a function (ruby-current-defun) to the > ruby-mode.el which should enable the add-change-log-entry function > to detect ruby class- and function names correctly. First I added > this to add-log.el but the people on the xemacs patches mailing list > told to put it into ruby-mode.el. That'd be great. I miss beginning-of-function and end-of-function too. > So I downloaded the current version (1.37) and found that the new > lines that seem to be working on the problem in this thread cause > some errors. When you simply hit ENTER at the beginning of a file > with a shebang and maybe some comments above you always get an > beginning-of-buffer error which comes from the lines > > (save-excursion > (forward-char -1) > (not (looking-at "\\?"))) > (skip-chars-backward " \t") > > in ruby-calculate-indent. > A fast fix that I typed was: > > (if (not (= (point) (point-min))) > (save-excursion > (forward-char -1) > (not (looking-at "\\?")))) > (skip-chars-backward " \t") > > but I'm not sure if that's OK. If this is a bug, you can file it by mailing to ruby-bugs@ruby-lang.org. See also . > Furthermore I'd like to ask you how I should give out my fixes to > ruby-mode.el, since I've been working on ruby support in (X)Emacs a > bit (func-menu, skeletons, auto-insert) For the most part, Matz is the maintainer of ruby-mode.el, so he will probably have an answer for you. -- matt