Skip to content

Commit

Permalink
racket--describe-search-parse-result: Simplify regexp matching
Browse files Browse the repository at this point in the history
  • Loading branch information
greghendershott committed Nov 21, 2024
1 parent 5d63fef commit 09f5019
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions racket-describe.el
Original file line number Diff line number Diff line change
Expand Up @@ -696,16 +696,14 @@ extract."

(defun racket--describe-search-parse-result (str)
(when (string-match (rx bos
(group-n 1 (+? (not (any ?\t)))) ?\t
(group-n 2 (+? (not (any ?\t)))) ?\t
(group-n 3 (*? (not (any ?\t)))) ?\t
(group-n 4 (*? any))
(group-n 1 (+? any)) ?\t ;term
(group-n 2 (+? any)) ?\t ;path
(group-n 3 (*? any)) ?\t ;anchor
(group-n 4 (*? any)) ;lib
eos)
str)
(list (match-string 1 str)
(match-string 2 str)
(match-string 3 str)
(match-string 4 str))))
(cl-loop for group from 1 to 4
collect (match-string group str))))

(defun racket--describe-search-display-sort (strs)
"A value for display-sort-function metadata."
Expand Down

0 comments on commit 09f5019

Please sign in to comment.