diff --git a/src/date-formatter.lisp b/src/date-formatter.lisp index 0d3502d..d0f9412 100644 --- a/src/date-formatter.lisp +++ b/src/date-formatter.lisp @@ -35,6 +35,9 @@ "%%") (:text t)) +(defrule date-formatter-percent #\% + (:constant :key)) + (defrule date-formatter-text (+ (not date-formatter-percent)) (:text t)) diff --git a/src/keybindings.lisp b/src/keybindings.lisp index 91c411f..16572c2 100644 --- a/src/keybindings.lisp +++ b/src/keybindings.lisp @@ -95,7 +95,7 @@ (defrule keybindings-blank (or #\space #\Newline #\Tab) (:constant nil)) -(defrule keybindings-blanks (* blank) +(defrule keybindings-blanks (* keybindings-blank) (:constant nil)) (defrule keybindings-escaped-character (and #\\ character) @@ -151,15 +151,15 @@ "key-next-page" "key-previous-page" "key-delete-char" - arrow-right - arrow-left - arrow-up - arrow-down - key-home - key-end - key-next-page - key-previous-page - key-delete-next-char) + keybindings-arrow-right + keybindings-arrow-left + keybindings-arrow-up + keybindings-arrow-down + keybindings-key-home + keybindings-key-end + keybindings-key-next-page + keybindings-key-previous-page + keybindings-key-delete-next-char) (:text t) (:function string-upcase)) @@ -259,7 +259,8 @@ produces a tree and graft the latter on `existing-tree'" (add-child tree new-node) (add new-node (rest commands))) nil))) - (let ((raw (parse 'keypath (strcat keypath " " +function-placeholder-re+))) + (let ((raw (parse 'keybindings-keypath (strcat keypath " " + +function-placeholder-re+))) (new-tree (make-starting-comand-tree))) (add new-tree raw) (graft-branch existing-tree