1. 13 Feb, 2013 4 commits
  2. 12 Feb, 2013 5 commits
  3. 11 Feb, 2013 8 commits
    • Paul Eggert's avatar
      Tune by using memchr and memrchr. · a84b7c53
      Paul Eggert authored
      * .bzrignore: Add string.h.
      * admin/merge-gnulib (GNULIB_MODULES): Add memrchr.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * lib/memrchr.c, lib/string.in.h, m4/memrchr.m4, m4/string_h.m4:
      New files, from gnulib.
      * src/doc.c (Fsnarf_documentation):
      * src/fileio.c (Fsubstitute_in_file_name):
      * src/search.c (find_newline, scan_newline):
      * src/xdisp.c (pos_visible_p, display_count_lines):
      Use memchr and memrchr rather than scanning byte-by-byte.
      * src/search.c (find_newline): Rename from scan_buffer.
      Omit first arg TARGET, as it's always '\n'.  All callers changed.
    • Paul Eggert's avatar
      Improve AIX port. · 227be86d
      Paul Eggert authored
      This doesn't fix the bug, but it makes progress: Emacs builds now.
      * unexaix.c: Include inttypes.h, stdarg.h.
      (report_error, report_error_1): Mark as _Noreturn.
      (report_error): Don't report the wrong errno.
      (report_error_1): Now varargs.  All callers changed.
      (make_hdr): Use uintptr_t, not unsigned, when converting pointers
      to unsigned.  Don't use ADDR_CORRECT, as it no longer exists.
      (write_ptr): Use %p to print address rather than %lx and a cast
      to unsigned long.  Grow buffer a bit, to be safer.
      Fixes: debbugs:13650
    • Paul Eggert's avatar
      Clean up read_key_sequence a tiny bit more. · b09a4810
      Paul Eggert authored
      * keyboard.c (read_char_x_menu_prompt) [HAVE_MENUS]:
      (read_key_sequence): Remove unused locals.
    • Stefan Monnier's avatar
      Clean up read_key_sequence a bit; reread active keymaps after first event. · 99d0d6dc
      Stefan Monnier authored
      * src/keyboard.c (read_char, read_char_x_menu_prompt)
      Replace nmaps+maps with a single `map' arg.
      (follow_key): Operate on a single map.
      (active_maps): New function.
      (test_undefined): Also return true for nil bindings.
      (read_key_sequence): Use active_maps to replace the arrays of keymaps with
      a single (composed) keymap.  Remember `first_event' to choose the right
      set of active keymaps.  Recompute the set of keymaps after receiving
      the first event.  Remove GOBBLE_FIRST_EVENT.
      (syms_of_keyboard): Remove inhibit_local_menu_bar_menus.
      * src/keyboard.h (read_char): Update declaration.
      * src/lread.c (read_filtered_event): Adjust call to read_char.
      * lisp/cus-start.el (all): Remove inhibit-local-menu-bar-menus.
    • Eli Zaretskii's avatar
      Fix previous commit for bug #13675. · f5e1b680
      Eli Zaretskii authored
       src/xdisp.c (move_it_vertically_backward, move_it_by_lines): Don't
       use the limitation on backwards movement when lines are truncated
       in the window.
    • Eli Zaretskii's avatar
      Fix rare aborts in bidi.c. · 713bfeaa
      Eli Zaretskii authored
       src/bidi.c (bidi_resolve_neutral): After finding the next
       non-neutral character, accept NEUTRAL_ON type as well, because
       directional control characters, such as LRE and RLE, have their
       type converted to that by bidi_resolve_weak.  This avoids aborts
       when LRE/RLE follows a run of neutrals.
       (bidi_move_to_visually_next): Assert that return value of
       bidi_peek_at_next_level is non-negative.  Negative values will
       cause an infloop.
    • Dmitry Antipov's avatar
      * marker.c (set_marker_internal): If desired position is passed · f74de345
      Dmitry Antipov authored
      as a marker, avoid call to buf_charpos_to_bytepos.
      * window.c (Fset_window_point): Omit redundant type checking.
      (Fset_window_start): Likewise.  Format comment.
      (window_scroll_pixel_based): Use set_marker_restricted_both
      with character and byte positions obtained from an iterator.
      (Fset_window_configuration): Use set_marker_restricted_both.
      * xdisp.c (message_dolog): Likewise.
    • Paul Eggert's avatar
  4. 10 Feb, 2013 3 commits
  5. 09 Feb, 2013 5 commits
    • Paul Eggert's avatar
      Minor hashing refactoring. · eff1c190
      Paul Eggert authored
      * fns.c (SXHASH_REDUCE): Move to lisp.h.
      (sxhash_float): Return EMACS_UINT, for consistency with the other
      hash functions.
      * lisp.h (INTMASK): Now a macro, since SXHASH_REDUCE is now a
      non-static inline function and therefore can't use static vars.
      (SXHASH_REDUCE): Move here from fns.c, and make it inline.
      * profiler.c (hashfn_profiler): Use SXHASH_REDUCE, to be consistent
      with the other hash functions.
    • Eli Zaretskii's avatar
      Fix last ChangeLog entry. · 4dde2087
      Eli Zaretskii authored
      Fixes: debbugs:13661
    • Eli Zaretskii's avatar
      Fix bug #13661 with w32-downcase-file-names and shell-command. · 74ba1583
      Eli Zaretskii authored
       src/callproc.c (Fcall_process_region): Make sure the XXXXXX part of
       the temporary file pattern is not downcased even when
       w32-downcase-file-names is non-nil.
    • Eli Zaretskii's avatar
      Remove all references to buffer-file-type and related features. · 8549f9e8
      Eli Zaretskii authored
       src/xdisp.c (decode_mode_spec): Remove handling of %t.
       lisp/net/ange-ftp.el (ange-ftp-insert-file-contents): Don't reference
       lisp/mail/feedmail.el (feedmail-force-binary-write): Doc fix.
       (feedmail-run-the-queue, feedmail-dump-message-to-queue)
       (feedmail-send-it-immediately): Don't bind buffer-file-type, bind
       coding-system-for-write instead.
       lisp/jka-compr.el (jka-compr-write-region): Don't bind
       lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't bind
       lisp/files.el (file-name-buffer-file-type-alist): Remove defvar.
       (insert-file-contents-literally): Remove reference to
       lisp/dos-w32.el (file-name-buffer-file-type-alist): Deprecate and
       (find-buffer-file-type-match, find-buffer-file-type): Remove.
       (find-buffer-file-type-coding-system): Remove references to
       find-buffer-file-type-match, find-buffer-file-type, and
       Don't put find-buffer-file-type-coding-system into
       (find-file-binary, find-file-text): Bind coding-system-for-read
       instead of file-name-buffer-file-type-alist.
       lisp/erc/erc-dcc.el (erc-dcc-get-file): Don't reference buffer-file-type.
       doc/emacs/msdog.texi (Text and Binary): Delete the description of
       doc/lispref/modes.texi (%-Constructs): Remove the description of %t.
       doc/lispref/nonascii.texi (MS-DOS File Types): Delete node.
      Fixes: debbugs:12989
    • Eli Zaretskii's avatar
      src/msdos.c (careadlinkatcwd): Remove. · 6b48c831
      Eli Zaretskii authored
  6. 08 Feb, 2013 4 commits
    • Stefan Monnier's avatar
      * src/lread.c (skip_dyn_bytes): New function. · 75a65c7e
      Stefan Monnier authored
      (read1): Use it.  Use getc instead of READCHAR to read bytes.
      (load_each_byte): Remove.  Update users.
      Fixes: debbugs:12598
    • Dmitry Antipov's avatar
      * search.c (scan_buffer): Calculate end byte position just once. · 8ca30920
      Dmitry Antipov authored
      (scan_newline): Do not recalculate start_byte.
      (search_command): Use eassert.
      * syntax.c (struct lisp_parse_state): New member location_byte.
      (scan_sexps_forward): Record from_byte and avoid redundant
      character to byte position calculation ...
      (Fparse_partial_sexp): ... here.  Break too long line.
    • Eli Zaretskii's avatar
    • Dmitry Antipov's avatar
      * lisp.h (make_uninit_vector): New function. · 25721f5b
      Dmitry Antipov authored
      * alloc.c (Fvector, Fmake_byte_code):
      * ccl.c (Fregister_ccl_program):
      * charset.c (Fdefine_charset_internal, define_charset_internal):
      * coding.c (make_subsidiaries, Fdefine_coding_system_internal):
      * composite.c (syms_of_composite):
      * font.c (Fquery_font, Ffont_info, syms_of_font):
      * fontset.c (FONT_DEF_NEW, Fset_fontset_font):
      * ftfont.c (ftfont_shape_by_flt):
      * indent.c (recompute_width_table):
      * nsselect.m (clean_local_selection_data):
      * syntax.c (init_syntax_once):
      * w32unsubscribe.c (uniscribe_shape):
      * window.c (Fcurrent_window_configuration):
      * xfaces.c (Fx_family_fonts):
      * xselect.c (selection_data_to_lisp_data): Use it.
  7. 07 Feb, 2013 1 commit
  8. 06 Feb, 2013 1 commit
  9. 05 Feb, 2013 2 commits
    • Daniel Colascione's avatar
    • Jan Djärv's avatar
      * lisp/cus-start.el (all): Add ns-use-native-fullscreen. · 6871e574
      Jan Djärv authored
      * src/nsmenu.m (update_frame_tool_bar): Check for negative tool bar
      * src/nsterm.h (HAVE_NATIVE_FS): Define if OSX => 10.7.
      (EmacsView): Add fs_is_native, fsIsNative, isFullscreen and
      * src/nsterm.m (NEW_STYLE_FS): Remove.
      (ns_last_use_native_fullscreen): New variable.
      (x_make_frame_visible): Replace NEW_STYLE_FS with isFullscreen.
      (x_set_window_size): Do not take title bar and tool bar into account
      if isFullscreen returns YES.
      (ns_fullscreen_hook): Replace NEW_STYLE_FS with isFullscreen.
      (check_native_fs): New function.
      (ns_select, ns_read_socket): Call check_native_fs if HAVE_NATIVE_FS.
      (ns_term_init): Remove NEW_STYLE_FS.
      (updateFrameSize:, windowWillResize:toSize:): Only adjust for title bar
      and tool bar if isFullscreen returns NO.
      (windowDidResize:): Replace NEW_STYLE_FS with fsIsNative.
      (initFrameFromEmacs:): Initialize fs_is_native.  Replace NEW_STYLE_FS
      with HAVE_NATIVE_FS.
      (window:willUseFullScreenPresentationOptions:): New method.
      (windowDidEnterFullScreen:): Replace NEW_STYLE_FS with fsIsNative.
      Hide toolbar if not enabled.
      (windowDidExitFullScreen:): Call updateCollectionBehaviour.
      Restore tool bar if enabled, hide it otherwise (Bug#13444).
      (fsIsNative, isFullscreen, updateCollectionBehaviour): New methods.
      (toggleFullScreen:): If fs_is_native, call toggleFullScreen on
      window.  Do no set FRAME_EXTERNAL_TOOL_BAR (f) to 0.
      Check FRAME_EXTERNAL_TOOL_BAR (f) before restoring
      FRAME_TOOLBAR_HEIGHT (f).  Call updateFrameSize when going non-fs.
      (syms_of_nsterm): Add ns-use-native-fullscreen.
  10. 04 Feb, 2013 2 commits
  11. 03 Feb, 2013 1 commit
  12. 02 Feb, 2013 3 commits
    • Paul Eggert's avatar
      Avoid file time stamp bug on MS-Windows. · 8ea41ea9
      Paul Eggert authored
      * fileio.c (Fwrite_region): Don't use the heuristic on empty files,
      as FAT32 doesn't update time stamps when truncating them.
      Also, check that a file time stamp is not a multiple of 100 ns;
      this should catch all instances of the problem on MS-Windows,
      as its native file system resolution is 100 ns or worse, and
      checking for a non-multiple of 100 ns should impose only a small
      overhead on systems with ns resolution.
      Fixes: debbugs:13149
    • Eli Zaretskii's avatar
      Avoid encoding file names run through dostounix_filename on MS-Windows. · e7ac588e
      Eli Zaretskii authored
       src/w32.c (normalize_filename): Accept an additional argument
       MULTIBYTE; if non-zero, traverse the file name by bytes and don't
       downcase it even if w32-downcase-file-names is non-nil.
       (dostounix_filename): Accept an additional argument MULTIBYTE and
       pass it to normalize_filename.
       (emacs_root_dir): Adjust.
       src/msdos.h (dostounix_filename): Adjust prototype.
       src/w32.h (dostounix_filename): Adjust prototype.
       src/msdos.c (dostounix_filename): Accept an additional argument and
       ignore it.
       (init_environment): Adjust callers of dostounix_filename.
       src/fileio.c (Ffile_name_directory, file_name_as_directory)
       (directory_file_name, Fexpand_file_name)
       (Fsubstitute_in_file_name): [DOS_NT] Adjust call to
       [WINDOWSNT]: Downcase file names if w32-downcase-file-names is
       (Fsubstitute_in_file_name): [DOS_NT] Don't downcase environment
       variables, as egetenv is case-insensitive for DOS_NT.
       src/dired.c (file_name_completion): Don't call Fdirectory_file_name
       with an encoded file name.
       src/w32proc.c (Fw32_short_file_name, Fw32_long_file_name): Adjust
       calls to dostounix_filename.
       src/w32fns.c (Fx_file_dialog): Adjust call to dostounix_filename.
       src/unexw32.c (unexec): Adjust call to dostounix_filename.
       src/termcap.c (tgetent) [MSDOS]: Adjust call to dostounix_filename.
       src/emacs.c (decode_env_path) [DOS_NT]: Adjust call to
       src/callproc.c (Fcall_process) [MSDOS]: Adjust call to
    • Paul Eggert's avatar
      Spelling fixes. · d9c287e5
      Paul Eggert authored
  13. 01 Feb, 2013 1 commit
    • Paul Eggert's avatar
      Fix timestamp bug when write-region appends nothing. · 35e85499
      Paul Eggert authored
      * fileio.c (Fwrite_region): When neither O_EXCL nor O_TRUNC is used,
      the file's time stamp doesn't change if Emacs happens to write nothing
      to the file, and on a buggy file system this could cause Emacs to
      incorrectly infer that the file system doesn't have the bug.
      Avoid this problem by inhibiting the inference in this case.
      Fixes: debbugs:13149