From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.devel Subject: Re: ruby-mode : ruby-mode-set-encoding Date: Tue, 03 Mar 2009 13:55:53 +0000 Organization: University of Cambridge Message-ID: References: <87tz6ak9bq.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1236088722 11330 80.91.229.12 (3 Mar 2009 13:58:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Mar 2009 13:58:42 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 03 14:59:58 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LeVA2-0006yF-Gj for ged-emacs-devel@m.gmane.org; Tue, 03 Mar 2009 14:59:54 +0100 Original-Received: from localhost ([127.0.0.1]:49943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeV8h-0000Ja-Ee for ged-emacs-devel@m.gmane.org; Tue, 03 Mar 2009 08:58:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LeV6M-00088v-Kh for emacs-devel@gnu.org; Tue, 03 Mar 2009 08:56:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LeV6K-00088G-W6 for emacs-devel@gnu.org; Tue, 03 Mar 2009 08:56:06 -0500 Original-Received: from [199.232.76.173] (port=37863 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeV6K-00088B-Nl for emacs-devel@gnu.org; Tue, 03 Mar 2009 08:56:04 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:47823 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LeV6K-0001Wf-8D for emacs-devel@gnu.org; Tue, 03 Mar 2009 08:56:04 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LeV6I-0003mu-1X for emacs-devel@gnu.org; Tue, 03 Mar 2009 13:56:02 +0000 Original-Received: from smaug.linux.pwf.cam.ac.uk ([193.60.95.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Mar 2009 13:56:02 +0000 Original-Received: from sdl.web by smaug.linux.pwf.cam.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Mar 2009 13:56:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: smaug.linux.pwf.cam.ac.uk User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:TiN+pFSaMc74bQNNX8nOGqYTYyE= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109407 Archived-At: On 2009-03-03 13:46 +0000, Paul R wrote: > (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. -- .: Leo :. [ sdl.web AT gmail.com ] .: I use Emacs :.