destructuring-bind => cl-destructuring-bind

This commit is contained in:
Henrik Lissner 2017-06-25 02:04:50 +02:00
parent c493ad80f4
commit 822c78554f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
9 changed files with 10 additions and 10 deletions

View file

@ -23,7 +23,7 @@ submodule in the format, e.g. ':feature evil')."
(cl-loop for (module . sub) in (reverse (hash-table-keys doom-modules))
collect (format "%s %s" module sub))
nil t)))
(destructuring-bind (category submodule)
(cl-destructuring-bind (category submodule)
(mapcar #'intern (split-string module " "))
(unless (member (cons category submodule) (doom--module-pairs))
(error "'%s' isn't a valid module" module))

View file

@ -473,7 +473,7 @@ calls."
nil t)
(user-error "All packages are up to date"))))
(list (cdr (assq (car (assoc package package-alist)) packages)))))
(destructuring-bind (package old-version new-version) pkg
(cl-destructuring-bind (package old-version new-version) pkg
(if-let (desc (doom-package-outdated-p package))
(let ((old-v-str (package-version-join old-version))
(new-v-str (package-version-join new-version)))

View file

@ -15,7 +15,7 @@
with project-root = (doom-project-root)
for buf in buffer-list
collect
(destructuring-bind (type mode path)
(cl-destructuring-bind (type mode path)
(with-current-buffer buf
(list (concat
(let ((buffer-name (buffer-name buf)))
@ -121,7 +121,7 @@ limit to buffers in the current workspace."
"Jump to the file and line of the current task."
(let ((location (cadr (split-string x " | ")))
(type (car (split-string x " "))))
(destructuring-bind (file line) (split-string location ":")
(cl-destructuring-bind (file line) (split-string location ":")
(with-ivy-window
(find-file (expand-file-name file (doom-project-root)))
(goto-char (point-min))

View file

@ -20,7 +20,7 @@
(defun +evil/reselect-paste ()
"Go back into visual mode and reselect the last pasted region."
(interactive)
(destructuring-bind (_ _ _ beg end &optional _)
(cl-destructuring-bind (_ _ _ beg end &optional _)
evil-last-paste
(evil-visual-make-selection
(save-excursion (goto-char beg) (point-marker))

View file

@ -32,7 +32,7 @@
(evil-initialize-state 'insert))))
(defun +file-templates-add (args)
(destructuring-bind (regexp trigger mode &optional project-only-p) args
(cl-destructuring-bind (regexp trigger mode &optional project-only-p) args
(define-auto-insert
regexp
(vector `(lambda () (+file-templates--expand ,trigger ',mode ,project-only-p))))))

View file

@ -56,7 +56,7 @@ Tries xref and falls back to `dumb-jump', then rg/ag, then
((and (featurep 'evil)
evil-mode
(destructuring-bind (beg end)
(cl-destructuring-bind (beg end)
(bounds-of-thing-at-point 'symbol)
(evil-goto-definition)
(let ((pt (point)))

View file

@ -16,7 +16,7 @@
repository root."
(interactive)
(require 'git-link)
(destructuring-bind (beg end)
(cl-destructuring-bind (beg end)
(if buffer-file-name (git-link--get-region))
(let ((git-link-open-in-browser t))
(git-link (git-link--select-remote) beg end))))

View file

@ -11,7 +11,7 @@
(let ((delim "~~"))
(if (markdown-use-region-p)
;; Active region
(destructuring-bind (beg end)
(cl-destructuring-bind (beg end)
(markdown-unwrap-things-in-region
(region-beginning) (region-end)
+markdown--regex-del 2 4)

View file

@ -12,7 +12,7 @@
(interactive)
;; TODO Remove evil dependency
(save-excursion
(destructuring-bind (beg end)
(cl-destructuring-bind (beg end)
(or (ignore-errors (evil-a-curly))
(user-error "No block found"))
(if (= (line-number-at-pos beg) (line-number-at-pos end))