1. 03 Sep, 2012 3 commits
    • Paul Eggert's avatar
      Fix minor problems found by static checking. · 26d4541d
      Paul Eggert authored
      * buffer.c (Fdelete_all_overlays): Return nil.
      * doc.c (Fsubstitute_command_keys):
      * regex.c (WEAK_ALIAS):
      * xdisp.c (redisplay_internal):
      Move initialization down, to pacify GCC 4.7.1 -Wjump-misses-init.
      26d4541d
    • Martin Rudalics's avatar
      New macro with-temp-buffer-window and related fixes. · c5e28e39
      Martin Rudalics authored
      * buffer.c (Fdelete_all_overlays): New function.
      
      * window.el (temp-buffer-window-setup-hook)
      (temp-buffer-window-show-hook): New hooks.
      (temp-buffer-window-setup, temp-buffer-window-show)
      (with-temp-buffer-window): New functions.
      (fit-window-to-buffer): Remove unused optional argument
      OVERRIDE.
      (special-display-popup-frame): Make sure the window used shows
      BUFFER.
      
      * help.el (temp-buffer-resize-mode): Fix doc-string.
      (resize-temp-buffer-window): New optional argument WINDOW.
      
      * files.el (recover-file, save-buffers-kill-emacs):
      * dired.el (dired-mark-pop-up): Use with-temp-buffer-window.
      c5e28e39
    • Chong Yidong's avatar
      * gtkutil.c: Add extern decl for Qxft. · 3eab3ca9
      Chong Yidong authored
      3eab3ca9
  2. 02 Sep, 2012 7 commits
    • Paul Eggert's avatar
      * emacs.c, eval.c: Use bool for boolean. · 1882aa38
      Paul Eggert authored
      * emacs.c (initialized, inhibit_window_system, running_asynch_code):
      (malloc_using_checking) [DOUG_LEA_MALLOC]:
      (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
      (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
      (main, decode_env_path, Fdaemon_initialized):
      * eval.c (call_debugger, Finteractive_p, interactive_p):
      (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
      (maybe_call_debugger, Fbacktrace):
      * process.c (read_process_output, exec_sentinel):
      Use bool for booleans.
      * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
      All callers changed.
      * eval.c (interactive_p): Omit always-true boolean argument
      EXCLUDE_SUBRS_P.  All callers changed.
      * dispextern.h, lisp.h: Reflect above API changes.
      * firstfile.c (dummy): Use the address of 'main', whose signature
      won't change, instead of the address of 'initialize', whose
      signature just changed from int to bool.
      * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
      * msdos.c (fatal_error_in_progress): ... from here.
      * xdisp.c (redisplaying_p): Now a boolean.  Set it to 1 instead
      of incrementing it.
      (redisplay_internal, unwind_redisplay): Simply clear
      REDISPLAYING_P when unwinding, instead of saving its previous,
      always-false value and then restoring it.
      1882aa38
    • Paul Eggert's avatar
      Clean up some extern decls. · a411ac43
      Paul Eggert authored
      Mostly, this hoists extern decls out of .c files and into .h files.
      That way, we're more likely to catch errors if the interfaces change.
      * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
      declare xg_mark_data.
      * dispextern.h (x_frame_parm_handlers):
      * font.h (Qxft):
      * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
      (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
      (Qultra_bold, Qoblique, Qitalic):
      Move extern decl here from .c file.
      * alloc.c (xg_mark_data) [USE_GTK]:
      * doc.c (Qclosure):
      * eval.c (Qlexical_binding):
      * fns.c (time) [!HAVE_UNISTD_H]:
      * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
      (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
      * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
      * lread.c (Qinternal_interpreter_environment):
      * minibuf.c (Qbuffer):
      * process.c (QCfamily, QCfilter):
      * widget.c (free_frame_faces):
      * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
      * xfont.c (x_clear_errors):
      * xterm.c (x_frame_parm_handlers):
      Remove now-redundant extern decls.
      * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
      * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
      Now static.
      * xfaces.c: Remove unnecessary static decls.
      * xterm.c (updating_frame): Remove decl of nonexistent object.
      a411ac43
    • Paul Eggert's avatar
      * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS) · c04889f8
      Paul Eggert authored
      when building globals.h, as the objects that are not built on
      this host are not needed to compile C files on this host.
      c04889f8
    • Jan Djärv's avatar
      Prototype for x_wm_set_size_hint restored. · 8b339673
      Jan Djärv authored
      * frame.h: Add missing prototype for x_wm_set_size_hint.
      
      * gtkutil.h: Remove prototype for x_wm_set_size_hint.
      8b339673
    • Paul Eggert's avatar
      * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean. · a08d4ba7
      Paul Eggert authored
      * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
      (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
      (Fsubstitute_command_keys):
      * editfns.c (region_limit, find_field, Fconstrain_to_field)
      (save_excursion_save, save_excursion_restore)
      (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
      (format_time_string, general_insert_function)
      (make_buffer_string, make_buffer_string_both)
      (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
      * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
      (copy_text, insert_1, insert_1_both, insert_from_string)
      (insert_from_string_before_markers, insert_from_string_1)
      (insert_from_buffer, insert_from_buffer_1, replace_range)
      (replace_range_2, del_range_1, del_range_byte, del_range_both)
      (del_range_2, modify_region):
      * intervals.c (intervals_equal, balance_possible_root_interval)
      (adjust_intervals_for_insertion, merge_properties_sticky)
      (graft_intervals_into_buffer, lookup_char_property)
      (adjust_for_invis_intang, set_point_both)
      (get_property_and_range, compare_string_intervals)
      (set_intervals_multibyte_1, set_intervals_multibyte):
      * keyboard.c (decode_timer):
      Use bool for boolean.
      * intervals.h, lisp.h, systime.h: Reflect above API changes.
      * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
      a08d4ba7
    • Chong Yidong's avatar
      * keymap.c (push_key_description): Print M-TAB as C-M-i. · 48c948de
      Chong Yidong authored
      Fixes: debbugs:11758
      48c948de
    • Juanma Barranquero's avatar
      src/makefile.w32-in: Update dependencies. · 6c49a40b
      Juanma Barranquero authored
      (CCL_H, W32FONT_H): New macros.
      (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
      ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
      ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
      ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
      ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
      ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update.
      6c49a40b
  3. 01 Sep, 2012 6 commits
    • Eli Zaretskii's avatar
      Further fix for bug #11860 with Arabic display on Windows. · 7e510e28
      Eli Zaretskii authored
       src/w32uniscribe.c (uniscribe_shape): Handle correctly the case of
       more than one grapheme cluster passed to the shaper: compute the
       offset adjustment values separately for each cluster.
      7e510e28
    • Eli Zaretskii's avatar
    • Eli Zaretskii's avatar
      Fix last changes related to w32 and Cygwin. · 4dfbd238
      Eli Zaretskii authored
       src/image.c: Restore mistakenly removed inclusion of w32.h.  Without
       it, GCC doesn't see prototypes of w32_delayed_load, and complains
       about implicit conversions from integer to pointer.
      4dfbd238
    • Daniel Colascione's avatar
      86571ae0
    • Daniel Colascione's avatar
      Refactor window-system configuration · 17a2cbbd
      Daniel Colascione authored
      This change streamlines the window system selection code in
      configure.in and moves many common function declarations from
      window-specific headers to frame.h.  It introduces a new TERM_HEADER
      macro in config.h: we set this macro to the right header to use for
      the window system for which we're compiling Emacs and have source
      files include it indirectly.  This way, we don't have to teach every
      file about every window system.
      17a2cbbd
    • Paul Eggert's avatar
      Better seed support for (random). · 0e23ef9d
      Paul Eggert authored
      * doc/lispref/numbers.texi (Random Numbers): Document new behavior of
      the calls (random) and (random STRING).
      * etc/NEWS: Document new behavior of (random), (random "string").
      * lisp/play/5x5.el, lisp/play/animate.el, lisp/play/cookie1.el:
      * lisp/play/dissociate.el, lisp/play/doctor.el, lisp/play/dunnet.el:
      * lisp/play/gomoku.el, lisp/play/landmark.el, lisp/play/mpuz.el:
      * lisp/play/tetris.el, lisp/play/zone.el:
      * lisp/calc/calc-comb.el (math-init-random-base):
      * lisp/play/blackbox.el (bb-init-board):
      * lisp/play/life.el (life):
      * lisp/server.el (server-use-tcp):
      * lisp/type-break.el (type-break):
      Remove unnecessary call to (random t).
      * lisp/net/sasl.el (sasl-unique-id-function):
      Change (random t) to (random), now that the latter is more random.
      * lisp/play/life.el (life-initialized): Remove no-longer-needed var.
      * lisp/gnus/gnus-sync.el (gnus-sync-lesync-setup):
      * lisp/gnus/message.el (message-canlock-generate, message-unique-id):
      Change (random t) to (random), now that the latter is more random.
      * lisp/org/org-id.el (org-id-uuid):
      Change (random t) to (random), now that the latter is more random.
      * src/emacs.c (main): Call init_random.
      * src/fns.c (Frandom): Set the seed from a string argument, if given.
      Remove long-obsolete Gentzel cruft.
      * src/lisp.h, src/sysdep.c (seed_random): Now takes address and size, not long.
      (init_random): New function.
      0e23ef9d
  4. 31 Aug, 2012 3 commits
  5. 30 Aug, 2012 3 commits
  6. 28 Aug, 2012 7 commits
    • Jan Djärv's avatar
      Improve NS dialogs. Add close button, remove ugly casts. · 7f8941d8
      Jan Djärv authored
      * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
      button_values to NULL. Call setStykeMask so dialogs get a close button.
      (windowShouldClose:): Set window_closed.
      (dealloc): New member, free button_values.
      (process_dialog:): Make member function. Remove window argument,
      replace window with self. Count buttons and allocate and store values
      in button_values.
      (addButton:value:row:): value is int with the name tag.  Call setTag
      with tag. Remove return self, declare return value as void.
      (addString:row:): Remove return self, declare return value as void.
      (addSplit): Remove return self, declare return value as void.
      (clicked:): Remove return self, declare return value as void.
      Set dialog_return to button_values[seltag]. Code formatting change.
      (initFromContents:isQuestion:): Adjust call to process_dialog.
      Code formatting change.
      (timeout_handler:): Set timer_fired to YES.
      (runDialogAt:): Set timer_fired to NO.
      Handle click on close button as quit.
      
      * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
      Add window_closed and button_values.  Add void as return value for
      add(Button|String|Split).  addButton takes int instead of Lisp_Object.
      Add process_dialog as new member.
      7f8941d8
    • Martin Rudalics's avatar
      In Fset_window_configuration install revison of reverted fix. · 37b9743e
      Martin Rudalics authored
      * window.c (Fset_window_configuration): Install revision of reverted
      fix.
      37b9743e
    • Martin Rudalics's avatar
      Remove handling of auto-buffer-name window parameter. · 457294dd
      Martin Rudalics authored
      * window.c (Fset_window_configuration): Remove handling of
      auto-buffer-name window parameter.
      457294dd
    • Dmitry Antipov's avatar
      Do not allow to set major mode for a dead buffer. · 4f2daf31
      Dmitry Antipov authored
      * buffer.c (Fset_buffer_major_mode): Signal an error
      if the buffer is dead.
      (Fother_buffer, other_buffer_safely): Remove redundant
      nested declaration.
      4f2daf31
    • Dmitry Antipov's avatar
      Always use set_buffer_if_live to restore original buffer at unwind. · 66322887
      Dmitry Antipov authored
      * buffer.h (record_unwind_current_buffer): New function.
      * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
      * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
      * undo.c, window.c: Adjust users.
      * buffer.c (set_buffer_if_live): Fix comment.
      66322887
    • Dmitry Antipov's avatar
      Fix usage of set_buffer_internal. · a3d794a1
      Dmitry Antipov authored
      * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
      * buffer.c (set_buffer_if_live): Use set_buffer_internal.
      * coding.c (decode_coding): Omit redundant test.
      * fileio.c (decide_coding_unwind): Likewise.
      * fns.c (secure_hash): Likewise.
      * insdel.c (modify_region): Likewise.
      * keyboard.c (command_loop_1): Likewise.
      * print.c (PRINTFINISH): Likewise.
      * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
      a3d794a1
    • Paul Eggert's avatar
      * dispnew.c: Use bool for boolean. · 59ea14cd
      Paul Eggert authored
      (frame_garbaged, display_completed, delayed_size_change)
      (fonts_changed_p, add_window_display_history)
      (add_frame_display_history, verify_row_hash)
      (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
      (row_equal_p, realloc_glyph_pool)
      (allocate_matrices_for_frame_redisplay)
      (showing_window_margins_p)
      (adjust_frame_glyphs_for_frame_redisplay)
      (build_frame_matrix_from_leaf_window, make_current)
      (mirrored_line_dance, mirror_line_dance, update_frame)
      (update_window_tree, update_single_window)
      (check_current_matrix_flags, update_window, update_text_area)
      (update_window_line, set_window_update_flags, scrolling_window)
      (update_frame_1, scrolling, buffer_posn_from_coords)
      (do_pending_window_change, change_frame_size)
      (change_frame_size_1, sit_for):
      Use bool for boolean.
      (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
      and remove last int (actually boolean) argument, which was always 0.
      All callers changed.
      * dispextern.h, frame.h, lisp.h: Reflect above API changes.
      * dispextern.h (struct composition_it): Use bool for boolean.
      (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
      (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
      * dired.c (file_name_completion):
      Use bool for boolean.  (This was missed in an earlier change.)
      59ea14cd
  7. 27 Aug, 2012 7 commits
    • Martin Rudalics's avatar
      In Fset_window_configuration revert first part of last change. · 95072a94
      Martin Rudalics authored
      * window.c (Fset_window_configuration): Revert first part of
      last change.
      95072a94
    • Jan Djärv's avatar
      * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize · 0f19feff
      Jan Djärv authored
      dialog_return.
      (windowShouldClose:): Use stop instead of stopModalWithCode.
      (clicked:): Ditto, and also set dialog_return.
      (timeout_handler:): Use stop instead of abortModal.  Send a dummy
      event.
      (runDialogAt:): Make ret Lisp_Object.  Set it from dialog_return when
      modal loop returns.
      
      * nsterm.h (NSPanel): New class variable dialog_return.
      
      Fixes: debbugs:12258
      0f19feff
    • Paul Eggert's avatar
      * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans. · de1339b0
      Paul Eggert authored
      * composite.c (find_composition, composition_gstring_p)
      (composition_reseat_it, find_automatic_composition):
      * data.c (let_shadows_buffer_binding_p)
      (let_shadows_global_binding_p, set_internal, make_blv)
      (Fmake_variable_buffer_local, Fmake_local_variable)
      (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
      (cons_to_signed, arith_driver):
      * dbusbind.c (xd_in_read_queued_messages):
      * dired.c (directory_files_internal, file_name_completion):
      Use bool for booleans.
      * dired.c (file_name_completion):
      * process.h (fd_callback):
      Omit int (actually boolean) argument.  It wasn't being used.
      All uses changed.
      * composite.h, lisp.h: Reflect above API changes.
      de1339b0
    • Paul Eggert's avatar
      * cmds.c, coding.c: Use bool for booleans. · f10fe38f
      Paul Eggert authored
      * cmds.c (move_point, Fself_insert_command):
      * coding.h (struct composition status, struct coding_system):
      * coding.c (detect_coding_utf_8, encode_coding_utf_8)
      (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
      (emacs_mule_char, decode_coding_emacs_mule)
      (encode_coding_emacs_mule, detect_coding_iso_2022)
      (decode_coding_iso_2022, encode_invocation_designation)
      (encode_designation_at_bol, encode_coding_iso_2022)
      (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
      (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
      (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
      (encode_coding_raw_text, detect_coding_charset)
      (decode_coding_charset, encode_coding_charset, detect_eol)
      (detect_coding, get_translation_table, produce_chars)
      (consume_chars, reused_workbuf_in_use)
      (make_conversion_work_buffer, code_conversion_save)
      (decode_coding_object, encode_coding_object)
      (detect_coding_system, char_encodable_p)
      (Funencodable_char_position, code_convert_region)
      (code_convert_string, code_convert_string_norecord)
      (Fset_coding_system_priority):
      * fileio.c (Finsert_file_contents):
      Use bool for booleans.
      * coding.h, lisp.h: Reflect above API changes.
      * coding.c: Remove unnecessary static function decls.
      (detect_coding): Use unsigned, not signed, to copy an unsigned field.
      (decode_coding, encode_coding, decode_coding_gap): Return 'void',
      not a boolean 'int', since callers never look at the return value.
      (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
      * coding.h (decoding_buffer_size, encoding_buffer_size)
      (emacs_mule_string_char): Remove unused extern decls.
      (struct iso_2022_spec, struct coding_system):
      Use 'unsigned int : 1' for boolean fields, since there's more than one.
      (struct emacs_mule_spec): Remove unused field 'full_support'.
      All initializations removed.
      * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
      f10fe38f
    • Dmitry Antipov's avatar
      Fix spare memory change. · 5474c384
      Dmitry Antipov authored
      * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
      (valid_lisp_object_p): Likewise.
      5474c384
    • Martin Rudalics's avatar
      Address two problems in Fset_window_configuration (Bug#8789) and (Bug#12208). · c4b6914d
      Martin Rudalics authored
      * window.c (Fset_window_configuration): Record any window's old
      buffer if it's replaced (see Bug#8789).  If the new current
      buffer doesn't appear in the selected window, go to its old
      point (Bug#12208).
      c4b6914d
    • Dmitry Antipov's avatar
      Special MEM_TYPE_SPARE to denote reserved memory. · 35aaa1ea
      Dmitry Antipov authored
      * alloc.c (enum mem_type): New memory type.
      (refill_memory_reserve): Use new type for spare memory.
      This prevents live_cons_p and live_string_p from incorrect
      detection of uninitialized objects from spare memory as live.
      35aaa1ea
  8. 26 Aug, 2012 4 commits
    • Paul Eggert's avatar
      Spelling fixes. · 8b2e00a3
      Paul Eggert authored
      * Makefile.in (.PHONY): versioclean -> versionclean.
      8b2e00a3
    • Paul Eggert's avatar
      Remove unused external symbols. · b52d6985
      Paul Eggert authored
      * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
      * window.c (Qwindow_valid_p, decode_valid_window):
      Now static, not extern.
      * data.c (Qinterval): Remove; unused.
      (syms_of_data): Do not define 'interval'.
      * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
      * window.h (decode_valid_window):
      Remove decls.
      b52d6985
    • Paul Eggert's avatar
      * character.c, charset.c, chartab.c: Use bool for booleans. · d5172d4f
      Paul Eggert authored
      * character.c (lisp_string_width, string_count_byte8)
      (string_escape_byte8):
      * charset.c (charset_map_loaded, load_charset_map, read_hex):
      (load_charset_map_from_file, map_charset_chars)
      (Fdefine_charset_internal, define_charset_internal)
      (Fdeclare_equiv_charset, find_charsets_in_text)
      (Ffind_charset_region, char_charset, Fiso_charset):
      * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
      (sub_char_table_set, sub_char_table_set_range)
      (char_table_set_range, optimize_sub_char_table)
      (map_sub_char_table):
      Use bool for boolean.
      * character.c (str_to_unibyte): Omit last boolean argument; it was
      always 0.  All callers changed.
      * character.h, charset.h: Adjust to match previous changes.
      * character.h (char_printable_p): Remove decl of nonexistent function.
      * charset.h (struct charset): Members code_linear_p, iso_chars_96,
      ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
      are all boolean, so make them single-bit bitfields.
      d5172d4f
    • Paul Eggert's avatar
      * lisp.h (ASET): Remove attempt to detect side effects. · 6af64513
      Paul Eggert authored
      It was meant to be temporary and it often doesn't work,
      because when IDX has side effects the behavior of IDX==IDX
      is undefined.  See Stefan Monnier in
      <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
      6af64513