<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/lisp/progmodes/cc-engine.el, branch scratch/codespell</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>; * lisp/progmodes/cc-engine.el: Delete trailing whitespace.</title>
<updated>2023-01-27T10:25:08+00:00</updated>
<author>
<name>Stefan Kangas</name>
</author>
<published>2023-01-27T10:25:08+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5859413df235e87a89257e991cc6c6fd220b2b9c'/>
<id>5859413df235e87a89257e991cc6c6fd220b2b9c</id>
<content type='text'>
This was holding up the automatic merges due to commit hooks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was holding up the automatic merges due to commit hooks.
</pre>
</div>
</content>
</entry>
<entry>
<title>CC Mode: Prevent two classes of "type" prematurely entering c-found-types</title>
<updated>2023-01-19T10:59:10+00:00</updated>
<author>
<name>Alan Mackenzie</name>
</author>
<published>2023-01-19T10:59:10+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=21be03cccb611ea9e6c73fb04e578c48edf49a25'/>
<id>21be03cccb611ea9e6c73fb04e578c48edf49a25</id>
<content type='text'>
This fixes bug #60769.  The two classes of "type" are foo and bar in
"foo d(bar () ...)", where the d could be a mistyped C-M-d.

* list/progmodes/cc-engine.el (c-forward-decl-or-cast-1): New local variable
got-arglist.  Refactor a sequence of enclosed `if' forms into a `cond' form.
Set got-arglist when needed.  In CASE 2, set unsafe-maybe to inhibit foo
being entered into c-found-types.  In CASE 19, likewise set unsafe-maybe, to
inhibit bar entering c-found-types.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes bug #60769.  The two classes of "type" are foo and bar in
"foo d(bar () ...)", where the d could be a mistyped C-M-d.

* list/progmodes/cc-engine.el (c-forward-decl-or-cast-1): New local variable
got-arglist.  Refactor a sequence of enclosed `if' forms into a `cond' form.
Set got-arglist when needed.  In CASE 2, set unsafe-maybe to inhibit foo
being entered into c-found-types.  In CASE 19, likewise set unsafe-maybe, to
inhibit bar entering c-found-types.
</pre>
</div>
</content>
</entry>
<entry>
<title>CC Mode: On removal of "typedef", remove pertinent types from c-found-types</title>
<updated>2023-01-17T18:15:45+00:00</updated>
<author>
<name>Alan Mackenzie</name>
</author>
<published>2023-01-17T18:15:45+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=dbac923b9df97706d3944c21edfc9117b408d80c'/>
<id>dbac923b9df97706d3944c21edfc9117b408d80c</id>
<content type='text'>
For this purpose, record the type names declared by typedef in a text
property, c-typedef, on the typedef.  On any change to that "typedef" or a
type, remove the old identifier(s) from c-found-types.

This should fix bug #59671.

* lisp/progmodes/cc-defs.el (c-search-forward-non-nil-char-property): New
macro.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Move the scope of
identifier-start from the "inner" let form to the outer one.  Amend the
return value such that the middle element of the second element is now the
position of the "typedef", not merely non-nil.

* lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Disregard the LIMIT
parameter when fontifying the declarators of a typedef construct.  Also in
this case, set the c-typedef text property on the "typedef" to the list of
declared types.  Amend this list when these declared types change.
(c-font-lock-single-decl): Massage the `types' argument given to
c-font-lock-declarators.
(c-font-lock-cut-off-declarators): Amend to work when the starting point of
the fontification is inside a brace block.

* lisp/progmodes/cc-mode.el (c-before-change-de-typedef)
(c-after-change-de-typedef): New functions.
(c-update-new-id): Replace the erroneous c-end-of-current-token with a clause
containing c-forward-token-2.
(c-before-change): Call c-before-change-de-typedef.
(c-after-change): Call c-after-change-de-typedef.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For this purpose, record the type names declared by typedef in a text
property, c-typedef, on the typedef.  On any change to that "typedef" or a
type, remove the old identifier(s) from c-found-types.

This should fix bug #59671.

* lisp/progmodes/cc-defs.el (c-search-forward-non-nil-char-property): New
macro.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Move the scope of
identifier-start from the "inner" let form to the outer one.  Amend the
return value such that the middle element of the second element is now the
position of the "typedef", not merely non-nil.

* lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Disregard the LIMIT
parameter when fontifying the declarators of a typedef construct.  Also in
this case, set the c-typedef text property on the "typedef" to the list of
declared types.  Amend this list when these declared types change.
(c-font-lock-single-decl): Massage the `types' argument given to
c-font-lock-declarators.
(c-font-lock-cut-off-declarators): Amend to work when the starting point of
the fontification is inside a brace block.

* lisp/progmodes/cc-mode.el (c-before-change-de-typedef)
(c-after-change-de-typedef): New functions.
(c-update-new-id): Replace the erroneous c-end-of-current-token with a clause
containing c-forward-token-2.
(c-before-change): Call c-before-change-de-typedef.
(c-after-change): Call c-after-change-de-typedef.
</pre>
</div>
</content>
</entry>
<entry>
<title>CC Mode: Prevent ids in temporary "declarators" getting into c-found-types</title>
<updated>2023-01-16T17:44:44+00:00</updated>
<author>
<name>Alan Mackenzie</name>
</author>
<published>2023-01-16T17:44:44+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c1d32d9a20dc94d403725c288d168451b916c034'/>
<id>c1d32d9a20dc94d403725c288d168451b916c034</id>
<content type='text'>
This should fix bug #60765.  In the scenario type an identifier in front of
foo (bar, baz), as when started a new statement.  This temporarily makes the
function call a declarator, and bar and baz types.  Don't enter bar and baz
into c-found-types.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1) (CASE 6): When a
'maybe type triggers this case, set `unsafe-maybe' to non-nil.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should fix bug #60765.  In the scenario type an identifier in front of
foo (bar, baz), as when started a new statement.  This temporarily makes the
function call a declarator, and bar and baz types.  Don't enter bar and baz
into c-found-types.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1) (CASE 6): When a
'maybe type triggers this case, set `unsafe-maybe' to non-nil.
</pre>
</div>
</content>
</entry>
<entry>
<title>; Add 2023 to copyright years.</title>
<updated>2023-01-01T10:31:12+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2023-01-01T10:31:12+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=cae528457cb862dc886a34240c9d4c73035b6659'/>
<id>cae528457cb862dc886a34240c9d4c73035b6659</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>; Fix typos</title>
<updated>2022-12-26T09:42:02+00:00</updated>
<author>
<name>Stefan Kangas</name>
</author>
<published>2022-12-23T17:21:10+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=2608e5edcca5094b61b4ccebcef160cc2bfd7f83'/>
<id>2608e5edcca5094b61b4ccebcef160cc2bfd7f83</id>
<content type='text'>
(cherry picked from commit a5d39e11443fa30c8e8bc58254a1a59550dcd99e)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit a5d39e11443fa30c8e8bc58254a1a59550dcd99e)
</pre>
</div>
</content>
</entry>
<entry>
<title>CC Mode: Prevent lone ids being parsed as types unless in decl arglists</title>
<updated>2022-11-29T20:22:58+00:00</updated>
<author>
<name>Alan Mackenzie</name>
</author>
<published>2022-11-29T20:19:34+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=f373a23e5171fd8ecb4555cee618bbcd2e7077e3'/>
<id>f373a23e5171fd8ecb4555cee618bbcd2e7077e3</id>
<content type='text'>
This fixes bug #59051.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): In the test for the
last invocation of c-fdoc-shift-type-backward before CASE 1, additionally
test CONTEXT not being an arglist or BACKUP-AT-TYPE being non-nil.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes bug #59051.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): In the test for the
last invocation of c-fdoc-shift-type-backward before CASE 1, additionally
test CONTEXT not being an arglist or BACKUP-AT-TYPE being non-nil.
</pre>
</div>
</content>
</entry>
<entry>
<title>CC Mode: Fix the "asymmetry rule" for fontifying a type followed by *</title>
<updated>2022-11-25T09:49:02+00:00</updated>
<author>
<name>Alan Mackenzie</name>
</author>
<published>2022-11-25T09:49:02+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=639adf26a1b43445eaf52e4246cf1f5b46b5e12d'/>
<id>639adf26a1b43445eaf52e4246cf1f5b46b5e12d</id>
<content type='text'>
This fixes bug #59427.  We now handle correctly the case when a parenthesis
follows the * which is ambiguously a multiplication or indirection operator.
Also, we don't recognise a type thus found as a found type - the evidence is
too weak.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Fix CASE 17.5 as
above.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes bug #59427.  We now handle correctly the case when a parenthesis
follows the * which is ambiguously a multiplication or indirection operator.
Also, we don't recognise a type thus found as a found type - the evidence is
too weak.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Fix CASE 17.5 as
above.
</pre>
</div>
</content>
</entry>
<entry>
<title>CC Mode: Make it scroll fast over buffers with only #define's</title>
<updated>2022-11-24T10:51:03+00:00</updated>
<author>
<name>Alan Mackenzie</name>
</author>
<published>2022-11-24T10:51:03+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=3208a42c47c4f98cb03c4b15164ca83113244b40'/>
<id>3208a42c47c4f98cb03c4b15164ca83113244b40</id>
<content type='text'>
* lisp/progmodes/cc-engine.el (c-forward-over-token): New LIMIT parameter

* lisp/progmodes/cc-langs.el (c-anchored-hash-define-no-parens): Replace
ill-formed regular expression (which mixed \\sw and character alternative)
with simpler efficient regexp.

* lisp/progmodes/cc-mode.el (c-fl-decl-end): New forward limit LIM+ used in
c-forward-declarator and c-forward-over-token.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/progmodes/cc-engine.el (c-forward-over-token): New LIMIT parameter

* lisp/progmodes/cc-langs.el (c-anchored-hash-define-no-parens): Replace
ill-formed regular expression (which mixed \\sw and character alternative)
with simpler efficient regexp.

* lisp/progmodes/cc-mode.el (c-fl-decl-end): New forward limit LIM+ used in
c-forward-declarator and c-forward-over-token.
</pre>
</div>
</content>
</entry>
<entry>
<title>; Fix typos</title>
<updated>2022-11-23T04:49:22+00:00</updated>
<author>
<name>Stefan Kangas</name>
</author>
<published>2022-11-23T04:43:19+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5e8c62ffcae473b89e268e0081d4041fb19abef7'/>
<id>5e8c62ffcae473b89e268e0081d4041fb19abef7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
