emacs-devel
[Top][All Lists]
Advanced

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

make read-face-name behave as promised


From: Roland Winkler
Subject: make read-face-name behave as promised
Date: Sun, 31 Mar 2013 20:35:06 -0500

After fixing a bug in completing-read-multiple (remove empty strings
from the list of read strings) I thought I could also clean up
read-face-name, which worked around this bug.

Yet I got side-tracked by the fact that currently read-face-name
does not behave as promised by its doc string:

- The arg DEFAULT is treated like a single string, though the doc
  string says it should be a list of faces. 

- The arg DEFAULT is ignored if the text at point has a
  `read-face-name' or `face' property. This appears like a bug to me
  because it makes the arg DEFAULT useless in this case.

- If the thing at point is a face, this is taken as the first element
  of DEFAULT.

The patch below makes read-face-name behave as promised by its doc
string. Yet this may cause trouble elsewhere if code relies on the
current behavior of read-face-name.  So I first wanted to post this
patch to emacs-devel.  In the emacs trunk, I found only one function
(describe-face) that relies on the current behavior of
read-face-name. So the patch below fixes this, too. But there might
be other emacs packages (not part of the trunk) that I do not know
about.

Attachment: faces.patch
Description: Binary data


reply via email to

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