minibuffer

How to check for a regexp match after point with Emacs Lisp?

August 26, 2023
(looking-at "bar")
(looking-at "foo")
(when (looking-at "foo") (insert "---"))
(when (looking-at "bar") (insert "---"))