[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master cb4f4dd8913 2/2: Don't use `mapconcat` for effect
From: |
Mattias Engdegård |
Subject: |
master cb4f4dd8913 2/2: Don't use `mapconcat` for effect |
Date: |
Mon, 10 Apr 2023 09:22:43 -0400 (EDT) |
branch: master
commit cb4f4dd89131e5a8956c788fee7ede65f13b2a69
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Don't use `mapconcat` for effect
* lisp/progmodes/make-mode.el (makefile-browser-fill):
* lisp/url/url-mailto.el (url-mailto):
Use `mapc` instead of `mapconcat`.
---
lisp/progmodes/make-mode.el | 10 ++++------
lisp/url/url-mailto.el | 4 ++--
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 087974bd1f0..5ea03b9e852 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -1326,14 +1326,12 @@ Fill comments, backslashed lines, and variable
definitions specially."
(let ((inhibit-read-only t))
(goto-char (point-min))
(erase-buffer)
- (mapconcat
+ (mapc
(lambda (item) (insert (makefile-browser-format-target-line (car item)
nil) "\n"))
- targets
- "")
- (mapconcat
+ targets)
+ (mapc
(lambda (item) (insert (makefile-browser-format-macro-line (car item)
nil) "\n"))
- macros
- "")
+ macros)
(sort-lines nil (point-min) (point-max))
(goto-char (1- (point-max)))
(delete-char 1) ; remove unnecessary newline at eob
diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el
index 24e64e99c9f..04d6d9681ff 100644
--- a/lisp/url/url-mailto.el
+++ b/lisp/url/url-mailto.el
@@ -120,11 +120,11 @@
(url-mail-goto-field nil)
(url-mail-goto-field "subject")))
(if url-request-extra-headers
- (mapconcat
+ (mapc
(lambda (x)
(url-mail-goto-field (car x))
(insert (cdr x)))
- url-request-extra-headers ""))
+ url-request-extra-headers))
(goto-char (point-max))
(insert url-request-data)
;; It seems Microsoft-ish to send without warning.