GNU bug report logs - #20707
[PROPOSED PATCH] Use curved quoting in C-generated errors

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Mon, 1 Jun 2015 07:41:05 UTC

Severity: wishlist

Tags: patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 20707 <at> debbugs.gnu.org
Subject: bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated errors
Date: Tue, 2 Jun 2015 20:44:23 +0000
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).




This bug report was last modified 4 years and 361 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.