Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CHISE
tomoyo-tools
Commits
764c4f5e
Commit
764c4f5e
authored
Feb 12, 2021
by
MORIOKA Tomohiko
Browse files
(est-uri-decode-feature-name): New function.
parent
34f8420a
Changes
1
Hide whitespace changes
Inline
Side-by-side
chiset-common.el
View file @
764c4f5e
...
...
@@ -91,6 +91,75 @@
(
t
(
char-to-string
c
))))
feature
""
))
(
defun
est-uri-decode-feature-name
(
uri-feature
)
(
let
(
feature
)
(
setq
uri-feature
(
decode-uri-string
uri-feature
'utf-8-mcs-er
))
(
cond
((
string-match
"^from\\."
uri-feature
)
(
intern
(
format
"<-%s"
(
est-uri-decode-feature-name-body
(
substring
uri-feature
(
match-end
0
)))))
)
((
string-match
"^to\\."
uri-feature
)
(
intern
(
format
"->%s"
(
est-uri-decode-feature-name-body
(
substring
uri-feature
(
match-end
0
)))))
)
((
string-match
"^meta\\."
uri-feature
)
(
intern
(
format
"*%s"
(
est-uri-decode-feature-name-body
(
substring
uri-feature
(
match-end
0
)))))
)
((
string-match
"^rep\\."
uri-feature
)
(
intern
(
format
"=%s"
(
est-uri-decode-feature-name-body
(
substring
uri-feature
(
match-end
0
)))))
)
((
string-match
"^rep[2i]\\."
uri-feature
)
(
intern
(
format
"===%s"
(
est-uri-decode-feature-name-body
(
substring
uri-feature
(
match-end
0
)))))
)
((
string-match
"^g\\."
uri-feature
)
(
intern
(
format
"=>>%s"
(
est-uri-decode-feature-name-body
(
substring
uri-feature
(
match-end
0
)))))
)
((
string-match
"^g[i2]\\."
uri-feature
)
(
intern
(
format
"==%s"
(
est-uri-decode-feature-name-body
(
substring
uri-feature
(
match-end
0
)))))
)
((
string-match
"^gi\\([0-9]+\\)\\."
uri-feature
)
(
intern
(
format
"=>>%s%s"
(
make-string
(
string-to-int
(
match-string
1
uri-feature
))
?>
)
(
est-uri-decode-feature-name-body
(
substring
uri-feature
(
match-end
0
)))))
)
((
string-match
"^o\\."
uri-feature
)
(
intern
(
format
"=+>%s"
(
est-uri-decode-feature-name-body
(
substring
uri-feature
(
match-end
0
)))))
)
((
string-match
"^a\\."
uri-feature
)
(
intern
(
format
"=>%s"
(
est-uri-decode-feature-name-body
(
substring
uri-feature
(
match-end
0
)))))
)
((
string-match
"^a\\([0-9]+\\)\\."
uri-feature
)
(
intern
(
format
"%s>%s"
(
make-string
(
string-to-int
(
match-string
1
uri-feature
))
?=
)
(
est-uri-decode-feature-name-body
(
substring
uri-feature
(
match-end
0
)))))
)
(
t
(
intern
(
est-uri-decode-feature-name-body
uri-feature
))
))))
(
defun
www-uri-decode-feature-name
(
uri-feature
)
(
let
(
feature
)
(
setq
uri-feature
(
decode-uri-string
uri-feature
'utf-8-mcs-er
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment