Used magic-fallback-mode-alist to detect .doc files (Bug#20891)
This avoids running doc-view-mode on files that are actually text files. * lisp/files.el (auto-mode-alist): Don't use doc-view-mode-maybe for .doc (but continue to do so for .docx). (magic-fallback-mode-alist): Add signature for .doc files.
This commit is contained in:
parent
48169f7c65
commit
904146cf79
1 changed files with 2 additions and 1 deletions
|
@ -2798,7 +2798,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|CBR\\|7Z\\)\\'" . archive-mo
|
|||
("\\.\\(diffs?\\|patch\\|rej\\)\\'" . diff-mode)
|
||||
("\\.\\(dif\\|pat\\)\\'" . diff-mode) ; for MS-DOS
|
||||
("\\.[eE]?[pP][sS]\\'" . ps-mode)
|
||||
("\\.\\(?:PDF\\|DVI\\|OD[FGPST]\\|DOCX?\\|XLSX?\\|PPTX?\\|pdf\\|djvu\\|dvi\\|od[fgpst]\\|docx?\\|xlsx?\\|pptx?\\)\\'" . doc-view-mode-maybe)
|
||||
("\\.\\(?:PDF\\|DVI\\|OD[FGPST]\\|DOCX\\|XLSX?\\|PPTX?\\|pdf\\|djvu\\|dvi\\|od[fgpst]\\|docx\\|xlsx?\\|pptx?\\)\\'" . doc-view-mode-maybe)
|
||||
("configure\\.\\(ac\\|in\\)\\'" . autoconf-mode)
|
||||
("\\.s\\(v\\|iv\\|ieve\\)\\'" . sieve-mode)
|
||||
("BROWSE\\'" . ebrowse-tree-mode)
|
||||
|
@ -3062,6 +3062,7 @@ If FUNCTION is nil, then it is not called. (That is a way of saying
|
|||
(comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\r\n]*<\\)")))
|
||||
(concat "[ \t\r\n]*<" comment-re "*!DOCTYPE "))
|
||||
. sgml-mode)
|
||||
("\320\317\021\340\241\261\032\341" . doc-view-mode-maybe) ; Word documents 1997-2004
|
||||
("%!PS" . ps-mode)
|
||||
("# xmcd " . conf-unix-mode)))
|
||||
"Like `magic-mode-alist' but has lower priority than `auto-mode-alist'.
|
||||
|
|
Loading…
Add table
Reference in a new issue