mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-27 07:41:28 -08:00
(set-auto-coding): Recognize coding: in first
line even if not the first variable.
This commit is contained in:
parent
d062cf3305
commit
35ce8cd793
1 changed files with 3 additions and 3 deletions
|
|
@ -645,10 +645,10 @@ function by default."
|
|||
(or limit
|
||||
(setq limit len)))
|
||||
(setq limit len))
|
||||
(when (and (string-match "-\\*-[ \t]*coding:[ \t]*\\([^ ;]+\\)" string)
|
||||
(< (match-beginning 1) limit))
|
||||
(when (and (string-match "-\\*-\\(.*;\\)?[ \t]*coding:[ \t]*\\([^ ;]+\\)" string)
|
||||
(< (match-beginning 2) limit))
|
||||
(setq coding-system
|
||||
(intern (substring string (match-beginning 1) (match-end 1))))
|
||||
(intern (substring string (match-beginning 2) (match-end 2))))
|
||||
(if (not (coding-system-p coding-system))
|
||||
(setq coding-system nil)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue