 different profile PROFILE-NAME than the default profile and
 remember this setting."
   (interactive "GFind file: \ni")
-  (if (called-interactively-p 'interactive)
+  (if (profile--called-interactively-p 'interactive)
       (setq profile-name
             (completing-read "Apply profile: "
                              profile-obarray nil t

and a specific PROFILE-NAME from the user if called
interactively."
  (interactive "i\ni") ; ignore both arguments, we'll set them later
  (if (called-interactively-p 'interactive)
      (progn
        (setq regexp (read-file-name "Path regexp: "
                                     (buffer-file-name)))

more profiles using `profile-create' in your \"~/.emacs\" or
interactively.")

(defmacro profile--called-interactively-p (&optional kind)
  "A backward-compatible version of `called-interactively-p'.
Optional KIND is as documented at `called-interactively-p'
in GNU Emacs 24.1 or higher.
This was shamelessly stolen from yasnippet."
  (if (string< emacs-version "24.1")
      '(called-interactively-p)
    `(called-interactively-p ,kind)))

;;; ----------------------------------------------------------------------------
;;; Functions

