emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 7572740 3/3: Add error handling to magic-mode-a


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 7572740 3/3: Add error handling to magic-mode-alist
Date: Tue, 28 Feb 2017 20:35:46 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> +                               "Problem in magic-mode-alist with element %s"
> +                               re))))))))

I recommend to always use %S when printing an Elisp value for error
reporting to help debug problems, and only use %s when you want to embed
a string.  %s leads to weird results when printing structures that
contain strings, such as:

    (format "%s" '("a)" "b"))
    =>
    "(a) b)"


-- Stefan



reply via email to

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