Mercurial > core / lisp/lib/organ/element/lesser/keyword.lisp
changeset 698: |
96958d3eb5b0 |
parent: |
609931bd65ba
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
1 ;;; lib/organ/element/lesser/keyword.lisp --- Org Keyword Element 3 ;; Keywords match the pattern '#+KEY: VALUE' 5 ;; VALUE can be any of the standard-set of objects. 7 ;; Affiliated keywords match the patterns: 18 (define-org-element keyword 19 ((key :accessor keyword-key :initarg :key :type string) 20 (val :accessor keyword-val :initarg :val)) 23 (define-org-parser (keyword :from string) 24 (multiple-value-bind (match-start match-end start end) (scan org-file-property-rx input) 25 (declare (ignore match-end)) 27 (let ((key (subseq input (aref start 0) (aref end 0))) 28 (val (subseq input (aref start 1) (aref end 1)))) 29 (org-create :keyword :key key :val val))))) 31 (define-org-element affiliated-keyword (key opt value) :lesser t) 33 (define-org-parser (affiliated-keyword :from string))