From 068fdb2c775720c34f127b2eab8c68fc5f924e7f Mon Sep 17 00:00:00 2001 From: Protesilaos Stavrou Date: Mon, 15 Mar 2021 10:04:20 -0400 Subject: [PATCH] Make the `kbd` macro work in both Emacs-26 and Emacs-28 This is so that elpa.gnu.org's Emacs-26 can successfully build the Info version of it for the GNU ELPA package. --- doc/misc/modus-themes.org | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org index ed464e84656..9764a3467fa 100644 --- a/doc/misc/modus-themes.org +++ b/doc/misc/modus-themes.org @@ -10,10 +10,7 @@ #+macro: export-date (eval (format-time-string "%F %R %z" (current-time))) #+macro: file @@texinfo:@file{@@$1@@texinfo:}@@ #+macro: space @@texinfo:@: @@ -# The "kbd" macro turns KBD into @kbd{KBD}. Additionally, it -# encloses case-sensitive special keys (SPC, RET...) within @key{...}. -# I got this from the Org source code. -#+macro: kbd (eval (let ((case-fold-search nil) (regexp (regexp-opt '("SPC" "RET" "LFD" "TAB" "BS" "ESC" "DELETE" "SHIFT" "Ctrl" "Meta" "Alt" "Cmd" "Super" "UP" "LEFT" "RIGHT" "DOWN") 'words))) (format "@@texinfo:@kbd{@@%s@@texinfo:}@@" (replace-regexp-in-string regexp "@@texinfo:@key{@@\\&@@texinfo:}@@" $1 t)))) +#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@ #+texinfo_filename: modus-themes.info #+texinfo_dir_category: Emacs misc features -- 2.39.5