summaryrefslogtreecommitdiff
path: root/src/minibuf.c
diff options
context:
space:
mode:
authorIhor Radchenko <yantar92@posteo.net>2023-12-15 11:47:45 +0100
committerEli Zaretskii <eliz@gnu.org>2023-12-30 10:03:46 +0200
commitaa0037aaf7c2cd7052925fdeca73c77c91254de1 (patch)
tree0d97c7c0d6d31149404f9d3e687bd1de4abfeb81 /src/minibuf.c
parent784acce8425fb3143719d34be1e39be499564dfb (diff)
downloademacs-aa0037aaf7c2cd7052925fdeca73c77c91254de1.tar.gz
Improve performance let-binding `case-fold-search' (bug#66117)
* src/buffer.h: Remove case_fold_search_ buffer object slot. * src/buffer.c (bset_case_fold_search): Remove - no longer needed. (init_buffer_once): Remove removed buffer slot init. (syms_of_buffer): Use DEFVAR_LISP to define `case-fold-search' and declare it buffer-local. * src/minibuf.c (syms_of_minibuf): Remove DEFSYM call for `case-fold-search' symbol. It now lives in `syms_of_buffer'. * src/editfns.c (Fcompare_buffer_substrings): (Fchar_equal): * src/search.c (looking_at_1): (string_match_1): (search_command): (Fre__describe_compiled): Adjust C queries to `case-fold-search' value to use C globals instead of BVAR macro. * doc/lispref/internals.texi (Buffer Internals): Do not list `case_fold_search' slot. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66117#259 When used as buffer slot, let-binding `case-fold-search' would scale with the number of live buffers and can be slow. This change makes let-binding much faster at the cost of slightly slower `set-buffer'.
Diffstat (limited to 'src/minibuf.c')
-rw-r--r--src/minibuf.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index 58adde1bf66..0d5b375e450 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -2320,7 +2320,6 @@ syms_of_minibuf (void)
DEFSYM (Qcurrent_input_method, "current-input-method");
DEFSYM (Qactivate_input_method, "activate-input-method");
- DEFSYM (Qcase_fold_search, "case-fold-search");
DEFSYM (Qmetadata, "metadata");
DEFSYM (Qcycle_sort_function, "cycle-sort-function");