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: Juri Linkov
Subject: Re: display-completion-list should not strip text properties
Date: Tue, 04 Sep 2007 02:48:28 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

>     Or using \, like in the query-replace string to eval part of the
>     replacement string:
>
>     (defun foo ()
>       "mumble \\,(propertize "toto" 'face 'highlight) titi"
>       whatever)
>
> That is a clean feature.

I proposed only a new syntax for this feature, but now after thinking more
about the whole idea, I see that this feature is too ad-hoc.  Allowing to
eval arbitrary expressions while printing the doc string in the Help
buffer is too fragile approach.  There is no guarantee that after all
interacting evaluations there will a readable result in the Help buffer.

I think a better approach is to use a markup language in doc strings,
be it XHTML or even TexinfoML.  Then using a style sheet it can be
formatted nicely in the Help buffer.  Example of a doc string:

(defun foo ()
  "To create a file, just <emph>visit it</emph> with <kbd>C-x C-f</kbd>.
See also <xref>find-file-literally</xref>."
)

Another advantage is this approach is that instead of using heuristics
for guessing the formatting of the doc string (highlighting the function
arguments, and making references for quoted symbols) it is possible to
specify this explicitly.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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