Skip to content

Commit

Permalink
Use mapcan instead of cl-mapcan
Browse files Browse the repository at this point in the history
This was added in Emacs 26.1.  `mapcan' does not support multiple
sequences, so keep using `cl-mapcan' when necessary.
  • Loading branch information
tarsius committed Nov 23, 2024
1 parent c1a346d commit 8f99eac
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions closql.el
Original file line number Diff line number Diff line change
Expand Up @@ -570,15 +570,15 @@
(vconcat abbrevs)))
((vconcat
(mapcar #'closql--abbrev-class
(cl-mapcan (lambda (sym)
(let ((str (symbol-name sym)))
(cond ((string-suffix-p "--eieio-childp" str)
(closql--list-subclasses
(intern (substring str 0 -14)) nil))
((string-suffix-p "-p" str)
(list (intern (substring str 0 -2))))
((list sym)))))
args))))))
(mapcan (lambda (sym)
(let ((str (symbol-name sym)))
(cond ((string-suffix-p "--eieio-childp" str)
(closql--list-subclasses
(intern (substring str 0 -14)) nil))
((string-suffix-p "-p" str)
(list (intern (substring str 0 -2))))
((list sym)))))
args))))))

(defun closql--list-subclasses (class &optional result)
(unless (class-abstract-p class)
Expand All @@ -597,7 +597,7 @@
(nconc (and (not (class-abstract-p class)) (list abbrev))
(and wildcards children
(list (if abbrev (intern (format "%s*" abbrev)) '*)))
(cl-mapcan #'types children)))))
(mapcan #'types children)))))
(sort (types class) #'string<)))

(cl-defmethod closql--set-object-class ((db closql-database) obj class)
Expand Down

0 comments on commit 8f99eac

Please sign in to comment.