Unverified Commit 1bb6fd50 authored by adisbladis's avatar adisbladis Committed by GitHub
Browse files

Merge pull request #225885 from adisbladis/emacs-ement-manual-remove

emacs.pkgs.ement: remove manually packaged ement.el
parents 2107f7de bcdc29d7
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -25,8 +25,6 @@ in

  emacspeak = callPackage ./manual-packages/emacspeak { };

  ement = callPackage ./manual-packages/ement { };

  ess-R-object-popup = callPackage ./manual-packages/ess-R-object-popup { };

  evil-markdown = callPackage ./manual-packages/evil-markdown { };
+0 −43
Original line number Diff line number Diff line
{ trivialBuild
, lib
, fetchFromGitHub
, plz
, cl-lib
, ts
, magit-section
, taxy-magit-section
, taxy
, svg-lib
}:

trivialBuild {
  pname = "ement";
  version = "unstable-2022-09-01";

  src = fetchFromGitHub {
    owner = "alphapapa";
    repo = "ement.el";
    rev = "4ec2107e6a90ed962ddd3875d47caa523eb466b9";
    sha256 = "sha256-zKkBpaOj3qb/Oy89rt7BxmWZDZzDzMIJjjOm+1rrnnc=";
  };

  packageRequires = [
    plz
    cl-lib
    ts
    magit-section
    taxy-magit-section
    taxy
    svg-lib
  ];

  patches = [
    ./handle-nil-images.patch
  ];

  meta = {
    description = "Ement.el is a Matrix client for Emacs";
    license = lib.licenses.gpl3Only;
    platforms = lib.platforms.all;
  };
}
+0 −28
Original line number Diff line number Diff line
diff --git a/ement-lib.el b/ement-lib.el
index f0b2738..025a191 100644
--- a/ement-lib.el
+++ b/ement-lib.el
@@ -644,14 +644,15 @@ can cause undesirable underlining."
   "Return a copy of IMAGE set to MAX-WIDTH and MAX-HEIGHT.
 IMAGE should be one as created by, e.g. `create-image'."
   ;; It would be nice if the image library had some simple functions to do this sort of thing.
-  (let ((new-image (cl-copy-list image)))
-    (when (fboundp 'imagemagick-types)
-      ;; Only do this when ImageMagick is supported.
-      ;; FIXME: When requiring Emacs 27+, remove this (I guess?).
-      (setf (image-property new-image :type) 'imagemagick))
-    (setf (image-property new-image :max-width) max-width
-          (image-property new-image :max-height) max-height)
-    new-image))
+  (when image
+    (let ((new-image (cl-copy-list image)))
+      (when (fboundp 'imagemagick-types)
+        ;; Only do this when ImageMagick is supported.
+        ;; FIXME: When requiring Emacs 27+, remove this (I guess?).
+        (setf (image-property new-image :type) 'imagemagick))
+      (setf (image-property new-image :max-width) max-width
+            (image-property new-image :max-height) max-height)
+      new-image)))
 
 (defun ement--room-alias (room)
   "Return latest m.room.canonical_alias event in ROOM."