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: .eps in image mode Date: Mon, 25 Dec 2006 04:15:20 +0100 Message-ID: References: <87irg45jh6.fsf@chunyu.hit.edu.cn> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1167016541 15195 80.91.229.10 (25 Dec 2006 03:15:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Dec 2006 03:15:41 +0000 (UTC) Cc: chunyu@hit.edu.cn, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 25 04:15:40 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GygJO-0004Bd-5J for ged-emacs-devel@m.gmane.org; Mon, 25 Dec 2006 04:15:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GygJN-0004ax-Gw for ged-emacs-devel@m.gmane.org; Sun, 24 Dec 2006 22:15:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GygJ9-0004YR-OH for emacs-devel@gnu.org; Sun, 24 Dec 2006 22:15:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GygJ7-0004VG-Ko for emacs-devel@gnu.org; Sun, 24 Dec 2006 22:15:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GygJ7-0004VD-Gs for emacs-devel@gnu.org; Sun, 24 Dec 2006 22:15:21 -0500 Original-Received: from [64.233.182.184] (helo=nf-out-0910.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GygJ7-0007Qz-2b for emacs-devel@gnu.org; Sun, 24 Dec 2006 22:15:21 -0500 Original-Received: by nf-out-0910.google.com with SMTP id d4so4220476nfe for ; Sun, 24 Dec 2006 19:15:20 -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=GNlPPoUTq0Km0m/v6kaeQBoCQPnrbSxys22tdfAR2FdqGlv/d3qkI8R/8DXJBSPQt7Un8WYIg5iGNJ8V6ZDyfR9qDw36Gyx3amJC3VJXNZWTG61OfPX65F8bwDeJzvL22J1oZ6HxJbxtaM/LK4VY+xHyn1ir1uYyqTLKeJZVJpE= Original-Received: by 10.82.162.14 with SMTP id k14mr33110bue.1167016520354; Sun, 24 Dec 2006 19:15:20 -0800 (PST) Original-Received: by 10.82.147.2 with HTTP; Sun, 24 Dec 2006 19:15:20 -0800 (PST) Original-To: rms@gnu.org 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:64237 Archived-At: On 12/24/06, Richard Stallman wrote: > Does this patch give the right results? > *** image.el 19 Dec 2006 11:57:52 -0500 1.64 > --- image.el 23 Dec 2006 21:04:58 -0500 It certainly works for `magic-mode-alist', i.e., it forces PostScript files not to be automatically detected as images. As for this part, INCLUDE-MAYBES is declared as a new argument, but it is not referenced outside of the docstring, so `image-type-from-file-header' still returns nil for PostScript files: > --- 225,246 ---- > > > ;;;###autoload > ! (defun image-type-from-buffer (&optional include-maybes) > "Determine the image type from data in the current buffer. > ! Value is a symbol specifying the image type, or nil if none > ! corresponds to the buffer contents. > ! > ! If INCLUDE-MAYBES is nil (the default), we return nil for > ! file types that should not always be treated as images > ! even though they can be so treated." > (let ((types image-type-header-regexps) > type > (opoint (point))) > (goto-char (point-min)) > (while types > (let ((regexp (car (car types))) > ! (image-type (nth 1 (car types))) > ! (not-always (nth 2 (car types))) > data) > (if (or (and (symbolp image-type) > (looking-at regexp)) /L/e/k/t/u