<p>Before the user would sometimes have to override <code>UnwantedFiletype=</code> in the user config file to remove an extension written in the system file. Geany would ignore an overridden filetype in the user config file that also matches the extension. This happened when the wanted filetype had a higher index than the unwanted one in <code>filetypes_array</code>.</p>
<p>This also first refactors the code without <code>filetypes_find</code> (which I wrote ages ago) - It's not worth abstracting finding through <code>filetypes_array</code>, it's not bug prone, and it may even cause bugs with non-type-safe predicate signature. It was only used once anyway.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany/pull/2166'>https://github.com/geany/geany/pull/2166</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Kill filetypes_find(), rename static function</li>
  <li>Always allow user filetype extensions to override system config file</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/2166/files#diff-0">src/filetypes.c</a>
    (48)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/2166/files#diff-1">src/filetypes.h</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/2166/files#diff-2">src/filetypesprivate.h</a>
    (1)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany/pull/2166.patch'>https://github.com/geany/geany/pull/2166.patch</a></li>
  <li><a href='https://github.com/geany/geany/pull/2166.diff'>https://github.com/geany/geany/pull/2166.diff</a></li>
</ul>

<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/2166?email_source=notifications&email_token=AAIOWJ4GGIN4N4CAF4Z4RN3PX62EPA5CNFSM4HRDRAO2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWWM3JA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZD54K44U6IULTU2KLPX62EPANCNFSM4HRDRAOQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJ6HFAM64MXOD2QNJPTPX62EPA5CNFSM4HRDRAO2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWWM3JA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2166?email_source=notifications\u0026email_token=AAIOWJ4GGIN4N4CAF4Z4RN3PX62EPA5CNFSM4HRDRAO2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWWM3JA",
"url": "https://github.com/geany/geany/pull/2166?email_source=notifications\u0026email_token=AAIOWJ4GGIN4N4CAF4Z4RN3PX62EPA5CNFSM4HRDRAO2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWWM3JA",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>