Add support for XPM. (#3706)

* .xpm and .pm extensions associated with XPM.

* .pm is disambiguated by searching the /* XPM */ string.
  This is how `file` performs detection and should work with
  every XPM3 file (most XPM generated by software later than 1991).

Added XPM samples:

* stick-unfocus.xpm: extracted from Fluxbox (MIT License)
  0c13ddc0c8/data/styles/Emerge/pixmaps/stick-unfocus.xpm

* cc-public_domain_mark_white.pm: public domain image from
  https://commons.wikimedia.org/wiki/File:Cc-public_domain_mark_white.svg
  converted to XPM with ImageMagick (convert input.svg output.xpm).
This commit is contained in:
Santiago M. Mola
2017-07-22 15:19:22 +02:00
committed by Colin Seymour
parent e60384b018
commit 085604948e
6 changed files with 131 additions and 3 deletions

View File

@@ -349,6 +349,8 @@ module Linguist
Language["Perl 6"]
elsif /\buse\s+(?:strict\b|v?5\.)/.match(data)
Language["Perl"]
elsif /^\s*\/\* XPM \*\//.match(data)
Language["XPM"]
end
end

View File

@@ -4891,6 +4891,14 @@ XML:
- Web.config
- packages.config
language_id: 399
XPM:
type: data
extensions:
- ".xpm"
- ".pm"
ace_mode: c_cpp
tm_scope: source.c
language_id: 781846279
XPages:
type: programming
extensions: