1. 17 Oct, 2012 1 commit
  2. 12 Oct, 2012 1 commit
  3. 09 Oct, 2012 1 commit
    • Eli Zaretskii's avatar
      Fix return type of w32_last_error. · b15736e6
      Eli Zaretskii authored
       src/w32fns.c (w32_last_error): Change the return value to DWORD, to
       match what GetLastError returns.  Explain better why the function is
       needed.
      b15736e6
  4. 08 Oct, 2012 4 commits
  5. 07 Oct, 2012 2 commits
  6. 30 Sep, 2012 3 commits
    • Fabrice Popineau's avatar
      Support x64 build on MS-Windows with MSVC. · 62aba0d4
      Fabrice Popineau authored
       src/w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
       (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
       compatibility with x64.
       src/w32term.c (w32_draw_underwave): Don't use GCC extensions for
       defining an XRectangle structure.
       src/w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
       arithmetics for compatibility with x64.
       src/w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
       compatibility with x64.
       src/w32heap.h: Adjust prototypes and declarations.
       src/w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
       (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
       DWORD, long, and unsigned long, for compatibility with x64.
       (allocate_heap) [_WIN64]: Reserve 32GB of memory.
       (sbrk): Argument is now of type ptrdiff_t.
       src/w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
       less than 0x0500.
       (w32_msg_pump): Use WPARAM type for 'result'.
       src/w32.c (init_environment, get_emacs_configuration): Support AMD64
       architecture.
       (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
       compatibility with x64.
       src/vm-limit.c (lim_data): Now size_t.
       (check_memory_limits): Adjust prototypes of real_morecore and
       __morecore to receive argument of type ptrdiff_t.  Use size_t for
       five_percent and data_size.
       src/unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
       variables, for compatibility with x64.
       (rva_to_section, offset_to_section, relocate_offset)
       (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
       (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
       (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
       for compatibility with x64.
       src/sysdep.c (STDERR_FILENO): Define if not already defined.
       src/ralloc.c (real_morecore): Argument type is now ptrdiff_t.
       (__morecore): Argument type is now ptrdiff_t.
       (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
       (relinquish): Use ptrdiff_t type for 'excess'.
       (r_alloc_sbrk): Argument type is now ptrdiff_t.
       src/makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
       (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
       instead of a literal number.
       src/gmalloc.c [WINDOWSNT]: Include w32heap.h.
       (min): Define only if not already defined.
       src/frame.c (x_report_frame_params): Use EMACS_UINT for the return
       value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
       hosts.
       src/image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
       'bitmaps' is a pointer.
       src/dispextern.h (x_bitmap_pixmap): Adjust prototype.
       src/alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
      
       nt/makefile.w32-in ($(TRES)): Use $(EMACS_MANIFEST).
       nt/inc/sys/socket.h: Don't map Winsock error codes to standard ones
       that are already defined.
       nt/inc/ms-w32.h (EMACS_INT, EMACS_UINT, EMACS_INT_MAX, PRIuMAX)
       (pI, _INTPTR) [_MSC_VER]: Fix definitions for MSVC.
       [_MSC_VER]: Add pragmas to suppress some MSVC warnings.
       nt/preprep.c (pfnCheckSumMappedFile, rva_to_section)
       (offset_to_section, relocate_offset, OFFSET_TO_RVA)
       (RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET, PTR_TO_RVA)
       (OFFSET_TO_PTR, ROUND_UP, ROUND_DOWN)
       (copy_executable_and_move_sections, ADJUST_IMPORT_RVA, main): Use
       DWORD_PTR instead of DWORD for compatibility with x64.
       nt/nmake.defs: Support AMD64.
       (EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST): New macros.
       nt/gmake.defs: (EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST):
       New macros.
       nt/addsection.c (pfnCheckSumMappedFile, rva_to_section)
       (offset_to_section, relocate_offset, OFFSET_TO_RVA)
       (RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET, PTR_TO_RVA)
       (OFFSET_TO_PTR, ROUND_UP, ROUND_DOWN)
       (copy_executable_and_add_section, main): Use DWORD_PTR instead of
       DWORD, for compatibility with x64.
       nt/emacs-x64.manifest: New file.
       nt/emacs-x86.manifest: Renamed from emacs.manifest.
      
       lib-src/ntlib.c (gettimeofday): Copy from src/w32.c.  lib/gettime. 
       needs this function.
      62aba0d4
    • Eli Zaretskii's avatar
      Support atimers and CPU profiler via profile.c on MS-Windows. · c06c382a
      Eli Zaretskii authored
       src/w32proc.c (sig_mask, crit_sig): New static variables.
       (sys_signal): Support SIGALRM and SIGPROF.
       (sigemptyset, sigaddset, sigfillset, sigprocmask)
       (pthread_sigmask, setpgrp): Moved here from w32.c.  sigaddset,
       sigfillset, and sigprocmask are no longer no-ops.
       (sigismember): New function.
       (struct itimer_data): New definition.
       (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
       (crit_prof): New static variables.
       (MAX_SINGLE_SLEEP): New definition.
       (timer_loop, stop_timer_thread, term_timers, init_timers)
       (start_timer_thread, getitimer, setitimer): New functions.
       (alarm): No longer a no-op, calls setitimer.
       src/w32.c (term_ntproc): Call term_timers.
       (init_ntproc): Make sure all signals are unblocked at startup, to
       erase any traces of dumping.  Call init_timers.
       src/w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
       Windows-specific code to display the hourglass mouse pointer is no
       longer used.
       (w32_wnd_proc): Remove code that handled the WM_TIMER message due
       to hourglass timer expiration.
       (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
       Remove, no longer used.
       (w32_note_current_window, show_hourglass, hide_hourglass): New
       functions, in support of hourglass cursor display similar to other
       window systems.
       (syms_of_w32fns): Don't initialize hourglass_timer.
       src/xdisp.c (start_hourglass, cancel_hourglass): Now used on
       WINDOWSNT as well.
       (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
       src/w32.h (init_timers, term_timers): Add prototypes.
      
       nt/inc/sys/time.h (ITIMER_REAL, ITIMER_PROF): Define.
       (struct itimerval): Define.
       (getitimer, setitimer): Add prototypes.
       nt/inc/ms-w32.h <sigset_t> [_MSVC_VER]: Make the typedef consistent
       with MinGW.
       (SA_RESTART, SIGPROF): Define.
       nt/config.nt (HAVE_SETITIMER): Define to 1.
      c06c382a
    • Jan Djärv's avatar
      Support file name dialog on NS. · d7e642cc
      Jan Djärv authored
      * etc/NEWS: Mention that the file dialog is used on NS.
      
      * lisp/term/ns-win.el (x-file-dialog): New function.
      
      * src/fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
      
      * src/nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
      
      * src/nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
      Initialize panel name field if OSX >= 10.6.
      
      * src/w32fns.c (Fx_file_dialog): Update comment.
      
      * src/xfns.c (Fx_file_dialog): Update comment.
      d7e642cc
  7. 23 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Simplify and avoid signal-handling races. · 4d7e6e51
      Paul Eggert authored
      * nt/inc/ms-w32.h (emacs_raise): New macro.
      * src/alloc.c (die):
      * src/sysdep.c (emacs_abort) [HAVE_NTGUI]:
      Avoid recursive loop if there's a fatal error in the function itself.
      * src/atimer.c (pending_atimers):
      * src/blockinput.h: Don't include "atimer.h"; no longer needed.
      (interrupt_input_pending): Remove.  All uses removed.
      pending_signals now counts both atimers and ordinary interrupts.
      This is less racy than having three separate pending-signal flags.
      (block_input, unblock_input, totally_unblock_input, unblock_input_to)
      (input_blocked_p):
      Rename from their upper-case counterparts BLOCK_INPUT,
      UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
      INPUT_BLOCKED_P, and turn into functions.  All uses changed.
      This makes it easier to access volatile variables more accurately.
      (BLOCK_INPUT_RESIGNAL): Remove.  All uses replaced by unblock_input ().
      (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
      that's more reliable if the code is buggy and sets
      interrupt_input_blocked to a negative value.  All uses changed.
      * src/atimer.c (deliver_alarm_signal):
      Remove.  No need to deliver this to the parent; any thread can
      handle this signal now.  All uses replaced by underlying handler.
      * src/atimer.c (turn_on_atimers):
      * src/dispnew.c (handle_window_change_signal):
      * src/emacs.c (handle_danger_signal):
      * src/keyboard.c (kbd_buffer_get_event):
      Don't reestablish signal handler; not needed with sigaction.
      * src/blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
      (UNBLOCK_INPUT_TO):
      Rework to avoid unnecessary accesses to volatile variables.
      (UNBLOCK_INPUT_TO): Now a function.
      (totally_unblock_input, unblock_input): New decls.
      * src/data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
      (init_data): Remove.  Necessary stuff now done in init_signal.
      * src/emacs.c, src/xdisp.c: Include "atimer.h", since we invoke atimer functions.
      * src/emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
      (fatal_error_code): Remove; no longer needed.
      (terminate_due_to_signal): Rename from fatal_error_backtrace, since
      it doesn't always backtrace.  All uses changed.  No need to reset
      signal to default, since sigaction and/or die does that for us now.
      Use emacs_raise (FOO), not kill (getpid (), FOO).
      (main): Check more-accurately whether we're dumping.
      Move fatal-error setup to sysdep.c
      * src/floatfns.c: Do not include "syssignal.h"; no longer needed.
      * src/gtkutil.c (xg_get_file_name, xg_get_font):
      Remove no-longer-needed signal-mask manipulation.
      * src/keyboard.c, src/process.c (POLL_FOR_INPUT):
      Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
      * src/keyboard.c (read_avail_input): Remove.
      All uses replaced by gobble_input.
      (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
      (kbd_buffer_store_event_hold, gobble_input):
      (record_asynch_buffer_change) [USABLE_SIGIO]:
      (store_user_signal_events):
      No need to mess with signal mask.
      (gobble_input): If blocking input and there are terminals, simply
      set pending_signals to 1 and return.  All hooks changed to not
      worry about whether input is blocked.
      (process_pending_signals): Clear pending_signals before processing
      them, in case a signal comes in while we're processing.
      By convention callers now test pending_signals before calling us.
      (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
      New functions, to support changes to blockinput.h.
      (handle_input_available_signal): Now extern.
      (reinvoke_input_signal): Remove.  All uses replaced by
      handle_async_input.
      (quit_count): Now volatile, since a signal handler uses it.
      (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.  All
      callers changed.  Block SIGINT only if not already blocked.
      Clear sigmask reliably, even if Fsignal returns, which it can.
      Omit unnecessary accesses to volatile var.
      (quit_throw_to_read_char): No need to restore sigmask.
      * src/keyboard.c (gobble_input, handle_user_signal):
      * src/process.c (wait_reading_process_output):
      Call signal-handling code rather than killing ourselves.
      * src/lisp.h: Include <float.h>, for...
      (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
      (pending_signals): Now volatile.
      (syms_of_data): Now const if IEEE floating point.
      (handle_input_available_signal) [USABLE_SIGIO]:
      (terminate_due_to_signal, record_child_status_change): New decls.
      * src/process.c (create_process): Avoid disaster if memory is exhausted
      while we're processing a vfork, by tightening the critical section
      around the vfork.
      (send_process_frame, process_sent_to, handle_pipe_signal)
      (deliver_pipe_signal): Remove.  No longer needed, as Emacs now
      ignores SIGPIPE.
      (send_process): No need for setjmp/longjmp any more, since the
      SIGPIPE stuff is now gone.  Instead, report an error if errno
      is EPIPE.
      (record_child_status_change): Now extern.  PID and W are now args.
      Return void, not bool.  All callers changed.
      * src/sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
      Remove.  All uses removed.  This bug should be fixed now in a
      different way.
      (wait_for_termination_1): Use waitpid rather than sigsuspend,
      and record the child status change directly.  This avoids the
      need to futz with the signal mask.
      (process_fatal_action): Move here from emacs.c.
      (emacs_sigaction_flags): New function, containing
      much of what used to be in emacs_sigaction_init.
      (emacs_sigaction_init): Use it.  Block nonfatal system signals that are
      caught by emacs, to make races less likely.
      (deliver_process_signal): Rename from handle_on_main_thread.
      All uses changed.
      (BACKTRACE_LIMIT_MAX): Now at top level.
      (thread_backtrace_buffer, threadback_backtrace_pointers):
      New static vars.
      (deliver_thread_signal, deliver_fatal_thread_signal):
      New functions, for more-accurate delivery of thread-specific signals.
      (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
      (deliver_arith_signal): Handle in this thread, not
      in the main thread, since it's triggered by this thread.
      (maybe_fatal_sig): New function.
      (init_signals): New arg DUMPING so that we can be more accurate
      about whether we're dumping.  Caller changed.
      Treat thread-specific signals differently from process-general signals.
      Block all signals while handling fatal error; that's safer.
      xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
      on IEEE hosts.
      When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
      Ignore SIGPIPE unless batch.
      (emacs_backtrace): Output backtrace for the appropriate thread,
      which is not necessarily the main thread.
      * src/syssignal.h: Include <stdbool.h>.
      (emacs_raise): New macro.
      * src/xterm.c (x_connection_signal): Remove; no longer needed
      now that we use sigaction.
      (x_connection_closed): No need to mess with sigmask now.
      (x_initialize): No need to reset SIGPIPE handler here, since
      init_signals does this for us now.
      
      Fixes: debbugs:12471
      4d7e6e51
  8. 17 Sep, 2012 2 commits
    • Daniel Colascione's avatar
      Detect window-system from display name · efc3dd3c
      Daniel Colascione authored
      efc3dd3c
    • Daniel Colascione's avatar
      Implement cygw32 · 0fda9b75
      Daniel Colascione authored
      Here, we use the generic window-system configuration system we just
      implemented to support the w32 window-system in the mainline build
      under Cygwin.  (Previously, the w32 window system could only be
      compiled as part of the NT-native Emacs build process.)
      
      The changes in this patch need to be applied atomically in order to
      avoid breaking Emacs.  The changes include:
      
        - Changes throughout the Lisp and C code to not assume that
            NT Emacs and the w32 window system are synonymous.
      
        - Wiring up the regular select(2) event loop to Windows messages
      
        - Cleaning up the w32 drag-and-drop receiving code.
      
        - Exposing Cygwin path conversion functions to elisp.
      
        - Unicode file dialog support when compiling for Cygwin.
      
        - Splitting the w32 term lisp initialization code into code
          applicable to any w32 window-system and code specific to
          system-type windows-nt.
      
        - Integrating the old and new w32 code into the build system.
      0fda9b75
  9. 15 Sep, 2012 1 commit
    • Eli Zaretskii's avatar
      Fix MS-Windows build broken by 2012-09-15T07:06:56Z!eggert@cs.ucla.edu,... · 7105c8cb
      Eli Zaretskii authored
      Fix MS-Windows build broken by 2012-09-15T07:06:56Z!eggert@cs.ucla.edu, completing fix for bug #12446.
      
       src/w32xfns.c:
       src/w32uniscribe.c:
       src/w32term.c:
       src/w32select.c:
       src/w32reg.c:
       src/w32proc.c:
       src/w32menu.c:
       src/w32inevt.c:
       src/w32heap.c:
       src/w32font.c:
       src/w32fns.c:
       src/w32console.c:
       src/w32.c:
       src/w16select.c: Remove inclusion of setjmp.h, as it is now included
       by lisp.h.  This completes removal of setjmp.h inclusion
       erroneously announced in the previous commit.
       src/lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
       more accurate.
       src/image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
       not defined as a macro.  The latter happens on MS-Windows.
      7105c8cb
  10. 04 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Simplify redefinition of 'abort' (Bug#12316). · 1088b922
      Paul Eggert authored
      Do not try to redefine the 'abort' function.  Instead, redo
      the code so that it calls 'emacs_abort' rather than 'abort'.
      This removes the need for the NO_ABORT configure-time macro
      and makes it easier to change the abort code to do a backtrace.
      * configure.ac (NO_ABRT): Remove.
      * admin/CPP-DEFINES (NO_ABORT): Remove.
      * nt/inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove.
      * src/.gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
      * src/emacs.c (abort) [!DOS_NT && !NO_ABORT]:
      Remove; sysdep.c's emacs_abort now takes its place.
      * src/lisp.h (emacs_abort): New decl.  All calls from Emacs code to
      'abort' changed to use 'emacs_abort'.
      * src/msdos.c (dos_abort) [defined abort]: Remove; not used.
      (abort) [!defined abort]: Rename to ...
      (emacs_abort): ... new name.
      * src/sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
      the place of the old 'abort' in emacs.c.
      * src/w32.c, src/w32fns.c (abort): Do not #undef.
      * src/w32.c (emacs_abort): Rename from w32_abort.
      1088b922
  11. 01 Sep, 2012 1 commit
  12. 18 Aug, 2012 2 commits
    • Paul Eggert's avatar
      * buffer.h (BSET): Remove. · 39eb03f1
      Paul Eggert authored
      Replace all uses with calls to new setter functions.
      (bset_bidi_paragraph_direction, bset_case_canon_table)
      (bset_case_eqv_table, bset_directory, bset_display_count)
      (bset_display_time, bset_downcase_table)
      (bset_enable_multibyte_characters, bset_filename, bset_keymap)
      (bset_last_selected_window, bset_local_var_alist)
      (bset_mark_active, bset_point_before_scroll, bset_read_only)
      (bset_truncate_lines, bset_undo_list, bset_upcase_table)
      (bset_width_table):
      * buffer.c (bset_abbrev_mode, bset_abbrev_table)
      (bset_auto_fill_function, bset_auto_save_file_format)
      (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
      (bset_bidi_display_reordering, bset_buffer_file_coding_system)
      (bset_cache_long_line_scans, bset_case_fold_search)
      (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
      (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
      (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
      (bset_fringe_indicator_alist, bset_fringes_outside_margins)
      (bset_header_line_format, bset_indicate_buffer_boundaries)
      (bset_indicate_empty_lines, bset_invisibility_spec)
      (bset_left_fringe_width, bset_major_mode, bset_mark)
      (bset_minor_modes, bset_mode_line_format, bset_mode_name)
      (bset_name, bset_overwrite_mode, bset_pt_marker)
      (bset_right_fringe_width, bset_save_length)
      (bset_scroll_bar_width, bset_scroll_down_aggressively)
      (bset_scroll_up_aggressively, bset_selective_display)
      (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
      (bset_word_wrap, bset_zv_marker):
      * category.c (bset_category_table):
      * syntax.c (bset_syntax_table):
      New setter functions.
      
      Fixes: debbugs:12215
      39eb03f1
    • Paul Eggert's avatar
      * window.h (WSET): Remove. · e8c17b81
      Paul Eggert authored
      Replace all uses with calls to new setter functions.
      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
      (WINDOW_INLINE): New macro.
      (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
      (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
      (wset_total_lines, wset_vertical_scroll_bar)
      (wset_window_end_pos, wset_window_end_valid)
      (wset_window_end_vpos): New setter functions.
      * window.c (WINDOW_INLINE):
      Define to EXTERN_INLINE, so that the corresponding functions
      are compiled into code.
      (wset_combination_limit, wset_dedicated, wset_display_table)
      (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
      (wset_new_normal, wset_new_total, wset_next_buffers)
      (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
      (wset_prev_buffers, wset_right_fringe_width)
      (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
      (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
      (wset_window_parameters):
      * xdisp.c (wset_base_line_number, wset_base_line_pos)
      (wset_column_number_displayed, wset_region_showing):
      New setter functions.
      
      Fixes: debbugs:12215
      e8c17b81
  13. 17 Aug, 2012 2 commits
    • Paul Eggert's avatar
      * keyboard.h (KSET): Remove. · 15dbb4d6
      Paul Eggert authored
      Replace all uses with calls to new setter functions.
      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
      (KEYBOARD_INLINE): New macro.
      (kset_default_minibuffer_frame, kset_defining_kbd_macro)
      (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
      (kset_prefix_arg, kset_system_key_alist, kset_window_system):
      New setter functions.
      * keyboard.c (KEYBOARD_INLINE):
      Define to EXTERN_INLINE, so that the corresponding functions
      are compiled into code.
      (kset_echo_string, kset_kbd_queue)
      (kset_keyboard_translate_table, kset_last_prefix_arg)
      (kset_last_repeatable_command, kset_local_function_key_map)
      (kset_overriding_terminal_local_map, kset_real_last_command)
      (kset_system_key_syms): New setter functions.
      
      Fixes: debbugs:12215
      15dbb4d6
    • Paul Eggert's avatar
      * frame.h (FSET): Remove (Bug#12215). · f00af5b1
      Paul Eggert authored
      Replace all uses with calls to new setter functions.
      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
      (FRAME_INLINE): New macro.
      (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
      (fset_current_tool_bar_string, fset_desired_tool_bar_string)
      (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
      (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
      (fset_param_alist, fset_root_window, fset_scroll_bars)
      (fset_selected_window, fset_title, fset_tool_bar_items)
      (fset_tool_bar_position, fset_tool_bar_window): New functions.
      * frame.c (FRAME_INLINE):
      Define to EXTERN_INLINE, so that the corresponding functions
      are compiled into code.
      (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
      f00af5b1
  14. 14 Aug, 2012 1 commit
    • Martin Rudalics's avatar
      Don't call Fset_window_buffer from C code. · 08908aca
      Martin Rudalics authored
      * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
      (delete_frame, Fmake_frame_invisible, Ficonify_frame):
      * minibuf.c (choose_minibuf_frame, read_minibuf):
      * w32fns.c (x_create_tip_frame):
      * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
      Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
      08908aca
  15. 13 Aug, 2012 2 commits
  16. 10 Aug, 2012 3 commits
    • Dmitry Antipov's avatar
      Define Qnone once for all platforms. · 9fb0c957
      Dmitry Antipov authored
      * frame.c (Qnone): Define here.
      (syms_of_frame): DEFSYM it.
      * lisp.h (Qnone): New declaration.
      * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
      * xfns.c: Remove duplication.  Adjust users.
      9fb0c957
    • Eli Zaretskii's avatar
      Improve commit in 2012-08-10T06:54:37Z!eliz@gnu.org. · 9b855fd6
      Eli Zaretskii authored
       src/w32fns.c <w32_unicode_gui>: New static variable.
       (globals_of_w32fns): Initialize it according to os_subtype.
       (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
       testing os_subtype.
      9b855fd6
    • Eli Zaretskii's avatar
      Fix bug #10299 with Unicode characters sent on MS-Windows by MSKLC. · d30be705
      Eli Zaretskii authored
       src/w32fns.c (INIT_WINDOW_CLASS): New macro.
       (w32_init_class): Use it to initialize the Emacs class with either
       ANSI or Unicode API calls.
       (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
       later.
       (w32_wnd_proc): If the character code sent by WM_CHAR or
       WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
       original message.  Call DefWindowProcW on NT and later.
      d30be705
  17. 07 Aug, 2012 2 commits
    • Dmitry Antipov's avatar
      Drop WGET and revert read access to Lisp_Objects slots of struct window. · d3d50620
      Dmitry Antipov authored
      * window.h (WGET): Remove.
      (struct window): Do not use INTERNAL_FIELD.
      * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
      * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
      * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
      * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
      * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
      Adjust users.
      d3d50620
    • Dmitry Antipov's avatar
      Drop FGET and revert read access to Lisp_Objects slots of struct frame. · e69b0960
      Dmitry Antipov authored
      * frame.h (FGET): Remove.
      (struct frame): Do not use INTERNAL_FIELD.
      * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
      * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
      * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
      * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
      e69b0960
  18. 06 Aug, 2012 2 commits
    • Dmitry Antipov's avatar
      Separate read and write access to Lisp_Object slots of struct window. · 077288cf
      Dmitry Antipov authored
      * window.h (WGET, WSET): New macros similar to AREF and ASET.
      * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
      * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
      * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
      * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
      * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
      Adjust users.
      077288cf
    • Dmitry Antipov's avatar
      Separate read and write access to Lisp_Object slots of struct frame. · edd74c35
      Dmitry Antipov authored
      * frame.h (FGET, FSET): New macros similar to AREF and ASET.
      * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
      * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
      * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
      * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
      edd74c35
  19. 01 Aug, 2012 1 commit
    • Dmitry Antipov's avatar
      Use INTERNAL_FIELD for windows. · 3a45383a
      Dmitry Antipov authored
      * src/window.h (WVAR): New macro.
      (struct window): Change Lisp_Object members to INTERNAL_FIELD.
      * src/alloc.c, src/buffer.c, src/composite.c, src/dispextern.h:
      * src/dispnew.c, src/editfns.c, src/fileio.c, src/font.c, src/fontset.c:
      * src/frame.c, src/frame.h, src/fringe.c, src/indent.c, src/insdel.c:
      * src/keyboard.c, src/keymap.c, src/lisp.h, src/minibuf.c, src/nsterm.m:
      * src/print.c, src/textprop.c, src/w32fns.c, src/w32menu.c, src/w32term.c:
      * src/window.c, src/xdisp.c, src/xfaces.c, src/xfns.c, src/xmenu.c:
      * src/xterm.c: Users changed.
      * admin/coccinelle/window.cocci: Semantic patch to replace direct
      access to Lisp_Object members of struct window to WVAR.
      3a45383a
  20. 31 Jul, 2012 1 commit
    • Dmitry Antipov's avatar
      Generalize INTERNAL_FIELD between buffers, keyboards and frames. · e34f7f79
      Dmitry Antipov authored
      * src/lisp.h (INTERNAL_FIELD): New macro.
      * src/buffer.h (BUFFER_INTERNAL_FIELD): Removed.
      (BVAR): Change to use INTERNAL_FIELD.
      * src/keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
      (KVAR): Change to use INTERNAL_FIELD.
      * src/frame.h (FVAR): New macro.
      (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
      * src/alloc.c, src/buffer.c, src/data.c, src/dispnew.c, src/dosfns.c
      * src/eval.c, src/frame.c, src/fringe.c, src/gtkutil.c, src/minibuf.c
      * src/nsfns.m, src/nsterm.m, src/print.c, src/term.c, src/w32fns.c
      * src/w32menu.c, src/w32term.c, src/window.c, src/window.h, src/xdisp.c
      * src/xfaces.c, src/xfns.c, src/xmenu.c, src/xterm.c: Users changed.
      * admin/coccinelle/frame.cocci: Semantic patch to replace direct
      access to Lisp_Object members of struct frame to FVAR.
      e34f7f79
  21. 30 Jul, 2012 1 commit
    • Eli Zaretskii's avatar
      Fix bug #12082 with input of Meta-non-ASCII-characters on MS-Windows. · 302fc036
      Eli Zaretskii authored
       src/w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
       w32_kbd_patch_key as the 2nd arg.
       src/w32term.c <w32_keyboard_codepage>: Renamed from
       keyboard_codepage and now external.  All users changed.
       src/w32term.h: Add declaration of w32_keyboard_codepage.
       src/w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
       the codepage to translate keys to Unicode.  If this argument is
       -1, use the value returned by GetConsoleCP.  All callers changed.
      302fc036
  22. 29 Jul, 2012 1 commit
    • Paul Eggert's avatar
      Don't use the abbreviation "win" to refer to Windows (Bug#10421). · b46a6a83
      Paul Eggert authored
      * lisp/org/ob-lilypond.el (ly-w32-ly-path): Rename from ly-win32-ly-path.
      (ly-w32-pdf-path): Rename from ly-win32-pdf-path.
      (ly-w32-midi-path): Rename from ly-win32-midi-path.
      (ly-determine-ly-path, ly-determine-pdf-path, ly-determine-midi-path):
      Check for "windows-nt", not "win32", in system-type.
      * src/regex.c (MAX_BUF_SIZE): Remove some incorrect and
      long-ago-commented-out code that talks about "WIN32".
      * src/w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
      All uses changed.
      b46a6a83
  23. 27 Jul, 2012 3 commits
    • Eli Zaretskii's avatar
      Fix failure to compile on Windows due to 2012-07-27T06:04:35Z!dmantipov@yandex.ru. · 3438fe21
      Eli Zaretskii authored
       src/lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
       enumeration constants, as PURE and HEAP are too general, and clash
       with other headers and sources, such as gmalloc.c and the
       MS-Windows system headers.  All users changed.
      3438fe21
    • Dmitry Antipov's avatar
      Fix recently-introduced typos in Windows port. · 073c88c2
      Dmitry Antipov authored
      Reported by Martin Rudalics <rudalics@gmx.at>.
      * w32.c (init_environment): Replace comma with semicolon.
      * w32fns.c (syms_of_w32fns): Likewise.
      073c88c2
    • Dmitry Antipov's avatar
      Utility function to make a list from specified amount of objects. · 694b6c97
      Dmitry Antipov authored
      * lisp.h (enum constype): New datatype.
      (listn): New prototype.
      * alloc.c (listn): New function.
      (Fmemory_use_count, syms_of_alloc): Use it.
      * buffer.c (syms_of_buffer): Likewise.
      * callint.c (syms_of_callint): Likewise.
      * charset.c (define_charset_internal): Likewise.
      * coding.c (syms_of_coding): Likewise.
      * keymap.c (syms_of_keymap): Likewise.
      * search.c (syms_of_search): Likewise.
      * syntax.c (syms_of_syntax): Likewise.
      * w32.c (init_environment): Likewise.
      * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
      * xdisp.c (syms_of_xdisp): Likewise.
      * xfns.c (syms_of_xfns): Likewise.
      694b6c97
  24. 20 Jul, 2012 1 commit
    • Dmitry Antipov's avatar
      Simple wrapper for make_unibyte_string, adjust font_open_by_name. · d7ea76b4
      Dmitry Antipov authored
      * src/lisp.h (build_unibyte_string): New function.
      * src/dosfns.c, src/fileio.c, src/fns.c, src/ftfont.c, src/process.c:
      * src/sysdep.c, src/w32fns.c, src/xfns.c: Use it.
      * src/font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
      of type Lisp_Object to avoid redundant calls to make_unibyte_string.
      Adjust users accordingly.
      * src/font.h (font_open_by_name): Adjust prototype.
      * admin/coccinelle/unibyte_string.cocci: Semantic patch to convert from
      make_unibyte_string to build_unibyte_string where appropriate.
      d7ea76b4