emacs-devel
[Top][All Lists]
Advanced

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

Re: display-completion-list should not strip text properties


From: Johan Bockgård
Subject: Re: display-completion-list should not strip text properties
Date: Tue, 04 Sep 2007 12:56:56 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

Juri Linkov <address@hidden> writes:

> Using Lisp expressions inside the doc strings has other drawbacks: writing
> expressions inside strings is poorly supported.  Just think that really
> every quote should be escaped with \:
>
>   "mumble \\,(propertize \"toto\" 'face 'highlight) titi"

There are other self-evaluating Lisp objects besides strings, so the
following idea occurred to me

    (defun foo ()
        ;; (Optional) doc string for old emacsen.
        "mumble toto titi"
        ;; (Optional) doc vector for new emacsen,
        ["mumble " (propertize "toto" 'face 'highlight) " titi"]
        ;; ...or like this,
        [html "mumble <emph>toto</emph> titi"]
        ;; ...or this,
        [texi "mumble @emph{toto} titi"]
        ;; etc.
      BODY...)


:)

-- 
Johan Bockgård





reply via email to

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