,@body
;; The on/off hooks are here for backward compatibility only.
(run-hooks ',hook (if ,mode ',hook-on ',hook-off))
- (if (called-interactively-p)
+ (if (called-interactively-p 'any)
(progn
,(if globalp `(customize-mark-as-set ',mode))
;; Avoid overwriting a message shown by the body,
(error "No next %s" ,name))
(goto-char (match-beginning 0))
(when (and (eq (current-buffer) (window-buffer (selected-window)))
- (interactive-p))
+ (called-interactively-p 'interactive))
(let ((endpt (or (save-excursion
,(if endfun `(,endfun)
`(re-search-forward ,re nil t 2)))