From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: animage.el -- animated image support in Emacs Date: Mon, 24 Apr 2006 02:37:32 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145839193 21242 80.91.229.2 (24 Apr 2006 00:39:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 Apr 2006 00:39:53 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 24 02:39:50 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FXp7A-00064D-3B for ged-emacs-devel@m.gmane.org; Mon, 24 Apr 2006 02:39:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FXp79-0000LO-W2 for ged-emacs-devel@m.gmane.org; Sun, 23 Apr 2006 20:39:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FXp6s-0000L8-KA for emacs-devel@gnu.org; Sun, 23 Apr 2006 20:39:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FXp6r-0000Kc-1H for emacs-devel@gnu.org; Sun, 23 Apr 2006 20:39:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FXp6q-0000KZ-S0 for emacs-devel@gnu.org; Sun, 23 Apr 2006 20:39:24 -0400 Original-Received: from [195.41.46.236] (helo=pfepb.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FXp8x-0000d8-Qs for emacs-devel@gnu.org; Sun, 23 Apr 2006 20:41:36 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepb.post.tele.dk (Postfix) with SMTP id A2CC2A50024 for ; Mon, 24 Apr 2006 02:39:20 +0200 (CEST) Original-To: emacs-devel@gnu.org In-Reply-To: (Kim F. Storm's message of "Fri, 21 Apr 2006 23:15:50 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:53296 Archived-At: storm@cua.dk (Kim F. Storm) writes: > Below you will find animage.el which enables Emacs to show animated GIF > files using the following code: > With the following patch to image-mode.el, visiting an animated GIF files will automatically animate it. However, if we do this, the animage.el should be preloaded, and as such it could just as well be merged into image.el. Index: lisp/image-mode.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/image-mode.el,v retrieving revision 1.11 diff -u -r1.11 image-mode.el --- lisp/image-mode.el 18 Apr 2006 21:21:08 -0000 1.11 +++ lisp/image-mode.el 24 Apr 2006 00:36:58 -0000 @@ -145,8 +145,8 @@ (not (and (boundp 'tar-superior-buffer) tar-superior-buffer))) (progn (clear-image-cache) - (create-image (buffer-file-name))) - (create-image + (create-animated-image (buffer-file-name))) + (create-animated-image (string-make-unibyte (buffer-substring-no-properties (point-min) (point-max))) nil t))) -- Kim F. Storm http://www.cua.dk