[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src coding.c
From: |
YAMAMOTO Mitsuharu |
Subject: |
[Emacs-diffs] emacs/src coding.c |
Date: |
Fri, 19 Jun 2009 08:39:33 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: YAMAMOTO Mitsuharu <mituharu> 09/06/19 08:39:33
Modified files:
src : coding.c
Log message:
(Ffind_coding_systems_region_internal): Cache checked characters.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/coding.c?cvsroot=emacs&r1=1.435&r2=1.436
Patches:
Index: coding.c
===================================================================
RCS file: /sources/emacs/emacs/src/coding.c,v
retrieving revision 1.435
retrieving revision 1.436
diff -u -b -r1.435 -r1.436
--- coding.c 18 Jun 2009 10:29:03 -0000 1.435
+++ coding.c 19 Jun 2009 08:39:33 -0000 1.436
@@ -8640,7 +8640,7 @@
EMACS_INT start_byte, end_byte;
const unsigned char *p, *pbeg, *pend;
int c;
- Lisp_Object tail, elt;
+ Lisp_Object tail, elt, work_table;
if (STRINGP (start))
{
@@ -8698,6 +8698,7 @@
while (p < pend && ASCII_BYTE_P (*p)) p++;
while (p < pend && ASCII_BYTE_P (*(pend - 1))) pend--;
+ work_table = Fmake_char_table (Qnil, Qnil);
while (p < pend)
{
if (ASCII_BYTE_P (*p))
@@ -8705,6 +8706,9 @@
else
{
c = STRING_CHAR_ADVANCE (p);
+ if (!NILP (char_table_ref (work_table, c)))
+ /* This character was already checked. Ignore it. */
+ continue;
charset_map_loaded = 0;
for (tail = coding_attrs_list; CONSP (tail);)
@@ -8736,6 +8740,7 @@
p = pbeg + p_offset;
pend = pbeg + pend_offset;
}
+ char_table_set (work_table, c, Qt);
}
}