From 0034067f4722a081fb5bba333d07a856656e8b42 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 28 Jul 2021 13:42:05 +0200 Subject: [PATCH] Avoid cl-lib alias for cadadr and friends * lisp/edmacro.el (edmacro-fix-menu-commands): * lisp/frameset.el (frameset-move-onscreen): * lisp/htmlfontify.el (hfy-face-at, hfy-merge-adjacent-spans) (hfy-mark-tag-names): * lisp/mail/footnote.el (footnote--make-hole) (footnote-back-to-message): * lisp/net/eudc.el (eudc-get-email, eudc-get-phone): * lisp/net/rcirc.el (rcirc-make-trees, rcirc-handler-333) (rcirc-authenticate): * lisp/play/5x5.el (5x5-draw-grid, 5x5-solver): * lisp/play/decipher.el (decipher-insert-frequency-counts): * lisp/ses.el (ses-relocate-range): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-step-into-macro-error) (edebug-tests-error-stepping-into-subr): Avoid using cl-lib aliases for cadadr and friends that now reside in subr.el. --- lisp/edmacro.el | 2 +- lisp/frameset.el | 2 +- lisp/htmlfontify.el | 12 ++++++------ lisp/mail/footnote.el | 4 ++-- lisp/net/eudc.el | 4 ++-- lisp/net/rcirc.el | 6 +++--- lisp/play/5x5.el | 8 ++++---- lisp/play/decipher.el | 4 ++-- lisp/ses.el | 2 +- test/lisp/emacs-lisp/edebug-tests.el | 4 ++-- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lisp/edmacro.el b/lisp/edmacro.el index 9e4a71c336e..e18aad1c3f0 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -612,7 +612,7 @@ This function assumes that the events can be stored in a string." ((eq (car ev) 'switch-frame)) ((equal ev '(menu-bar)) (push 'menu-bar result)) - ((equal (cl-cadadr ev) '(menu-bar)) + ((equal (cadadr ev) '(menu-bar)) (push (vector 'menu-bar (car ev)) result)) ;; It would be nice to do pop-up menus, too, but not enough ;; info is recorded in macros to make this possible. diff --git a/lisp/frameset.el b/lisp/frameset.el index 6aa94f8be5a..cdbac0a48c3 100644 --- a/lisp/frameset.el +++ b/lisp/frameset.el @@ -882,7 +882,7 @@ For the description of FORCE-ONSCREEN, see `frameset-restore'. When forced onscreen, frames wider than the monitor's workarea are converted to fullwidth, and frames taller than the workarea are converted to fullheight. NOTE: This only works for non-iconified frames." - (pcase-let* ((`(,left ,top ,width ,height) (cl-cdadr (frame-monitor-attributes frame))) + (pcase-let* ((`(,left ,top ,width ,height) (cdadr (frame-monitor-attributes frame))) (right (+ left width -1)) (bottom (+ top height -1)) (fr-left (frameset-compute-pos (frame-parameter frame 'left) left right)) diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 3b961989e3e..e63910d857d 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -1238,7 +1238,7 @@ return a `defface' style list of face properties instead of a face symbol." (setq fprops (cdr fprops))) ;; ((prop val)) (setq p (caar fprops)) - (setq v (cl-cadar fprops)) + (setq v (cadar fprops)) (setq fprops (cdr fprops))) (if (listp (cdr fprops)) (progn @@ -1358,8 +1358,8 @@ Returns a modified copy of FACE-MAP." ;;(push (car tmp-map) reduced-map) ;;(push (cadr tmp-map) reduced-map) (while tmp-map - (setq first-start (cl-cadddr tmp-map) - first-stop (cl-caddr tmp-map) + (setq first-start (cadddr tmp-map) + first-stop (caddr tmp-map) last-start (cadr tmp-map) last-stop (car tmp-map) map-buf tmp-map @@ -1372,8 +1372,8 @@ Returns a modified copy of FACE-MAP." (not (re-search-forward "[^ \t\n\r]" (car last-start) t)))) (setq map-buf (cddr map-buf) span-start first-start - first-start (cl-cadddr map-buf) - first-stop (cl-caddr map-buf) + first-start (cadddr map-buf) + first-stop (caddr map-buf) last-start (cadr map-buf) last-stop (car map-buf))) (push span-stop reduced-map) @@ -1888,7 +1888,7 @@ property, with a value of \"tag.line-number\"." (lambda (TLIST) (if (string= file (car TLIST)) (let* ((line (cadr TLIST) ) - (chr (cl-caddr TLIST)) + (chr (caddr TLIST)) (link (format "%s.%d" TAG line) )) (put-text-property (+ 1 chr) (+ 2 chr) diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index 995ae5f9160..b7656022814 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el @@ -713,7 +713,7 @@ Return the footnote number to use." (save-excursion (let (rc) (dolist (alist-elem footnote--markers-alist) - (when (<= (point) (cl-caddr alist-elem)) + (when (<= (point) (caddr alist-elem)) (unless rc (setq rc (car alist-elem))) (save-excursion @@ -835,7 +835,7 @@ being set it is automatically widened." (when note (when footnote-narrow-to-footnotes-when-editing (widen)) - (goto-char (cl-caddr (assq note footnote--markers-alist))) + (goto-char (caddr (assq note footnote--markers-alist))) (when (looking-at (footnote--current-regexp)) (goto-char (match-end 0)))))) diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index 6459c52afee..517913ff016 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -664,7 +664,7 @@ If ERROR is non-nil, report an error if there is none." (let ((result (eudc-query (list (cons 'name name)) '(email))) email) (if (null (cdr result)) - (setq email (cl-cdaar result)) + (setq email (cdaar result)) (error "Multiple match--use the query form")) (if error (if email @@ -682,7 +682,7 @@ If ERROR is non-nil, report an error if there is none." (let ((result (eudc-query (list (cons 'name name)) '(phone))) phone) (if (null (cdr result)) - (setq phone (cl-cdaar result)) + (setq phone (cdaar result)) (error "Multiple match--use the query form")) (if error (if phone diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index e7aec505b0b..9d242c47cd5 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -2408,7 +2408,7 @@ prefix with another element in PAIRS." (when (and (listp x) (listp (cadr x))) (setcdr x (if (> (length (cdr x)) 1) (rcirc-make-trees (cdr x)) - (setcdr x (list (cl-cdadr x))))))) + (setcdr x (list (cdadr x))))))) alist))) ;;; /commands these are called with 3 args: PROCESS, TARGET, which is @@ -3234,7 +3234,7 @@ RFC1459." (with-current-buffer buffer (let ((setter (nth 2 args)) (time (current-time-string - (string-to-number (cl-cadddr args))))) + (string-to-number (cadddr args))))) (rcirc-print process sender "TOPIC" (cadr args) (format "%s (%s on %s)" rcirc-topic setter time)))))) @@ -3344,7 +3344,7 @@ Passwords are stored in `rcirc-authinfo' (which see)." (server (car i)) (nick (nth 2 i)) (method (cadr i)) - (args (cl-cdddr i))) + (args (cdddr i))) (when (and (string-match server rcirc-server)) (if (and (memq method '(nickserv chanserv bitlbee)) (string-match nick rcirc-nick)) diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index 3630c199bc4..64d43c3d480 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el @@ -315,7 +315,7 @@ Quit current game \\[5x5-quit-game]" (save-excursion (goto-char grid-org) (beginning-of-line (+ 1 (/ 5x5-y-scale 2))) - (let ((solution-grid (cl-cdadr 5x5-solver-output))) + (let ((solution-grid (cdadr 5x5-solver-output))) (dotimes (y 5x5-grid-size) (save-excursion (forward-char (+ 1 (/ (1+ 5x5-x-scale) 2))) @@ -746,9 +746,9 @@ Solutions are sorted from least to greatest Hamming weight." ;; The Hamming Weight is computed by matrix reduction ;; with an ad-hoc operator. (math-reduce-vec - ;; (cl-cadadr '(vec (mod x 2))) => x - (lambda (r x) (+ (if (integerp r) r (cl-cadadr r)) - (cl-cadadr x))) + ;; (cadadr '(vec (mod x 2))) => x + (lambda (r x) (+ (if (integerp r) r (cadadr r)) + (cadadr x))) solution); car (5x5-vec-to-grid (calcFunc-arrange solution 5x5-grid-size));cdr diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el index 47ed6e28b58..a80cb21151f 100644 --- a/lisp/play/decipher.el +++ b/lisp/play/decipher.el @@ -769,8 +769,8 @@ TOTAL is the total number of letters in the ciphertext." (while temp-list (insert (caar temp-list) (format "%4d%3d%% " - (cl-cadar temp-list) - (floor (* 100.0 (cl-cadar temp-list)) total))) + (cadar temp-list) + (floor (* 100.0 (cadar temp-list)) total))) (setq temp-list (nthcdr 4 temp-list))) (insert ?\n) (setq freq-list (cdr freq-list) diff --git a/lisp/ses.el b/lisp/ses.el index 81c27144a54..cc8c35d6997 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1677,7 +1677,7 @@ if the range was altered." (funcall field (ses-sym-rowcol min)))) ;; This range has changed size. (setq ses-relocate-return 'range)) - `(ses-range ,min ,max ,@(cl-cdddr range))))) + `(ses-range ,min ,max ,@(cdddr range))))) (defun ses-relocate-all (minrow mincol rowincr colincr) "Alter all cell values, symbols, formulas, and reference-lists to relocate diff --git a/test/lisp/emacs-lisp/edebug-tests.el b/test/lisp/emacs-lisp/edebug-tests.el index 2f45050e2eb..f8fa223da4c 100644 --- a/test/lisp/emacs-lisp/edebug-tests.el +++ b/test/lisp/emacs-lisp/edebug-tests.el @@ -723,7 +723,7 @@ test and possibly others should be updated." (edebug-on-error nil) error-message (command-error-function (lambda (&rest args) - (setq error-message (cl-cadar args))))) + (setq error-message (cadar args))))) (edebug-tests-run-kbd-macro "@" (edebug-tests-should-be-at "format-node" "start") "SPC" (edebug-tests-should-be-at "format-node" "vectorp") @@ -744,7 +744,7 @@ test and possibly others should be updated." (edebug-on-error nil) (error-message "") (command-error-function (lambda (&rest args) - (setq error-message (cl-cadar args))))) + (setq error-message (cadar args))))) (edebug-tests-run-kbd-macro "@ SPC SPC SPC SPC SPC" (edebug-tests-should-be-at "try-flavors" "macro") -- 2.39.2