On Wed, Sep 22 2010, Lars Magne Ingebrigtsen wrote: > Hooks are generally for user-enabled stuff. Even the highlight thing > really shouldn't be in that hook. I agree. But it was not empty! This is why I did add it here. :-) OTOH I can look to empty the hook by default. > And it looks like an expensive function. It starts with: > > (save-excursion > (let* ((end (line-end-position)) > ;; now find out where the line starts and leave point there. > (beg (line-beginning-position))) > (save-restriction > (narrow-to-region beg end) > (goto-char beg) > (let ((mystart (text-property-any beg end 'gnus-group-icon t))) > > And this is run once per line, whether you have %E to or not, isn't it? Sure, it is. But I will say early optimization is bad. I don't think is is slowing things down. C'mon! ;-) But, what I would prefer to do, is to build the %E value with the image directly, and then use that propertized string to replace %E in the spec. This would avoid scanning group lines… What do you think? PS: You know, I'm new, and I don't think like I'm authorized to move that old code all around, so I'm doing things little by little for now. ;-) -- Julien Danjou // ᐰ http://julien.danjou.info