[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ruby mode added

From: Chong Yidong
Subject: Ruby mode added
Date: Wed, 10 Dec 2008 14:08:59 -0500

Richard has okayed adding Ruby-mode to CVS, and I've done so.  I made a
few changes with respect to Phil Hagelberg's version at github:

- Moved definition of ruby-mode to the end of the file to avoid compiler

- Removed the defun-region-command macro.  Is there a better way for
  this file to remain XEmacs-compatible without this hack?

  (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))))))

- There seemed to be a reference to an unbound variable, `indent-point',
  in ruby-parse-partial.  I assumed this was an attempt to use dynamic
  scope to access the let-bound variable `indent-point' in
  ruby-calculate-indent; therefore I renamed indent-point as
  ruby-indent-point and added a `boundp' check.  Phil, could you check
  if this is the intention of the code?

I have also updated NEWS and the Emacs manual.

Does anyone see any problem?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]