123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395 |
- (defvar endless-sky-constants
- '("color"
- "conversation"
- "effect"
- "event"
- "fleet"
- "galaxy"
- "government"
- "hazard"
- "interface"
- "mission"
- "news"
- "outfit"
- "outfitter"
- "person"
- "phrase"
- "planet"
- "ship"
- "shipyard"
- "start"
- "substitution"
- "system"
- "true"
- "false"
- "trade"))
-
- (defvar endless-sky-builtins
- '(
- "Drone"
- "Fighter"
- "Fine"
- "Mortgage"
- "abort"
- "absolute"
- "accept"
- "accompany"
- "account"
- "action"
- "active"
- "addend"
- "afterburner"
- "ammo"
- "angle"
- "anti-missile"
- "apparent"
- "arrival"
- "assist"
- "assisting"
- "asteroid"
- "atmosphere"
- "atrocities"
- "atrocity"
- "attitude"
- "attributes"
- "automaton"
- "back"
- "bay"
- "belt"
- "blast"
- "blast"
- "blocked"
- "board"
- "boarding"
- "branch"
- "bribe"
- "brightness"
- "bunks"
- "burn"
- "burst"
- "capacity"
- "capture"
- "cargo"
- "category"
- "chance"
- "choice"
- "clear"
- "clearance"
- "cloak"
- "cloaking"
- "cluster"
- "collection"
- "commodities"
- "complete"
- "concealment"
- "conditions"
- "confusion"
- "constant"
- "consumption"
- "cooling"
- "corrosion"
- "cost"
- "costs"
- "count"
- "credits"
- "crew"
- "custom"
- "daily"
- "damage"
- "date"
- "deadline"
- "death"
- "decline"
- "defer"
- "delay"
- "density"
- "departure"
- "depleted"
- "description"
- "despawn"
- "destination"
- "destruct"
- "dialog"
- "die"
- "disable"
- "disabled"
- "discharge"
- "display"
- "disruption"
- "dissipation"
- "distance"
- "drag"
- "drive"
- "dropoff"
- "duration"
- "efficiency"
- "energy"
- "enforces"
- "engine"
- "enter"
- "environmental"
- "equivalent"
- "evade"
- "event"
- "explode"
- "facing"
- "fail"
- "fence"
- "fighters"
- "final"
- "fine"
- "fire"
- "firing"
- "flare"
- "flotsam"
- "force"
- "foreign"
- "frame"
- "frequency"
- "friendly"
- "fuel"
- "generation"
- "give"
- "goto"
- "government"
- "gravitational"
- "gun"
- "habitable"
- "hail"
- "hardpoint"
- "hazard"
- "haze"
- "heat"
- "hidden"
- "history"
- "hit"
- "homing"
- "hostile"
- "hull"
- "hyperdrive"
- "icon"
- "illegal"
- "illegals"
- "inaccuracy"
- "income"
- "inefficiency"
- "inertia"
- "infiltrating"
- "infrared"
- "inscrutable"
- "installable"
- "interest"
- "interference"
- "invisible"
- "ion"
- "jamming"
- "job"
- "jump"
- "kill"
- "label"
- "landing"
- "landscape"
- "language"
- "launch"
- "leak"
- "leakage"
- "left"
- "licenses"
- "lifetime"
- "link"
- "live"
- "location"
- "log"
- "maintenance"
- "map"
- "mappable"
- "mass"
- "message"
- "minable"
- "minables"
- "minor"
- "missile"
- "modifier"
- "mortgage"
- "mounts"
- "multiplier"
- "music"
- "name"
- "names"
- "near"
- "neighbor"
- "never"
- "noun"
- "npc"
- "object"
- "offer"
- "offset"
- "operating"
- "optical"
- "outfit"
- "outfits"
- "outfitter"
- "over"
- "overheat"
- "override"
- "parallel"
- "passengers"
- "payment"
- "penalties"
- "penalty"
- "percentage"
- "period"
- "personality"
- "phasing"
- "piercing"
- "planet"
- "player"
- "plural"
- "portrait"
- "ports"
- "pos"
- "power"
- "principal"
- "priority"
- "protection"
- "provoke"
- "provoked"
- "radar"
- "radius"
- "raid"
- "ramscoop"
- "random"
- "range"
- "rate"
- "relative"
- "reload"
- "remove"
- "repair"
- "repeat"
- "replace"
- "reputation"
- "require"
- "required"
- "resistance"
- "reveal"
- "reverse"
- "rewind"
- "right"
- "safe"
- "salaries"
- "save"
- "scale"
- "scaling"
- "scan"
- "scene"
- "score"
- "scram"
- "scramble"
- "security"
- "self"
- "sentence"
- "set"
- "shield"
- "shields"
- "ships"
- "shipyard"
- "show"
- "slowing"
- "solar"
- "sound"
- "source"
- "space"
- "spaceport"
- "spawn"
- "speed"
- "spin"
- "split"
- "sprite"
- "star"
- "starfield"
- "stealth"
- "steering"
- "stopover"
- "stream"
- "strength"
- "submunition"
- "substitutions"
- "swizzle"
- "system"
- "system-wide"
- "tactical"
- "target"
- "term"
- "threshold"
- "thrust"
- "thrusting"
- "thumbnail"
- "time"
- "toward"
- "tracking"
- "tribute"
- "trigger"
- "turn"
- "turning"
- "turret"
- "uncapturable"
- "under"
- "universal"
- "unlink"
- "unplunderable"
- "unvisit"
- "variant"
- "velocity"
- "visit"
- "waypoint"
- "weapon"
- "wind"
- "word"
- "wormhole"
- "zoom"
- ))
- (defvar endless-sky-keywords
- '(
- "no"
- "on"
- "to"
- "in"
- "out"
- "not"
- "has"
- "for"
- "if"
- "and"
- "or"
- "never"
- ))
- (defvar endless-sky-font-lock-defaults
- `((
- ;; stuff between double quotes and backticks
- ;; ("\"\\.\\*\\?" . font-lock-string-face)
- ("\`\\.\\*\\?\`" . font-lock-string-face)
- ;; ; : , ; { } => @ $ = are all special elements
- (":\\|,\\|;\\|{\\|}\\|=>\\|@\\|$\\|=" . font-lock-keyword-face)
- ( ,(regexp-opt endless-sky-keywords 'words) . font-lock-keyword-face)
- ( ,(regexp-opt endless-sky-builtins 'words) . font-lock-builtin-face)
- ( ,(regexp-opt endless-sky-constants 'words) . font-lock-constant-face)
- )))
-
- (define-derived-mode endless-sky-mode fundamental-mode "Endless Sky data"
- "A major mode for editing Endless Sky data files"
- (setq font-lock-defaults endless-sky-font-lock-defaults)
- (setq comment-start "#")
- (setq comment-end "")
- (modify-syntax-entry ?# "< b" endless-sky-mode-syntax-table)
- (modify-syntax-entry ?\n "> b" endless-sky-mode-syntax-table)
- (define-key endless-sky-mode-map (kbd "TAB") 'self-insert-command))
- (provide 'endless-sky-mode)
|