-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
I'm currently in the need of parsing just a fraction of a buffer, so I thought on changing the signature of parseclj-parse-clojure
to something like:
(defun parseclj-parse-clojure (&optional bounds-or-string options)
...)
bounds-or-string
can be either a list (or cons) with positions/markers, a string that will be put into a temp buffer and scanned from (point-min)
to (point-max)
, or nil, in which case just scans from (point)
til the end (current default behavior)
I wanted to hear your thoughts on it before implementing.
My temporary solution is to use narrowing:
(save-excursion
(goto-char (car bounds))
(apply #'narrow-to-region bounds)
(prog1 (parseclj-parse-clojure)
(widen)))
But I think it's not ideal.
Metadata
Metadata
Assignees
Labels
No labels