Browse Source

Ticket #4320: syntax/Syntax: document location of syntax files.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Andrew Borodin 2 years ago
parent
commit
cea7d35209
2 changed files with 19 additions and 1 deletions
  1. 5 1
      configure.ac
  2. 14 0
      misc/syntax/Syntax.in

+ 5 - 1
configure.ac

@@ -680,7 +680,6 @@ lib/vfs/Makefile
 lib/widget/Makefile
 
 misc/syntax/Makefile
-misc/syntax/Syntax
 
 doc/Makefile
 
@@ -706,6 +705,11 @@ doc/hlp/sr/Makefile
 po/Makefile.in
 ])
 
+dnl https://stackoverflow.com/questions/30897170/ac-subst-does-not-expand-variable/30932102#30932102
+AC_CONFIG_FILES(
+[misc/syntax/Syntax], [sed -i -e "s%\${prefix}%$PREFIX%" misc/syntax/Syntax], [export PREFIX=$prefix]
+)
+
 AC_CONFIG_FILES([
 tests/Makefile
 tests/lib/Makefile

+ 14 - 0
misc/syntax/Syntax.in

@@ -1,6 +1,20 @@
 # This file describes which highlighting scheme is applied to a particular
 # file in mcedit.
 #
+#
+# System-wide files (this and syntax definitions) are located in
+# @datarootdir@/@PACKAGE@/syntax/ directory.
+#
+# User's files (this and syntax definitions) are located in
+# ~/.local/share/@PACKAGE@/syntax directory.
+#
+# If user's file is missing, system-wide one is used.
+#
+#
+# This file is rescanned on opening of every new editor file.
+#
+# Format of this file is following.
+#
 # Each entry consists of two lines: a "file" specification and the
 # corresponding highlighting definition ("include"). A file specification
 # can have two or three fields, each separated by white-space characters.