destructuring-bind => cl-destructuring-bind
This commit is contained in:
parent
c493ad80f4
commit
822c78554f
9 changed files with 10 additions and 10 deletions
|
@ -23,7 +23,7 @@ submodule in the format, e.g. ':feature evil')."
|
||||||
(cl-loop for (module . sub) in (reverse (hash-table-keys doom-modules))
|
(cl-loop for (module . sub) in (reverse (hash-table-keys doom-modules))
|
||||||
collect (format "%s %s" module sub))
|
collect (format "%s %s" module sub))
|
||||||
nil t)))
|
nil t)))
|
||||||
(destructuring-bind (category submodule)
|
(cl-destructuring-bind (category submodule)
|
||||||
(mapcar #'intern (split-string module " "))
|
(mapcar #'intern (split-string module " "))
|
||||||
(unless (member (cons category submodule) (doom--module-pairs))
|
(unless (member (cons category submodule) (doom--module-pairs))
|
||||||
(error "'%s' isn't a valid module" module))
|
(error "'%s' isn't a valid module" module))
|
||||||
|
|
|
@ -473,7 +473,7 @@ calls."
|
||||||
nil t)
|
nil t)
|
||||||
(user-error "All packages are up to date"))))
|
(user-error "All packages are up to date"))))
|
||||||
(list (cdr (assq (car (assoc package package-alist)) packages)))))
|
(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))
|
(if-let (desc (doom-package-outdated-p package))
|
||||||
(let ((old-v-str (package-version-join old-version))
|
(let ((old-v-str (package-version-join old-version))
|
||||||
(new-v-str (package-version-join new-version)))
|
(new-v-str (package-version-join new-version)))
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
with project-root = (doom-project-root)
|
with project-root = (doom-project-root)
|
||||||
for buf in buffer-list
|
for buf in buffer-list
|
||||||
collect
|
collect
|
||||||
(destructuring-bind (type mode path)
|
(cl-destructuring-bind (type mode path)
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(list (concat
|
(list (concat
|
||||||
(let ((buffer-name (buffer-name buf)))
|
(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."
|
"Jump to the file and line of the current task."
|
||||||
(let ((location (cadr (split-string x " | ")))
|
(let ((location (cadr (split-string x " | ")))
|
||||||
(type (car (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
|
(with-ivy-window
|
||||||
(find-file (expand-file-name file (doom-project-root)))
|
(find-file (expand-file-name file (doom-project-root)))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
(defun +evil/reselect-paste ()
|
(defun +evil/reselect-paste ()
|
||||||
"Go back into visual mode and reselect the last pasted region."
|
"Go back into visual mode and reselect the last pasted region."
|
||||||
(interactive)
|
(interactive)
|
||||||
(destructuring-bind (_ _ _ beg end &optional _)
|
(cl-destructuring-bind (_ _ _ beg end &optional _)
|
||||||
evil-last-paste
|
evil-last-paste
|
||||||
(evil-visual-make-selection
|
(evil-visual-make-selection
|
||||||
(save-excursion (goto-char beg) (point-marker))
|
(save-excursion (goto-char beg) (point-marker))
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
(evil-initialize-state 'insert))))
|
(evil-initialize-state 'insert))))
|
||||||
|
|
||||||
(defun +file-templates-add (args)
|
(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
|
(define-auto-insert
|
||||||
regexp
|
regexp
|
||||||
(vector `(lambda () (+file-templates--expand ,trigger ',mode ,project-only-p))))))
|
(vector `(lambda () (+file-templates--expand ,trigger ',mode ,project-only-p))))))
|
||||||
|
|
|
@ -56,7 +56,7 @@ Tries xref and falls back to `dumb-jump', then rg/ag, then
|
||||||
|
|
||||||
((and (featurep 'evil)
|
((and (featurep 'evil)
|
||||||
evil-mode
|
evil-mode
|
||||||
(destructuring-bind (beg end)
|
(cl-destructuring-bind (beg end)
|
||||||
(bounds-of-thing-at-point 'symbol)
|
(bounds-of-thing-at-point 'symbol)
|
||||||
(evil-goto-definition)
|
(evil-goto-definition)
|
||||||
(let ((pt (point)))
|
(let ((pt (point)))
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
repository root."
|
repository root."
|
||||||
(interactive)
|
(interactive)
|
||||||
(require 'git-link)
|
(require 'git-link)
|
||||||
(destructuring-bind (beg end)
|
(cl-destructuring-bind (beg end)
|
||||||
(if buffer-file-name (git-link--get-region))
|
(if buffer-file-name (git-link--get-region))
|
||||||
(let ((git-link-open-in-browser t))
|
(let ((git-link-open-in-browser t))
|
||||||
(git-link (git-link--select-remote) beg end))))
|
(git-link (git-link--select-remote) beg end))))
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
(let ((delim "~~"))
|
(let ((delim "~~"))
|
||||||
(if (markdown-use-region-p)
|
(if (markdown-use-region-p)
|
||||||
;; Active region
|
;; Active region
|
||||||
(destructuring-bind (beg end)
|
(cl-destructuring-bind (beg end)
|
||||||
(markdown-unwrap-things-in-region
|
(markdown-unwrap-things-in-region
|
||||||
(region-beginning) (region-end)
|
(region-beginning) (region-end)
|
||||||
+markdown--regex-del 2 4)
|
+markdown--regex-del 2 4)
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
(interactive)
|
(interactive)
|
||||||
;; TODO Remove evil dependency
|
;; TODO Remove evil dependency
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(destructuring-bind (beg end)
|
(cl-destructuring-bind (beg end)
|
||||||
(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))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue