1. 16 Jan, 2015 4 commits
  2. 15 Jan, 2015 7 commits
  3. 14 Jan, 2015 11 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/cl-generic.el: New file. · 9def17e9
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-macs.el (cl-flet): Allow (FUN EXP) forms.
      (cl-load-time-value, cl-labels): Use closures rather than
      backquoted lambdas.
      (cl-macrolet): Use `eval' to create the function value, and support CL
      style arguments in for the defined macros.
      * test/automated/cl-generic-tests.el: New file.
      9def17e9
    • Eli Zaretskii's avatar
      Fix crashes on MS-Windows due to pop-up menus (Bug#19596) · e7db8e8d
      Eli Zaretskii authored
       src/w32fns.c (w32_wnd_proc): Ignore MENUITEMINFO's dwItemData data
       when FLAGS indicate the item is not highlighted, i.e. it's not our
       help-echo string.
      e7db8e8d
    • Martin Rudalics's avatar
      In update_frame_menubar remove garbaged code. · 9602b625
      Martin Rudalics authored
      * xmenu.c (update_frame_menubar): Remove garbaged code.
      9602b625
    • Stefan Monnier's avatar
      * lisp/net/eww.el: Use lexical-binding. · 81882be7
      Stefan Monnier authored
      (eww-links-at-point): Remove unused arg.
      (eww-mode-map): Inherit from special-mode-map.
      (eww-mode): Derive from special-mode.  Don't use `setq' on a hook.
      81882be7
    • Dmitry Antipov's avatar
      Never move gap in make_buffer_string_both. · 009836b9
      Dmitry Antipov authored
      * editfns.c (make_buffer_string_both): If requested range intersects
      the gap, don't move the latter but copy in two regions, thus avoiding
      unnecessary relocation of buffer data.
      009836b9
    • Dmitry Antipov's avatar
      Fix last time zone handling change. · 99a1492b
      Dmitry Antipov authored
      * editfns.c (decode_time_zone): Return Lisp string instead.
      All related users changed.
      99a1492b
    • Dmitry Antipov's avatar
      Consistently handle time zone specification. · da396beb
      Dmitry Antipov authored
      * editfns.c (decode_time_zone): New function, refactored out from ...
      (Fencode_time): ... adjusted user.
      (Fset_time_zone_rule): Use decode_time_zone.
      da396beb
    • Paul Eggert's avatar
      remove_slash_colon need not be inline · d4b352af
      Paul Eggert authored
      * process.c, process.h (remove_slash_colon): No longer inline.
      This saves text bytes without hurting runtime performance.
      d4b352af
    • Dmitry Antipov's avatar
      Consolidate common path transformation code. · d7e26b44
      Dmitry Antipov authored
      * process.h (remove_slash_colon): New function.
      * callproc.c (encode_current_directory, call_process):
      * process.c (Fstart_process): Use it.
      d7e26b44
    • Dmitry Antipov's avatar
      Avoid extra multibyteness check in ENCODE_FILE users. · 01ebf7a3
      Dmitry Antipov authored
      * callproc.c (encode_current_directory, Fcall_process, call_process):
      * dired.c (directory_files_internal, file_name_completion):
      Do not check for STRING_MULTIBYTE because encode_file_name
      is a no-op for unibyte strings.
      01ebf7a3
    • Paul Eggert's avatar
      Use bool for boolean in xmenu.c, xml.c · 3ef29501
      Paul Eggert authored
      * xmenu.c (x_menu_set_in_use, popup_get_selection)
      (Fx_menu_bar_open_internal, popup_widget_loop)
      (x_activate_menubar, xg_crazy_callback_abort)
      (update_frame_menubar, set_frame_menubar)
      (initialize_frame_menubar, free_frame_menubar)
      (create_and_show_popup_menu, x_menu_show)
      (create_and_show_dialog, x_dialog_show):
      * xml.c (libxml2_loaded_p, init_libxml2_functions, parse_region)
      (Flibxml_parse_html_region, Flibxml_parse_xml_region):
      * xrdb.c (main) [TESTRM]:
      * xsettings.c (init_gsettings):
      * xterm.c (XFillRectangle, xg_scroll_callback)
      (xg_end_scroll_callback):
      * xterm.h (x_menu_set_in_use) [USE_GTK || USE_MOTIF]:
      Use bool for boolean.
      * xmenu.c (TRUE): Remove; no longer used.
      (show_help_event): Remove long-unused code.
      (set_frame_menubar): Remove "#if 1" and corresponding "#endif" lines.
      3ef29501
  4. 13 Jan, 2015 10 commits
    • Paul Eggert's avatar
      Don't say Fnext_read_file_uses_dialog_p is const · 785adfcc
      Paul Eggert authored
      It's const only if a windowing system is not used; don't say it's
      const otherwise.  See:
      http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00310.html
      * lib-src/make-docfile.c (write_globals):
      Add a special hack for Fnext_read_file_uses_dialog_p.
      * src/fileio.c (next_read_file_uses_dialog_p): Remove.
      Move guts back to ...
      (Fnext_read_file_uses_dialog_p): ... here.
      Don't declare as const, as make-docfile.c now has a special case
      for this function.  This is an ugly hack, but it's better than
      lying to the compiler.
      785adfcc
    • Paul Eggert's avatar
      Remove now-unnecessary forward XTYPE decl · 56478476
      Paul Eggert authored
      * lisp.h (XTYPE): Remove forward declaration.  The recent merge
      from emacs-24 fixed the problem in a better way, by moving XPNTR's
      definition to after XTYPE's.
      56478476
    • Eli Zaretskii's avatar
      Fix problems with 32-bit wide-int build exposed by MinGW · 5aa618b0
      Eli Zaretskii authored
       lisp.h (XPNTR): Move definition to after XTYPE, to avoid
       compilation error in an unoptimized build when !USE_LSB_TAG.
       src/w32heap.c (DUMPED_HEAP_SIZE): For 32-bit wide-int build, use the
       same larger value as for the 64-bit build.
       src/w32term.h (SCROLL_BAR_PACK): Cast the result to UINT_PTR to
       avoid compiler warnings.
       src/w32proc.c (Fw32_get_codepage_charset, Fw32_set_keyboard_layout):
       Avoid compiler warnings about cast from integer to pointer of
       different size.
       src/w32menu.c (menubar_selection_callback, w32_menu_show): Cast to
       UINT_PTR instead of EMACS_INT, to avoid compiler warnings about
       casting from integer to pointer of different size.
       (add_menu_item): Pass the help-echo string as a pointer to
       Lisp_String, not as a Lisp_Object.
       (w32_menu_display_help): Use make_lisp_ptr to reconstruct a Lisp
       string object from its C pointer.
       src/w32fns.c (w32_msg_pump) <WM_EMACS_UNREGISTER_HOT_KEY>: Use
       make_lisp_ptr instead of XIL, to reconstruct a Lisp_Cons from its
       C pointer.
       <WM_EMACS_TOGGLE_LOCK_KEY>: msg.lparam is now a C integer.
       (Fx_create_frame): Type-cast the result of XFASTINT to avoild
       compiler warnings about size differences.
       (Fw32_unregister_hot_key): Pass the tail of w32_grabbed_keys as a
       pointer to a Lisp_Cons struct, not as a disguised EMACS_INT.
       (Fw32_toggle_lock_key): Pass the new state of the key as a C
       integer; use -1 for nil.  Doc fix.
       src/.gdbinit (xgetsym): New subroutine.
       (xsymname, xsymbol): Use it.
       (xprintsym): No need to call xgetptr.
      5aa618b0
    • Alan Mackenzie's avatar
      Allow compilation during loading of Modes derived from a CC Mode mode. · 30c5f5cd
      Alan Mackenzie authored
      Fixes debbugs#19206.
      
      cc-bytecomp.el (cc-bytecomp-compiling-or-loading): new function which
      walks the stack to discover whether we're compiling or loading.
      (cc-bytecomp-is-compiling): Reformulate, and move towards beginning.
      (cc-bytecomp-is-loading): New defsubst.
      (cc-bytecomp-setup-environment, cc-bytecomp-restore-environment): Use
      the
      above defsubsts.
      (cc-require-when-compile, cc-bytecomp-defvar)
      (cc-bytecomp-defun): Simplify conditionals.
      
      cc-defs.el (cc-bytecomp-compiling-or-loading): "Borrow" this function
      from cc-bytecomp.el.
      (c-get-current-file): Reformulate using the above.
      (c-lang-defconst): Prevent duplicate entries of file names in a symbol's
      'source property.
      (c-lang-const): Use cc-bytecomp-is-compiling.
      
      cc-langs.el (c-make-init-lang-vars-fun): Use cc-bytecomp-is-compiling.
      30c5f5cd
    • Stefan Monnier's avatar
      Fixes: debbugs:19552 · c3024739
      Stefan Monnier authored
      * lisp/emacs-lisp/eieio-core.el (eieio-defclass): Fix call to `defclass'.
      c3024739
    • Dmitry Antipov's avatar
      Make Fnext_read_file_uses_dialog_p compatible with recent DEFUN change. · 0064e36f
      Dmitry Antipov authored
      * fileio.c (next_read_file_uses_dialog_p): New workaround ...
      (Fnext_read_file_uses_dialog_p): ... called from here to avoid
      ATTRIBUTE_CONST dependency from #ifdefs.  For details, see
      http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00289.html.
      0064e36f
    • Martin Rudalics's avatar
      In adjust_frame_size don't return too early after font size change. · 233dcf12
      Martin Rudalics authored
      * frame.c (adjust_frame_size): Make sure new numbers of
      lines/columns get installed after font size change (Bug#19575).
      233dcf12
    • Dmitry Antipov's avatar
      Consolidate duplicated string matching code. · b53b1ca4
      Dmitry Antipov authored
      * search.c (fast_string_match_internal): New function,
      consolidated from...
      (fast_string_match, fast_string_match_ignore_case): ...functions
      which are...
      * lisp.h (fast_string_match, fast_string_match_ignore_case):
      inlined from here now.
      (fast_string_match_internal): Add prototype.
      * dired.c (file_name_completion): Use fast_string_match_internal.
      b53b1ca4
    • Dmitry Antipov's avatar
      Support const and noreturn DEFUN attributes. · ad9c4a40
      Dmitry Antipov authored
      * lib-src/make-docfile.c (struct global): New field 'flags'.
      (DEFUN_noreturn, DEFUN_const): New enum bitfields.
      (add_global): Now return pointer to global.
      (write_globals): Add _Noreturn and ATTRIBUTE_CONST attributes
      if requested by global's flags.
      (stream_match): New function.
      (scan_c_stream): Recognize 'attributes:' of DEFUN.
      
      * src/callint.c (Finteractive):
      * src/character.c (Fcharacterp, Fmax_char):
      * src.data.c (Feq, Fnull, Fconsp, Fatom, Flistp, Fnlistp, Fsymbolp)
      (Fstringp, Fchar_or_string_p, Fintegerp, Fnatnump, Fnumberp)
      (Ffloatp, Fbyteorder):
      * src/decompress.c (Fzlib_available_p):
      * src/fns.c (Fidentity):
      * src/frame.c (Fframe_windows_min_size):
      * src/gnutls.c (Fgnutls_error_p, Fgnutls_available_p):
      * src/window.c (Fwindow__sanitize_window_sizes):
      * src/xdisp.c (Ftool_bar_height):
      * src/xfaces.c (Fface_attribute_relative_p): Add const attribute.
      * src/emacs.c (Fkill_emacs):
      * src/eval.c (Fthrow):
      * src/keyboard.c (Ftop_level, Fexit_recursive_edit)
      (Fabor_recursive_edit): Add noreturn attribute.
      ad9c4a40
    • Dmitry Gutov's avatar
      Don't eagerly load xref · 329b9021
      Dmitry Gutov authored
      Fixes: debbugs:19554
      
      * lisp/menu-bar.el (menu-bar-goto-menu): Before calling
      `xref-marker-stack-empty-p', first check that `xref' is loaded.
      329b9021
  5. 12 Jan, 2015 6 commits
    • Paul Eggert's avatar
      Port to 32-bit MingGW --with-wide-int · 52afe0cf
      Paul Eggert authored
      Problem reported by Eli Zaretskii in:
      http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00265.html
      * lisp.h (struct Lisp_Sub_Char_Table): Check that offset matches
      what we think it is, rather than checking only its alignment (and
      doing so incorrectly on MinGW).
      52afe0cf
    • Martin Rudalics's avatar
      Add autoload cookie for xref-marker-stack-empty-p (Bug#19554). · cc59a3e5
      Martin Rudalics authored
      * progmodes/xref.el (xref-marker-stack-empty-p): Add autoload
      cookie (Bug#19554).
      cc59a3e5
    • Dmitry Antipov's avatar
      Miscellaneous tiny fixes here and there. · e946a9ac
      Dmitry Antipov authored
      * fileio.c (Ffile_name_as_directory, Fdirectory_file_name):
      Remove dead NILP check.
      * image.c (Flookup_image): Use regular format for docstring.
      * keyboard.c (apply_modifiers_uncached): Use stpcpy.
      e946a9ac
    • Martin Rudalics's avatar
      Adjust frame heights to real height of tool bar. · fb35f1f7
      Martin Rudalics authored
      * frame.el (frame-notice-user-settings): Remove code dealing with
      frame-initial-frame-tool-bar-height.  Turn off `tool-bar-mode'
      only if `window-system-frame-alist' or `default-frame-alist' ask
      for it.
      (make-frame): Update frame-adjust-size-history if needed.
      * dispnew.c (change_frame_size_1): Pass Qchange_frame_size to
      adjust_frame_size.
      * frame.c (frame_default_tool_bar_height): New variable.
      (adjust_frame_size): Possibly add requested adjustment to
      Vframe_adjust_size_history.
      (make_frame): Initialize tool_bar_redisplayed_once slot.
      (Fset_frame_height, Fset_frame_width, Fset_frame_size): Clarify
      doc-string.  Call adjust_frame_size unconditionally (the frame's
      text size may remain unaltered but the pixel size may change).
      (x_figure_window_size): If frame_default_tool_bar_height was
      set, use it instead of calculating the tool bar height from
      DEFAULT_TOOL_BAR_IMAGE_HEIGHT.  Don't set
      Vframe_initial_frame_tool_bar_height.
      (Qchange_frame_size, Qxg_frame_set_char_size)
      (Qset_window_configuration, Qx_create_frame_1)
      (Qx_create_frame_2): New symbols.
      (Vframe_initial_frame_tool_bar_height): Remove.
      (Vframe_adjust_size_history): New history variable for debugging
      frame size adjustments.
      * frame.h (struct frame): New boolean slot
      tool_bar_redisplayed_once.
      (frame_default_tool_bar_height): Extern.
      * gtkutil.c (xg_frame_set_char_size): Pass Qxg_frame_set_char_size
      to adjust_frame_size.
      * nsfns.m (Fx_create_frame): Pass Pass Qx_create_frame_1 and
      Qx_create_frame_2 to adjust_frame_size.
      * w32fns.c (x_change_tool_bar_height): Call adjust_frame_size with
      inhibit 1 when we have not redisplayed the tool bar yet.
      (Fx_create_frame): Pass Pass Qx_create_frame_1 and
      Qx_create_frame_2 to adjust_frame_size.
      * w32menu.c (set_frame_menubar): Simplify adjust_frame_size
      call.
      * window.c (Fset_window_configuration): Pass
      Qset_window_configuration to adjust_frame_size.
      * xdisp.c (redisplay_tool_bar): Assign new height to
      frame_default_tool_bar_height.
      (redisplay_internal): If we haven't redisplayed this frame's
      tool bar, call redisplay_tool_bar early so we can adjust the
      frame size accordingly.
      * xfns.c (x_change_tool_bar_height): Call adjust_frame_size with
      inhibit 1 when we have not redisplayed the tool bar yet.
      (Fx_create_frame): Pass Pass Qx_create_frame_1 and
      Qx_create_frame_2 to adjust_frame_size.
      fb35f1f7
    • Paul Eggert's avatar
      Have 'make' output better GEN names · d703a4dc
      Paul Eggert authored
      * lisp/Makefile.in (PHONY_EXTRAS): New macro.
      (.PHONY): Depend on it, and on $(lisp)/loaddefs.el, so that the
      relevant files' time stamps are ignored.
      (custom-deps, $(lisp)/cus-load.el, finder-data)
      ($(lisp)/finder-inf.el): Use PHONY_EXTRAS.
      (custom-deps, $(lisp)/cus-load.el, finder-data)
      ($(lisp)/finder-inf.el, autoloads, $(lisp)/loaddefs.el)
      ($(lisp)/subdirs.el, update-subdirs):
      Output more-accurate destination names with GEN.
      * src/Makefile.in (gl-stamp, globals.h): Simplify by putting the new
      contents of globals.h into gl-stamp.  This lets us use AM_V_GEN
      more naturally so that 'make' can output more-accurate names.
      d703a4dc
    • Paul Eggert's avatar
      Say "ELC foo.elc" instead of "GEN foo.elc" · c2774f37
      Paul Eggert authored
      * admin/unidata/Makefile.in, lisp/Makefile.in (AM_V_ELC)
      (am__v_ELC_, am__v_ELC_0, am__v_ELC_1): New macros.
      * admin/unidata/Makefile.in (%.elc):
      * lisp/Makefile.in ($(THEFILE)c, .el.elc): Use them.
      c2774f37
  6. 11 Jan, 2015 2 commits