;;; gnus-spec.el --- format spec functions for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; 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]?[»})]\\(.*\n?\\)\\'\\|%[-0-9]*=\\|%[-0-9]*\\*"
format)
(gnus-parse-complex-format format spec-alist)
;; This is a simple format.
(gnus-parse-simple-format format spec-alist insert))))
(defun gnus-parse-complex-format (format spec-alist)
- (let (found-C)
+ (let ((cursor-spec nil))
(save-excursion
(gnus-set-work-buffer)
(insert format)
;; Convert point position commands.
(goto-char (point-min))
(let ((case-fold-search nil))
- (while (re-search-forward "%\\([-0-9]+\\)?C" nil t)
+ (while (re-search-forward "%\\([-0-9]+\\)?\\*" nil t)
(replace-match "\"(point)\"" t t)
- (setq found-C t)))
+ (setq cursor-spec t)))
;; Convert TAB commands.
(goto-char (point-min))
(while (re-search-forward "%\\([-0-9]+\\)=" nil t)
;; Convert the buffer into the spec.
(goto-char (point-min))
(let ((form (read (current-buffer))))
- (if found-C
+ (if cursor-spec
`(let (gnus-position)
,@(gnus-complex-form-to-spec form spec-alist)
(if gnus-position
(let ((re "%%\\|%\\(-\\)?\\([1-9][0-9]*\\)?s")
(n (length args)))
(with-temp-buffer
- (insert-string fstring)
+ (insert fstring)
(goto-char (point-min))
(while (re-search-forward re nil t)
(goto-char (match-end 0))