Some corrections.

Pascal J. Bourguignon [2017-01-21 18:37]
Some corrections.
Filename
pjb-cl.el
pjb-class.el
pjb-emacs.el
pjb-worldfact.el
diff --git a/pjb-cl.el b/pjb-cl.el
index d0d748b..5d63589 100644
--- a/pjb-cl.el
+++ b/pjb-cl.el
@@ -1565,11 +1565,11 @@ URL:       http://www.informatimago.com/local/lisp/HyperSpec/Body/f_dir.htm
 RETURN:  nil, or pathspec (we don't distinguish truename for now).
 URL:     http://www.informatimago.com/local/lisp/HyperSpec/Body/f_probe_.htm
 "
-  (if (file-exists-p pathspec) pathspec nil))
+  (when (file-exists-p pathspec)
+    pathspec))


 (defun* ensure-directories-exist (pathspec &key verbose)
-  (declare (ignore verbose))
   (make-directory pathspec t))


diff --git a/pjb-class.el b/pjb-class.el
index a51cf4f..ccbd0ef 100644
--- a/pjb-class.el
+++ b/pjb-class.el
@@ -165,7 +165,7 @@ RETURN: a list containing :
      (mapcar (lambda (att) (butlast att))
              (attributes class))

-     (nremove-nil
+     (delete nil
       (apply 'append
              (mapcar (lambda (met)
                        (let ( (bpa-labels '(before primary after))
diff --git a/pjb-emacs.el b/pjb-emacs.el
index 9743725..1405cdd 100644
--- a/pjb-emacs.el
+++ b/pjb-emacs.el
@@ -128,7 +128,6 @@
          default)))

   (defun set-symbol-value-in-buffer (symbol buffer value &optional default)
-    (declare (ignore defaultp))
     (save-excursion
      (set-buffer buffer)
      (make-local-variable symbol)
@@ -782,10 +781,10 @@ DO:      Grep current directory for sources containing the current word.
 "
   (interactive)
   (let ( (word  (current-word))
-        (files (nremove-nil
-                (mapcar (lambda (name)
-                          (cond
-                            ((file-directory-p name) nil)
+	 (files (delete nil
+			(mapcar (lambda (name)
+				  (cond
+				   ((file-directory-p name) nil)
                             ((string-match pjb-cross-references-rejected-regexp
                                            name) nil)
                             (t (shell-quote-argument name))) )
@@ -2422,7 +2421,6 @@ FILE-AND-OPTION: either an atom evaluated to a path,

 (defun constantly (value)
   (lambda (&rest arguments)
-    (declare (ignore arguments))
     value))


diff --git a/pjb-worldfact.el b/pjb-worldfact.el
index 9ef75cf..5b7765b 100644
--- a/pjb-worldfact.el
+++ b/pjb-worldfact.el
@@ -215,18 +215,17 @@ POST:    The `countries' alist is filled.
                   (* 100 (/ (budget-expenditures country)
                             (GDP country)))
                   (name country)))
-        (sort
-         (nremove-nil
-          (flatten
-           (mapcountries (lambda (country)
-                           (if (and
-                                (unemployment-rate country)
-                                (budget-expenditures country)
-                                (GDP country)
-                                (/= 0 (GDP country)))
-                               country nil)))))
-         (lambda (a b) (<= (/ (budget-expenditures a) (GDP a))
-                           (/ (budget-expenditures b) (GDP b))))))
+        (sort (delete nil
+		      (flatten
+		       (mapcountries (lambda (country)
+				       (if (and
+					    (unemployment-rate country)
+					    (budget-expenditures country)
+					    (GDP country)
+					    (/= 0 (GDP country)))
+					 country nil)))))
+	      (lambda (a b) (<= (/ (budget-expenditures a) (GDP a))
+				(/ (budget-expenditures b) (GDP b))))))
   (printf "%7s %13s %s\n" "-------" "-------------" "--------------------"))


@@ -239,13 +238,12 @@ POST:    The `countries' alist is filled.
           (printf "%6.1f years    %s\n"
                   (life-expectancy-male country)
                   (name country)))
-        (sort
-         (nremove-nil
-          (flatten
-           (mapcountries (lambda (country)
-                           (if (life-expectancy-both country) country nil)))))
-         (lambda (a b) (>= (life-expectancy-both a)
-                           (life-expectancy-both b) ))))
+        (sort (delete nil
+		      (flatten
+		       (mapcountries (lambda (country)
+				       (if (life-expectancy-both country) country nil)))))
+	      (lambda (a b) (>= (life-expectancy-both a)
+				(life-expectancy-both b) ))))
   (printf "%12s    %s\n" "------------" "--------------------"))


@@ -260,17 +258,16 @@ POST:    The `countries' alist is filled.
                   (GDP-per-capita country)
                   (/ (GDP-per-capita country) 12.0)
                   (name country)) )
-        (sort
-         (nremove-nil
-          (flatten
-           (mapcountries (lambda (country)
-                           (if (and
-                                (GDP-per-capita country)
-                                ;;(<= (GDP-per-capita country) 2400.0)
-                                )
-                               country nil)))))
-         (lambda (a b) (>= (GDP-per-capita a)
-                           (GDP-per-capita b)))) )
+        (sort (delete nil
+		      (flatten
+		       (mapcountries (lambda (country)
+				       (if (and
+					    (GDP-per-capita country)
+					    ;;(<= (GDP-per-capita country) 2400.0)
+					    )
+					 country nil)))))
+	      (lambda (a b) (>= (GDP-per-capita a)
+				(GDP-per-capita b)))) )
   (printf "%12s %12s %s\n" "------------" "------------" "--------------------"))

ViewGit