704 |
return definition; |
return definition; |
705 |
} |
} |
706 |
|
|
707 |
DEFUN ("defalias", Fdefalias, Sdefalias, 2, 2, 0, |
extern Lisp_Object Qfunction_documentation; |
708 |
|
|
709 |
|
DEFUN ("defalias", Fdefalias, Sdefalias, 2, 3, 0, |
710 |
doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. |
doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. |
711 |
Associates the function with the current load file, if any. */) |
Associates the function with the current load file, if any. */) |
712 |
(symbol, definition) |
(symbol, definition, docstring) |
713 |
register Lisp_Object symbol, definition; |
register Lisp_Object symbol, definition, docstring; |
714 |
{ |
{ |
715 |
definition = Ffset (symbol, definition); |
definition = Ffset (symbol, definition); |
716 |
LOADHIST_ATTACH (symbol); |
LOADHIST_ATTACH (symbol); |
717 |
|
if (!NILP (docstring)) |
718 |
|
Fput (symbol, Qfunction_documentation, docstring); |
719 |
return definition; |
return definition; |
720 |
} |
} |
721 |
|
|
1213 |
and load that binding. */ |
and load that binding. */ |
1214 |
else |
else |
1215 |
{ |
{ |
1216 |
tem1 = Fcons (symbol, Fcdr (current_alist_element)); |
tem1 = Fcons (symbol, XCDR (current_alist_element)); |
1217 |
buf->local_var_alist |
buf->local_var_alist |
1218 |
= Fcons (tem1, buf->local_var_alist); |
= Fcons (tem1, buf->local_var_alist); |
1219 |
} |
} |
1415 |
do |
do |
1416 |
{ |
{ |
1417 |
val = Feval (Fcar (Fcdr (args_left))); |
val = Feval (Fcar (Fcdr (args_left))); |
1418 |
symbol = Fcar (args_left); |
symbol = XCAR (args_left); |
1419 |
Fset_default (symbol, val); |
Fset_default (symbol, val); |
1420 |
args_left = Fcdr (Fcdr (args_left)); |
args_left = Fcdr (XCDR (args_left)); |
1421 |
} |
} |
1422 |
while (!NILP (args_left)); |
while (!NILP (args_left)); |
1423 |
|
|