From cb77b6d1c1c0b6d783d2ce19b421785d7f1c26a6 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Sat, 4 Nov 2017 09:35:59 +0300 Subject: [PATCH 1/2] contrib: Adapt `Tupfile` to upstream changes --- contrib/Tupfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/Tupfile b/contrib/Tupfile index eb44f7bb..52b07900 100644 --- a/contrib/Tupfile +++ b/contrib/Tupfile @@ -16,7 +16,7 @@ static = no suffix = .opt CXX = g++ -CXXFLAGS = -pedantic -std=gnu++11 -Wall -Wno-reorder -Wno-sign-compare -Wno-address +CXXFLAGS = -pedantic -std=gnu++14 -Wall -Wno-unused-parameter -Wno-reorder -Wno-sign-compare -Wno-address -Wno-noexcept-type -Wno-unknown-attributes -Wno-unknown-warning-option CPPFLAGS = LDFLAGS = LIBS = @@ -43,8 +43,8 @@ else LIBS += -lncursesw -ldbghelp CPPFLAGS += -D_XOPEN_SOURCE=700 else - LIBS += -lncursesw - CPPFLAGS += -I/usr/include/ncursesw + LIBS += `pkg-config --libs ncursesw` + CPPFLAGS += `pkg-config --cflags ncursesw` ifeq ($(CXX),g++) LDFLAGS += -rdynamic From 61ab3a1d263dac84adc0204e8727ffddc41dd353 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Sat, 4 Nov 2017 09:39:23 +0300 Subject: [PATCH 2/2] rc: Fix `Tupfile` highlighting --- rc/extra/tupfile.kak | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rc/extra/tupfile.kak b/rc/extra/tupfile.kak index 77630c2e..6d4d851e 100644 --- a/rc/extra/tupfile.kak +++ b/rc/extra/tupfile.kak @@ -4,7 +4,7 @@ # Detection # ‾‾‾‾‾‾‾‾‾ -hook global BufCreate (.+/)?[Tt]upfile %{ +hook global BufCreate .*/?Tup(file|rules)(\.\w+)?$ %{ set-option buffer filetype tupfile } @@ -19,11 +19,12 @@ add-highlighter shared/tupfile/string fill string add-highlighter shared/tupfile/comment fill comment add-highlighter shared/tupfile/code regex "\%[fbBeoOdg]\b" 0:value -add-highlighter shared/tupfile/code regex "\$\([\w_]+\)" 0:value -add-highlighter shared/tupfile/code regex ":\s*(foreach)\b" 1:keyword -add-highlighter shared/tupfile/code regex "\.gitignore\b" 0:keyword -add-highlighter shared/tupfile/code regex "\b(ifn?eq|ifn?def|else|endif|error|include|include_rules|run|preload|export)\b" 0:keyword -add-highlighter shared/tupfile/code regex "\b(&?[\w_]+)\s*[:+]?=" 1:keyword +add-highlighter shared/tupfile/code regex "[$@]\([\w_]+\)" 0:value +add-highlighter shared/tupfile/code regex "^\h*:\s*(foreach)\b" 1:keyword +add-highlighter shared/tupfile/code regex "^\h*(\.gitignore)\b" 1:keyword +add-highlighter shared/tupfile/code regex "^\h*\b(ifn?eq|ifn?def|else|endif|error|include|include_rules|run|preload|export)\b" 0:keyword +add-highlighter shared/tupfile/code regex "^\h*\b(&?[\w_]+)\s*[:+]?=" 1:keyword +add-highlighter shared/tupfile/code regex "`[^`\n]+`" 0:meta # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾