Unverified Commit de76b58f authored by LIN, Jian's avatar LIN, Jian Committed by GitHub
Browse files

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

parents f1ed21af 97201731
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"))

+0 −16
Original line number Diff line number Diff line
@@ -20,21 +20,5 @@ in
      yasnippet
    ]
  );

  p4-16-mode = super.p4-16-mode.overrideAttrs {
    # workaround https://github.com/NixOS/nixpkgs/issues/301795
    prePatch = ''
      mkdir tmp-untar-dir
      pushd tmp-untar-dir

      tar --extract --verbose --file=$src
      content_directory=$(echo p4-16-mode-*)
      cp --verbose $content_directory/p4-16-mode-pkg.el $content_directory/p4-pkg.el
      src=$PWD/$content_directory.tar
      tar --create --verbose --file=$src $content_directory

      popd
    '';
  };
  # keep-sorted end
}