unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* intern-soft, find-face/get-face, and facep for determining faces' definedness
@ 2004-11-01 21:40 Brian Palmer
  2004-11-02  6:14 ` Stephen J. Turnbull
  0 siblings, 1 reply; 24+ messages in thread
From: Brian Palmer @ 2004-11-01 21:40 UTC (permalink / raw)


In vc.el, vc-annotate-lines, the following binding is established:
(face (or (intern-soft face-name)
	  (let ((tmp-face (make-face (intern face-name))))
	    (set-face-foreground tmp-face (cdr color))
	    (if vc-annotate-background
		(set-face-background tmp-face
				     vc-annotate-background))
	    tmp-face))); Return the face

This is true in both emacs and the recently-synced xemacs vc.el (a
similar issue was present in the older xemacs code). This seems
frankly wrong to me; it doesn't matter whether the symbol has been
interned, it matters whether the face has been defined. A fix would be
in emacs to use (facep face-name) and in xemacs to use (find-face
face-name), instead.

The two different approaches seems troublesome to me; it'd be nice if
the same functions could be used in both . Xemacs developers, is there
any reason that xemacs's facep should not be extended to take either
face objects or names (so, for example, (facep 'bold) => t )? Or 
could find-face/get-face be implemented for emacs? (They seem like
probably useful functions to me). It seems like it'd be as simple as

(if (facep FACE) 
    (make-face FACE) 
  (cerror 'nonexistent-face (format "Face %s doesn't exist" FACE)))

Or, both. Thoughts appreciated.

-- 
I'm awfully glad I'm a Beta, because I don't work so hard.

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2004-11-09 14:41 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-01 21:40 intern-soft, find-face/get-face, and facep for determining faces' definedness Brian Palmer
2004-11-02  6:14 ` Stephen J. Turnbull
2004-11-02  7:28   ` Brian Palmer
2004-11-02  7:45     ` Miles Bader
2004-11-02  8:48       ` Brian Palmer
2004-11-02  9:08         ` Miles Bader
2004-11-02  9:21           ` Brian Palmer
2004-11-02  9:50             ` Miles Bader
2004-11-02 12:06               ` Stephen J. Turnbull
2004-11-02 22:20                 ` Miles Bader
2004-11-06  9:31                   ` Oliver Scholz
2004-11-02 11:07           ` Stephen J. Turnbull
2004-11-02 12:01             ` Stefan
2004-11-02 22:23               ` Miles Bader
2004-11-03 12:45               ` Richard Stallman
2004-11-03 14:15                 ` Stefan Monnier
2004-11-03 15:01                   ` Zajcev Evgeny
2004-11-03 15:20                     ` Andreas Schwab
2004-11-03 15:54                       ` Zajcev Evgeny
2004-11-04  9:28                         ` Stephen J. Turnbull
2004-11-03 15:48                     ` Stefan Monnier
2004-11-04  3:41               ` Stephen J. Turnbull
2004-11-05  7:55                 ` Stefan
2004-11-09 14:41                   ` Stephen J. Turnbull

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).