comparison src/symbols.c @ 195:a2f645c6b9f8 r20-3b24

Import from CVS: tag r20-3b24
author cvs
date Mon, 13 Aug 2007 09:59:05 +0200
parents 3d6bfa290dbd
children e45d5e7c476e
comparison
equal deleted inserted replaced
194:2947057885e5 195:a2f645c6b9f8
1508 find_symbol_value (Lisp_Object sym) 1508 find_symbol_value (Lisp_Object sym)
1509 { 1509 {
1510 /* WARNING: This function can be called when current_buffer is 0 1510 /* WARNING: This function can be called when current_buffer is 0
1511 and Vselected_console is Qnil, early in initialization. */ 1511 and Vselected_console is Qnil, early in initialization. */
1512 struct console *dev; 1512 struct console *dev;
1513 Lisp_Object valcontents;
1513 1514
1514 CHECK_SYMBOL (sym); 1515 CHECK_SYMBOL (sym);
1516
1517 valcontents = XSYMBOL (sym)->value;
1518 if (!SYMBOL_VALUE_MAGIC_P (valcontents))
1519 return valcontents;
1520
1515 if (CONSOLEP (Vselected_console)) 1521 if (CONSOLEP (Vselected_console))
1516 dev = XCONSOLE (Vselected_console); 1522 dev = XCONSOLE (Vselected_console);
1517 else 1523 else
1518 { 1524 {
1519 /* This can also get called while we're preparing to shutdown. 1525 /* This can also get called while we're preparing to shutdown.
1586 /* remember, we're called by Fmakunbound() as well */ 1592 /* remember, we're called by Fmakunbound() as well */
1587 1593
1588 CHECK_SYMBOL (sym); 1594 CHECK_SYMBOL (sym);
1589 1595
1590 retry: 1596 retry:
1591 reject_constant_symbols (sym, newval, 0,
1592 UNBOUNDP (newval) ? Qmakunbound : Qset);
1593 valcontents = XSYMBOL (sym)->value; 1597 valcontents = XSYMBOL (sym)->value;
1598 if (NILP (sym) || EQ (sym, Qt) || SYMBOL_VALUE_MAGIC_P (valcontents))
1599 reject_constant_symbols (sym, newval, 0,
1600 UNBOUNDP (newval) ? Qmakunbound : Qset);
1601 else
1602 {
1603 XSYMBOL (sym)->value = newval;
1604 return newval;
1605 }
1606
1594 retry_2: 1607 retry_2:
1595 1608
1596 if (SYMBOL_VALUE_MAGIC_P (valcontents)) 1609 if (SYMBOL_VALUE_MAGIC_P (valcontents))
1597 { 1610 {
1598 switch (XSYMBOL_VALUE_MAGIC_TYPE (valcontents)) 1611 switch (XSYMBOL_VALUE_MAGIC_TYPE (valcontents))