Replace obsolete functions/commands

This commit is contained in:
Henrik Lissner 2017-04-17 02:19:20 -04:00
parent ed2e7a65f6
commit e204df3c05
9 changed files with 11 additions and 11 deletions

View file

@ -44,6 +44,6 @@
(mapcar #'car +lookup-search-url-alist)
nil t)))
(let ((url (cdr (assoc where +lookup-search-url-alist)))
(search (or search (read-input "Query: "))))
(search (or search (read-string "Query: "))))
(browse-url (format url (url-encode-url search)))))

View file

@ -10,7 +10,7 @@ and switches to insert mode if there are editable fields."
(cl-letf (((symbol-function 'region-beginning) (lambda () evil-visual-beginning))
((symbol-function 'region-end) (lambda () evil-visual-end)))
(yas-insert-snippet))
(when-let (snippet (car-safe (yas--snippets-at-point)))
(when-let (snippet (car-safe (yas-active-snippets)))
(let ((fields (yas--snippet-fields snippet)))
(evil-insert-state +1)
(unless fields (evil-change-state 'normal)))))

View file

@ -4,7 +4,7 @@
(defun +snippets/goto-start-of-field ()
"Go to the beginning of the current field."
(interactive)
(let* ((snippet (car (yas--snippets-at-point)))
(let* ((snippet (car (yas-active-snippets)))
(position (yas--field-start (yas--snippet-active-field snippet))))
(if (= (point) position)
(move-beginning-of-line 1)
@ -14,7 +14,7 @@
(defun +snippets/goto-end-of-field ()
"Go to the end of the current field."
(interactive)
(let* ((snippet (car (yas--snippets-at-point)))
(let* ((snippet (car (yas-active-snippets)))
(position (yas--field-end (yas--snippet-active-field snippet))))
(if (= (point) position)
(move-end-of-line 1)

View file

@ -333,7 +333,7 @@ end of the workspace list."
(condition-case ex
(let* ((persps (+workspace-list))
(perspc (length persps))
(index (position current-name persps)))
(index (cl-position current-name persps)))
(when (= perspc 1)
(user-error "No other workspaces"))
(+workspace/switch-to (% (+ index n) perspc))