aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug #12805 with compilation error in the cygw32 build.Eli Zaretskii2012-11-053-1/+18
| | | | | | | src/makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(NT_INC)/unistd.h. src/w32fns.c Include unistd.h, to avoid compiler warnings on Cygwin. (emacs_abort) [CYGWIN]: Don't call _open_osfhandle; instead, use file descriptor 2 for standard error.
* * process.c (wait_reading_process_output): Revert previous change.Chong Yidong2012-11-052-7/+13
|
* Assume at least POSIX.1-1988 for getpgrp, setpgid, setsid.Paul Eggert2012-11-0410-86/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | This removes code that has been obsolete since around 1990. * admin/CPP-DEFINES (HAVE_SETPGID, HAVE_SETSID, SETPGRP_RELEASES_CTTY): Remove; obsolete. * configure.ac (setpgid, setsid): Assume their existence. (AC_FUNC_GETPGRP, SETPGRP_RELEASES_CTTY): Remove; obsolete. * src/callproc.c (Fcall_process): * src/emacs.c (main): * src/process.c (create_process): * src/term.c (dissociate_if_controlling_tty): Assume setsid exists. * src/callproc.c (child_setup): Assume setpgid exists and behaves as per POSIX.1-1988 or later. * src/conf_post.h (setpgid) [!HAVE_SETPGID]: Remove. * src/emacs.c (shut_down_emacs): * src/sysdep.c (sys_suspend, init_foreground_group): Assume getpgrp behaves as per POSIX.1-1998 or later. * src/msdos.c (setpgrp): Remove. (tcgetpgrp, setpgid, setsid): New functions. * src/systty.h (EMACS_GETPGRP): Remove. All callers now use getpgrp. * src/term.c (no_controlling_tty): Remove; unused. * src/w32proc.c (setpgrp): Remove. (setsid, tcgetpgrp): New functions. Fixes: debbugs:12800
* Simplify by assuming __fpending.Paul Eggert2012-11-042-4/+9
| | | | | | | | | | | Now that Emacs is using the gnulib fpending module, there's no need for Emacs to have a separate implementation. * configure.ac (stdio_ext.h, __fpending): Remove now-duplicate checks. (PENDING_OUTPUT_COUNT, DISPNEW_NEEDS_STDIO_EXT): Remove. * admin/CPP-DEFINES (PENDING_OUTPUT_COUNT): Remove. * src/dispnew.c: Include <fpending.h>, not <stdio_ext.h>. (update_frame_1): Use __fpending, not PENDING_OUTPUT_COUNT. Do not assume that __fpending's result fits in int.
* Remove EMACS_OUTQSIZE+sleep hack.Paul Eggert2012-11-043-26/+9
| | | | | | | | | * dispnew.c (update_frame_1): Remove hack for terminals slower than 2400 bps, which throttled Emacs by having it sleep. This code hasn't worked since at least 2007, when the multi-tty stuff was added, and anyway those old terminals are long dead. * systty.h (EMACS_OUTQSIZE): Remove; unused. The macro isn't used even without the dispnew.c change, as dispnew.c doesn't include systty.h.
* Fix data-loss with --version.Paul Eggert2012-11-042-3/+12
| | | | | | | | | | * emacs.c (close_output_streams): Use strerror, not emacs_strerror, as we can't assume that emacs_strerror is initialized, and strerror is good enough here. (main): Invoke atexit earlier, to catch earlier instances of sending data to stdout and exiting, e.g., "emacs --version >/dev/full". Fixes: debbugs:9574
* * nsterm.m: Add NSClearLineFunctionKey and keypad keys.Michael Marchionna2012-11-042-3/+28
| | | | | | (keyDown): Remap keypad keys to X11 virtual key codes. Fixes: debbugs:8680
* Fix order of entries in ChangeLog files.Eli Zaretskii2012-11-031-18/+18
|
* Merge from emacs-24; up to 2012-11-03T05:11:34Z!dmantipov@yandex.ruGlenn Morris2012-11-035-6/+80
|\
| * Adapt MSDOS port to latest changes.Eli Zaretskii2012-11-034-12/+42
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config.bat: Copy lib/execinfo.in.h to lib/execinfo.in-h if needed. msdos/sedlibmk.inp: Sync with changes in lib/Makefile.in. (HAVE_DECL_ENVIRON, GNULIB_ENVIRON): Edit to require declaration through lib/unistd.h. msdos/sed1v2.inp: Sync with changes in src/Makefile.in. msdos/sed2v2.inp: Sync with changes in src/config.in. src/lisp.mk: Adjust comments to the fact that term/internal is now loaded from loadup.el. src/msdos.c (msdos_abort): Rename from emacs_abort, and make static. (msdos_fatal_signal): New function. (XMenuActivate): Adjust the call to kbd_buffer_events_waiting to its argument list. src/conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline" for GCC versions before 4. (emacs_raise): Define to call msdos_fatal_signal. lisp/term/pc-win.el: Don't load term/internal from here. lisp/loadup.el: Load term/internal from here.
| | * Load term/internal from loadup.el.Eli Zaretskii2012-11-032-3/+6
| | |
| | * Adapt the MSDOS build to the latest changes on mainline.Eli Zaretskii2012-11-033-3/+30
| | |
| * | Backport from trunk.Jan Djärv2012-11-032-4/+31
| |/ | | | | | | | | | | | | | | | | * widget.c (resize_cb): New function. (EmacsFrameRealize): Add resize_cb as event handler. (EmacsFrameResize): Check if all is up to date before changing frame size. Fixes: debbugs:12733
| * Fix bidi initialization in init_from_display_pos.Eli Zaretskii2012-11-032-0/+44
| | | | | | | | | | | | | | | | src/xdisp.c (init_from_display_pos): Fix initialization of the bidi iterator when starting in the middle of a display or overlay string. Fixes: debbugs:12745
* | Fix data-loss with --batch.Paul Eggert2012-11-032-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/merge-gnulib (GNULIB_MODULES): Add close-stream. * lib/close-stream.c, lib/close-stream.h, lib/fpending.c * lib/fpending.h, m4/close-stream.m4, m4/fpending.m4: New files, from gnulib. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * src/emacs.c: Include <close-stream.h>. (close_output_streams): New function. (main): Pass it to atexit, so that Emacs closes stdout and stderr and handles errors appropriately. (Fkill_emacs): Don't worry about flushing, as close_output_stream does that now. Fixes: debbugs:9574
* | Fix a race condition that causes Emacs to mess up glib.Paul Eggert2012-11-033-95/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symptom is a diagnostic "GLib-WARNING **: In call to g_spawn_sync(), exit status of a child process was requested but SIGCHLD action was set to SIG_IGN and ECHILD was received by waitpid(), so exit status can't be returned." The diagnostic is partly wrong, as the SIGCHLD action is not set to SIG_IGN. The real bug is a race condition between Emacs and glib: Emacs does a waitpid (-1, ...) and reaps glib's subprocess by mistake, so that glib can't find it. Work around the bug by invoking waitpid only on subprocesses that Emacs itself creates. * process.c (create_process, record_child_status_change): Don't use special value -1 in pid field, as the caller now must know the pid rather than having the callee infer it. The inference was sometimes incorrect anyway, due to another race. (create_process): Set new 'alive' member if child is created. (process_status_retrieved): New function. (record_child_status_change): Use it. Accept negative 1st argument, which means to wait for the processes that Emacs already knows about. Move special-case code for DOS_NT (which lacks WNOHANG) here, from caller. Keep track of processes that have already been waited for, by testing and clearing new 'alive' member. (CAN_HANDLE_MULTIPLE_CHILDREN): Remove, as record_child_status_change now does this internally. (handle_child_signal): Let record_child_status_change do all the work, since we do not want to reap all exited child processes, only the child processes that Emacs itself created. * process.h (Lisp_Process): New boolean member 'alive'. Fixes: debbugs:8855
* | Omit duplicate definitions no longer needed with gcc -g3.Paul Eggert2012-11-032-22/+15
| | | | | | | | | | | | | | | | * lisp.h (GCTYPEBITS, GCALIGNMENT, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG) (VALMASK, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM): Define only as macros. There's no longer any need to also define these symbols as enums or as constants, since we now assume gcc -g3 when debugging.
* | * process.c (wait_reading_process_output): Clean up last change.Chong Yidong2012-11-042-11/+11
| |
* | Fix a race condition in wait_reading_process_output (tiny change).Chong Yidong2012-11-032-1/+9
| | | | | | | | | | | | | | * src/process.c (wait_reading_process_output): Avoid a race condition with SIGIO delivery. Fixes: debbugs:11536
* | * lisp/cus-start.el: Make cursor-type customizable.Chong Yidong2012-11-032-8/+12
| | | | | | | | | | | | * src/buffer.c (cursor_type): Untabify docstring. Fixes: debbugs:11633
* | * frame.h (struct frame): Drop can_have_scroll_bars memberDmitry Antipov2012-11-037-23/+8
| | | | | | | | | | | | which is meaningless for a long time. Adjust comments. (FRAME_CAN_HAVE_SCROLL_BARS): Remove. * frame.c, nsfns.m, term.c, w32fns.c, xfns.c: Adjust users.
* | * window.c (decode_next_window_args): Update window arg afterDmitry Antipov2012-11-033-8/+13
| | | | | | | | | | | | | | | | calling decode_live_window and so fix crash reported at http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00035.html by Juanma Barranquero <lekktu@gmail.com>. (Fwindow_body_width, Fwindow_body_height): Simplify a bit. * font.c (Ffont_at): Likewise.
* | * widget.c (resize_cb): New function.Jan Djärv2012-11-012-4/+31
| | | | | | | | | | | | | | | | (EmacsFrameRealize): Add resize_cb as event handler. (EmacsFrameResize): Check if all is up to date before changing frame size. Fixes: debbugs:12733
* | Implement backtrace output for fatal errors on MS-Windows.Eli Zaretskii2012-11-022-3/+85
| | | | | | | | | | | | | | | | src/w32fns.c (CaptureStackBackTrace_proc): New typedef. (BACKTRACE_LIMIT_MAX): New macro. (w32_backtrace): New function. (emacs_abort): Use w32_backtrace when the user chooses not to attach a debugger. Update the text of the abort dialog.
* | Window-related stuff cleanup here and there.Dmitry Antipov2012-11-029-64/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dispnew.c (Finternal_show_cursor, Finternal_show_cursor_p): Use decode_any_window. * fringe.c (Ffringe_bitmaps_at_pos): Likewise. * xdisp.c (Fformat_mode_line): Likewise. * font.c (Ffont_at): Use decode_live_window. * indent.c (Fcompute_motion, Fvertical_motion): Likewise. * window.c (decode_next_window_args): Likewise. (decode_any_window): Remove static. * window.h (decode_any_window): Add prototype. * lisp.h (CHECK_VALID_WINDOW, CHECK_LIVE_WINDOW): Move from here... * window.h: ...to here, redefine via WINDOW_VALID_P and WINDOW_LIVE_P, respectively.
* | Remove pad from struct input_event.Dmitry Antipov2012-11-024-28/+24
|/ | | | | | | | | | | * termhooks.h (struct input_event): Remove padding field. Adjust comment. * keyboard.c (event_to_kboard): Simplify because frame_or_window member is never cons for a long time. Adjust comment. (mark_kboards): Adjust because SELECTION_REQUEST_EVENT and SELECTION_CLEAR_EVENT has no Lisp_Objects to mark. Add comment. * xterm.c (handle_one_xevent): Do not initialize frame_or_window field of SELECTION_REQUEST_EVENT and SELECTION_CLEAR_EVENT.
* Fix MS-Windows build broken by fixing bug #12776 on Posix platforms.Eli Zaretskii2012-11-012-0/+16
| | | | | | | src/w32proc.c (getpgrp, setpgid): New functions. nt/inc/unistd.h (setpgid, getpgrp): Provide prototypes. nt/config.nt (GETPGRP_VOID): Define to 1.
* Spelling fixes.Paul Eggert2012-10-312-2/+2
|
* Fix crash when using Emacs as commit editor for git.Paul Eggert2012-10-318-35/+115
| | | | | | | | | | | | | | | | | | | | | | * callproc.c (setpgrp): Remove macro, as we now use setpgid and it is configured in conf_post.h. (Fcall_process): Don't invoke both setsid and setpgid; the former is enough, if it exists. * callproc.c (Fcall_process, child_setup): * process.c (create_process): Use setpgid. * conf_post.h (setpgid) [!HAVE_SETPGID]: New macro, which substitutes for the real thing. * dispnew.c (init_display): Initialize the foreground group if we are running a tty display. * emacs.c (main): Do not worry about setpgrp; init_display does it now. * lisp.h (init_foreground_group): New decl. * sysdep.c (inherited_pgroup): New static var. (init_foreground_group, tcsetpgrp_without_stopping) (narrow_foreground_group, widen_foreground_group): New functions. (init_sys_modes): Narrow foreground group. (reset_sys_modes): Widen foreground group. Fixes: debbugs:12697
* * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.Michael Albinus2012-10-312-3/+7
|
* Install fixes for Bug#12764 and Bug#12766.Martin Rudalics2012-10-312-0/+10
| | | | | | | | | | * window.el (quit-restore-window): If the window has been created on an existing frame and ended up as the sole window on that frame, do not delete it (Bug#12764). * minibuf.c (read_minibuf): Restore current buffer since choose_minibuf_frame calling Fset_frame_selected_window may change it (Bug#12766).
* * frame.c (Fframe_pixel_height): Fix documentation.Jan Djärv2012-10-302-5/+6
| | | | Fixes: debbugs:12733
* merge trunKenichi Handa2012-10-3012-133/+314
|\
| * Complete fix for build breakDaniel Colascione2012-10-292-3/+3
| |
| * Fix build break in non-Cygw32 Cygwin builds introduced in ↵Daniel Colascione2012-10-292-5/+6
| | | | | | | | 2012-10-29T17:24:29Z!dancol@dancol.org.
| * 2012-10-29 Daniel Colascione <dancol@dancol.org>Daniel Colascione2012-10-295-47/+74
| | | | | | | | | | | | | | | | | | | | cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode): In preparation for fixing bug#12739, move these functions from here... * coding.h, coding.c: ... to here, and compile them only when WINDOWSNT or HAVE_NTGUI. Moving these functions out of cygw32 proper lets us write cygw32-agnostic code for the HAVE_NTGUI case.
| * Don't use CLOCKS_PER_SEC in w32 timers.Eli Zaretskii2012-10-282-17/+31
| | | | | | | | | | | | | | | | | | src/w32proc.c (TIMER_TICKS_PER_SEC): New macro. (timer_loop, getitimer, setitimer): Use it instead of CLOCKS_PER_SEC, which is no longer pertinent, since we don't use 'clock'. (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a literal 10000.
| * * nsterm.m (NO_APPDEFINED_DATA): New define.Jan Djärv2012-10-282-12/+17
| | | | | | | | | | | | | | | | | | | | | | (last_appdefined_event_data): New variable (last_appdefined_event): Remove. (ns_select): Initialize t from last_appdefined_event_data instead of [last_appdefined_event data1]. (sendEvent:): Save [theEvent data1] to last_appdefined_event_data, remove last_appdefined_event. Fixes: debbugs:12698
| * * src/frame.c (x_set_font): Catch internal error.Stefan Monnier2012-10-282-8/+15
| |
| * Fix compiler warnings in w32proc.c.Eli Zaretskii2012-10-272-3/+4
| | | | | | | | | | src/w32proc.c (sys_spawnve): Avoid compiler warning about format mismatch. (timer_loop): Remove unused variable.
| * Use 'volatile' types for communications between timer thread and main thread.Eli Zaretskii2012-10-272-5/+5
| |
| * Fix a typo in a comment.Eli Zaretskii2012-10-271-1/+1
| |
| * Fix w32 implementation of itimers: overflow and ITIMER_PROF.Eli Zaretskii2012-10-272-49/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid overflow in w32 implementation of interval timers. When possible, for ITIMER_PROF count only times the main thread actually executes. src/w32proc.c <struct itimer_data>: 'expire' and 'reload' are now ULONGLONG types. Likewise for all the other data which was previously clock_t. (GetThreadTimes_Proc): New typedef. (w32_get_timer_time): New function, returns a suitable time value for the timer. (timer_loop): Enter critical section when accessing ULONGLONG values of the itimer_data struct, as these accesses are no longer atomic. Call 'w32_get_timer_time' instead of 'clock'. (init_timers): Initialize s_pfn_Get_Thread_Times. (start_timer_thread): Don't assign itimer->caller_thread here. (getitimer): Assign itimer->caller_thread here. (setitimer): Always call getitimer to get the value of ticks_now.
| * Avoid hourglass mouse pointer when a tooltip for menu item is shown.Eli Zaretskii2012-10-262-1/+20
| | | | | | | | | | | | | | src/w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of mouse movement events if the menu bar is active. This avoids producing a busy "hour-glass" cursor by Windows if the mouse pointer is positioned over a tooltip shown for some menu item.
| * Don't assume process IDs fit in int.Paul Eggert2012-10-244-4/+13
| | | | | | | | | | | | | | | | * emacs.c (shut_down_emacs) [!DOS_NT]: * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]: * term.c (dissociate_if_controlling_tty) [!DOS_NT]: Use pid_t, not int, to store process IDs, as 'int' is not wide enough on a few platforms (e.g., AIX and IRIX).
* | font.c (Ffont_at): If WINDOW is specified and it is not displaying the ↵Kenichi Handa2012-10-302-5/+14
|/ | | | current buffer, signal an error.
* merge trunkKenichi Handa2012-10-2413-64/+173
|\
| * Make unused variable font-list-limit obsolete, and move it out of C.Chong Yidong2012-10-232-8/+4
| | | | | | | | | | | | | | | | | | | | | | * display.texi (Font Lookup): Remove font-list-limit. * lisp/startup.el (command-line): * lisp/cus-start.el: Don't refer to font-list-limit. * lisp/faces.el (font-list-limit): Define as an obsolete variable. * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
| * * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancementJan Djärv2012-10-212-1/+17
| | | | | | | | | | | | | | for screen font. (nsfont_draw): Turn off LCD-smoothing. Fixes: debbugs:11484
| * * xterm.c (x_focus_changed): Check if daemonp when sending focus inJan Djärv2012-10-212-1/+7
| | | | | | | | | | | | event. Fixes: debbugs:12681