diff options
| author | Juanma Barranquero | 2007-10-14 18:02:05 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2007-10-14 18:02:05 +0000 |
| commit | fe4cd268c7b3a0f6c78939a6ad3e12ff9b2295f5 (patch) | |
| tree | 6d9266bb521419dffccb9dbf6ebb816b6b7a7d97 /src/data.c | |
| parent | 9ac66b454877410de28e8c13b3986d0dc7fa7b26 (diff) | |
| download | emacs-fe4cd268c7b3a0f6c78939a6ad3e12ff9b2295f5.tar.gz emacs-fe4cd268c7b3a0f6c78939a6ad3e12ff9b2295f5.zip | |
(Ffset): Save autoload of the function being set.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/data.c b/src/data.c index 5e7453e9d42..f954116f32e 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -662,12 +662,20 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0, | |||
| 662 | (symbol, definition) | 662 | (symbol, definition) |
| 663 | register Lisp_Object symbol, definition; | 663 | register Lisp_Object symbol, definition; |
| 664 | { | 664 | { |
| 665 | register Lisp_Object function; | ||
| 666 | |||
| 665 | CHECK_SYMBOL (symbol); | 667 | CHECK_SYMBOL (symbol); |
| 666 | if (NILP (symbol) || EQ (symbol, Qt)) | 668 | if (NILP (symbol) || EQ (symbol, Qt)) |
| 667 | xsignal1 (Qsetting_constant, symbol); | 669 | xsignal1 (Qsetting_constant, symbol); |
| 668 | if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (symbol)->function, Qunbound)) | 670 | |
| 669 | Vautoload_queue = Fcons (Fcons (symbol, XSYMBOL (symbol)->function), | 671 | function = XSYMBOL (symbol)->function; |
| 670 | Vautoload_queue); | 672 | |
| 673 | if (!NILP (Vautoload_queue) && !EQ (function, Qunbound)) | ||
| 674 | Vautoload_queue = Fcons (Fcons (symbol, function), Vautoload_queue); | ||
| 675 | |||
| 676 | if (CONSP (function) && EQ (XCAR (function), Qautoload)) | ||
| 677 | Fput (symbol, Qautoload, XCDR (function)); | ||
| 678 | |||
| 671 | XSYMBOL (symbol)->function = definition; | 679 | XSYMBOL (symbol)->function = definition; |
| 672 | /* Handle automatic advice activation */ | 680 | /* Handle automatic advice activation */ |
| 673 | if (CONSP (XSYMBOL (symbol)->plist) && !NILP (Fget (symbol, Qad_advice_info))) | 681 | if (CONSP (XSYMBOL (symbol)->plist) && !NILP (Fget (symbol, Qad_advice_info))) |