diff --git a/osx-browse.el b/osx-browse.el index f98fdf3..0c62521 100644 --- a/osx-browse.el +++ b/osx-browse.el @@ -310,9 +310,15 @@ The format for key sequences is as defined by `kbd'." Optional KIND is as documented at `called-interactively-p' in GNU Emacs 24.1 or higher." - (if (eq 0 (cdr (subr-arity (symbol-function 'called-interactively-p)))) - '(called-interactively-p) - `(called-interactively-p ,kind))) + (cond + ((not (fboundp 'called-interactively-p)) + '(interactive-p)) + ((condition-case nil + (progn (called-interactively-p 'any) t) + (error nil)) + `(called-interactively-p ,kind)) + (t + '(called-interactively-p)))) ;;; compatibility functions