<p>In <a href="https://github.com/geany/geany/pull/1146#discussion_r71964937">src/highlighting.c</a>:</p>
<pre style='color:#555'>> @@ -1776,3 +1776,23 @@ gboolean highlighting_is_code_style(gint lexer, gint style)
>    return !(highlighting_is_comment_style(lexer, style) ||
>            highlighting_is_string_style(lexer, style));
>  }
> +
> +
> +gchar **highlighting_get_keywords(GeanyFiletypeID filetype_id)
> +{
> +  GString *str = g_string_sized_new(1000);
> +  gchar **keywords;
> +  gchar **keyword_str;
> +
> +  foreach_strv(keyword_str, style_sets[filetype_id].keywords)
</pre>
<p>This could be replaced with the more succinct and idiomatic:</p>

<div class="highlight highlight-source-c"><pre><span class="pl-k">for</span> (<span class="pl-k">const</span> <span class="pl-k">char</span> **kwd = style_sets[filetype_id].keywords; *kwd; kwd++)</pre></div>

<p>Those <code>foreach_</code> macros only obfuscate the code and offer no benefit, IMO.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/1146/files/1e74c11aca41274d690d8da0b6e59b1247fbb222#r71964937">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ0U0iNeS6tqFDpWrIF2C9juYWXb2ks5qYXQbgaJpZM4JS-lH">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ2FFBRY3hYnALcbpoK5ECEaPXKt4ks5qYXQbgaJpZM4JS-lH.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/1146/files/1e74c11aca41274d690d8da0b6e59b1247fbb222#r71964937"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>