1. 07 Feb, 2015 2 commits
    • Martin Rudalics's avatar
      Try to improve handling of fullwidth/-height frames. · d1655783
      Martin Rudalics authored
      * frame.el (frame-notice-user-settings): Update
      `frame-size-history'.
      (make-frame): Update `frame-size-history'.  Call
      `frame-after-make-frame'.
      * faces.el (face-set-after-frame-default): Remove call to
      frame-can-run-window-configuration-change-hook.
      * frame.c (frame_size_history_add): New function.
      (frame_inhibit_resize): Consider frame_inhibit_implied_resize
      only after frame's after_make_frame slot is true.  Inhibit
      resizing fullwidth-/height frames in one direction only.  Update
      frame_size_history.
      (adjust_frame_size): Call frame_size_history_add.
      (make_frame): Initalize after_make_frame slot.
      (Fmake_terminal_frame): Adjust adjust_frame_size call.
      (Fcan_run_window_configuration_change_hook): Rename to
      Fframe_after_make_frame.  Set after_make_frame slot.  Return
      second argument.
      (x_set_frame_parameters): Postpone handling fullscreen parameter
      until after width and height parameters have been set.  Apply
      width and height changes only if can_x_set_window_size is true.
      Update frame_size_history.
      (Qadjust_frame_size_1, Qadjust_frame_size_2)
      (Qadjust_frame_size_3, QEmacsFrameResize, Qframe_inhibit_resize)
      (Qx_set_fullscreen, Qx_check_fullscreen, Qx_set_window_size_1)
      (Qxg_frame_resized, Qxg_frame_set_char_size_1)
      (Qxg_frame_set_char_size_2, Qxg_frame_set_char_size_3)
      (Qxg_change_toolbar_position, Qx_net_wm_state)
      (Qx_handle_net_wm_state, Qtb_size_cb, Qupdate_frame_tool_bar)
      (Qfree_frame_tool_bar): New symbol for updating
      frame_size_history.
      (Qtip_frame, Qterminal_frame): New symbols.
      (Vframe_adjust_size_history): Rename to frame_size_history.
      * frame.h (struct frame): Rename
      can_run_window_configuration_change_hook slot to
      after_make_frame.
      (frame_size_history_add): Extern.
      * gtkutil.c (xg_frame_resized): Call frame_size_history_add.
      Don't set FRAME_PIXEL_WIDTH and FRAME_PIXEL_HEIGHT here.
      (xg_frame_set_char_size): Try to preserve the status of
      fullwidth/-height frames.  Call frame_size_history_add.
      (tb_size_cb, update_frame_tool_bar, free_frame_tool_bar)
      (xg_change_toolbar_position): Call frame_size_history_add.
      * w32fns.c (x_change_tool_bar_height): Handle frame's fullscreen
      status.
      (Fx_create_frame): Process fullscreen parameter after frame has
      been resized.
      (x_create_tip_frame): Pass Qtip_frame to adjust_frame_size.
      (Fx_frame_geometry): Don't pollute pure storage.
      * w32term.c (w32_read_socket): For WM_WINDOWPOSCHANGED,
      WM_ACTIVATE and WM_ACTIVATEAPP set frame's visibility before
      calling w32fullscreen_hook.  For WM_DISPLAYCHANGE call
      w32fullscreen_hook immediately.
      (x_fullscreen_adjust, x_check_fullscreen): Remove.
      (w32fullscreen_hook): Call change_frame_size just as with a
      "normal" frame resize operation.  Call do_pending_window_change.
      (x_set_window_size): Try to handle fullwidth and fullheight more
      accurately.  Don't rely on w32_enable_frame_resize_hack.
      (w32_enable_frame_resize_hack): Remove variable.
      * widget.c (EmacsFrameResize): Remove dead code.  Call
      frame_size_history_add
      * window.c (run_window_configuration_change_hook): Check
      f->after_make_frame instead of
      f->can_run_window_configuration_change_hook.
      * xfns.c (x_change_tool_bar_height): Handle frame's fullscreen status.
      (Fx_create_frame): Process fullscreen parameter after frame has
      been resized.
      (Fx_frame_geometry): Don't pollute pure storage.
      * xterm.c (x_net_wm_state, x_handle_net_wm_state): Call
      frame_size_history_add.
      (do_ewmh_fullscreen): Handle x_frame_normalize_before_maximize.
      (x_check_fullscreen): Count in menubar when calling
      XResizeWindow.  Wait for ConfigureNotify event.  Call
      frame_size_history_add.
      (x_set_window_size_1): Remove PIXELWISE argument.  Try to handle
      changing a fullheight frame's width or a fullwidth frame's
      height.  Call frame_size_history_add.
      (x_set_window_size): Simplify xg_frame_set_char_size and
      x_set_window_size_1 calls.
      (x_frame_normalize_before_maximize): New variable.
      d1655783
    • Paul Eggert's avatar
      Remove no-longer-used cursor_in_echo_area code · cf498e5b
      Paul Eggert authored
      * dispnew.c (set_window_cursor_after_update, update_frame_1):
      Remove checks for negative cursor_in_echo_area, since this var is
      a boolean, and has been a boolean for some time.  Simplify.
      * dispnew.c (init_display):
      * xdisp.c (message3_nolog, vmessage): Use bool for boolean.
      cf498e5b
  2. 05 Feb, 2015 2 commits
    • Stefan Monnier's avatar
      Add (:documentation <form>) for dynamically-generated docstrings · ad5a7c86
      Stefan Monnier authored
      * lisp/emacs-lisp/bytecomp.el:
      (byte-compile-initial-macro-environment): Use macroexp-progn.
      (byte-compile-cl-warn): Don't silence use of cl-macroexpand-all.
      (byte-compile-file-form-defvar-function): Rename from
      byte-compile-file-form-define-abbrev-table.
      (defvaralias, byte-compile-file-form-custom-declare-variable): Use it.
      (byte-compile): Use byte-compile-top-level rather than
      byte-compile-lambda so we can compile non-values.
      (byte-compile-form): Add warnings for failed uses of lexical vars via
      quoted symbols.
      (byte-compile-unfold-bcf): Improve message for failed inlining.
      (byte-compile-make-closure): Handle new format of internal-make-closure
      for dynamically-generated docstrings.
      
      * lisp/emacs-lisp/cconv.el (cconv--convert-function):
      Add `docstring' argument.
      (cconv-convert): Use it to handle the new (:documentation ...) form.
      (cconv-analyze-form): Handle the new (:documentation ...) form.
      
      * src/eval.c (Ffunction): Handle the new (:documentation ...) form.
      (syms_of_eval): Declare `:documentation'.
      ad5a7c86
    • Martin Rudalics's avatar
      Remove recently added BUFFER arg of `window-text-pixel-size'. · 49aa3a12
      Martin Rudalics authored
      * xdisp.c (Fwindow_text_pixel_size): Remove optional BUFFER
      argument added on 2015-02-01.
      * display.texi (Size of Displayed Text): Remove description of
      optional argument BUFFER of `window-text-pixel-size'.
      49aa3a12
  3. 04 Feb, 2015 1 commit
  4. 03 Feb, 2015 1 commit
  5. 01 Feb, 2015 5 commits
  6. 31 Jan, 2015 6 commits
  7. 30 Jan, 2015 3 commits
  8. 29 Jan, 2015 3 commits
    • Paul Eggert's avatar
      Report readdir failures · 4ab6e74a
      Paul Eggert authored
      Previously, on non-MS-Windows platforms the code treated most
      readdir failures as EOF.  This was incorrect, e.g., when readdir
      fails with errno == EOVERFLOW.  Signal an error instead.
      * dired.c (read_dirent):
      New function, which signals an error when readdir fails.
      (directory_files_internal, file_name_completion): Use it.
      4ab6e74a
    • Eli Zaretskii's avatar
      Commit src/ChangeLog for previous commit. · 1dc1959e
      Eli Zaretskii authored
      1dc1959e
    • Eli Zaretskii's avatar
      Use bool for boolean in w32menu.c, w32font.c, w32uniscribe.c. · 0761ec16
      Eli Zaretskii authored
       src/w32uniscribe.c (uniscribe_list, uniscribe_match): Use bool where
       appropriate.
       src/w32font.c (struct font_callback_data, w32font_list_internal)
       (w32font_driver, w32font_match_internal): Use bool where appropriate.
       src/w32menu.c (x_activate_menubar, set_frame_menubar)
       (w32_dialog_show, initialize_frame_menubar, w32_menu_show)
       (is_simple_dialog): Use bool where appropriate.
      0761ec16
  9. 28 Jan, 2015 3 commits
    • Paul Eggert's avatar
      Use bool, not int, to track face changes · cdee38ab
      Paul Eggert authored
      * xfaces.c (face_change): Rename from face_change_count, and
      change from int to bool.  The var is now true (instead of nonzero)
      if attributes have changed; this is simpler.  All uses changed.
      Fixes: bug#19698
      cdee38ab
    • Eli Zaretskii's avatar
      Improve the fix for bug #19701 · ad588afd
      Eli Zaretskii authored
       src/dired.c (directory_files_internal, file_name_completion)
       [WINDOWSNT]: Signal an error when errno is set non-zero by
       'readdir', regardless of its value.
       src/w32.c (sys_readdir): Set errno to ENOENT when the directory
       doesn't exist and to EACCES when it's not accessible to the
       current user.  Set errno to zero when FindNextFile exhausts the
       directory, so that callers don't interpret that as an error and
       don't signal a file-error.
       (open_unc_volume): Set errno to ENOENT if WNetOpenEnum fails.
      ad588afd
    • Stefan Monnier's avatar
      Tighten up the tagcode used for eieio and cl-struct objects · 2668ac1a
      Stefan Monnier authored
      * lisp/emacs-lisp/eieio-core.el (eieio-defclass-internal): Set the function
      slot of the tag symbol to :quick-object-witness-check.
      (eieio-object-p): Use :quick-object-witness-check.
      (eieio--generic-tagcode): Use cl--generic-struct-tag.
      * lisp/emacs-lisp/cl-preloaded.el: New file.
      * lisp/emacs-lisp/cl-macs.el (cl--bind-inits): Remove, unused.
      (cl--transform-lambda, cl-destructuring-bind): Remove cl--bind-inits.
      (cl--make-usage-args): Strip away &aux args.
      (cl-case, cl-typecase, cl--parse-loop-clause): Use macroexp-let2.
      (cl-the, cl-check-type): Use macroexp-let2 and cl-typep.
      (cl-defstruct): Use `declare' and cl-struct-define.
      * lisp/emacs-lisp/cl-generic.el (cl--generic-struct-tag): New function.
      (cl--generic-struct-tagcode): Use it to tighten the tagcode.
      * lisp/loadup.el: Load cl-preloaded.
      * src/lisp.mk (lisp): Add cl-preloaded.
      2668ac1a
  10. 27 Jan, 2015 2 commits
    • Eli Zaretskii's avatar
      Signal a file-error from directory-files on MS-Windows (Bug#19701) · 9664defd
      Eli Zaretskii authored
       src/dired.c (directory_files_internal) [WINDOWSNT]: If readdir
       returns NULL and errno is ENOTDIR, behave as if opendir failed to
       open the directory.
       src/w32.c (sys_readdir): If FindFirstFile fails because the
       directory doesn't exist, set errno to ENOTDIR.
      9664defd
    • Paul Eggert's avatar
      Use bool for boolean in xfaces.c · 2639c2ed
      Paul Eggert authored
      * dispextern.h: Adjust to signature changes.
      * font.c (font_at, font_range):
      * fontset.c (Finternal_char_font):
      * fringe.c (draw_fringe_bitmap_1):
      * xdisp.c (handle_face_prop, face_before_or_after_it_pos)
      (get_next_display_element, highlight_trailing_whitespace)
      (display_string, calc_line_height_property)
      (note_mode_line_or_margin_highlight, note_mouse_highlight):
      * xfaces.c (tty_suppress_bold_inverse_default_colors_p)
      (menu_face_changed_default, recompute_basic_faces)
      (Fbitmap_spec_p, parse_rgb_list, tty_lookup_color)
      (tty_defined_color, defined_color, face_color_gray_p)
      (face_color_supported_p, load_color2, load_face_colors)
      (Fx_list_fonts, LFACEP, push_named_merge_point)
      (resolve_face_name, lface_from_face_name_no_resolve)
      (lface_from_face_name, get_lface_attributes_no_remap)
      (get_lface_attributes, lface_fully_specified_p)
      (set_lface_from_font, merge_face_vectors, merge_named_face)
      (merge_face_ref, Finternal_make_lisp_face)
      (Finternal_lisp_face_p, Finternal_copy_lisp_face)
      (Finternal_set_lisp_face_attribute)
      (update_face_from_frame_parameter, set_font_frame_param)
      (face_boolean_x_resource_value)
      (Finternal_set_lisp_face_attribute_from_resource)
      (x_update_menu_appearance, Finternal_get_lisp_face_attribute)
      (Finternal_merge_in_global_face, Fface_font, face_attr_equal_p)
      (lface_equal_p, Finternal_lisp_face_equal_p)
      (Finternal_lisp_face_empty_p, lface_same_font_attributes_p)
      (Fcolor_distance, lookup_named_face, lookup_basic_face)
      (lookup_derived_face, Fface_attributes_as_vector)
      (x_supports_face_attributes_p, tty_supports_face_attributes_p)
      (Fdisplay_supports_face_attributes_p, realize_basic_faces)
      (realize_default_face, realize_named_face)
      (realize_non_ascii_face, realize_x_face, map_tty_color)
      (realize_tty_face, compute_char_face, face_at_buffer_position)
      (face_for_overlay_string, face_at_string_position):
      Use bool for boolean.
      * xfaces.c (set_lface_from_font):
      Return void, since callers never use the result.
      2639c2ed
  11. 26 Jan, 2015 1 commit
  12. 25 Jan, 2015 5 commits
    • Eli Zaretskii's avatar
      Use bool for boolean in w32term.c · 03a20dc9
      Eli Zaretskii authored
       src/w32term.c (x_update_window_begin, x_update_window_end)
       (x_update_end, x_after_update_window_line)
       (x_set_glyph_string_gc, x_draw_glyph_string_background)
       (x_draw_glyph_string_foreground)
       (x_draw_composite_glyph_string_foreground)
       (x_draw_glyphless_glyph_string_foreground)
       (x_draw_image_glyph_string, x_draw_glyph_string)
       (x_draw_stretch_glyph_string, note_mouse_movement)
       (w32_mouse_position, x_scroll_bar_report_motion)
       (x_horizontal_scroll_bar_report_motion, w32_read_socket)
       (w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar)
       (w32_draw_window_cursor, x_new_font, x_set_offset)
       (x_set_window_size, x_make_frame_invisible, x_iconify_frame): Use
       bool where appropriate.
      03a20dc9
    • Eli Zaretskii's avatar
      Use bool for boolean in w32fns.c · 49b82274
      Eli Zaretskii authored
       src/w32fns.c (w32_defined_color, x_decode_color)
       (Fxw_color_defined_p, Fxw_color_values, x_set_icon_type)
       (x_set_menu_bar_lines, x_change_tool_bar_height)
       (x_set_internal_border_width, x_explicitly_set_name)
       (x_implicitly_set_name, Fx_create_frame, w32_window)
       (x_create_tip_frame, Fx_show_tip): Use bool where appropriate.
      49b82274
    • Paul Eggert's avatar
      Use bool for boolean in xfns.c · 11a9f377
      Paul Eggert authored
      * xfaces.c (x_update_menu_appearance):
      * xfns.c (x_real_positions, x_defined_color, x_decode_color)
      (xg_set_icon, xg_set_icon_from_xpm_data, x_set_cursor_color)
      (x_set_icon_type, x_set_icon_name, x_set_menu_bar_lines)
      (x_change_tool_bar_height, x_set_internal_border_width)
      (x_encode_text, x_set_name_internal, x_explicitly_set_name)
      (x_implicitly_set_name, x_default_scroll_bar_color_parameter)
      (hack_wm_protocols, xic_create_fontsetname, xic_free_xfontset)
      (x_window, x_icon, Fx_wm_set_size_hint, Fx_create_frame)
      (Fxw_color_defined_p, Fxw_color_values, x_create_tip_frame)
      (Fx_show_tip, clean_up_file_dialog, Fx_file_dialog)
      (clean_up_dialog, syms_of_xfns):
      * xterm.h (xg_set_icon, xg_set_icon_from_xpm_data)
      (xic_create_fontsetname):
      Use bool for boolean.
      * xfns.c: Include bitmaps/gray.xbm unconditionally.
      11a9f377
    • Paul Eggert's avatar
      Count MANY function args more reliably · a3689d3c
      Paul Eggert authored
      * alloc.c (Fgc_status, purecopy, unbind_to, garbage_collect_1):
      * buffer.c (Fbuffer_list, Fkill_buffer):
      * callint.c (read_file_name, Fcall_interactively):
      * charset.c (Fset_charset_priority, syms_of_charset):
      * chartab.c (uniprop_encode_value_numeric):
      * coding.c (syms_of_coding):
      * composite.c (syms_of_composite):
      * data.c (wrong_range):
      * dbusbind.c (syms_of_dbusbind):
      * dired.c (file_attributes):
      * editfns.c (Fdecode_time, update_buffer_properties, format2):
      * eval.c (run_hook_with_args_2, apply1, call1, call2, call3)
      (call4, call5, call6, call7):
      * fileio.c (Finsert_file_contents, choose_write_coding_system)
      (Fcar_less_than_car, build_annotations, auto_save_error):
      * filelock.c (get_boot_time):
      * fns.c (internal_equal, nconc2, Fyes_or_no_p, Fwidget_apply):
      (maybe_resize_hash_table, secure_hash):
      * font.c (font_style_to_value, font_open_by_name, Flist_fonts):
      * fontset.c (fontset_add, Fset_fontset_font):
      * ftfont.c (ftfont_lookup_cache):
      * gtkutil.c (xg_get_font):
      * insdel.c (signal_before_change, signal_after_change):
      * keymap.c (append_key):
      * lread.c (load_warn_old_style_backquotes, Fload, init_lread):
      * minibuf.c (Fread_buffer):
      * print.c (print_preprocess):
      * process.c (Fformat_network_address, Fmake_network_process)
      (server_accept_connection):
      * sound.c (Fplay_sound_internal):
      * term.c (Fsuspend_tty, Fresume_tty):
      * window.c (window_list):
      * xdisp.c (run_redisplay_end_trigger_hook, add_to_log)
      (message_with_string):
      * xfaces.c (Fx_list_fonts):
      * xfont.c (syms_of_xfont):
      * xselect.c (x_handle_selection_request)
      (x_handle_selection_clear, x_clear_frame_selections)
      (x_clipboard_manager_error_1):
      Prefer CALLMANY and CALLN to counting args by hand.
      * doc.c (reread_doc_file): Remove unused code.
      * fns.c (concat2, concat3): Redo to avoid need for local-var vector.
      (cmpfn_user_defined, hashfn_user_defined, Fmaphash):
      Prefer call1 and call2 to Ffuncall.
      * keyboard.c (safe_run_hook_funcall, safe_run_hooks):
      Use struct literal rather than a local var, for simplicity.
      * keymap.c (where_is_internal): Use NULL rather than a pointer
      to unused args.
      * lisp.h (CALLMANY, CALLN): New macros.
      * sound.c (Fplay_sound_internal): Coalesce duplicate code.
      Fixes: bug#19634
      a3689d3c
    • Paul Eggert's avatar
      Use gnustep-config if available · f6ef8365
      Paul Eggert authored
      * configure.ac (--with-gnustep): Document this.
      (NS_GNUSTEP_CONFIG): New variable, set if gnustep-config works.
      If gnustep-config works, use 'gnustep-config --objc-flags' and
      'gnustep-config --gui-libs' to compute GNUstep configuration
      variables, instead of attempting to infer them individually.
      * etc/NEWS: Document this.
      * src/emacs.c [NS_IMPL_GNUSTEP]: Don't include <GNUstepBase/GSConfig.h>.
      It doesn't appear to be needed, and the inclusion breaks on
      Ubuntu 14.10 when 'configure' uses 'gnustep-config'.
      Fixes: bug#19507
      f6ef8365
  13. 24 Jan, 2015 1 commit
  14. 22 Jan, 2015 4 commits
    • Eli Zaretskii's avatar
    • Paul Eggert's avatar
      Use bool for boolean in xfont.c, xftfont.c, xgselect.c · b631bb57
      Paul Eggert authored
      * xfont.c (xfont_driver, xfont_chars_supported)
      (xfont_text_extents):
      * xftfont.c (xftfont_get_colors, xftfont_open)
      (xftfont_prepare_face, xftfont_done_face)
      (xftfont_cached_font_ok):
      * xgselect.c (xg_select):
      Use bool for boolean.
      b631bb57
    • Paul Eggert's avatar
      Don't downcase system diagnostics' first letters · 8dd58a2d
      Paul Eggert authored
      * etc/NEWS: Document this.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-file):
      * lisp/ffap.el (find-file-at-point):
      * lisp/files.el (insert-file-1):
      * lisp/net/ange-ftp.el (ange-ftp-barf-if-not-directory)
      (ange-ftp-copy-file-internal):
      * lisp/progmodes/etags.el (visit-tags-table):
      * lisp/url/url-dav.el (url-dav-delete-directory, url-dav-delete-file)
      (url-dav-directory-files):
      Keep diagnostics consistent with system's.
      * lisp/erc/erc-dcc.el (erc-dcc-server):
      * lisp/ffap.el (ffap-machine-p):
      Ignore case while comparing diagnostics.
      * src/fileio.c (report_file_errno): Don't downcase, and simplify.
      Fixes: bug#19642
      8dd58a2d
    • Paul Eggert's avatar
      Better isolate code that assumes NIL_IS_ZERO · 74244d23
      Paul Eggert authored
      Suggested by Stefan Monnier in:
      http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00588.html
      * alloc.c (allocate_pseudovector):
      Use memclear, not memsetnil, to remove a 'verify'.
      * callint.c (Fcall_interactively):
      * dispnew.c (realloc_glyph_pool):
      * xdisp.c (init_iterator):
      Use memclear, not memset, to remove a 'verify'.
      * lisp.h (memclear): Rename from memsetnil, and take a byte
      count rather than a word count.  All callers changed.
      74244d23
  15. 21 Jan, 2015 1 commit