From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: 41200@debbugs.gnu.org
Subject: bug#41200: Displaying a tooltip with x-show-tip gets very slow as more faces are defined
Date: Sat, 16 May 2020 19:43:07 -0400 [thread overview]
Message-ID: <3fc34671-54ba-e83d-9514-11e0906c2ac0@gmail.com> (raw)
In-Reply-To: <87367z324f.fsf@mail.linkov.net>
[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]
On 16/05/2020 19.03, Juri Linkov wrote:
>>>>> I think the problem is that tab-line is declared a basic face, but its
>>>>> defface form is not in faces.el.
>>>>
>>>> Ah, good catch. Current there's a defface for tab-bar in lisp/tab-bar, and since that's preloaded it works, but the defface for tab-line is in lisp/tab-line.el and so isn't preloaded.
>>>> Should I move both to faces.el?
>>>>
>>> Yes, I think so.
>>
>> Thanks. I will ask Juri to confirm before moving them, because I realize now that they have a custom group.
>> Juri (CC'd; hi Juri!), was there a reason to make tab-bar and tab-line basic faces? I see they are both in their own files and groups, instead of being in faces.el.
>
> Actually, no reason other than consistency of faces belonging to the
> same file where they are used. But if it will fix the technical problem,
> please move them to faces.el, especially given the fact that their
> counterpart tool-bar face is already defined in faces.el.
Thanks a lot. The attached patch does that.
[-- Attachment #2: 0001-Move-tab-bar-and-tab-line-to-faces.el-part-of-bug-41.patch --]
[-- Type: text/x-patch, Size: 2639 bytes --]
From 4d3349d83791a57cdc01374c82792fff6e1b8a94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Pit-Claudel?= <clement.pitclaudel@live.com>
Date: Sat, 16 May 2020 19:36:43 -0400
Subject: [PATCH] Move tab-bar and tab-line to faces.el (part of bug#41200)
These are basic faces, so they need to be defined in
faces.el (otherwise (get 'tab-line 'face) returns 0).
* lisp/tab-bar.el (tab-bar):
* lisp/tab-line.el (tab-line): Move from here...
* lisp/faces.el (menu): ...to here.
---
lisp/faces.el | 27 +++++++++++++++++++++++++++
lisp/tab-bar.el | 13 -------------
lisp/tab-line.el | 14 --------------
3 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/lisp/faces.el b/lisp/faces.el
index bb51797a38..b495fb6e87 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2755,6 +2755,33 @@ tool-bar
:version "21.1"
:group 'basic-faces)
+(defface tab-line
+ '((((class color) (min-colors 88))
+ :inherit variable-pitch
+ :height 0.9
+ :background "grey85"
+ :foreground "black")
+ (((class mono))
+ :background "grey")
+ (t
+ :inverse-video t))
+ "Tab line face."
+ :version "27.1"
+ :group 'basic-faces)
+
+(defface tab-bar
+ '((((class color) (min-colors 88))
+ :inherit variable-pitch
+ :background "grey85"
+ :foreground "black")
+ (((class mono))
+ :background "grey")
+ (t
+ :inverse-video t))
+ "Tab bar face."
+ :version "27.1"
+ :group 'basic-faces)
+
(defface menu
'((((type tty))
:inverse-video t)
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index ce6d8c33dd..689481b28b 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -50,19 +50,6 @@ tab-bar-faces
:group 'faces
:version "27.1")
-(defface tab-bar
- '((((class color) (min-colors 88))
- :inherit variable-pitch
- :background "grey85"
- :foreground "black")
- (((class mono))
- :background "grey")
- (t
- :inverse-video t))
- "Tab bar face."
- :version "27.1"
- :group 'tab-bar-faces)
-
(defface tab-bar-tab
'((default
:inherit tab-bar)
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 7a2bdc0b72..50ec40bacf 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -41,20 +41,6 @@ tab-line-faces
:group 'faces
:version "27.1")
-(defface tab-line
- '((((class color) (min-colors 88))
- :inherit variable-pitch
- :height 0.9
- :background "grey85"
- :foreground "black")
- (((class mono))
- :background "grey")
- (t
- :inverse-video t))
- "Tab line face."
- :version "27.1"
- :group 'tab-line-faces)
-
(defface tab-line-tab
'((default
:inherit tab-line)
--
2.17.1
next prev parent reply other threads:[~2020-05-16 23:43 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 4:30 bug#41200: Displaying a tooltip with x-show-tip gets very slow as more faces are defined Clément Pit-Claudel
2020-05-12 6:42 ` martin rudalics
2020-05-12 11:30 ` Clément Pit-Claudel
2020-05-12 15:12 ` martin rudalics
2020-05-12 17:19 ` Clément Pit-Claudel
2020-05-12 17:42 ` martin rudalics
2020-05-12 17:58 ` Eli Zaretskii
2020-05-13 14:58 ` martin rudalics
2020-05-12 15:27 ` Eli Zaretskii
2020-05-13 2:41 ` Clément Pit-Claudel
2020-05-13 14:58 ` martin rudalics
2020-05-13 15:13 ` Clément Pit-Claudel
2020-05-13 17:42 ` martin rudalics
2020-05-15 11:05 ` Eli Zaretskii
2020-05-15 14:59 ` Clément Pit-Claudel
2020-05-15 15:17 ` Eli Zaretskii
2020-05-15 15:33 ` Noam Postavsky
2020-05-15 16:22 ` Clément Pit-Claudel
2020-05-15 17:28 ` Eli Zaretskii
2020-05-15 18:50 ` Clément Pit-Claudel
2020-05-15 19:05 ` Eli Zaretskii
2020-05-15 19:23 ` Clément Pit-Claudel
2020-05-15 19:38 ` Eli Zaretskii
2020-05-15 19:52 ` Clément Pit-Claudel
2020-05-16 23:03 ` Juri Linkov
2020-05-16 23:43 ` Clément Pit-Claudel [this message]
2020-05-17 21:59 ` Juri Linkov
2020-05-18 1:19 ` Clément Pit-Claudel
2020-05-19 21:48 ` Juri Linkov
[not found] ` <83a71z135p.fsf@gnu.org>
2020-05-23 22:47 ` Juri Linkov
2020-05-24 2:33 ` Eli Zaretskii
2020-05-24 21:50 ` Juri Linkov
2020-06-08 0:21 ` Juri Linkov
2020-06-20 7:47 ` Eli Zaretskii
2020-06-20 16:55 ` Clément Pit-Claudel
2020-07-04 7:58 ` Eli Zaretskii
2020-09-13 2:53 ` Benson Chu
2020-05-15 14:03 ` Stefan Monnier
2020-05-15 14:34 ` Eli Zaretskii
2020-05-15 19:10 ` Clément Pit-Claudel
2020-05-15 21:23 ` Stefan Monnier
2020-05-16 8:45 ` martin rudalics
2021-04-06 6:35 ` Jashank Jeremy
2021-04-06 12:30 ` Eli Zaretskii
2021-04-06 15:07 ` Clément Pit-Claudel
2021-04-06 15:50 ` Eli Zaretskii
2021-04-23 3:56 ` Stefan Monnier
2021-05-12 20:29 ` Lars Ingebrigtsen
2021-05-13 3:56 ` Jashank Jeremy
2021-05-13 9:15 ` Lars Ingebrigtsen
2021-05-13 23:26 ` Jashank Jeremy
2021-06-12 12:15 ` Lars Ingebrigtsen
2021-06-13 3:19 ` Richard Stallman
2021-07-06 12:41 ` Aaron Jensen
2021-07-21 14:02 ` Lars Ingebrigtsen
2021-07-21 14:28 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-21 14:32 ` Clément Pit-Claudel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3fc34671-54ba-e83d-9514-11e0906c2ac0@gmail.com \
--to=cpitclaudel@gmail.com \
--cc=41200@debbugs.gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).