Delete temporary files when Gnus exits instead of using timers
[gnus] / lisp / gnus-spec.el
index f40177d..0ff8ec8 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-spec.el --- format spec functions for Gnus
 
-;; Copyright (C) 1996-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -265,7 +265,14 @@ Return a list of updated types."
 (defun gnus-face-face-function (form type)
   `(gnus-add-text-properties
     (point) (progn ,@form (point))
-    '(gnus-face t face ,(symbol-value (intern (format "gnus-face-%d" type))))))
+    (cons 'face
+         (cons
+          ;; 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))) 'default)
+          ;; Redundant now, but still convenient.
+          '(gnus-face t)))))
 
 (defun gnus-balloon-face-function (form type)
   `(gnus-put-text-property
@@ -411,7 +418,7 @@ characters when given a pad value."
   ;; them will have the balloon-help text property.
   (let ((case-fold-search nil))
     (if (string-match
-        "\\`\\(.*\\)%[0-9]?[{(«]\\(.*\\)%[0-9]?[»})]\\(.*\n?\\)\\'\\|%[-0-9]*=\\|%[-0-9]*\\*"
+        "\\`\\(.*\\)%[0-9]?[{(«]\\(.*\\)%[0-9]?[»})]\\(.*\n?\\)\\'\\|%[-0-9]*=\\|%[-0-9]*\\*"
         format)
        (gnus-parse-complex-format format spec-alist)
       ;; This is a simple format.
@@ -428,13 +435,13 @@ characters when given a pad value."
       (goto-char (point-min))
       (insert "(\"")
       ;; Convert all font specs into font spec lists.
-      (while (re-search-forward "%\\([0-9]+\\)?\\([«»{}()]\\)" nil t)
+      (while (re-search-forward "%\\([0-9]+\\)?\\([«»{}()]\\)" nil t)
        (let ((number (if (match-beginning 1)
                          (match-string 1) "0"))
              (delim (aref (match-string 2) 0)))
          (if (or (= delim ?\()
                  (= delim ?\{)
-                 (= delim ?\«))
+                 (= delim 171)) ; «
              (replace-match (concat "\"("
                                     (cond ((= delim ?\() "mouse")
                                           ((= delim ?\{) "face")
@@ -726,7 +733,7 @@ If PROPS, insert the result."
 (provide 'gnus-spec)
 
 ;; Local Variables:
-;; coding: iso-8859-1
+;; coding: utf-8
 ;; End:
 
 ;;; gnus-spec.el ends here