summaryrefslogtreecommitdiffstats
path: root/2023/talks
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2025-11-07 13:28:59 -0500
committerSacha Chua <sacha@sachachua.com>2025-11-07 13:28:59 -0500
commit229704df1309e4d8ef2104a60474a7211e4f5579 (patch)
treed91763bd954db2bffa73b61e2a4395fd4fa69a54 /2023/talks
parent4d56e5a1edc53973b2d778dd690afa9206485ba7 (diff)
downloademacsconf-wiki-229704df1309e4d8ef2104a60474a7211e4f5579.tar.xz
emacsconf-wiki-229704df1309e4d8ef2104a60474a7211e4f5579.zip
let's try this way
Diffstat (limited to '')
-rw-r--r--2023/talks/flat.md46
1 files changed, 23 insertions, 23 deletions
diff --git a/2023/talks/flat.md b/2023/talks/flat.md
index 6afcd8cc..3461c9a2 100644
--- a/2023/talks/flat.md
+++ b/2023/talks/flat.md
@@ -42,31 +42,31 @@ activities.
in Emacs core?
- 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)
- ```
+ - 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)
+
- **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)))
- ```
+ 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 ;-)