From 10ffa2a1cefca36dd67ef7cf4dfa1e7b143e87d3 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 19 Dec 2006 09:04:30 +0000 Subject: [PATCH] (magic-mode-alist): Allow matching file type by calling a function at bob. Check for image types by calling image-type-from-buffer. Suggested by Juanma Barranquero. (set-auto-mode): Do it. --- lisp/files.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 6c9b9a7542e..71f33e5f1a1 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2115,7 +2115,8 @@ of the regular expression. The mode is then determined as the mode associated with that interpreter in `interpreter-mode-alist'.") (defvar magic-mode-alist - `(;; The < comes before the groups (but the first) to reduce backtracking. + `((image-type-from-buffer . image-mode) + ;; The < comes before the groups (but the first) to reduce backtracking. ;; TODO: UTF-16