diff options
| author | Glenn Morris | 2013-12-17 19:21:48 -0800 |
|---|---|---|
| committer | Glenn Morris | 2013-12-17 19:21:48 -0800 |
| commit | 1f41ee56ace98fe0d5f288c97ddb73870befed45 (patch) | |
| tree | 6bee6711c5e9c8d2cc03d102b8bd5e1b27ba13c7 /src/image.c | |
| parent | e82134b1e4efb363e21b1f9103af7ee5ec885ce4 (diff) | |
| download | emacs-1f41ee56ace98fe0d5f288c97ddb73870befed45.tar.gz emacs-1f41ee56ace98fe0d5f288c97ddb73870befed45.zip | |
Add load-prefer-newer option, to load .el if newer than .elc
* src/lread.c (Fload): Pass load_prefer_newer to openp.
Don't bother checking mtime if openp already did it.
(openp): Add `newer' argument, to check all suffixes
and find the newest file.
(syms_of_lread) <load_prefer_newer>: New option.
* src/callproc.c (call_process):
* src/charset.c (load_charset_map_from_file):
* src/emacs.c (init_cmdargs):
* src/image.c (x_create_bitmap_from_file, x_find_image_file):
* src/lisp.h (openp):
* lread.c (Flocate_file_internal):
* src/process.c (Fformat_network_address):
* src/sound.c (Fplay_sound_internal):
* src/w32.c (check_windows_init_file):
* src/w32proc.c (sys_spawnve): Update for new arg spec of openp.
* lisp/Makefile.in (BYTE_COMPILE_FLAGS): Set load-prefer-newer to t.
* etc/NEWS: Mention this.
Fixes: debbugs:2061
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/image.c b/src/image.c index e1c6e5df3cd..85f29329bd3 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -327,7 +327,7 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file) | |||
| 327 | } | 327 | } |
| 328 | 328 | ||
| 329 | /* Search bitmap-file-path for the file, if appropriate. */ | 329 | /* Search bitmap-file-path for the file, if appropriate. */ |
| 330 | if (openp (Vx_bitmap_file_path, file, Qnil, &found, make_number (R_OK)) < 0) | 330 | if (openp (Vx_bitmap_file_path, file, Qnil, &found, make_number (R_OK), 0) < 0) |
| 331 | return -1; | 331 | return -1; |
| 332 | 332 | ||
| 333 | filename = SSDATA (found); | 333 | filename = SSDATA (found); |
| @@ -2242,7 +2242,7 @@ x_find_image_file (Lisp_Object file) | |||
| 2242 | Vx_bitmap_file_path); | 2242 | Vx_bitmap_file_path); |
| 2243 | 2243 | ||
| 2244 | /* Try to find FILE in data-directory/images, then x-bitmap-file-path. */ | 2244 | /* Try to find FILE in data-directory/images, then x-bitmap-file-path. */ |
| 2245 | fd = openp (search_path, file, Qnil, &file_found, Qnil); | 2245 | fd = openp (search_path, file, Qnil, &file_found, Qnil, 0); |
| 2246 | 2246 | ||
| 2247 | if (fd == -1) | 2247 | if (fd == -1) |
| 2248 | file_found = Qnil; | 2248 | file_found = Qnil; |