aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/ruby-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r--lisp/progmodes/ruby-mode.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 5da5577c108..e16225c7fa9 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -801,7 +801,7 @@ The style of the comment is controlled by `ruby-encoding-magic-comment-style'."
801 (let ((coding-system (ruby--detect-encoding))) 801 (let ((coding-system (ruby--detect-encoding)))
802 (when coding-system 802 (when coding-system
803 (if (looking-at "^#!") (beginning-of-line 2)) 803 (if (looking-at "^#!") (beginning-of-line 2))
804 (cond ((looking-at "\\s *#\\s *.*\\(en\\)?coding\\s *:\\s *\\([-a-z0-9_]*\\)") 804 (cond ((looking-at "\\s *#.*\\(en\\)?coding\\s *:\\s *\\([-a-z0-9_]*\\)")
805 ;; update existing encoding comment if necessary 805 ;; update existing encoding comment if necessary
806 (unless (string= (match-string 2) coding-system) 806 (unless (string= (match-string 2) coding-system)
807 (goto-char (match-beginning 2)) 807 (goto-char (match-beginning 2))