This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Yet more confusion over strings and objects in Lisp.


On 6/25/02 0:07, "Gre7g Luterman" <gre7g@wolfhome.com> wrote:
>> (make element gi: "DIV"
>>   attributes: '(("CLASS" "NAVHEADER"))
>>   (nav-context elemnode)
>>   (if (string=? (nav-context elemnode) "") (empty-sosofo)
>>     (make empty-element gi: "HR"
>>       attributes: (list
>>       (list "ALIGN" "LEFT")
>>       (list "WIDTH" %gentext-nav-tblwidth%)))))
> 
> Doesn't anyone know the correct Lisp code to do the above?
> 
> It can't be too much more sophisticated than the above, can it?

I'm not sure "correct Lisp code" means but you can shorten list expressions
by using quasiquotation.

(make element gi: "DIV"
  attributes: '(("CLASS" "NAVHEADER"))
  (nav-context elemnode)
  (if (string=? (nav-context elemnode) "") (empty-sosofo)
    (make empty-element gi: "HR"
      attributes: `(("ALIGN" "LEFT") ("WIDTH" ,%gentext-nav-tblwidth%)))))


Regards,
  Kogulé, Ryo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]