aboutsummaryrefslogtreecommitdiffstats
path: root/src/fns.c
diff options
context:
space:
mode:
authorStefan Monnier2012-06-27 17:15:13 -0400
committerStefan Monnier2012-06-27 17:15:13 -0400
commit1ec4b7b25979ff9ea72a3ea35bf35d5882f467f7 (patch)
tree7d3f3d3ef4a151e8a2b93b653692a4a652d2a720 /src/fns.c
parente309e2a56606ef774c5c366f74ea17ced46da065 (diff)
downloademacs-1ec4b7b25979ff9ea72a3ea35bf35d5882f467f7.tar.gz
emacs-1ec4b7b25979ff9ea72a3ea35bf35d5882f467f7.zip
Get rid of all the manual purecopy calls in menu-bar definitions.
* lisp/loadup.el (purify-flag): Pre-grow the hash-table to reduce the memory use. * lisp/bindings.el (bindings--define-key): New function. * lisp/vc/vc-hooks.el, lisp/replace.el, lisp/menu-bar.el: * lisp/international/mule-cmds.el, lisp/emacs-lisp/lisp-mode.el: * lisp/buff-menu.el, lisp/bookmark.el: * bindings.el: Use it to purecopy define-key bindings. * src/fns.c (maybe_resize_hash_table): Output message when growing the purify-hashtable.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/fns.c b/src/fns.c
index 515cd28328b..f734520fedb 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -3749,6 +3749,17 @@ maybe_resize_hash_table (struct Lisp_Hash_Table *h)
3749 if (INDEX_SIZE_BOUND < nsize) 3749 if (INDEX_SIZE_BOUND < nsize)
3750 error ("Hash table too large to resize"); 3750 error ("Hash table too large to resize");
3751 3751
3752#ifdef ENABLE_CHECKING
3753 if (HASH_TABLE_P (Vpurify_flag)
3754 && XHASH_TABLE (Vpurify_flag) == h)
3755 {
3756 Lisp_Object args[2];
3757 args[0] = build_string ("Growing hash table to: %d");
3758 args[1] = make_number (new_size);
3759 Fmessage (2, args);
3760 }
3761#endif
3762
3752 h->key_and_value = larger_vector (h->key_and_value, 3763 h->key_and_value = larger_vector (h->key_and_value,
3753 2 * (new_size - old_size), -1); 3764 2 * (new_size - old_size), -1);
3754 h->next = larger_vector (h->next, new_size - old_size, -1); 3765 h->next = larger_vector (h->next, new_size - old_size, -1);