Try to guess language by emacs major mode before file extension.

The explicit language specified in an emacs file local variable is
going to be more correct than the file extension.
master
Thomas Hintz 9 years ago
parent a7d55eea1d
commit 647519fd48

@ -65,8 +65,8 @@
((html) 'html)
(else #f)))
(let ((type (or (guess-type-by-file-extension *file*)
(guess-type-by-emacs-major-mode-variable *file-contents*))))
(let ((type (or (guess-type-by-emacs-major-mode-variable *file-contents*)
(guess-type-by-file-extension *file*))))
(if (not type)
(begin (display *file-contents*) (exit 0))
(begin

Loading…
Cancel
Save