bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated errors


From: Alan Mackenzie
Subject: bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated errors
Date: Tue, 2 Jun 2015 20:44:23 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello again, Paul.

On Tue, Jun 02, 2015 at 05:07:24PM +0000, Alan Mackenzie wrote:

> As I've suggested before, why don't you make --with-curly-quotes a
> configuration option?

All you would need (at least, in the C files) would be a macro
declaration like this:

    #ifdef WITH_CURLY_QUOTES
    #define Q(s) "?" #s "?"
    #else
    #define Q(s) "`" #s "'"
    #endif

, and a typical use of Q would look like this:

    error ("Buffer name " Q(%s) " is in use", SDATA (name));

.  The preprocessor produces either this:

    error ("Buffer name " "`" "%s" "'" " is in use", SDATA (name));

, or this

    error ("Buffer name " "?" "%s" "?" " is in use", SDATA (name));

, depending on whether WITH_CURLY_QUOTES is defined.

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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