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."
|
||||
(interactive)
|
||||
;; TODO Remove evil dependency
|
||||
(let ((inhibit-modification-hooks t))
|
||||
(save-excursion
|
||||
(cl-destructuring-bind (beg end)
|
||||
(cl-destructuring-bind (beg end &rest _)
|
||||
(or (ignore-errors (evil-a-curly))
|
||||
(user-error "No block found"))
|
||||
(if (= (line-number-at-pos beg) (line-number-at-pos end))
|
||||
(save-excursion
|
||||
(progn
|
||||
(goto-char (1+ beg)) (insert "\n")
|
||||
(unless (string-match ";[\s\t]*}$" (buffer-substring-no-properties beg (1+ end)))
|
||||
(goto-char end) (insert "\n"))
|
||||
|
@ -30,4 +31,4 @@
|
|||
(goto-char (1+ beg))
|
||||
(just-one-space)
|
||||
(goto-char (cadr (evil-inner-curly)))
|
||||
(just-one-space)))))
|
||||
(just-one-space))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue