Function: package--list-of-conflicts

package--list-of-conflicts is a byte-compiled function defined in package.el.gz.

Signature

(package--list-of-conflicts DIR HISTORY)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/package.el.gz
(defun package--list-of-conflicts (dir history)
  (require 'find-func)
  (declare-function find-library-name "find-func" (library))
  (delq
   nil
   (mapcar
    (lambda (x) (let* ((file (file-relative-name x dir))
                  ;; Previously loaded file, if any.
                  (previous
                   (ignore-error file-error ;"Can't find library"
                     (file-name-sans-extension
                      (file-truename (find-library-name file)))))
                  (pos (when previous (member previous history))))
             ;; Return (RELATIVE-FILENAME . HISTORY-POSITION)
             (when pos
               (cons (file-name-sans-extension file) (length pos)))))
    (directory-files-recursively dir "\\`[^\\.].*\\.el\\'"))))