From 74c78adc6a0451527e94d4d03f173561b373b1ef Mon Sep 17 00:00:00 2001 From: cage Date: Wed, 19 Jun 2024 15:51:11 +0200 Subject: [PATCH] - prefixed all parsing rule for modeline parsing to avoid clash with other rules in the code. --- src/modeline-window.lisp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modeline-window.lisp b/src/modeline-window.lisp index c38ed51..0073801 100644 --- a/src/modeline-window.lisp +++ b/src/modeline-window.lisp @@ -50,7 +50,7 @@ ;; PERCENT := '%' ;; TEXT := (not percent)+ -(defrule key +(defrule modeline-key (or #\% #\a #\b #\c #\d #\e #\f #\g #\h #\i #\j #\k #\l #\m #\n #\o #\p #\q #\r #\s #\t #\u #\v #\w #\x #\y #\z @@ -58,15 +58,15 @@ #\N #\O #\P #\Q #\R #\S #\T #\U #\V #\W #\X #\Y #\Z) (:text t)) -(defrule percent #\% +(defrule modeline-percent #\% (:constant :key)) -(defrule field (and percent key)) +(defrule modeline-field (and modeline-percent modeline-key)) -(defrule text (+ (not percent)) +(defrule modeline-text (+ (not modeline-percent)) (:text t)) -(defrule modeline (* (or field text))) +(defrule modeline-modeline (* (or modeline-field modeline-text))) (defun call-function-mapped (win key mapping) (let ((fn (cdr (assoc key mapping :test #'string=))))