diff options
| author | Miles Bader | 2007-03-21 13:33:07 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-03-21 13:33:07 +0000 |
| commit | d85d38392e338f66053a6a6f1017720660239338 (patch) | |
| tree | e21e084051805db8c4035bc3a01ab7a41e09595f /src | |
| parent | 48ff183eab79714fb08df0961484a27052253585 (diff) | |
| parent | 815b81c8f205562b9d920fc95448924d130e2ab4 (diff) | |
| download | emacs-d85d38392e338f66053a6a6f1017720660239338.tar.gz emacs-d85d38392e338f66053a6a6f1017720660239338.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 670-674)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 209-210)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-185
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 97 | ||||
| -rw-r--r-- | src/ChangeLog.3 | 2 | ||||
| -rw-r--r-- | src/Makefile.in | 40 | ||||
| -rw-r--r-- | src/buffer.c | 4 | ||||
| -rw-r--r-- | src/dired.c | 11 | ||||
| -rw-r--r-- | src/dispnew.c | 9 | ||||
| -rw-r--r-- | src/editfns.c | 4 | ||||
| -rw-r--r-- | src/fileio.c | 8 | ||||
| -rw-r--r-- | src/image.c | 8 | ||||
| -rw-r--r-- | src/keyboard.c | 12 | ||||
| -rw-r--r-- | src/lisp.h | 1 | ||||
| -rw-r--r-- | src/lread.c | 37 | ||||
| -rw-r--r-- | src/macmenu.c | 15 | ||||
| -rw-r--r-- | src/macterm.c | 27 | ||||
| -rw-r--r-- | src/print.c | 7 | ||||
| -rw-r--r-- | src/process.c | 53 | ||||
| -rw-r--r-- | src/term.c | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 6 |
18 files changed, 267 insertions, 79 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2c241cd2a51..9cc5e085001 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,96 @@ | |||
| 1 | 2007-03-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * Makefile.in (alloca.o, gtkutil.o): Depend on systime.h. | ||
| 4 | (dired.o, editfns.o, fileio.o, msdos.o): Depend on atimer.h. | ||
| 5 | (dosfns.o, window.o, fns.o, macselect.o): Depend on atimer.h and | ||
| 6 | systime.h. | ||
| 7 | (term.o, print.o, lread.o): Depend on blockinput.h, atimer.h, and | ||
| 8 | systime.h. | ||
| 9 | (macfns.o): Remove duplicate dependency on systime.h. | ||
| 10 | |||
| 11 | * dispnew.c (Fopen_termscript): Add BLOCK_INPUT around fclose. | ||
| 12 | (Fsend_string_to_terminal): Add BLOCK_INPUT around fwrite. | ||
| 13 | |||
| 14 | * fileio.c (do_auto_save_unwind): Add BLOCK_INPUT around fclose. | ||
| 15 | (Fdo_auto_save): Add BLOCK_INPUT around fwrite. | ||
| 16 | |||
| 17 | * keyboard.c (record_char): Add BLOCK_INPUT around fwrite. | ||
| 18 | (Fopen_dribble_file): Add BLOCK_INPUT around fclose. | ||
| 19 | |||
| 20 | * lread.c: Include blockinput.h. | ||
| 21 | (readchar, Fget_file_char): Add BLOCK_INPUT around getc. | ||
| 22 | (unreadchar): Add BLOCK_INPUT around ungetc. | ||
| 23 | (load_unwind): Add BLOCK_INPUT around fclose. | ||
| 24 | |||
| 25 | * print.c: Include blockinput.h. | ||
| 26 | (Fredirect_debugging_output): Add BLOCK_INPUT around fclose. | ||
| 27 | |||
| 28 | * process.c (Fmake_network_process) [HAVE_GETADDRINFO]: Clear | ||
| 29 | immediate_quit before calling freeaddrinfo. Add BLOCK_INPUT | ||
| 30 | around freeaddrinfo. | ||
| 31 | |||
| 32 | * term.c: Include blockinput.h. | ||
| 33 | (write_glyphs, insert_glyphs): Add BLOCK_INPUT around fwrite. | ||
| 34 | |||
| 35 | 2007-03-19 Richard Stallman <rms@gnu.org> | ||
| 36 | |||
| 37 | * keyboard.c (NUM_RECENT_KEYS): Bump up to 300. | ||
| 38 | |||
| 39 | * buffer.c (syms_of_buffer): Doc fix. | ||
| 40 | |||
| 41 | 2007-03-18 Chong Yidong <cyd@stupidchicken.com> | ||
| 42 | |||
| 43 | * image.c (pbm_load): Signal error for invalid image size. | ||
| 44 | |||
| 45 | 2007-03-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 46 | |||
| 47 | * macterm.c (note_mouse_movement): Don't return immediately for | ||
| 48 | LeaveNotify case. | ||
| 49 | |||
| 50 | * macmenu.c (popup_activated_flag): New variable. | ||
| 51 | (x_activate_menubar, mac_menu_show): Set it during menu tracking. | ||
| 52 | (popup_activated): New function. | ||
| 53 | |||
| 54 | * xdisp.c (redisplay_internal, note_mouse_highlight): Check | ||
| 55 | popup_activated for MAC_OS. | ||
| 56 | |||
| 57 | 2007-03-17 Juanma Barranquero <lekktu@gmail.com> | ||
| 58 | |||
| 59 | * buffer.c (syms_of_buffer) <buffer-display-table>: Doc fix. | ||
| 60 | Reported by Nikolaj Schumacher <n_schumacher@web.de>. | ||
| 61 | |||
| 62 | 2007-03-17 Richard Stallman <rms@gnu.org> | ||
| 63 | |||
| 64 | * dired.c (file_name_completion): gcpro NAME. | ||
| 65 | |||
| 66 | 2007-03-17 Chong Yidong <cyd@stupidchicken.com> | ||
| 67 | |||
| 68 | * xdisp.c (try_window_id): Increment matrix positions if the | ||
| 69 | buffer's byte count has increased, but not the character count. | ||
| 70 | |||
| 71 | 2007-03-12 Andreas Schwab <schwab@suse.de> | ||
| 72 | |||
| 73 | * lisp.h: Declare check_obarray. | ||
| 74 | |||
| 75 | * process.c (Fdelete_process): Properly handle deletion of first | ||
| 76 | element of deleted_pid_list. | ||
| 77 | (create_process): Declare pid as pid_t. | ||
| 78 | |||
| 79 | 2007-03-12 Kim F. Storm <storm@cua.dk> | ||
| 80 | |||
| 81 | * process.c (sigchld_handler): Change type of pid to pid_t. | ||
| 82 | Scan deleted_pid_list explicitly to avoid using Fmember which don't | ||
| 83 | know about mark bits and make_fixnum_or_float which may malloc. | ||
| 84 | Reported by Andreas Schwab. | ||
| 85 | |||
| 86 | * keyboard.c (read_key_sequence): Store original event into keybuf | ||
| 87 | when replaying sequence with local keymap(s) from string. | ||
| 88 | |||
| 89 | 2007-03-12 Glenn Morris <rgm@gnu.org> | ||
| 90 | |||
| 91 | * editfns.c (Fdecode_time, Fencode_time): Doc fix ("daylight | ||
| 92 | savings" to "daylight saving"). | ||
| 93 | |||
| 1 | 2007-03-11 Sam Steingold <sds@gnu.org> | 94 | 2007-03-11 Sam Steingold <sds@gnu.org> |
| 2 | 95 | ||
| 3 | * process.c (sigchld_handler): Sleep before wait3 to avoid a busyloop. | 96 | * process.c (sigchld_handler): Sleep before wait3 to avoid a busyloop. |
| @@ -8,8 +101,8 @@ | |||
| 8 | 101 | ||
| 9 | 2007-03-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 102 | 2007-03-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 10 | 103 | ||
| 11 | * macterm.c [USE_CARBON_EVENTS] (mac_handle_mouse_event): Ignore | 104 | * macterm.c [USE_CARBON_EVENTS] (mac_handle_mouse_event): |
| 12 | mouse wheel movement on title bar or tool bar. | 105 | Ignore mouse wheel movement on title bar or tool bar. |
| 13 | 106 | ||
| 14 | 2007-03-10 Chong Yidong <cyd@stupidchicken.com> | 107 | 2007-03-10 Chong Yidong <cyd@stupidchicken.com> |
| 15 | 108 | ||
diff --git a/src/ChangeLog.3 b/src/ChangeLog.3 index 343eec689a2..d6e1dff4e32 100644 --- a/src/ChangeLog.3 +++ b/src/ChangeLog.3 | |||
| @@ -5706,7 +5706,7 @@ | |||
| 5706 | HAVE_TIMEVAL is defined and NEED_TIME_H isn't. | 5706 | HAVE_TIMEVAL is defined and NEED_TIME_H isn't. |
| 5707 | 5707 | ||
| 5708 | * systime.h: Note that the tz_dsttime field of the struct timezone | 5708 | * systime.h: Note that the tz_dsttime field of the struct timezone |
| 5709 | returned by gettimeofday doesn't say whether daylight savings is | 5709 | returned by gettimeofday doesn't say whether daylight saving is |
| 5710 | _currently- active; rather it specifies whether it is *ever* | 5710 | _currently- active; rather it specifies whether it is *ever* |
| 5711 | active. | 5711 | active. |
| 5712 | (EMACS_GET_TZ_OFFSET_AND_SAVINGS): Removed `savings_flag' | 5712 | (EMACS_GET_TZ_OFFSET_AND_SAVINGS): Removed `savings_flag' |
diff --git a/src/Makefile.in b/src/Makefile.in index ada18576e3d..f62bb8c2b26 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -1092,7 +1092,7 @@ stamp-oldxmenu: | |||
| 1092 | They should define HAVE_ALLOCA. | 1092 | They should define HAVE_ALLOCA. |
| 1093 | Some use the C version in alloca.c (these define C_ALLOCA in config.h). | 1093 | Some use the C version in alloca.c (these define C_ALLOCA in config.h). |
| 1094 | */ | 1094 | */ |
| 1095 | alloca.o: alloca.c blockinput.h atimer.h | 1095 | alloca.o: alloca.c blockinput.h atimer.h systime.h |
| 1096 | 1096 | ||
| 1097 | /* Nearly all the following files depend on lisp.h, | 1097 | /* Nearly all the following files depend on lisp.h, |
| 1098 | but it is not included as a dependency because | 1098 | but it is not included as a dependency because |
| @@ -1130,7 +1130,7 @@ pre-crt0.o: pre-crt0.c | |||
| 1130 | ecrt0.o: ecrt0.c $(config_h) | 1130 | ecrt0.o: ecrt0.c $(config_h) |
| 1131 | CRT0_COMPILE ${srcdir}/ecrt0.c | 1131 | CRT0_COMPILE ${srcdir}/ecrt0.c |
| 1132 | dired.o: dired.c commands.h buffer.h $(config_h) character.h charset.h \ | 1132 | dired.o: dired.c commands.h buffer.h $(config_h) character.h charset.h \ |
| 1133 | coding.h regex.h systime.h blockinput.h | 1133 | coding.h regex.h systime.h blockinput.h atimer.h |
| 1134 | dispnew.o: dispnew.c systty.h systime.h commands.h process.h frame.h \ | 1134 | dispnew.o: dispnew.c systty.h systime.h commands.h process.h frame.h \ |
| 1135 | window.h buffer.h dispextern.h termchar.h termopts.h termhooks.h cm.h \ | 1135 | window.h buffer.h dispextern.h termchar.h termopts.h termhooks.h cm.h \ |
| 1136 | disptab.h indent.h intervals.h \ | 1136 | disptab.h indent.h intervals.h \ |
| @@ -1139,14 +1139,15 @@ dispnew.o: dispnew.c systty.h systime.h commands.h process.h frame.h \ | |||
| 1139 | doc.o: doc.c $(config_h) epaths.h buffer.h keyboard.h keymap.h character.h | 1139 | doc.o: doc.c $(config_h) epaths.h buffer.h keyboard.h keymap.h character.h |
| 1140 | doprnt.o: doprnt.c character.h $(config_h) | 1140 | doprnt.o: doprnt.c character.h $(config_h) |
| 1141 | dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \ | 1141 | dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \ |
| 1142 | msdos.h dosfns.h dispextern.h charset.h coding.h $(config_h) | 1142 | msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \ |
| 1143 | $(config_h) | ||
| 1143 | editfns.o: editfns.c window.h buffer.h systime.h $(INTERVAL_SRC) character.h \ | 1144 | editfns.o: editfns.c window.h buffer.h systime.h $(INTERVAL_SRC) character.h \ |
| 1144 | coding.h dispextern.h frame.h blockinput.h $(config_h) | 1145 | coding.h dispextern.h frame.h blockinput.h atimer.h $(config_h) |
| 1145 | emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \ | 1146 | emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \ |
| 1146 | termhooks.h buffer.h atimer.h systime.h $(INTERVAL_SRC) $(config_h) \ | 1147 | termhooks.h buffer.h atimer.h systime.h $(INTERVAL_SRC) $(config_h) \ |
| 1147 | window.h dispextern.h keyboard.h keymap.h | 1148 | window.h dispextern.h keyboard.h keymap.h |
| 1148 | fileio.o: fileio.c window.h buffer.h systime.h $(INTERVAL_SRC) character.h \ | 1149 | fileio.o: fileio.c window.h buffer.h systime.h $(INTERVAL_SRC) character.h \ |
| 1149 | coding.h msdos.h dispextern.h blockinput.h $(config_h) | 1150 | coding.h msdos.h dispextern.h blockinput.h atimer.h $(config_h) |
| 1150 | filelock.o: filelock.c buffer.h character.h charset.h coding.h systime.h \ | 1151 | filelock.o: filelock.c buffer.h character.h charset.h coding.h systime.h \ |
| 1151 | epaths.h $(config_h) | 1152 | epaths.h $(config_h) |
| 1152 | filemode.o: filemode.c $(config_h) | 1153 | filemode.o: filemode.c $(config_h) |
| @@ -1188,7 +1189,7 @@ minibuf.o: minibuf.c syntax.h dispextern.h frame.h window.h keyboard.h \ | |||
| 1188 | mktime.o: mktime.c $(config_h) | 1189 | mktime.o: mktime.c $(config_h) |
| 1189 | msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \ | 1190 | msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \ |
| 1190 | termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \ | 1191 | termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \ |
| 1191 | keyboard.h intervals.h buffer.h commands.h blockinput.h $(config_h) | 1192 | keyboard.h intervals.h buffer.h commands.h blockinput.h atimer.h $(config_h) |
| 1192 | process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \ | 1193 | process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \ |
| 1193 | commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \ | 1194 | commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \ |
| 1194 | blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \ | 1195 | blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \ |
| @@ -1210,7 +1211,7 @@ sysdep.o: sysdep.c syssignal.h systty.h systime.h syswait.h blockinput.h \ | |||
| 1210 | frame.h atimer.h window.h msdos.h dosfns.h keyboard.h $(config_h) | 1211 | frame.h atimer.h window.h msdos.h dosfns.h keyboard.h $(config_h) |
| 1211 | term.o: term.c termchar.h termhooks.h termopts.h $(config_h) cm.h frame.h \ | 1212 | term.o: term.c termchar.h termhooks.h termopts.h $(config_h) cm.h frame.h \ |
| 1212 | disptab.h dispextern.h keyboard.h character.h charset.h coding.h ccl.h \ | 1213 | disptab.h dispextern.h keyboard.h character.h charset.h coding.h ccl.h \ |
| 1213 | msdos.h window.h keymap.h | 1214 | msdos.h window.h keymap.h blockinput.h atimer.h systime.h |
| 1214 | termcap.o: termcap.c $(config_h) | 1215 | termcap.o: termcap.c $(config_h) |
| 1215 | terminfo.o: terminfo.c $(config_h) | 1216 | terminfo.o: terminfo.c $(config_h) |
| 1216 | tparam.o: tparam.c $(config_h) | 1217 | tparam.o: tparam.c $(config_h) |
| @@ -1225,15 +1226,16 @@ widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \ | |||
| 1225 | $(srcdir)/../lwlib/lwlib.h $(config_h) | 1226 | $(srcdir)/../lwlib/lwlib.h $(config_h) |
| 1226 | window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \ | 1227 | window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \ |
| 1227 | termhooks.h disptab.h keyboard.h dispextern.h msdos.h composite.h \ | 1228 | termhooks.h disptab.h keyboard.h dispextern.h msdos.h composite.h \ |
| 1228 | keymap.h blockinput.h $(INTERVAL_SRC) xterm.h w32term.h macterm.h $(config_h) | 1229 | keymap.h blockinput.h atimer.h systime.h $(INTERVAL_SRC) \ |
| 1230 | xterm.h w32term.h macterm.h $(config_h) | ||
| 1229 | xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h \ | 1231 | xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h \ |
| 1230 | coding.h termchar.h frame.h window.h disptab.h termhooks.h character.h \ | 1232 | coding.h termchar.h frame.h window.h disptab.h termhooks.h character.h \ |
| 1231 | charset.h keyboard.h $(INTERVAL_SRC) region-cache.h xterm.h w32term.h \ | 1233 | charset.h $(config_h) keyboard.h $(INTERVAL_SRC) region-cache.h xterm.h \ |
| 1232 | macterm.h $(config_h) msdos.h composite.h fontset.h blockinput.h atimer.h \ | 1234 | w32term.h macterm.h msdos.h composite.h fontset.h blockinput.h atimer.h \ |
| 1233 | systime.h keymap.h $(FONTSRC) | 1235 | systime.h keymap.h $(FONTSRC) |
| 1234 | xfaces.o: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \ | 1236 | xfaces.o: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \ |
| 1235 | window.h character.h charset.h msdos.h dosfns.h composite.h atimer.h \ | 1237 | window.h character.h charset.h msdos.h dosfns.h composite.h atimer.h \ |
| 1236 | systime.h keyboard.h fontset.h w32term.h macterm.h $(INTERVAL_SRC) \ | 1238 | systime.h keyboard.h fontset.h w32term.h macterm.h $(INTERVAL_SRC) \ |
| 1237 | $(FONTSRC) $(config_h) | 1239 | $(FONTSRC) $(config_h) |
| 1238 | xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h dispextern.h \ | 1240 | xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h dispextern.h \ |
| 1239 | $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h systime.h epaths.h \ | 1241 | $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h systime.h epaths.h \ |
| @@ -1258,7 +1260,8 @@ xrdb.o: xrdb.c $(config_h) epaths.h | |||
| 1258 | xsmfns.o: xsmfns.c $(config_h) systime.h sysselect.h termhooks.h xterm.h \ | 1260 | xsmfns.o: xsmfns.c $(config_h) systime.h sysselect.h termhooks.h xterm.h \ |
| 1259 | lisp.h termopts.h | 1261 | lisp.h termopts.h |
| 1260 | gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h $(config_h) \ | 1262 | gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h $(config_h) \ |
| 1261 | blockinput.h window.h atimer.h termhooks.h keyboard.h charset.h coding.h | 1263 | blockinput.h window.h atimer.h systime.h termhooks.h keyboard.h \ |
| 1264 | charset.h coding.h | ||
| 1262 | 1265 | ||
| 1263 | hftctl.o: hftctl.c $(config_h) | 1266 | hftctl.o: hftctl.c $(config_h) |
| 1264 | sound.o: sound.c dispextern.h $(config_h) | 1267 | sound.o: sound.c dispextern.h $(config_h) |
| @@ -1278,11 +1281,13 @@ eval.o: eval.c commands.h keyboard.h blockinput.h atimer.h systime.h \ | |||
| 1278 | floatfns.o: floatfns.c $(config_h) | 1281 | floatfns.o: floatfns.c $(config_h) |
| 1279 | fns.o: fns.c commands.h $(config_h) frame.h buffer.h character.h keyboard.h \ | 1282 | fns.o: fns.c commands.h $(config_h) frame.h buffer.h character.h keyboard.h \ |
| 1280 | keymap.h frame.h window.h dispextern.h $(INTERVAL_SRC) coding.h md5.h \ | 1283 | keymap.h frame.h window.h dispextern.h $(INTERVAL_SRC) coding.h md5.h \ |
| 1281 | blockinput.h xterm.h | 1284 | blockinput.h atimer.h systime.h xterm.h |
| 1282 | print.o: print.c process.h frame.h window.h buffer.h keyboard.h character.h \ | 1285 | print.o: print.c process.h frame.h window.h buffer.h keyboard.h character.h \ |
| 1283 | $(config_h) dispextern.h termchar.h $(INTERVAL_SRC) msdos.h composite.h | 1286 | $(config_h) dispextern.h termchar.h $(INTERVAL_SRC) msdos.h composite.h \ |
| 1287 | blockinput.h atimer.h systime.h | ||
| 1284 | lread.o: lread.c commands.h keyboard.h buffer.h epaths.h character.h \ | 1288 | lread.o: lread.c commands.h keyboard.h buffer.h epaths.h character.h \ |
| 1285 | charset.h $(config_h) $(INTERVAL_SRC) termhooks.h coding.h msdos.h | 1289 | charset.h $(config_h) $(INTERVAL_SRC) termhooks.h coding.h msdos.h \ |
| 1290 | blockinput.h atimer.h systime.h | ||
| 1286 | 1291 | ||
| 1287 | /* Text properties support */ | 1292 | /* Text properties support */ |
| 1288 | textprop.o: textprop.c buffer.h window.h dispextern.h $(INTERVAL_SRC) \ | 1293 | textprop.o: textprop.c buffer.h window.h dispextern.h $(INTERVAL_SRC) \ |
| @@ -1306,14 +1311,15 @@ mac.o: mac.c process.h sysselect.h blockinput.h atimer.h systime.h charset.h \ | |||
| 1306 | coding.h ccl.h $(config_h) | 1311 | coding.h ccl.h $(config_h) |
| 1307 | macfns.o: macfns.c charset.h macterm.h macgui.h frame.h window.h buffer.h \ | 1312 | macfns.o: macfns.c charset.h macterm.h macgui.h frame.h window.h buffer.h \ |
| 1308 | dispextern.h macgui.h fontset.h $(INTERVAL_SRC) keyboard.h blockinput.h \ | 1313 | dispextern.h macgui.h fontset.h $(INTERVAL_SRC) keyboard.h blockinput.h \ |
| 1309 | atimer.h systime.h epaths.h termhooks.h coding.h systime.h $(config_h) | 1314 | atimer.h systime.h epaths.h termhooks.h coding.h $(config_h) |
| 1310 | macmenu.o: macmenu.c termhooks.h frame.h window.h dispextern.h macgui.h \ | 1315 | macmenu.o: macmenu.c termhooks.h frame.h window.h dispextern.h macgui.h \ |
| 1311 | keyboard.h blockinput.h atimer.h systime.h buffer.h macterm.h $(config_h) | 1316 | keyboard.h blockinput.h atimer.h systime.h buffer.h macterm.h $(config_h) |
| 1312 | macterm.o: blockinput.h atimer.h systime.h syssignal.h macterm.h macgui.h \ | 1317 | macterm.o: blockinput.h atimer.h systime.h syssignal.h macterm.h macgui.h \ |
| 1313 | frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h termopts.h \ | 1318 | frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h termopts.h \ |
| 1314 | termchar.h gnu.h disptab.h buffer.h window.h keyboard.h $(INTERVAL_SRC) \ | 1319 | termchar.h gnu.h disptab.h buffer.h window.h keyboard.h $(INTERVAL_SRC) \ |
| 1315 | process.h coding.h $(config_h) | 1320 | process.h coding.h $(config_h) |
| 1316 | macselect.o: blockinput.h macterm.h macgui.h frame.h keymap.h $(config_h) | 1321 | macselect.o: blockinput.h atimer.h systime.h macterm.h macgui.h frame.h \ |
| 1322 | keymap.h $(config_h) | ||
| 1317 | 1323 | ||
| 1318 | ${emacsapp}Contents/Resources/English.lproj: | 1324 | ${emacsapp}Contents/Resources/English.lproj: |
| 1319 | mkdir -p $@ | 1325 | mkdir -p $@ |
diff --git a/src/buffer.c b/src/buffer.c index a86edc4f430..f8d5bdc76fe 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5698,8 +5698,8 @@ characters or nil. The value nil means display the character in the | |||
| 5698 | default fashion; otherwise, the characters from the vector are delivered | 5698 | default fashion; otherwise, the characters from the vector are delivered |
| 5699 | to the screen instead of the original character. | 5699 | to the screen instead of the original character. |
| 5700 | 5700 | ||
| 5701 | For example, (aset buffer-display-table ?X ?Y) will cause Emacs to display | 5701 | For example, (aset buffer-display-table ?X [?Y]) tells Emacs |
| 5702 | a capital Y instead of each X character. | 5702 | to display a capital Y instead of each X character. |
| 5703 | 5703 | ||
| 5704 | In addition, a char-table has six extra slots to control the display of: | 5704 | In addition, a char-table has six extra slots to control the display of: |
| 5705 | 5705 | ||
diff --git a/src/dired.c b/src/dired.c index 27f9f953eb6..a576c9d4c17 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -671,8 +671,15 @@ file_name_completion (file, dirname, all_flag, ver_flag, predicate) | |||
| 671 | if (!NILP (predicate)) | 671 | if (!NILP (predicate)) |
| 672 | { | 672 | { |
| 673 | Lisp_Object decoded; | 673 | Lisp_Object decoded; |
| 674 | Lisp_Object val; | ||
| 675 | struct gcpro gcpro1; | ||
| 676 | |||
| 677 | GCPRO1 (name); | ||
| 674 | decoded = Fexpand_file_name (DECODE_FILE (name), dirname); | 678 | decoded = Fexpand_file_name (DECODE_FILE (name), dirname); |
| 675 | if (NILP (call1 (predicate, decoded))) | 679 | val = call1 (predicate, decoded); |
| 680 | UNGCPRO; | ||
| 681 | |||
| 682 | if (NILP (val)) | ||
| 676 | continue; | 683 | continue; |
| 677 | } | 684 | } |
| 678 | 685 | ||
| @@ -695,7 +702,7 @@ file_name_completion (file, dirname, all_flag, ver_flag, predicate) | |||
| 695 | compare = min (bestmatchsize, len); | 702 | compare = min (bestmatchsize, len); |
| 696 | p1 = SDATA (bestmatch); | 703 | p1 = SDATA (bestmatch); |
| 697 | p2 = (unsigned char *) dp->d_name; | 704 | p2 = (unsigned char *) dp->d_name; |
| 698 | matchsize = scmp(p1, p2, compare); | 705 | matchsize = scmp (p1, p2, compare); |
| 699 | if (matchsize < 0) | 706 | if (matchsize < 0) |
| 700 | matchsize = compare; | 707 | matchsize = compare; |
| 701 | if (completion_ignore_case) | 708 | if (completion_ignore_case) |
diff --git a/src/dispnew.c b/src/dispnew.c index 97cd210396c..313221f43f5 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -6360,7 +6360,12 @@ FILE = nil means just close any termscript file currently open. */) | |||
| 6360 | (file) | 6360 | (file) |
| 6361 | Lisp_Object file; | 6361 | Lisp_Object file; |
| 6362 | { | 6362 | { |
| 6363 | if (termscript != 0) fclose (termscript); | 6363 | if (termscript != 0) |
| 6364 | { | ||
| 6365 | BLOCK_INPUT; | ||
| 6366 | fclose (termscript); | ||
| 6367 | UNBLOCK_INPUT; | ||
| 6368 | } | ||
| 6364 | termscript = 0; | 6369 | termscript = 0; |
| 6365 | 6370 | ||
| 6366 | if (! NILP (file)) | 6371 | if (! NILP (file)) |
| @@ -6383,6 +6388,7 @@ Control characters in STRING will have terminal-dependent effects. */) | |||
| 6383 | { | 6388 | { |
| 6384 | /* ??? Perhaps we should do something special for multibyte strings here. */ | 6389 | /* ??? Perhaps we should do something special for multibyte strings here. */ |
| 6385 | CHECK_STRING (string); | 6390 | CHECK_STRING (string); |
| 6391 | BLOCK_INPUT; | ||
| 6386 | fwrite (SDATA (string), 1, SBYTES (string), stdout); | 6392 | fwrite (SDATA (string), 1, SBYTES (string), stdout); |
| 6387 | fflush (stdout); | 6393 | fflush (stdout); |
| 6388 | if (termscript) | 6394 | if (termscript) |
| @@ -6391,6 +6397,7 @@ Control characters in STRING will have terminal-dependent effects. */) | |||
| 6391 | termscript); | 6397 | termscript); |
| 6392 | fflush (termscript); | 6398 | fflush (termscript); |
| 6393 | } | 6399 | } |
| 6400 | UNBLOCK_INPUT; | ||
| 6394 | return Qnil; | 6401 | return Qnil; |
| 6395 | } | 6402 | } |
| 6396 | 6403 | ||
diff --git a/src/editfns.c b/src/editfns.c index 70cfac36fb1..d2cd31044ce 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -1727,7 +1727,7 @@ support. MINUTE is an integer between 0 and 59. HOUR is an integer | |||
| 1727 | between 0 and 23. DAY is an integer between 1 and 31. MONTH is an | 1727 | between 0 and 23. DAY is an integer between 1 and 31. MONTH is an |
| 1728 | integer between 1 and 12. YEAR is an integer indicating the | 1728 | integer between 1 and 12. YEAR is an integer indicating the |
| 1729 | four-digit year. DOW is the day of week, an integer between 0 and 6, | 1729 | four-digit year. DOW is the day of week, an integer between 0 and 6, |
| 1730 | where 0 is Sunday. DST is t if daylight savings time is effect, | 1730 | where 0 is Sunday. DST is t if daylight saving time is in effect, |
| 1731 | otherwise nil. ZONE is an integer indicating the number of seconds | 1731 | otherwise nil. ZONE is an integer indicating the number of seconds |
| 1732 | east of Greenwich. (Note that Common Lisp has different meanings for | 1732 | east of Greenwich. (Note that Common Lisp has different meanings for |
| 1733 | DOW and ZONE.) */) | 1733 | DOW and ZONE.) */) |
| @@ -1776,7 +1776,7 @@ This is the reverse operation of `decode-time', which see. | |||
| 1776 | ZONE defaults to the current time zone rule. This can | 1776 | ZONE defaults to the current time zone rule. This can |
| 1777 | be a string or t (as from `set-time-zone-rule'), or it can be a list | 1777 | be a string or t (as from `set-time-zone-rule'), or it can be a list |
| 1778 | \(as from `current-time-zone') or an integer (as from `decode-time') | 1778 | \(as from `current-time-zone') or an integer (as from `decode-time') |
| 1779 | applied without consideration for daylight savings time. | 1779 | applied without consideration for daylight saving time. |
| 1780 | 1780 | ||
| 1781 | You can pass more than 7 arguments; then the first six arguments | 1781 | You can pass more than 7 arguments; then the first six arguments |
| 1782 | are used as SECOND through YEAR, and the *last* argument is used as ZONE. | 1782 | are used as SECOND through YEAR, and the *last* argument is used as ZONE. |
diff --git a/src/fileio.c b/src/fileio.c index c6589e989ec..892457603aa 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -5720,7 +5720,11 @@ do_auto_save_unwind (arg) /* used as unwind-protect function */ | |||
| 5720 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; | 5720 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; |
| 5721 | auto_saving = 0; | 5721 | auto_saving = 0; |
| 5722 | if (stream != NULL) | 5722 | if (stream != NULL) |
| 5723 | fclose (stream); | 5723 | { |
| 5724 | BLOCK_INPUT; | ||
| 5725 | fclose (stream); | ||
| 5726 | UNBLOCK_INPUT; | ||
| 5727 | } | ||
| 5724 | return Qnil; | 5728 | return Qnil; |
| 5725 | } | 5729 | } |
| 5726 | 5730 | ||
| @@ -5850,6 +5854,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) | |||
| 5850 | if (STRINGP (b->auto_save_file_name) | 5854 | if (STRINGP (b->auto_save_file_name) |
| 5851 | && stream != NULL && do_handled_files == 0) | 5855 | && stream != NULL && do_handled_files == 0) |
| 5852 | { | 5856 | { |
| 5857 | BLOCK_INPUT; | ||
| 5853 | if (!NILP (b->filename)) | 5858 | if (!NILP (b->filename)) |
| 5854 | { | 5859 | { |
| 5855 | fwrite (SDATA (b->filename), 1, | 5860 | fwrite (SDATA (b->filename), 1, |
| @@ -5859,6 +5864,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) | |||
| 5859 | fwrite (SDATA (b->auto_save_file_name), 1, | 5864 | fwrite (SDATA (b->auto_save_file_name), 1, |
| 5860 | SBYTES (b->auto_save_file_name), stream); | 5865 | SBYTES (b->auto_save_file_name), stream); |
| 5861 | putc ('\n', stream); | 5866 | putc ('\n', stream); |
| 5867 | UNBLOCK_INPUT; | ||
| 5862 | } | 5868 | } |
| 5863 | 5869 | ||
| 5864 | if (!NILP (current_only) | 5870 | if (!NILP (current_only) |
diff --git a/src/image.c b/src/image.c index c58e0d4695e..b8317b1e982 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -5742,6 +5742,14 @@ pbm_load (f, img) | |||
| 5742 | } | 5742 | } |
| 5743 | else | 5743 | else |
| 5744 | { | 5744 | { |
| 5745 | if (raw_p && (p + 3 * height * width > end)) | ||
| 5746 | { | ||
| 5747 | x_destroy_x_image (ximg); | ||
| 5748 | image_error ("Invalid image size in image `%s'", | ||
| 5749 | img->spec, Qnil); | ||
| 5750 | goto error; | ||
| 5751 | } | ||
| 5752 | |||
| 5745 | for (y = 0; y < height; ++y) | 5753 | for (y = 0; y < height; ++y) |
| 5746 | for (x = 0; x < width; ++x) | 5754 | for (x = 0; x < width; ++x) |
| 5747 | { | 5755 | { |
diff --git a/src/keyboard.c b/src/keyboard.c index e1e53010931..69199dd436c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -142,10 +142,10 @@ KBOARD the_only_kboard; | |||
| 142 | do not execute it; call disabled-command-function's value instead. */ | 142 | do not execute it; call disabled-command-function's value instead. */ |
| 143 | Lisp_Object Qdisabled, Qdisabled_command_function; | 143 | Lisp_Object Qdisabled, Qdisabled_command_function; |
| 144 | 144 | ||
| 145 | #define NUM_RECENT_KEYS (100) | 145 | #define NUM_RECENT_KEYS (300) |
| 146 | int recent_keys_index; /* Index for storing next element into recent_keys */ | 146 | int recent_keys_index; /* Index for storing next element into recent_keys */ |
| 147 | int total_keys; /* Total number of elements stored into recent_keys */ | 147 | int total_keys; /* Total number of elements stored into recent_keys */ |
| 148 | Lisp_Object recent_keys; /* A vector, holding the last 100 keystrokes */ | 148 | Lisp_Object recent_keys; /* Vector holds the last NUM_RECENT_KEYS keystrokes */ |
| 149 | 149 | ||
| 150 | /* Vector holding the key sequence that invoked the current command. | 150 | /* Vector holding the key sequence that invoked the current command. |
| 151 | It is reused for each command, and it may be longer than the current | 151 | It is reused for each command, and it may be longer than the current |
| @@ -3525,6 +3525,7 @@ record_char (c) | |||
| 3525 | If you, dear reader, have a better idea, you've got the source. :-) */ | 3525 | If you, dear reader, have a better idea, you've got the source. :-) */ |
| 3526 | if (dribble) | 3526 | if (dribble) |
| 3527 | { | 3527 | { |
| 3528 | BLOCK_INPUT; | ||
| 3528 | if (INTEGERP (c)) | 3529 | if (INTEGERP (c)) |
| 3529 | { | 3530 | { |
| 3530 | if (XUINT (c) < 0x100) | 3531 | if (XUINT (c) < 0x100) |
| @@ -3550,6 +3551,7 @@ record_char (c) | |||
| 3550 | } | 3551 | } |
| 3551 | 3552 | ||
| 3552 | fflush (dribble); | 3553 | fflush (dribble); |
| 3554 | UNBLOCK_INPUT; | ||
| 3553 | } | 3555 | } |
| 3554 | } | 3556 | } |
| 3555 | 3557 | ||
| @@ -9403,6 +9405,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 9403 | if (!NILP (map) || !NILP (map2)) | 9405 | if (!NILP (map) || !NILP (map2)) |
| 9404 | { | 9406 | { |
| 9405 | from_string = string; | 9407 | from_string = string; |
| 9408 | keybuf[t++] = key; | ||
| 9409 | mock_input = t; | ||
| 9406 | goto replay_sequence; | 9410 | goto replay_sequence; |
| 9407 | } | 9411 | } |
| 9408 | } | 9412 | } |
| @@ -10289,7 +10293,7 @@ if there is a doubt, the value is t. */) | |||
| 10289 | } | 10293 | } |
| 10290 | 10294 | ||
| 10291 | DEFUN ("recent-keys", Frecent_keys, Srecent_keys, 0, 0, 0, | 10295 | DEFUN ("recent-keys", Frecent_keys, Srecent_keys, 0, 0, 0, |
| 10292 | doc: /* Return vector of last 100 events, not counting those from keyboard macros. */) | 10296 | doc: /* Return vector of last 300 events, not counting those from keyboard macros. */) |
| 10293 | () | 10297 | () |
| 10294 | { | 10298 | { |
| 10295 | Lisp_Object *keys = XVECTOR (recent_keys)->contents; | 10299 | Lisp_Object *keys = XVECTOR (recent_keys)->contents; |
| @@ -10433,7 +10437,9 @@ If FILE is nil, close any open dribble file. */) | |||
| 10433 | { | 10437 | { |
| 10434 | if (dribble) | 10438 | if (dribble) |
| 10435 | { | 10439 | { |
| 10440 | BLOCK_INPUT; | ||
| 10436 | fclose (dribble); | 10441 | fclose (dribble); |
| 10442 | UNBLOCK_INPUT; | ||
| 10437 | dribble = 0; | 10443 | dribble = 0; |
| 10438 | } | 10444 | } |
| 10439 | if (!NILP (file)) | 10445 | if (!NILP (file)) |
diff --git a/src/lisp.h b/src/lisp.h index 04c1bb91642..6ba01b1e8f8 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2686,6 +2686,7 @@ EXFUN (Fread_char, 3); | |||
| 2686 | EXFUN (Fread_event, 3); | 2686 | EXFUN (Fread_event, 3); |
| 2687 | extern Lisp_Object read_filtered_event P_ ((int, int, int, int, Lisp_Object)); | 2687 | extern Lisp_Object read_filtered_event P_ ((int, int, int, int, Lisp_Object)); |
| 2688 | EXFUN (Feval_region, 4); | 2688 | EXFUN (Feval_region, 4); |
| 2689 | extern Lisp_Object check_obarray P_ ((Lisp_Object)); | ||
| 2689 | extern Lisp_Object intern P_ ((const char *)); | 2690 | extern Lisp_Object intern P_ ((const char *)); |
| 2690 | extern Lisp_Object make_symbol P_ ((char *)); | 2691 | extern Lisp_Object make_symbol P_ ((char *)); |
| 2691 | extern Lisp_Object oblookup P_ ((Lisp_Object, const char *, int, int)); | 2692 | extern Lisp_Object oblookup P_ ((Lisp_Object, const char *, int, int)); |
diff --git a/src/lread.c b/src/lread.c index 78b59340855..178b381af10 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -38,6 +38,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 38 | #include "keyboard.h" | 38 | #include "keyboard.h" |
| 39 | #include "termhooks.h" | 39 | #include "termhooks.h" |
| 40 | #include "coding.h" | 40 | #include "coding.h" |
| 41 | #include "blockinput.h" | ||
| 41 | 42 | ||
| 42 | #ifdef lint | 43 | #ifdef lint |
| 43 | #include <sys/inode.h> | 44 | #include <sys/inode.h> |
| @@ -461,7 +462,11 @@ unreadchar (readcharfun, c) | |||
| 461 | || EQ (readcharfun, Qget_emacs_mule_file_char)) | 462 | || EQ (readcharfun, Qget_emacs_mule_file_char)) |
| 462 | { | 463 | { |
| 463 | if (load_each_byte) | 464 | if (load_each_byte) |
| 464 | ungetc (c, instream); | 465 | { |
| 466 | BLOCK_INPUT; | ||
| 467 | ungetc (c, instream); | ||
| 468 | UNBLOCK_INPUT; | ||
| 469 | } | ||
| 465 | else | 470 | else |
| 466 | unread_char = c; | 471 | unread_char = c; |
| 467 | } | 472 | } |
| @@ -485,20 +490,28 @@ readbyte_from_file (c, readcharfun) | |||
| 485 | { | 490 | { |
| 486 | if (c >= 0) | 491 | if (c >= 0) |
| 487 | { | 492 | { |
| 493 | BLOCK_INPUT; | ||
| 488 | ungetc (c, instream); | 494 | ungetc (c, instream); |
| 495 | UNBLOCK_INPUT; | ||
| 489 | return 0; | 496 | return 0; |
| 490 | } | 497 | } |
| 491 | 498 | ||
| 499 | BLOCK_INPUT; | ||
| 492 | c = getc (instream); | 500 | c = getc (instream); |
| 501 | UNBLOCK_INPUT; | ||
| 502 | |||
| 493 | #ifdef EINTR | 503 | #ifdef EINTR |
| 494 | /* Interrupted reads have been observed while reading over the network */ | 504 | /* Interrupted reads have been observed while reading over the network */ |
| 495 | while (c == EOF && ferror (instream) && errno == EINTR) | 505 | while (c == EOF && ferror (instream) && errno == EINTR) |
| 496 | { | 506 | { |
| 497 | QUIT; | 507 | QUIT; |
| 498 | clearerr (instream); | 508 | clearerr (instream); |
| 499 | c = getc (instream); | 509 | BLOCK_INPUT; |
| 500 | } | 510 | c = getc (instream); |
| 511 | UNBLOCK_INPUT; | ||
| 512 | } | ||
| 501 | #endif | 513 | #endif |
| 514 | |||
| 502 | return (c == EOF ? -1 : c); | 515 | return (c == EOF ? -1 : c); |
| 503 | } | 516 | } |
| 504 | 517 | ||
| @@ -800,7 +813,9 @@ DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0, | |||
| 800 | () | 813 | () |
| 801 | { | 814 | { |
| 802 | register Lisp_Object val; | 815 | register Lisp_Object val; |
| 816 | BLOCK_INPUT; | ||
| 803 | XSETINT (val, getc (instream)); | 817 | XSETINT (val, getc (instream)); |
| 818 | UNBLOCK_INPUT; | ||
| 804 | return val; | 819 | return val; |
| 805 | } | 820 | } |
| 806 | 821 | ||
| @@ -1237,7 +1252,11 @@ load_unwind (arg) /* used as unwind-protect function in load */ | |||
| 1237 | { | 1252 | { |
| 1238 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; | 1253 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; |
| 1239 | if (stream != NULL) | 1254 | if (stream != NULL) |
| 1240 | fclose (stream); | 1255 | { |
| 1256 | BLOCK_INPUT; | ||
| 1257 | fclose (stream); | ||
| 1258 | UNBLOCK_INPUT; | ||
| 1259 | } | ||
| 1241 | if (--load_in_progress < 0) load_in_progress = 0; | 1260 | if (--load_in_progress < 0) load_in_progress = 0; |
| 1242 | return Qnil; | 1261 | return Qnil; |
| 1243 | } | 1262 | } |
diff --git a/src/macmenu.c b/src/macmenu.c index 82322515c31..c7a84df7106 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -259,6 +259,9 @@ static int menu_items_n_panes; | |||
| 259 | /* Current depth within submenus. */ | 259 | /* Current depth within submenus. */ |
| 260 | static int menu_items_submenu_depth; | 260 | static int menu_items_submenu_depth; |
| 261 | 261 | ||
| 262 | /* Nonzero means a menu is currently active. */ | ||
| 263 | static int popup_activated_flag; | ||
| 264 | |||
| 262 | /* This is set nonzero after the user activates the menu bar, and set | 265 | /* This is set nonzero after the user activates the menu bar, and set |
| 263 | to zero again after the menu bars are redisplayed by prepare_menu_bar. | 266 | to zero again after the menu bars are redisplayed by prepare_menu_bar. |
| 264 | While it is nonzero, all calls to set_frame_menubar go deep. | 267 | While it is nonzero, all calls to set_frame_menubar go deep. |
| @@ -1141,7 +1144,9 @@ x_activate_menubar (f) | |||
| 1141 | set_frame_menubar (f, 0, 1); | 1144 | set_frame_menubar (f, 0, 1); |
| 1142 | BLOCK_INPUT; | 1145 | BLOCK_INPUT; |
| 1143 | 1146 | ||
| 1147 | popup_activated_flag = 1; | ||
| 1144 | menu_choice = MenuSelect (saved_menu_event_location); | 1148 | menu_choice = MenuSelect (saved_menu_event_location); |
| 1149 | popup_activated_flag = 0; | ||
| 1145 | menu_id = HiWord (menu_choice); | 1150 | menu_id = HiWord (menu_choice); |
| 1146 | menu_item = LoWord (menu_choice); | 1151 | menu_item = LoWord (menu_choice); |
| 1147 | 1152 | ||
| @@ -2237,7 +2242,9 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2237 | install_menu_quit_handler (MAC_MENU_POPUP_SUB, menu); | 2242 | install_menu_quit_handler (MAC_MENU_POPUP_SUB, menu); |
| 2238 | 2243 | ||
| 2239 | /* Display the menu. */ | 2244 | /* Display the menu. */ |
| 2245 | popup_activated_flag = 1; | ||
| 2240 | menu_item_choice = PopUpMenuSelect (menu, pos.v, pos.h, 0); | 2246 | menu_item_choice = PopUpMenuSelect (menu, pos.v, pos.h, 0); |
| 2247 | popup_activated_flag = 0; | ||
| 2241 | 2248 | ||
| 2242 | /* Get the refcon to find the correct item */ | 2249 | /* Get the refcon to find the correct item */ |
| 2243 | if (menu_item_choice) | 2250 | if (menu_item_choice) |
| @@ -3218,6 +3225,14 @@ dispose_menus (kind, id) | |||
| 3218 | 3225 | ||
| 3219 | #endif /* HAVE_MENUS */ | 3226 | #endif /* HAVE_MENUS */ |
| 3220 | 3227 | ||
| 3228 | /* Detect if a menu is currently active. */ | ||
| 3229 | |||
| 3230 | int | ||
| 3231 | popup_activated () | ||
| 3232 | { | ||
| 3233 | return popup_activated_flag; | ||
| 3234 | } | ||
| 3235 | |||
| 3221 | /* The following is used by delayed window autoselection. */ | 3236 | /* The following is used by delayed window autoselection. */ |
| 3222 | 3237 | ||
| 3223 | DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, | 3238 | DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, |
diff --git a/src/macterm.c b/src/macterm.c index 1fa3daace6f..3d122215fb3 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -4486,25 +4486,24 @@ note_mouse_movement (frame, pos) | |||
| 4486 | last_mouse_motion_position = *pos; | 4486 | last_mouse_motion_position = *pos; |
| 4487 | XSETFRAME (last_mouse_motion_frame, frame); | 4487 | XSETFRAME (last_mouse_motion_frame, frame); |
| 4488 | 4488 | ||
| 4489 | if (frame == dpyinfo->mouse_face_mouse_frame | ||
| 4489 | #if TARGET_API_MAC_CARBON | 4490 | #if TARGET_API_MAC_CARBON |
| 4490 | if (!PtInRect (*pos, GetWindowPortBounds (FRAME_MAC_WINDOW (frame), &r))) | 4491 | && !PtInRect (*pos, GetWindowPortBounds (FRAME_MAC_WINDOW (frame), &r)) |
| 4491 | #else | 4492 | #else |
| 4492 | if (!PtInRect (*pos, &FRAME_MAC_WINDOW (frame)->portRect)) | 4493 | && !PtInRect (*pos, &FRAME_MAC_WINDOW (frame)->portRect) |
| 4493 | #endif | 4494 | #endif |
| 4495 | ) | ||
| 4494 | { | 4496 | { |
| 4495 | if (frame == dpyinfo->mouse_face_mouse_frame) | 4497 | /* This case corresponds to LeaveNotify in X11. If we move |
| 4496 | /* This case corresponds to LeaveNotify in X11. */ | 4498 | outside the frame, then we're certainly no longer on any text |
| 4497 | { | 4499 | in the frame. */ |
| 4498 | /* If we move outside the frame, then we're certainly no | 4500 | clear_mouse_face (dpyinfo); |
| 4499 | longer on any text in the frame. */ | 4501 | dpyinfo->mouse_face_mouse_frame = 0; |
| 4500 | clear_mouse_face (dpyinfo); | 4502 | if (!dpyinfo->grabbed) |
| 4501 | dpyinfo->mouse_face_mouse_frame = 0; | 4503 | rif->define_frame_cursor (frame, |
| 4502 | if (!dpyinfo->grabbed) | 4504 | frame->output_data.mac->nontext_cursor); |
| 4503 | rif->define_frame_cursor (frame, | ||
| 4504 | frame->output_data.mac->nontext_cursor); | ||
| 4505 | } | ||
| 4506 | return 1; | ||
| 4507 | } | 4505 | } |
| 4506 | |||
| 4508 | /* Has the mouse moved off the glyph it was on at the last sighting? */ | 4507 | /* Has the mouse moved off the glyph it was on at the last sighting? */ |
| 4509 | if (frame != last_mouse_glyph_frame | 4508 | if (frame != last_mouse_glyph_frame |
| 4510 | || !PtInRect (*pos, &last_mouse_glyph)) | 4509 | || !PtInRect (*pos, &last_mouse_glyph)) |
diff --git a/src/print.c b/src/print.c index 709945494e3..eb549fd18c0 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -34,6 +34,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 34 | #include "dispextern.h" | 34 | #include "dispextern.h" |
| 35 | #include "termchar.h" | 35 | #include "termchar.h" |
| 36 | #include "intervals.h" | 36 | #include "intervals.h" |
| 37 | #include "blockinput.h" | ||
| 37 | 38 | ||
| 38 | Lisp_Object Vstandard_output, Qstandard_output; | 39 | Lisp_Object Vstandard_output, Qstandard_output; |
| 39 | 40 | ||
| @@ -976,7 +977,11 @@ append to existing target file. */) | |||
| 976 | Lisp_Object file, append; | 977 | Lisp_Object file, append; |
| 977 | { | 978 | { |
| 978 | if (initial_stderr_stream != NULL) | 979 | if (initial_stderr_stream != NULL) |
| 979 | fclose (stderr); | 980 | { |
| 981 | BLOCK_INPUT; | ||
| 982 | fclose (stderr); | ||
| 983 | UNBLOCK_INPUT; | ||
| 984 | } | ||
| 980 | stderr = initial_stderr_stream; | 985 | stderr = initial_stderr_stream; |
| 981 | initial_stderr_stream = NULL; | 986 | initial_stderr_stream = NULL; |
| 982 | 987 | ||
diff --git a/src/process.c b/src/process.c index f3162c9d3e5..ad637ad6cfa 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -816,7 +816,7 @@ nil, indicating the current buffer's process. */) | |||
| 816 | Lisp_Object symbol; | 816 | Lisp_Object symbol; |
| 817 | /* Assignment to EMACS_INT stops GCC whining about limited range | 817 | /* Assignment to EMACS_INT stops GCC whining about limited range |
| 818 | of data type. */ | 818 | of data type. */ |
| 819 | EMACS_INT pid = p->pid;; | 819 | EMACS_INT pid = p->pid; |
| 820 | 820 | ||
| 821 | /* No problem storing the pid here, as it is still in Vprocess_alist. */ | 821 | /* No problem storing the pid here, as it is still in Vprocess_alist. */ |
| 822 | deleted_pid_list = Fcons (make_fixnum_or_float (pid), | 822 | deleted_pid_list = Fcons (make_fixnum_or_float (pid), |
| @@ -829,7 +829,8 @@ nil, indicating the current buffer's process. */) | |||
| 829 | if (CONSP (p->status)) | 829 | if (CONSP (p->status)) |
| 830 | symbol = XCAR (p->status); | 830 | symbol = XCAR (p->status); |
| 831 | if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)) | 831 | if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)) |
| 832 | Fdelete (make_fixnum_or_float (pid), deleted_pid_list); | 832 | deleted_pid_list |
| 833 | = Fdelete (make_fixnum_or_float (pid), deleted_pid_list); | ||
| 833 | else | 834 | else |
| 834 | #endif | 835 | #endif |
| 835 | { | 836 | { |
| @@ -1817,7 +1818,8 @@ create_process (process, new_argv, current_dir) | |||
| 1817 | char **new_argv; | 1818 | char **new_argv; |
| 1818 | Lisp_Object current_dir; | 1819 | Lisp_Object current_dir; |
| 1819 | { | 1820 | { |
| 1820 | int pid, inchannel, outchannel; | 1821 | int inchannel, outchannel; |
| 1822 | pid_t pid; | ||
| 1821 | int sv[2]; | 1823 | int sv[2]; |
| 1822 | #ifdef POSIX_SIGNALS | 1824 | #ifdef POSIX_SIGNALS |
| 1823 | sigset_t procmask; | 1825 | sigset_t procmask; |
| @@ -3333,13 +3335,17 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3333 | #endif | 3335 | #endif |
| 3334 | } | 3336 | } |
| 3335 | 3337 | ||
| 3338 | immediate_quit = 0; | ||
| 3339 | |||
| 3336 | #ifdef HAVE_GETADDRINFO | 3340 | #ifdef HAVE_GETADDRINFO |
| 3337 | if (res != &ai) | 3341 | if (res != &ai) |
| 3338 | freeaddrinfo (res); | 3342 | { |
| 3343 | BLOCK_INPUT; | ||
| 3344 | freeaddrinfo (res); | ||
| 3345 | UNBLOCK_INPUT; | ||
| 3346 | } | ||
| 3339 | #endif | 3347 | #endif |
| 3340 | 3348 | ||
| 3341 | immediate_quit = 0; | ||
| 3342 | |||
| 3343 | /* Discard the unwind protect for closing S, if any. */ | 3349 | /* Discard the unwind protect for closing S, if any. */ |
| 3344 | specpdl_ptr = specpdl + count1; | 3350 | specpdl_ptr = specpdl + count1; |
| 3345 | 3351 | ||
| @@ -6392,7 +6398,7 @@ sigchld_handler (signo) | |||
| 6392 | 6398 | ||
| 6393 | while (1) | 6399 | while (1) |
| 6394 | { | 6400 | { |
| 6395 | register EMACS_INT pid; | 6401 | pid_t pid; |
| 6396 | WAITTYPE w; | 6402 | WAITTYPE w; |
| 6397 | Lisp_Object tail; | 6403 | Lisp_Object tail; |
| 6398 | 6404 | ||
| @@ -6401,16 +6407,17 @@ sigchld_handler (signo) | |||
| 6401 | #define WUNTRACED 0 | 6407 | #define WUNTRACED 0 |
| 6402 | #endif /* no WUNTRACED */ | 6408 | #endif /* no WUNTRACED */ |
| 6403 | /* Keep trying to get a status until we get a definitive result. */ | 6409 | /* Keep trying to get a status until we get a definitive result. */ |
| 6404 | while (1) { | 6410 | while (1) |
| 6405 | errno = 0; | 6411 | { |
| 6406 | pid = wait3 (&w, WNOHANG | WUNTRACED, 0); | 6412 | errno = 0; |
| 6407 | if (! (pid < 0 && errno == EINTR)) | 6413 | pid = wait3 (&w, WNOHANG | WUNTRACED, 0); |
| 6408 | break; | 6414 | if (! (pid < 0 && errno == EINTR)) |
| 6409 | /* avoid a busyloop: wait3 is a system call, so we do not want | 6415 | break; |
| 6410 | to prevent the kernel from actually sending SIGCHLD to emacs | 6416 | /* Avoid a busyloop: wait3 is a system call, so we do not want |
| 6411 | by asking for it all the time */ | 6417 | to prevent the kernel from actually sending SIGCHLD to emacs |
| 6412 | sleep (1); | 6418 | by asking for it all the time. */ |
| 6413 | } | 6419 | sleep (1); |
| 6420 | } | ||
| 6414 | 6421 | ||
| 6415 | if (pid <= 0) | 6422 | if (pid <= 0) |
| 6416 | { | 6423 | { |
| @@ -6436,11 +6443,15 @@ sigchld_handler (signo) | |||
| 6436 | /* Find the process that signaled us, and record its status. */ | 6443 | /* Find the process that signaled us, and record its status. */ |
| 6437 | 6444 | ||
| 6438 | /* The process can have been deleted by Fdelete_process. */ | 6445 | /* The process can have been deleted by Fdelete_process. */ |
| 6439 | tail = Fmember (make_fixnum_or_float (pid), deleted_pid_list); | 6446 | for (tail = deleted_pid_list; GC_CONSP (tail); tail = XCDR (tail)) |
| 6440 | if (!NILP (tail)) | ||
| 6441 | { | 6447 | { |
| 6442 | Fsetcar (tail, Qnil); | 6448 | Lisp_Object xpid = XCAR (tail); |
| 6443 | goto sigchld_end_of_loop; | 6449 | if ((GC_INTEGERP (xpid) && pid == (pid_t) XINT (xpid)) |
| 6450 | || (GC_FLOATP (xpid) && pid == (pid_t) XFLOAT_DATA (xpid))) | ||
| 6451 | { | ||
| 6452 | XSETCAR (tail, Qnil); | ||
| 6453 | goto sigchld_end_of_loop; | ||
| 6454 | } | ||
| 6444 | } | 6455 | } |
| 6445 | 6456 | ||
| 6446 | /* Otherwise, if it is asynchronous, it is in Vprocess_alist. */ | 6457 | /* Otherwise, if it is asynchronous, it is in Vprocess_alist. */ |
diff --git a/src/term.c b/src/term.c index 1ec904e79f3..1fcda1abb77 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -41,6 +41,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 41 | #include "dispextern.h" | 41 | #include "dispextern.h" |
| 42 | #include "window.h" | 42 | #include "window.h" |
| 43 | #include "keymap.h" | 43 | #include "keymap.h" |
| 44 | #include "blockinput.h" | ||
| 44 | 45 | ||
| 45 | /* For now, don't try to include termcap.h. On some systems, | 46 | /* For now, don't try to include termcap.h. On some systems, |
| 46 | configure finds a non-standard termcap.h that the main build | 47 | configure finds a non-standard termcap.h that the main build |
| @@ -1057,11 +1058,13 @@ write_glyphs (string, len) | |||
| 1057 | conversion_buffer = encode_terminal_code (string, n, coding); | 1058 | conversion_buffer = encode_terminal_code (string, n, coding); |
| 1058 | if (coding->produced > 0) | 1059 | if (coding->produced > 0) |
| 1059 | { | 1060 | { |
| 1061 | BLOCK_INPUT; | ||
| 1060 | fwrite (conversion_buffer, 1, coding->produced, stdout); | 1062 | fwrite (conversion_buffer, 1, coding->produced, stdout); |
| 1061 | if (ferror (stdout)) | 1063 | if (ferror (stdout)) |
| 1062 | clearerr (stdout); | 1064 | clearerr (stdout); |
| 1063 | if (termscript) | 1065 | if (termscript) |
| 1064 | fwrite (conversion_buffer, 1, coding->produced, termscript); | 1066 | fwrite (conversion_buffer, 1, coding->produced, termscript); |
| 1067 | UNBLOCK_INPUT; | ||
| 1065 | } | 1068 | } |
| 1066 | len -= n; | 1069 | len -= n; |
| 1067 | string += n; | 1070 | string += n; |
| @@ -1156,11 +1159,13 @@ insert_glyphs (start, len) | |||
| 1156 | 1159 | ||
| 1157 | if (coding->produced > 0) | 1160 | if (coding->produced > 0) |
| 1158 | { | 1161 | { |
| 1162 | BLOCK_INPUT; | ||
| 1159 | fwrite (conversion_buffer, 1, coding->produced, stdout); | 1163 | fwrite (conversion_buffer, 1, coding->produced, stdout); |
| 1160 | if (ferror (stdout)) | 1164 | if (ferror (stdout)) |
| 1161 | clearerr (stdout); | 1165 | clearerr (stdout); |
| 1162 | if (termscript) | 1166 | if (termscript) |
| 1163 | fwrite (conversion_buffer, 1, coding->produced, termscript); | 1167 | fwrite (conversion_buffer, 1, coding->produced, termscript); |
| 1168 | UNBLOCK_INPUT; | ||
| 1164 | } | 1169 | } |
| 1165 | 1170 | ||
| 1166 | OUTPUT1_IF (TS_pad_inserted_char); | 1171 | OUTPUT1_IF (TS_pad_inserted_char); |
diff --git a/src/xdisp.c b/src/xdisp.c index ee17abb7794..8f1c3a6c241 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -11032,7 +11032,7 @@ redisplay_internal (preserve_echo_area) | |||
| 11032 | return; | 11032 | return; |
| 11033 | } | 11033 | } |
| 11034 | 11034 | ||
| 11035 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) | 11035 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (MAC_OS) |
| 11036 | if (popup_activated ()) | 11036 | if (popup_activated ()) |
| 11037 | return; | 11037 | return; |
| 11038 | #endif | 11038 | #endif |
| @@ -15047,7 +15047,7 @@ try_window_id (w) | |||
| 15047 | sync_frame_with_window_matrix_rows (w); | 15047 | sync_frame_with_window_matrix_rows (w); |
| 15048 | 15048 | ||
| 15049 | /* Adjust buffer positions in reused rows. */ | 15049 | /* Adjust buffer positions in reused rows. */ |
| 15050 | if (delta) | 15050 | if (delta || delta_bytes) |
| 15051 | increment_matrix_positions (current_matrix, | 15051 | increment_matrix_positions (current_matrix, |
| 15052 | first_unchanged_at_end_vpos + dvpos, | 15052 | first_unchanged_at_end_vpos + dvpos, |
| 15053 | bottom_vpos, delta, delta_bytes); | 15053 | bottom_vpos, delta, delta_bytes); |
| @@ -22977,7 +22977,7 @@ note_mouse_highlight (f, x, y) | |||
| 22977 | struct buffer *b; | 22977 | struct buffer *b; |
| 22978 | 22978 | ||
| 22979 | /* When a menu is active, don't highlight because this looks odd. */ | 22979 | /* When a menu is active, don't highlight because this looks odd. */ |
| 22980 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) | 22980 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (MAC_OS) |
| 22981 | if (popup_activated ()) | 22981 | if (popup_activated ()) |
| 22982 | return; | 22982 | return; |
| 22983 | #endif | 22983 | #endif |