1. 02 Feb, 2013 1 commit
    • 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
       dostounix_filename.
       [WINDOWSNT]: Downcase file names if w32-downcase-file-names is
       non-nil.
       (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
       dostounix_filename.
       src/callproc.c (Fcall_process) [MSDOS]: Adjust call to
       dostounix_filename.
      e7ac588e
  2. 01 Feb, 2013 5 commits
    • 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
      35e85499
    • Eli Zaretskii's avatar
      Make sure program names are encoded before using them to invoke subprocesses. · e7c3fb06
      Eli Zaretskii authored
       src/callproc.c (Fcall_process): Make sure program name in PATH and
       new_argv[0] is encoded, if needed.  Otherwise, un-encoded string
       is passed to exec/spawnve, which fails unless the file-name
       encoding is UTF-8.
      e7c3fb06
    • Eli Zaretskii's avatar
      w32proc.c (sys_spawnve): Initialize escape_char. · 18a80473
      Eli Zaretskii authored
       src/w32proc.c (sys_spawnve): Make sure escape_char is initialized,
       even if w32-quote-process-args is nil.
      18a80473
    • Dmitry Antipov's avatar
      * window.h (struct window): Convert base_line_number, base_line_pos · 422ff52b
      Dmitry Antipov authored
      and column_number_displayed members from Lisp_Object to ptrdiff_t.
      Convert region_showing member from Lisp_Object to bitfield.
      Remove sequence_number member.  Adjust comments.
      * window.c (sequence_number): Remove.
      (make_window): Initialize column_number_displayed.
      * print.c (print_object): Follow the printed representation of
      frames and print window pointer to distinguish between windows.
      (adjust_window_count): Invalidate base_line_pos.  Adjust comment.
      * xdisp.c (wset_base_line_number, wset_base_line_pos)
      (wset_column_number_displayed, wset_region_showing): Remove.
      (window_buffer_changed, mode_line_update_needed, redisplay_internal)
      (try_scrolling, try_cursor_movement, redisplay_window)
      (try_window_reusing_current_matrix, try_window_id, display_line)
      (display_mode_lines, decode_mode_spec): Adjust users.
      * .gdbinit (pwinx): Do not print sequence_number.
      422ff52b
    • Paul Eggert's avatar
      Use fdopendir, fstatat and readlinkat, for efficiency. · 8654f9d7
      Paul Eggert authored
      On my host, this speeds up directory-files-and-attributes by a
      factor of 3, when applied to Emacs's src directory.
      These functions are standardized by POSIX and are common these
      days; fall back on a (slower) gnulib implementation if the host
      is too old to supply them.
      * .bzrignore: Add lib/dirent.h.
      * lib/Makefile.am (libgnu_a_SOURCES): Add openat-die.c, save-cwd.c.
      * lib/careadlinkat.c, lib/careadlinkat.h: Merge from gnulib,
      incorporating: 2013-01-29 careadlinkat: do not provide careadlinkatcwd.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * lib/dirent.in.h, lib/fdopendir.c, lib/fstatat.c, lib/openat-priv.h:
      * lib/openat-proc.c, lib/openat.h, m4/dirent_h.m4, m4/fdopendir.m4:
      * m4/fstatat.m4: New files, from gnulib.
      * lib/openat-die.c, lib/save-cwd.c, lib/save-cwd.h: New files.
      These last three are specific to Emacs and are not copied from gnulib.
      They are simpler than the gnulib versions and are tuned for Emacs.
      * admin/merge-gnulib (GNULIB_MODULES): Add fdopendir, fstatat, readlinkat.
      (GNULIB_TOOL_FLAGS): Do not avoid at-internal, openat-h.
      Avoid dup, open, opendir.
      * nt/inc/sys/stat.h (fstatat):
      * nt/inc/unistd.h (readlinkat): New decls.
      * src/conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): Remove.
      * src/dired.c: Include <fcntl.h>.
      (open_directory): New function, which uses open and fdopendir
      rather than opendir.  DOS_NT platforms still use opendir, though.
      (directory_files_internal, file_name_completion): Use it.
      (file_attributes): New function, with most of the old Ffile_attributes.
      (directory_files_internal, Ffile_attributes): Use it.
      (file_attributes, file_name_completion_stat): First arg is now fd,
      not dir name.  All uses changed.  Use fstatat rather than lstat +
      stat.
      (file_attributes): Use emacs_readlinkat rather than Ffile_symlink_p.
      * src/fileio.c: Include <allocator.h>, <careadlinkat.h>.
      (emacs_readlinkat): New function, with much of the old
      Ffile_symlink_p, but with an fd argument for speed.
      It uses readlinkat rather than careadlinkatcwd, so that it
      need not assume the working directory.
      (Ffile_symlink_p): Use it.
      * src/filelock.c (current_lock_owner): Use emacs_readlinkat
      rather than emacs_readlink.
      * src/lisp.h (emacs_readlinkat): New decl.
      (READLINK_BUFSIZE, emacs_readlink): Remove.
      * src/sysdep.c: Do not include <allocator.h>, <careadlinkat.h>.
      (emacs_norealloc_allocator, emacs_readlink): Remove.
      This stuff is moved to fileio.c.
      * src/w32.c (fstatat, readlinkat): New functions.
      (careadlinkat): Don't check that fd == AT_FDCWD.
      (careadlinkatcwd): Remove; no longer needed.
      
      Fixes: debbugs:13539
      8654f9d7
  3. 31 Jan, 2013 2 commits
  4. 28 Jan, 2013 2 commits
  5. 27 Jan, 2013 1 commit
  6. 26 Jan, 2013 1 commit
  7. 25 Jan, 2013 7 commits
  8. 24 Jan, 2013 3 commits
  9. 23 Jan, 2013 4 commits
    • Stefan Monnier's avatar
      * src/xdisp.c (message2, message2_nolog): Remove functions. · b09cca6a
      Stefan Monnier authored
      (message3, message3_nolog): Extract nbytes and multibyteness directly
      from the string.  Change all callers.
      (message3_nolog): Don't set message_enable_multibyte since set_message
      will reset it anyway.
      (message1, message1_nolog): Use message3.
      (vmessage): Use a stack allocated buffer rather than f->message_buf.
      (with_echo_area_buffer): Remove last two arguments.  Update all callers.
      (set_message): Drop all but the second arg, which has to be a string.
      (set_message_1): Simplify now that we know that a1 is NULL and the
      second arg is a string.
      * src/frame.h (struct frame): Remove `message_buf' field.
      Use glyphs_initialized_p instead.
      (FRAME_MESSAGE_BUF): Remove macro.
      * src/w16select.c (Fw16_set_clipboard_data): Prefer message3 to message2.
      * src/lisp.h (message2, message2_nolog): Remove declarations.
      (message3, message3_nolog): Update declarations.
      * src/keyboard.c (read_char_minibuf_menu_text)
      (read_char_minibuf_menu_width): Remove vars.
      (read_char_minibuf_menu_prompt): Rewrite the menu's construction so as
      to correctly handle multibyte strings.
      * src/frame.c (delete_frame): Don't free message_buf any more.
      * src/editfns.c (message_text, message_length): Remove vars.
      (Fmessage_box): Don't copy the Lisp string's bytes any longer.
      * src/fileio.c (auto_save_error): Use message3 instead of message2.
      * src/dispnew.c (adjust_frame_message_buffer): Remove function.
      b09cca6a
    • Eli Zaretskii's avatar
      Fix dimensions of maximized frame on MS-Windows. · 54ab1c5a
      Eli Zaretskii authored
       src/w32term.c (w32fullscreen_hook): Account correctly for the screen
       real estate used for the tool bar, the menu bar, and scroll bar.
      54ab1c5a
    • Eli Zaretskii's avatar
      Fix bug #13515 with processing DBCS file names on MS-Windows. · 6d2851de
      Eli Zaretskii authored
       src/w32.c (max_filename_mbslen): New function.
       (normalize_filename, readdir): Use it to detect locales where ANSI
       encoding of file names uses a double-byte character set (DBCS).
       If a DBCS encoding is used, advance by characters using
       CharNextExA, instead of incrementing a 'char *' pointer.  Use
       _mbslwr instead of _strlwr.
      6d2851de
    • Dmitry Antipov's avatar
      * insdel.c (prepare_to_modify_buffer): Force redisplay if · 6c27465b
      Dmitry Antipov authored
      hidden buffer is prepared to modification (Bug#13164).
      6c27465b
  10. 22 Jan, 2013 5 commits
  11. 21 Jan, 2013 2 commits
  12. 20 Jan, 2013 1 commit
    • Andreas Schwab's avatar
      Fixes: debbugs:13505 · ba14c607
      Andreas Schwab authored
      * src/coding.c (detect_coding_iso_2022): Move back mis-reordered code
      at check_extra_latin label.
      ba14c607
  13. 19 Jan, 2013 6 commits