[Top][All Lists]

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

Re: ruby-mode : ruby-mode-set-encoding

From: Stefan Monnier
Subject: Re: ruby-mode : ruby-mode-set-encoding
Date: Tue, 03 Mar 2009 11:30:51 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux)

>> (defun ruby-mode-set-encoding ()
>> "Insert a magic comment header with the proper encoding if necessary."
>> ...
>> and AFAIK only ruby mode use this type of thing. It is added to saving
>> functions hooks :
>> (add-hook
>> (cond ((boundp 'before-save-hook)
>> (make-local-variable 'before-save-hook)
>> 'before-save-hook)
>> ((boundp 'write-contents-functions) 'write-contents-functions)
>> ((boundp 'write-contents-hooks) 'write-contents-hooks))
>> 'ruby-mode-set-encoding)

> I agree. I think this is just too intrusive. Fortunately, I don't use ruby.

I don't know if it's too intrusive, but it seems unrelated to Ruby.
Nobuyoshi Nakada, looking at the history of ruby-mode.el at
http://svn.ruby-lang.org/repos/ruby/trunk/misc, it appears the change is
due to you, could you explain what this is intended to do?
If it's not specific to Ruby, then maybe it should be moved elsewhere.


reply via email to

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