lang/web: fix wrong-number-of-args error in +css/toggle-inline-org-block
This commit is contained in:
parent
8cbd47a8b5
commit
741612a965
1 changed files with 21 additions and 20 deletions
|
@ -11,12 +11,13 @@
|
||||||
"Toggles between a bracketed block and inline block."
|
"Toggles between a bracketed block and inline block."
|
||||||
(interactive)
|
(interactive)
|
||||||
;; TODO Remove evil dependency
|
;; TODO Remove evil dependency
|
||||||
|
(let ((inhibit-modification-hooks t))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(cl-destructuring-bind (beg end)
|
(cl-destructuring-bind (beg end &rest _)
|
||||||
(or (ignore-errors (evil-a-curly))
|
(or (ignore-errors (evil-a-curly))
|
||||||
(user-error "No block found"))
|
(user-error "No block found"))
|
||||||
(if (= (line-number-at-pos beg) (line-number-at-pos end))
|
(if (= (line-number-at-pos beg) (line-number-at-pos end))
|
||||||
(save-excursion
|
(progn
|
||||||
(goto-char (1+ beg)) (insert "\n")
|
(goto-char (1+ beg)) (insert "\n")
|
||||||
(unless (string-match ";[\s\t]*}$" (buffer-substring-no-properties beg (1+ end)))
|
(unless (string-match ";[\s\t]*}$" (buffer-substring-no-properties beg (1+ end)))
|
||||||
(goto-char end) (insert "\n"))
|
(goto-char end) (insert "\n"))
|
||||||
|
@ -30,4 +31,4 @@
|
||||||
(goto-char (1+ beg))
|
(goto-char (1+ beg))
|
||||||
(just-one-space)
|
(just-one-space)
|
||||||
(goto-char (cadr (evil-inner-curly)))
|
(goto-char (cadr (evil-inner-curly)))
|
||||||
(just-one-space)))))
|
(just-one-space))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue