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

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

[elpa] externals/gnorb aaf8556 261/449: Be a good citizen about the cl p


From: Stefan Monnier
Subject: [elpa] externals/gnorb aaf8556 261/449: Be a good citizen about the cl package
Date: Fri, 27 Nov 2020 23:15:51 -0500 (EST)

branch: externals/gnorb
commit aaf8556c264f76695c1cd9353349ca5c04d145ef
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Be a good citizen about the cl package
    
    * gnorb-bbdb.el
    * gnorb-gnus.el
    * gnorb-org.el
    * gnorb-utils.el
    
    In all cases, stick an (eval-when-compile (require 'cl)) up front, and
    make sure we're prefixing all cl macros properly.
---
 gnorb-bbdb.el  | 14 +++++++++-----
 gnorb-gnus.el  |  3 +++
 gnorb-org.el   |  9 ++++++---
 gnorb-utils.el |  3 ++-
 4 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/gnorb-bbdb.el b/gnorb-bbdb.el
index 85c42c8..eba51c1 100644
--- a/gnorb-bbdb.el
+++ b/gnorb-bbdb.el
@@ -24,6 +24,9 @@
 
 ;;; Code:
 
+(eval-when-compile
+  (require 'cl))
+
 (require 'gnorb-utils)
 
 (defgroup gnorb-bbdb nil
@@ -167,7 +170,7 @@ An example value might look like:"
                                 bbdb-separator-alist))
                     "[ \t\n]*"))
            (crm-local-completion-map bbdb-crm-local-completion-map)
-           (table (mapcar #'car
+           (table (cl-mapcar #'car
                           (org-global-tags-completion-table
                            (org-agenda-files))))
            (init (if (consp init)
@@ -384,9 +387,10 @@ both, use \"C-u\" before the \"*\"."
         (mapconcat
          'identity
          (delete-dups
-          (mapcan (lambda (r)
-                    (bbdb-record-xfield-split r gnorb-bbdb-org-tag-field))
-                  records))
+          (cl-mapcan
+           (lambda (r)
+             (bbdb-record-xfield-split r gnorb-bbdb-org-tag-field))
+           records))
          "|")))
     (if tag-string
        ;; C-u = all headings, not just todos
@@ -607,7 +611,7 @@ to a message into the record's `gnorb-bbdb-messages-field'."
                              (time-less-p
                               (gnorb-bbdb-link-date b)
                               (gnorb-bbdb-link-date a))))))
-         (setq val (subseq val 0 gnorb-bbdb-collect-N-messages))
+         (setq val (cl-subseq val 0 gnorb-bbdb-collect-N-messages))
          (bbdb-record-set-xfield record
                                  gnorb-bbdb-messages-field
                                  (delq nil val))
diff --git a/gnorb-gnus.el b/gnorb-gnus.el
index 9263d1b..d390dee 100644
--- a/gnorb-gnus.el
+++ b/gnorb-gnus.el
@@ -24,6 +24,9 @@
 
 ;;; Code:
 
+(eval-when-compile
+  (require 'cl))
+
 (require 'gnorb-utils)
 
 (declare-function org-gnus-article-link "org-gnus"
diff --git a/gnorb-org.el b/gnorb-org.el
index 8331683..46a95a0 100644
--- a/gnorb-org.el
+++ b/gnorb-org.el
@@ -24,6 +24,9 @@
 
 ;;; Code:
 
+(eval-when-compile
+  (require 'cl))
+
 (require 'gnorb-utils)
 
 (defgroup gnorb-org nil
@@ -177,7 +180,7 @@ might have been in the outgoing message's headers and call
                   strings)
                  ((numberp gnorb-org-mail-scan-scope)
                   (delq nil
-                        (subseq
+                        (cl-subseq
                          strings 0 (1+ gnorb-org-mail-scan-scope))))
                  ;; We could provide more options here. 'tree vs
                  ;; 'subtree, for instance.
@@ -215,7 +218,7 @@ See the docstring of `gnorb-org-handle-mail' for details."
          (when assoc-msg-ids
            (car
             (sort
-             (remove-if
+             (cl-remove-if
               (lambda (m)
                 (let ((from (car (gnus-registry-get-id-key m 'sender))))
                   (or (null from)
@@ -601,7 +604,7 @@ search."
             (setq tag-clause (cdr (org-make-tags-matcher str)))
             (unless (equal str "")
               (setq recs
-                    (remove-if-not
+                    (cl-remove-if-not
                      (lambda (r)
                        (let ((rec-tags (bbdb-record-xfield
                                         r gnorb-bbdb-org-tag-field)))
diff --git a/gnorb-utils.el b/gnorb-utils.el
index 6c50662..b3fc3a7 100644
--- a/gnorb-utils.el
+++ b/gnorb-utils.el
@@ -24,7 +24,8 @@
 
 ;;; Code:
 
-(require 'cl)
+(eval-when-compile
+  (require 'cl))
 (require 'mailcap)
 (require 'gnus)
 ;(require 'message)



reply via email to

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