Gnus development mailing list
 help / color / mirror / Atom feed
* Highlighting with GPG signed messages.
@ 2007-08-01 14:17 Michaël Cadilhac
  2007-08-02  5:53 ` Katsumi Yamaoka
  0 siblings, 1 reply; 6+ messages in thread
From: Michaël Cadilhac @ 2007-08-01 14:17 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 1997 bytes --]

Hi !

When viewing a GPG signed message, the highlighting of citation and
signature isn't made. This is due to the `last' condition for the
highlighting to happen in the treatment functions.

For example, if you have a two parts message (Text + sig),
gnus-mime-display-security is called with the first one and the second
part is like discarded. So current-part and total-parts are never
equals and `last' is never validated.

This is the shortest patch I could came with :

Index: lisp/gnus-art.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-art.el,v
retrieving revision 7.222
diff -c -r7.222 gnus-art.el
*** lisp/gnus-art.el	20 Jul 2007 11:30:50 -0000	7.222
--- lisp/gnus-art.el	1 Aug 2007 14:11:14 -0000
***************
*** 8042,8048 ****
      (narrow-to-region (point) (point))
      (unless (gnus-unbuttonized-mime-type-p (car handle))
        (gnus-insert-mime-security-button handle))
!     (gnus-mime-display-part (cadr handle))
      (unless (bolp)
        (insert "\n"))
      (unless (gnus-unbuttonized-mime-type-p (car handle))
--- 8042,8051 ----
      (narrow-to-region (point) (point))
      (unless (gnus-unbuttonized-mime-type-p (car handle))
        (gnus-insert-mime-security-button handle))
!     ;; Remove an element in g-a-m-h so that the 'last condition of
!     ;; treatment functions can be validated.
!     (let ((gnus-article-mime-handles (cdr gnus-article-mime-handles)))
!       (gnus-mime-display-part (cadr handle)))
      (unless (bolp)
        (insert "\n"))
      (unless (gnus-unbuttonized-mime-type-p (car handle))

Thanks.

-- 
 |   Michaël `Micha' Cadilhac       |  Si j'étais sous-secrétaire d'État     |
 |   http://michael.cadilhac.name   |    aux choux farcis, vous entendriez   |
 |   JID/MSN:                       |  beaucoup parler des choux farcis !    |
 `----  michael.cadilhac@gmail.com  |          -- Nicolas Sarkozy       -  --'

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-08-06  2:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-01 14:17 Highlighting with GPG signed messages Michaël Cadilhac
2007-08-02  5:53 ` Katsumi Yamaoka
2007-08-02  6:28   ` Katsumi Yamaoka
2007-08-03 12:08     ` Katsumi Yamaoka
2007-08-03 12:38     ` Michaël Cadilhac
2007-08-06  2:14       ` Katsumi Yamaoka

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).