1. 11 Aug, 2014 2 commits
    • Jan Djärv's avatar
      Fix default width not being 80, but 77. · fe2f33e8
      Jan Djärv authored
      * nsfns.m (Fx_create_frame): Call adjust_frame_size,
      set f->official.
    • Glenn Morris's avatar
      Revert 2013-01-31 change that decides coding system before backing up · f314e84f
      Glenn Morris authored
      It causes a more serious problem than the one it solves.
      This closes bug#18141, and reopens bug#13522.
      * lisp/files.el (basic-save-buffer-2): Revert 2013-01-31 change.
      * src/fileio.c: Revert 2013-01-31 change.
      (choose_write_coding_system): No longer callable from Lisp.
      Move last piece back here from Fwrite_region.
      (Fwrite_region, syms_of_fileio): Update for above changes.
      * test/automated/data/files-bug18141.el.gz: New file.
      * test/automated/files.el (files-test-bug-18141-file):
      New variable and test.
  2. 10 Aug, 2014 2 commits
    • Reuben Thomas's avatar
      Fix a couple of recent inadvertent breaks of the MSDOS port. · 643a0303
      Reuben Thomas authored
      src/msdos.c: include required menu.h
      src/term.c: set correct menu_show_hook on MSDOS.
    • Martin Rudalics's avatar
      Fix handling of menu bar line on TTY frames (Bug#18136) (Bug#18196). · c29f96fa
      Martin Rudalics authored
      * dispnew.c (handle_window_change_signal):
      * keyboard.c (Fsuspend_emacs): Call change_frame_size with
      frame's menu bar lines subtracted from height.
      * frame.c (frame_inhibit_resize): Inhibit resizing of TTY
      (adjust_frame_size): Count in menu bar when setting FrameRows.
      (make_terminal_frame): When setting up the frame's lines and
      text height don't count in the menu bar.
      (Fmake_terminal_frame): Call adjust_frame_size with menu bar
      lines subtracted from height.
      (do_switch_frame): Set tty's FrameRows to number of total lines
      of frame.
      (Fframe_pixel_height, Fframe_pixel_width): If no window system
      is used, return total number of lines and columns.
      * menu.c (emulate_dialog_with_menu): Use FRAME_TOTAL_LINES instead
      of FRAME_LINES.
      * term.c (OUTPUT, tty_set_terminal_modes)
      (tty_set_terminal_window, tty_set_scroll_region)
      (tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face)
      (tty_ins_del_lines, tty_menu_display, tty_menu_activate): Use
      (Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES.
      Call change_frame_size with frame's menu bar lines subtracted
      from height.
      * w32console.c (w32con_clear_to_end, w32con_clear_frame)
      (w32con_ins_del_lines): Use FRAME_TOTAL_LINES instead of
  3. 09 Aug, 2014 5 commits
  4. 08 Aug, 2014 1 commit
    • Martin Rudalics's avatar
      Fix some doc-strings in window.c (Bug#18112) (Bug#18194). · 8faa5ee7
      Martin Rudalics authored
      * window.c (Fwindow_valid_p): Fix doc-string (Bug#18194).
      (Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal)
      (Fwindow_new_pixel, Fset_window_new_pixel)
      (Fset_window_new_total, Fset_window_new_normal)
      (Fwindow_resize_apply): Fix doc-strings (see Bug#18112).
  5. 07 Aug, 2014 3 commits
  6. 05 Aug, 2014 3 commits
  7. 04 Aug, 2014 2 commits
    • Martin Rudalics's avatar
      Fix scroll bar handling for non-toolkit builds. · 4a75c94d
      Martin Rudalics authored
      * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS): Condition
      correctly according to toolkit used.
      * frame.c (make_initial_frame, make_terminal_frame)
      (x_set_horizontal_scroll_bars, x_set_scroll_bar_height)
      (Vdefault_frame_horizontal_scroll_bars): Correctly condition
      assignments according to presence of toolkit scrollbars.
      * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Condition
      correctly according to toolkit used.
      * window.c (set_window_scroll_bars): Set horizontal scroll bar
      only if toolkit supports it.
      * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if
      * xterm.c (x_scroll_bar_create): Initialize horizontal slot for
      non-toolkit builds.
      (XTredeem_scroll_bar): Always redeem scroll bar if present.
    • Dmitry Antipov's avatar
      * keyboard.c (safe_run_hook_funcall): Avoid consing around · f045dbe6
      Dmitry Antipov authored
      Vinhibit_quit and prefer internal_condition_case_n to pass args.
      (safe_run_hooks_error, safe_run_hooks_1): Adjust accordingly.
      (safe_run_hooks): Remove comment which is not relevant any more.
  8. 03 Aug, 2014 4 commits
    • Paul Eggert's avatar
      Don't let big frames overrun the stack. · 8d2f1984
      Paul Eggert authored
      * dispnew.c (mirrored_line_dance, mirror_line_dance, scrolling):
      Use SAFE_NALLOCA, not alloca.
    • Paul Eggert's avatar
      Don't mishandle year-9999 dates. · 308cc448
      Paul Eggert authored
      * lisp/calendar/parse-time.el (parse-time-rules):
      Allow years up to most-positive-fixnum.
      * lisp/calendar/time-date.el (date-to-time):
      Pass "Specified time is not representable" errors through.
      * lisp/url/url-cookie.el (url-cookie-expired-p): Treat out-of-range
      expiration dates as if they were far in the future.
      * src/editfns.c (decode_time_components): Store an invalid timespec
      on overflow, instead of returning false, so that the caller can
      distinguish overflow from other errors.
      (lisp_time_argument, lisp_seconds_argument): If the time is out
      of range, signal a time overflow instead of an invalid time spec.
      * src/keyboard.c (decode_timer): Treat time overflow like other
      timespec errors.
      Fixes: debbugs:18176
    • Paul Eggert's avatar
      Avoid undefined behavior with signed left shift. · 8f88f7d3
      Paul Eggert authored
      Caught by 'gcc -fsanitize=undefined'.
      * dispextern.h, scroll.c (scrolling_max_lines_saved, scrolling_1):
      * dispnew.c (line_hash_code, scrolling):
      * scroll.c (calculate_scrolling, calculate_direct_scrolling):
      Use 'unsigned', not 'int', for line hashes.
      (scrolling_max_lines_saved): Avoid mystery constants for hash sizes.
    • Dmitry Antipov's avatar
      Fix bug with an attempt to select uninitialized frame (Bug#18161). · a270fa7c
      Dmitry Antipov authored
      * xfns.c (Fx_create_frame): Move call to change_frame_size to
      a section where Lisp evaluation is disabled.  This way a pointer
      to uninitialized frame is not accessible from Lisp, which becomes
      critical if following call to x_figure_window_size throws an error.
  9. 02 Aug, 2014 5 commits
  10. 01 Aug, 2014 4 commits
  11. 31 Jul, 2014 2 commits
    • Paul Eggert's avatar
      Simplify timerfd configuration and fix some minor glitches. · 5c6476b4
      Paul Eggert authored
      * configure.ac (HAVE_TIMERFD): Define only if TFD_CLOEXEC works,
      since the code leaked file descriptors to children when !TFD_CLOEXEC.
      (HAVE_TIMERFD_CLOEXEC): Remove; no longer used.
      * m4/clock_time.m4 (gl_CLOCK_TIME): Don't check for clock_getres.
      This reverts the previous change to this file, so it matches
      gnulib again.
      * src/atimer.c (TIMERFD_CREATE_FLAGS): Remove; we now assume TFD_CLOEXEC.
      (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
      Fall back on timer_create if timerfd_create fails at runtime.
      (resolution) [HAVE_CLOCK_GETRES]: Remove; we now rely on the
      kernel primitives to do resolution.  All uses removed.
      (timerfd) [!HAVE_TIMERFD]: Define to be -1, for convenience.
      (turn_on_atimers): Clear timer_create-based timers too,
      for consistency.
    • Paul Eggert's avatar
      * frame.c (x_set_frame_parameters): Don't use uninitialized locals. · f3655f35
      Paul Eggert authored
      Without this change, the code can access the local variable 'width'
      even when it has not been initialized, and likewise for 'height';
      in either case this leads to undefined behavior.
  12. 30 Jul, 2014 2 commits
  13. 29 Jul, 2014 4 commits
  14. 28 Jul, 2014 1 commit
    • Martin Rudalics's avatar
      Fix some issues with setting the frame height. · 5dc4b8ca
      Martin Rudalics authored
      * frame.c (x_set_frame_parameters): Revert part of 2014-07-24
      change that added the top margin height to the requested height
      and revert (undocumented) part of 2014-07-28 change that changed
      the logic of whether a size change occurred.