1. 15 Jun, 2013 2 commits
  2. 13 Jun, 2013 2 commits
  3. 12 Jun, 2013 1 commit
  4. 11 Jun, 2013 3 commits
    • Paul Eggert's avatar
      Tickle glib by waiting for Emacs itself, not for process 0. · f7394b12
      Paul Eggert authored
      * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
      Wait for self, not for 0.  This can't hurt on GNU or similar
      system, and may help with Cygwin.
      
      Fixes: debbugs:14569
      f7394b12
    • Juanma Barranquero's avatar
      Fix typos. · fa6bc6fd
      Juanma Barranquero authored
      * lisp/replace.el (query-replace, occur-read-regexp-defaults-function)
        (replace-search):
      * lisp/subr.el (declare-function, number-sequence, local-set-key)
        (substitute-key-definition, locate-user-emacs-file)
        (with-silent-modifications, split-string, eval-after-load):
        Fix typos, remove unneeded backslashes and reflow some docstrings.
      fa6bc6fd
    • Paul Eggert's avatar
      * keyboard.c: Don't use PROP (...) as an lvalue. · 05e3e412
      Paul Eggert authored
      (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
      Use set_prop (A, B), not PROP (A) = B.
      05e3e412
  5. 10 Jun, 2013 2 commits
  6. 09 Jun, 2013 2 commits
  7. 08 Jun, 2013 3 commits
    • Eli Zaretskii's avatar
      Fix bug #14575 with window-specific overlays with display props. · 5bf97bfc
      Eli Zaretskii authored
       src/bidi.c (bidi_fetch_char): Accept additional argument, the window
       being displayed, and pass it to compute_display_string_pos.
       (bidi_level_of_next_char, bidi_resolve_explicit_1)
       (bidi_paragraph_init): All callers changed.
       src/xdisp.c (init_from_display_pos, init_iterator)
       (handle_single_display_spec, next_overlay_string)
       (get_overlay_strings_1, reseat_1, reseat_to_string)
       (push_prefix_prop, Fcurrent_bidi_paragraph_direction): Set
       bidi_it.w member from it->w.
       (compute_display_string_pos): Accept additional argument, the
       window being displayed, and pass it to Fget_char_property.
       src/dispextern.h (struct bidi_it): New member w, the window being
       displayed.
       (compute_display_string_pos): Adjust prototype.
      5bf97bfc
    • Jan Djärv's avatar
      Fix compilation issues for GNUStep and GLIB conflicts. · b33f93ee
      Jan Djärv authored
      * configure.ac (HAVE_GLIB): Only set XGSELOBJ if HAVE_NS = no.
      (with_file_notification): Don't set to gfile if with_ns = yes.
      
      * src/process.c (wait_reading_process_output): Check for NS before GLIB.
      GLIB may be linked in due to rsvg, but ns_select must be called.
      
      * src/xgselect.c (xg_select): Remove call to window_system_available
      and g_main_context_pending at the top, so Gdk events (i.e. file
      notify) are processed when Emacs is started with -nw.
      
      * src/xgselect.c: Remove unneeded include xterm.h
      b33f93ee
    • Jan Djärv's avatar
      * xgselect.c (xg_select): Remove call to window_system_available · 5de0e011
      Jan Djärv authored
      and g_main_context_pending at the top, so Gdk events (i.e. file
      notify) are processed when Emacs is started with -nw.
      5de0e011
  8. 07 Jun, 2013 3 commits
    • Eli Zaretskii's avatar
      Fix "make TAGS" on MS-Windows. · a822acff
      Eli Zaretskii authored
       lisp/Makefile.in (TAGS TAGS-LISP): Pass the (long) list of *.el files
       through xargs, to avoid failure due to MS-Windows limitations on
       command-line length.
      
       src/Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
       (ctagsfiles3): New variable, includes only *.m files.
       (TAGS): Use an explicit language name in the regular expressions,
       to avoid transformation of '/SOMETHING' by MSYS to
       'c:\MSYS\SOMETHING'.
      a822acff
    • Richard Copley's avatar
      Fix bug #14513 with --enable-locallisppath not working on MS-Windows. · 6c0a9ed1
      Richard Copley authored
       Makefile.in (msys_to_w32): Modify to support d:\foo file names.
       (msys_lisppath_to_w32, msys_prefix_subst, msys_sed_sh_escape): New
       variables.
       (epaths-force-w32): Use them.
      
       epaths.nt (PATH_SITELOADSEARCH): Fix commentary.
      
       epaths.in: Fix commentary to PATH_SITELOADSEARCH.
      6c0a9ed1
    • Juanma Barranquero's avatar
      Fix typos. · a0eb10b3
      Juanma Barranquero authored
      a0eb10b3
  9. 06 Jun, 2013 2 commits
    • Eli Zaretskii's avatar
      Improve the fix for bug #14558. · 9ef6111b
      Eli Zaretskii authored
       src/xdisp.c (note_mouse_highlight): When mouse-highlight is off,
       still need to set the mouse pointer shape and activate help-echo.
      9ef6111b
    • Paul Eggert's avatar
      A few porting etc. fixes for the new file monitor code. · 7d300d64
      Paul Eggert authored
      See the thread containing
      <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
      * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
      (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
      (dir_monitor_callback, Fgfile_rm_watch):
      Use assq_no_quit instead of Fassoc, for speed.
      (dir_monitor_callback, Fgfile_rm_watch):
      eassert that the monitor is a fixnum.
      (dir_monitor_callback): No need for CDR_SAFE.
      Simplify building of lisp with alternative tails.
      (Fgfile_add_watch, Fgfile_rm_watch):
      Do not assume glib functions set errno reliably on failure.
      (Fgfile_add_watch): Check that the monitor survives the XIL trick,
      and signal an error otherwise.
      (Fgfile_rm_watch): Prefer CONSP to !NILP.
      Use Fdelq instead of Fdelete, for speed.
      7d300d64
  10. 05 Jun, 2013 5 commits
    • Eli Zaretskii's avatar
      Fix bug #14558 with turning off mouse-highlight during highlight. · 817ebfcf
      Eli Zaretskii authored
       src/xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
       don't insist on being invoked on a highlighted tool-bar button.
       Avoids losing tool-bar functionality when mouse-highlight is nil.
       (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
       Don't highlight when mouse-highlight is nil.
       (note_mouse_highlight): When mouse-highlight is nil, don't return
       right away; instead, run tool-bar and mode-line highlight
       subroutine, clear any existing highlight, and revert the mouse
       pointer to its default shape.
      817ebfcf
    • Stefan Monnier's avatar
      * lisp/simple.el: Move all the prog-mode code to prog-mode.el. · 55577e7c
      Stefan Monnier authored
      * lisp/progmodes/prog-mode.el: New file.
      * lisp/loadup.el:
      * src/lisp.mk (lisp): Add prog-mode.el.
      55577e7c
    • Paul Eggert's avatar
      Chain glib's SIGCHLD handler from Emacs's (Bug#14474). · f019a684
      Paul Eggert authored
      * process.c (dummy_handler): New function.
      (lib_child_handler): New static var.
      (handle_child_signal): Invoke it.
      (catch_child_signal): If a library has set up a signal handler,
      save it into lib_child_handler.
      (init_process_emacs): If using glib and not on Windows, tickle glib's
      child-handling code so that it initializes its private SIGCHLD handler.
      * syssignal.h (SA_SIGINFO): Default to 0.
      * xterm.c (x_term_init): Remove D-bus hack that I installed on May
      31; it should no longer be needed now.
      f019a684
    • Michael Albinus's avatar
      * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify. · 90db8702
      Michael Albinus authored
      * gfilenotify.c (globals_of_gfilenotify): New function.
      (syms_of_gfilenotify): Move global initialization there.
      
      * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
      90db8702
    • Stefan Monnier's avatar
      * src/keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings): · bfa3acd6
      Stefan Monnier authored
      * src/keyboard.c (menu_bar_items, tool_bar_items):
      * src/doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
      not override local keymaps any more.
      bfa3acd6
  11. 04 Jun, 2013 1 commit
  12. 03 Jun, 2013 8 commits
    • Eli Zaretskii's avatar
      Fix crashes in a text-mode session on Windows. · 9337e206
      Eli Zaretskii authored
       src/w32console.c (initialize_w32_display): Return the dimensions of
       the console window via 2 additional arguments, not via the current
       frame.  This avoids crashes due to overrunning the bounds of
       frame's decode_mode_spec_buffer, which is not resized following
       the change of the frame dimensions from the initial 10x10.
       src/w32term.h (w32_initialize_display_info): Adjust prototype.
       src/term.c (init_tty): Take dimensions of the frame from the values
       returned by initialize_w32_display.
      9337e206
    • Eli Zaretskii's avatar
      * configure.ac (HAVE_GFILENOTIFY): Do not change $LIBS. · 7f203aa1
      Eli Zaretskii authored
      (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): Substitute.
      
      * nt/config.nt: Add HAVE_GFILENOTIFY, HAVE_W32NOTIFY and USE_FILE_NOTIFY.
      
      * src/Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
      (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
      (LIBES): Add $(GFILENOTIFY_LIBS).
      
      * src/w32inevt.c (handle_file_notifications): Add dummy implementation
      for !HAVE_W32NOTIFY.
      
      * src/w32term.c: Wrap code with HAVE_W32NOTIFY.
      7f203aa1
    • Jan Djärv's avatar
      Add HAVE_GLIB check instead of checking individual libraries that use GLib. · 55a87246
      Jan Djärv authored
      * configure.ac (HAVE_GLIB): Add GLib check.  Set XGSELOBJ if GLib is
      used.  Remove xgselect.o from XOBJ.
      
      * src/Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
      
      * src/process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
      
      * src/xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
      55a87246
    • Paul Eggert's avatar
      Fix minor problems found by static checking. · 3d5ee10a
      Paul Eggert authored
      * data.c (pure_write_error):
      Use xsignal2, not Fsignal, as Fsignal might return.
      * eval.c (set_backtrace_debug_on_exit): Now static.
      (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
      No longer inline.  EXTERN_INLINE is needed only for functions
      defined in .h files.  Reindent function header as per GNU style.
      (backtrace_p, backtrace_top, backtrace_next):
      Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
      compiler or linker.  Add extern decls to pacify gcc -Wall.
      * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
      Now static.
      * frame.c (free_monitors): Define only on platforms that need it.
      * nsterm.m (ns_term_init):
      * process.c (catch_child_signal):
      Don't worry about whether SIGCHLD is defined, as SIGCHLD is
      defined on all porting targets these days.
      * process.c, process.h (catch_child_signal):
      Make it extern only if NS_IMPL_GNUSTEP is defined.
      3d5ee10a
    • Eli Zaretskii's avatar
      Attempt to resolve gettimeofday compilation errors with MinGW64. · e2d8a6f0
      Eli Zaretskii authored
       src/w32.c (gettimeofday): Make the signature identical to prototype
       in nt/inc/sys/time.h.
      
       nt/inc/sys/time.h (struct timeval): Remove the _W64 guards.
      e2d8a6f0
    • Stefan Monnier's avatar
      * src/eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to · a8a7c5f6
      Stefan Monnier authored
      .gdbinit.
      * src/data.c (pure_write_error): Add `object' argument.
      * src/puresize.h (CHECK_IMPURE): Use it.
      * src/keyboard.c (safe_run_hooks_error): Improve error message.
      a8a7c5f6
    • Michael Albinus's avatar
      * configure.ac (file-notification): New option, replaces inotify option. · c9628c79
      Michael Albinus authored
      (HAVE_W32): Remove w32notify.o.
      (with_file_notification): Add checks for glib and w32. Adapt check
      for inotify.
      (Summary): Add entry for file notification.
      
      * autogen/config.in: Add entries for HAVE_GFILENOTIFY,
      HAVE_W32NOTIFY and USE_FILE_NOTIFY.
      
      * lisp/autorevert.el (auto-revert-notify-enabled)
      (auto-revert-notify-rm-watch, auto-revert-notify-add-watch)
      (auto-revert-notify-event-p, auto-revert-notify-event-file-name)
      (auto-revert-notify-handler): Handle also gfilenotify.
      
      * lisp/subr.el: (file-notify-handle-event): New defun. Replacing ...
      (inotify-event-p, inotify-handle-event, w32notify-handle-event):
      Removed.
      
      * src/Makefile.in (NOTIFY_OBJ): New variable.
      (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
      
      * src/emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
      Call syms_of_gfilenotify.
      
      * src/gfilenotify.c: New file.
      
      * src/keyboard.c (Qfile_notify): New variable.  Replaces Qfile_inotify
      and Qfile_w32notify.
      (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
      HAVE_W32NOTIFY and USE_FILE_NOTIFY.
      
      * src/lisp.h: Declare syms_of_gfilenotify.
      
      * src/termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
      c9628c79
    • Stefan Monnier's avatar
      Merge the specpdl and backtrace stacks. Make the structure of the · 2f592f95
      Stefan Monnier authored
      specpdl entries more obvious via a tagged union of structs.
      * src/lisp.h (BITS_PER_PTRDIFF_T): New constant.
      (enum specbind_tag): New enum.
      (struct specbinding): Make it a tagged union of structs.
      Add a case for backtrace records.
      (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
      (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
      (backtrace_debug_on_exit): New accessors.
      (struct backtrace): Remove.
      (struct catchtag): Remove backlist field.
      * src/data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
      Move to eval.c.
      (Flocal_variable_p): Speed up the common case where the binding is
      already loaded.
      * src/eval.c (backtrace_list): Remove.
      (set_specpdl_symbol, set_specpdl_old_value): Remove.
      (set_backtrace_args, set_backtrace_nargs)
      (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
      (backtrace_next): New functions.
      (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
      (unwind_to_catch, internal_lisp_condition_case)
      (internal_condition_case, internal_condition_case_1)
      (internal_condition_case_2, internal_condition_case_n): Don't bother
      with backtrace_list any more.
      (Fsignal): Adjust to new backtrace format.
      (grow_specpdl): Move up.
      (record_in_backtrace): New function.
      (eval_sub, Ffuncall): Use it.
      (apply_lambda): Adjust to new backtrace format.
      (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
      data.c.
      (specbind): Adjust to new specpdl format.  Simplify.
      (record_unwind_protect, unbind_to): Adjust to new specpdl format.
      (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
      backtrace format.
      (mark_backtrace): Remove.
      (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
      * src/xdisp.c (redisplay_internal): Use record_in_backtrace.
      * src/alloc.c (Fgarbage_collect): Use record_in_backtrace.
      Use mark_specpdl.
      * src/profiler.c (record_backtrace): Use get_backtrace.
      (handle_profiler_signal): Use backtrace_top_function.
      * src/.gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
      accessor functions.
      2f592f95
  13. 02 Jun, 2013 2 commits
    • Jan Djärv's avatar
      Update the GNUStep port so it works OK. Redraw and sizing bugs remain. · c0342369
      Jan Djärv authored
      * nextstep/templates/Info-gnustep.plist.in: Add NSDocumentClass EmacsDocument.
      
      * src/nsfns.m (x_set_foreground_color, x_set_background_color): Use
      EmacsCGFloat.
      (ns_implicitly_set_icon_type, Fx_create_frame): Make static, remove
      unused variables.
      (Fns_read_file_name): Keep track if panel is for save.  Use
      ns_filename_from_panel/ns_directory_from_panel.
      (Fns_list_services): delegate only used for COCOA.
      (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUStep.  Just
      return the input if GNUStep.
      (x_screen_planes): Remove.
      (Fxw_color_values): Use EmacsCGFloat
      (Fns_display_monitor_attributes_list): Only get screen number for
      Cocoa.
      (getDirectory, getFilename): Removed from EmacsOpenPanel and
      EmacsSavePanel.
      (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
      ns_directory_from_panel.
      
      * src/nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
      (ns_charset_covers, ns_get_covering_families, nsfont_open):
      Use F suffix on floats.
      (ns_char_width): Returns CGFloat.
      (ns_ascii_average_width): w is CGFloat instead of float.
      (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
      DPSxshow.
      (ns_glyph_metrics): CGFloat instead of float.
      
      * src/nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
      
      * src/nsmenu.m (ns_update_menubar): Make static.
      (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
      (fillWithWidgetValue:): Add cast to SEL for setAction.
      (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
      (update_frame_tool_bar): Update code for GNUStep.
      (clearAll): New method.
      (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
      argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP. Move
      identifierToItem setObject and activeIdentifiers addObject before
      call to insertItemWithItemIdentifier.
      (validateVisibleItems): Fix indentation.
      (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
      (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
      UtilityWindow to aStyle, remove call to setStyleMask.
      
      * src/nsselect.m (ns_get_local_selection): Remove unused variable type.
      
      * src/nsterm.h (EmacsCGFloat): Typedef for OSX and GNUStep when the size
      of CGFloat differs.
      (EmacsApp): New variable nextappdefined.  Declare sendFromMainThread
      when NS_IMPL_GNUSTEP.
      (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
      (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
      (EmacsToolbar): Add clearAll.  Add tag argument to
      addDisplayItemWithImage.
      (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
      
      * src/nsterm.m: Include src/process.h if NS_IMPL_GNUSTEP.
      (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
      NS_IMPL_COCOA.
      (x_set_cursor_type): Remove declaration.
      (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
      (ns_update_end, ns_focus, ns_unfocus): Remove GNUStep specific code.
      (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
      (ns_get_color): Use F suffix on float.
      (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
      (ns_get_rgb_color): Remove.
      (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
      (note_mouse_movement): x and y are CGFloat.
      (ns_draw_fringe_bitmap): Remove unused rowY.
      Change #if to COCOA && >= 10_6.
      (ns_draw_window_cursor): Remove unused overspill.
      (ns_draw_underwave): width and x are EamcsCGFloat.
      (ns_draw_box): thickness is CGFloat.
      (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
      (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
      if not in main thread.
      (ns_get_pending_menu_title, ns_check_menu_open)
      (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
      (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
      (sendFromMainThread:): New method.
      (changeFont:): size is CGFloat.
      (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
      Disable warning about permanent text.
      (characterIndexForPoint:): Adjust return type depending on GNUStep
      version.
      (mouseDown:): delta is CGFloat.
      (updateFrameSize): Remove unised variable f.
      (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
      Cast float to EmacsCGFloat.
      (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
      also to -1 when restoring.
      (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
      inside NS_IMPL_COCOA.
      (toggleFullScreen:): Put call to toggleFullScreen inside
      NS_IMPL_COCOA.  Cast float to EmacsCGFloat.
      (setPosition:portion:whole:): por is CGFloat.
      (getMouseMotionPart:window:x:y:): Add F suffix to float.
      (mouseDown:): Use CGFloat.
      (mouseDragged:): Remove unised variable edge.
      (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
      
      * src/process.c (catch_child_signal): New function.
      (init_process_emacs): Call it.
      
      * src/process.h (catch_child_signal): Declare.
      c0342369
    • Juanma Barranquero's avatar
      8a621d53
  14. 01 Jun, 2013 1 commit
  15. 31 May, 2013 2 commits
  16. 29 May, 2013 1 commit