aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorJuanma Barranquero2005-06-14 00:39:32 +0000
committerJuanma Barranquero2005-06-14 00:39:32 +0000
commit4a9308b8e2b100ab15a7eded063304c8a4fbc144 (patch)
treee67a08bd5f2636aef8f55784a92e9b6691380579 /src/eval.c
parent922a9de3065637bdc2627fb4a5f19ef57a8cc0d5 (diff)
downloademacs-4a9308b8e2b100ab15a7eded063304c8a4fbc144.tar.gz
emacs-4a9308b8e2b100ab15a7eded063304c8a4fbc144.zip
(Fdefvaralias): Rename arguments SYMBOL and ALIASED to NEW-ALIAS and
BASE-VARIABLE, respectively.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/src/eval.c b/src/eval.c
index 46affcac418..445eb283114 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -722,35 +722,36 @@ usage: (defmacro NAME ARGLIST [DOCSTRING] [DECL] BODY...) */)
722 722
723 723
724DEFUN ("defvaralias", Fdefvaralias, Sdefvaralias, 2, 3, 0, 724DEFUN ("defvaralias", Fdefvaralias, Sdefvaralias, 2, 3, 0,
725 doc: /* Make SYMBOL a variable alias for symbol ALIASED. 725 doc: /* Make NEW-ALIAS a variable alias for symbol BASE-VARIABLE.
726Setting the value of SYMBOL will subsequently set the value of ALIASED, 726Setting the value of NEW-ALIAS will subsequently set the value of BASE-VARIABLE,
727and getting the value of SYMBOL will return the value ALIASED has. 727 and getting the value of NEW-ALIAS will return the value BASE-VARIABLE has.
728Third arg DOCSTRING, if non-nil, is documentation for SYMBOL. If it is 728Third arg DOCSTRING, if non-nil, is documentation for NEW-ALIAS. If it is
729omitted or nil, SYMBOL gets the documentation string of ALIASED, or of the 729 omitted or nil, NEW-ALIAS gets the documentation string of BASE-VARIABLE,
730variable at the end of the chain of aliases, if ALIASED is itself an alias. 730 or of the variable at the end of the chain of aliases, if BASE-VARIABLE is
731The return value is ALIASED. */) 731 itself an alias.
732 (symbol, aliased, docstring) 732The return value is BASE-VARIABLE. */)
733 Lisp_Object symbol, aliased, docstring; 733 (new_alias, base_variable, docstring)
734 Lisp_Object new_alias, base_variable, docstring;
734{ 735{
735 struct Lisp_Symbol *sym; 736 struct Lisp_Symbol *sym;
736 737
737 CHECK_SYMBOL (symbol); 738 CHECK_SYMBOL (new_alias);
738 CHECK_SYMBOL (aliased); 739 CHECK_SYMBOL (base_variable);
739 740
740 if (SYMBOL_CONSTANT_P (symbol)) 741 if (SYMBOL_CONSTANT_P (new_alias))
741 error ("Cannot make a constant an alias"); 742 error ("Cannot make a constant an alias");
742 743
743 sym = XSYMBOL (symbol); 744 sym = XSYMBOL (new_alias);
744 sym->indirect_variable = 1; 745 sym->indirect_variable = 1;
745 sym->value = aliased; 746 sym->value = base_variable;
746 sym->constant = SYMBOL_CONSTANT_P (aliased); 747 sym->constant = SYMBOL_CONSTANT_P (base_variable);
747 LOADHIST_ATTACH (symbol); 748 LOADHIST_ATTACH (new_alias);
748 if (!NILP (docstring)) 749 if (!NILP (docstring))
749 Fput (symbol, Qvariable_documentation, docstring); 750 Fput (new_alias, Qvariable_documentation, docstring);
750 else 751 else
751 Fput (symbol, Qvariable_documentation, Qnil); 752 Fput (new_alias, Qvariable_documentation, Qnil);
752 753
753 return aliased; 754 return base_variable;
754} 755}
755 756
756 757