emacs-devel
[Top][All Lists]
Advanced

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

Re: cannot understand Elisp manual node Glyphs


From: David Kastrup
Subject: Re: cannot understand Elisp manual node Glyphs
Date: Thu, 08 Feb 2007 09:51:54 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

address@hidden (Kim F. Storm) writes:

> Miles Bader <address@hidden> writes:
>
>> address@hidden (Kim F. Storm) writes:
>>> These functions are handy:
>>>
>>> (defun make-glyph-with-face (c face)
>>>   "Return a glyph code representing char C with face FACE."
>>>   (logior c (lsh (face-id face) 19)))
>>
>> Good idea, but why not just call it "make-glyph"...?
>
> Because Xemacs already has a function named make-glyph with
> different semantics.
>
> But maybe we don't need to care about that?

In my opinion, we really should.  It is one thing if stuff fails with
undefined functions when porting.  It is another if stuff fails in
mysterious ways (at best because of incompatible argument types).

> Maybe the face arg should be optional, and we could use the
> following names to avoid confusion:
>
> make-display-glyph (char &optional face)
> display-glyph-face (glyph)
> display-glyph-char (glyph)

Well, picking from the doc string, make-glyph-code would seem a
suitable choice, too.

-- 
David Kastrup




reply via email to

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