GNU bug report logs - #36441
26.2.90; Simplify dom-texts

Previous Next

Package: emacs;

Reported by: Xu Chunyang <mail <at> xuchunyang.me>

Date: Sun, 30 Jun 2019 04:31:02 UTC

Severity: minor

Tags: fixed

Found in version 26.2.90

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36441 in the body.
You can then email your comments to 36441 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36441; Package emacs. (Sun, 30 Jun 2019 04:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xu Chunyang <mail <at> xuchunyang.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 30 Jun 2019 04:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Xu Chunyang <mail <at> xuchunyang.me>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.2.90; Simplify dom-texts
Date: Sun, 30 Jun 2019 12:30:22 +0800
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36441; Package emacs. (Sat, 06 Jul 2019 18:44:01 GMT) Full text and rfc822 format available.

Message #8 received at 36441 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Xu Chunyang <mail <at> xuchunyang.me>
Cc: 36441 <at> debbugs.gnu.org
Subject: Re: bug#36441: 26.2.90; Simplify dom-texts
Date: Sat, 06 Jul 2019 14:43:40 -0400
severity 36441 minor
tags 36441 fixed
close 36441 27.1
quit

Xu Chunyang <mail <at> xuchunyang.me> writes:

> In the dom-texts function
>
>   (mapconcat 'identity (mapcar ...) ...)
>
> can be simplified
>
>   (mapconcat ...)

Right, applied on master.

d07dd64fd0 2019-07-06T14:34:47-04:00 "* lisp/dom.el (dom-texts): Simplify (Bug#36441)."
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d07dd64fd0476e0346d2de65b965193703ae6e7a





Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 06 Jul 2019 18:44:02 GMT) Full text and rfc822 format available.

Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 06 Jul 2019 18:44:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 36441 <at> debbugs.gnu.org and Xu Chunyang <mail <at> xuchunyang.me> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 06 Jul 2019 18:44:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 04 Aug 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 324 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.