1. 10 Apr, 2021 24 commits
    • Stefan Monnier's avatar
      * lisp/misearch.el: Use lexical-binding · 26e1d854
      Stefan Monnier authored
      (multi-isearch-read-buffers, multi-isearch-read-files):
      Replace `add-to-list` with `cl-pushnew` for use on a local variable.
    • Philipp Stephani's avatar
    • Philipp Stephani's avatar
    • Stefan Monnier's avatar
      * lisp/ps-bdf.el: Use lexical-binding · 8b928976
      Stefan Monnier authored
    • Stefan Monnier's avatar
      * lisp/informat.el: Use lexical-binding · edf8497c
      Stefan Monnier authored
    • Stefan Monnier's avatar
      * lisp/loadup.el: Use lexical-binding · 5ad3893e
      Stefan Monnier authored
    • Stefan Monnier's avatar
      * lisp/jka-compr.el: Use lexical-binding · cb6b810d
      Stefan Monnier authored
      Prefer #' to quote function names.
    • Philipp Stephani's avatar
    • Glenn Morris's avatar
      ; Fix copyright years · 81ffc433
      Glenn Morris authored
    • Alan Mackenzie's avatar
      Convert CC Mode to lexical binding in Emacs · 3f5fe0cd
      Alan Mackenzie authored
      lisp/progmodes/cc-align.el, lisp/progmodes/cc-awk.el,
      lisp/progmodes/cc-bytecomp.el, lisp/progmodes/cc-cmds.el,
      lisp/progmodes/cc-defs.el, lisp/progmodes/cc-engine.el,
      lisp/progmodes/cc-fonts.el, lisp/progmodes/cc-guess.el,
      lisp/progmodes/cc-langs.el, lisp/progmodes/cc-menus.el,
      lisp/progmodes/cc-mode.el, lisp/progmodes/cc-styles.el,
      lisp/progmodes/cc-subword.el, lisp/progmodes/cc-vars.el: Mark these files with
      a `lexical-binding' setting in line 1.
      lisp/progmodes/cc-align.el, lisp/progmodes/cc-engine.el,
      lisp/progmodes/cc-vars.el (c-syntactic-context, c-syntactic-element): Declare
      these as special variables.
      lisp/progmodes/cc-bytecomp.el (cc-bytecomp-debug-msg): prefix the parameter
      ARGS with a _, and remove an `ignore' call.
      lisp/progmodes/cc-cmds.el (c-where-wrt-brace-construct): Remove `kluge-start',
      an unused variable.
      (c-while-widening-to-decl-block): Add an extra parameter, which suppresses
      the generation of a setting of variable `where'.
      (c-defun-name-and-limits): Remove variable `where' from the function and use
      the new argument to the previous macro.
      lisp/progmodes/cc-engine.el (c-cache-to-parse-ps-state): Remove two unneeded
      variables, `last' and `intermediate'.
      lisp/progmodes/cc-fonts.el (c-font-lock-c++-using): Remove unused variable.
      lisp/progmodes/cc-langs.el (c-vsemi-status-unknown-p-fn): Replace the doc
      string with the more precise one from stand-alone CC Mode.
      lisp/progmodes/cc-styles.el (c-set-offset): Give the `ignored' parameter a
      leading _.
    • Philipp Stephani's avatar
      Add a helper binary to create a basic Secure Computing filter. · 1060289f
      Philipp Stephani authored
      The binary uses the 'seccomp' helper library.  The library isn't
      needed to load the generated Secure Computing filter.
      * configure.ac: Check for 'seccomp' header and library.
      * lib-src/seccomp-filter.c: New helper binary to generate a generic
      Secure Computing filter for GNU/Linux.
      * lib-src/Makefile.in (DONT_INSTALL): Add 'seccomp-filter' helper
      binary if possible.
      (all): Add Secure Computing filter file if possible.
      (seccomp-filter$(EXEEXT)): Compile helper binary.
      (seccomp-filter.bpf seccomp-filter.pfc): Generate filter files.
      * test/src/emacs-tests.el (emacs-tests/seccomp/allows-stdout)
      (emacs-tests/seccomp/forbids-subprocess): New unit tests.
      * test/Makefile.in (src/emacs-tests.log): Add dependency on the helper
    • Philipp Stephani's avatar
    • Philipp Stephani's avatar
      Read file in a loop if necessary. · 8a84f97a
      Philipp Stephani authored
      This allows for short reads from 'emacs_read'.
      * src/emacs.c (read_full): New helper function.
      (load_seccomp): Use it.
    • Eli Zaretskii's avatar
    • Philipp Stephani's avatar
      Add support for --seccomp command-line option. · be8328ac
      Philipp Stephani authored
      When passing this option on GNU/Linux, Emacs installs a Secure
      Computing kernel system call filter.  See Bug#45198.
      * configure.ac: Check for seccomp header.
      * src/emacs.c (usage_message): Document --seccomp option.
      (emacs_seccomp): New wrapper for 'seccomp' syscall.
      (load_seccomp, maybe_load_seccomp): New helper functions.
      (main): Potentially load seccomp filters during startup.
      (standard_args): Add --seccomp option.
      * lisp/startup.el (command-line): Detect and ignore --seccomp option.
      * test/src/emacs-tests.el (emacs-tests/seccomp/absent-file)
      (emacs-tests/seccomp/invalid-file-size): New unit tests.
      (emacs-tests--with-temp-file): New helper macro.
      * etc/NEWS: Document new --seccomp option.
    • Philipp Stephani's avatar
      Edebug: Disable backtracking when hitting a &define keyword. · 53dfd85a
      Philipp Stephani authored
      Edebug doesn't deal well with backtracking out of definitions, see
      Bug#41988.  Rather than trying to support this rare situation (e.g. by
      implementing a multipass parser), prevent it by adding an implicit
      * lisp/emacs-lisp/edebug.el (edebug--match-&-spec-op): Disable
      backtracking when hitting a &define keyword.
      * test/lisp/emacs-lisp/edebug-tests.el
      (edebug-tests-duplicate-&define): New unit test.
      (edebug-tests--duplicate-&define): New helper macro.
      * doc/lispref/edebug.texi (Backtracking): Mention &define in the list
      of constructs that disable backtracking.
      * etc/NEWS: Document new behavior.
    • Stefan Monnier's avatar
    • Stefan Monnier's avatar
      * lisp/edmacro.el: Use lexical-binding · 6b81f7c1
      Stefan Monnier authored
      (edmacro-finish-edit, edmacro-parse-keys): Use `match-string`.
    • Stefan Monnier's avatar
      * lisp/files-x.el: Use lexical-binding · 3c051db6
      Stefan Monnier authored
    • Stefan Monnier's avatar
      * lisp/ps-mule.el: Use lexical-binding · 649e5c26
      Stefan Monnier authored
      (ps-mule-encode-header-string, ps-mule-begin-job): Use `pcase`.
    • Gregory Heytings's avatar
      Autoload list-colors-display. · 84c1940d
      Gregory Heytings authored
      * lisp/facemenu.el (list-colors-display): Autoload, it is mentioned
      in (info "(emacs)Colors for Faces"), and to be generally available.
    • Michael Albinus's avatar
      Tramp: fix location of files on W32 · ca1ddef2
      Michael Albinus authored
      * lisp/net/tramp.el:
      * lisp/net/tramp-sh.el: Use (eq system-type 'windows-nt) where appropriate.
      (tramp-completion-function-alist-ssh): Fix location of files on W32.
    • Jim Porter's avatar
      Further fix of hostname completion on MS Windows · c975258a
      Jim Porter authored
      * lisp/net/tramp.el (tramp-completion-file-name-regexp-simplified)
      (tramp-completion-file-name-regexp-separate): Fix W32 hostname/method
      completion for simplified and separate syntaxes (same as the previous change
      to default syntax).
      Copyright-paperwork-exempt: yes
    • João Távora's avatar
      Fail earlier if stale Flymake report functions called · c50b5907
      João Távora authored
      If a Flymake backend calls a "stale" report function,
      flymake--handle-report might be called for a backend function that is
      no longer in the flymake--backend-state hash table.  This patch makes
      that erroneous situation slightly more explicit.
      * lisp/progmodes/flymake.el (flymake--handle-report): Improve
      error reporting.
  2. 09 Apr, 2021 16 commits
    • Dmitry Gutov's avatar
      Don't stop when before space or closing paren · 0db2126d
      Dmitry Gutov authored
      * lisp/progmodes/elisp-mode.el (elisp-completion-at-point):
      Don't stop when before space or closing paren (bug#47665).
    • Alan Mackenzie's avatar
      CC Mode: fix c-where-wrt-brace-construct to cope with class declarations · f493a9be
      Alan Mackenzie authored
      Make the function correctly recognize a brace block preceded by an
      introductory line without a parameter list.
      * lisp/progmodes/cc-cmds.el (c-where-wrt-brace-contruct): Reintroduce the use
      of c-beginning-of-decl-1, which was removed some weeks ago, in place of a
      c-syntactic-skip-backward.  Reformulate the code generally.
    • Mattias Engdegård's avatar
      Fix condition-case optimiser bug · 59342f68
      Mattias Engdegård authored
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't
      perform incorrect optimisations when a condition-case variable shadows
      another lexical variable.
      * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
      New test case.
    • Mattias Engdegård's avatar
      Better compiler warning tests · b7a7e879
      Mattias Engdegård authored
      These changes allow all bytecomp-tests to be run interactively.
      * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp--with-warning-test)
      (bytecomp--define-warning-file-test): Interpret any space in the
      pattern as arbitrary whitespace to tolerate line breaks.
      Don't abuse the expected-failure mechanism when checking
      for the expected absense of a warning.
      (bytecomp/*.el): Rewrite patterns to work with line breaks
      in the middle.
    • Mattias Engdegård's avatar
      Clean up bytecomp-tests.el · a2a7cfde
      Mattias Engdegård authored
      Now all test cases are run with both lexical and dynamic binding
      where applicable, comparing interpreted against compiled results.
      Previously, almost all tests were only run with dynamic binding
      which was definitely not intended.
      * test/lisp/emacs-lisp/bytecomp-tests.el
      (byte-opt-testsuite-arith-data): Rename to bytecomp-tests--test-cases.
      (bytecomp-check-1, bytecomp-explain-1, bytecomp-tests)
      (bytecomp-lexbind-tests, bytecomp-lexbind-check-1)
      (bytecomp-lexbind-explain-1): Remove.
      (bytecomp-tests--eval-interpreted, bytecomp-tests--eval-compiled)
      (bytecomp-tests-lexbind, bytecomp-tests-dynbind)
      (bytecomp-tests--test-cases-lexbind-only): New.
    • Stefan Kangas's avatar
      Make refer-every into obsolete alias for seq-every-p · 40db6056
      Stefan Kangas authored
      * lisp/textmodes/refer.el (refer-every): Make into obsolete
      function alias for seq-every-p.  Update single caller.
    • Stefan Kangas's avatar
      Remove redundant #' before lambda in ibuf-*.el · 512ec97b
      Stefan Kangas authored
      * lisp/ibuf-ext.el (ibuffer-included-in-filters-p)
      (ibuffer-included-in-filter-p-1, ibuffer-do-kill-lines)
      (ibuffer-jump-to-buffer, ibuffer-mark-on-buffer)
      (ibuffer-mark-by-name-regexp, ibuffer-mark-by-mode-regexp)
      (ibuffer-mark-by-content-regexp, ibuffer-mark-by-mode)
      (ibuffer-mark-modified-buffers, ibuffer-mark-unsaved-buffers)
      (ibuffer-mark-dissociated-buffers, ibuffer-mark-help-buffers)
      (ibuffer-mark-compressed-file-buffers, ibuffer-mark-old-buffers)
      (ibuffer-mark-special-buffers, ibuffer-mark-read-only-buffers)
      (ibuffer-mark-dired-buffers, ibuffer-do-occur):
      * lisp/ibuf-macs.el (ibuffer-save-marks, define-ibuffer-sorter)
      (define-ibuffer-op): Remove redundant #' before lambda.
    • Stefan Kangas's avatar
      Don't preserve window-line in tabulated-list-print · cdd72c5d
      Stefan Kangas authored
      * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Don't
      try to preserve window-line.  (Bug#42747)
    • Stefan Kangas's avatar
      Use lexical-binding in winner.el · 22515134
      Stefan Kangas authored
      * lisp/winner.el: Use lexical-binding.  Remove redundant :group
      (winner-set, winner-mode-map): Quote function symbols as such.
    • Stefan Monnier's avatar
    • Stefan Kangas's avatar
      Use lexical-binding in cmuscheme.el · fb596973
      Stefan Kangas authored
      * lisp/cmuscheme.el: Use lexical-binding.  Doc fixes.  Remove
      redundant :group args.  Quote function symbols as such.
    • Stefan Kangas's avatar
    • Stefan Kangas's avatar
      Use lexical-binding in foldout.el · 064d933e
      Stefan Kangas authored
      * lisp/foldout.el: Use lexical-binding.  Doc and formatting fixes.
      Quote function symbols as such.
    • Stefan Kangas's avatar
      Use lexical-binding in loadhist.el and add tests · 841dcfa7
      Stefan Kangas authored
      * lisp/loadhist.el: Use lexical-binding.
      * test/lisp/loadhist-tests.el: New file.
    • Mattias Engdegård's avatar
      Self-TCO in `condition-case` error handlers · 612d7316
      Mattias Engdegård authored
      * lisp/emacs-lisp/cl-macs.el (cl--self-tco): Recognise
      `condition-case` handlers as being in the tail position.
      * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels):
      Extend test.
    • Jim Porter's avatar
      Fix hostname completion on MS Windows · 1d42f480
      Jim Porter authored
      * lisp/net/tramp.el (tramp-completion-file-name-regexp-default):
      Handle volume letter being added to paths for file name completion on W32
      systems.  This fixes hostname (and method) autocomplete on W32.
      Copyright-paperwork-exempt: yes