1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Check keyword args of make-process

The functions make-process and make-network-process have many
keyword args and it's easy to misspell some of them.

Use a compiler macro to warn about some possible mistakes.

* lisp/emacs-lisp/bytecomp.el (bytecomp--check-keyword-args): New
  helper.
  (make-process, make-network-process): Define a compiler macro that
  performs some checks but doesn't anything else.

* test/lisp/emacs-lisp/bytecomp-tests.el: Add some tests.

* test/lisp/emacs-lisp/bytecomp-resources/:
  (warn-make-process-missing-keyword-arg.el,
   warn-make-process-missing-keyword-value.el,
   warn-make-process-repeated-keyword-arg.el,
   warn-make-process-unknown-keyword-arg.el): New test files
This commit is contained in:
Helmut Eller 2023-08-03 08:33:40 +02:00 committed by Mattias Engdegård
parent efb3ef0fe0
commit 3e79fd3d4e
6 changed files with 90 additions and 0 deletions

View file

@ -0,0 +1,3 @@
;;; -*- lexical-binding: t -*-
(defun foo ()
(make-process :name "ls"))