You can check the value (symbol-function 'THE-FUNCTION). If the value is a symbol, then it THE-FUNCTIONis an alias.
, THE-FUNCTION, defalias ( fset). THE-FUNCTION , (, - ) (, ).
, , - , , . , symbol-function nil, , . ( nil , , - .)
, :
(defun aliased-p (fn)
"Return non-nil if function FN is aliased to a function symbol."
(let ((val (symbol-function fn)))
(and val ; `nil' means not aliased
(symbolp val))))
: :
(defun aliased-p (fn &optional msgp)
"Prompt for a function name and say whether it is an alias.
Return non-nil if the function is aliased."
(interactive "aFunction: \np")
(let* ((val (symbol-function fn))
(ret (and val (symbolp val))))
(when msgp (message "`%s' %s an alias" fn (if ret "IS" "is NOT")))
ret))
- :
(defalias 'foo (symbol-function 'bar))
foo bar. bar, foo. foo - bar defalias ing.
:
(defalias 'foo 'bar)
foo bar. foo - bar: (symbol-function 'foo)= bar. , bar , foo.