1. 08 Jun, 2011 8 commits
    • Martin Rudalics's avatar
      New symbols in window.c. · b9e809c2
      Martin Rudalics authored
      * window.c: (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
      (MIN_SAFE_WINDOW_HEIGHT): Really remove them from window.c.
      (syms_of_window): New Lisp objects Qrecord_window_buffer,
      Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
      Qget_mru_window, Qresize_root_window,
      Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
      Qauto_buffer_name; staticpro them.
      b9e809c2
    • Martin Rudalics's avatar
      A few new functions and rewrites in window.el. · 387522b2
      Martin Rudalics authored
      * window.el (one-window-p): Move down in code.  Rewrite
      doc-string.
      (window-current-scroll-bars): Rewrite doc-string.  Normalize
      live window argument.
      (walk-windows, get-window-with-predicate, count-windows):
      Rewrite doc-string.  Use window-list-1.
      (window-in-direction-2, window-in-direction, get-mru-window):
      New functions.
      387522b2
    • Martin Rudalics's avatar
      Add some new members to window structure in window.h. · 496e208e
      Martin Rudalics authored
      * window.h (window): Add some new members to window structure -
      normal_lines, normal_cols, new_total, new_normal, clone_number,
      splits, nest, prev_buffers, next_buffers.
      (WINDOW_TOTAL_SIZE): Move here from window.c.
      (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define.
      
      * window.c (WINDOW_TOTAL_SIZE): Move to window.h.
      (make_dummy_parent): Set new members of windows structure.
      (make_window): Move down in code.  Handle new members of window
      structure.
      (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
      (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
      (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
      (Fset_window_prev_buffers, Fwindow_next_buffers)
      (Fset_window_next_buffers, Fset_window_clone_number): New
      functions.
      (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
      (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
      Doc-string fixes.
      (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
      Argument WINDOW can be now internal window too.
      (Fwindow_use_time): Move up in code.
      (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
      Rewrite doc-string.
      (Fset_window_configuration, saved_window)
      (Fcurrent_window_configuration, save_window_save): Handle new
      members of window structure.
      496e208e
    • Glenn Morris's avatar
    • Ivan Kanis's avatar
    • Glenn Morris's avatar
      ChangeLog fixes. · 9b5c21bb
      Glenn Morris authored
      9b5c21bb
    • Glenn Morris's avatar
      Move ChangeLog entry to the right file. · e61923c8
      Glenn Morris authored
      e61923c8
    • Martin Rudalics's avatar
      window-height, window-width, and window-full-width-p are now in window.el. · f3d1777e
      Martin Rudalics authored
      * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
      Remove.
      * window.el (window-height): Defalias to window-total-height.
      (window-width): Defalias to window-body-width.
      f3d1777e
  2. 07 Jun, 2011 11 commits
    • Chong Yidong's avatar
      Some changes and re-organization for animated gif support. · 18af70d0
      Chong Yidong authored
      * lisp/image.el (image-animate-max-time): Moved to image-mode.el.
      (create-animated-image): Remove unnecessary function.
      (image-animate): Rename from image-animate-start.  New arg.
      (image-animate-stop): Removed; just use image-animate-timer.
      (image-animate-timer): Use car-safe.
      (image-animate-timeout): Rename argument.
      
      * lisp/image-mode.el (image-toggle-animation): New command.
      (image-mode-map): Bind it to RET.
      (image-mode): Update message.
      (image-toggle-display-image): Avoid a spurious cache flush.
      (image-transform-rotation): Doc fix.
      (image-transform-properties): Return quickly in the normal case.
      (image-animate-loop): Rename from image-animate-max-time.
      18af70d0
    • Eli Zaretskii's avatar
      Fix the MS-DOS build broken by STRING_BYTES_MAX. · 2c631e0e
      Eli Zaretskii authored
       msdos/sedlibmk.inp (PTRDIFF_T_SUFFIX): Edit to nothing.
      2c631e0e
    • Martin Rudalics's avatar
      Add and rewrite window size functions in window.el. · a1511caf
      Martin Rudalics authored
      * window.el (window-safe-min-height, window-safe-min-width):
      New constants.
      (window-size-ignore, window-min-size, window-min-size-1)
      (window-sizable, window-sizable-p, window-size-fixed-1)
      (window-size-fixed-p, window-min-delta-1, window-min-delta)
      (window-max-delta-1, window-max-delta, window-resizable)
      (window-resizable-p, window-total-height, window-total-width)
      (window-body-width): New functions.
      (window-full-height-p, window-full-width-p): Rewrite using
      window-total-size.
      (window-body-height): Rewrite using window-body-size.
      a1511caf
    • Martin Rudalics's avatar
      Move get-lru-window and get-largest-window to window.el. · 190b47e6
      Martin Rudalics authored
      * window.c (window_loop): Remove handling of GET_LRU_WINDOW and
      GET_LARGEST_WINDOW.
      (Fget_lru_window, Fget_largest_window): Move to window.el.
      
      * window.el (get-lru-window, get-largest-window): Move here from
      window.c.  Rename first argument to ALL-FRAMES.  Rephrase
      doc-strings.
      (get-buffer-window-list): Rewrite using window-list-1.  Rephrase
      doc-string.
      190b47e6
    • Martin Rudalics's avatar
      Make delete_all_subwindows argument a Lisp_Object. · fa8a67e6
      Martin Rudalics authored
      * window.c (delete_window, Fset_window_configuration): Call
      delete_all_subwindows with window as argument.
      (delete_all_subwindows): Take a window as argument and not a
      structure.  Rewrite.
      
      * window.h: delete_all_subwindows now takes a Lisp_Object as
      argument.
      
      * frame.c (delete_frame): Call delete_all_subwindows with root
      window as argument.
      fa8a67e6
    • Eli Zaretskii's avatar
      nt/ChangeLog: Fix a typo in last entry. · 81d63f1a
      Eli Zaretskii authored
      81d63f1a
    • Eli Zaretskii's avatar
      Update nt/inc/stdint.h for PTRDIFF_MAX. · f7b2cdf3
      Eli Zaretskii authored
       nt/inc/stdint.h (INT32_MAX, INT64_MAX, INTPTR_MAX, PTRDIFF_MAX)
       [!__GNUC__]: New macros.
      f7b2cdf3
    • Glenn Morris's avatar
      Auto-commit of generated files. · 0442dc7f
      Glenn Morris authored
      0442dc7f
    • Martin Rudalics's avatar
      Install some window-size related functions and window-list-1. · abde8f8c
      Martin Rudalics authored
      * window.c (Fwindow_total_size, Fwindow_left_column)
      (Fwindow_top_line, window_body_lines, Fwindow_body_size)
      (Fwindow_list_1): New functions.
      (window_box_text_cols): Replace with window_body_cols.
      (Fwindow_width, Fscroll_left, Fscroll_right): Use
      window_body_cols instead of window_box_text_cols.
      
      * window.h: Extern window_body_cols instead of
      window_box_text_cols.
      
      * indent.c (compute_motion, Fcompute_motion): Use
      window_body_cols instead of window_box_text_cols.
      abde8f8c
    • Paul Eggert's avatar
      [ChangeLog] · 81eafe29
      Paul Eggert authored
      * configure.in: Add --with-wide-int.
      * INSTALL: Mention this.
      [etc/ChangeLog]
      * NEWS: Mention new configure option --with-wide-int.
      81eafe29
    • Daniel Colascione's avatar
      a54e3482
  3. 06 Jun, 2011 21 commits
    • Chong Yidong's avatar
    • Paul Eggert's avatar
      Merge from gnulib. · 9afafefb
      Paul Eggert authored
      * lib/careadlinkat.c, lib/careadlinkat.h, m4/gnulib-common.m4: Merge.
      9afafefb
    • Paul Eggert's avatar
      Merge: Document wide integers better. · 001903b5
      Paul Eggert authored
      001903b5
    • Paul Eggert's avatar
      Add Bug#8794 to ChangeLog entry. · b862a52a
      Paul Eggert authored
      b862a52a
    • Paul Eggert's avatar
      0c1477cd
    • Paul Eggert's avatar
      * Makefile.in (ALL_CFLAGS): Add -I$(srcdir)/../lib. · 695e5b41
      Paul Eggert authored
      This is needed because lisp.h includes intprops.h now.
      695e5b41
    • Paul Eggert's avatar
      Merge from trunk. · 77984278
      Paul Eggert authored
      77984278
    • Stefan Monnier's avatar
      * src/window.h (Fwindow_frame): Declare. · d6d100dd
      Stefan Monnier authored
      d6d100dd
    • Paul Eggert's avatar
      * alloc.c: Simplify handling of large-request failures (Bug#8800). · 2b6148e4
      Paul Eggert authored
      (SPARE_MEMORY): Always define.
      (LARGE_REQUEST): Remove.
      (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
      2b6148e4
    • Martin Rudalics's avatar
      Add window-tree based, atomic and side window functions to window.el. · 85cc1f11
      Martin Rudalics authored
      * window.el (window-right, window-left, window-child)
      (window-child-count, window-last-child, window-any-p)
      (normalize-live-buffer, normalize-live-frame)
      (normalize-any-window, normalize-live-window)
      (window-iso-combination-p, window-iso-combined-p)
      (window-iso-combinations)
      (walk-window-tree-1, walk-window-tree, walk-window-subtree)
      (windows-with-parameter, window-with-parameter)
      (window-atom-root, make-window-atom, window-atom-check-1)
      (window-atom-check, window-side-check, window-check): New
      functions.
      (ignore-window-parameters, window-sides, window-sides-vertical)
      (window-sides-slots): New variables.
      (window-size-fixed): Move down in code.  Minor doc-string fix.
      85cc1f11
    • Martin Rudalics's avatar
      Move some window-related functions from frame.c to window.c. · 727e958e
      Martin Rudalics authored
      * lisp.h: Move EXFUNS for Fframe_root_window,
      Fframe_first_window and Fset_frame_selected_window to window.h.
      
      * window.h: Move EXFUNS for Fframe_root_window,
      Fframe_first_window and Fset_frame_selected_window here from
      lisp.h.
      
      * frame.c (Fwindow_frame, Fframe_first_window)
      (Fframe_root_window, Fframe_selected_window)
      (Fset_frame_selected_window): Move to window.c.
      (Factive_minibuffer_window): Move to minibuf.c.
      (Fother_visible_frames_p): New function.
      
      * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
      
      * window.c (Fwindow_frame): Move here from frame.c.  Accept any
      window as argument.
      (Fframe_root_window, Fframe_first_window)
      (Fframe_selected_window): Move here from frame.c.  Accept frame
      or arbitrary window as argument.  Update doc-strings.
      (Fminibuffer_window): Move up in code.
      (Fwindow_minibuffer_p): Move up in code and simplify.
      (Fset_frame_selected_window): Move here from frame.c.  Marginal
      rewrite.
      (Fselected_window, select_window, Fselect_window): Move up in
      code.  Minor doc-string fixes.
      727e958e
    • Martin Rudalics's avatar
      Expose window-tree functions in Elisp. · bf60a96b
      Martin Rudalics authored
      (Fwindow_buffer): Move up and rewrite doc-string.
      (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
      (Fwindow_prev): New functions.
      bf60a96b
    • Paul Eggert's avatar
      Check for overflow when converting integer to cons and back. · be44ca6c
      Paul Eggert authored
      * charset.c (Fdefine_charset_internal, Fdecode_char):
      Use cons_to_unsigned to catch overflow.
      (Fencode_char): Use INTEGER_TO_CONS.
      * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
      (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
      * data.c (long_to_cons, cons_to_long): Remove.
      (cons_to_unsigned, cons_to_signed): New functions.
      These signal an error for invalid or out-of-range values.
      * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
      * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
      * font.c (Ffont_variation_glyphs):
      * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
      * lisp.h: Include <intprops.h>.
      (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
      (cons_to_signed, cons_to_unsigned): New decls.
      (long_to_cons, cons_to_long): Remove decls.
      * undo.c (record_first_change): Use INTEGER_TO_CONS.
      (Fprimitive_undo): Use CONS_TO_INTEGER.
      * xfns.c (Fx_window_property): Likewise.
      * xselect.c: Include <limits.h>.
      (x_own_selection, selection_data_to_lisp_data):
      Use INTEGER_TO_CONS.
      (x_handle_selection_request, x_handle_selection_clear)
      (x_get_foreign_selection, Fx_disown_selection_internal)
      (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
      (lisp_data_to_selection_data): Use cons_to_unsigned.
      (x_fill_property_data): Use cons_to_signed.
      Report values out of range.
      be44ca6c
    • Martin Rudalics's avatar
      Prepare for exposing window-tree functions in Elisp. · f230ecc9
      Martin Rudalics authored
      * window.c (decode_window, decode_any_window): Move up in code.
      (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
      (inhibit_frame_unsplittable): Remove unused variable.
      f230ecc9
    • Paul Eggert's avatar
      Check for buffer and string overflow more precisely. · d1f3d2af
      Paul Eggert authored
      * buffer.h (BUF_BYTES_MAX): New macro.
      * lisp.h (STRING_BYTES_MAX): New macro.
      * alloc.c (Fmake_string):
      * character.c (string_escape_byte8):
      * coding.c (coding_alloc_by_realloc):
      * doprnt.c (doprnt):
      * editfns.c (Fformat):
      * eval.c (verror):
      Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
      since they may not be the same number.
      * editfns.c (Finsert_char):
      * fileio.c (Finsert_file_contents):
      Likewise for BUF_BYTES_MAX.
      d1f3d2af
    • Paul Eggert's avatar
      * image.c: Use ptrdiff_t, not int, for sizes. · dd52fcea
      Paul Eggert authored
      (slurp_file): Switch from int to ptrdiff_t.
      All uses changed.
      (slurp_file): Check that file size fits in both size_t (for
      malloc) and ptrdiff_t (for sanity and safety).
      dd52fcea
    • Paul Eggert's avatar
      * fileio.c (Fverify_visited_file_modtime): Avoid time overflow · 7f9bbdbb
      Paul Eggert authored
      if b->modtime has its maximal value.
      7f9bbdbb
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      Don't assume time_t can fit into int. · 0157c761
      Paul Eggert authored
      * buffer.h (struct buffer.modtime): Now time_t, not int.
      * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
      * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
      0157c761
    • Paul Eggert's avatar
      Minor fixes for signed vs unsigned integers. · 0c671da6
      Paul Eggert authored
      * character.h (MAYBE_UNIFY_CHAR):
      * charset.c (maybe_unify_char):
      * keyboard.c (read_char, reorder_modifiers):
      XINT -> XFASTINT, since the integer must be nonnegative.
      * ftfont.c (ftfont_spec_pattern):
      * keymap.c (access_keymap, silly_event_symbol_error):
      XUINT -> XFASTINT, since the integer must be nonnegative.
      (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
      since it makes no difference and we prefer signed.
      * keyboard.c (record_char): Use XUINT when all the neighbors do.
      (access_keymap): NATNUMP -> INTEGERP, since the integer must be
      nonnegative.
      0c671da6
    • Paul Eggert's avatar
      * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacO). · 4d09bcf6
      Paul Eggert authored
      Fixes: debbugs:8800
      4d09bcf6