Commit 5a0693f
committed
Fix destructive sort bug in clojure-project-root-path
`sort' in Emacs Lisp is destructive — the original list variable
may no longer point to the head of the sorted result. The fallback
`(car choices)' after `(sort choices ...)' could return the wrong
directory. Capture the sort result in a binding instead.1 parent e7d8b57 commit 5a0693f
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2148 | 2148 | | |
2149 | 2149 | | |
2150 | 2150 | | |
2151 | | - | |
2152 | | - | |
2153 | | - | |
2154 | | - | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
2155 | 2157 | | |
2156 | 2158 | | |
2157 | 2159 | | |
| |||
0 commit comments