[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 904146c: Used magic-fallback-mode-alist to detect .doc files (Bug
From: |
Robert Pluim |
Subject: |
master 904146c: Used magic-fallback-mode-alist to detect .doc files (Bug#20891) |
Date: |
Fri, 15 Nov 2019 08:19:07 -0500 (EST) |
branch: master
commit 904146cf798122aa6610fdd5209986918dad043a
Author: Robert Pluim <address@hidden>
Commit: Robert Pluim <address@hidden>
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.
---
lisp/files.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/files.el b/lisp/files.el
index 053583b..448e00c 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -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'.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 904146c: Used magic-fallback-mode-alist to detect .doc files (Bug#20891),
Robert Pluim <=