define-overloadable-function

define-overloadable-function is a Lisp macro in `mode-local.el'.

(define-overloadable-function NAME ARGS DOCSTRING &rest BODY)

Define a new function, as with `defun', which can be overloaded.
NAME is the name of the function to create.
ARGS are the arguments to the function.
DOCSTRING is a documentation string to describe the function. The
docstring will automatically have details about its overload symbol
appended to the end.
BODY is code that would be run when there is no override defined. The
default is to call the function `NAME-default' with the appropriate
arguments.

BODY can also include an override form that specifies which part of
BODY is specifically overridden. This permits to specify common code
run for both default and overridden implementations.
An override form is one of:

1. (:override [OVERBODY])
2. (:override-with-args OVERARGS [OVERBODY])

OVERBODY is the code that would be run when there is no override
defined. The default is to call the function `NAME-default' with the
appropriate arguments deduced from ARGS.
OVERARGS is a list of arguments passed to the override and
`NAME-default' function, in place of those deduced from ARGS.