Note combine-and-quote-strings doesn't shell quote
[emacs.git] / admin / coccinelle / vector_contents.cocci
blob10b01f2bbd458f8ac9c9997b90d06d9c4ac43744
1 // Avoid direct access to 'contents' member of
2 // Lisp_Vector, use AREF and ASET where possible.
3 @expression@
4 identifier I1, I2;
5 expression E1, E2;
6 @@
8 - XVECTOR (I1)->contents[I2++] = E1
9 + ASET (I1, I2, E1), I2++
11 - XVECTOR (I1)->contents[E1] = E2
12 + ASET (I1, E1, E2)
14 - XVECTOR (I1)->contents[E1]
15 + AREF (I1, E1)