New answers tagged

2

The doc string of match-string says: (match-string NUM &optional STRING) This function does not change global state, including the match data. Return string of text matched by last search. NUM specifies which parenthesized expression in the last regexp. Value is nil if NUMth pair didn’t match, or there were less than NUM pairs. Zero ...


1

As npostavs explains in a comment, the noninteractive suggestion is to do: (defun foo (&optional interactivep) (interactive "p") ... ...use `interactivep' when you want to know if the call was interactive. ...) which corresponds to (called-interactive-p 'any) or (defun foo (&optional interactivep) (interactive (list (not (or executing-...


Top 50 recent answers are included