diff options
| author | Sacha Chua <sacha@sachachua.com> | 2025-11-07 13:23:33 -0500 |
|---|---|---|
| committer | Sacha Chua <sacha@sachachua.com> | 2025-11-07 13:23:33 -0500 |
| commit | 42352a69ece3f28d1d70ab4f98fa88318ec18a00 (patch) | |
| tree | ef03694ca2e73172c58d7445b1de9d6022212565 /2023 | |
| parent | 86528c0fd5e692710b0093803d3f40b30b3d6ad2 (diff) | |
| download | emacsconf-wiki-42352a69ece3f28d1d70ab4f98fa88318ec18a00.tar.xz emacsconf-wiki-42352a69ece3f28d1d70ab4f98fa88318ec18a00.zip | |
Add update
Diffstat (limited to '2023')
| -rw-r--r-- | 2023/talks/flat.md | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/2023/talks/flat.md b/2023/talks/flat.md index bf579540..cb4e5398 100644 --- a/2023/talks/flat.md +++ b/2023/talks/flat.md @@ -43,17 +43,32 @@ activities. - A: About a 20-line patch. - Q: Could you please share the code for copy and paste? Thx! - A: - - (defun flat-style(theme &rest args) - - (custom-set-faces - - `(mode-line - - ((t (:inherit mode-line - - :box (:line-width ,mode-line-height :style - flat-button)))) t) - - `(mode-line-inactive - - ((t (:inherit mode-line-inactive - - :box (:line-width ,mode-line-height :style - flat-button)))) t))) - - (advice-add 'load-theme :after #'flat-style) + ``` + (defun flat-style (theme &rest args) + (custom-set-faces + `(mode-line + ((t (:inherit mode-line + :box (:line-width ,mode-line-height :style + flat-button)))) t) + `(mode-line-inactive + ((t (:inherit mode-line-inactive + :box (:line-width ,mode-line-height :style + flat-button)))) t))) + (advice-add 'load-theme :after #'flat-style) + ``` + - **Important change 2 years later.** + CHANGES IN EMACS MASTER make the code above CRASH. Emacs, + The new flat-style function uses set-face-attribute: + ``` + (defvar mode-line-height 8 "Size of the box arounf the mode line") + + (defun lat-style (theme &rest _) + (set-face-attribute 'mode-line nil + :box (list :line-width mode-line-height :style 'flat-button)) + (set-face-attribute 'mode-line-inactive nil + :box (list :line-width mode-line-height :style 'flat-button))) + ``` + - Q: Do you teach Emacs to any of your university students? - A: No teaching, but a lot of introdcuing ;-) |
