Gnus development mailing list
 help / color / mirror / Atom feed
From: Didier Verna <didier@lrde.epita.fr>
Subject: Re: [COMMIT] More image fixes
Date: Mon, 23 Jun 2003 19:56:54 +0200	[thread overview]
Message-ID: <mux7k7che3d.fsf@uzeb.lrde.epita.fr> (raw)
In-Reply-To: <muxfzm0he8i.fsf@uzeb.lrde.epita.fr> (Didier Verna's message of "Mon, 23 Jun 2003 19:53:49 +0200")

I wrote:

> 	* gnus-ems.el (gnus-put-image): New argument CATEGORY. Add it as a
> 	text property.
> 	(gnus-remove-image): New argument CATEGORY. Only remove if
> 	category matches.


        BTW, somebody should check this part, because I don't use GNU Emacs.
Patch re-inserted below:

> Index: lisp/gnus-ems.el
> ===================================================================
> RCS file: /usr/local/cvsroot/gnus/lisp/gnus-ems.el,v
> retrieving revision 6.26
> diff -u -u -t -b -B -w -r6.26 gnus-ems.el
> --- lisp/gnus-ems.el	2 May 2003 17:52:53 -0000	6.26
> +++ lisp/gnus-ems.el	23 Jun 2003 17:34:35 -0000
> @@ -219,16 +219,19 @@
>        (setq props (plist-put props :background (face-background face))))
>      (apply 'create-image file type data-p props)))
>
> -(defun gnus-put-image (glyph &optional string)
> +(defun gnus-put-image (glyph &optional string category)
>    (insert-image glyph (or string " "))
> +  (put-text-property (1- (point)) (point) 'gnus-image-category category)
>    (unless string
>      (put-text-property (1- (point)) (point)
>                         'gnus-image-text-deletable t))
>    glyph)
>
> -(defun gnus-remove-image (image)
> +(defun gnus-remove-image (image &optional category)
>    (dolist (position (message-text-with-property 'display))
> -    (when (equal (get-text-property position 'display) image)
> +    (when (and (equal (get-text-property position 'display) image)
> +               (equal (get-text-property position 'gnus-image-category)
> +                      category))
>        (put-text-property position (1+ position) 'display nil)
>        (when (get-text-property position 'gnus-image-text-deletable)
>          (delete-region position (1+ position))))))

-- 
Didier Verna, didier@lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France   Fax.+33 (1) 53 14 59 22   didier@xemacs.org



      reply	other threads:[~2003-06-23 17:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-23 17:53 Didier Verna
2003-06-23 17:56 ` Didier Verna [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mux7k7che3d.fsf@uzeb.lrde.epita.fr \
    --to=didier@lrde.epita.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).