all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Alex Branham <alex.branham@gmail.com>,
	"Basil L. Contovounesios" <contovob@tcd.ie>
Cc: Michael Albinus <michael.albinus@gmx.d>,
	Emacs development discussions <emacs-devel@gnu.org>
Subject: removing flatten-list (alias for new flatten-tree function)
Date: Mon, 17 Dec 2018 10:40:44 -0800	[thread overview]
Message-ID: <76ae4692-717a-4e68-e882-453ac8e0df62@cs.ucla.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 575 bytes --]

Thanks for writing the new flatten-tree function and cleaning up 
existing duplicate functions. I tweaked its performance a bit and 
cleaned up some more duplicates. While doing that I found that I was 
confused by the existence of the just-added alias 'flatten-list', and I 
propose removing it as per the attached patch. I think people who want 
to find and use the new 'flatten-tree' function will typically be better 
served if it has just one name that fits in with existing Emacs Lisp 
functions like 'copy-tree', as opposed to also having a name that is a 
misnomer.


[-- Attachment #2: 0001-lisp-subr.el-flatten-list-Remove.patch --]
[-- Type: text/x-patch, Size: 1243 bytes --]

From b1c894069483adf39b5f4d1f0cdd8f1aeecb87e9 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Mon, 17 Dec 2018 10:28:14 -0800
Subject: [PATCH] * lisp/subr.el (flatten-list): Remove.

---
 etc/NEWS     | 6 ++----
 lisp/subr.el | 4 ----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 327276eef9..9c6401d204 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1360,10 +1360,8 @@ are implemented in C using the Jansson library.
 'ring-resize' can be used to grow or shrink a ring.
 
 +++
-** New function 'flatten-tree'.
-'flatten-list' is provided as an alias. These functions take a tree
-and 'flatten' it such that the result is a list of all the terminal
-nodes.
+** New function 'flatten-tree' returns a "flattened" copy of a tree,
+such that the result is a list of all the terminal nodes.
 
 ** Mailcap
 
diff --git a/lisp/subr.el b/lisp/subr.el
index c5004a539b..0bb04d5e0a 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -5466,8 +5466,4 @@ flatten-tree
     (if tree (push tree elems))
     (nreverse elems)))
 
-;; Technically, `flatten-list' is a misnomer, but we provide it here
-;; for discoverability:
-(defalias 'flatten-list 'flatten-tree)
-
 ;;; subr.el ends here
-- 
2.19.2


             reply	other threads:[~2018-12-17 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17 18:40 Paul Eggert [this message]
2018-12-17 19:00 ` removing flatten-list (alias for new flatten-tree function) Alex Branham
2018-12-17 20:23   ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76ae4692-717a-4e68-e882-453ac8e0df62@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=alex.branham@gmail.com \
    --cc=contovob@tcd.ie \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.d \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.