]> git.eshelyaron.com Git - emacs.git/commit
Speed up by storing frame faces in hash tables instead of alists
authorJashank Jeremy <jashank@rulingia.com.au>
Wed, 21 Jul 2021 14:01:03 +0000 (16:01 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 21 Jul 2021 14:01:13 +0000 (16:01 +0200)
commite3b8ddd5005903465ec86823559a2e884c7b13f2
tree034f55b94d1241544c49225092d9ed672384b8d1
parente56ad2cb0f0cff2b7c2359bc3fa0b432dfd571f5
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>.
lisp/custom.el
lisp/faces.el
lisp/frame.el
lisp/progmodes/elisp-mode.el
src/frame.c
src/frame.h
src/xfaces.c