We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b331b06 commit d866171Copy full SHA for d866171
kanata-kbd-mode.el
@@ -96,7 +96,8 @@
96
(let* ((block-text (buffer-substring-no-properties start end))
97
(lines (split-string block-text "\n" t))
98
(first-line (car lines))
99
- (layer-name (cadr (split-string first-line "[ \t()]+")))
+ (layer-name (cadr (cl-remove-if #'string-empty-p
100
+ (split-string first-line "[ \t()]+"))))
101
(body-lines (butlast (cdr lines) 1))
102
;; Parse rows, ignoring empty lines
103
(rows (cl-loop for line in body-lines
@@ -123,7 +124,7 @@
123
124
" ")))
125
(new-text
126
(concat "(deflayer " layer-name "\n"
- (mapconcat (lambda (line) (concat " " (string-trim-right line)))
127
+ (mapconcat (lambda (line) (concat " " line))
128
formatted-rows
129
"\n")
130
"\n)")))
0 commit comments