diff options
author | Nicolas Petton | 2021-02-25 12:31:30 +0100 |
---|---|---|
committer | Nicolas Petton | 2021-02-25 12:31:30 +0100 |
commit | 00506d08edbcf20474df60acc0ce7c9305f2f6ce (patch) | |
tree | 4e35a4a7646975140d9e473eb0516490fbaba492 | |
parent | e24bb972f65f1d8b33ddbe9c7823c270e326080a (diff) | |
download | nroam-00506d08edbcf20474df60acc0ce7c9305f2f6ce.tar.gz nroam-00506d08edbcf20474df60acc0ce7c9305f2f6ce.zip |
Minor refactoring
* nroam.el (nroam--insert-source-content): Rename let vars for clarity.
-rw-r--r-- | nroam.el | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -233,20 +233,20 @@ Make the region inserted by BODY read-only, and marked with (defun nroam--insert-source-content (backlink) "Insert the source element where BACKLINK is defined." - (seq-let (from _ props) backlink - (when-let* ((backlink-point (plist-get props :point)) - (elt (nroam--crawl-source from backlink-point)) + (seq-let (file _ props) backlink + (when-let* ((point (plist-get props :point)) + (elt (nroam--crawl-source file point)) (type (car elt)) (content (string-trim (cdr elt))) (beg (point))) (progn (pcase type ('headline (progn - (org-paste-subtree 3 (nroam--fix-links content from)) + (org-paste-subtree 3 (nroam--fix-links content file)) (goto-char (point-max)))) - (_ (insert (nroam--fix-links content from)))) + (_ (insert (nroam--fix-links content file)))) (set-text-properties beg (point) - `(nroam-link t file ,from point ,backlink-point)) + `(nroam-link t file ,file point ,point)) (insert "\n"))))) (defun nroam--crawl-source (file point) |