diff options
| author | Chong Yidong <cyd@gnu.org> | 2012-09-07 12:07:00 +0800 |
|---|---|---|
| committer | Chong Yidong <cyd@gnu.org> | 2012-09-07 12:07:00 +0800 |
| commit | 1d43a35f49f7403f7f50f36dddf88167a7c81f11 (patch) | |
| tree | fb223a87c6616013d7074f3b0673016c882db7b1 /lisp/gnus/gnus-util.el | |
| parent | 2fe282993cf9c84f5be424dc93d03f9705a7edd8 (diff) | |
| download | emacs-1d43a35f49f7403f7f50f36dddf88167a7c81f11.tar.gz | |
Partially revert last Gnus merge.
The add-face function has been added gnus-compat.el, but is not in
Emacs; this leaves Gnus in an unusable state.
* lisp/gnus/gnus-salt.el (gnus-tree-highlight-node):
* lisp/gnus/gnus-sum.el (gnus-summary-highlight-line):
* lisp/gnus/gnus-group.el (gnus-group-highlight-line): Revert use of add-face.
* lisp/gnus/gnus-util.el (gnus-put-text-property-excluding-characters-with-faces): Restore.
Diffstat (limited to 'lisp/gnus/gnus-util.el')
| -rw-r--r-- | lisp/gnus/gnus-util.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 0c048e63bdf..4c5eabab723 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -866,6 +866,19 @@ If there's no subdirectory, delete DIRECTORY as well." (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) |
