1. 24 Jan, 2019 5 commits
    • 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
  2. 23 Jan, 2019 15 commits
  3. 22 Jan, 2019 9 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
    • João Távora's avatar
      Remove tests of electric-pair-mode and CC-based modes · 6ca4626c
      João Távora authored
      The behaviour previously observed in cc-mode-based-modes (and every
      other major-mode) when electric-pair-mode or electric-layout-mode is
      turned on may no longer be observed: this because CC-mode goes around
      the generic implementation of electric-pair-mode.
      
      An alternative is to bind every delimiter key like '{', '}', etc to
      'self-insert-command, like most major modes already do, at the cost of
      losing c-auto-newline functionality (which was incompatible anyway
      before the recent changes of bug#33794).
      
      * test/lisp/electric-tests.el
      (electric-pair-test-for): No longer set it.
      (define-electric-pair-test): Use js-mode instead of c++ mode,
      which broke recently.
      (whitespace-chomping-2): Add failing C++ test explicitly.
      (electric-layout-int-main-kernel-style): Use plainer-c-mode.
      (electric-layout-int-main-allman-style): Deleted.
      (electric-modes-int-main-allman-style): Renamed from
      electric-layout-int-main-allman-style.
      6ca4626c
    • Alan Mackenzie's avatar
      Extend electric-pair-mode actions to < and >, and also to ( and ) in literals · 9eaf5e05
      Alan Mackenzie authored
      * lisp/progmodes/cc-cmds.el (c-electric-lt-gt): Actuate electric-pair-mode if
      a < or > is typed in a context where this is meaningful (#include, or
      template).
      (c-electric-paren): Allow electric-pair-mode activity in a comment or string.
      
      * lisp/progmodes/cc-defs.el (c-make-keywords-re): Fix a bug where lists of
      source symbols could get overwritten when parameter adorn is set to
      'appendable.
      
      * list/progmodes/cc-langs.el (c-cpp-include-key): New lang const and var.
      9eaf5e05
    • Alan Mackenzie's avatar
      f97b734f
    • Michael Albinus's avatar
      Make Tramp tests more robust · 6038fdb2
      Michael Albinus authored
      * test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name):
      Bind `tramp-default-method'.
      (tramp--test-file-attributes-equal-p): New defsubst.
      (tramp-test19-directory-files-and-attributes): Use it.
      6038fdb2
    • Michael Albinus's avatar
      Respect setgid bit of the upper directory in Tramp · c5800815
      Michael Albinus authored
      * doc/misc/trampver.texi:
      * lisp/net/trampver.el: Change version to "2.4.2-pre".
      
      * lisp/net/tramp.el: Bump version to 2.4.2-pre.
      (tramp-set-file-uid-gid): Respect setgid bit of the upper directory.
      (tramp-default-file-modes, tramp-handle-insert-file-contents)
      (tramp-mode-string-to-int, tramp-make-tramp-temp-file):
      * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy)
      (tramp-adb-handle-write-region):
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly)
      (tramp-sh-handle-write-region): Use octal constants.
      c5800815
  4. 21 Jan, 2019 8 commits
  5. 20 Jan, 2019 2 commits
    • Michael Albinus's avatar
      Use POSIX "df" in Tramp, if available · 5961e4fa
      Michael Albinus authored
      * lisp/net/tramp-sh.el (tramp-get-remote-df):
      Support also POSIX.1 "df".
      (tramp-sh-handle-file-system-info): Adapt accordingly.
      5961e4fa
    • Eli Zaretskii's avatar
      Support native image resizing on MS-Windows · 67b1053d
      Eli Zaretskii authored
      * src/w32term.c (x_draw_image_foreground): Scale the image if
      the requested dimensions are different from the bitmap
      dimensions.
      * src/image.c (Fimage_scaling_p): Return t when HAVE_NTGUI.
      (x_set_image_size) [HAVE_NTGUI]: Record the scaled dimensions
      in the image struct.
      * src/dispextern.h (HAVE_NATIVE_SCALING): Define when
      HAVE_NTGUI as well.
      
      * etc/NEWS: Update the announcement of native image scaling.
      67b1053d
  6. 19 Jan, 2019 1 commit