emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C file recoginzed as image file


From: Juanma Barranquero
Subject: Re: C file recoginzed as image file
Date: Fri, 5 Jan 2007 23:47:31 +0100

On 1/5/07, Juanma Barranquero <address@hidden> wrote:
That's more-or-less easy even now:

I mean this:

(defun image-auto-detect-y-or-n-p ()
 (let ((type (image-type-from-buffer)))
   (and type
        (y-or-n-p (format "File \"%s\" contains a `%s' image; display it "
                          (file-name-nondirectory buffer-file-name)
                          type)))))

(setcar (rassq 'image-mode magic-mode-alist)
       'image-auto-detect-y-or-n-p)

                   /L/e/k/t/u




reply via email to

[Prev in Thread] Current Thread [Next in Thread]