branch: externals/ergoemacs-mode commit f58f7d8dc84c81202f16e91ae9443b81a0e46290 Author: Walter Landry <wlan...@caltech.edu> Commit: Walter Landry <wlan...@caltech.edu>
Replace all cl with cl-lib --- Makefile | 4 ++-- ergoemacs-component.el | 2 +- ergoemacs-test.el | 20 ++++++++++---------- ergoemacs-theme-engine.el | 2 +- ergoemacs-themes.el | 2 +- ergoemacs-translate.el | 8 ++++---- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 09b4822..6f0a0d7 100644 --- a/Makefile +++ b/Makefile @@ -105,12 +105,12 @@ start0: $(EMACS) -Q -L . -L .. -l ergoemacs-mode -l ergoemacs-test --eval "(ergoemacs-mode)" ert : - $(EMACS) $(EMACS_BATCH) -L . -L .. -l cl -l ergoemacs-mode -l ergoemacs-test --eval \ + $(EMACS) $(EMACS_BATCH) -L . -L .. -l cl-lib -l ergoemacs-mode -l ergoemacs-test --eval \ "(progn (setq ergoemacs-command-loop-type nil) \ (ert-run-tests-batch-and-exit '(and \"$(TESTS)\" $(SELECT) (not (tag :interactive)))))" || exit 1; \ erti : - $(EMACS) $(EMACS_BATCH) -L . -L .. -l cl -l ergoemacs-mode -l ergoemacs-test --eval \ + $(EMACS) $(EMACS_BATCH) -L . -L .. -l cl-lib -l ergoemacs-mode -l ergoemacs-test --eval \ "(progn (setq ergoemacs-command-loop-type nil) \ (fset 'ert--print-backtrace 'ignore) \ (ert-run-tests-batch-and-exit '(and \"$(TESTS)\" $(SELECT) (not (tag :interactive)))))" || exit 1; \ diff --git a/ergoemacs-component.el b/ergoemacs-component.el index 3740e57..c3d460f 100644 --- a/ergoemacs-component.el +++ b/ergoemacs-component.el @@ -1192,7 +1192,7 @@ to prevent infinite recursion." (when (ignore-errors (boundp (nth 1 (nth 1 (nth 0 init))))) (apply 'add-to-list (nth 1 (nth 1 (nth 0 init))) (cdr (cdr (nth 0 init)))) (push (nth 0 init) ergoemacs-component-struct--deferred-functions))))) - ((memq (car (nth 0 init)) '(push pushnew cl-pushnew)) + ((memq (car (nth 0 init)) '(push cl-pushnew)) (when (ignore-errors (boundp (nth 2 (nth 0 init)))) (if (ignore-errors (eq 'quote (nth 1 (nth 1 (nth 0 init))))) (ignore-errors diff --git a/ergoemacs-test.el b/ergoemacs-test.el index c62330a..168694d 100644 --- a/ergoemacs-test.el +++ b/ergoemacs-test.el @@ -29,7 +29,7 @@ ;;; Code: (eval-when-compile - (require 'cl) + (require 'cl-lib) (require 'ergoemacs-macros)) (declare-function ergoemacs-translate--keymap "ergoemacs-translate") @@ -1120,7 +1120,7 @@ Should test issue #142" (w-file (expand-file-name "global-test" ergoemacs-dir)) (temp-file (make-temp-file "ergoemacs-test" nil ".el"))) (with-temp-file temp-file - (insert "(eval-when-compile (load (expand-file-name \"ergoemacs-macros\")) (require 'cl))" + (insert "(eval-when-compile (load (expand-file-name \"ergoemacs-macros\")) (require 'cl-lib))" (or (and (boundp 'wait-for-me) "(setq debug-on-error t debug-on-quit t)") "") "(setq ergoemacs-theme nil)" @@ -1162,7 +1162,7 @@ Should test issue #142" (with-temp-file temp-file (insert "(add-to-list 'load-path \"" (expand-file-name (file-name-directory (locate-library "ergoemacs-mode"))) "\")" "(add-to-list 'load-path \"" (expand-file-name (file-name-directory (locate-library "icicles"))) "\")" - "(eval-when-compile (require 'ergoemacs-macros) (require 'cl))" + "(eval-when-compile (require 'ergoemacs-macros) (require 'cl-lib))" (or (and (boundp 'wait-for-me) "(setq debug-on-error t debug-on-quit t)") "") "(setq ergoemacs-theme nil)" @@ -1199,7 +1199,7 @@ Should test issue #142" (w-file (expand-file-name "global-test" ergoemacs-dir)) (temp-file (make-temp-file "ergoemacs-test" nil ".el"))) (with-temp-file temp-file - (insert "(eval-when-compile (require 'ergoemacs-macros) (require 'cl))" + (insert "(eval-when-compile (require 'ergoemacs-macros) (require 'cl-lib))" (or (and (boundp 'wait-for-me) "(setq debug-on-error t debug-on-quit t)") "") "(setq ergoemacs-theme nil)" @@ -1289,7 +1289,7 @@ Should test issue #142" (w-file (expand-file-name "global-test" ergoemacs-dir)) (temp-file (make-temp-file "ergoemacs-test" nil ".el"))) (with-temp-file temp-file - (insert "(eval-when-compile (require 'ergoemacs-macros) (require 'cl))" + (insert "(eval-when-compile (require 'ergoemacs-macros) (require 'cl-lib))" (or (and (boundp 'wait-for-me) "(setq debug-on-error t debug-on-quit t)") "") "(ergoemacs-theme-component my-theme01 ()\n" @@ -1336,7 +1336,7 @@ Should test issue #142" (w-file (expand-file-name "global-test" ergoemacs-dir)) (temp-file (make-temp-file "ergoemacs-test" nil ".el"))) (with-temp-file temp-file - (insert "(eval-when-compile (require 'ergoemacs-macros) (require 'cl))" + (insert "(eval-when-compile (require 'ergoemacs-macros) (require 'cl-lib))" "(setq ergoemacs-keyboard-layout \"sw\")\n" "(require 'ergoemacs-mode)\n" "(message \"Binding 1: %s\" (key-binding (kbd \"M-J\")))\n" @@ -1372,7 +1372,7 @@ Should test issue #142" (w-file (expand-file-name "global-test" ergoemacs-dir)) (temp-file (make-temp-file "ergoemacs-test" nil ".el"))) (with-temp-file temp-file - (insert "(eval-when-compile (require 'ergoemacs-macros) (require 'cl))" + (insert "(eval-when-compile (require 'ergoemacs-macros) (require 'cl-lib))" (or (and (boundp 'wait-for-me) "(setq debug-on-error t debug-on-quit t)") "") "(ergoemacs-package foo \n" @@ -1594,7 +1594,7 @@ Tests Issue #372." (should (string= (key-description (kbd "M-TAB")) (key-description (vector (ergoemacs-translate--event-mods (elt (read-kbd-macro "C-TAB" t) 0) :ctl-to-alt))))) - (letf (((symbol-function 'display-graphic-p) (lambda(&rest _ignore) t))) + (cl-letf (((symbol-function 'display-graphic-p) (lambda(&rest _ignore) t))) ;; Test M-i -> ^i -> TAB (should (string= "<C-i>" (key-description (vector (ergoemacs-translate--event-mods (elt (read-kbd-macro "M-i" t) 0) :ctl-to-alt))))) @@ -1604,7 +1604,7 @@ Tests Issue #372." ;; Test M-m -> ^m -> RET (should (string= "<C-m>" (key-description (vector (ergoemacs-translate--event-mods (elt (read-kbd-macro "M-m" t) 0) :ctl-to-alt)))))) - (letf (((symbol-function 'display-graphic-p) (lambda(&rest _ignore) nil))) + (cl-letf (((symbol-function 'display-graphic-p) (lambda(&rest _ignore) nil))) ;; Test M-i -> ^i -> TAB (should (string= "TAB" (key-description (vector (ergoemacs-translate--event-mods (elt (read-kbd-macro "M-i" t) 0) :ctl-to-alt))))) @@ -1771,7 +1771,7 @@ hash appropriaetly." (with-temp-file temp-file (insert "(add-to-list 'load-path \"" (expand-file-name (file-name-directory (locate-library "ergoemacs-mode"))) "\")" "(add-to-list 'load-path \"" (expand-file-name (file-name-directory (locate-library "icicles"))) "\")" - "(eval-when-compile (require 'ergoemacs-macros) (require 'cl))" + "(eval-when-compile (require 'ergoemacs-macros) (require 'cl-lib))" (or (and (boundp 'wait-for-me) "(setq debug-on-error t debug-on-quit t)") "") "(setq ergoemacs-theme nil)" diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el index e5c54f9..60ef0d8 100644 --- a/ergoemacs-theme-engine.el +++ b/ergoemacs-theme-engine.el @@ -52,7 +52,7 @@ (eval-when-compile (require 'ergoemacs-macros) - (require 'cl)) + (require 'cl-lib)) (defvar ergoemacs-mode) (defvar ergoemacs-require) diff --git a/ergoemacs-themes.el b/ergoemacs-themes.el index 0a86d1b..d878e52 100644 --- a/ergoemacs-themes.el +++ b/ergoemacs-themes.el @@ -29,7 +29,7 @@ ;;; Code: (eval-when-compile - (require 'cl) + (require 'cl-lib) (require 'ergoemacs-macros)) (declare-function ergoemacs-theme-component--create-component "ergoemacs-theme") diff --git a/ergoemacs-translate.el b/ergoemacs-translate.el index a3b9f88..2659479 100644 --- a/ergoemacs-translate.el +++ b/ergoemacs-translate.el @@ -51,7 +51,7 @@ ;;; Code: (eval-when-compile - (require 'cl) + (require 'cl-lib) (require 'ergoemacs-macros)) @@ -698,7 +698,7 @@ For keys, the list consists of: (push key ret)) ret)) -(defstruct ergoemacs-translation-struct +(cl-defstruct ergoemacs-translation-struct "A basic ergoemacs translation structure." (name "default-name") (translation '()) @@ -763,8 +763,8 @@ When NAME is a symbol, setup the translation function for the symbol." (fset (intern (concat "ergoemacs-" name-str type)) 'ergoemacs-translate--setup-command-loop) (when (string= type "-universal-argument") - (pushnew (intern (concat "ergoemacs-" name-str type)) ergoemacs-command-loop--universal-functions) - (pushnew (intern (concat "ergoemacs-translate--" name-str type)) ergoemacs-command-loop--universal-functions)))))) + (cl-pushnew (intern (concat "ergoemacs-" name-str type)) ergoemacs-command-loop--universal-functions) + (cl-pushnew (intern (concat "ergoemacs-translate--" name-str type)) ergoemacs-command-loop--universal-functions)))))) (add-hook 'ergoemacs-mode-intialize-hook #'ergoemacs-translate--setup-translation)