summaryrefslogtreecommitdiffstats
path: root/genvim.txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-12-22 06:47:33 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-12-22 06:47:33 -0800
commitb6cfd8ce554641c4ea62e436c6d132753a2f1f7d (patch)
tree52cfb967c9e565f7d5981baf4708ffd1e6f2fcdf /genvim.txr
parent96af2b6e4ffba5e08639e5ca1b307b44e34cb697 (diff)
downloadtxr-b6cfd8ce554641c4ea62e436c6d132753a2f1f7d.tar.gz
txr-b6cfd8ce554641c4ea62e436c6d132753a2f1f7d.tar.bz2
txr-b6cfd8ce554641c4ea62e436c6d132753a2f1f7d.zip
Syntax highlighting regression and omission.
* genvim.txr: Use new mboundp to check for macros, and special-operator-p to detect operators. fboundp doesn't report them any more. Also, :postinit must be included among lispwords.
Diffstat (limited to 'genvim.txr')
-rw-r--r--genvim.txr27
1 files changed, 14 insertions, 13 deletions
diff --git a/genvim.txr b/genvim.txr
index 13027b1e..d4b9c049 100644
--- a/genvim.txr
+++ b/genvim.txr
@@ -16,7 +16,9 @@ static void dir_tables_init(void)
(pkg-name [mapcar car entry])
(pkg [mapcar cdr entry]))
(append-each ((sym (package-symbols pkg)))
- (when (or (boundp sym) (fboundp sym) (constantp sym))
+ (when (or (boundp sym) (fboundp sym)
+ (mboundp sym) (special-operator-p sym)
+ (constantp sym))
(list sym)))))
@(bind txl-sym
@(append-each ((sym txl-orig-sym))
@@ -46,17 +48,16 @@ static void dir_tables_init(void)
@(bind glyph `!$%&*+\\-<=>?@{bs}_~`)
@(bind lispwords @(append-each ((sym txl-orig-sym)
(text txl-sym))
- (let ((fb (symbol-function sym)))
- (if (or (special-operator-p sym)
- (and fb (not (functionp fb))))
- (unless (memq sym '(and dwim inc oand opip or pset
- qquote quote qref rotate set
- shift swap sys:l1-setq
- sys:lisp1-setq sys:qquote
- sys:quasi sys:quasilist sys:setq
- sys:setqf new lnew
- meth umeth usl))
- (list text))))))
+ (if (or (special-operator-p sym)
+ (mboundp sym))
+ (unless (memq sym '(and dwim inc oand opip or pset
+ qquote quote qref rotate set
+ shift swap sys:l1-setq
+ sys:lisp1-setq sys:qquote
+ sys:quasi sys:quasilist sys:setq
+ sys:setqf new lnew
+ meth umeth usl))
+ (list text)))))
@(define generate (txr-p))
@ (output @(if txr-p "txr.vim" "tl.vim") :named out)
" VIM Syntax file for txr
@@ -195,7 +196,7 @@ hi def link txr_nested_error Error
let b:current_syntax = "lisp"
-set lispwords=@{lispwords ","},:method,:function,:init,:fini
+set lispwords=@{lispwords ","},:method,:function,:init,:postinit,:fini
@ (end)
@(end)
@(generate t)