Commit c0ec53ad authored by Stefan Monnier's avatar Stefan Monnier
Browse files

Update calls to openp.

parent b81a1b72
2001-10-11 Stefan Monnier <monnier@cs.yale.edu>
* src/macfns.c (x_create_bitmap_from_file, x_find_image_file):
* src/mac.c (run_mac_command): Update calls to openp.
2001-10-08 Stefan Monnier <monnier@cs.yale.edu> 2001-10-08 Stefan Monnier <monnier@cs.yale.edu>
* src/macmenu.c (Fx_popup_menu): Use Fkeymap_prompt. * src/macmenu.c (Fx_popup_menu): Use Fkeymap_prompt.
...@@ -8,7 +13,7 @@ ...@@ -8,7 +13,7 @@
2001-10-05 Gerd Moellmann <gerd@gnu.org> 2001-10-05 Gerd Moellmann <gerd@gnu.org>
* Branch for 21.1. * Branch for 21.1.
2001-09-04 Andrew Choi <akochoi@cse.cuhk.edu.hk> 2001-09-04 Andrew Choi <akochoi@cse.cuhk.edu.hk>
* src/macmenu.c (mac_menu_show): Use refcon of selected menu item. * src/macmenu.c (mac_menu_show): Use refcon of selected menu item.
......
...@@ -2010,7 +2010,7 @@ run_mac_command (argv, workdir, infn, outfn, errfn) ...@@ -2010,7 +2010,7 @@ run_mac_command (argv, workdir, infn, outfn, errfn)
strcat (t, newargv[0]); strcat (t, newargv[0]);
#endif #endif
Lisp_Object path; Lisp_Object path;
openp (Vexec_path, build_string (newargv[0]), EXEC_SUFFIXES, &path, openp (Vexec_path, build_string (newargv[0]), Vexec_suffixes, &path,
1); 1);
if (NILP (path)) if (NILP (path))
......
...@@ -513,7 +513,7 @@ x_create_bitmap_from_file (f, file) ...@@ -513,7 +513,7 @@ x_create_bitmap_from_file (f, file)
} }
/* Search bitmap-file-path for the file, if appropriate. */ /* Search bitmap-file-path for the file, if appropriate. */
fd = openp (Vx_bitmap_file_path, file, "", &found, 0); fd = openp (Vx_bitmap_file_path, file, Qnil, &found, 0);
if (fd < 0) if (fd < 0)
return -1; return -1;
/* LoadLibraryEx won't handle special files handled by Emacs handler. */ /* LoadLibraryEx won't handle special files handled by Emacs handler. */
...@@ -5367,7 +5367,7 @@ x_find_image_file (file) ...@@ -5367,7 +5367,7 @@ x_find_image_file (file)
GCPRO2 (file_found, search_path); GCPRO2 (file_found, search_path);
/* Try to find FILE in data-directory, then x-bitmap-file-path. */ /* Try to find FILE in data-directory, then x-bitmap-file-path. */
fd = openp (search_path, file, "", &file_found, 0); fd = openp (search_path, file, Qnil, &file_found, 0);
if (fd < 0) if (fd < 0)
file_found = Qnil; file_found = Qnil;
......
2001-10-11 Stefan Monnier <monnier@cs.yale.edu> 2001-10-11 Stefan Monnier <monnier@cs.yale.edu>
* xfns.c (x_create_bitmap_from_file, x_find_image_file):
* w32proc.c (sys_spawnve):
* w32fns.c (x_create_bitmap_from_file, x_find_image_file):
* w32.c (check_windows_init_file):
* sound.c (Fplay_sound):
* process.c (Fstart_process): Update calls to openp.
* callproc.c (Vexec_suffixes): New var.
(Fcall_process): Update call to openp.
(decode_suffixes): New function.
(syms_of_callproc): Init exec-suffixes.
* lread.c (Vload_suffixes, default_suffixes): New vars.
(openp): Take a lisp list of suffixes.
Check for file-name-handlers even if the file was absolute already.
(syms_of_lread): Declare load-suffixes.
(Fload): Fix up call to openp.
Don't bother checking for file-name-handler at the very beginning.
* keymap.h (Fcopy_keymap): Don't export. * keymap.h (Fcopy_keymap): Don't export.
* lisp.h (empty_string): Declare. * lisp.h (empty_string): Declare.
(Vload_suffixes, Vexec_suffixes): Declare.
(openp): Update prototype.
* emacs.c (empty_string): New var. * emacs.c (empty_string): New var.
(syms_of_emacs): Initialize it. (syms_of_emacs): Initialize it.
......
...@@ -438,7 +438,7 @@ init_cmdargs (argc, argv, skip_args) ...@@ -438,7 +438,7 @@ init_cmdargs (argc, argv, skip_args)
{ {
Lisp_Object found; Lisp_Object found;
int yes = openp (Vexec_path, Vinvocation_name, int yes = openp (Vexec_path, Vinvocation_name,
EXEC_SUFFIXES, &found, 1); Vexec_suffixes, &found, 1);
if (yes == 1) if (yes == 1)
{ {
/* Add /: to the front of the name /* Add /: to the front of the name
......
...@@ -1196,7 +1196,7 @@ Remaining arguments are strings to give program as arguments.") ...@@ -1196,7 +1196,7 @@ Remaining arguments are strings to give program as arguments.")
tem = Qnil; tem = Qnil;
GCPRO4 (name, program, buffer, current_dir); GCPRO4 (name, program, buffer, current_dir);
openp (Vexec_path, program, EXEC_SUFFIXES, &tem, 1); openp (Vexec_path, program, Vexec_suffixes, &tem, 1);
UNGCPRO; UNGCPRO;
if (NILP (tem)) if (NILP (tem))
report_file_error ("Searching for program", Fcons (program, Qnil)); report_file_error ("Searching for program", Fcons (program, Qnil));
...@@ -3386,8 +3386,8 @@ send_process (proc, buf, len, object) ...@@ -3386,8 +3386,8 @@ send_process (proc, buf, len, object)
Long lines need to be split into multiple batches. */ Long lines need to be split into multiple batches. */
if (!NILP (XPROCESS (proc)->pty_flag)) if (!NILP (XPROCESS (proc)->pty_flag))
{ {
/* Starting this at zero is always correct when not the first iteration /* Starting this at zero is always correct when not the first
because the previous iteration ended by sending C-d. iteration because the previous iteration ended by sending C-d.
It may not be correct for the first iteration It may not be correct for the first iteration
if a partial line was sent in a separate send_process call. if a partial line was sent in a separate send_process call.
If that proves worth handling, we need to save linepos If that proves worth handling, we need to save linepos
......
...@@ -412,7 +412,7 @@ a system-dependent default device name is used.") ...@@ -412,7 +412,7 @@ a system-dependent default device name is used.")
{ {
/* Open the sound file. */ /* Open the sound file. */
s.fd = openp (Fcons (Vdata_directory, Qnil), s.fd = openp (Fcons (Vdata_directory, Qnil),
attrs[SOUND_FILE], "", &file, 0); attrs[SOUND_FILE], Qnil, &file, 0);
if (s.fd < 0) if (s.fd < 0)
sound_perror ("Open sound file"); sound_perror ("Open sound file");
......
...@@ -3329,7 +3329,7 @@ check_windows_init_file () ...@@ -3329,7 +3329,7 @@ check_windows_init_file ()
objs[1] = decode_env_path (0, (getenv ("EMACSLOADPATH"))); objs[1] = decode_env_path (0, (getenv ("EMACSLOADPATH")));
full_load_path = Fappend (2, objs); full_load_path = Fappend (2, objs);
init_file = build_string ("term/w32-win"); init_file = build_string ("term/w32-win");
fd = openp (full_load_path, init_file, ".el:.elc", NULL, 0); fd = openp (full_load_path, init_file, Vload_suffixes, NULL, 0);
if (fd < 0) if (fd < 0)
{ {
Lisp_Object load_path_print = Fprin1_to_string (full_load_path, Qnil); Lisp_Object load_path_print = Fprin1_to_string (full_load_path, Qnil);
......
...@@ -551,7 +551,7 @@ x_create_bitmap_from_file (f, file) ...@@ -551,7 +551,7 @@ x_create_bitmap_from_file (f, file)
} }
/* Search bitmap-file-path for the file, if appropriate. */ /* Search bitmap-file-path for the file, if appropriate. */
fd = openp (Vx_bitmap_file_path, file, "", &found, 0); fd = openp (Vx_bitmap_file_path, file, Qnil, &found, 0);
if (fd < 0) if (fd < 0)
return -1; return -1;
emacs_close (fd); emacs_close (fd);
...@@ -8654,7 +8654,7 @@ x_find_image_file (file) ...@@ -8654,7 +8654,7 @@ x_find_image_file (file)
GCPRO2 (file_found, search_path); GCPRO2 (file_found, search_path);
/* Try to find FILE in data-directory, then x-bitmap-file-path. */ /* Try to find FILE in data-directory, then x-bitmap-file-path. */
fd = openp (search_path, file, "", &file_found, 0); fd = openp (search_path, file, Qnil, &file_found, 0);
if (fd == -1) if (fd == -1)
file_found = Qnil; file_found = Qnil;
......
...@@ -744,7 +744,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) ...@@ -744,7 +744,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
full = Qnil; full = Qnil;
GCPRO1 (program); GCPRO1 (program);
openp (Vexec_path, program, EXEC_SUFFIXES, &full, 1); openp (Vexec_path, program, Vexec_suffixes, &full, 1);
UNGCPRO; UNGCPRO;
if (NILP (full)) if (NILP (full))
{ {
......
...@@ -641,7 +641,7 @@ x_create_bitmap_from_file (f, file) ...@@ -641,7 +641,7 @@ x_create_bitmap_from_file (f, file)
} }
/* Search bitmap-file-path for the file, if appropriate. */ /* Search bitmap-file-path for the file, if appropriate. */
fd = openp (Vx_bitmap_file_path, file, "", &found, 0); fd = openp (Vx_bitmap_file_path, file, Qnil, &found, 0);
if (fd < 0) if (fd < 0)
return -1; return -1;
emacs_close (fd); emacs_close (fd);
...@@ -2970,9 +2970,9 @@ x_default_scroll_bar_color_parameter (f, alist, prop, xprop, xclass, ...@@ -2970,9 +2970,9 @@ x_default_scroll_bar_color_parameter (f, alist, prop, xprop, xclass,
build_string (foreground_p build_string (foreground_p
? "foreground" ? "foreground"
: "background"), : "background"),
build_string (""), empty_string,
build_string ("verticalScrollBar"), build_string ("verticalScrollBar"),
build_string ("")); empty_string);
if (!STRINGP (tem)) if (!STRINGP (tem))
{ {
/* If nothing has been specified, scroll bars will use a /* If nothing has been specified, scroll bars will use a
...@@ -6359,7 +6359,7 @@ x_find_image_file (file) ...@@ -6359,7 +6359,7 @@ x_find_image_file (file)
GCPRO2 (file_found, search_path); GCPRO2 (file_found, search_path);
/* Try to find FILE in data-directory, then x-bitmap-file-path. */ /* Try to find FILE in data-directory, then x-bitmap-file-path. */
fd = openp (search_path, file, "", &file_found, 0); fd = openp (search_path, file, Qnil, &file_found, 0);
if (fd == -1) if (fd == -1)
file_found = Qnil; file_found = Qnil;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment