* Ruby mode added
@ 2008-12-10 19:08 Chong Yidong
2008-12-10 19:24 ` Dan Nicolaescu
` (4 more replies)
0 siblings, 5 replies; 12+ messages in thread
From: Chong Yidong @ 2008-12-10 19:08 UTC (permalink / raw)
To: emacs-devel; +Cc: Phil Hagelberg
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
warnings.
- Removed the defun-region-command macro. Is there a better way for
this file to remain XEmacs-compatible without this hack?
(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))))))
- 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?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ruby mode added
2008-12-10 19:08 Ruby mode added Chong Yidong
@ 2008-12-10 19:24 ` Dan Nicolaescu
2008-12-10 19:45 ` Will Farrington
` (2 more replies)
2008-12-10 21:16 ` Paul R
` (3 subsequent siblings)
4 siblings, 3 replies; 12+ messages in thread
From: Dan Nicolaescu @ 2008-12-10 19:24 UTC (permalink / raw)
To: Chong Yidong; +Cc: Phil Hagelberg, emacs-devel
Chong Yidong <cyd@stupidchicken.com> writes:
> Does anyone see any problem?
Not exactly a problem, but isn't the preferred style for the
auto-mode-alist regexp to use \\' instead of $ ?
What's the latest on the policy for adding stuff to auto-mode-alist and
interpreter-mode-alist? Should it go in files.el or be autoloaded?
Not ruby related, but given we are talking about auto-mode-alist:
shouldn't nxml be added to it somehow?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ruby mode added
2008-12-10 19:24 ` Dan Nicolaescu
@ 2008-12-10 19:45 ` Will Farrington
2008-12-11 2:06 ` Chong Yidong
2008-12-11 2:16 ` Stefan Monnier
2 siblings, 0 replies; 12+ messages in thread
From: Will Farrington @ 2008-12-10 19:45 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: emacs-devel@gnu.org
I'm unsure of the policy but whatever it is it should be consistent.
On Dec 10, 2008, at 2:24 PM, Dan Nicolaescu <dann@ics.uci.edu> wrote:
> Chong Yidong <cyd@stupidchicken.com> writes:
>
>> Does anyone see any problem?
>
> Not exactly a problem, but isn't the preferred style for the
> auto-mode-alist regexp to use \\' instead of $ ?
>
> What's the latest on the policy for adding stuff to auto-mode-alist
> and
> interpreter-mode-alist? Should it go in files.el or be autoloaded?
>
> Not ruby related, but given we are talking about auto-mode-alist:
> shouldn't nxml be added to it somehow?
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ruby mode added
2008-12-10 19:24 ` Dan Nicolaescu
2008-12-10 19:45 ` Will Farrington
@ 2008-12-11 2:06 ` Chong Yidong
2008-12-11 7:09 ` Dan Nicolaescu
2008-12-11 2:16 ` Stefan Monnier
2 siblings, 1 reply; 12+ messages in thread
From: Chong Yidong @ 2008-12-11 2:06 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: Phil Hagelberg, emacs-devel
Dan Nicolaescu <dann@ics.uci.edu> writes:
> Not exactly a problem, but isn't the preferred style for the
> auto-mode-alist regexp to use \\' instead of $ ?
Yes, fixed.
> What's the latest on the policy for adding stuff to auto-mode-alist and
> interpreter-mode-alist? Should it go in files.el or be autoloaded?
I have not thought about this issue. Currently, both methods are in
use, but this is not enough of a problem to warrant attention. Frankly,
there are many more urgent things to work on.
> Not ruby related, but given we are talking about auto-mode-alist:
> shouldn't nxml be added to it somehow?
We already have an xml-mode, which is more lightweight. It may be that
nxml-mode is so much better that we should simply make it the default,
but I'd prefer to leave this decision till after the release.
(One reason not to make nxml-mode the default is that it is apparently
unmaintained.)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ruby mode added
2008-12-10 19:24 ` Dan Nicolaescu
2008-12-10 19:45 ` Will Farrington
2008-12-11 2:06 ` Chong Yidong
@ 2008-12-11 2:16 ` Stefan Monnier
2 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2008-12-11 2:16 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: Chong Yidong, Phil Hagelberg, emacs-devel
> Not exactly a problem, but isn't the preferred style for the
> auto-mode-alist regexp to use \\' instead of $ ?
It's not a question of style: $ is usually incorrect, tho it will
usually work just fine in 99.99999% of the cases (very few files have
\n embedded in their name).
> What's the latest on the policy for adding stuff to auto-mode-alist and
> interpreter-mode-alist? Should it go in files.el or be autoloaded?
I'm favorable to adding it via autoload as long as its order on the
auto-mode-alist is not important.
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ruby mode added
2008-12-10 19:08 Ruby mode added Chong Yidong
2008-12-10 19:24 ` Dan Nicolaescu
@ 2008-12-10 21:16 ` Paul R
2008-12-11 2:15 ` Stefan Monnier
` (2 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: Paul R @ 2008-12-10 21:16 UTC (permalink / raw)
To: Chong Yidong; +Cc: Phil Hagelberg, emacs-devel
Hi folks,
Chong> Does anyone see any problem?
No problem at all, on the contrary I'm glad to see it bundled with
GnuEmacs and I hope that will speed up improvements and polishing of
this good mode. Thank to all who contributed to that.
--
Paul
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ruby mode added
2008-12-10 19:08 Ruby mode added Chong Yidong
2008-12-10 19:24 ` Dan Nicolaescu
2008-12-10 21:16 ` Paul R
@ 2008-12-11 2:15 ` Stefan Monnier
2008-12-12 4:10 ` Chong Yidong
2008-12-12 19:07 ` Dan Nicolaescu
2008-12-16 17:14 ` Phil Hagelberg
4 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2008-12-11 2:15 UTC (permalink / raw)
To: Chong Yidong; +Cc: Phil Hagelberg, emacs-devel
> - Removed the defun-region-command macro. Is there a better way for
> this file to remain XEmacs-compatible without this hack?
> (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))))))
As mentioned earlier, an easy way is to rename it to
`ruby-defun-region-command'.
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ruby mode added
2008-12-10 19:08 Ruby mode added Chong Yidong
` (2 preceding siblings ...)
2008-12-11 2:15 ` Stefan Monnier
@ 2008-12-12 19:07 ` Dan Nicolaescu
2008-12-16 17:14 ` Phil Hagelberg
4 siblings, 0 replies; 12+ messages in thread
From: Dan Nicolaescu @ 2008-12-12 19:07 UTC (permalink / raw)
To: Chong Yidong; +Cc: Phil Hagelberg, emacs-devel
Chong Yidong <cyd@stupidchicken.com> writes:
> Does anyone see any problem?
This:
;;;###autoload
(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode))
(add-to-list 'interpreter-mode-alist '("rbx" . ruby-mode))
(add-to-list 'interpreter-mode-alist '("jruby" . ruby-mode))
(add-to-list 'interpreter-mode-alist '("ruby1.9" . ruby-mode))
(add-to-list 'interpreter-mode-alist '("ruby1.8" . ruby-mode))
autoloads a single item, not all of them.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ruby mode added
2008-12-10 19:08 Ruby mode added Chong Yidong
` (3 preceding siblings ...)
2008-12-12 19:07 ` Dan Nicolaescu
@ 2008-12-16 17:14 ` Phil Hagelberg
4 siblings, 0 replies; 12+ messages in thread
From: Phil Hagelberg @ 2008-12-16 17:14 UTC (permalink / raw)
To: Chong Yidong; +Cc: emacs-devel
Chong Yidong <cyd@stupidchicken.com> writes:
> - 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?
Sorry for the late reply. I'm pretty sure this is correct.
I will notify ruby-core so they know that the code has been added to
Emacs' repository.
-Phil
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-12-16 17:14 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-10 19:08 Ruby mode added Chong Yidong
2008-12-10 19:24 ` Dan Nicolaescu
2008-12-10 19:45 ` Will Farrington
2008-12-11 2:06 ` Chong Yidong
2008-12-11 7:09 ` Dan Nicolaescu
2008-12-11 2:16 ` Stefan Monnier
2008-12-10 21:16 ` Paul R
2008-12-11 2:15 ` Stefan Monnier
2008-12-12 4:10 ` Chong Yidong
2008-12-12 18:44 ` Stefan Monnier
2008-12-12 19:07 ` Dan Nicolaescu
2008-12-16 17:14 ` Phil Hagelberg
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.