Commit 97201731 authored by Lin Jian's avatar Lin Jian
Browse files

emacs: update vendored patch for Emacs bug#77143 and bug#80744

This update is not needed for elisp packages in Nixpkgs, but it may be
useful for user-defined elisp packages.
parent 9d10842e
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
(require 'package)
(package-initialize)

;; TODO remove this patch when Emacs bug#77143 is fixed
;; see that bug for more info
;; TODO remove this patch when Emacs bug#77143 and bug#80744 are fixed
(defun package--description-file (dir)
  "Return package description file name for package DIR."
  (concat (let ((subdir (file-name-nondirectory
                         (directory-file-name dir))))
            (if (string-match "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\|snapshot\\)[0-9]+\\)*\\)\\'" subdir)
            (if (string-match "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\|snapshot\\)[0-9]*\\)*\\)\\'" subdir)
                (match-string 1 subdir) subdir))
          "-pkg.el"))