summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-23 06:47:13 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-23 06:47:13 +0200
commit73a915189ace996d406131716f0ce42bf2a7192c (patch)
tree59c4f18edb20586920b00bf1f87b0f588171c774
parent48f4d85f18795619035ad00f14f9e1c743275801 (diff)
Add a macro for references
-rw-r--r--m4/ref.m46
-rw-r--r--src/blog/windowing/index.gsp4
2 files changed, 8 insertions, 2 deletions
diff --git a/m4/ref.m4 b/m4/ref.m4
new file mode 100644
index 0000000..482763b
--- /dev/null
+++ b/m4/ref.m4
@@ -0,0 +1,6 @@
+m4_define(__REFCNT, 0)
+m4_define(MKREF, ‘‘
+ m4_define(‘‘__REFCNT’’, m4_incr(__REFCNT))
+ m4_define(‘‘__REF_$1’’, __REFCNT)
+’’)
+m4_define(REF, ‘‘__REF_$1’’)
diff --git a/src/blog/windowing/index.gsp b/src/blog/windowing/index.gsp
index 4307ecb..285451e 100644
--- a/src/blog/windowing/index.gsp
+++ b/src/blog/windowing/index.gsp
@@ -56,7 +56,7 @@ html lang="en" {
while launching a second application will cause the screen to be
segmented into two halves, with one window taking up 50% of the
screen on the left and another taking up 50% of the screen on the
- right@sup{-1}.
+ right@sup{-MKREF(wm)}.
}
p {=
@@ -73,7 +73,7 @@ html lang="en" {
hr{}
- aside data-ref="1" {=
+ aside data-ref="REF(wm)" {=
This is very dependent on the window manager being used and the
users configuration of it of course, but this holds in the
general case in my personal experience.