Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cl-emb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Raskin
cl-emb
Commits
2b5539a9
Commit
2b5539a9
authored
11 years ago
by
Michael
Browse files
Options
Downloads
Patches
Plain Diff
Syncing from Monotone at 20131105230456
parent
03840582
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
emb.lisp
+20
-5
20 additions, 5 deletions
emb.lisp
packages.lisp
+1
-0
1 addition, 0 deletions
packages.lisp
with
21 additions
and
5 deletions
emb.lisp
+
20
−
5
View file @
2b5539a9
...
...
@@ -150,7 +150,8 @@ indicates an expression.")
(
defparameter
*set-special-list*
'
((
"escape"
.
"cl-emb:*escape-type*"
)))
'
((
"escape"
.
"cl-emb:*escape-type*"
)
(
"case-sensitivity"
.
"cl-emb:*case-sensitivity*"
)))
(
defparameter
*set-parameter-list*
'
((
"xml"
.
":xml"
)
...
...
@@ -160,7 +161,8 @@ indicates an expression.")
(
"url-encode"
.
":url-encode"
)
(
"raw"
.
":raw"
)
(
"latex"
.
":latex"
)
))
(
"t"
.
"t"
)
(
"nil"
.
"nil"
)))
;; TODO: Refactor! Looks a bit clumsy.
(
defun
set-specials
(
match
&rest
registers
)
...
...
@@ -293,9 +295,23 @@ Functions get called with two parameters: match and list of registers.")
do
(
format
out
"%~2,'0x"
(
char-code
char
))))))
(
defvar
*case-sensitivity*
t
"Whether use case-sensitive mode (the default) or case-insensitive mode. If this is set NIL, the case of keys in ENV will be ignored."
)
(
defun
string-to-keyword
(
string
)
"Interns a given STRING uppercased in the keyword package."
(
nth-value
0
(
intern
(
string-upcase
string
)
:keyword
)))
(
nth-value
0
(
intern
(
if
*case-sensitivity*
(
symbol-name
(
read-from-string
string
))
(
string-upcase
(
read-from-string
string
)))
:keyword
)))
(
defun
getf*
(
plist
key
&optional
default
)
(
if
*case-sensitivity*
(
getf
plist
key
default
)
(
loop
for
(
k
v
)
on
plist
by
#'
cddr
when
(
string-equal
k
key
)
do
(
return
v
)
finally
(
return
default
))))
(
defmacro
getf-emb
(
key
)
"Search either plist TOPENV or ENV according to the search path in KEY. KEY
...
...
@@ -310,11 +326,10 @@ is a string."
(
dig-plist
(
if
(
zerop
(
length
(
first
keys
)))
plist
`
(
getf
,
plist
,
(
string-to-keyword
(
first
keys
))))
`
(
getf
*
,
plist
,
(
string-to-keyword
(
first
keys
))))
(
rest
keys
)))))
(
dig-plist
plist
path-parts
))))
(
defvar
*escape-type*
:raw
"Default value for escaping @var output."
)
...
...
This diff is collapsed.
Click to expand it.
packages.lisp
+
1
−
0
View file @
2b5539a9
...
...
@@ -24,5 +24,6 @@
#:*emb-start-marker*
#:*emb-end-marker*
#:*escape-type*
#:*case-sensitivity*
#:*locking-function*
#:*function-package*
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment