1. 11 Jun, 2011 6 commits
    • Paul Eggert's avatar
      * buffer.c (Qclone_number): Remove for now, as it's unused. · 4475bec4
      Paul Eggert authored
      (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
      (record_buffer): Remove unused local.
      * frame.c (other_visible_frames, frame_buffer_list): Now static.
      (set_frame_buffer_list): Remove; unused.
      * frame.h (other_visible_frames): Remove decl.
      * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
      * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
      (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
      if HAVE_GPM.
      * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
      * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
      Define only if HAVE_GPM.
      * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
      (update_hints_inhibit): Remove; never set.  All uses removed.
      * widgetprv.h (emacsFrameClassRec): Remove decl.
      * window.c (delete_deletable_window): Now returns void, since it
      wasn't returning anything.
      (compare_window_configurations): Remove unused locals.
      * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
      * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
      Omit no-longer-needed #ifdef USE_X_TOOLKIT, since USE_X_TOOLKIT is
      implied by USE_GTK || USE_MOTIF.
      (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
      the same widths as pointers.  This follows up on the 2011-05-06 patch.
      * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
      * xterm.h: Likewise.
      (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
      4475bec4
    • Martin Rudalics's avatar
      Window configuration, balancing and fit-to-buffer rewrites. · 6198ccd0
      Martin Rudalics authored
      * window.c (delete_deletable_window): Re-add.
      (Fset_window_configuration): Rewrite to handle dead buffers and
      consequently deletable windows.
      (window_tree, Fwindow_tree): Remove.  Supply functionality in
      window.el.
      (compare_window_configurations): Simplify code.
      
      * window.el (window-tree-1, window-tree): New functions, moving
      the latter to window.el.
      (bw-get-tree, bw-get-tree-1, bw-find-tree-sub)
      (bw-find-tree-sub-1, bw-l, bw-t, bw-r, bw-b, bw-dir, bw-eqdir)
      (bw-refresh-edges): Remove.
      (balance-windows-1, balance-windows-2): New functions.
      (balance-windows): Rewrite in terms of window tree functions,
      balance-windows-1 and balance-windows-2.
      (bw-adjust-window): Remove.
      (balance-windows-area-adjust): New function with functionality of
      bw-adjust-window but using resize-window.
      (set-window-text-height): Rewrite doc-string.  Use
      normalize-live-window and resize-window.
      (enlarge-window-horizontally, shrink-window-horizontally): Rename
      argument to DELTA.
      (window-buffer-height): New function.
      (fit-window-to-buffer, shrink-window-if-larger-than-buffer):
      Rewrite using new window resize routines.
      (kill-buffer-and-window, mouse-autoselect-window-select): Use
      ignore-errors instead of condition-case.
      (quit-window): Call delete-frame instead of delete-windows-on
      for the only buffer on frame.
      6198ccd0
    • Andreas Schwab's avatar
      * src/image.c (imagemagick_load_image): Fix type mismatch. · 1ab0dee5
      Andreas Schwab authored
      (Fimagemagick_types): Likewise.
      1ab0dee5
    • Andreas Schwab's avatar
      b6e3633c
    • Martin Rudalics's avatar
      Move/add window-buffer-related functions to window.el. · 9397e56f
      Martin Rudalics authored
      * buffer.c: New Lisp objects Qbuffer_list_update_hook and
      Qclone_number.  Remove external declaration of Qdelete_window.
      (Fbuffer_list): Rewrite doc-string.  Minor restructuring of
      code.
      (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer): Run
      Qbuffer_list_update_hook if allowed.
      (Fother_buffer): Rewrite doc-string.  Major rewrite for new
      buffer list implementation.
      (other_buffer_safely): New function.
      (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
      calls to replace_buffer_in_windows and
      replace_buffer_in_windows_safely.  Run Qbuffer_list_update_hook
      if allowed.
      (record_buffer): Inhibit quitting and rewrite using quittable
      functions.  Run Qbuffer_list_update_hook if allowed.
      (Frecord_buffer, Funrecord_buffer): New functions.
      (switch_to_buffer_1, Fswitch_to_buffer): Remove.  Move
      switch-to-buffer to window.el.
      (bury-buffer): Move to window.el.
      (Vbuffer_list_update_hook): New variable.
      
      * lisp.h (other_buffer_safely): Add prototype in buffer.c
      section.
      
      * window.h (resize_frame_windows): Move up in code.
      (Fwindow_frame): Remove EXFUN.
      (replace_buffer_in_all_windows): Remove prototype.
      (replace_buffer_in_windows_safely): Add prototype.
      
      * window.c: Declare Qdelete_window static again.  Move down
      declaration of select_count.
      (Fnext_window, Fprevious_window): Rewrite doc-strings.
      (Fother_window): Move to window.el.
      (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
      cases.  Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
      (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
      window.el.
      (replace_buffer_in_windows): Implement by calling
      Qreplace_buffer_in_windows.
      (replace_buffer_in_all_windows): Remove with some functionality
      moved into replace_buffer_in_windows_safely.
      (replace_buffer_in_windows_safely): New function.
      (select_window_norecord, select_frame_norecord): Move in front
      of run_window_configuration_change_hook.  Remove now obsolete
      declarations.
      (Fset_window_buffer): Rewrite doc-string.  Call
      Qrecord_window_buffer.
      (keys_of_window): Move binding for other-window to window.el.
      
      * loadup.el (top-level): Load window before files for the sake
      of replace-buffer-in-windows.
      
      * files.el (read-buffer-to-switch)
      (switch-to-buffer-other-window)
      (switch-to-buffer-other-frame, display-buffer-other-frame): Move
      to window.el.
      
      * simple.el (get-next-valid-buffer, last-buffer, next-buffer)
      (previous-buffer): Move to window.el.
      
      * bindings.el (unbury-buffer): Move to window.el.
      
      * window.el (delete-other-windows-vertically): Move after
      definition of delete-other-windows.
      (other-window, delete-windows-on, replace-buffer-in-windows):
      Move here from window.c.
      (record-window-buffer, unrecord-window-buffer)
      (set-window-buffer-start-and-point, switch-to-prev-buffer)
      (switch-to-next-buffer): New functions.
      (get-next-valid-buffer, last-buffer, next-buffer): Move here
      from simple.el.  Call switch-to-next-buffer.
      (previous-buffer): Move here from simple.el.  Call
      switch-to-prev-buffer.
      (bury-buffer): Move here from buffer.c.  Switch to previous
      buffer when window cannot be deleted.
      (unbury-buffer): Move here from bindings.el.
      (ctl-x-map): Move binding for other-window from window.c to
      here.
      (read-buffer-to-switch, switch-to-buffer-other-window)
      (switch-to-buffer-other-frame): Move here from files.el.
      (normalize-buffer-to-switch-to): New functions.
      (switch-to-buffer): Move here from buffer.c.  Use
      read-buffer-to-switch and normalize-buffer-to-switch-to.
      9397e56f
    • Chong Yidong's avatar
      Cruft removal in struct image. · b50691aa
      Chong Yidong authored
      * src/dispextern.h (struct image): Replace data member, whose int_val
      and ptr_val fields were not used by anything, with a single
      lisp_val object.
      
      * src/image.c (Fimage_metadata, make_image, mark_image, tiff_load)
      (gif_clear_image, gif_load, imagemagick_load_image)
      (gs_clear_image, gs_load): Callers changed.
      b50691aa
  2. 10 Jun, 2011 14 commits
    • Paul Eggert's avatar
      * buffer.h: Include <time.h>, for time_t. · cca69397
      Paul Eggert authored
      Needed to build on FreeBSD 8.2.  Problem reported by Herbert J. Skuhra.
      cca69397
    • Paul Eggert's avatar
      Merge: Fix minor problems found by static checking. · 109e28d0
      Paul Eggert authored
      * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
      
      Make identifiers static if they are not used in other modules.
      * data.c (Qcompiled_function, Qframe, Qvector):
      * image.c (QimageMagick, Qsvg):
      * minibuf.c (Qmetadata):
      * window.c (resize_window_check, resize_root_window): Now static.
      * window.h (resize_window_check, resize_root_window): Remove decls.
      
      * window.c (window_deletion_count, delete_deletable_window):
      Remove; unused.
      (window_body_lines): Now static.
      (Fdelete_other_windows_internal): Mark vars as initialized.
      Make sure 'resize_failed' is initialized.
      (run_window_configuration_change_hook): Rename local to avoid shadowing.
      (resize_window_apply): Remove unused local.
      * window.h (delete_deletable_window): Remove decl.
      
      * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
      (imagemagick_load_image): Fix pointer signedness problem by changing
      last arg from unsigned char * to char *.  All uses changed.
      Also, fix a local for similar reasons.
      Remove unused locals.  Remove locals to avoid shadowing.
      (fn_rsvg_handle_free): Remove; unused.
      (svg_load, svg_load_image): Fix pointer signedness problem.
      (imagemagick_load_image): Don't use garbage pointer image_wand.
      
      * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
      109e28d0
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      Make identifiers static if they are not used in other modules. · 4b66faf3
      Paul Eggert authored
      * data.c (Qcompiled_function, Qframe, Qvector):
      * image.c (QimageMagick, Qsvg):
      * minibuf.c (Qmetadata):
      * window.c (resize_window_check, resize_root_window): Now static.
      * window.h (resize_window_check, resize_root_window): Remove decls.
      4b66faf3
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      * window.c: Fix minor problems reported by GCC 4.6.0. · 46a4ce9e
      Paul Eggert authored
      (window_deletion_count, delete_deletable_window): Remove; unused.
      (window_body_lines): Now static.
      (Fdelete_other_windows_internal): Mark vars as initialized.
      Make sure 'resize_failed' is initialized.
      (run_window_configuration_change_hook): Rename local to avoid shadowing.
      (resize_window_apply): Remove unused local.
      * window.h (delete_deletable_window): Remove decl.
      46a4ce9e
    • Paul Eggert's avatar
      * image.c: Fix minor problems reported by GCC 4.6.0. · 33290528
      Paul Eggert authored
      (gif_load, svg_load_image): Rename locals to avoid shadowing.
      (imagemagick_load_image): Fix pointer signedness problem by changing
      last arg from unsigned char * to char *.  All uses changed.
      Also, fix a local for similar reasons.
      Remove unused locals.  Remove locals to avoid shadowing.
      (fn_rsvg_handle_free): Remove; unused.
      (svg_load, svg_load_image): Fix pointer signedness problem.
      33290528
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      * movemail.c: Fix race condition and related bugs (Bug#8836). · 529a133c
      Paul Eggert authored
      (main) [!MAIL_USE_SYSTEM_LOCK]: Prefer mkstemp to mktemp, as this
      fixes some race conditions.  Report mkstemp/mktemp errno rather
      than a possibly-garbage errno.  Reinitialize the template each
      time through the loop, as earlier mkstemp/mktemp calls could have
      trashed it.  Pass 0600 (not 0666) to mktemp, for consistency
      with mkstemp; the permissions don't matter anyway.
      529a133c
    • Chong Yidong's avatar
    • Martin Rudalics's avatar
      Some more window.h fixes missing in 2011-06-10T06:55:18Z!rudalics@gmx.at. · 2c8e37d4
      Martin Rudalics authored
      * window.h (resize_proportionally, orig_total_lines)
      (orig_top_line): Remove from window structure.
      (set_window_height, set_window_width, change_window_heights)
      (Fdelete_window): Remove prototypes.
      (resize_frame_windows): Remove duplicate declaration.
      2c8e37d4
    • Eli Zaretskii's avatar
      Avoid compiler warnings about missing prototypes of window.c functions. · 440a42e3
      Eli Zaretskii authored
       src/window.h (resize_frame_windows, resize_window_check)
       (delete_deletable_window, resize_root_window)
       (resize_frame_windows): Declare prototypes.
       src/ window.c (resize_window_apply): Make definition be "static" to
       match the prototype.
      440a42e3
    • Martin Rudalics's avatar
      Move window resize code from window.c to window.el. · 562dd5e9
      Martin Rudalics authored
      * window.c: Remove declarations of Qwindow_size_fixed,
      window_min_size_1, window_min_size_2, window_min_size,
      size_window, window_fixed_size_p, enlarge_window, delete_window.
      Remove static from declaration of Qdelete_window, it's
      temporarily needed by Fbury_buffer.
      (replace_window): Don't assign orig_top_line and
      orig_total_lines.
      (Fdelete_window, delete_window): Remove.  Window deletion is
      handled by window.el.
      (window_loop): Remove DELETE_OTHER_WINDOWS case.  Replace
      Fdelete_window calls with calls to Qdelete_window.
      (Fdelete_other_windows): Remove.  Deleting other windows is
      handled by window.el.
      (window_fixed_size_p): Remove.  Fixed-sizeness of windows is
      handled in window.el.
      (window_min_size_2, window_min_size_1, window_min_size): Remove.
      Window minimum sizes are handled in window.el.
      (shrink_windows, size_window, set_window_height)
      (set_window_width, change_window_heights, window_height)
      (window_width, CURBEG, CURSIZE, enlarge_window)
      (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
      (Fenlarge_window, Fshrink_window): Remove.  Window resizing is
      handled in window.el.
      (make_dummy_parent): Rename to make_parent_window and give it a
      second argument horflag.
      (make_window): Don't set resize_proportionally any more.
      (Fsplit_window): Remove.  Windows are split in window.el.
      (save_restore_action, save_restore_orig_size)
      (shrink_window_lowest_first, save_restore_orig_size): Remove.
      Resize mini windows in window.el.
      (grow_mini_window, shrink_mini_window): Implement by calling
      Qresize_root_window_vertically, resize_window_check and
      resize_window_apply.
      (saved_window, Fset_window_configuration, save_window_save): Do
      not handle orig_top_line, orig_total_lines, and
      resize_proportionally.
      (window_min_height, window_min_width): Move to window.el.
      (keys_of_window): Move bindings for delete-other-windows,
      split-window, delete-window and enlarge-window to window.el.
      
      * buffer.c: Temporarily extern Qdelete_window.
      (Fbury_buffer): Temporarily call Qdelete_window instead of
      Fdelete_window (Fbury_buffer will move to window.el soon).
      
      * frame.c (set_menu_bar_lines_1): Remove code handling
      orig_top_line and orig_total_lines.
      
      * dispnew.c (adjust_frame_glyphs_initially): Don't use
      set_window_height but set heights directly.
      (change_frame_size_1): Use resize_frame_windows.
      
      * xdisp.c (init_xdisp): Don't use set_window_height but set
      heights directly.
      
      * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Use
      resize_frame_windows instead of change_window_heights and run
      run_window_configuration_change_hook.
      
      * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
      instead of change_window_heights and run
      run_window_configuration_change_hook.
      
      * window.el (window-min-height, window-min-width): Move here
      from window.c.  Add defcustoms and rewrite doc-strings.
      (resize-mini-window, resize-window): New functions.
      (adjust-window-trailing-edge, enlarge-window, shrink-window):
      Move here from window.c.
      (maximize-window, minimize-window): New functions.
      (delete-window, delete-other-windows, split-window): Move here
      from window.c.
      (window-split-min-size): New function.
      (split-window-keep-point): Mention split-window-above-each-other
      instead of split-window-vertically.
      (split-window-above-each-other, split-window-vertically): Rename
      split-window-vertically to split-window-above-each-other and
      provide defalias for old definition.
      (split-window-side-by-side, split-window-horizontally): Rename
      split-window-horizontally to split-window-side-by-side and provide
      defalias for the old definition.
      (ctl-x-map): Move bindings for delete-window,
      delete-other-windows and enlarge-window here from window.c.
      Replace bindings for split-window-vertically and
      split-window-horizontally by bindings for
      split-window-above-each-other and split-window-side-by-side.
      
      * cus-start.el (all): Remove entries for window-min-height and
      window-min-width.  Add entries for window-splits and
      window-nest.
      562dd5e9
    • Katsumi Yamaoka's avatar
      Improve Gnus' dribble data handling. · b229f37d
      Katsumi Yamaoka authored
      b229f37d
  3. 09 Jun, 2011 10 commits
  4. 08 Jun, 2011 9 commits
    • Paul Eggert's avatar
      7e2aa385
    • 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
  5. 07 Jun, 2011 1 commit
    • 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