2002-01-02 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 2 Jan 2002 19:34:14 +0000 (19:34 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 2 Jan 2002 19:34:14 +0000 (19:34 +0000)
* gnus-ems.el (gnus-article-display-xface): Show xface in the
order of headers (Actually, it is called in a reversed order). Add
'gnus-image-text-deletable property.
(gnus-remove-image): Remove text with such a property.

* gnus-xmas.el (gnus-xmas-article-display-xface): Don't use
gnus-put-image.

* gnus-art.el (gnus-article-treat-fold-newsgroups): Replace ", *"
with ", "

lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-ems.el
lisp/gnus-xmas.el

index ac9c98d..a5ce248 100644 (file)
@@ -1,3 +1,16 @@
+2002-01-02  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-ems.el (gnus-article-display-xface): Show xface in the
+       order of headers (Actually, it is called in a reversed order). Add
+       'gnus-image-text-deletable property.
+       (gnus-remove-image): Remove text with such a property.
+
+       * gnus-xmas.el (gnus-xmas-article-display-xface): Don't use
+       gnus-put-image.
+       
+       * gnus-art.el (gnus-article-treat-fold-newsgroups): Replace ", *"
+       with ", "
+
 2002-01-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-fun.el (gnus-convert-gray-x-face-to-xpm): Renamed.
@@ -21,7 +34,7 @@
        temporary files.
        (gnus-xmas-put-image): Use end-glyph. Make text invisible.
        (gnus-xmas-remove-image): Make text visible, remove glyph.
-       
+
        * gnus-picon.el (gnus-picon-transform-newsgroups)
        (gnus-picon-transform-address): Insert spec backward, due to the
        incompatibility of gnus-xmas-put-image.
index fd122d7..f02d31c 100644 (file)
@@ -1700,7 +1700,7 @@ unfolded."
     (while (gnus-article-goto-header "newsgroups\\|followup-to")
       (save-restriction
        (mail-header-narrow-to-field)
-       (while (search-forward "," nil t)
+       (while (re-search-forward ", *" nil t)
          (replace-match ", " t t))
        (mail-header-fold-field)
        (goto-char (point-max))))))
index 4a17687..12a4121 100644 (file)
@@ -283,11 +283,11 @@ for XEmacs."
        (when image
          (goto-char (point-min))
          (re-search-forward "^From:" nil 'move)
-         (while (get-text-property (point) 'display)
-           (goto-char (next-single-property-change (point) 'display)))
          (gnus-add-wash-type 'xface)
          (gnus-add-image 'xface image)
-         (insert-image image))))))
+         (insert-image image " ")
+         (put-text-property (1- (point)) (point) 
+                            'gnus-image-text-deletable t))))))
 
 ;;; Image functions.
 
@@ -304,7 +304,9 @@ for XEmacs."
 (defun gnus-remove-image (image)
   (dolist (position (message-text-with-property 'display))
     (when (equal (get-text-property position 'display) image)
-      (put-text-property position (1+ position) 'display nil))))
+      (put-text-property position (1+ position) 'display nil)
+      (if (get-text-property position 'gnus-image-text-deletable)
+         (delete-region position (1+ position))))))
 
 (provide 'gnus-ems)
 
index eccc24a..8c86c92 100644 (file)
@@ -676,7 +676,11 @@ XEmacs compatibility workaround."
       (set-glyph-face xface-glyph 'gnus-x-face)
 
       (gnus-article-goto-header "from")
-      (gnus-put-image xface-glyph " ")
+      ;;(gnus-put-image xface-glyph " ")
+      (let ((extent (make-extent (1- (point)) (point))))
+       (set-extent-property extent 'gnus-image t)
+       (set-extent-property extent 'duplicable t)
+       (set-extent-property extent 'end-glyph xface-glyph))
       (gnus-add-wash-type 'xface)
       (gnus-add-image 'xface xface-glyph))))