1. 14 Sep, 2016 5 commits
    • Eli Zaretskii's avatar
      Avoid aborts in GC due to abort_on_gc · 5ad238bf
      Eli Zaretskii authored
      * src/lisp.h:
      * src/print.c (Fprin1_to_string):
      * src/eval.c (signal_or_quit):
      * src/alloc.c (garbage_collect_1): Remove declarations, setting,
      and testing the value of abort_on_gc.  It is no longer needed, and
      using it causes rare aborts in GC for no good reason.  (Bug#23912)
    • Michael Albinus's avatar
      ; Complete fixing Bug#24432 · def4f1ec
      Michael Albinus authored
    • Michael Albinus's avatar
      Fix Bug#24432 · 8af1763d
      Michael Albinus authored
      * lisp/net/tramp-cache.el (tramp-get-hash-table): Initialize a
      connection as inactive.
      (tramp-set-connection-property): Make the connection active.
      (tramp-dump-connection-properties): Don't save "active" property.
      (tramp-list-connections): List only active connections.  (Bug#24432)
    • Lars Ingebrigtsen's avatar
      Don't bug out on all-whitespace URLs · 9345e638
      Lars Ingebrigtsen authored
      * lisp/net/shr.el (shr-expand-url): Don't bug out on
      degenerate all-whitespace URLs.
    • Katsumi Yamaoka's avatar
      sieve-manage.el: Rename sieve-manage-ignore-broken-tls · 3b9cbacf
      Katsumi Yamaoka authored
      * lisp/net/sieve-manage.el (sieve-manage-ignore-starttls):
      Rename from sieve-manage-ignore-broken-tls.  If it is set,
      sieve-manage will never use STARTTLS even if the server says
      it is capable (but may be broken).
  2. 13 Sep, 2016 3 commits
    • Paul Eggert's avatar
      Port to ISO/IEC TS 18661-1:2014 · 4a0d8b4c
      Paul Eggert authored
      * src/character.h (CHARACTER_WIDTH): Rename from CHAR_WIDTH.
      All uses changed.
    • Tino Calancha's avatar
      dired-jump: Expand file-name before dired-goto-file call · 3988ceaa
      Tino Calancha authored
      Command dired-goto-file requires its argument to be an absolute
      file name.  Interactively FILE-NAME is read with read-file-name,
      which could return an abbreviated file name (Bug#24409).
      * lisp/dired-x.el (dired-jump): Use expand-file-name on FILE-NAME.
      Clarify in doc string the meaning of arg FILE-NAME.
    • Tino Calancha's avatar
      Add test for Bug#21454 · 469fcaa7
      Tino Calancha authored
      * test/lisp/legacy/files-tests.el (files-test-bug-21454): New test.
  3. 12 Sep, 2016 11 commits
  4. 11 Sep, 2016 7 commits
    • Paul Eggert's avatar
      Remove unnecessary ref to coreutils manual · 073048d5
      Paul Eggert authored
      * doc/lispref/files.texi: Document write-region-inhibit-fsync.
    • Alan Mackenzie's avatar
      Correctly fontify C++ direct initializations with parens inside functions · c417f08b
      Alan Mackenzie authored
      Or, more clearly, when something looks like a function declaration and it's
      inside a function, fontify it as a direct initialization.
      For this purpose, introduce a "brace stack" for each buffer, where an entry on
      the brace stack states how deeply nested a particular position is inside
      braces inside a "top level", which includes classes and namespaces.
      Also introduce a new "context", "top", with which c-font-lock-declarations
      signals to c-forward-decl-or-cast-1 that point is at the top level.
      * lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): add
      (c-flat-decl-block-kwds, c-brace-stack-thing-key, c-brace-stack-no-semi-key)
      (c-type-decl-operator-prefix-key): new language constants/variables.
      * lisp/progmodes/cc-engine.el (c-bs-interval, c-bs-cache, c-bs-cache-limit)
      (c-bs-prev-pos, c-bs-prev-stack): New mostly local variables for the brace
      stack cache.
      (c-init-bs-cache, c-truncate-bs-cache, c-truncate-bs-cache, c-brace-stack-at)
      (c-bs-at-toplevel-p): New functions which manipulate the brace stack (cache).
      (c-find-decl-prefix-search): Keep track of whether we're at top level.
      (c-find-decl-spots): New local variable cfd-top-level which records what it
      says.  On calling cfd-fun, pass cfd-top-level as an additional argument.
      (c-forward-declarator): Add new element DECORATED to the result list.  Set it
      to non-nil when a match for c-type-decl-operator-prefix-key is found.
      (c-forward-decl-or-cast-1): Handle the newly introduced context "top".
      Introduce "CASE 9.5", which recognizes direct initializations.
      * lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare)
      (c-font-lock-enum-tail, c-font-lock-cut-off-declarators)
      (c-font-lock-enclosing-decls, c-simple-decl-matchers, c-basic-matchers-after):
      Add appropriate `not-top' argument to calls to c-font-lock-declarators.
      (c-font-lock-declarators): Additional parameter `not-top'.  Use not-top to
      participate in the decision whether to fontify an identifier as a function or
      a variable.
      (c-font-lock-declarations): The internal lambda function takes an additional
      argument `toplev' from c-find-decl-spots, which it uses in determining the
      "context" of a declaration.  Add appropriate `not-top' argument to calls to
      (c-font-lock-objc-methods): Add extra parameter to internal lambda function,
      like for c-font-lock-declarators.
      * lisp/progmodes/cc-mode.el (c-basic-common-init): Initialize the brace stack
    • Eli Zaretskii's avatar
      Avoid signaling errors when computing "Stop" in GDB menu · f95ca126
      Eli Zaretskii authored
      * lisp/progmodes/gdb-mi.el (gdb-show-stop-p): Don't assume
      'gdb-running-threads-count' must have a numeric value.
    • Philipp Stephani's avatar
      Stop calling ‘byte-compile-log-warning’ · 7edaa77c
      Philipp Stephani authored
      For errors, use ‘byte-compile-report-error’ instead so that the error
      is registered and causes compilation to fail (Bug#24359).
      For warnings, use ‘byte-compile-warn’ instead so that
      ‘byte-compile-error-on-warn’ is honored (Bug#24360).
      * lisp/emacs-lisp/macroexp.el (macroexp--funcall-if-compiled)
      (macroexp--warn-and-return): Use ‘byte-compile-warn’ instead of
      * lisp/emacs-lisp/bytecomp.el (byte-compile-form, byte-compile-unfold-bcf)
      (byte-compile-setq, byte-compile-funcall): Use
      ‘byte-compile-report-error’ instead of ‘byte-compile-log-warning’.
      (byte-compile-log-warning): Convert comment to documentation
      string.  Explain that the function shouldn’t be called directly.
      (byte-compile-report-error): Add optional FILL argument.
      * lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use)
      (cconv--analyze-function, cconv-analyze-form): Use
      ‘byte-compile-warn’ instead of ‘byte-compile-log-warning’.
      * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Use
      ‘byte-compile-warn’ instead of ‘byte-compile-log-warning’.
      * lisp/subr.el (add-to-list): Use ‘byte-compile-report-error’ instead
      of ‘byte-compile-log-warning’.
      (do-after-load-evaluation): Use ‘byte-compile-warn’ instead of
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      Document file synchronization issues · 31407634
      Paul Eggert authored
      * doc/lispref/files.texi (Files and Storage): New section.
    • Paul Eggert's avatar
      copy-file now uses GNU/Linux file cloning · 9b21d9f9
      Paul Eggert authored
      From a suggestion by Kieran Colford (see Bug#23904).
      * configure.ac: Check for linux/fs.h.
      * src/fileio.c [HAVE_LINUX_FS_H]: Include sys/ioctl.h and linux/fs.h.
      (clone_file): New function.
      (Fcopy_file): Use it.
  5. 10 Sep, 2016 2 commits
  6. 09 Sep, 2016 7 commits
    • Simen Heggestøyl's avatar
      * lisp/emacs-lisp/ring.el: Use lexical-binding · 367f8568
      Simen Heggestøyl authored
      * lisp/emacs-lisp/ring.el (ring-elements): Don't use the RESULT
      argument of `dotimes' when the iteration variable isn't referred by
      (ring-member): Don't pass nil as the RESULT argument of `dotimes'
      since it's the default.
    • Michal Nazarewicz's avatar
      Split regex character class test into smaller chunks · 8634efa3
      Michal Nazarewicz authored
      Having one test for all character classes it is not always trivial to
      determine which class is failing.  This happens when failure is caused
      by ‘(should (equal (point) (point-max)))’ not being met.
      With per-character class tests, it is immidiatelly obvious which test
      causes issues plus tests for all classes are run even if some of them
      * test/src/regex-tests.el (regex-character-classes): Delete and split
      (regex-tests-alnum-character-class, regex-tests-alpha-character-class,
      regex-tests-ascii-character-class, regex-tests-blank-character-class,
      regex-tests-cntrl-character-class, regex-tests-digit-character-class,
      regex-tests-graph-character-class, regex-tests-lower-character-class,
      regex-tests-print-character-class, regex-tests-punct-character-class,
      regex-tests-upper-character-class, regex-tests-word-character-class,
      regex-tests-xdigit-character-class): …new tests.
    • Michal Nazarewicz's avatar
      Don’t allocate char-table’s extra slots in regexp-out-charset · 4516130d
      Michal Nazarewicz authored
      * lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Do not use
      'case-table as charmap char-table’s property.  The function has nothing
      to do with casing and in addition using 'case-table causes unnecessary
      extra slots to be allocated which ‘regexp-opt-charset’ does not use.
    • Michal Nazarewicz's avatar
      Remove dead loop iterations in regex.c · 0e7eb640
      Michal Nazarewicz authored
      RE_CHAR_TO_MULTIBYTE(c) yields c for ASCII characters and a byte8
      character for c ≥ 0x80.  Furthermore, CHAR_BYTE8_P(c) is true only
      for byte8 characters.  This means that
      	c = RE_CHAR_TO_MULTIBYTE (ch);
      	if (! CHAR_BYTE8_P (c) && re_iswctype (c, cc))
      is equivalent to:
      	c = c;
      	if (! false && re_iswctype (c, cc))
      for 0 ⪬ c < 0x80, and
      	c = BYTE8_TO_CHAR (c);
      	if (! true && re_iswctype (c, cc))
      for 0x80 ⪬ c < 0x100.  In other words, the loop never executes for
      c ≥ 0x80 and RE_CHAR_TO_MULTIBYTE call is unnecessary for c < 0x80.
      * src/regex.c (regex_compile): Simplyfy a for loop by eliminating
      dead iterations and unnecessary macro calls.
    • Michal Nazarewicz's avatar
      Replace decimalnump with alphanumericp · c579b28f
      Michal Nazarewicz authored
      decimalnump was used in regex.c only in ISALNUM macro which ored it with
      alphabeticp.  Because both of those functions require Unicode general
      category lookup, this resulted in unnecessary lookups (if alphabeticp
      return false decimalp had to perform another lookup).  Drop decimalnump
      in favour of alphanumericp which combines decimelnump with alphabeticp.
      * src/character.c (decimalnump): Remove in favour of…
      (alphanumericp): …new function.
      * src/regex.c (ISALNUM): Use alphanumericp.
    • Michal Nazarewicz's avatar
      Remove inaccurate comment in regex.c · b1c4c005
      Michal Nazarewicz authored
      * src/regex.c (regex_compile): Remove comment indicating that wctype of
      some character classes may be negative.  All wctypes are in fact
    • Michal Nazarewicz's avatar
      STRING_CHAR does not unify characters; update documentation · 3ffc5f44
      Michal Nazarewicz authored
      * src/character.h (STRING_CHAR): Update doc.
      * src/buffer.h (FETCH_MULTIBYTE_CHAR): Update doc.  While at it, change
      the function to use BYTE_POS_ADDR instead of open-coding it.
  7. 08 Sep, 2016 4 commits
    • Simen Heggestøyl's avatar
      Add tests for ring.el · e951aa14
      Simen Heggestøyl authored
      * test/lisp/emacs-lisp/ring-tests.el: New file with tests for ring.el.
    • Martin Rudalics's avatar
      New file test/src/marker-tests.el · ba5d3239
      Martin Rudalics authored
    • Paul Eggert's avatar
      Port flexible array members to GCC + valgrind · d2f1971d
      Paul Eggert authored
      These changes are needed to conform to the C standard's rule for
      allocating structs containing flexible array members.  C11 says
      that malloc (offsetof (struct s, m) + n) does not suffice to
      allocate a struct with an n-byte tail; instead, malloc’s arg
      should be rounded up to the nearest multiple of alignof (struct s).
      Although this is arguably a defect in C11, gcc -O2 + valgrind
      sometimes complains when this rule is violated, and when debugging
      it’s better to keep valgrind happy.
      For details please see the thread containing the message at:
      * lib-src/ebrowse.c, src/alloc.c, src/image.c, src/process.c:
      Include flexmember.h.
      * lib-src/ebrowse.c (add_sym, add_member, make_namespace)
      * src/alloc.c (SDATA_SIZE, allocate_string_data):
      * src/image.c (xpm_cache_color, imagemagick_create_cache):
      * src/process.c (Fmake_network_process):
      Use FLEXSIZEOF instead of offsetof and addition.
      * src/alloc.c (SDATA_SIZE, vector_alignment):
      Use FLEXALIGNOF instead of sizeof (ptrdiff_t).
      * src/lisp.h (ALIGNOF_STRUCT_LISP_VECTOR):
      Remove, as alloc.c can now calculate this on its own.
    • Paul Eggert's avatar
      Update from gnulib · 12a7e0f8
      Paul Eggert authored
      This incorporates:
      2016-09-07 flexmember: new macro FLEXALIGNOF
      2016-09-07 flexmember: port better to GCC + valgrind
      2016-08-18 Port modules to use getprogname explicitly
      2016-09-02 manywarnings: add -fno-common
      * admin/merge-gnulib (GNULIB_TOOL_FLAGS): Don’t avoid flexmember,
      since time_rz now uses part of it.  Instead, remove m4/flexmember.m4.
      * configure.ac (AC_C_FLEXIBLE_ARRAY_MEMBER): Define away,
      since Emacs assumes C99 and therefore removes m4/flexmember.m4.
      * lib/euidaccess.c, lib/group-member.c, lib/time_rz.c:
      * m4/manywarnings.m4: Copy from gnulib.
      * lib/flexmember.h: New file, from gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
  8. 07 Sep, 2016 1 commit
    • Noam Postavsky's avatar
      Don't --load directories · a08ce41e
      Noam Postavsky authored
      * lisp/startup.el (command-line-1): Only pass expanded FILENAME argument
      of --load when it refers to a normal file, since `load' doesn't handle
      directories (Bug #16406).