Function: ruby--insert-coding-comment
ruby--insert-coding-comment is a byte-compiled function defined in
ruby-mode.el.gz.
Signature
(ruby--insert-coding-comment ENCODING)
Documentation
Insert a magic coding comment for ENCODING.
The style of the comment is controlled by ruby-encoding-magic-comment-style.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/ruby-mode.el.gz
(defun ruby--insert-coding-comment (encoding)
"Insert a magic coding comment for ENCODING.
The style of the comment is controlled by `ruby-encoding-magic-comment-style'."
(let ((encoding-magic-comment-template
(pcase ruby-encoding-magic-comment-style
('ruby "# coding: %s")
('emacs "# -*- coding: %s -*-")
('custom
ruby-custom-encoding-magic-comment-template))))
(insert
(format encoding-magic-comment-template encoding)
"\n")))