Minor refactors across the board

- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
This commit is contained in:
Henrik Lissner 2019-06-25 21:38:16 +02:00
parent 4ecf6c9414
commit 9a02bd8ac8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
42 changed files with 114 additions and 110 deletions

View file

@ -124,7 +124,7 @@ If on a:
(org-table-blank-field)
(org-table-recalculate)
(when (and (string-empty-p (string-trim (org-table-get-field)))
(bound-and-true-p evil-mode))
(bound-and-true-p evil-local-mode))
(evil-change-state 'insert)))
(`babel-call
@ -226,7 +226,7 @@ wrong places)."
(save-excursion
(insert "\n")
(if (= level 1) (insert "\n")))))
(when-let* ((todo-keyword (org-element-property :todo-keyword context)))
(when-let (todo-keyword (org-element-property :todo-keyword context))
(org-todo (or (car (+org-get-todo-keywords-for todo-keyword))
'todo)))))
@ -234,7 +234,7 @@ wrong places)."
(when (org-invisible-p)
(org-show-hidden-entry))
(when (bound-and-true-p evil-mode)
(when (bound-and-true-p evil-local-mode)
(evil-insert 1))))
;;;###autoload
@ -365,8 +365,8 @@ another level of headings on each invocation."
"Indent the current item (header or item), if possible.
Made for `org-tab-first-hook' in evil-mode."
(interactive)
(cond ((or (not (bound-and-true-p evil-mode))
(not (eq evil-state 'insert)))
(cond ((not (and (bound-and-true-p evil-local-mode)
(evil-insert-state-p)))
nil)
((org-at-item-p)
(if (eq this-command 'org-shifttab)
@ -505,6 +505,6 @@ an effect when `evil-org-special-o/O' has `item' in it (not the default)."
;;;###autoload
(defun +org*display-link-in-eldoc (orig-fn &rest args)
"Display the link at point in eldoc."
(or (when-let* ((link (org-element-property :raw-link (org-element-context))))
(or (when-let (link (org-element-property :raw-link (org-element-context)))
(format "Link: %s" link))
(apply orig-fn args)))