From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: Re: C file recoginzed as image file Date: Fri, 5 Jan 2007 23:47:31 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1168037280 29675 80.91.229.12 (5 Jan 2007 22:48:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 Jan 2007 22:48:00 +0000 (UTC) Cc: Charles Rendleman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 05 23:47:59 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H2xqm-0005Lk-F1 for ged-emacs-devel@m.gmane.org; Fri, 05 Jan 2007 23:47:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2xqm-000210-20 for ged-emacs-devel@m.gmane.org; Fri, 05 Jan 2007 17:47:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H2xqY-0001xk-H0 for emacs-devel@gnu.org; Fri, 05 Jan 2007 17:47:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H2xqW-0001ud-No for emacs-devel@gnu.org; Fri, 05 Jan 2007 17:47:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2xqW-0001uM-Hs for emacs-devel@gnu.org; Fri, 05 Jan 2007 17:47:32 -0500 Original-Received: from [64.233.182.189] (helo=nf-out-0910.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H2xqW-0002py-6I for emacs-devel@gnu.org; Fri, 05 Jan 2007 17:47:32 -0500 Original-Received: by nf-out-0910.google.com with SMTP id h2so1183994nfe for ; Fri, 05 Jan 2007 14:47:31 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=V7meYhELqL8MNSppFPj86PgfMynPYqqSU2Uj2OqGMUsO6V8VfxChdQnvmGJGAjz25FX6h7+UwRv/VGSXKca/YejuyPW3xPQZynPwKgPQNakynFsTRXpEjWM2A+3LxDkBrn+748NPIXvi+ACPDNJYjvbH17NJrVIzqw6NcwKXK54= Original-Received: by 10.82.183.19 with SMTP id g19mr1976640buf.1168037251254; Fri, 05 Jan 2007 14:47:31 -0800 (PST) Original-Received: by 10.82.147.2 with HTTP; Fri, 5 Jan 2007 14:47:31 -0800 (PST) Original-To: "Chris Moore" In-Reply-To: Content-Disposition: inline X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:64839 Archived-At: On 1/5/07, Juanma Barranquero 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