emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/pacmacs ecf71a3f49 378/472: Rename put-bits-dot to put-wal


From: ELPA Syncer
Subject: [nongnu] elpa/pacmacs ecf71a3f49 378/472: Rename put-bits-dot to put-wall-tile-corner (#138)
Date: Thu, 6 Jan 2022 21:59:41 -0500 (EST)

branch: elpa/pacmacs
commit ecf71a3f493f8f3c598bb7ad9500fcc9510ecc23
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>

    Rename put-bits-dot to put-wall-tile-corner (#138)
---
 pacmacs-image.el           | 43 +++++++++++++++++++++----------------------
 test/pacmacs-image-test.el |  4 ++--
 2 files changed, 23 insertions(+), 24 deletions(-)

diff --git a/pacmacs-image.el b/pacmacs-image.el
index 7000c1b152..38c7a4f8be 100644
--- a/pacmacs-image.el
+++ b/pacmacs-image.el
@@ -53,7 +53,7 @@
 (defun pacmacs-insert-image (resource resource-vector)
   (insert-image resource " " nil resource-vector))
 
-(defun pacmacs--put-bits-dot (bits row column weight weights-to-color)
+(defun pacmacs--put-wall-tile-corner (bits row column weight weights-to-color)
   (dotimes (i weight)
     (dotimes (j weight)
       (aset (aref bits (+ i row)) (+ j column) (funcall weights-to-color i 
j)))))
@@ -150,20 +150,20 @@
   (-let (((left-upper right-upper left-bottom right-bottom)
           (pacmacs--wall-bits-get-corners wall-bits)))
     (when left-upper
-      (pacmacs--put-bits-dot wall-tile 0 0 weight
-                             (pacmacs--two-weights-to-color nil nil nil 
weight)))
+      (pacmacs--put-wall-tile-corner wall-tile 0 0 weight
+                                     (pacmacs--two-weights-to-color nil nil 
nil weight)))
 
     (when right-upper
-      (pacmacs--put-bits-dot wall-tile 0 (- width weight) weight
-                             (pacmacs--two-weights-to-color nil t nil weight)))
+      (pacmacs--put-wall-tile-corner wall-tile 0 (- width weight) weight
+                                     (pacmacs--two-weights-to-color nil t nil 
weight)))
 
     (when left-bottom
-      (pacmacs--put-bits-dot wall-tile (- height weight) 0 weight
-                             (pacmacs--two-weights-to-color t nil nil weight)))
+      (pacmacs--put-wall-tile-corner wall-tile (- height weight) 0 weight
+                                     (pacmacs--two-weights-to-color t nil nil 
weight)))
 
     (when right-bottom
-      (pacmacs--put-bits-dot wall-tile (- height weight) (- width weight) 
weight
-                             (pacmacs--two-weights-to-color t t nil weight)))))
+      (pacmacs--put-wall-tile-corner wall-tile (- height weight) (- width 
weight) weight
+                                     (pacmacs--two-weights-to-color t t nil 
weight)))))
 
 (defun pacmacs--put-bars (wall-tile width height weight wall-bits)
   (-let (((bottom right top left)
@@ -186,27 +186,26 @@
   (-let (((bottom right top left)
           (pacmacs--wall-bits-get-bars wall-bits)))
     (when (and left top) ;left-upper
-      (pacmacs--put-bits-dot wall-tile 0 0 weight
-                             (pacmacs--two-weights-to-color t t t weight)))
+      (pacmacs--put-wall-tile-corner wall-tile 0 0 weight
+                                     (pacmacs--two-weights-to-color t t t 
weight)))
 
     (when (and right top) ;right-upper
-      (pacmacs--put-bits-dot wall-tile 0 (- width weight) weight
-                             (pacmacs--two-weights-to-color t nil t weight)))
+      (pacmacs--put-wall-tile-corner wall-tile 0 (- width weight) weight
+                                     (pacmacs--two-weights-to-color t nil t 
weight)))
 
     (when (and left bottom) ;left-bottom
-      (pacmacs--put-bits-dot wall-tile (- height weight) 0 weight
-                             (pacmacs--two-weights-to-color nil t t weight)))
+      (pacmacs--put-wall-tile-corner wall-tile (- height weight) 0 weight
+                                     (pacmacs--two-weights-to-color nil t t 
weight)))
 
     (when (and right bottom) ;right-bottom
-      (pacmacs--put-bits-dot wall-tile (- height weight) (- width weight) 
weight
-                             (pacmacs--two-weights-to-color nil nil t weight)))
-    ))
+      (pacmacs--put-wall-tile-corner wall-tile (- height weight) (- width 
weight) weight
+                                     (pacmacs--two-weights-to-color nil nil t 
weight)))))
 
 (defun pacmacs--create-wall-tile (width height
-                                  bottom right
-                                  top left
-                                  left-upper right-upper
-                                  left-bottom right-bottom)
+                                        bottom right
+                                        top left
+                                        left-upper right-upper
+                                        left-bottom right-bottom)
   (let* ((wall-bits (list bottom right top left
                           left-upper right-upper
                           left-bottom right-bottom))
diff --git a/test/pacmacs-image-test.el b/test/pacmacs-image-test.el
index be4c331067..4cefb4b455 100644
--- a/test/pacmacs-image-test.el
+++ b/test/pacmacs-image-test.el
@@ -10,7 +10,7 @@
      (mock (insert-image resource " " nil resource-vector) => 42 :times 1)
      (should (= 42 (pacmacs-insert-image resource resource-vector))))))
 
-(ert-deftest pacmacs--put-bits-dot-test ()
+(ert-deftest pacmacs--put-wall-tile-corner-test ()
   (let ((input-bits (pacmacs--construct-2d-bool-vector
                      '((nil nil nil)
                        (nil nil nil)
@@ -19,7 +19,7 @@
                         '((t   t   nil)
                           (t   t   nil)
                           (nil nil nil)))))
-    (pacmacs--put-bits-dot input-bits 0 0 2)
+    (pacmacs--put-wall-tile-corner input-bits 0 0 2)
     (should (equal expected-bits
                    input-bits))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]