From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.bugs Subject: bug#25523: 25.1; [PATCH] rename `cl-caddr' etc. to `caddr' etc. Date: Tue, 24 Jan 2017 23:57:23 -0500 Message-ID: <87r33rag98.fsf@udel.edu> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1485320307 14393 195.159.176.226 (25 Jan 2017 04:58:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Jan 2017 04:58:27 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 25523@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 25 05:58:20 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWFeq-0002EC-TD for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jan 2017 05:58:09 +0100 Original-Received: from localhost ([::1]:57390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWFew-0006PF-02 for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Jan 2017 23:58:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWFeo-0006PA-Mg for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2017 23:58:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cWFek-0008E2-LV for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2017 23:58:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43169) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cWFek-0008Dy-Gk for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2017 23:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cWFek-00026A-7i for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2017 23:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mark Oteiza Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jan 2017 04:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25523 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25523-submit@debbugs.gnu.org id=B25523.14853202538032 (code B ref 25523); Wed, 25 Jan 2017 04:58:02 +0000 Original-Received: (at 25523) by debbugs.gnu.org; 25 Jan 2017 04:57:33 +0000 Original-Received: from localhost ([127.0.0.1]:41368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWFeG-00025S-Nt for submit@debbugs.gnu.org; Tue, 24 Jan 2017 23:57:33 -0500 Original-Received: from mail-qt0-f194.google.com ([209.85.216.194]:36338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWFeE-00025E-Tj for 25523@debbugs.gnu.org; Tue, 24 Jan 2017 23:57:31 -0500 Original-Received: by mail-qt0-f194.google.com with SMTP id l7so29551183qtd.3 for <25523@debbugs.gnu.org>; Tue, 24 Jan 2017 20:57:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Xl7YM8bYVMcPBbL+ZudPiB79Svz4edb6Z3Pl9Hn3vls=; b=twJBuuSX1i63rUffw4O/1NsY9CFgHGrTg37AnOgHdHLVPDUh1ECuyoJHAANRjv0wAv 8p5Nd+0Gmfp7fijxpu2cBqkgz58HdUQduZQB7uA16eUCUuUKQzvGZBJN8d9Fr3i/1Rpl sysJMHkYEWsWSfgxlf/fJSza1Hms5JzgCKIUz5lnVVocpeSC9uZxalhJdFZkgLsk/6jE +nL4levKkjnVHU+SlWlIs44Bb58s0RvkoD6ake5+wNKtDLQmu45dPoggQEbCVrjEzrYa v/cCa1zhy2hN5oNdaVlIpWwFUxDdECNPXxan3BJ/m96ROhSasQEkVNaoARLxuj2owBmF SrGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Xl7YM8bYVMcPBbL+ZudPiB79Svz4edb6Z3Pl9Hn3vls=; b=RvJy5mmeOONrfFJNEgFVH3P6hSXLVbgT+Gf6bNumGZEQjhl2BQQVBPQe808fC7nxuC v/0AufCsjRqIrvhpkSZrpQibwyBuFGEbjK4GXf62nbPOiXYL9VvJehkAm4Kr2nZCDF1D JBOoSwoOVWnHZ4LLth/MK8ONCUbaKpYvm64800WOrCY3mkBgmSXz6T6Bs8OPMqAeLcVt ZAEdbKzVrfgeAMbexAZtkJTjd3xRhFvYx3dEInss22sHAKk0gM1v5ip6foynJU5hxEFx HFl6e6C9KLrIgTvykaocoervuZSpXQnjwG4gjdM15oiEjIOi/pchOa7tljhAS6tsXim2 dyDg== X-Gm-Message-State: AIkVDXKX5VHIUKfijWtZreD9CaAn/ienOIoVMYr2TPLPLD2ex6GdjIZh83TCJ7z7MstDB6de X-Received: by 10.200.46.241 with SMTP id i46mr32306364qta.17.1485320245329; Tue, 24 Jan 2017 20:57:25 -0800 (PST) Original-Received: from holos.localdomain (pool-173-67-40-97.bltmmd.fios.verizon.net. [173.67.40.97]) by smtp.gmail.com with ESMTPSA id m27sm17936462qtf.19.2017.01.24.20.57.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 20:57:24 -0800 (PST) Original-Received: by holos.localdomain (Postfix, from userid 1000) id 8BA8866372; Tue, 24 Jan 2017 23:57:23 -0500 (EST) In-Reply-To: (Drew Adams's message of "Tue, 24 Jan 2017 18:18:21 -0800 (PST)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128438 Archived-At: Drew Adams writes: > See http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg01451.html > > As RMS said there: > >> Today, there is no need to keep Emacs so small. So we may as >> well add c...r and c....r to Emacs Lisp. I'm down. diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index b1db07fe16..5aa8f1bf65 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el @@ -413,125 +413,30 @@ cl-tenth (declare (gv-setter (lambda (store) `(setcar (nthcdr 9 ,x) ,store)))) (nth 9 x)) -(defun cl-caaar (x) - "Return the `car' of the `car' of the `car' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (car (car (car x)))) - -(defun cl-caadr (x) - "Return the `car' of the `car' of the `cdr' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (car (car (cdr x)))) - -(defun cl-cadar (x) - "Return the `car' of the `cdr' of the `car' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (car (cdr (car x)))) - -(defun cl-caddr (x) - "Return the `car' of the `cdr' of the `cdr' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (car (cdr (cdr x)))) - -(defun cl-cdaar (x) - "Return the `cdr' of the `car' of the `car' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (cdr (car (car x)))) - -(defun cl-cdadr (x) - "Return the `cdr' of the `car' of the `cdr' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (cdr (car (cdr x)))) - -(defun cl-cddar (x) - "Return the `cdr' of the `cdr' of the `car' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (cdr (cdr (car x)))) - -(defun cl-cdddr (x) - "Return the `cdr' of the `cdr' of the `cdr' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (cdr (cdr (cdr x)))) - -(defun cl-caaaar (x) - "Return the `car' of the `car' of the `car' of the `car' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (car (car (car (car x))))) - -(defun cl-caaadr (x) - "Return the `car' of the `car' of the `car' of the `cdr' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (car (car (car (cdr x))))) - -(defun cl-caadar (x) - "Return the `car' of the `car' of the `cdr' of the `car' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (car (car (cdr (car x))))) - -(defun cl-caaddr (x) - "Return the `car' of the `car' of the `cdr' of the `cdr' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (car (car (cdr (cdr x))))) - -(defun cl-cadaar (x) - "Return the `car' of the `cdr' of the `car' of the `car' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (car (cdr (car (car x))))) - -(defun cl-cadadr (x) - "Return the `car' of the `cdr' of the `car' of the `cdr' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (car (cdr (car (cdr x))))) - -(defun cl-caddar (x) - "Return the `car' of the `cdr' of the `cdr' of the `car' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (car (cdr (cdr (car x))))) - -(defun cl-cadddr (x) - "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (car (cdr (cdr (cdr x))))) - -(defun cl-cdaaar (x) - "Return the `cdr' of the `car' of the `car' of the `car' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (cdr (car (car (car x))))) - -(defun cl-cdaadr (x) - "Return the `cdr' of the `car' of the `car' of the `cdr' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (cdr (car (car (cdr x))))) - -(defun cl-cdadar (x) - "Return the `cdr' of the `car' of the `cdr' of the `car' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (cdr (car (cdr (car x))))) - -(defun cl-cdaddr (x) - "Return the `cdr' of the `car' of the `cdr' of the `cdr' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (cdr (car (cdr (cdr x))))) - -(defun cl-cddaar (x) - "Return the `cdr' of the `cdr' of the `car' of the `car' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (cdr (cdr (car (car x))))) - -(defun cl-cddadr (x) - "Return the `cdr' of the `cdr' of the `car' of the `cdr' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (cdr (cdr (car (cdr x))))) - -(defun cl-cdddar (x) - "Return the `cdr' of the `cdr' of the `cdr' of the `car' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (cdr (cdr (cdr (car x))))) - -(defun cl-cddddr (x) - "Return the `cdr' of the `cdr' of the `cdr' of the `cdr' of X." - (declare (compiler-macro internal--compiler-macro-cXXr)) - (cdr (cdr (cdr (cdr x))))) +(defalias 'cl-caaar 'caaar) +(defalias 'cl-caadr 'caadr) +(defalias 'cl-cadar 'cadar) +(defalias 'cl-caddr 'caddr) +(defalias 'cl-cdaar 'cdaar) +(defalias 'cl-cdadr 'cdadr) +(defalias 'cl-cddar 'cddar) +(defalias 'cl-cdddr 'cdddr) +(defalias 'cl-caaaar 'caaaar) +(defalias 'cl-caaadr 'caaadr) +(defalias 'cl-caadar 'caadar) +(defalias 'cl-caaddr 'caaddr) +(defalias 'cl-cadaar 'cadaar) +(defalias 'cl-cadadr 'cadadr) +(defalias 'cl-caddar 'caddar) +(defalias 'cl-cadddr 'cadddr) +(defalias 'cl-cdaaar 'cdaaar) +(defalias 'cl-cdaadr 'cdaadr) +(defalias 'cl-cdadar 'cdadar) +(defalias 'cl-cdaddr 'cdaddr) +(defalias 'cl-cddaar 'cddaar) +(defalias 'cl-cddadr 'cddadr) +(defalias 'cl-cdddar 'cdddar) +(defalias 'cl-cddddr 'cddddr) ;;(defun last* (x &optional n) ;; "Returns the last link in the list LIST. diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index e33a603d1b..73eb9a4e86 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -258,30 +258,6 @@ cl-unload-function copy-list ldiff list* - cddddr - cdddar - cddadr - cddaar - cdaddr - cdadar - cdaadr - cdaaar - cadddr - caddar - cadadr - cadaar - caaddr - caadar - caaadr - caaaar - cdddr - cddar - cdadr - cdaar - caddr - cadar - caadr - caaar tenth ninth eighth diff --git a/lisp/subr.el b/lisp/subr.el index 53774169b4..a6ba05c202 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -384,6 +384,126 @@ cddr (declare (compiler-macro internal--compiler-macro-cXXr)) (cdr (cdr x))) +(defun caaar (x) + "Return the `car' of the `car' of the `car' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (car (car (car x)))) + +(defun caadr (x) + "Return the `car' of the `car' of the `cdr' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (car (car (cdr x)))) + +(defun cadar (x) + "Return the `car' of the `cdr' of the `car' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (car (cdr (car x)))) + +(defun caddr (x) + "Return the `car' of the `cdr' of the `cdr' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (car (cdr (cdr x)))) + +(defun cdaar (x) + "Return the `cdr' of the `car' of the `car' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (cdr (car (car x)))) + +(defun cdadr (x) + "Return the `cdr' of the `car' of the `cdr' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (cdr (car (cdr x)))) + +(defun cddar (x) + "Return the `cdr' of the `cdr' of the `car' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (cdr (cdr (car x)))) + +(defun cdddr (x) + "Return the `cdr' of the `cdr' of the `cdr' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (cdr (cdr (cdr x)))) + +(defun caaaar (x) + "Return the `car' of the `car' of the `car' of the `car' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (car (car (car (car x))))) + +(defun caaadr (x) + "Return the `car' of the `car' of the `car' of the `cdr' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (car (car (car (cdr x))))) + +(defun caadar (x) + "Return the `car' of the `car' of the `cdr' of the `car' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (car (car (cdr (car x))))) + +(defun caaddr (x) + "Return the `car' of the `car' of the `cdr' of the `cdr' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (car (car (cdr (cdr x))))) + +(defun cadaar (x) + "Return the `car' of the `cdr' of the `car' of the `car' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (car (cdr (car (car x))))) + +(defun cadadr (x) + "Return the `car' of the `cdr' of the `car' of the `cdr' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (car (cdr (car (cdr x))))) + +(defun caddar (x) + "Return the `car' of the `cdr' of the `cdr' of the `car' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (car (cdr (cdr (car x))))) + +(defun cadddr (x) + "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (car (cdr (cdr (cdr x))))) + +(defun cdaaar (x) + "Return the `cdr' of the `car' of the `car' of the `car' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (cdr (car (car (car x))))) + +(defun cdaadr (x) + "Return the `cdr' of the `car' of the `car' of the `cdr' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (cdr (car (car (cdr x))))) + +(defun cdadar (x) + "Return the `cdr' of the `car' of the `cdr' of the `car' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (cdr (car (cdr (car x))))) + +(defun cdaddr (x) + "Return the `cdr' of the `car' of the `cdr' of the `cdr' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (cdr (car (cdr (cdr x))))) + +(defun cddaar (x) + "Return the `cdr' of the `cdr' of the `car' of the `car' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (cdr (cdr (car (car x))))) + +(defun cddadr (x) + "Return the `cdr' of the `cdr' of the `car' of the `cdr' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (cdr (cdr (car (cdr x))))) + +(defun cdddar (x) + "Return the `cdr' of the `cdr' of the `cdr' of the `car' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (cdr (cdr (cdr (car x))))) + +(defun cddddr (x) + "Return the `cdr' of the `cdr' of the `cdr' of the `cdr' of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) + (cdr (cdr (cdr (cdr x))))) + (defun last (list &optional n) "Return the last link of LIST. Its car is the last element. If LIST is nil, return nil.