GNU bug report logs - #12451
[PATCH] Combine formatting faces with other highlighting

Previous Next

Package: gnus;

Reported by: Wolfgang Jenkner <wjenkner <at> inode.at>

Date: Sat, 15 Sep 2012 15:21:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 5.130006

Fixed in version 24.4

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Wolfgang Jenkner <wjenkner <at> inode.at>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 12451 <at> debbugs.gnu.org
Subject: bug#12451: [PATCH] Combine formatting faces with other highlighting
Date: Thu, 27 Dec 2012 18:10:13 +0100
On Tue, Dec 25 2012, Lars Ingebrigtsen wrote:

> Wolfgang Jenkner <wjenkner <at> inode.at> writes:
>
>> This implements the proposal discussed in the thread starting with
>>
>> http://article.gmane.org/gmane.emacs.gnus.general/82112
>
> Thanks; applied to Ma Gnus.

Here's a small correction (I don't see the messages I'm talking about
below in the echo area, only in *Messages*, so they had escaped me):

2012-12-27  Wolfgang Jenkner  <wjenkner <at> inode.at>

	* gnus-spec.el (gnus-face-face-function): Don't use nil as no-op face
	place holder since this gives `Invalid face reference: nil' messages.
	Use the `default' face instead.  It has the same effect here, even
	though it is not no-op.

	* gnus-util.el
	(gnus-put-text-property-excluding-characters-with-faces): Similarly.

-- >8 --
Subject: [PATCH] Avoid `Invalid face reference: nil' messages.

---
 lisp/gnus-spec.el | 2 +-
 lisp/gnus-util.el | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el
index 22d4627..0b5203d 100644
--- a/lisp/gnus-spec.el
+++ b/lisp/gnus-spec.el
@@ -270,7 +270,7 @@ Return a list of updated types."
 	   ;; Delay consing the value of the `face' property until
 	   ;; `gnus-add-text-properties' runs, since it will be modified
 	   ;; by `gnus-put-text-property-excluding-characters-with-faces'.
-	   (list ',(symbol-value (intern (format "gnus-face-%d" type))) nil)
+	   (list ',(symbol-value (intern (format "gnus-face-%d" type))) 'default)
 	   ;; Redundant now, but still convenient.
 	   '(gnus-face t)))))
 
diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el
index 705a9e0..fb218e5 100644
--- a/lisp/gnus-util.el
+++ b/lisp/gnus-util.el
@@ -875,7 +875,7 @@ Otherwise, do nothing."
     (let ((stop (next-single-property-change beg 'face nil end)))
       (if (get-text-property beg 'gnus-face)
 	  (when (eq prop 'face)
-	    (setcar (cdr (get-text-property beg 'face)) val))
+	    (setcar (cdr (get-text-property beg 'face)) (or val 'default)))
 	(inline
 	  (gnus-put-text-property beg stop prop val)))
       (setq beg stop))))
-- 
1.8.0.2





This bug report was last modified 12 years and 152 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.