1. 12 Jul, 2013 14 commits
    • Paul Eggert's avatar
      Clean up errno reporting and fix some errno-reporting bugs. · a773ed9a
      Paul Eggert authored
      * callproc.c (Fcall_process):
      * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
      * process.c (create_process, Fmake_network_process):
      * unexaix.c (report_error):
      * unexcoff.c (report_error):
      Be more careful about reporting the errno of failed operations.
      The code previously reported the wrong errno sometimes.
      Also, prefer report_file_errno to setting errno + report_file_error.
      (Fcall_process): Look at openp return value rather than at path,
      as that's a bit faster and clearer when there's a numeric predicate.
      * fileio.c (report_file_errno): New function, with most of the
      old contents of report_file_error.
      (report_file_error): Use it.
      (Ffile_exists_p, Ffile_accessible_directory_p):
      Set errno to 0 when it is junk.
      * fileio.c (Faccess_file):
      * image.c (x_create_bitmap_from_file):
      Use faccessat rather than opening the file, to avoid the hassle of
      having a file descriptor open.
      * lisp.h (report_file_errno): New decl.
      * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
    • Paul Eggert's avatar
      Minor EBADF fixes. · 7e649856
      Paul Eggert authored
      * process.c (create_process, wait_reading_process_output) [AIX]:
      Remove obsolete SIGHUP-related  code, as Emacs no longer disables
      SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in
      a multithreaded environment anyway).
      * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1).
    • Juanma Barranquero's avatar
      lisp/desktop.el: Minor fixes. · acfcc8c5
      Juanma Barranquero authored
      (desktop--v2s): Remove unused local variable.
      (desktop-save-buffer): Make defvar-local; adjust docstring.
      (desktop-auto-save-timeout, desktop-owner): Use ignore-errors.
      (desktop-clear, desktop-save-buffer-p): Use string-match-p.
    • Glenn Morris's avatar
      Auto-commit of generated files. · 40a62423
      Glenn Morris authored
    • Andreas Schwab's avatar
      Remove lisp/emacs-lisp/.gitignore · 20549e23
      Andreas Schwab authored
    • Andreas Schwab's avatar
    • Andreas Schwab's avatar
    • Eli Zaretskii's avatar
      Minor followup to previous commit. · 18331b90
      Eli Zaretskii authored
       lisp/simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG.
      Fixes: debbugs:14842
    • Eli Zaretskii's avatar
      Fix bug #14842 with doc strings of next-line and previous-line. · c544322e
      Eli Zaretskii authored
       lisp/simple.el (next-line, previous-line): Document TRY-VSCROLL.
    • Glenn Morris's avatar
    • Glenn Morris's avatar
      Remove some more reimplementations of cl-lib functions · 539a920c
      Glenn Morris authored
      * lisp/doc-view.el: Require cl-lib at runtime too.
      (doc-view-remove-if): Remove.
      (doc-view-search-next-match, doc-view-search-previous-match):
      Use cl-remove-if.
      * lisp/edmacro.el: Require cl-lib at runtime too.
      (edmacro-format-keys, edmacro-parse-keys): Use cl-mismatch, cl-subseq.
      (edmacro-mismatch, edmacro-subseq): Remove.
      * lisp/filesets.el: Comments.
      * lisp/shadowfile.el: Require cl-lib.
      (shadow-remove-if): Remove.
      (shadow-set-cluster, shadow-shadows-of-1, shadow-remove-from-todo):
      Use cl-remove-if.
      * lisp/wid-edit.el: Require cl-lib.
      (widget-choose): Use cl-remove-if.
      (widget-remove-if): Remove.
      * lisp/progmodes/ebrowse.el: Require cl-lib at runtime too.
      (ebrowse-delete-if-not): Remove.
      (ebrowse-browser-buffer-list, ebrowse-member-buffer-list)
      (ebrowse-tree-buffer-list, ebrowse-same-tree-member-buffer-list):
      Use cl-delete-if-not.
    • Paul Eggert's avatar
      Fix races with threads and file descriptors. · bacba3c2
      Paul Eggert authored
      * configure.ac (PTY_TTY_NAME_SPRINTF): Use emacs_close, not close.
      * src/callproc.c (Fcall_process_region):
      * src/dired.c (open_directory):
      * src/emacs.c (main, Fdaemon_initialized):
      * src/image.c (x_find_image_file):
      * src/inotify.c (Finotify_rm_watch):
      * src/lread.c (Flocate_file_internal):
      * src/process.c (Fnetwork_interface_list, Fnetwork_interface_info):
      * src/term.c (term_mouse_moveto, init_tty):
      * src/termcap.c (tgetent):
      * src/unexaix.c, src/unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
      * src/unexaix.c, src/unexcoff.c, src/unexcw.c, src/unexelf.c (unexec):
      * src/unexhp9k800.c, src/unexmacosx.c (unexec):
      * src/callproc.c (Fcall_process_region):
      Use emacs_close, not close.
      * src/sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
      New macro and function, which emulates the POSIX_CLOSE_RESTART macro
      and posix_close function on current platforms (which all lack them).
      (emacs_close): Use it.  This should fix the races on GNU/Linux and
      on AIX and on future platforms that support POSIX_CLOSE_RESTART,
      and it should avoid closing random victim file descriptors on
      other platforms.
    • Juanma Barranquero's avatar
    • Leo Liu's avatar
      * ido.el (dired-do-copy, dired): Set 'ido property. · 6c0674ee
      Leo Liu authored
      Fixes: debbugs:11954
  2. 11 Jul, 2013 18 commits
  3. 10 Jul, 2013 8 commits
    • Paul Eggert's avatar
      Port to C89. · 29abe551
      Paul Eggert authored
      * lib-src/ebrowse.c (USAGE): Remove macro with too-long string literal ...
      (usage_message): ... and replace it with this new static constant
      containing multiple literals.  All uses changed.
      * lib-src/emacsclient.c (print_help_and_exit):
      Rewrite to avoid string literals longer than the C89 limits.
      Rewrite to avoid non-constant array initializer.
      * lib-src/make-docfile.c (enum global_type): Omit trailing comma.
      * src/bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
      (B__dummy__): New dummy symbol, to pacify C89.
      * src/dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
      they can't grok varargs macros.
      * src/dispnew.c (add_window_display_history)
      * src/print.c (print_object):
      * src/xdisp.c (debug_method_add):
      Use %p printf format only for void pointers.
      * src/emacs.c (usage_message): New constant, replacing ...
      (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
      (main): Adjust to usage reorg.
      * src/fns.c (syms_of_fns):
      * src/profiler.c (syms_of_profiler):
      Don't use non-constant struct initializers.
      * src/gnutls.h (gnutls_initstage_t):
      * src/lisp.h (enum Lisp_Fwd_Type):
      * src/lread.c (lisp_file_lexically_bound_p):
      * src/xsettings.c (anonymous enum):
      Remove trailing comma.
      * src/xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
      * src/lisp.h (ENUM_BF): Use unsigned if pedantic.
      (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
      (DEFUN): Use it.
      * src/regex.c (const_re_char): New type, to pacify strict C89.
      All uses of 'const re_char' replaced to use it.
      * src/regex.h (_Restrict_): Rename from __restrict, to avoid clash
      with glibc when strict C89.  This change is imported from gnulib.
      All uses changed.
      (_Restrict_arr_): Rename from __restrict_arr, similarly.
      * src/sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
      Omit GNU_LINUX implementation, since it requires long long.
      * src/xterm.c (x_draw_underwave):
      Do not assume the traditional order of struct's members.
      (x_term_init): Rewrite to avoid the need for non-constant structure
    • David Engster's avatar
      gnus-start.el (gnus-clean-old-newsrc): Always remove 'unexist' marks if... · 3d70c5cf
      David Engster authored
      gnus-start.el (gnus-clean-old-newsrc): Always remove 'unexist' marks if `gnus-newsrc-file-version' does not match `gnus-version'.  This fixes a bug in Emacs trunk where the 'unexist' marks were always removed at startup because "Gnus v5.13" was considered smaller than "Ma Gnus v0.03".
    • Tassilo Horn's avatar
      gnus.el (gnus-summary-line-format): Docfix · 4647c173
      Tassilo Horn authored
    • Eli Zaretskii's avatar
      Improve scrolling when line-spacing != 0 and scroll-step = 1. · 35cb8a3e
      Eli Zaretskii authored
       lisp/simple.el (default-line-height): New function.
       (line-move-partial, line-move): Use it instead of computing the
       line height inline.
       (line-move-partial): Always compute ROWH.  If the last line is
       partially-visible, but its text is completely visible, allow
       cursor to enter such a partially-visible line.
    • Paul Eggert's avatar
      Syntax cleanup, mostly replacing macros with functions. · 45b683a1
      Paul Eggert authored
      This removes the need for the syntax_temp hack.
      * search.c: Include syntax.h after buffer.h, since syntax.h uses BVAR.
      * syntax.c (SYNTAX_INLINE): New macro.
      (SYNTAX_COMEND_FIRST): Now functions, not macros.
      Now constants, not macros.
      (syntax_temp) [!__GNUC__]: Remove.
      (SYNTAX_PREFIX): Remove; all uses replaced by syntax_prefix_flag_p.
      (syntax_prefix_flag_p): Move implementation of SYNTAX_PREFIX here.
      Move here from syntax.h; now functions, not macros.  Except for the
      last function, these are static since only syntax.c uses them.
      (syntax_multibyte): Rename from SYNTAX_WITH_MULTIBYTE_CHECK.
      All uses changed.  Now a function, not a macro; use this fact
      to simplify the code.
      (scan_lists, scan_sexps_forward): Remove workarounds for ancient
      compiler bugs; no longer relevant.
      (SYNTAX_INLINE): New macro.
      (struct gl_state_s, gl_state): Move earlier, so that it's in scope
      for the new functions.  Use bool for boolean member.
      Now extern inline functions, not macros.
      Remove; all uses replaced by implementation.
      (syntax_temp) [!__GNUC__]: Remove decl.
    • Michael Albinus's avatar
      Fix last patch. · 500dd7a3
      Michael Albinus authored
    • Michael Albinus's avatar
      Improve error messages. (Bug#14808) · 525c5c77
      Michael Albinus authored
      * net/tramp.el (tramp-current-connection): New defvar, moved from
      (tramp-message-show-progress-reporter-message): Removed, not
      needed anymore.
      (tramp-error-with-buffer): Show message in minibuffer.  Discard
      input before waiting.  Reset connection timestamp.
      (with-tramp-progress-reporter): Improve messages.
      (tramp-process-actions): Use progress reporter.  Delete process in
      case of error.  Improve messages.
      * net/tramp-sh.el (tramp-barf-if-no-shell-prompt): Use
      condition-case.  Call `tramp-error-with-buffer' with vector and buffer.
      (tramp-current-connection): Removed.
      (tramp-maybe-open-connection): The car of
      `tramp-current-connection' are the first 3 slots of the vector.
    • Ted Zlatanov's avatar