[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/fileio.c
From: |
Jan Djärv |
Subject: |
[Emacs-diffs] Changes to emacs/src/fileio.c |
Date: |
Thu, 04 Nov 2004 10:26:46 -0500 |
Index: emacs/src/fileio.c
diff -c emacs/src/fileio.c:1.517 emacs/src/fileio.c:1.518
*** emacs/src/fileio.c:1.517 Tue Nov 2 08:21:16 2004
--- emacs/src/fileio.c Thu Nov 4 15:19:49 2004
***************
*** 6174,6179 ****
--- 6174,6196 ----
return Ffile_exists_p (string);
}
+ DEFUN ("next-read-file-uses-dialog-p", Fnext_read_file_uses_dialog_p,
+ Snext_read_file_uses_dialog_p, 0, 0, 0,
+ doc: /* Return t if a call to `read-file-name' will use a dialog.
+ The return value is only relevant for a call to `read-file-name' that happens
+ before any other event (mouse or keypress) is handeled. */)
+ ()
+ {
+ #if defined (USE_MOTIF) || defined (HAVE_NTGUI) || defined (USE_GTK) ||
defined (TARGET_API_MAC_CARBON)
+ if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
+ && use_dialog_box
+ && use_file_dialog
+ && have_menus_p ())
+ return Qt;
+ #endif
+ return Qnil;
+ }
+
DEFUN ("read-file-name", Fread_file_name, Sread_file_name, 1, 6, 0,
doc: /* Read file name, prompting with PROMPT and completing in
directory DIR.
Value is not expanded---you must call `expand-file-name' yourself.
***************
*** 6306,6315 ****
GCPRO2 (insdef, default_filename);
#if defined (USE_MOTIF) || defined (HAVE_NTGUI) || defined (USE_GTK) ||
defined (TARGET_API_MAC_CARBON)
! if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
! && use_dialog_box
! && use_file_dialog
! && have_menus_p ())
{
/* If DIR contains a file name, split it. */
Lisp_Object file;
--- 6323,6329 ----
GCPRO2 (insdef, default_filename);
#if defined (USE_MOTIF) || defined (HAVE_NTGUI) || defined (USE_GTK) ||
defined (TARGET_API_MAC_CARBON)
! if (! NILP (Fnext_read_file_uses_dialog_p ()))
{
/* If DIR contains a file name, split it. */
Lisp_Object file;
***************
*** 6694,6699 ****
--- 6708,6714 ----
defsubr (&Sread_file_name_internal);
defsubr (&Sread_file_name);
+ defsubr (&Snext_read_file_uses_dialog_p);
#ifdef unix
defsubr (&Sunix_sync);