emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug] `format' with a partially propertized format string doesn't work


From: Wedler, Christoph
Subject: [Bug] `format' with a partially propertized format string doesn't work
Date: Mon, 7 Apr 2003 19:27:52 +0200

[Test using Emacs-21.2.95.1.]

If you propertize a format string completely, `format' works as
expected:

    (format (propertize "x: %s, y" 'face 'bold) "123456")
    => #("x: 123456, y" 0 12 (face bold))

If the format string is not propertized completely, it doesn't:

    (let ((s "x: %s, y"))
      (set-text-properties 3 5 '(face bold) s)
      (format s "123456"))
    => #("x: 123456, y" 0 3 nil 3 5 (face bold) 5 12 nil)

    (format (concat "x: " (propertize "%s" 'face 'bold) ", y") "123456")
    => #("x: 123456, y" 0 3 nil 3 5 (face bold) 5 12 nil)

- Christoph




reply via email to

[Prev in Thread] Current Thread [Next in Thread]