From 005551fe3654f6037f78921388302fb2929c459e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 14 Apr 2014 17:01:37 -0400 Subject: [PATCH] * lisp/doc-view.el (doc-view-set-doc-type): Ignore file name case; add .pps. --- lisp/ChangeLog | 4 ++++ lisp/doc-view.el | 37 +++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index beb357ac85b..f60e8652d92 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-04-14 Stefan Monnier + + * doc-view.el (doc-view-set-doc-type): Ignore file name case; add .pps. + 2014-04-14 Juanma Barranquero * faces.el (face-set-after-frame-default): Remove unused local variable. diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 09d5925b3e2..42544851f6b 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -1621,24 +1621,25 @@ If BACKWARD is non-nil, jump to the previous match." "Figure out the current document type (`doc-view-doc-type')." (let ((name-types (when buffer-file-name - (cdr (assoc (file-name-extension buffer-file-name) - '( - ;; DVI - ("dvi" dvi) - ;; PDF - ("pdf" pdf) ("epdf" pdf) - ;; PostScript - ("ps" ps) ("eps" ps) - ;; DjVu - ("djvu" djvu) - ;; OpenDocument formats - ("odt" odf) ("ods" odf) ("odp" odf) ("odg" odf) - ("odc" odf) ("odi" odf) ("odm" odf) ("ott" odf) - ("ots" odf) ("otp" odf) ("otg" odf) - ;; Microsoft Office formats (also handled - ;; by the odf conversion chain) - ("doc" odf) ("docx" odf) ("xls" odf) ("xlsx" odf) - ("ppt" odf) ("pptx" odf)))))) + (cdr (assoc-ignore-case + (file-name-extension buffer-file-name) + '( + ;; DVI + ("dvi" dvi) + ;; PDF + ("pdf" pdf) ("epdf" pdf) + ;; PostScript + ("ps" ps) ("eps" ps) + ;; DjVu + ("djvu" djvu) + ;; OpenDocument formats. + ("odt" odf) ("ods" odf) ("odp" odf) ("odg" odf) + ("odc" odf) ("odi" odf) ("odm" odf) ("ott" odf) + ("ots" odf) ("otp" odf) ("otg" odf) + ;; Microsoft Office formats (also handled by the odf + ;; conversion chain). + ("doc" odf) ("docx" odf) ("xls" odf) ("xlsx" odf) + ("ppt" odf) ("pps" odf) ("pptx" odf)))))) (content-types (save-excursion (goto-char (point-min)) -- 2.39.5