I'm considering applying the attached patch.

Anything else you would like to see added?

Benno

From f8cdeb3386695b61d7918c9c43178d26ba4757cd Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensb...@telfort.nl>
Date: Tue, 6 Aug 2019 18:51:58 +0200
Subject: [PATCH] syntaxes: recognize .ctp extension as a PHP file, and .cu as
 a C/C++ file
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This addresses https://bugs.debian.org/932192.
Requested-by: Jérôme Bardot <bardot.jer...@gmail.com>
---
 syntax/c.nanorc   | 2 +-
 syntax/php.nanorc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/syntax/c.nanorc b/syntax/c.nanorc
index bc1361e0..bb149bc1 100644
--- a/syntax/c.nanorc
+++ b/syntax/c.nanorc
@@ -1,6 +1,6 @@
 ## Here is an example for C/C++.
 
-syntax c "\.([ch](pp|xx)?|C|cc|c\+\+|H|hh|ii?)$"
+syntax c "\.([ch](pp|xx)?|C|cc|c\+\+|cu|H|hh|ii?)$"
 magic "^(C|C\+\+) (source|program)"
 comment "//"
 
diff --git a/syntax/php.nanorc b/syntax/php.nanorc
index dead9d30..1a61f066 100644
--- a/syntax/php.nanorc
+++ b/syntax/php.nanorc
@@ -1,6 +1,6 @@
 ## Here is an example for PHP.
 
-syntax php "\.ph(p[23457s~]?|tml)$"
+syntax php "\.(php[23457s~]?|phtml|ctp)$"
 magic "PHP script"
 comment "//"
 
-- 
2.22.0

Reply via email to