*** emacs/lisp/gnus/format-spec.el~ 2003-09-01 17:45:23.000000000 +0200 --- emacs/lisp/gnus/format-spec.el 2005-05-13 17:48:07.438183352 +0200 *************** *** 45,54 **** (let* ((num (match-string 1)) (spec (string-to-char (match-string 2))) (val (cdr (assq spec specification)))) - (delete-region (1- (match-beginning 0)) (match-end 0)) (unless val (error "Invalid format character: %s" spec)) ! (insert (format (concat "%" num "s") val)))) ;; Signal an error on bogus format strings. (t (error "Invalid format string")))) --- 45,59 ---- (let* ((num (match-string 1)) (spec (string-to-char (match-string 2))) (val (cdr (assq spec specification)))) (unless val (error "Invalid format character: %s" spec)) ! (let ((text (format (concat "%" num "s") val))) ! (insert-and-inherit text) ! ;; Delete the specifier body. ! (delete-region (+ (match-beginning 0) (length text)) ! (+ (match-end 0) (length text))) ! ;; Delete the percent sign. ! (delete-region (1- (match-beginning 0)) (match-beginning 0))))) ;; Signal an error on bogus format strings. (t (error "Invalid format string"))))