1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 00:01:33 -08:00
emacs/lisp/progmodes
Stefan Monnier 806759dc0a (pcase): New _ syntax in pred/app functions
The current syntax for functions in `app` and `pred` patterns
allows a shorthand (F ARGS) where the object being matched is
added as an extra last argument.  This is nice for things like
(pred (< 5)) but sometimes the object needs to be at
another position.
Until now you had to use (pred (lambda (x) (memq x my-list)))
or (pred (pcase--flip memq my-list)) in those cases.
So, introduce a new shorthand where `_` can be used to indicate
where the object should be passed: (pred (memq _ my-list))

* lisp/emacs-lisp/pcase.el (pcase--split-pred): Document new syntax
for pred/app functions.
(pcase--funcall): Support new syntax.
(pcase--flip): Declare obsolete.
(pcase--u1, \`): Use `_` instead.
(pcase--split-pred): Adjust accordingly.

* doc/lispref/control.texi (pcase Macro): Document new syntax
for pred/app functions.

* lisp/progmodes/opascal.el (pcase-defmacro):
* lisp/emacs-lisp/seq.el (seq--make-pcase-bindings):
* lisp/emacs-lisp/eieio.el (eieio):
* lisp/emacs-lisp/cl-macs.el (cl-struct, cl-type):
Use _ instead of `pcase--flip`.
(cl--pcase-mutually-exclusive-p): Adjust accordingly.

* lisp/emacs-lisp/map.el (map--pcase-map-elt): Declare obsolete.
(map--make-pcase-bindings): Use `_` instead.
2024-02-11 22:00:44 -05:00
..
antlr-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
asm-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
autoconf.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
bat-mode.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
bug-reference.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
c-ts-common.el ; Fix typos in symbol names 2024-01-21 15:28:06 +01:00
c-ts-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-align.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-awk.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-bytecomp.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cc-cmds.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-defs.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-engine.el ; Fix typos in symbol names 2024-01-21 15:28:06 +01:00
cc-fonts.el ; Fix typos in symbol names 2024-01-21 15:28:06 +01:00
cc-guess.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cc-langs.el ; Fix typos in symbol names 2024-01-21 15:28:06 +01:00
cc-menus.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cc-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-styles.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-vars.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cfengine.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cl-font-lock.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cmacexp.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cmake-ts-mode.el Simplify imenu setup for {cmake,dockerfile}-ts-modes 2024-01-26 20:41:17 -08:00
compile.el Fix downcasing of mode-name in compile.el 2024-02-03 13:00:15 +02:00
cperl-mode.el ; Fix my last commit 2024-02-04 13:20:21 +01:00
cpp.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
csharp-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cwarn.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
dcl-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
dockerfile-ts-mode.el Merge from origin/emacs-29 2024-01-27 08:14:31 -05:00
ebnf-abn.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-bnf.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-dtd.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-ebx.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-iso.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-otz.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-yac.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf2ps.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebrowse.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
eglot.el ; Fix typos 2024-02-04 11:06:50 +01:00
elisp-mode.el * lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Fix bug#68514 2024-01-18 14:05:16 -05:00
elixir-ts-mode.el elixir-ts-mode: Highlight more method definitions 2024-02-07 04:18:54 +02:00
erts-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
etags-regen.el New feature: etags-regen-mode 2024-01-04 03:44:40 +02:00
etags.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
executable.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
f90.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
flymake-cc.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
flymake-proc.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
flymake.el Take stock of the wheel-up/down confusion 2024-01-24 12:57:33 -05:00
fortran.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
gdb-mi.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
glasses.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
go-ts-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
grep.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
gud.el ; Spelling fixes 2024-01-30 17:23:25 -08:00
heex-ts-mode.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
hideif.el ; Fix typos 2024-01-28 17:11:51 +01:00
hideshow.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
icon.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
idlw-complete-structtag.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
idlw-help.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
idlw-shell.el doc: Delete extraneous quotes around keys 2024-01-21 14:09:34 +01:00
idlw-toolbar.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
idlwave.el doc: Delete extraneous quotes around keys 2024-01-21 14:09:34 +01:00
inf-lisp.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
java-ts-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
js.el Merge from origin/emacs-29 2024-02-03 06:49:53 -05:00
json-ts-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ld-script.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
lua-ts-mode.el Support indented continuation lines in lua-ts-mode 2024-01-11 21:51:23 +01:00
m4-mode.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
make-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
meta-mode.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
mixal-mode.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
modula2.el modula2.el: Avoid font-lock-*-face variables 2024-02-09 14:22:14 -05:00
octave.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
opascal.el (pcase): New _ syntax in pred/app functions 2024-02-11 22:00:44 -05:00
pascal.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
perl-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
prog-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
project.el Use new variable Buffer-menu-show-internal in project-list-buffers. 2024-02-06 19:55:41 +02:00
prolog.el doc: Delete extraneous quotes around keys 2024-01-21 14:09:34 +01:00
ps-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
python.el Add the public API of Compat to the core 2024-02-11 22:50:29 +01:00
ruby-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ruby-ts-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
rust-ts-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
scheme.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
sh-script.el doc: Delete extraneous quotes around keys 2024-01-21 14:09:34 +01:00
simula.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
sql.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
subword.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
tcl.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
typescript-ts-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
vera-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
verilog-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
vhdl-mode.el ; Rename a lexical variable in vhdl-mode.el 2024-01-30 16:15:59 +02:00
which-func.el Remove redundant apply with derived-mode-p 2024-02-12 02:43:35 +01:00
xref.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
xscheme.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00