]> git.eshelyaron.com Git - dict.git/commitdiff
don't use file-name-split for compatibility with older Emacsen
authorEshel Yaron <me@eshelyaron.com>
Sun, 22 Jan 2023 08:20:13 +0000 (10:20 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 22 Jan 2023 08:20:13 +0000 (10:20 +0200)
sweeprolog.el

index c05cd7822ff3b5747b783bbf2bbb0ec7a8b44022..38fe0e024cc38f337f1e9f5abeea7787f2bf01bb 100644 (file)
@@ -861,12 +861,7 @@ PROJECT (only on Emacs 28 or later)."
       (when (fboundp 'project-known-project-roots)
         (car (seq-filter
               (lambda (root)
-                (member (car
-                         (reverse
-                          (seq-filter
-                           (lambda (s)
-                             (not (string-empty-p s)))
-                           (file-name-split root))))
+                (member (file-name-base (directory-file-name root))
                         '("swipl" "swipl-devel")))
               (project-known-project-roots)))))))