emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109910: Partially revert last Gnus m


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109910: Partially revert last Gnus merge.
Date: Fri, 07 Sep 2012 12:07:00 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109910
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Fri 2012-09-07 12:07:00 +0800
message:
  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.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-group.el
  lisp/gnus/gnus-salt.el
  lisp/gnus/gnus-sum.el
  lisp/gnus/gnus-util.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2012-09-06 22:13:45 +0000
+++ b/lisp/gnus/ChangeLog       2012-09-07 04:07:00 +0000
@@ -1,3 +1,12 @@
+2012-09-07  Chong Yidong  <address@hidden>
+
+       * 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  <address@hidden>
 
        * gnus-util.el: Fix compilation error on XEmacs 21.4.

=== modified file 'lisp/gnus/gnus-group.el'
--- a/lisp/gnus/gnus-group.el   2012-09-06 22:13:45 +0000
+++ b/lisp/gnus/gnus-group.el   2012-09-07 04:07:00 +0000
@@ -1669,7 +1669,9 @@
                       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)

=== modified file 'lisp/gnus/gnus-salt.el'
--- a/lisp/gnus/gnus-salt.el    2012-09-06 22:13:45 +0000
+++ b/lisp/gnus/gnus-salt.el    2012-09-07 04:07:00 +0000
@@ -660,7 +660,9 @@
                    (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)) ? )))

=== modified file 'lisp/gnus/gnus-sum.el'
--- a/lisp/gnus/gnus-sum.el     2012-09-06 22:13:45 +0000
+++ b/lisp/gnus/gnus-sum.el     2012-09-07 04:07:00 +0000
@@ -12522,8 +12522,9 @@
                         (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)
-                 (setq face (if (boundp face) (symbol-value face) face)))
+       (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))))))
 

=== modified file 'lisp/gnus/gnus-util.el'
--- a/lisp/gnus/gnus-util.el    2012-09-06 22:13:45 +0000
+++ b/lisp/gnus/gnus-util.el    2012-09-07 04:07:00 +0000
@@ -866,6 +866,19 @@
          (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]