aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredrik Salomonsson <plattfot@gmail.com>2020-05-08 20:46:30 -0700
committerFredrik Salomonsson <plattfot@gmail.com>2020-05-08 20:46:30 -0700
commit1ac9b54758f0c27be274b26303dd09f9f6f42f78 (patch)
tree318c9bf68e6f7eab2c61baf1fad0bd6b51d689cf
parent8a73d9fc05a16e49f84a88944a4d788d1fc1432c (diff)
downloadpinentry-rofi-1ac9b54758f0c27be274b26303dd09f9f6f42f78.tar.gz
Remove pinentry prefix for some utility functions
-rwxr-xr-xpinentry-rofi.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/pinentry-rofi.scm b/pinentry-rofi.scm
index db54d21..f326f57 100755
--- a/pinentry-rofi.scm
+++ b/pinentry-rofi.scm
@@ -60,14 +60,14 @@
"Evaluates to #t if string is empty."
(string=? str ""))
-(define (pinentry-remove-underline str)
+(define (remove-underline str)
"Replace _ followed by a character with just the character."
(regexp-substitute/global #f "(^|[[:blank:]])_([[:alpha:]])" str
'pre 1 2 'post))
-(define (pinentry-escape-underscore str)
+(define (escape-underscore str)
"Replace __ followed by a character with _ and said character.
-Always call this after `pinentry-remove-underline' or
+Always call this after `remove-underline' or
`html-underline'."
(regexp-substitute/global #f "(^|[[:blank:]])__([[:alpha:]])" str
'pre 1 "_" 2 'post))
@@ -95,7 +95,7 @@ Always call this after `pinentry-remove-underline' or
(define (pango-markup str)
"Transform string to pango."
(hex->char
- (pinentry-escape-underscore
+ (escape-underscore
(html-underline
(html-<
(html-newline str))))))
@@ -103,8 +103,8 @@ Always call this after `pinentry-remove-underline' or
(define (input-string str)
"Transform string to input for rofi.
Input strings does not support pango markup"
- (pinentry-escape-underscore
- (pinentry-remove-underline str)))
+ (escape-underscore
+ (remove-underline str)))
(define* (pinentry-set set-func pinentry label)
"Using SET-FUNC, set the entry in PINENTRY to LABEL."