From b2aec5f5468f773a634be1c95088918d5360681f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 7 Aug 2019 17:07:36 -0400 Subject: [PATCH] input/{chinese,japanese}: fix #1649 --- modules/input/chinese/config.el | 19 ++++++++++--------- modules/input/japanese/config.el | 19 ++++++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/modules/input/chinese/config.el b/modules/input/chinese/config.el index 09cac0dd0..b74f84d15 100644 --- a/modules/input/chinese/config.el +++ b/modules/input/chinese/config.el @@ -31,15 +31,16 @@ ;; ;;; Hacks -(defadvice! +chinese--org-html-paragraph-a (paragraph contents info) +(defadvice! +chinese--org-html-paragraph-a (args) "Join consecutive Chinese lines into a single long line without unwanted space when exporting org-mode to html." :filter-args #'org-html-paragraph - (let* ((fix-regexp "[[:multibyte:]]") - (origin-contents contents) - (fixed-contents - (replace-regexp-in-string - (concat "\\(" fix-regexp "\\) *\n *\\(" fix-regexp "\\)") - "\\1\\2" - origin-contents))) - (list paragraph fixed-contents info))) + (cl-destructuring-bind (paragraph contents info) args + (let* ((fix-regexp "[[:multibyte:]]") + (origin-contents contents) + (fixed-contents + (replace-regexp-in-string + (concat "\\(" fix-regexp "\\) *\n *\\(" fix-regexp "\\)") + "\\1\\2" + origin-contents))) + (list paragraph fixed-contents info)))) diff --git a/modules/input/japanese/config.el b/modules/input/japanese/config.el index 7d201fe8b..dcdbdb0d5 100644 --- a/modules/input/japanese/config.el +++ b/modules/input/japanese/config.el @@ -41,15 +41,16 @@ ;; ;;; Hacks -(defadvice! +japanese--org-html-paragraph-a (paragraph contents info) +(defadvice! +japanese--org-html-paragraph-a (args) "Join consecutive Japanese lines into a single long line without unwanted space when exporting org-mode to html." :filter-args #'org-html-paragraph - (let* ((fix-regexp "[[:multibyte:]]") - (origin-contents contents) - (fixed-contents - (replace-regexp-in-string - (concat "\\(" fix-regexp "\\) *\n *\\(" fix-regexp "\\)") - "\\1\\2" - origin-contents))) - (list paragraph fixed-contents info))) + (cl-destructuring-bind (paragraph contents info) args + (let* ((fix-regexp "[[:multibyte:]]") + (origin-contents contents) + (fixed-contents + (replace-regexp-in-string + (concat "\\(" fix-regexp "\\) *\n *\\(" fix-regexp "\\)") + "\\1\\2" + origin-contents))) + (list paragraph fixed-contents info))))