1. 28 Jun, 2020 7 commits
    • Tino Calancha's avatar
      Do not expose the size of recent_keys to Lisp · c86d060b
      Tino Calancha authored
      That prevents from unintentional crashes if the users
      modify the variable with setq or if they let-bind it.
      Users can still safely modify the lossage limit with the
      command `update-lossage-size'.  For convenience, add
      a function `lossage-size' to return the current limit.
      * src/keyboard.c (lossage_limit): Do not expose it
      to Lisp; make it a static variable.
      Keep the current Emacs default (300); accept only values >= 100.
      (lossage-size): New function; it returns the current size
      of recent_keys.
      Rename it from update-lossage-limit (all callers updated);
      make it a command.
      * doc/emacs/help.texi (Misc Help)
      * etc/NEWS
      * lisp/cus-start.el
      * lisp/edmacro.el
      * lisp/help.el:
      Update all references with the new name.
      * test/src/keyboard-tests.el (keyboard-lossage-limit):
      Amend the test.
    • Tino Calancha's avatar
      Revert "Allow disable the record of keystrokes (lossage)" · e13fd1fc
      Tino Calancha authored
      This reverts commit a60a0599.
    • Tino Calancha's avatar
      Allow disable the record of keystrokes (lossage) · cc09a334
      Tino Calancha authored
      Use 1 as the minimum value for lossage-limit; such a value
      is equivalent to not recording the keystrokes: having just 1 entry,
      will be overwritten with the view-lossage call itself.
      * test/src/keyboard-tests.el (keyboard-lossage-limit): Update test.
      * src/keyboard.c (MIN_NUM_RECENT_KEYS): Delete it.
      (lossage_limit): Add security note in the doctring.
      * lisp/cus-start.el (lossage-limit): Let users choose to disable
      the record of the keystrokes.
      * doc/emacs/help.texi (Misc Help): Update manual.
      * etc/NEWS (Changes in Emacs 28.1):
      Mention that it's possible to disable the record of keystrokes.
    • Tino Calancha's avatar
      Give Lisp control on the lossage size · 9324eb01
      Tino Calancha authored
      Add an user option to control the maximum number of
      recorded keystrokes (a.k.a lossage limit) (Bug#38796).
      * src/keyboard.c (lossage-limit): Add new variable.
      Set it as 100 and use it as the minimum value for lossage-limit.
      Keep the same default for the vector size as before (300).
      (update-lossage-limit): New function.
      (update_recent_keys): Helper function.
      (syms_of_keyboard): Replace NUM_RECENT_KEYS with lossage_limit as
      the vector size.
      (clear-this-command-keys): Fix docstring.
      * lisp/help.el (view-lossage): Mention lossage-limit in the docstring.
      * lisp/cus-start.el (lossage-limit): Register it as an user option.
      * lisp/edmacro.el (edit-kbd-macro): Update docstring and commentary header.
      * etc/NEWS (Changes in Emacs 28.1): Announce the new option.
      * doc/emacs/help.texi (Misc Help): Document it.
      * test/src/keyboard-tests.el (keyboard-lossage-limit): Add test.
    • Paul Eggert's avatar
      Update from Gnulib. · 66501445
      Paul Eggert authored
      This incorporates:
      2020-06-28 getrandom: do not depend on ‘open’ on mingw
      2020-06-28 getrandom: fix compilation errors on older versions of mingw
      * build-aux/config.sub, lib/getrandom.c, m4/getrandom.m4:
      Copy from Gnulib
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
    • Eli Zaretskii's avatar
      MS-Windows fixes as followup to import of Gnulib 'getrandom' · 162f375b
      Eli Zaretskii authored
      * nt/mingw-cfg.site (gl_cv_lib_assume_bcrypt): Set to "no" to
      disable linking against bcrypt.dll.  (Bug#42095)
      * src/gnutls.c (gnutls_rnd) [WINDOWSNT]: Don't define a function
      pointer, and don't load it from GnuTLS DLL.
      (w32_gnutls_rnd) [WINDOWSNT]: Delete unused function.
      * src/fns.c (gnutls_rnd) [WINDOWSNT]: Don't redirect to
    • Timo Myyrä's avatar
      Add thread-naming support for OpenBSD · e4028d15
      Timo Myyrä authored
      OpenBSD has pthread_set_name_np; FreeBSD appears to have both
      this call and pthread_setname_np (the latter call is used in preference).
      * configure.ac: Detect pthread_set_name_np.
      * sys/systhread.c:
      Include <pthread_np.h> and call pthread_set_name_np if available.
  2. 27 Jun, 2020 2 commits
    • Paul Eggert's avatar
      Use getrandom syscall for nonces · 5ce5cf64
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add getrandom.
      * doc/lispref/text.texi (Format of GnuTLS Cryptography Inputs):
      Don’t say that iv-auto uses GNUTLS_RND_NONCE.  Also, don’t say
      that it returns the IV’s actual value, as it never has done that.
      * src/fns.c, src/sysdep.c: Include sys/random.h, for getrandom.
      * src/fns.c (Fsecure_hash_algorithms): Use getrandom so that this
      function does not depend on HAVE_GNUTLS3.
      * src/sysdep.c: Do not include <gnutls/crypto.h>.
      (random_seed) [HAVE_LRAND48]: Can be long int now.
      (init_random) [!WINDOWSNT]: Use getrandom syscall instead
      of opening /dev/urandom, as this works even on GNU/Linux
      hosts that lack /dev/urandom.  Don’t bother with gnutls_rnd
      as it’s not needed now that we have getrandom.
    • Paul Eggert's avatar
      Update from Gnulib · 118c07e0
      Paul Eggert authored
      This incorporates:
      2020-06-27 getloadavg: don’t depend on fopen-gnu
      2020-06-25 c-dtoastr, c-ldtoastr: new modules
      2020-06-01 getloadavg: fix double-increment bug
      2020-06-01 tempname: use getrandom, not getentropy
      2020-05-31 tempname: merge from glibc and coreutils
      2020-05-31 getentropy: work around a macOS and Solaris problem
      2020-05-31 fnmatch: merge from glibc
      2020-05-30 unistd: remove conflicting declaration of getrandom
      2020-05-30 don't assume that UNICODE is not defined
      2020-05-29 fix compilation error on native Windows
      2020-05-28 avoid dynamic loading of Windows API functions when possible
      2020-05-28 at-internal: make more robust in multithreaded applications
      2020-05-28 getloadavg: make more robust in multithreaded applications
      2020-05-27 getloadavg: make more robust in multithreaded applications
      2020-05-26 count-one-bits: fix MSVC specific code
      2020-05-25 getentropy, getrandom: new modules
      2020-05-24 open, openat: really support O_CLOEXEC
      2020-05-23 verify: document ‘assume’ better
      2020-05-21 regex: configure better with "clang -fsanitize=leak"
      2020-05-21 memmem: configure better with "clang -fsanitize=undefined"
      2020-05-19 ftoastr: fix ifndef typo
      * build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
      * lib/count-one-bits.h, lib/ftoastr.c, lib/ftoastr.h:
      * lib/getloadavg.c, lib/gettimeofday.c, lib/libc-config.h:
      * lib/open.c, lib/openat-proc.c, lib/tempname.c, lib/tempname.h:
      * lib/unistd.in.h, lib/verify.h, m4/memmem.m4, m4/regex.m4:
      * m4/unistd_h.m4:
      Update from Gnulib.
      * lib/getrandom.c, lib/sys_random.in.h:
      * m4/getrandom.m4, m4/sys_random_h.m4:
      New files, copied from Gnulib.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
  3. 26 Jun, 2020 10 commits
  4. 25 Jun, 2020 5 commits
  5. 24 Jun, 2020 3 commits
  6. 23 Jun, 2020 5 commits
    • Juri Linkov's avatar
      M-n in read-directory-name of vc commands gets project dirs (bug#41821) · bfd96e99
      Juri Linkov authored
      * lisp/progmodes/project.el (project-known-roots): New autoloaded function.
      * lisp/vc/vc-hooks.el (vc-known-roots): New function.
      * lisp/vc/vc.el (vc-root-diff, vc-print-root-log):
      * lisp/vc/vc-dir.el (vc-dir): Use 'vc-known-roots' for default
      values for read-directory-name.
    • Juri Linkov's avatar
      More not-state-changing vc commands can be used from non-file buffers · 4e04ca84
      Juri Linkov authored
      * lisp/vc/vc.el (vc-deduce-fileset): Instead of checking for
      log-view-mode, check for '(not buffer-file-name)' before trying to
      get the backend for default-directory.  Remove the branch that
      checks for '(not buffer-file-name)' and signals the error because
      vc-responsible-backend used in previous condition already signals
      its error.  (Bug#41974)
    • Michael Albinus's avatar
      Fix problem in tramp-smb.el · 35e881c5
      Michael Albinus authored
      * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files):
      Use `directory-file-name'.
      * test/lisp/net/tramp-tests.el (trace): Require it.
      (tramp--test-instrument-test-case): Print also function traces.
      (tramp--test-smb-p): New defun.
      (tramp-test21-file-links, tramp--test-windows-nt-or-smb-p)
      (tramp--test-check-files): Use it.
    • Basil L. Contovounesios's avatar
      ; Fix indentation in last change · 86a24971
      Basil L. Contovounesios authored
      * lisp/gnus/gnus-cloud.el (gnus-cloud-download-data): Reindent first
      argument of prog1.
    • David Edmondson's avatar
      Fix gnus-cloud-download-all-data return value · 7fd3f0b3
      David Edmondson authored
      * lisp/gnus/gnus-cloud.el (gnus-cloud-download-data): Return the
      result of calling `gnus-cloud-update-all' when UPDATE is t, as per the
      documented behaviour. (Bug#40280)
  7. 22 Jun, 2020 8 commits