[gnus git] branch master updated: m0-5-130-g2df323a =1= Partially revert last Gnus merge

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  2df323a009ddd334ef992f32b7a8441daa6b6256 (commit)
      from  f4b7a91b0d9643734042ca05e02a79aafee8fbf9 (commit)


- Log -----------------------------------------------------------------
commit 2df323a009ddd334ef992f32b7a8441daa6b6256
Author: Chong Yidong <[email protected]>
Date:   Fri Sep 7 04:26:17 2012 +0000

    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.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 880b7d8..1f9de72 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
+2012-09-07  Chong Yidong  <[email protected]>
+
+	* gnus-util.el
+	(gnus-put-text-property-excluding-characters-with-faces): Restore.
+
+	* gnus-salt.el (gnus-tree-highlight-node):
+	* gnus-sum.el (gnus-summary-highlight-line):
+	* gnus-group.el (gnus-group-highlight-line): Revert use of add-face.
+
 2012-09-06  Lars Ingebrigtsen  <[email protected]>
 
 	* gnus-util.el: Fix compilation error on XEmacs 21.4.
diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el
index 0dc4b81..a19ba4d 100644
--- a/lisp/gnus-group.el
+++ b/lisp/gnus-group.el
@@ -1669,7 +1669,9 @@ and ends at END."
                       gnus-group-highlight))))
     (unless (eq face (get-text-property beg 'face))
       (let ((inhibit-read-only t))
-        (add-face beg end (if (boundp face) (symbol-value face) face)))
+        (gnus-put-text-property-excluding-characters-with-faces
+         beg end 'face
+         (if (boundp face) (symbol-value face) face)))
       (gnus-extent-start-open beg))))
 
 (defun gnus-group-get-icon (group)
diff --git a/lisp/gnus-salt.el b/lisp/gnus-salt.el
index 87a1202..760a7a0 100644
--- a/lisp/gnus-salt.el
+++ b/lisp/gnus-salt.el
@@ -660,7 +660,9 @@ Two predefined functions are available:
 		    (not (eval (caar list))))
 	  (setq list (cdr list)))))
     (unless (eq (setq face (cdar list)) (get-text-property beg 'face))
-      (add-face beg end (if (boundp face) (symbol-value face) face)))))
+      (gnus-put-text-property-excluding-characters-with-faces
+       beg end 'face
+       (if (boundp face) (symbol-value face) face)))))
 
 (defun gnus-tree-indent (level)
   (insert (make-string (1- (* (1+ gnus-tree-node-length) level)) ? )))
diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el
index e8e9478..efbcb4d 100644
--- a/lisp/gnus-sum.el
+++ b/lisp/gnus-sum.el
@@ -12533,7 +12533,8 @@ If REVERSE, save parts that do not match TYPE."
                         (not (memq article gnus-newsgroup-cached)))))
     (let ((face (funcall (gnus-summary-highlight-line-0))))
       (unless (eq face (get-text-property beg 'face))
-	(add-face beg (point-at-eol)
+	(gnus-put-text-property-excluding-characters-with-faces
+	 beg (point-at-eol) 'face
 		  (setq face (if (boundp face) (symbol-value face) face)))
 	(when gnus-summary-highlight-line-function
 	  (funcall gnus-summary-highlight-line-function article face))))))
diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el
index 0c048e6..4c5eaba 100644
--- a/lisp/gnus-util.el
+++ b/lisp/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)

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog     |    9 +++++++++
 lisp/gnus-group.el |    4 +++-
 lisp/gnus-salt.el  |    4 +++-
 lisp/gnus-sum.el   |    5 +++--
 lisp/gnus-util.el  |   13 +++++++++++++
 5 files changed, 31 insertions(+), 4 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.