diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 51 | ||||
| -rw-r--r-- | src/alloc.c | 4 | ||||
| -rw-r--r-- | src/bidi.c | 3 | ||||
| -rw-r--r-- | src/doc.c | 8 | ||||
| -rw-r--r-- | src/lisp.h | 116 | ||||
| -rw-r--r-- | src/lread.c | 6 | ||||
| -rw-r--r-- | src/minibuf.c | 7 | ||||
| -rw-r--r-- | src/xdisp.c | 55 |
8 files changed, 156 insertions, 94 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9cef045c029..e7cd83305ee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,54 @@ | |||
| 1 | 2011-10-13 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize | ||
| 4 | itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect | ||
| 5 | cursor motion with <left> and <right> arrow keys. | ||
| 6 | |||
| 7 | * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as | ||
| 8 | some callers set that themselves. | ||
| 9 | |||
| 10 | 2011-10-12 Eli Zaretskii <eliz@gnu.org> | ||
| 11 | |||
| 12 | * xdisp.c (find_row_edges): Handle the case where ROW comes from a | ||
| 13 | display string and the previous row comes from the same string and | ||
| 14 | is empty. (Bug#9739) (Bug#9738) | ||
| 15 | |||
| 16 | 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 17 | |||
| 18 | * doc.c (get_doc_string): Encode file name (bug#9735). | ||
| 19 | |||
| 20 | 2011-10-12 Eli Zaretskii <eliz@gnu.org> | ||
| 21 | |||
| 22 | * bidi.c (bidi_level_of_next_char): | ||
| 23 | * xdisp.c (get_visually_first_element): Remove old incorrect | ||
| 24 | comments regarding the Unicode Line Separator character. | ||
| 25 | |||
| 26 | * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR. | ||
| 27 | |||
| 28 | 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 29 | |||
| 30 | * alloc.c (Fgc_status): Do not access beyond zombies array | ||
| 31 | boundary if nzombies > MAX_ZOMBIES. | ||
| 32 | * alloc.c (dump_zombies): Add missing format specifier. | ||
| 33 | |||
| 34 | 2011-10-12 Paul Eggert <eggert@cs.ucla.edu> | ||
| 35 | |||
| 36 | * xdisp.c (set_cursor_from_row): Simplify conditionals, | ||
| 37 | to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow. | ||
| 38 | |||
| 39 | * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff. | ||
| 40 | Some packages use them to denote characters with modifiers. | ||
| 41 | |||
| 42 | 2011-10-11 Andreas Schwab <schwab@linux-m68k.org> | ||
| 43 | |||
| 44 | * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR) | ||
| 45 | (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid | ||
| 46 | matching a pp-number. Rename parameter var to var1. | ||
| 47 | |||
| 48 | 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 49 | |||
| 50 | * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709). | ||
| 51 | |||
| 1 | 2011-10-08 Glenn Morris <rgm@gnu.org> | 52 | 2011-10-08 Glenn Morris <rgm@gnu.org> |
| 2 | 53 | ||
| 3 | * callint.c (Fcall_interactively): Give a more explicit error for the | 54 | * callint.c (Fcall_interactively): Give a more explicit error for the |
diff --git a/src/alloc.c b/src/alloc.c index 09ef4b085df..6e999a0ba6d 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -4071,7 +4071,7 @@ DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "", | |||
| 4071 | { | 4071 | { |
| 4072 | Lisp_Object args[8], zombie_list = Qnil; | 4072 | Lisp_Object args[8], zombie_list = Qnil; |
| 4073 | EMACS_INT i; | 4073 | EMACS_INT i; |
| 4074 | for (i = 0; i < nzombies; i++) | 4074 | for (i = 0; i < min (MAX_ZOMBIES, nzombies); i++) |
| 4075 | zombie_list = Fcons (zombies[i], zombie_list); | 4075 | zombie_list = Fcons (zombies[i], zombie_list); |
| 4076 | args[0] = build_string ("%d GCs, avg live/zombies = %.2f/%.2f (%f%%), max %d/%d\nzombies: %S"); | 4076 | args[0] = build_string ("%d GCs, avg live/zombies = %.2f/%.2f (%f%%), max %d/%d\nzombies: %S"); |
| 4077 | args[1] = make_number (ngcs); | 4077 | args[1] = make_number (ngcs); |
| @@ -4410,7 +4410,7 @@ dump_zombies (void) | |||
| 4410 | { | 4410 | { |
| 4411 | int i; | 4411 | int i; |
| 4412 | 4412 | ||
| 4413 | fprintf (stderr, "\nZombies kept alive = %"pI":\n", nzombies); | 4413 | fprintf (stderr, "\nZombies kept alive = %"pI"d:\n", nzombies); |
| 4414 | for (i = 0; i < min (MAX_ZOMBIES, nzombies); ++i) | 4414 | for (i = 0; i < min (MAX_ZOMBIES, nzombies); ++i) |
| 4415 | { | 4415 | { |
| 4416 | fprintf (stderr, " %d = ", i); | 4416 | fprintf (stderr, " %d = ", i); |
diff --git a/src/bidi.c b/src/bidi.c index e3fc03f4a9b..f06c146ca84 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -2127,7 +2127,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it) | |||
| 2127 | do { | 2127 | do { |
| 2128 | ch = bidi_fetch_char (bpos += clen, cpos += nc, &disp_pos, &dpp, &bs, | 2128 | ch = bidi_fetch_char (bpos += clen, cpos += nc, &disp_pos, &dpp, &bs, |
| 2129 | fwp, &clen, &nc); | 2129 | fwp, &clen, &nc); |
| 2130 | if (ch == '\n' || ch == BIDI_EOB /* || ch == LINESEP_CHAR */) | 2130 | if (ch == '\n' || ch == BIDI_EOB) |
| 2131 | chtype = NEUTRAL_B; | 2131 | chtype = NEUTRAL_B; |
| 2132 | else | 2132 | else |
| 2133 | chtype = bidi_get_type (ch, NEUTRAL_DIR); | 2133 | chtype = bidi_get_type (ch, NEUTRAL_DIR); |
| @@ -2177,7 +2177,6 @@ bidi_level_of_next_char (struct bidi_it *bidi_it) | |||
| 2177 | else if (bidi_it->orig_type == NEUTRAL_B /* L1 */ | 2177 | else if (bidi_it->orig_type == NEUTRAL_B /* L1 */ |
| 2178 | || bidi_it->orig_type == NEUTRAL_S | 2178 | || bidi_it->orig_type == NEUTRAL_S |
| 2179 | || bidi_it->ch == '\n' || bidi_it->ch == BIDI_EOB | 2179 | || bidi_it->ch == '\n' || bidi_it->ch == BIDI_EOB |
| 2180 | /* || bidi_it->ch == LINESEP_CHAR */ | ||
| 2181 | || (bidi_it->orig_type == NEUTRAL_WS | 2180 | || (bidi_it->orig_type == NEUTRAL_WS |
| 2182 | && (bidi_it->next_for_ws.type == NEUTRAL_B | 2181 | && (bidi_it->next_for_ws.type == NEUTRAL_B |
| 2183 | || bidi_it->next_for_ws.type == NEUTRAL_S))) | 2182 | || bidi_it->next_for_ws.type == NEUTRAL_S))) |
| @@ -116,14 +116,16 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition) | |||
| 116 | If it is relative, combine it with Vdoc_directory. */ | 116 | If it is relative, combine it with Vdoc_directory. */ |
| 117 | 117 | ||
| 118 | tem = Ffile_name_absolute_p (file); | 118 | tem = Ffile_name_absolute_p (file); |
| 119 | file = ENCODE_FILE (file); | ||
| 119 | if (NILP (tem)) | 120 | if (NILP (tem)) |
| 120 | { | 121 | { |
| 121 | minsize = SCHARS (Vdoc_directory); | 122 | Lisp_Object docdir = ENCODE_FILE (Vdoc_directory); |
| 123 | minsize = SCHARS (docdir); | ||
| 122 | /* sizeof ("../etc/") == 8 */ | 124 | /* sizeof ("../etc/") == 8 */ |
| 123 | if (minsize < 8) | 125 | if (minsize < 8) |
| 124 | minsize = 8; | 126 | minsize = 8; |
| 125 | name = (char *) alloca (minsize + SCHARS (file) + 8); | 127 | name = (char *) alloca (minsize + SCHARS (file) + 8); |
| 126 | strcpy (name, SSDATA (Vdoc_directory)); | 128 | strcpy (name, SSDATA (docdir)); |
| 127 | strcat (name, SSDATA (file)); | 129 | strcat (name, SSDATA (file)); |
| 128 | } | 130 | } |
| 129 | else | 131 | else |
| @@ -138,7 +140,7 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition) | |||
| 138 | if (!NILP (Vpurify_flag)) | 140 | if (!NILP (Vpurify_flag)) |
| 139 | { | 141 | { |
| 140 | /* Preparing to dump; DOC file is probably not installed. | 142 | /* Preparing to dump; DOC file is probably not installed. |
| 141 | So check in ../etc. */ | 143 | So check in ../etc. */ |
| 142 | strcpy (name, "../etc/"); | 144 | strcpy (name, "../etc/"); |
| 143 | strcat (name, SSDATA (file)); | 145 | strcat (name, SSDATA (file)); |
| 144 | 146 | ||
diff --git a/src/lisp.h b/src/lisp.h index 64c94647f0e..bc48b790a14 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2247,105 +2247,105 @@ struct gcpro | |||
| 2247 | 2247 | ||
| 2248 | #ifndef DEBUG_GCPRO | 2248 | #ifndef DEBUG_GCPRO |
| 2249 | 2249 | ||
| 2250 | #define GCPRO1_VAR(var, gcpro) \ | 2250 | #define GCPRO1_VAR(var1, gcpro) \ |
| 2251 | {gcpro##1.next = gcprolist; gcpro##1.var = &var; gcpro##1.nvars = 1; \ | 2251 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ |
| 2252 | gcprolist = &gcpro##1; } | 2252 | gcprolist = &gcpro##1; } |
| 2253 | 2253 | ||
| 2254 | #define GCPRO2_VAR(var1, var2, gcpro) \ | 2254 | #define GCPRO2_VAR(var1, var2, gcpro) \ |
| 2255 | {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ | 2255 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ |
| 2256 | gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ | 2256 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ |
| 2257 | gcprolist = &gcpro##2; } | 2257 | gcprolist = &gcpro##2; } |
| 2258 | 2258 | ||
| 2259 | #define GCPRO3_VAR(var1, var2, var3, gcpro) \ | 2259 | #define GCPRO3_VAR(var1, var2, var3, gcpro) \ |
| 2260 | {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ | 2260 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ |
| 2261 | gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ | 2261 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ |
| 2262 | gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ | 2262 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ |
| 2263 | gcprolist = &gcpro##3; } | 2263 | gcprolist = &gcpro##3; } |
| 2264 | 2264 | ||
| 2265 | #define GCPRO4_VAR(var1, var2, var3, var4, gcpro) \ | 2265 | #define GCPRO4_VAR(var1, var2, var3, var4, gcpro) \ |
| 2266 | {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ | 2266 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ |
| 2267 | gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ | 2267 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ |
| 2268 | gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ | 2268 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ |
| 2269 | gcpro##4.next = &gcpro##3; gcpro##4.var = &var4; gcpro##4.nvars = 1; \ | 2269 | gcpro##4 .next = &gcpro##3; gcpro##4 .var = &var4; gcpro##4 .nvars = 1; \ |
| 2270 | gcprolist = &gcpro##4; } | 2270 | gcprolist = &gcpro##4; } |
| 2271 | 2271 | ||
| 2272 | #define GCPRO5_VAR(var1, var2, var3, var4, var5, gcpro) \ | 2272 | #define GCPRO5_VAR(var1, var2, var3, var4, var5, gcpro) \ |
| 2273 | {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ | 2273 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ |
| 2274 | gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ | 2274 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ |
| 2275 | gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ | 2275 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ |
| 2276 | gcpro##4.next = &gcpro##3; gcpro##4.var = &var4; gcpro##4.nvars = 1; \ | 2276 | gcpro##4 .next = &gcpro##3; gcpro##4 .var = &var4; gcpro##4 .nvars = 1; \ |
| 2277 | gcpro##5.next = &gcpro##4; gcpro##5.var = &var5; gcpro##5.nvars = 1; \ | 2277 | gcpro##5 .next = &gcpro##4; gcpro##5 .var = &var5; gcpro##5 .nvars = 1; \ |
| 2278 | gcprolist = &gcpro##5; } | 2278 | gcprolist = &gcpro##5; } |
| 2279 | 2279 | ||
| 2280 | #define GCPRO6_VAR(var1, var2, var3, var4, var5, var6, gcpro) \ | 2280 | #define GCPRO6_VAR(var1, var2, var3, var4, var5, var6, gcpro) \ |
| 2281 | {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ | 2281 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ |
| 2282 | gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ | 2282 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ |
| 2283 | gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ | 2283 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ |
| 2284 | gcpro##4.next = &gcpro##3; gcpro##4.var = &var4; gcpro##4.nvars = 1; \ | 2284 | gcpro##4 .next = &gcpro##3; gcpro##4 .var = &var4; gcpro##4 .nvars = 1; \ |
| 2285 | gcpro##5.next = &gcpro##4; gcpro##5.var = &var5; gcpro##5.nvars = 1; \ | 2285 | gcpro##5 .next = &gcpro##4; gcpro##5 .var = &var5; gcpro##5 .nvars = 1; \ |
| 2286 | gcpro##6.next = &gcpro##5; gcpro##6.var = &var6; gcpro##6.nvars = 1; \ | 2286 | gcpro##6 .next = &gcpro##5; gcpro##6 .var = &var6; gcpro##6 .nvars = 1; \ |
| 2287 | gcprolist = &gcpro##6; } | 2287 | gcprolist = &gcpro##6; } |
| 2288 | 2288 | ||
| 2289 | #define UNGCPRO_VAR(gcpro) (gcprolist = gcpro##1.next) | 2289 | #define UNGCPRO_VAR(gcpro) (gcprolist = gcpro##1 .next) |
| 2290 | 2290 | ||
| 2291 | #else | 2291 | #else |
| 2292 | 2292 | ||
| 2293 | extern int gcpro_level; | 2293 | extern int gcpro_level; |
| 2294 | 2294 | ||
| 2295 | #define GCPRO1_VAR(var, gcpro) \ | 2295 | #define GCPRO1_VAR(var1, gcpro) \ |
| 2296 | {gcpro##1.next = gcprolist; gcpro##1.var = &var; gcpro##1.nvars = 1; \ | 2296 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ |
| 2297 | gcpro##1.level = gcpro_level++; \ | 2297 | gcpro##1 .level = gcpro_level++; \ |
| 2298 | gcprolist = &gcpro##1; } | 2298 | gcprolist = &gcpro##1; } |
| 2299 | 2299 | ||
| 2300 | #define GCPRO2_VAR(var1, var2, gcpro) \ | 2300 | #define GCPRO2_VAR(var1, var2, gcpro) \ |
| 2301 | {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ | 2301 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ |
| 2302 | gcpro##1.level = gcpro_level; \ | 2302 | gcpro##1 .level = gcpro_level; \ |
| 2303 | gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ | 2303 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ |
| 2304 | gcpro##2.level = gcpro_level++; \ | 2304 | gcpro##2 .level = gcpro_level++; \ |
| 2305 | gcprolist = &gcpro##2; } | 2305 | gcprolist = &gcpro##2; } |
| 2306 | 2306 | ||
| 2307 | #define GCPRO3_VAR(var1, var2, var3, gcpro) \ | 2307 | #define GCPRO3_VAR(var1, var2, var3, gcpro) \ |
| 2308 | {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ | 2308 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ |
| 2309 | gcpro##1.level = gcpro_level; \ | 2309 | gcpro##1 .level = gcpro_level; \ |
| 2310 | gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ | 2310 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ |
| 2311 | gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ | 2311 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ |
| 2312 | gcpro##3.level = gcpro_level++; \ | 2312 | gcpro##3 .level = gcpro_level++; \ |
| 2313 | gcprolist = &gcpro##3; } | 2313 | gcprolist = &gcpro##3; } |
| 2314 | 2314 | ||
| 2315 | #define GCPRO4_VAR(var1, var2, var3, var4, gcpro) \ | 2315 | #define GCPRO4_VAR(var1, var2, var3, var4, gcpro) \ |
| 2316 | {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ | 2316 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ |
| 2317 | gcpro##1.level = gcpro_level; \ | 2317 | gcpro##1 .level = gcpro_level; \ |
| 2318 | gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ | 2318 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ |
| 2319 | gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ | 2319 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ |
| 2320 | gcpro##4.next = &gcpro##3; gcpro##4.var = &var4; gcpro##4.nvars = 1; \ | 2320 | gcpro##4 .next = &gcpro##3; gcpro##4 .var = &var4; gcpro##4 .nvars = 1; \ |
| 2321 | gcpro##4.level = gcpro_level++; \ | 2321 | gcpro##4 .level = gcpro_level++; \ |
| 2322 | gcprolist = &gcpro##4; } | 2322 | gcprolist = &gcpro##4; } |
| 2323 | 2323 | ||
| 2324 | #define GCPRO5_VAR(var1, var2, var3, var4, var5, gcpro) \ | 2324 | #define GCPRO5_VAR(var1, var2, var3, var4, var5, gcpro) \ |
| 2325 | {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ | 2325 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ |
| 2326 | gcpro##1.level = gcpro_level; \ | 2326 | gcpro##1 .level = gcpro_level; \ |
| 2327 | gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ | 2327 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ |
| 2328 | gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ | 2328 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ |
| 2329 | gcpro##4.next = &gcpro##3; gcpro##4.var = &var4; gcpro##4.nvars = 1; \ | 2329 | gcpro##4 .next = &gcpro##3; gcpro##4 .var = &var4; gcpro##4 .nvars = 1; \ |
| 2330 | gcpro##5.next = &gcpro##4; gcpro##5.var = &var5; gcpro##5.nvars = 1; \ | 2330 | gcpro##5 .next = &gcpro##4; gcpro##5 .var = &var5; gcpro##5 .nvars = 1; \ |
| 2331 | gcpro##5.level = gcpro_level++; \ | 2331 | gcpro##5 .level = gcpro_level++; \ |
| 2332 | gcprolist = &gcpro##5; } | 2332 | gcprolist = &gcpro##5; } |
| 2333 | 2333 | ||
| 2334 | #define GCPRO6_VAR(var1, var2, var3, var4, var5, var6, gcpro) \ | 2334 | #define GCPRO6_VAR(var1, var2, var3, var4, var5, var6, gcpro) \ |
| 2335 | {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ | 2335 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ |
| 2336 | gcpro##1.level = gcpro_level; \ | 2336 | gcpro##1 .level = gcpro_level; \ |
| 2337 | gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ | 2337 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ |
| 2338 | gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ | 2338 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ |
| 2339 | gcpro##4.next = &gcpro##3; gcpro##4.var = &var4; gcpro##4.nvars = 1; \ | 2339 | gcpro##4 .next = &gcpro##3; gcpro##4 .var = &var4; gcpro##4 .nvars = 1; \ |
| 2340 | gcpro##5.next = &gcpro##4; gcpro##5.var = &var5; gcpro##5.nvars = 1; \ | 2340 | gcpro##5 .next = &gcpro##4; gcpro##5 .var = &var5; gcpro##5 .nvars = 1; \ |
| 2341 | gcpro##6.next = &gcpro##5; gcpro##6.var = &var6; gcpro##6.nvars = 1; \ | 2341 | gcpro##6 .next = &gcpro##5; gcpro##6 .var = &var6; gcpro##6 .nvars = 1; \ |
| 2342 | gcpro##6.level = gcpro_level++; \ | 2342 | gcpro##6 .level = gcpro_level++; \ |
| 2343 | gcprolist = &gcpro##6; } | 2343 | gcprolist = &gcpro##6; } |
| 2344 | 2344 | ||
| 2345 | #define UNGCPRO_VAR(gcpro) \ | 2345 | #define UNGCPRO_VAR(gcpro) \ |
| 2346 | ((--gcpro_level != gcpro##1.level) \ | 2346 | ((--gcpro_level != gcpro##1 .level) \ |
| 2347 | ? (abort (), 0) \ | 2347 | ? (abort (), 0) \ |
| 2348 | : ((gcprolist = gcpro##1.next), 0)) | 2348 | : ((gcprolist = gcpro##1 .next), 0)) |
| 2349 | 2349 | ||
| 2350 | #endif /* DEBUG_GCPRO */ | 2350 | #endif /* DEBUG_GCPRO */ |
| 2351 | #endif /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */ | 2351 | #endif /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */ |
diff --git a/src/lread.c b/src/lread.c index af737d27070..110f3e62f71 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -2210,7 +2210,7 @@ read_escape (Lisp_Object readcharfun, int stringp) | |||
| 2210 | case 'x': | 2210 | case 'x': |
| 2211 | /* A hex escape, as in ANSI C. */ | 2211 | /* A hex escape, as in ANSI C. */ |
| 2212 | { | 2212 | { |
| 2213 | int i = 0; | 2213 | unsigned int i = 0; |
| 2214 | int count = 0; | 2214 | int count = 0; |
| 2215 | while (1) | 2215 | while (1) |
| 2216 | { | 2216 | { |
| @@ -2234,7 +2234,9 @@ read_escape (Lisp_Object readcharfun, int stringp) | |||
| 2234 | UNREAD (c); | 2234 | UNREAD (c); |
| 2235 | break; | 2235 | break; |
| 2236 | } | 2236 | } |
| 2237 | if (MAX_CHAR < i) | 2237 | /* Allow hex escapes as large as ?\xfffffff, because some |
| 2238 | packages use them to denote characters with modifiers. */ | ||
| 2239 | if ((CHAR_META | (CHAR_META - 1)) < i) | ||
| 2238 | error ("Hex character out of range: \\x%x...", i); | 2240 | error ("Hex character out of range: \\x%x...", i); |
| 2239 | count += count < 3; | 2241 | count += count < 3; |
| 2240 | } | 2242 | } |
diff --git a/src/minibuf.c b/src/minibuf.c index f082cc01d97..a44a6376472 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -1859,9 +1859,10 @@ The arguments STRING and PREDICATE are as in `try-completion', | |||
| 1859 | /* First, look for a non-internal buffer in `res'. */ | 1859 | /* First, look for a non-internal buffer in `res'. */ |
| 1860 | while (CONSP (bufs) && SREF (XCAR (bufs), 0) == ' ') | 1860 | while (CONSP (bufs) && SREF (XCAR (bufs), 0) == ' ') |
| 1861 | bufs = XCDR (bufs); | 1861 | bufs = XCDR (bufs); |
| 1862 | if (NILP (bufs) && EQ (Flength (res), Flength (Vbuffer_alist))) | 1862 | if (NILP (bufs)) |
| 1863 | /* All bufs are internal, so don't trip them out. */ | 1863 | return (EQ (Flength (res), Flength (Vbuffer_alist)) |
| 1864 | return res; | 1864 | /* If all bufs are internal don't strip them out. */ |
| 1865 | ? res : bufs); | ||
| 1865 | res = bufs; | 1866 | res = bufs; |
| 1866 | while (CONSP (XCDR (bufs))) | 1867 | while (CONSP (XCDR (bufs))) |
| 1867 | if (SREF (XCAR (XCDR (bufs)), 0) == ' ') | 1868 | if (SREF (XCAR (XCDR (bufs)), 0) == ' ') |
diff --git a/src/xdisp.c b/src/xdisp.c index 9ec7463c555..09de9e4b539 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -7189,7 +7189,6 @@ get_visually_first_element (struct it *it) | |||
| 7189 | } | 7189 | } |
| 7190 | else if (it->bidi_it.charpos == bob | 7190 | else if (it->bidi_it.charpos == bob |
| 7191 | || (!string_p | 7191 | || (!string_p |
| 7192 | /* FIXME: Should support all Unicode line separators. */ | ||
| 7193 | && (FETCH_CHAR (it->bidi_it.bytepos - 1) == '\n' | 7192 | && (FETCH_CHAR (it->bidi_it.bytepos - 1) == '\n' |
| 7194 | || FETCH_CHAR (it->bidi_it.bytepos) == '\n'))) | 7193 | || FETCH_CHAR (it->bidi_it.bytepos) == '\n'))) |
| 7195 | { | 7194 | { |
| @@ -13935,27 +13934,9 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 13935 | glyph--; | 13934 | glyph--; |
| 13936 | } | 13935 | } |
| 13937 | } | 13936 | } |
| 13938 | else if (match_with_avoid_cursor | 13937 | else if (match_with_avoid_cursor) |
| 13939 | /* A truncated row may not include PT among its | 13938 | { |
| 13940 | character positions. Setting the cursor inside the | 13939 | cursor = glyph_after; |
| 13941 | scroll margin will trigger recalculation of hscroll | ||
| 13942 | in hscroll_window_tree. But if a display string | ||
| 13943 | covers point, defer to the string-handling code | ||
| 13944 | below to figure this out. */ | ||
| 13945 | || (!string_seen | ||
| 13946 | && ((row->truncated_on_left_p && pt_old < bpos_min) | ||
| 13947 | || (row->truncated_on_right_p && pt_old > bpos_max) | ||
| 13948 | /* Zero-width characters produce no glyphs. */ | ||
| 13949 | || (!empty_line_p | ||
| 13950 | && (row->reversed_p | ||
| 13951 | ? glyph_after > glyphs_end | ||
| 13952 | : glyph_after < glyphs_end))))) | ||
| 13953 | { | ||
| 13954 | if (!match_with_avoid_cursor | ||
| 13955 | && row->truncated_on_left_p && pt_old < bpos_min) | ||
| 13956 | cursor = glyph_before; | ||
| 13957 | else | ||
| 13958 | cursor = glyph_after; | ||
| 13959 | x = -1; | 13940 | x = -1; |
| 13960 | } | 13941 | } |
| 13961 | else if (string_seen) | 13942 | else if (string_seen) |
| @@ -14094,6 +14075,26 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 14094 | && row->continued_p) | 14075 | && row->continued_p) |
| 14095 | return 0; | 14076 | return 0; |
| 14096 | } | 14077 | } |
| 14078 | /* A truncated row may not include PT among its character positions. | ||
| 14079 | Setting the cursor inside the scroll margin will trigger | ||
| 14080 | recalculation of hscroll in hscroll_window_tree. But if a | ||
| 14081 | display string covers point, defer to the string-handling | ||
| 14082 | code below to figure this out. */ | ||
| 14083 | else if (row->truncated_on_left_p && pt_old < bpos_min) | ||
| 14084 | { | ||
| 14085 | cursor = glyph_before; | ||
| 14086 | x = -1; | ||
| 14087 | } | ||
| 14088 | else if ((row->truncated_on_right_p && pt_old > bpos_max) | ||
| 14089 | /* Zero-width characters produce no glyphs. */ | ||
| 14090 | || (!empty_line_p | ||
| 14091 | && (row->reversed_p | ||
| 14092 | ? glyph_after > glyphs_end | ||
| 14093 | : glyph_after < glyphs_end))) | ||
| 14094 | { | ||
| 14095 | cursor = glyph_after; | ||
| 14096 | x = -1; | ||
| 14097 | } | ||
| 14097 | } | 14098 | } |
| 14098 | 14099 | ||
| 14099 | compute_x: | 14100 | compute_x: |
| @@ -18750,7 +18751,12 @@ find_row_edges (struct it *it, struct glyph_row *row, | |||
| 18750 | seen_this_string = 1; | 18751 | seen_this_string = 1; |
| 18751 | } | 18752 | } |
| 18752 | else | 18753 | else |
| 18753 | abort (); | 18754 | /* If all the glyphs of the previous row were inserted |
| 18755 | by redisplay, it means the previous row was | ||
| 18756 | produced from a single newline, which is only | ||
| 18757 | possible if that newline came from the same string | ||
| 18758 | as the one which produced this ROW. */ | ||
| 18759 | seen_this_string = 1; | ||
| 18754 | } | 18760 | } |
| 18755 | else | 18761 | else |
| 18756 | { | 18762 | { |
| @@ -18766,7 +18772,7 @@ find_row_edges (struct it *it, struct glyph_row *row, | |||
| 18766 | seen_this_string = 1; | 18772 | seen_this_string = 1; |
| 18767 | } | 18773 | } |
| 18768 | else | 18774 | else |
| 18769 | abort (); | 18775 | seen_this_string = 1; |
| 18770 | } | 18776 | } |
| 18771 | } | 18777 | } |
| 18772 | /* Take note of each display string that covers a newline only | 18778 | /* Take note of each display string that covers a newline only |
| @@ -19583,6 +19589,7 @@ See also `bidi-paragraph-direction'. */) | |||
| 19583 | bytepos--; | 19589 | bytepos--; |
| 19584 | } | 19590 | } |
| 19585 | bidi_init_it (pos, bytepos, FRAME_WINDOW_P (SELECTED_FRAME ()), &itb); | 19591 | bidi_init_it (pos, bytepos, FRAME_WINDOW_P (SELECTED_FRAME ()), &itb); |
| 19592 | itb.paragraph_dir = NEUTRAL_DIR; | ||
| 19586 | itb.string.s = NULL; | 19593 | itb.string.s = NULL; |
| 19587 | itb.string.lstring = Qnil; | 19594 | itb.string.lstring = Qnil; |
| 19588 | itb.string.bufpos = 0; | 19595 | itb.string.bufpos = 0; |