I have a list of key-value pairs that is assigned to a variable.
(setq m-point '(:beg 2811 :end 3018 :op "(" :cl ")" :prefix "" :suffix ""))
How do I access the values of
:end within it?
I wrote a function that makes use of
smartparens-mode to get the positions of a pair of custom parenthesis.
(defun paren-position () "Returns a list of positions where parenthesis has been sitting." (interactive) (let ((m-point ;; find point with matching parenthesis with `(scan-sexps)`. (list (ignore-errors (sp-backward-sexp) (ignore-errors (sp-forward-sexp)))))) (flatten (remove nil m-point))))
(:beg 2811 :end 3018 :op "(" :cl ")" :prefix "" :suffix "")) is the value returned when the function is called.
This is the first time I am working with such a list with only key-value pairs (somewhat like a Python dictionary), and I don't quite know how to go about it.