aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2003-11-29 10:44:36 +0000
committerJan Djärv2003-11-29 10:44:36 +0000
commit03d6484ea449799da1d223491c12d29204aa708a (patch)
treef70dd6e75ccc22f2bbb6cf64db8b9db81b1b58a2
parent442d3fd0482e0db752c3de199d370d95f7c209c2 (diff)
downloademacs-03d6484ea449799da1d223491c12d29204aa708a.tar.gz
emacs-03d6484ea449799da1d223491c12d29204aa708a.zip
Add variable use-file-dialog to control use of file dialogs.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/cus-start.el1
-rw-r--r--src/ChangeLog8
-rw-r--r--src/fileio.c2
-rw-r--r--src/fns.c11
5 files changed, 26 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d8d6278337c..460c73c72e6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12003-11-29 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2
3 * cus-start.el (all): Add use-file-dialog.
4
12003-11-27 Kim F. Storm <storm@cua.dk> 52003-11-27 Kim F. Storm <storm@cua.dk>
2 6
3 * subr.el (posn-object-x-y): New defun. 7 * subr.el (posn-object-x-y): New defun.
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index db044fc8ba9..5e237cd0db7 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -123,6 +123,7 @@
123 (insert-default-directory minibuffer boolean) 123 (insert-default-directory minibuffer boolean)
124 ;; fns.c 124 ;; fns.c
125 (use-dialog-box menu boolean "21.1") 125 (use-dialog-box menu boolean "21.1")
126 (use-file-dialog menu boolean "21.4")
126 ;; frame.c 127 ;; frame.c
127 (default-frame-alist frames 128 (default-frame-alist frames
128 (repeat (cons :format "%v" 129 (repeat (cons :format "%v"
diff --git a/src/ChangeLog b/src/ChangeLog
index dc5f96e1f3f..19ffd8f9428 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12003-11-29 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2
3 * fileio.c (Fread_file_name): Check use_file_dialog also before
4 calling Fx_file_dialog.
5
6 * fns.c: use_file_dialog: New variable.
7 (syms_of_fns): DEFVAR_BOOL use-file-dialog.
8
12003-11-29 Kim F. Storm <storm@cua.dk> 92003-11-29 Kim F. Storm <storm@cua.dk>
2 10
3 * msdos.c (Qcursor_type, Qbar, Qhbar): Declare extern. 11 * msdos.c (Qcursor_type, Qbar, Qhbar): Declare extern.
diff --git a/src/fileio.c b/src/fileio.c
index 9ed46109951..e586407cecc 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -134,6 +134,7 @@ extern int errno;
134 134
135#include "commands.h" 135#include "commands.h"
136extern int use_dialog_box; 136extern int use_dialog_box;
137extern int use_file_dialog;
137 138
138#ifndef O_WRONLY 139#ifndef O_WRONLY
139#define O_WRONLY 1 140#define O_WRONLY 1
@@ -6212,6 +6213,7 @@ provides a file dialog box. */)
6212#if defined (USE_MOTIF) || defined (HAVE_NTGUI) || defined (USE_GTK) 6213#if defined (USE_MOTIF) || defined (HAVE_NTGUI) || defined (USE_GTK)
6213 if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) 6214 if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
6214 && use_dialog_box 6215 && use_dialog_box
6216 && use_file_dialog
6215 && have_menus_p ()) 6217 && have_menus_p ())
6216 { 6218 {
6217 /* If DIR contains a file name, split it. */ 6219 /* If DIR contains a file name, split it. */
diff --git a/src/fns.c b/src/fns.c
index 18bf8d62a8b..fed948dc29f 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -59,6 +59,10 @@ Boston, MA 02111-1307, USA. */
59 asked by mouse commands. */ 59 asked by mouse commands. */
60int use_dialog_box; 60int use_dialog_box;
61 61
62/* Nonzero enables use of a file dialog for file name
63 questions asked by mouse commands. */
64int use_file_dialog;
65
62extern int minibuffer_auto_raise; 66extern int minibuffer_auto_raise;
63extern Lisp_Object minibuf_window; 67extern Lisp_Object minibuf_window;
64extern Lisp_Object Vlocale_coding_system; 68extern Lisp_Object Vlocale_coding_system;
@@ -5638,6 +5642,13 @@ This applies to `y-or-n-p' and `yes-or-no-p' questions asked by commands
5638invoked by mouse clicks and mouse menu items. */); 5642invoked by mouse clicks and mouse menu items. */);
5639 use_dialog_box = 1; 5643 use_dialog_box = 1;
5640 5644
5645 DEFVAR_BOOL ("use-file-dialog", &use_file_dialog,
5646 doc: /* *Non-nil means mouse commands use a file dialog to ask for files.
5647This applies to commands from menus and tool bar buttons. The value of
5648`use-dialog-box' takes precedence over this variable, so a file dialog is only
5649used if both `use-dialog-box' and this variable are non-nil. */);
5650 use_file_dialog = 1;
5651
5641 defsubr (&Sidentity); 5652 defsubr (&Sidentity);
5642 defsubr (&Srandom); 5653 defsubr (&Srandom);
5643 defsubr (&Slength); 5654 defsubr (&Slength);