diff options
| author | Stefan Monnier | 2001-05-14 20:53:03 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2001-05-14 20:53:03 +0000 |
| commit | 33568849577b4c07e8f8b29e187eb6ea69f0cc86 (patch) | |
| tree | 9cd6215cb919e4b8cd3b0ae9a5e351043d2dd0b6 /src | |
| parent | 940cf42ecb1803d6045b80663bad85d4c24bd298 (diff) | |
| download | emacs-33568849577b4c07e8f8b29e187eb6ea69f0cc86.tar.gz emacs-33568849577b4c07e8f8b29e187eb6ea69f0cc86.zip | |
(Fdefvar): Only record (defvar <var>) in the load-history
in <var> has no default value yet.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/eval.c | 29 |
2 files changed, 22 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9cd3520dcb6..d49a0e6c0fc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2001-05-14 Stefan Monnier <monnier@cs.yale.edu> | 1 | 2001-05-14 Stefan Monnier <monnier@cs.yale.edu> |
| 2 | 2 | ||
| 3 | * eval.c (Fdefvar): Only record (defvar <var>) in the load-history | ||
| 4 | in <var> has no default value yet. | ||
| 5 | |||
| 3 | * xfaces.c (try_alternative_families): First try the FAMILY. | 6 | * xfaces.c (try_alternative_families): First try the FAMILY. |
| 4 | And if nothing is found in the end, try again with scalable fonts. | 7 | And if nothing is found in the end, try again with scalable fonts. |
| 5 | (try_font_list): Let try_alternative_families do a bit more of | 8 | (try_font_list): Let try_alternative_families do a bit more of |
| @@ -10,7 +13,7 @@ | |||
| 10 | 13 | ||
| 11 | * xterm.c (note_mouse_highlight): Avoid changing the mouse | 14 | * xterm.c (note_mouse_highlight): Avoid changing the mouse |
| 12 | pointer shape when show_mouse_face has already done it. | 15 | pointer shape when show_mouse_face has already done it. |
| 13 | 16 | ||
| 14 | * xterm.c (x_draw_glyphs): Fix computation of rightmost x for | 17 | * xterm.c (x_draw_glyphs): Fix computation of rightmost x for |
| 15 | full-width rows. | 18 | full-width rows. |
| 16 | 19 | ||
diff --git a/src/eval.c b/src/eval.c index f7dd17eb5ea..42dcc814bb6 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -686,21 +686,28 @@ If INITVALUE is missing, SYMBOL's value is not set.") | |||
| 686 | if (!NILP (Fcdr (Fcdr (tail)))) | 686 | if (!NILP (Fcdr (Fcdr (tail)))) |
| 687 | error ("too many arguments"); | 687 | error ("too many arguments"); |
| 688 | 688 | ||
| 689 | tem = Fdefault_boundp (sym); | ||
| 689 | if (!NILP (tail)) | 690 | if (!NILP (tail)) |
| 690 | { | 691 | { |
| 691 | tem = Fdefault_boundp (sym); | ||
| 692 | if (NILP (tem)) | 692 | if (NILP (tem)) |
| 693 | Fset_default (sym, Feval (Fcar (Fcdr (args)))); | 693 | Fset_default (sym, Feval (Fcar (tail))); |
| 694 | } | 694 | tail = Fcdr (tail); |
| 695 | tail = Fcdr (Fcdr (args)); | 695 | if (!NILP (Fcar (tail))) |
| 696 | if (!NILP (Fcar (tail))) | 696 | { |
| 697 | { | 697 | tem = Fcar (tail); |
| 698 | tem = Fcar (tail); | 698 | if (!NILP (Vpurify_flag)) |
| 699 | if (!NILP (Vpurify_flag)) | 699 | tem = Fpurecopy (tem); |
| 700 | tem = Fpurecopy (tem); | 700 | Fput (sym, Qvariable_documentation, tem); |
| 701 | Fput (sym, Qvariable_documentation, tem); | 701 | } |
| 702 | LOADHIST_ATTACH (sym); | ||
| 702 | } | 703 | } |
| 703 | LOADHIST_ATTACH (sym); | 704 | else |
| 705 | /* A (defvar <var>) should not take precedence in the load-history over | ||
| 706 | an earlier (defvar <var> <val>), so only add to history if the default | ||
| 707 | value is still unbound. */ | ||
| 708 | if (NILP (tem)) | ||
| 709 | LOADHIST_ATTACH (sym); | ||
| 710 | |||
| 704 | return sym; | 711 | return sym; |
| 705 | } | 712 | } |
| 706 | 713 | ||