diff options
author | Chong Yidong <cyd@gnu.org> | 2012-06-09 15:27:15 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-06-09 15:27:15 +0800 |
commit | 4428609619012013fe869dd2b35b14eddbb1d338 (patch) | |
tree | 94c2e8c43664b4a616c5de94375935742f269f3b /src/fringe.c | |
parent | 6175e34b61bb75d18a91d4774c629fb6fb28ab32 (diff) | |
download | emacs-4428609619012013fe869dd2b35b14eddbb1d338.tar.gz |
* fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive case.
Fixes: debbugs:9752
Diffstat (limited to 'src/fringe.c')
-rw-r--r-- | src/fringe.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/fringe.c b/src/fringe.c index c591d391e9f..39f7e8dbb54 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -1671,23 +1671,27 @@ If FACE is nil, reset face to default fringe face. */) (Lisp_Object bitmap, Lisp_Object face) { int n; - int face_id; CHECK_SYMBOL (bitmap); n = lookup_fringe_bitmap (bitmap); if (!n) error ("Undefined fringe bitmap"); + /* The purpose of the following code is to signal an error if FACE + is not a face. This is for the caller's convenience only; the + redisplay code should be able to fail gracefully. Skip the check + if FRINGE_FACE_ID is unrealized (as in batch mode and during + daemon startup). */ if (!NILP (face)) { - face_id = lookup_derived_face (SELECTED_FRAME (), face, - FRINGE_FACE_ID, 1); - if (face_id < 0) + struct frame *f = SELECTED_FRAME (); + + if (FACE_FROM_ID (f, FRINGE_FACE_ID) + && lookup_derived_face (f, face, FRINGE_FACE_ID, 1) < 0) error ("No such face"); } fringe_faces[n] = face; - return Qnil; } |