summaryrefslogtreecommitdiff
path: root/src/region-cache.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-02-11 15:37:18 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2013-02-11 15:37:18 -0800
commita84b7c5334e232913111b840f2283d0138a6f5fb (patch)
tree8ee4e55f7059d1eb918fb5966cd81ee3f84153bc /src/region-cache.h
parent71d4202f204ea5fad93eb34406f0ef671630f271 (diff)
downloademacs-a84b7c5334e232913111b840f2283d0138a6f5fb.tar.gz
Tune by using memchr and memrchr.
* .bzrignore: Add string.h. * admin/merge-gnulib (GNULIB_MODULES): Add memrchr. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * lib/memrchr.c, lib/string.in.h, m4/memrchr.m4, m4/string_h.m4: New files, from gnulib. * src/doc.c (Fsnarf_documentation): * src/fileio.c (Fsubstitute_in_file_name): * src/search.c (find_newline, scan_newline): * src/xdisp.c (pos_visible_p, display_count_lines): Use memchr and memrchr rather than scanning byte-by-byte. * src/search.c (find_newline): Rename from scan_buffer. Omit first arg TARGET, as it's always '\n'. All callers changed.
Diffstat (limited to 'src/region-cache.h')
-rw-r--r--src/region-cache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/region-cache.h b/src/region-cache.h
index 697ae1c791f..e4c6b59ee95 100644
--- a/src/region-cache.h
+++ b/src/region-cache.h
@@ -40,7 +40,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
existing data structure, and disturb as little of the existing code
as possible.
- So here's the tack. We add some caching to the scan_buffer
+ So here's the tack. We add some caching to the find_newline
function, so that when it searches for a newline, it notes that the
region between the start and end of the search contained no
newlines; then, the next time around, it consults this cache to see