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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user