]> git.eshelyaron.com Git - emacs.git/commitdiff
Replace cl in some obsolete files
authorGlenn Morris <rgm@gnu.org>
Fri, 23 Mar 2018 20:13:55 +0000 (16:13 -0400)
committerAndrew G Cohen <cohen@andy.bu.edu>
Tue, 11 Dec 2018 06:18:30 +0000 (14:18 +0800)
* lisp/obsolete/assoc.el, lisp/obsolete/fast-lock.el:
* lisp/obsolete/mouse-sel.el: No need for cl.
* lisp/obsolete/lazy-lock.el, lisp/obsolete/pgg-gpg.el:
* lisp/obsolete/pgg-parse.el, lisp/obsolete/pgg-pgp.el:
* lisp/obsolete/pgg-pgp5.el, lisp/obsolete/pgg.el:
* lisp/obsolete/sregex.el: Replace cl with cl-lib.

lisp/obsolete/assoc.el
lisp/obsolete/fast-lock.el
lisp/obsolete/lazy-lock.el
lisp/obsolete/mouse-sel.el
lisp/obsolete/pgg-gpg.el
lisp/obsolete/pgg-parse.el
lisp/obsolete/pgg-pgp.el
lisp/obsolete/pgg-pgp5.el
lisp/obsolete/pgg.el
lisp/obsolete/sregex.el

index 899c9d7a5639d2f4b87c0f8bf9b41320adfb3ed8..66cf67713d194b9cf2fe19e581876e74326bbc41 100644 (file)
@@ -27,7 +27,6 @@
 ;; fetching off key-value pairs in association lists.
 
 ;;; Code:
-(eval-when-compile (require 'cl))
 
 (defun asort (alist-symbol key)
   "Move a specified key-value pair to the head of an alist.
index e15dfd631ce4c70bdab4298d8070c3e345f5d654..41e48c3eafbefc65c48ee6012ba3287643003ad4 100644 (file)
 (defvar font-lock-face-list)
 
 (eval-when-compile
- ;;
- ;; We don't do this at the top-level as we only use non-autoloaded macros.
- (require 'cl)
- ;;
  ;; We use this to preserve or protect things when modifying text properties.
  (defmacro save-buffer-state (varlist &rest body)
    "Bind variables according to VARLIST and eval BODY restoring buffer state."
index 010b7ae0f3195bc9675d60a6ced3882567fa5cd3..54dc799c1f21a1dae4d55bb590a98f7786e15377 100644 (file)
 ;;; Code:
 
 (require 'font-lock)
+(eval-when-compile (require 'cl-lib))
 
 (eval-when-compile
- ;; We don't do this at the top-level as we only use non-autoloaded macros.
- (require 'cl)
- ;;
  ;; We use this to preserve or protect things when modifying text properties.
  (defmacro save-buffer-state (varlist &rest body)
    "Bind variables according to VARLIST and eval BODY restoring buffer state."
@@ -977,7 +975,7 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
       (while (setq beg (text-property-any beg (point-max) 'lazy-lock t))
        (setq next (or (text-property-any beg (point-max) 'lazy-lock nil)
                       (point-max)))
-       (incf size (- next beg))
+       (cl-incf size (- next beg))
        (setq beg next))
       ;; Float because using integer multiplication will frequently overflow.
       (truncate (* (/ (float size) (point-max)) 100)))))
index 6caaea217dfe9e882201ccc408b2e0e53745b191..52e84f2117c1e81ddc637a29b47dee8aa373052f 100644 (file)
 (require 'mouse)
 (require 'thingatpt)
 
-(eval-when-compile
-  (require 'cl))
-
 ;;=== User Variables ======================================================
 
 (defgroup mouse-sel nil
index 1bc23cad468088382db8b2cbbe738b1364d22dc7..3b890727d143ad4960aab47a39f8775896148ebd 100644 (file)
@@ -27,8 +27,7 @@
 
 ;;; Code:
 
-(eval-when-compile
-  (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 (require 'pgg)
 
@@ -303,7 +302,7 @@ passphrase cache or user."
 
 (defun pgg-gpg-select-matching-key (message-keys secret-keys)
   "Choose a key from MESSAGE-KEYS that matches one of the keys in SECRET-KEYS."
-  (loop for message-key in message-keys
+  (cl-loop for message-key in message-keys
        for message-key-id = (and (equal (car message-key) 1)
                                  (cdr (assq 'key-identifier
                                             (cdr message-key))))
index e29dfce43f07d96b1dcb351d5e5bf99b44bcad82..34ec96ec12c679f844aa15597390283c05b1d52b 100644 (file)
 
 ;;; Code:
 
-(eval-when-compile
-  ;; For Emacs <22.2 and XEmacs.
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
-  (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 (defgroup pgg-parse ()
   "OpenPGP packet parsing."
     (list content-tag packet-bytes header-bytes)))
 
 (defun pgg-parse-packet (ptag)
-  (case (car ptag)
+  (cl-case (car ptag)
     (1 ;Public-Key Encrypted Session Key Packet
      (pgg-parse-public-key-encrypted-session-key-packet ptag))
     (2 ;Signature Packet
          (1+ (cdr length-type)))))
 
 (defun pgg-parse-signature-subpacket (ptag)
-  (case (car ptag)
+  (cl-case (car ptag)
     (2 ;signature creation time
      (cons 'creation-time
           (let ((bytes (pgg-read-bytes 4)))
index 7f9e764959f35e9863de0af353f0d424055784df..ae75377783e01442242a67d473402022ed813f4d 100644 (file)
@@ -25,8 +25,7 @@
 
 ;;; Code:
 
-(eval-when-compile
-  (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 (require 'pgg)
 
index c6294f4368f0c9516d5fd8688192d95e4ea59359..af8205525f6bd8356c6371550cf7b8fec60bf196 100644 (file)
@@ -25,8 +25,7 @@
 
 ;;; Code:
 
-(eval-when-compile
-  (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 (require 'pgg)
 
index 57e9197a91161b65d0123f9a699807a9bfb963f9..fd35f7d333ef5edbab86536b6537629f810ef3ea 100644 (file)
 (require 'pgg-parse)
 (autoload 'run-at-time "timer")
 
-;; Don't merge these two `eval-when-compile's.
-(eval-when-compile
-  ;; For Emacs <22.2 and XEmacs.
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
-  (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 ;;; @ utility functions
 ;;;
@@ -258,7 +254,7 @@ regulate cache behavior."
 (defmacro pgg-convert-lbt-region (start end lbt)
   `(let ((pgg-conversion-end (set-marker (make-marker) ,end)))
      (goto-char ,start)
-     (case ,lbt
+     (cl-case ,lbt
        (CRLF
        (while (progn
                 (end-of-line)
index 6ff5133ca027c7cdd6d61855baf95bbec4758269..1099b878e6891d87063aee39a5365d86b5d2ea02 100644 (file)
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 ;; Compatibility code for when we didn't have shy-groups
 (defvar sregex--current-sregex nil)
@@ -487,7 +487,7 @@ has one of the following forms:
        (concat "\\(?:" (regexp-quote exp) "\\)")
       (regexp-quote exp)))
    ((symbolp exp)
-    (ecase exp
+    (cl-ecase exp
       (any ".")
       (bol "^")
       (eol "$")