X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-spec.el;h=54714d503bc75c2fea555f008d2e74fca5a42339;hb=75e9b45e4f20d65e8b0dcb85520da245d66a11c6;hp=f40177d5c609c8b33058709093423c9cd3937ab7;hpb=935af32fa5a3d22163b9b626d770f5c16a766837;p=gnus diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el index f40177d5c..54714d503 100644 --- a/lisp/gnus-spec.el +++ b/lisp/gnus-spec.el @@ -1,6 +1,6 @@ ;;; gnus-spec.el --- format spec functions for Gnus -;; Copyright (C) 1996-2012 Free Software Foundation, Inc. +;; Copyright (C) 1996-2014 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news @@ -81,7 +81,6 @@ text properties. This is only needed on XEmacs, as Emacs does this anyway." (defvar gnus-tmp-unread-and-unselected) (defvar gnus-tmp-news-method) (defvar gnus-tmp-news-server) -(defvar gnus-tmp-article-number) (defvar gnus-mouse-face) (defvar gnus-mouse-face-prop) (defvar gnus-tmp-header) @@ -265,7 +264,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 +417,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 +434,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") @@ -505,7 +511,8 @@ are supported for %s." (delete-char -1)) (t (if (null args) - (error 'wrong-number-of-arguments #'my-format n fstring)) + (signal 'wrong-number-of-arguments + (list #'gnus-xmas-format n fstring))) (let* ((minlen (string-to-number (or (match-string 2) ""))) (arg (car args)) (str (if (stringp arg) arg (format "%s" arg))) @@ -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