aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/coding.c11
2 files changed, 12 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c92e4b5cff4..570c82c9628 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12002-05-11 Andreas Schwab <schwab@suse.de>
2
3 * coding.c (intersection): Keep the elements of the returned list
4 in the same order as in the first list.
5
12002-05-11 Kim F. Storm <storm@cua.dk> 62002-05-11 Kim F. Storm <storm@cua.dk>
2 7
3 * keymap.c (current_minor_maps): Fixed resizing of cmm_maps; 8 * keymap.c (current_minor_maps): Fixed resizing of cmm_maps;
diff --git a/src/coding.c b/src/coding.c
index 8c54f86e531..baf6acf08af 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -6324,14 +6324,17 @@ static Lisp_Object
6324intersection (l1, l2) 6324intersection (l1, l2)
6325 Lisp_Object l1, l2; 6325 Lisp_Object l1, l2;
6326{ 6326{
6327 Lisp_Object val; 6327 Lisp_Object val = Fcons (Qnil, Qnil), tail;
6328 6328
6329 for (val = Qnil; CONSP (l1); l1 = XCDR (l1)) 6329 for (tail = val; CONSP (l1); l1 = XCDR (l1))
6330 { 6330 {
6331 if (!NILP (Fmemq (XCAR (l1), l2))) 6331 if (!NILP (Fmemq (XCAR (l1), l2)))
6332 val = Fcons (XCAR (l1), val); 6332 {
6333 XSETCDR (tail, Fcons (XCAR (l1), Qnil));
6334 tail = XCDR (tail);
6335 }
6333 } 6336 }
6334 return val; 6337 return XCDR (val);
6335} 6338}
6336 6339
6337 6340