OK, this maybe don't belongs here, but
How to add new syntax highlighting to Visual Lisp?
In the past years i have made a lot of global use functions (maybe 50-60 pcs).
They are now actually my extension to AutoLisp and Visual Lisp functions.
I'm also globalizing some of my functions for multiple read/write/run/event-handling
of OpenDCL controls, as an extension to existing Odcl functions in Autolisp.
---
ODCL functions are added to Vlide syntax highlighting. How?
I want to add my functions like
$F|ss|WCS-pt| $F|ss|UCS-pt| $F|ss|spinner| $F|ss|list-2-str| $f|ss|rem-from-str|
$f|ss|read-line| $F|ss|sset>elist| $F|ss|regset| $F|ss|add-xdata|
$F|ss|make-circle| $F|ss|make-mtext| $F|ss|make-lwpoly| ..$F...$F....$F....
some common Slavko Solutions extension functions:
;; KONVERTUJE LISTU U STRING
;; ARG-list / RETVAL-string of list
(DEFUN $F|ss|list-2-str| (@lista / tmp_n gfile)
(SETQ tmp_n (VL-FILENAME-MKTEMP)
gfile (OPEN tmp_n "w")
)
(PRIN1 @lista gfile)
(CLOSE gfile)
(SETQ gfile (OPEN tmp_n "r")
@lista (READ-LINE gfile)
)
(CLOSE gfile)
@lista
)
;; SELECTION SET U ENAME LIST
;; ARG-sset / RETVAL-list of enames
(DEFUN $F|ss|sset>elist| (@sset / ssn elist tmpent)
(IF @sset
(PROGN (SETQ ssn (- (SSLENGTH @sset) 1))
(WHILE (<= 0 ssn)
(SETQ tmpent (SSNAME @sset ssn)
elist (APPEND elist (SETQ elist (LIST tmpent)))
ssn (- ssn 1)
)
)
)
)
elist
)
You could try something like this
(setq functionList (list '$f|ss|wcs-pt| '$f|ss|ucs-pt|
'$f|ss|spinner| '$f|ss|list-2-str|
'$f|ss|rem-from-str| '$f|ss|read-line|
'$f|ss|sset>elist| '$f|ss|regset|
'$f|ss|add-xdata| '$f|ss|make-circle|
'$f|ss|make-mtext| '$f|ss|make-lwpoly|
)
)
(eval (list 'pragma (list 'quote (list (cons 'unprotect-assign functionList)))))
;;
;; Define functions
;; < ... >
;; then,
(eval (list 'pragma (list 'quote (list (cons 'protect-assign functionList)))))
(setq functionList nil)
yeah Kerry, that is that.
Thank You. I will use this.
but, can you tell me more info about pragma ?