diff options
| author | Karoly Lorentey | 2004-06-28 16:04:52 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-06-28 16:04:52 +0000 |
| commit | 69deab57ea8ab5e3bc1cfb80027341aa0451362b (patch) | |
| tree | 5f0b6c225cc787351c96fc35beeed6746f59d3af /src | |
| parent | 3fa701994755105d1fb4b0b802338fc04e8a6937 (diff) | |
| parent | ef544dc88794ccfd1237f56e3e490f705bf1d025 (diff) | |
| download | emacs-69deab57ea8ab5e3bc1cfb80027341aa0451362b.tar.gz emacs-69deab57ea8ab5e3bc1cfb80027341aa0451362b.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-420
Tweak permissions
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-421
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-422
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-423
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-424
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-425
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-426
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-203
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 34 | ||||
| -rw-r--r-- | src/alloc.c | 23 | ||||
| -rw-r--r-- | src/emacs.c | 20 | ||||
| -rw-r--r-- | src/fns.c | 9 | ||||
| -rw-r--r-- | src/lisp.h | 1 | ||||
| -rw-r--r-- | src/w32fns.c | 25 |
6 files changed, 64 insertions, 48 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6fae7580745..383f479aabd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,11 +1,33 @@ | |||
| 1 | 2004-06-27 Jason Rumney <jasonr@gnu.org> | ||
| 2 | |||
| 3 | * w32fns.c (file_dialog_callback): Disable edit control if set | ||
| 4 | to directories only on CDN_INITDONE message. | ||
| 5 | (Fx_file_dialog): Default to directories only when prompt starts | ||
| 6 | with "Dired". | ||
| 7 | |||
| 8 | 2004-06-25 Kim F. Storm <storm@cua.dk> | ||
| 9 | |||
| 10 | * alloc.c (allocate_misc): Update total_free_markers. | ||
| 11 | (free_misc): New function. | ||
| 12 | (safe_alloca_unwind, free_marker): Use it. | ||
| 13 | |||
| 14 | * lisp.h (free_misc): Add prototype. | ||
| 15 | |||
| 16 | * fns.c (Fmapconcat, Fmapcar): Remove superfluous GCPROs. | ||
| 17 | |||
| 18 | 2004-06-24 Richard M. Stallman <rms@gnu.org> | ||
| 19 | |||
| 20 | * emacs.c (Vsignal_USR1_hook, Vsignal_USR2_hook): Definitions deleted. | ||
| 21 | (syms_of_emacs): Lisp variables deleted. | ||
| 22 | |||
| 1 | 2004-06-23 David Kastrup <dak@gnu.org> | 23 | 2004-06-23 David Kastrup <dak@gnu.org> |
| 2 | 24 | ||
| 3 | * search.c (Freplace_match): Adjust the match-data more | 25 | * search.c (Freplace_match): Adjust the match-data more thoroughly |
| 4 | thoroughly when replacing strings in the buffer. | 26 | when replacing strings in the buffer. |
| 5 | search.c (match-data): When INTEGERS is non-nil and the last match | 27 | (Fmatch_data): When INTEGERS is non-nil and the last match was in |
| 6 | was in a buffer, add the buffer as last element to the match data. | 28 | a buffer, add the buffer as last element to the match data. |
| 7 | (Fset_match_data): If an additional element of the match-data is | 29 | (Fset_match_data): If an additional element of the match-data is a |
| 8 | a buffer, restore it to last_thing_searched. | 30 | buffer, restore it to last_thing_searched. |
| 9 | (save_search_regs): Save last_thing_searched as part of the match | 31 | (save_search_regs): Save last_thing_searched as part of the match |
| 10 | data. | 32 | data. |
| 11 | (restore_match_data): Restore it again. | 33 | (restore_match_data): Restore it again. |
diff --git a/src/alloc.c b/src/alloc.c index baf7afa0094..5dc8d186369 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -591,6 +591,7 @@ safe_alloca_unwind (arg) | |||
| 591 | p->dogc = 0; | 591 | p->dogc = 0; |
| 592 | xfree (p->pointer); | 592 | xfree (p->pointer); |
| 593 | p->pointer = 0; | 593 | p->pointer = 0; |
| 594 | free_misc (arg); | ||
| 594 | return Qnil; | 595 | return Qnil; |
| 595 | } | 596 | } |
| 596 | 597 | ||
| @@ -2922,17 +2923,32 @@ allocate_misc () | |||
| 2922 | marker_block = new; | 2923 | marker_block = new; |
| 2923 | marker_block_index = 0; | 2924 | marker_block_index = 0; |
| 2924 | n_marker_blocks++; | 2925 | n_marker_blocks++; |
| 2926 | total_free_markers += MARKER_BLOCK_SIZE; | ||
| 2925 | } | 2927 | } |
| 2926 | XSETMISC (val, &marker_block->markers[marker_block_index]); | 2928 | XSETMISC (val, &marker_block->markers[marker_block_index]); |
| 2927 | marker_block_index++; | 2929 | marker_block_index++; |
| 2928 | } | 2930 | } |
| 2929 | 2931 | ||
| 2932 | --total_free_markers; | ||
| 2930 | consing_since_gc += sizeof (union Lisp_Misc); | 2933 | consing_since_gc += sizeof (union Lisp_Misc); |
| 2931 | misc_objects_consed++; | 2934 | misc_objects_consed++; |
| 2932 | XMARKER (val)->gcmarkbit = 0; | 2935 | XMARKER (val)->gcmarkbit = 0; |
| 2933 | return val; | 2936 | return val; |
| 2934 | } | 2937 | } |
| 2935 | 2938 | ||
| 2939 | /* Free a Lisp_Misc object */ | ||
| 2940 | |||
| 2941 | void | ||
| 2942 | free_misc (misc) | ||
| 2943 | Lisp_Object misc; | ||
| 2944 | { | ||
| 2945 | XMISC (misc)->u_marker.type = Lisp_Misc_Free; | ||
| 2946 | XMISC (misc)->u_free.chain = marker_free_list; | ||
| 2947 | marker_free_list = XMISC (misc); | ||
| 2948 | |||
| 2949 | total_free_markers++; | ||
| 2950 | } | ||
| 2951 | |||
| 2936 | /* Return a Lisp_Misc_Save_Value object containing POINTER and | 2952 | /* Return a Lisp_Misc_Save_Value object containing POINTER and |
| 2937 | INTEGER. This is used to package C values to call record_unwind_protect. | 2953 | INTEGER. This is used to package C values to call record_unwind_protect. |
| 2938 | The unwind function can get the C values back using XSAVE_VALUE. */ | 2954 | The unwind function can get the C values back using XSAVE_VALUE. */ |
| @@ -2979,12 +2995,7 @@ free_marker (marker) | |||
| 2979 | Lisp_Object marker; | 2995 | Lisp_Object marker; |
| 2980 | { | 2996 | { |
| 2981 | unchain_marker (XMARKER (marker)); | 2997 | unchain_marker (XMARKER (marker)); |
| 2982 | 2998 | free_misc (marker); | |
| 2983 | XMISC (marker)->u_marker.type = Lisp_Misc_Free; | ||
| 2984 | XMISC (marker)->u_free.chain = marker_free_list; | ||
| 2985 | marker_free_list = XMISC (marker); | ||
| 2986 | |||
| 2987 | total_free_markers++; | ||
| 2988 | } | 2999 | } |
| 2989 | 3000 | ||
| 2990 | 3001 | ||
diff --git a/src/emacs.c b/src/emacs.c index 5425d5d64a2..bdca7aa3944 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -127,14 +127,6 @@ Lisp_Object Vkill_emacs_hook; | |||
| 127 | /* An empty lisp string. To avoid having to build any other. */ | 127 | /* An empty lisp string. To avoid having to build any other. */ |
| 128 | Lisp_Object empty_string; | 128 | Lisp_Object empty_string; |
| 129 | 129 | ||
| 130 | #ifdef SIGUSR1 | ||
| 131 | /* Hooks for signal USR1 and USR2 handling. */ | ||
| 132 | Lisp_Object Vsignal_USR1_hook; | ||
| 133 | #ifdef SIGUSR2 | ||
| 134 | Lisp_Object Vsignal_USR2_hook; | ||
| 135 | #endif | ||
| 136 | #endif | ||
| 137 | |||
| 138 | /* Search path separator. */ | 130 | /* Search path separator. */ |
| 139 | Lisp_Object Vpath_separator; | 131 | Lisp_Object Vpath_separator; |
| 140 | 132 | ||
| @@ -2370,18 +2362,6 @@ The hook is not run in batch mode, i.e., if `noninteractive' is non-nil. */); | |||
| 2370 | empty_string = build_string (""); | 2362 | empty_string = build_string (""); |
| 2371 | staticpro (&empty_string); | 2363 | staticpro (&empty_string); |
| 2372 | 2364 | ||
| 2373 | #ifdef SIGUSR1 | ||
| 2374 | DEFVAR_LISP ("signal-USR1-hook", &Vsignal_USR1_hook, | ||
| 2375 | doc: /* Hook to be run whenever emacs receives a USR1 signal. */); | ||
| 2376 | Vsignal_USR1_hook = Qnil; | ||
| 2377 | #ifdef SIGUSR2 | ||
| 2378 | DEFVAR_LISP ("signal-USR2-hook", &Vsignal_USR2_hook, | ||
| 2379 | doc: /* Hook to be run whenever emacs receives a USR2 signal. */); | ||
| 2380 | Vsignal_USR2_hook = Qnil; | ||
| 2381 | #endif | ||
| 2382 | #endif | ||
| 2383 | |||
| 2384 | |||
| 2385 | DEFVAR_INT ("emacs-priority", &emacs_priority, | 2365 | DEFVAR_INT ("emacs-priority", &emacs_priority, |
| 2386 | doc: /* Priority for Emacs to run at. | 2366 | doc: /* Priority for Emacs to run at. |
| 2387 | This value is effective only if set before Emacs is dumped, | 2367 | This value is effective only if set before Emacs is dumped, |
| @@ -3020,11 +3020,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */) | |||
| 3020 | for (i = 1; i < nargs; i += 2) | 3020 | for (i = 1; i < nargs; i += 2) |
| 3021 | args[i] = separator; | 3021 | args[i] = separator; |
| 3022 | 3022 | ||
| 3023 | GCPRO1 (*args); | ||
| 3024 | gcpro1.nvars = nargs; | ||
| 3025 | ret = Fconcat (nargs, args); | 3023 | ret = Fconcat (nargs, args); |
| 3026 | UNGCPRO; | ||
| 3027 | |||
| 3028 | SAFE_FREE_LISP (nargs); | 3024 | SAFE_FREE_LISP (nargs); |
| 3029 | 3025 | ||
| 3030 | return ret; | 3026 | return ret; |
| @@ -3040,7 +3036,6 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */) | |||
| 3040 | register Lisp_Object len; | 3036 | register Lisp_Object len; |
| 3041 | register int leni; | 3037 | register int leni; |
| 3042 | register Lisp_Object *args; | 3038 | register Lisp_Object *args; |
| 3043 | struct gcpro gcpro1; | ||
| 3044 | Lisp_Object ret; | 3039 | Lisp_Object ret; |
| 3045 | USE_SAFE_ALLOCA; | 3040 | USE_SAFE_ALLOCA; |
| 3046 | 3041 | ||
| @@ -3051,11 +3046,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */) | |||
| 3051 | 3046 | ||
| 3052 | mapcar1 (leni, args, function, sequence); | 3047 | mapcar1 (leni, args, function, sequence); |
| 3053 | 3048 | ||
| 3054 | GCPRO1 (*args); | ||
| 3055 | gcpro1.nvars = leni; | ||
| 3056 | ret = Flist (leni, args); | 3049 | ret = Flist (leni, args); |
| 3057 | UNGCPRO; | ||
| 3058 | |||
| 3059 | SAFE_FREE_LISP (leni); | 3050 | SAFE_FREE_LISP (leni); |
| 3060 | 3051 | ||
| 3061 | return ret; | 3052 | return ret; |
diff --git a/src/lisp.h b/src/lisp.h index ba2508e827b..44fe5affa57 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2486,6 +2486,7 @@ extern Lisp_Object make_float P_ ((double)); | |||
| 2486 | extern void display_malloc_warning P_ ((void)); | 2486 | extern void display_malloc_warning P_ ((void)); |
| 2487 | extern int inhibit_garbage_collection P_ ((void)); | 2487 | extern int inhibit_garbage_collection P_ ((void)); |
| 2488 | extern Lisp_Object make_save_value P_ ((void *, int)); | 2488 | extern Lisp_Object make_save_value P_ ((void *, int)); |
| 2489 | extern void free_misc P_ ((Lisp_Object)); | ||
| 2489 | extern void free_marker P_ ((Lisp_Object)); | 2490 | extern void free_marker P_ ((Lisp_Object)); |
| 2490 | extern void free_cons P_ ((struct Lisp_Cons *)); | 2491 | extern void free_cons P_ ((struct Lisp_Cons *)); |
| 2491 | extern void init_alloc_once P_ ((void)); | 2492 | extern void init_alloc_once P_ ((void)); |
diff --git a/src/w32fns.c b/src/w32fns.c index e7ead136ced..b12bd7be28b 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -7686,7 +7686,8 @@ file_dialog_callback (hwnd, msg, wParam, lParam) | |||
| 7686 | { | 7686 | { |
| 7687 | OFNOTIFY * notify = (OFNOTIFY *)lParam; | 7687 | OFNOTIFY * notify = (OFNOTIFY *)lParam; |
| 7688 | /* Detect when the Filter dropdown is changed. */ | 7688 | /* Detect when the Filter dropdown is changed. */ |
| 7689 | if (notify->hdr.code == CDN_TYPECHANGE) | 7689 | if (notify->hdr.code == CDN_TYPECHANGE |
| 7690 | || notify->hdr.code == CDN_INITDONE) | ||
| 7690 | { | 7691 | { |
| 7691 | HWND dialog = GetParent (hwnd); | 7692 | HWND dialog = GetParent (hwnd); |
| 7692 | HWND edit_control = GetDlgItem (dialog, FILE_NAME_TEXT_FIELD); | 7693 | HWND edit_control = GetDlgItem (dialog, FILE_NAME_TEXT_FIELD); |
| @@ -7700,8 +7701,10 @@ file_dialog_callback (hwnd, msg, wParam, lParam) | |||
| 7700 | } | 7701 | } |
| 7701 | else | 7702 | else |
| 7702 | { | 7703 | { |
| 7703 | CommDlg_OpenSave_SetControlText (dialog, FILE_NAME_TEXT_FIELD, | 7704 | /* Don't override default filename on init done. */ |
| 7704 | ""); | 7705 | if (notify->hdr.code == CDN_TYPECHANGE) |
| 7706 | CommDlg_OpenSave_SetControlText (dialog, | ||
| 7707 | FILE_NAME_TEXT_FIELD, ""); | ||
| 7705 | EnableWindow (edit_control, TRUE); | 7708 | EnableWindow (edit_control, TRUE); |
| 7706 | } | 7709 | } |
| 7707 | } | 7710 | } |
| @@ -7723,6 +7726,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) | |||
| 7723 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; | 7726 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
| 7724 | char filename[MAX_PATH + 1]; | 7727 | char filename[MAX_PATH + 1]; |
| 7725 | char init_dir[MAX_PATH + 1]; | 7728 | char init_dir[MAX_PATH + 1]; |
| 7729 | int default_filter_index = 1; /* 1: All Files, 2: Directories only */ | ||
| 7726 | 7730 | ||
| 7727 | GCPRO5 (prompt, dir, default_filename, mustmatch, file); | 7731 | GCPRO5 (prompt, dir, default_filename, mustmatch, file); |
| 7728 | CHECK_STRING (prompt); | 7732 | CHECK_STRING (prompt); |
| @@ -7746,9 +7750,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) | |||
| 7746 | if (!file_name_only) | 7750 | if (!file_name_only) |
| 7747 | file_name_only = full_path_name; | 7751 | file_name_only = full_path_name; |
| 7748 | else | 7752 | else |
| 7749 | { | 7753 | file_name_only++; |
| 7750 | file_name_only++; | ||
| 7751 | } | ||
| 7752 | 7754 | ||
| 7753 | strncpy (filename, file_name_only, MAX_PATH); | 7755 | strncpy (filename, file_name_only, MAX_PATH); |
| 7754 | filename[MAX_PATH] = '\0'; | 7756 | filename[MAX_PATH] = '\0'; |
| @@ -7773,6 +7775,15 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) | |||
| 7773 | file_details.nMaxFile = sizeof (filename); | 7775 | file_details.nMaxFile = sizeof (filename); |
| 7774 | file_details.lpstrInitialDir = init_dir; | 7776 | file_details.lpstrInitialDir = init_dir; |
| 7775 | file_details.lpstrTitle = SDATA (prompt); | 7777 | file_details.lpstrTitle = SDATA (prompt); |
| 7778 | |||
| 7779 | /* If prompt starts with Dired, default to directories only. */ | ||
| 7780 | /* A bit hacky, but there doesn't seem to be a better way to | ||
| 7781 | DTRT for dired. */ | ||
| 7782 | if (strncmp (file_details.lpstrTitle, "Dired", 5) == 0) | ||
| 7783 | default_filter_index = 2; | ||
| 7784 | |||
| 7785 | file_details.nFilterIndex = default_filter_index; | ||
| 7786 | |||
| 7776 | file_details.Flags = (OFN_HIDEREADONLY | OFN_NOCHANGEDIR | 7787 | file_details.Flags = (OFN_HIDEREADONLY | OFN_NOCHANGEDIR |
| 7777 | | OFN_EXPLORER | OFN_ENABLEHOOK); | 7788 | | OFN_EXPLORER | OFN_ENABLEHOOK); |
| 7778 | if (!NILP (mustmatch)) | 7789 | if (!NILP (mustmatch)) |
| @@ -7785,7 +7796,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) | |||
| 7785 | dostounix_filename (filename); | 7796 | dostounix_filename (filename); |
| 7786 | if (file_details.nFilterIndex == 2) | 7797 | if (file_details.nFilterIndex == 2) |
| 7787 | { | 7798 | { |
| 7788 | /* "Folder Only" selected - strip dummy file name. */ | 7799 | /* "Directories" selected - strip dummy file name. */ |
| 7789 | char * last = strrchr (filename, '/'); | 7800 | char * last = strrchr (filename, '/'); |
| 7790 | *last = '\0'; | 7801 | *last = '\0'; |
| 7791 | } | 7802 | } |