Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
junjiemars committed Feb 9, 2025
1 parent 810600a commit e2623dc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions config/fn.el
Original file line number Diff line number Diff line change
Expand Up @@ -588,14 +588,14 @@ Call FN with the path if FN is non-nil."
(defun path+ (root &rest path)
"Append a list of PATH to ROOT."
(declare (indent 1))
(and root
(unless (strrchr root ?/) (setq root (concat root "/")))
(cond ((null path) (if (strrchr root ?/) root (concat root "/")))
(t (apply #'path+
(concat root (if (strrchr (car path) ?/)
(car path)
(concat (car path) "/")))
(cdr path))))))
(when root
(unless (strrchr root ?/) (setq root (concat root "/")))
(cond ((null path) (if (strrchr root ?/) root (concat root "/")))
(t (apply #'path+
(concat root (if (strrchr (car path) ?/)
(car path)
(concat (car path) "/")))
(cdr path))))))

(defun path- (file)
"Return the parent path of FILE."
Expand Down

0 comments on commit e2623dc

Please sign in to comment.