Plaster
New
List
Login
text
apl
aspx
asterisk
brainfuck
c
c++hdr
c++src
cassandra
ceylon
clojure
clojurescript
cmake
cobol
coffeescript
common-lisp
crystal
csharp
css
cypher-query
cython
d
dart
diff
django
dockerfile
dylan
ebnf
ecl
ecmascript
edn
eiffel
ejs
elm
erb
erlang
ez80
factor
fcl
feature
forth
fortran
fragment
gfm
go
gql
groovy
gss
haml
handlebars-template
haskell
haxe
hive
html
http
httpd-php
httpd-php-open
hxml
ini
java
javascript
json
jsp
jsx
julia
kotlin
latex
less
literate-haskell
lua
mariadb
markdown
mbox
mirc
mscgen
msgenny
mssql
mumps
mysql
n-triples
nesc
nginx-conf
nsis
objectivec
octave
oz
pascal
perl
pgp
pgp-keys
pgp-signature
pgsql
php
pig
plsql
properties
protobuf
puppet
python
q
rpm-changes
rpm-spec
rsrc
ruby
rustsrc
sas
sass
scala
scheme
scss
sieve
slim
smarty
solr
soy
sparql-query
spreadsheet
sql
squirrel
stex
styl
swift
systemverilog
tcl
textile
tiddlywiki
tiki
tlv
tornado
ttcn-asn
ttcn-cfg
turtle
twig
typescript
typescript-jsx
vb
vbscript
velocity
verilog
vertex
vhdl
vue
webidl
xml
xml-dtd
xquery
xu
yaml
z80
default
Visibility:
public
unlisted
private
(defun combine-list-into-keyword (parents depth-of-combination &key (from-start nil) (ignore-positions '()) (all-parents nil)) "Combines the name of the parents with the parent names upto depth-of-combination, eg the node-name 'charles' with the node-parents being (sex height race name) and depth 2 would would become ':race-name-charles', but 4 would be ':sex-height-race-name-charles', depth is measured from right to left, so most recent parent first. If all-parents is set to t, then all the parents with the exception of the positions listed in ignore-positions will be used" (when (listp ignore-positions) (let ((items-to-remove (collect-positions-in-list parents ignore-positions))) (setf parents (remove-list-items-from-list items-to-remove parents)))) (when all-parents (setf depth-of-combination (length parents))) (when (< depth-of-combination 1) (setf depth-of-combination 1)) (when (< (length parents) depth-of-combination) (setf depth-of-combination (length parents))) (if from-start (intern (format nil "~{~a~^-~}" (subseq parents 0 depth-of-combination)) "KEYWORD") (intern (format nil "~{~a~^-~}" (reverse (subseq (reverse parents) 0 depth-of-combination))) "KEYWORD")))