emacs-devel
[Top][All Lists]
Advanced

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

Re: Image mode


From: Juri Linkov
Subject: Re: Image mode
Date: Thu, 08 Feb 2007 01:27:08 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux)

> Thirdly, make the function image-type-auto-detected-p scan
> auto-mode-alist for a non-image-mode match, and returns nil if one is
> found.

I think your previous patch was better. `image-type-auto-detected-p'
should be a simple function whose sole purpose is to auto-detect the image
from the file content.  For users who don't care about negligibly small risks
of viewing any image, it would be easy to override the default element
`(image-type-auto-detected-p . image-mode-maybe)' in magic-mode-alist with
`(image-type-auto-detected-p . image-mode), thus always displaying images
auto-detected as images from the file content regardless of the file
extension (here I mean `image-type-auto-detected-p' is an original
implementation, not from your latest patch).

It is the function `image-mode-maybe' that should decide (ask the user
or use some option) whether display the file as an image, or put it
in `image-minor-mode', or something else (even the word `maybe' in
`image-mode-maybe' indicates the uncertainty about the outcome of this
function).

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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