Fix obsolete (when|if)-let messages in Emacs 26

This commit is contained in:
Henrik Lissner 2017-12-10 14:49:52 -05:00
parent e168118243
commit 76a4ae459d
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
40 changed files with 110 additions and 103 deletions

View file

@ -35,8 +35,8 @@
;; (goto-char (point-min))
;; (while (progn (org-next-link) (not org-link-search-failed))
;; (setq element (org-element-context))
;; (when-let (file (and (eq (org-element-type element) 'link)
;; (expand-file-name (org-element-property :path element))))
;; (when-let* (file (and (eq (org-element-type element) 'link)
;; (expand-file-name (org-element-property :path element))))
;; (when (and (string= (org-element-property :type element) "file")
;; (string= (concat (file-name-base (directory-file-name (file-name-directory file))) "/")
;; org-attach-directory)

View file

@ -18,12 +18,12 @@
Uses the capture template specified by KEY. Otherwise, prompts you for one."
(interactive)
(let ((key (or key "n")))
(if-let (string (cond ((not (equal string ""))
string)
((region-active-p)
(buffer-substring-no-properties
(region-beginning)
(region-end)))))
(if-let* ((string (cond ((not (equal string ""))
string)
((region-active-p)
(buffer-substring-no-properties
(region-beginning)
(region-end))))))
(org-capture-string string key)
(org-capture nil key))))

View file

@ -4,7 +4,7 @@
"The directory where org files are kept.")
;; Ensure ELPA org is prioritized above built-in org.
(when-let (path (locate-library "org" nil doom--package-load-path))
(when-let* ((path (locate-library "org" nil doom--package-load-path)))
(setq load-path (delete path load-path))
(push (file-name-directory path) load-path))