From ce26086b012328e6352059e1a962082b0f6dec04 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 27 Jan 2008 13:31:47 +0000 Subject: [PATCH] * misc/ruby-mode.el (ruby-mode): set ruby-mode-set-encoding to buffer local before-save-hook. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 ++++- misc/ruby-mode.el | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 633b82acce..07bbb348ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,11 @@ -Sun Jan 27 21:48:59 2008 Nobuyoshi Nakada +Sun Jan 27 22:31:45 2008 Nobuyoshi Nakada * misc/ruby-mode.el (ruby-mode-set-encoding): automatically insert encoding magic comment. + * misc/ruby-mode.el (ruby-mode): set ruby-mode-set-encoding to buffer + local before-save-hook. + Sun Jan 27 19:51:15 2008 Tanaka Akira * string.c (rb_str_inspect): avoid exception by diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 92287e9683..20a81f26e1 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -272,6 +272,7 @@ The variable ruby-indent-level controls the amount of indentation. (make-local-variable 'add-log-current-defun-function) (setq add-log-current-defun-function 'ruby-add-log-current-method) + (make-local-variable 'before-save-hook) (add-hook 'before-save-hook 'ruby-mode-set-encoding) (run-hooks 'ruby-mode-hook))