Mercurial > emacs
comparison src/lread.c @ 104853:51dc0c10fa2c
Fix whitespace.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sat, 05 Sep 2009 00:45:08 +0000 |
parents | 7b5e19f7e726 |
children | 1e1816f211ce |
comparison
equal
deleted
inserted
replaced
104852:e066b8cdbefb | 104853:51dc0c10fa2c |
---|---|
2040 read_escape (readcharfun, stringp) | 2040 read_escape (readcharfun, stringp) |
2041 Lisp_Object readcharfun; | 2041 Lisp_Object readcharfun; |
2042 int stringp; | 2042 int stringp; |
2043 { | 2043 { |
2044 register int c = READCHAR; | 2044 register int c = READCHAR; |
2045 /* \u allows up to four hex digits, \U up to eight. Default to the | 2045 /* \u allows up to four hex digits, \U up to eight. Default to the |
2046 behavior for \u, and change this value in the case that \U is seen. */ | 2046 behavior for \u, and change this value in the case that \U is seen. */ |
2047 int unicode_hex_count = 4; | 2047 int unicode_hex_count = 4; |
2048 | 2048 |
2049 switch (c) | 2049 switch (c) |
2050 { | 2050 { |
2214 case 'U': | 2214 case 'U': |
2215 /* Post-Unicode-2.0: Up to eight hex chars. */ | 2215 /* Post-Unicode-2.0: Up to eight hex chars. */ |
2216 unicode_hex_count = 8; | 2216 unicode_hex_count = 8; |
2217 case 'u': | 2217 case 'u': |
2218 | 2218 |
2219 /* A Unicode escape. We only permit them in strings and characters, | 2219 /* A Unicode escape. We only permit them in strings and characters, |
2220 not arbitrarily in the source code, as in some other languages. */ | 2220 not arbitrarily in the source code, as in some other languages. */ |
2221 { | 2221 { |
2222 unsigned int i = 0; | 2222 unsigned int i = 0; |
2223 int count = 0; | 2223 int count = 0; |
2224 | 2224 |
2367 Lisp_Object head = CAR_SAFE (tmp); | 2367 Lisp_Object head = CAR_SAFE (tmp); |
2368 Lisp_Object data = Qnil; | 2368 Lisp_Object data = Qnil; |
2369 Lisp_Object val = Qnil; | 2369 Lisp_Object val = Qnil; |
2370 /* The size is 2 * number of allowed keywords to | 2370 /* The size is 2 * number of allowed keywords to |
2371 make-hash-table. */ | 2371 make-hash-table. */ |
2372 Lisp_Object params[10]; | 2372 Lisp_Object params[10]; |
2373 Lisp_Object ht; | 2373 Lisp_Object ht; |
2374 Lisp_Object key = Qnil; | 2374 Lisp_Object key = Qnil; |
2375 int param_count = 0; | 2375 int param_count = 0; |
2376 | 2376 |
2377 if (!EQ (head, Qhash_table)) | 2377 if (!EQ (head, Qhash_table)) |
2378 error ("Invalid extended read marker at head of #s list " | 2378 error ("Invalid extended read marker at head of #s list " |
2379 "(only hash-table allowed)"); | 2379 "(only hash-table allowed)"); |
2380 | 2380 |
2381 tmp = CDR_SAFE (tmp); | 2381 tmp = CDR_SAFE (tmp); |
2382 | 2382 |
2383 /* This is repetitive but fast and simple. */ | 2383 /* This is repetitive but fast and simple. */ |
2384 params[param_count] = QCsize; | 2384 params[param_count] = QCsize; |
2385 params[param_count+1] = Fplist_get (tmp, Qsize); | 2385 params[param_count+1] = Fplist_get (tmp, Qsize); |
2409 /* This is the hashtable data. */ | 2409 /* This is the hashtable data. */ |
2410 data = Fplist_get (tmp, Qdata); | 2410 data = Fplist_get (tmp, Qdata); |
2411 | 2411 |
2412 /* Now use params to make a new hashtable and fill it. */ | 2412 /* Now use params to make a new hashtable and fill it. */ |
2413 ht = Fmake_hash_table (param_count, params); | 2413 ht = Fmake_hash_table (param_count, params); |
2414 | 2414 |
2415 while (CONSP (data)) | 2415 while (CONSP (data)) |
2416 { | 2416 { |
2417 key = XCAR (data); | 2417 key = XCAR (data); |
2418 data = XCDR (data); | 2418 data = XCDR (data); |
2419 if (!CONSP (data)) | 2419 if (!CONSP (data)) |
2420 error ("Odd number of elements in hashtable data"); | 2420 error ("Odd number of elements in hashtable data"); |
2421 val = XCAR (data); | 2421 val = XCAR (data); |
2422 data = XCDR (data); | 2422 data = XCDR (data); |
2423 Fputhash (key, val, ht); | 2423 Fputhash (key, val, ht); |
2424 } | 2424 } |
2425 | 2425 |
2426 return ht; | 2426 return ht; |
2427 } | 2427 } |
2428 } | 2428 } |
2429 if (c == '^') | 2429 if (c == '^') |
2430 { | 2430 { |
2650 { | 2650 { |
2651 /* Make a placeholder for #n# to use temporarily */ | 2651 /* Make a placeholder for #n# to use temporarily */ |
2652 Lisp_Object placeholder; | 2652 Lisp_Object placeholder; |
2653 Lisp_Object cell; | 2653 Lisp_Object cell; |
2654 | 2654 |
2655 placeholder = Fcons(Qnil, Qnil); | 2655 placeholder = Fcons (Qnil, Qnil); |
2656 cell = Fcons (make_number (n), placeholder); | 2656 cell = Fcons (make_number (n), placeholder); |
2657 read_objects = Fcons (cell, read_objects); | 2657 read_objects = Fcons (cell, read_objects); |
2658 | 2658 |
2659 /* Read the object itself. */ | 2659 /* Read the object itself. */ |
2660 tem = read0 (readcharfun); | 2660 tem = read0 (readcharfun); |
3237 Lisp_Object arg; | 3237 Lisp_Object arg; |
3238 { | 3238 { |
3239 Lisp_Object object = Fcar (arg); | 3239 Lisp_Object object = Fcar (arg); |
3240 Lisp_Object placeholder = Fcdr (arg); | 3240 Lisp_Object placeholder = Fcdr (arg); |
3241 | 3241 |
3242 SUBSTITUTE(interval->plist, interval->plist = true_value); | 3242 SUBSTITUTE (interval->plist, interval->plist = true_value); |
3243 } | 3243 } |
3244 | 3244 |
3245 | 3245 |
3246 #define LEAD_INT 1 | 3246 #define LEAD_INT 1 |
3247 #define DOT_CHAR 2 | 3247 #define DOT_CHAR 2 |
4178 Vload_path = decode_env_path (0, normal); | 4178 Vload_path = decode_env_path (0, normal); |
4179 dump_path = Vload_path; | 4179 dump_path = Vload_path; |
4180 } | 4180 } |
4181 #endif | 4181 #endif |
4182 | 4182 |
4183 #if (!(defined(WINDOWSNT) || (defined(HAVE_NS)))) | 4183 #if (!(defined (WINDOWSNT) || (defined (HAVE_NS)))) |
4184 /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is | 4184 /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is |
4185 almost never correct, thereby causing a warning to be printed out that | 4185 almost never correct, thereby causing a warning to be printed out that |
4186 confuses users. Since PATH_LOADSEARCH is always overridden by the | 4186 confuses users. Since PATH_LOADSEARCH is always overridden by the |
4187 EMACSLOADPATH environment variable below, disable the warning on NT. */ | 4187 EMACSLOADPATH environment variable below, disable the warning on NT. */ |
4188 | 4188 |