Fix obsolete (when|if)-let messages in Emacs 26
This commit is contained in:
parent
e168118243
commit
76a4ae459d
40 changed files with 110 additions and 103 deletions
|
@ -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)
|
||||
|
|
|
@ -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))))
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue