From 3cddbd1949bae0742d5a1a8128b39da11aa04b1d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 16 Aug 2018 02:18:44 +0200 Subject: [PATCH] Fix void-variable string #809 --- modules/lang/web/+html.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/lang/web/+html.el b/modules/lang/web/+html.el index cec94b1b1..5c896e08c 100644 --- a/modules/lang/web/+html.el +++ b/modules/lang/web/+html.el @@ -39,9 +39,10 @@ unless (string-match-p "^[a-z-]" (cdr pair)) collect (cons (car pair) ;; TODO Replace with `string-trim-right' (Emacs 26+) - (if (string-match "\\(?:>\\|]\\|}\\)+\\'" string) - (replace-match "" t t string) - string))))) + (let ((string (cdr pair))) + (if (string-match "\\(?:>\\|]\\|}\\)+\\'" string) + (replace-match "" t t string) + string)))))) (setf (alist-get nil web-mode-engines-auto-pairs) nil)) (map! :map web-mode-map