summaryrefslogtreecommitdiff
path: root/src/frame.h
diff options
context:
space:
mode:
authorJashank Jeremy <jashank@rulingia.com.au>2021-07-21 16:01:03 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-07-21 16:01:13 +0200
commite3b8ddd5005903465ec86823559a2e884c7b13f2 (patch)
tree034f55b94d1241544c49225092d9ed672384b8d1 /src/frame.h
parente56ad2cb0f0cff2b7c2359bc3fa0b432dfd571f5 (diff)
downloademacs-e3b8ddd5005903465ec86823559a2e884c7b13f2.tar.gz
Speed up by storing frame faces in hash tables instead of alists
* src/frame.h (struct frame): Add face_hash_table, remove face_alist. (fset_face_hash_table): New function. (fset_face_alist): Remove. * src/frame.c (make_frame): Initialize f->face_hash_table. (Fmake_terminal_frame): Update to work with hash tables instead of alists. * src/xfaces.c (lface_from_face_name_no_resolve): (Finternal_make_lisp_face): (update_face_from_frame_parameter): Update to work with hash tables instead of alists. (Fframe_face_hash_table): New function. (Fframe_face_alist): Move to faces.el as frame-face-alist. (syms_of_xfaces): Add frame_face_hash_table. * lisp/progmodes/elisp-mode.el (elisp--eval-defun-1): * lisp/frame.el (frame-set-background-mode): Update to work with hash tables instead of alists. * lisp/faces.el (face-new-frame-defaults): Mark obsolete. (face-list): Update to use face--new-frame-defaults. (frame-face-alist): Moved here from src/xfaces.c. (x-create-frame-with-faces): Update to handle subtle semantic change to how frame faces propagate, which otherwise breaks frame creation with reverse video enabled (bug#41200). Reworked from a patch by Clément Pit-Claudel <clement.pitclaudel@live.com>.
Diffstat (limited to 'src/frame.h')
-rw-r--r--src/frame.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/frame.h b/src/frame.h
index cad3df5ae10..a8ad011889d 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -158,8 +158,8 @@ struct frame
There are four additional elements of nil at the end, to terminate. */
Lisp_Object menu_bar_items;
- /* Alist of elements (FACE-NAME . FACE-VECTOR-DATA). */
- Lisp_Object face_alist;
+ /* Hash table of FACE-NAME keys and FACE-VECTOR-DATA values. */
+ Lisp_Object face_hash_table;
/* A vector that records the entire structure of this frame's menu bar.
For the format of the data, see extensive comments in xmenu.c.
@@ -672,9 +672,9 @@ fset_condemned_scroll_bars (struct frame *f, Lisp_Object val)
f->condemned_scroll_bars = val;
}
INLINE void
-fset_face_alist (struct frame *f, Lisp_Object val)
+fset_face_hash_table (struct frame *f, Lisp_Object val)
{
- f->face_alist = val;
+ f->face_hash_table = val;
}
#if defined (HAVE_WINDOW_SYSTEM)
INLINE void