1. 28 Jan, 2019 2 commits
    • Alan Mackenzie's avatar
      Detect when we hit limit in backward search in c-just-after-func-arglist-p · 23938680
      Alan Mackenzie authored
      This fixes a bug reported by Yasushi SHOJI <yasushi.shoji@gmail.com> to
      emacs-devel on 2018-11-26, where wrong analysis and fontification occurred.
      
      * lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): Add new parameter
      HIT-LIM which, if non-nil causes the function to return nil rather than 'same
      when we reach the backward search limit without finding the beginning of
      statement.
      (c-just-after-func-arglist-p): Supply argument t to this new parameter in call
      to c-beginning-of-statement-1.
      23938680
    • Paul Eggert's avatar
      Update from Gnulib · d81aa851
      Paul Eggert authored
      This incorporates:
      2019-01-26 getloadavg: Add support for Android
      2019-01-24 fchownat: Fix compilation error on Android 4.3
      2019-01-24 mbtowc: Fix compilation error on Android 4.3
      2019-01-24 random: Fix compilation error on Android 4.3
      2019-01-24 renameat: Fix compilation error on Android 4.3
      2019-01-24 unlinkat: Fix compilation error on Android 4.3
      2019-01-19 gettext: support disabling use of VLAs
      2019-01-17 sys_stat: Fix warning on OS/2 kLIBC
      2019-01-17 fcntl: Fix syntax error (regression from 2018-10-05)
      2019-01-10 verify: Enable _GL_HAVE_STATIC_ASSERT for recent G++
      2018-12-22 stdioext: port to newer 32-bit Android
      2018-12-16 libc-config: Support HP-UX cc in C99 mode.
      * build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
      * lib/cdefs.h, lib/fcntl.c, lib/getloadavg.c, lib/gettext.h:
      * lib/regexec.c, lib/stdio-impl.h, lib/stdio.in.h, lib/stdlib.in.h:
      * lib/sys_stat.in.h, lib/unistd.in.h, lib/verify.h, m4/stdlib_h.m4:
      Copy from Gnulib.
      * lib/gnulib.mk.in: Regenerate.
      d81aa851
  2. 27 Jan, 2019 2 commits
    • Paul Eggert's avatar
      forward-line now works with bignums · cc1c46e4
      Paul Eggert authored
      * src/cmds.c (Fforward_line): Support bignum arg.
      (scan_newline): Return void since no caller was using the
      return value.
      * src/search.c (find_newline, scan_newline_from_point)
      (find_newline1): Return the number of newlines counted, not
      the count shortage, so that the return value always fits in
      ptrdiff_t even if the original count was a bignum.  All
      callers changed.
      * test/src/cmds-tests.el (forward-line-with-bignum): New test.
      cc1c46e4
    • Eli Zaretskii's avatar
      Improve pdump load diagnostics · 6c2ee11d
      Eli Zaretskii authored
      * src/emacs.c (load_pdump): Improve diagnostics when pdump
      file fails to load correctly.
      6c2ee11d
  3. 26 Jan, 2019 3 commits
    • Eli Zaretskii's avatar
      4eb78a47
    • Eli Zaretskii's avatar
      Improve pdump file search and 'pdumper-stats' · a7974933
      Eli Zaretskii authored
      * src/pdumper.c (pdumper_record_wd): New function.
      (pdumper_load): Use xstrdup instead of strdup, as on
      MS-Windows the latter uses the wrong heap.  Don't free a
      NULL pointer.
      * src/emacs.c (load_pdump): Support the use case where the
      Emacs binary was renamed: look in exec-directory for the
      pdump file whose base name is derived from the Emacs binary,
      in addition to just emacs.pdmp.
      (main): Call pdumper_record_wd to prepend CWD to the pdump
      file name.
      * src/fileio.c (file_name_absolute_p): Now extern.
      * src/lisp.h (file_name_absolute_p): Add prototype.
      * src/pdumper.h (pdumper_record_wd): Add prototype.
      
      * doc/emacs/cmdargs.texi (Initial Options): Update the
      documentation of where Emacs looks for the dump file.
      a7974933
    • Eli Zaretskii's avatar
      Fix face initializations in pdump'ed Emacs · bf4099b2
      Eli Zaretskii authored
      * src/dispnew.c (init_display_interactive): Call init_faces_initial
      in the daemon if dumped with pdumper. (Bug#34114)
      bf4099b2
  4. 25 Jan, 2019 8 commits
  5. 24 Jan, 2019 6 commits
    • Michael Albinus's avatar
      Some fixes in tramp-smb.el · 7960951d
      Michael Albinus authored
      * lisp/net/tramp-smb.el (tramp-smb-errors):
      Add "NT_STATUS_NOT_A_DIRECTORY".
      (tramp-smb-maybe-open-connection): Respect ´non-essential'.  Do
      not record smbserver-version.
      (tramp-smb-wait-for-output): Improve reading pending output.
      7960951d
    • Michael Albinus's avatar
      36a74809
    • Eli Zaretskii's avatar
      Avoid byte-compiler warning in starttls.el · 89ec69be
      Eli Zaretskii authored
      * lisp/net/network-stream.el (starttls-open-stream): Declare
      to avoid compilation warning.
      89ec69be
    • Michael Albinus's avatar
      ; Remove tramp-tests instrumentation · 24f11003
      Michael Albinus authored
      24f11003
    • Robert Pluim's avatar
      Check for client certificates when using GnuTLS · f3f9a358
      Robert Pluim authored
      This fixes Bug#33780, and extends the documentation to describe how to
      enable use of client certificates.
      
      * lisp/net/network-stream.el (network-stream-certificate): Correct
      order of parameters to plist-get.
      (network-stream-open-tls): Pass all received parameters to
      open-gnutls-stream as plist, not just :nowait.
      
      * lisp/net/gnutls.el (open-gnutls-stream): Change optional nowait arg
      to be plist.  Derive nowait and client certificate(s) and keys(s) from
      plist (maybe via auth-source) and pass to gnutls-boot-parameters and
      gnutls-negotiate.
      (network-stream-certificate): Add declare-function form for it.
      
      * doc/misc/auth.texi (Help for users): Describe format to use for
      client key/cert specification.
      
      * doc/misc/emacs-gnutls.texi (Help For Developers): Describe usage of
      optional plist argument.  Add crossreference to description of
      .authinfo format for client key/cert specification.
      
      * etc/NEWS: Describe new client certificate functionality for
        'open-network-stream'.
      
      * test/lisp/net/network-stream-tests.el: Add require of network-stream.
      (connect-to-tls-ipv4-nowait): Bind network-security-level to 'low
      in order to bypass nsm prompting.
      (connect-to-tls-ipv6-nowait): Likewise.
      (open-network-stream-tls-wait): New test.
      (open-network-stream-tls-nowait): New test.
      (open-network-stream-tls): New test.
      (open-network-stream-tls-nocert): New test.
      (open-gnutls-stream-new-api-default): New test.
      (open-gnutls-stream-new-api-wait): New test.
      (open-gnutls-stream-old-api-wait): New test.
      (open-gnutls-stream-new-api-nowait): New test.
      (open-gnutls-stream-old-api-nowait): New test.
      (open-gnutls-stream-new-api-errors): New test.
      The new tests exercise 'open-network-stream' and the old and new
      api of 'open-gnutls-stream'.
      f3f9a358
    • Michael Albinus's avatar
      Fix error in Tramp's encoding check · 0744c353
      Michael Albinus authored
      * lisp/net/tramp-sh.el (tramp-find-inline-encoding):
      Use `tramp-get-connection-buffer'.
      0744c353
  6. 23 Jan, 2019 15 commits
  7. 22 Jan, 2019 4 commits
    • Michael Albinus's avatar
      ; Instrument tramp-tests · ec9f42bc
      Michael Albinus authored
      ec9f42bc
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/package.el (package--alist): New · dde33727
      Stefan Monnier authored
      (package-activate-all): Use it so we only initialize the local part of
      package.el (this reduces the impact of bug#24467 and speeds up startup).
      (package-installed-p): Use it so it works even if package is not
      fully initialized.
      (package-delete): Use it so we only initialize the local part of
      package.el.
      dde33727
    • Phillip Lord's avatar
      Add hook for all events · 7b31de4d
      Phillip Lord authored
      * lisp/subr.el (input-event-functions): Add input-event-functions
      * src/keyboard.c (read_char): Call input-event-functions on all hooks
      7b31de4d
    • João Távora's avatar
      electric-layout-mode kicks in before electric-pair-mode · fd943124
      João Távora authored
      This aims to solve problems with indentation.  Previously in, say, a
      js-mode buffer with electric-layout-rules set to
      
         (?\{ before after)
         (?\} before)
      
      would produce an intended:
      
         function ()
         {
           <indented point>
         }
      
      The initial state
      
        function () {
      
      Would go immediately to the following by e-p-m
      
        function () {}
      
      Only then would e-l-m be applied to } first, and then again to {.
      This makes lines indent in the wrong order, which can be a problem in
      some modes.
      
      The way we fix this is by reversing the order of e-p-m and e-l-m in
      the post-self-insert-hook (and also fixing a number of details that
      this uncovered).  In the end this changes the sequence from
      
        function () {
      
      By way of e-l-m becomes:
      
        function () <newline>
        {
        <newline>
      
      The e-p-m inserts the pair
      
        function () <newline>
        {
        <newline>}
      
      And then e-l-m kicks in for the pair again, yielding the desired result
      
        function () <newline>
        {
        <indented point>
        }
      
      * lisp/elec-pair.el (electric-pair--insert): Bind
      electric-layout-no-duplicate-newlines.
      (electric-pair-inhibit-if-helps-balance)
      (electric-pair-skip-if-helps-balance): Use insert-before-markers,
      playing nice with save-excurion.
      (electric-pair-post-self-insert-function): Go to correct position
      before checking electric-pair-inhibit-predicate and
      electric-pair-skip-self predicate.
      (electric-pair-post-self-insert-function): Increase priority to
      50.
      
      * lisp/electric.el (electric-indent-post-self-insert-function):
      Delete trailing space in reindented line only if line was
      really reindented.  Rewrite comment.
      (electric-layout-allow-duplicate-newlines): New variable.
      (electric-layout-post-self-insert-function-1): Rewrite comments.
      Honours electric-layout-allow-duplicate-newlines.  Don't reindent
      previous line because racecar.
      
      * test/lisp/electric-tests.el: New test.
      (plainer-c-mode): Move up.
      (electric-modes-int-main-allman-style)
      (electric-layout-int-main-kernel-style): Simplify
      electric-layout-rules.
      (electric-layout-for-c-style-du-jour): New helper.
      (electric-layout-plainer-c-mode-use-c-style): New test.
      fd943124