[Top][All Lists]

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

Re: [PATCH] Add prettify symbols to python-mode

From: Eli Zaretskii
Subject: Re: [PATCH] Add prettify symbols to python-mode
Date: Wed, 23 Sep 2015 22:24:02 +0300

> From: David Kastrup <address@hidden>
> Cc: address@hidden,  address@hidden,  address@hidden
> Date: Wed, 23 Sep 2015 19:58:18 +0200
> Eli Zaretskii <address@hidden> writes:
> >> From: David Kastrup <address@hidden>
> >> Date: Wed, 23 Sep 2015 18:52:16 +0200
> >> Cc: Xue Fuqiao <address@hidden>, address@hidden, address@hidden
> >> 
> >> C may not be a complicated language but it offers no significant
> >> in-language features for integrating data structures and their
> >> manipulators.  As a consequence, working with Elisp data in C does not
> >> resemble either working with C or with Lisp.
> >
> > We have a small set of macros that make this a non-issue.
> Lisp_Object x[2];
> x[0] = a;
> x[1] = b;
> return Fplus (2, x);
> does not resemble either a+b or (+ a b).  A non-issue is something else.

Where's "Elisp data" in this example?

I thought by "working with Elisp data in C" you meant using Lisp data
structures passed to C functions, in which case the following is what
I had in mind (where 'value' is some Lisp data type):

  if (EQ (value, Qunspecified) || (EQ (value, QCignore_defface)))
    return Qt;
  else if (EQ (attribute, QCheight))
    return INTEGERP (value) ? Qnil : Qt;
  else if (CONSP (value) && EQ (XCAR (value), QCwhatever))
    return XCDR (value);
    return Qnil;

reply via email to

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