diff options
| author | Chong Yidong | 2012-09-07 12:07:00 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-09-07 12:07:00 +0800 |
| commit | 1d43a35f49f7403f7f50f36dddf88167a7c81f11 (patch) | |
| tree | fb223a87c6616013d7074f3b0673016c882db7b1 | |
| parent | 2fe282993cf9c84f5be424dc93d03f9705a7edd8 (diff) | |
| download | emacs-1d43a35f49f7403f7f50f36dddf88167a7c81f11.tar.gz emacs-1d43a35f49f7403f7f50f36dddf88167a7c81f11.zip | |
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.
| -rw-r--r-- | lisp/gnus/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/gnus/gnus-group.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/gnus-salt.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus-util.el | 13 |
5 files changed, 31 insertions, 4 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 48d57da8f8d..d9f80103435 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2012-09-07 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * gnus-util.el | ||
| 4 | (gnus-put-text-property-excluding-characters-with-faces): Restore. | ||
| 5 | |||
| 6 | * gnus-salt.el (gnus-tree-highlight-node): | ||
| 7 | * gnus-sum.el (gnus-summary-highlight-line): | ||
| 8 | * gnus-group.el (gnus-group-highlight-line): Revert use of add-face. | ||
| 9 | |||
| 1 | 2012-09-06 Lars Ingebrigtsen <larsi@gnus.org> | 10 | 2012-09-06 Lars Ingebrigtsen <larsi@gnus.org> |
| 2 | 11 | ||
| 3 | * gnus-util.el: Fix compilation error on XEmacs 21.4. | 12 | * gnus-util.el: Fix compilation error on XEmacs 21.4. |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 24406fcc04e..8c7d0165976 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -1669,7 +1669,9 @@ and ends at END." | |||
| 1669 | gnus-group-highlight)))) | 1669 | gnus-group-highlight)))) |
| 1670 | (unless (eq face (get-text-property beg 'face)) | 1670 | (unless (eq face (get-text-property beg 'face)) |
| 1671 | (let ((inhibit-read-only t)) | 1671 | (let ((inhibit-read-only t)) |
| 1672 | (add-face beg end (if (boundp face) (symbol-value face) face))) | 1672 | (gnus-put-text-property-excluding-characters-with-faces |
| 1673 | beg end 'face | ||
| 1674 | (if (boundp face) (symbol-value face) face))) | ||
| 1673 | (gnus-extent-start-open beg)))) | 1675 | (gnus-extent-start-open beg)))) |
| 1674 | 1676 | ||
| 1675 | (defun gnus-group-get-icon (group) | 1677 | (defun gnus-group-get-icon (group) |
diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index 87a120279bc..760a7a0942e 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el | |||
| @@ -660,7 +660,9 @@ Two predefined functions are available: | |||
| 660 | (not (eval (caar list)))) | 660 | (not (eval (caar list)))) |
| 661 | (setq list (cdr list))))) | 661 | (setq list (cdr list))))) |
| 662 | (unless (eq (setq face (cdar list)) (get-text-property beg 'face)) | 662 | (unless (eq (setq face (cdar list)) (get-text-property beg 'face)) |
| 663 | (add-face beg end (if (boundp face) (symbol-value face) face))))) | 663 | (gnus-put-text-property-excluding-characters-with-faces |
| 664 | beg end 'face | ||
| 665 | (if (boundp face) (symbol-value face) face))))) | ||
| 664 | 666 | ||
| 665 | (defun gnus-tree-indent (level) | 667 | (defun gnus-tree-indent (level) |
| 666 | (insert (make-string (1- (* (1+ gnus-tree-node-length) level)) ? ))) | 668 | (insert (make-string (1- (* (1+ gnus-tree-node-length) level)) ? ))) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index bc0addd1559..b44b953bec6 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -12522,8 +12522,9 @@ If REVERSE, save parts that do not match TYPE." | |||
| 12522 | (not (memq article gnus-newsgroup-cached))))) | 12522 | (not (memq article gnus-newsgroup-cached))))) |
| 12523 | (let ((face (funcall (gnus-summary-highlight-line-0)))) | 12523 | (let ((face (funcall (gnus-summary-highlight-line-0)))) |
| 12524 | (unless (eq face (get-text-property beg 'face)) | 12524 | (unless (eq face (get-text-property beg 'face)) |
| 12525 | (add-face beg (point-at-eol) | 12525 | (gnus-put-text-property-excluding-characters-with-faces |
| 12526 | (setq face (if (boundp face) (symbol-value face) face))) | 12526 | beg (point-at-eol) 'face |
| 12527 | (setq face (if (boundp face) (symbol-value face) face))) | ||
| 12527 | (when gnus-summary-highlight-line-function | 12528 | (when gnus-summary-highlight-line-function |
| 12528 | (funcall gnus-summary-highlight-line-function article face)))))) | 12529 | (funcall gnus-summary-highlight-line-function article face)))))) |
| 12529 | 12530 | ||
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." | |||
| 866 | (setq beg (point))) | 866 | (setq beg (point))) |
| 867 | (gnus-overlay-put (gnus-make-overlay beg (point)) prop val))))) | 867 | (gnus-overlay-put (gnus-make-overlay beg (point)) prop val))))) |
| 868 | 868 | ||
| 869 | (defun gnus-put-text-property-excluding-characters-with-faces (beg end | ||
| 870 | prop val) | ||
| 871 | "The same as `put-text-property', but don't put props on characters with the `gnus-face' property." | ||
| 872 | (let ((b beg)) | ||
| 873 | (while (/= b end) | ||
| 874 | (when (get-text-property b 'gnus-face) | ||
| 875 | (setq b (next-single-property-change b 'gnus-face nil end))) | ||
| 876 | (when (/= b end) | ||
| 877 | (inline | ||
| 878 | (gnus-put-text-property | ||
| 879 | b (setq b (next-single-property-change b 'gnus-face nil end)) | ||
| 880 | prop val)))))) | ||
| 881 | |||
| 869 | (defmacro gnus-faces-at (position) | 882 | (defmacro gnus-faces-at (position) |
| 870 | "Return a list of faces at POSITION." | 883 | "Return a list of faces at POSITION." |
| 871 | (if (featurep 'xemacs) | 884 | (if (featurep 'xemacs) |