emacs-devel
[Top][All Lists]
Advanced

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

Re: prin1 / princ vs message ?


From: Philipp Stephani
Subject: Re: prin1 / princ vs message ?
Date: Sun, 02 Jul 2017 14:27:24 +0000



Jean-Christophe Helary <address@hidden> schrieb am So., 2. Juli 2017 um 16:03 Uhr:
Conclusion of that exchange (sorry for being a little slow to understand everything the 3 of you wrote):

This:
    (prin1 name)
    (princ " is ")
    (princ (if (memq (aref status 0) '(?a ?e ?i ?o ?u)) "an " "a "))
    (princ status)
    (princ " package.\n\n")

Can reasonably be replaced by this:
    (let (sentence (format "The status of package %1$S is `%2$s'.\n\n" name status)))
    (princ sentence))

Is that correct ?

You should probably use `format-message' instead of `format' here. `format-message' is for messages displayed to the user, and I'd imagine when introducing localization you'd integrate it only with `format-message', not `format'. 

reply via email to

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