]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/xpm/xpm.el
Add *.info and dir to debbugs
[gnu-emacs-elpa] / packages / xpm / xpm.el
index 34354d6a746ee5796257386ae83d7b6439e44017..8e189c648d7c4b9d36af8f24512eedd38aea0e5c 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Author: Thien-Thi Nguyen <ttn@gnu.org>
 ;; Maintainer: Thien-Thi Nguyen <ttn@gnu.org>
-;; Version: 1.0.2
+;; Version: 1.0.3
 ;; Keywords: multimedia, xpm
 ;; URL: http://www.gnuvola.org/software/xpm/
 
@@ -51,8 +51,8 @@
 ;; are "congruent" if their width, height and cpp are identical.
 ;;
 ;; This package was originally conceived for non-interactive use,
-;; so its design is spartan at the core.  However, we plan on
-;; adding a XPM mode in a future release; see HACKING link below.
+;; so its design is spartan at the core.  However, we plan to add
+;; a XPM mode in a future release; monitor the homepage for updates.
 ;;
 ;; For now, the features (w/ correspondingly-named files) are:
 ;; - xpm          -- edit XPM images
@@ -64,7 +64,6 @@
 ;;; Code:
 
 (require 'cl-lib)
-(eval-when-compile (require 'cl))
 
 (autoload 'image-toggle-display "image-mode" t) ; hmm is this TRT?
 
@@ -93,8 +92,8 @@ shape to `xpm-raster', then you can ignore this variable.")
 When called as a command, display in the echo area a
 summary of image dimensions, cpp and palette.
 Set buffer-local variable `xpm--gg' and return its value.
-Normally, preparation includes making certain parts of
-the buffer intangible.  Optional arg SIMPLE inhibits that."
+Normally, preparation includes making certain parts of the
+buffer intangible.  Optional arg SIMPLE non-nil inhibits that."
   (interactive)
   (unless (or
            ;; easy
@@ -115,7 +114,7 @@ the buffer intangible.  Optional arg SIMPLE inhibits that."
       (goto-char (point-min))
       (search-forward "{")
       (skip-chars-forward "^\"")
-      (destructuring-bind (w h nc cpp &rest rest)
+      (cl-destructuring-bind (w h nc cpp &rest rest)
           (read (format "(%s)" (read (current-buffer))))
         (ignore rest)                   ; for now
         (forward-line 1)
@@ -144,8 +143,9 @@ the buffer intangible.  Optional arg SIMPLE inhibits that."
                 ((suppress (span &rest more)
                            (let ((p (point)))
                              (add-text-properties
-                              (- p span) p (list* 'intangible t
-                                                  more)))))
+                              (- p span) p (cl-list*
+                                            'intangible t
+                                            more)))))
               (suppress 1)
               (cl-loop
                repeat h
@@ -188,14 +188,15 @@ a character or string of length CPP, and COLOR is a string.
 If COLOR includes a space, it is included directly,
 otherwise it is automatically prefixed with \"c \".
 
-For example, to produce fragment:
+For example, to produce palette fragment:
 
  \"X  c blue\",
  \"Y  s border c green\",
 
 you can specify PALETTE as:
 
- ((?X . \"blue\") (?Y . \"s border c green\"))
+ ((?X . \"blue\")
+  (?Y . \"s border c green\"))
 
 This example presumes CPP is 1."
   (let ((buf (generate-new-buffer name)))
@@ -230,8 +231,8 @@ This example presumes CPP is 1."
 
 If both X and Y are vectors of length N, then place N points
 using the pairwise vector elements.  If one of X or Y is a vector
-of length N, then pair its elements with the other integer component
-and place N points.
+of length N and the other component is an integer, then pair the
+vector elements with the integer component and place N points.
 
 If one of X or Y is a pair (LOW . HIGH), take it to be equivalent
 to specfiying a vector [LOW ... HIGH].  For example, (3 . 8) is
@@ -391,7 +392,7 @@ see variable `xpm-raster-inhibit-continuity-optimization'."
                                          x))
                            t))
                    (if rangep
-                       (destructuring-bind (b . e) x
+                       (cl-destructuring-bind (b . e) x
                          (rset ext (norm b) (span b e) nil))
                      (aset ext (norm x) nil))
                    (when acc
@@ -415,7 +416,7 @@ see variable `xpm-raster-inhibit-continuity-optimization'."
                        (rset nin nb len t)
                        (xpm-put-points fill (cons beg end) y))))
               finally do (when fill
-                           (rotatef int nin)
+                           (cl-rotatef int nin)
                            (fillarray nin nil)))))))))
 
 (defun xpm-as-xpm (&rest props)