From: Xu Chunyang <mail@xuchunyang.me>
To: 36441@debbugs.gnu.org
Subject: bug#36441: 26.2.90; Simplify dom-texts
Date: Sun, 30 Jun 2019 12:30:22 +0800 [thread overview]
Message-ID: <m2tvc7elup.fsf@xuchunyang.me> (raw)
In the dom-texts function
(mapconcat 'identity (mapcar ...) ...)
can be simplified
(mapconcat ...)
diff -u --label /Users/xcy/src/emacs-mac/lisp/dom.el --label \#\<buffer\ dom.el\> /Users/xcy/src/emacs-mac/lisp/dom.el /var/folders/7f/s191h4q97p90374yw15ssrs00000gn/T/buffer-content-jql2ad
--- /Users/xcy/src/emacs-mac/lisp/dom.el
+++ #<buffer dom.el>
@@ -79,13 +79,11 @@
(defun dom-texts (node &optional separator)
"Return all textual data under NODE concatenated with SEPARATOR in-between."
(mapconcat
- 'identity
- (mapcar
- (lambda (elem)
- (if (stringp elem)
- elem
- (dom-texts elem separator)))
- (dom-children node))
+ (lambda (elem)
+ (if (stringp elem)
+ elem
+ (dom-texts elem separator)))
+ (dom-children node)
(or separator " ")))
(defun dom-child-by-tag (dom tag)
Diff finished. Sun Jun 30 12:23:43 2019
next reply other threads:[~2019-06-30 4:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-30 4:30 Xu Chunyang [this message]
2019-07-06 18:43 ` bug#36441: 26.2.90; Simplify dom-texts Noam Postavsky
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=m2tvc7elup.fsf@xuchunyang.me \
--to=mail@xuchunyang.me \
--cc=36441@debbugs.gnu.org \
/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.