From 446a0f72fa6aceeab754d93fde865569a46fda90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Sun, 22 Jan 2023 15:21:27 +0000 Subject: [PATCH] Add redact function --- custom/al-bhed.el | 62 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/custom/al-bhed.el b/custom/al-bhed.el index 4344af9..1620eb9 100644 --- a/custom/al-bhed.el +++ b/custom/al-bhed.el @@ -140,3 +140,65 @@ ["Q" "X"] ["O" "Y"] ["W" "Z"]))) + +(defun redact (*begin *end) + (interactive + (if (use-region-p) + (list (region-beginning) (region-end)) + (list (line-beginning-position) (line-end-position)))) + (replace-pairs-region + *begin + *end + '( + ["a" "x"] + ["b" "x"] + ["c" "x"] + ["d" "x"] + ["e" "x"] + ["f" "x"] + ["g" "x"] + ["h" "x"] + ["i" "x"] + ["j" "x"] + ["k" "x"] + ["l" "x"] + ["m" "x"] + ["n" "x"] + ["o" "x"] + ["p" "x"] + ["q" "x"] + ["r" "x"] + ["s" "x"] + ["t" "x"] + ["u" "x"] + ["v" "x"] + ["w" "x"] + ["x" "x"] + ["y" "x"] + ["z" "x"] + ["A" "x"] + ["B" "x"] + ["C" "x"] + ["D" "x"] + ["E" "x"] + ["F" "x"] + ["G" "x"] + ["H" "x"] + ["I" "x"] + ["J" "x"] + ["K" "x"] + ["L" "x"] + ["M" "x"] + ["N" "x"] + ["O" "x"] + ["P" "x"] + ["Q" "x"] + ["R" "x"] + ["S" "x"] + ["T" "x"] + ["U" "x"] + ["V" "x"] + ["W" "x"] + ["X" "x"] + ["Y" "x"] + ["Z" "x"])))