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) ((html) 'html)
(else #f))) (else #f)))
(let ((type (or (guess-type-by-file-extension *file*) (let ((type (or (guess-type-by-emacs-major-mode-variable *file-contents*)
(guess-type-by-emacs-major-mode-variable *file-contents*)))) (guess-type-by-file-extension *file*))))
(if (not type) (if (not type)
(begin (display *file-contents*) (exit 0)) (begin (display *file-contents*) (exit 0))
(begin (begin

Loading…
Cancel
Save