+2012-09-06 Lars Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-util.el
+ (gnus-put-text-property-excluding-characters-with-faces): Removed.
+
+ * gnus-compat.el: Define compat function `add-face' from Wolfgang
+ Jenkner.
+
+ * gnus-group.el (gnus-group-highlight-line): Use combining faces.
+
+ * gnus-sum.el (gnus-summary-highlight-line): Ditto.
+
+ * gnus-salt.el (gnus-tree-highlight-node): Ditto.
+
2012-09-06 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-score.el (gnus-score-decode-text-parts): Use #' for
(and (boundp var)
(symbol-value var))))
+
+;; Emacs less than 24.3
+(unless (fboundp 'add-face)
+ (defun add-face (beg end face)
+ "Combine FACE BEG and END."
+ (let ((b beg))
+ (while (< b end)
+ (let ((oldval (get-text-property b 'face)))
+ (put-text-property
+ b (setq b (next-single-property-change b 'face nil end))
+ 'face (cond ((null oldval)
+ face)
+ ((and (consp oldval)
+ (not (keywordp (car oldval))))
+ (cons face oldval))
+ (t
+ (list face oldval)))))))))
+
(provide 'gnus-compat)
;; gnus-compat.el ends here
gnus-group-highlight))))
(unless (eq face (get-text-property beg 'face))
(let ((inhibit-read-only t))
- (gnus-put-text-property-excluding-characters-with-faces
- beg end 'face
- (if (boundp face) (symbol-value face) face)))
+ (add-face beg end (if (boundp face) (symbol-value face) face)))
(gnus-extent-start-open beg))))
(defun gnus-group-get-icon (group)
(not (eval (caar list))))
(setq list (cdr list)))))
(unless (eq (setq face (cdar list)) (get-text-property beg 'face))
- (gnus-put-text-property-excluding-characters-with-faces
- beg end 'face
- (if (boundp face) (symbol-value face) face)))))
+ (add-face beg end (if (boundp face) (symbol-value face) face)))))
(defun gnus-tree-indent (level)
(insert (make-string (1- (* (1+ gnus-tree-node-length) level)) ? )))
(not (memq article gnus-newsgroup-cached)))))
(let ((face (funcall (gnus-summary-highlight-line-0))))
(unless (eq face (get-text-property beg 'face))
- (gnus-put-text-property-excluding-characters-with-faces
- beg (point-at-eol) 'face
- (setq face (if (boundp face) (symbol-value face) face)))
+ (add-face beg (point-at-eol)
+ (setq face (if (boundp face) (symbol-value face) face)))
(when gnus-summary-highlight-line-function
(funcall gnus-summary-highlight-line-function article face))))))
(setq beg (point)))
(gnus-overlay-put (gnus-make-overlay beg (point)) prop val)))))
-(defun gnus-put-text-property-excluding-characters-with-faces (beg end
- prop val)
- "The same as `put-text-property', but don't put props on characters with the `gnus-face' property."
- (let ((b beg))
- (while (/= b end)
- (when (get-text-property b 'gnus-face)
- (setq b (next-single-property-change b 'gnus-face nil end)))
- (when (/= b end)
- (inline
- (gnus-put-text-property
- b (setq b (next-single-property-change b 'gnus-face nil end))
- prop val))))))
-
(defmacro gnus-faces-at (position)
"Return a list of faces at POSITION."
(if (featurep 'xemacs)