Function: mode-local--override
mode-local--override is a byte-compiled function defined in
mode-local.el.gz.
Signature
(mode-local--override NAME ARGS BODY)
Documentation
Return the form that handles overloading of function NAME.
ARGS are the arguments to the function.
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.
See also the function define-overload.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/mode-local.el.gz
(defun mode-local--override (name args body)
"Return the form that handles overloading of function NAME.
ARGS are the arguments to the function.
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.
See also the function `define-overload'."
(let* ((default (intern (format "%s-default" name)))
(overargs (delq '&rest (delq '&optional (copy-sequence args))))
(override (make-symbol "override")))
`(let ((,override (fetch-overload ',name)))
(if ,override
(funcall ,override ,@overargs)
,@(or body `((,default ,@overargs)))))
))