From 40a17a7c10649bd3bc501c38b47e97eb120c3a9d Mon Sep 17 00:00:00 2001 From: Walheimat Date: Mon, 14 Oct 2024 18:39:36 +0200 Subject: [PATCH] refac(segments,org): use truncate-string-ellipsis for default --- test/whale-line-segments-test.el | 2 +- whale-line-segments.el | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/whale-line-segments-test.el b/test/whale-line-segments-test.el index 054cd3f..c130a70 100644 --- a/test/whale-line-segments-test.el +++ b/test/whale-line-segments-test.el @@ -576,7 +576,7 @@ (whale-line-segments--minions--list))))))) (ert-deftest org--maybe-truncate--truncates () - (should (string= "test…" (whale-line-segments--org--maybe-truncate "testing" 'success 5)))) + (should (string= (concat "test" (truncate-string-ellipsis)) (whale-line-segments--org--maybe-truncate "testing" 'success 5)))) (ert-deftest org--maybe-truncate--skips () (should (string= "testing" (whale-line-segments--org--maybe-truncate "testing" 'success 7)))) diff --git a/whale-line-segments.el b/whale-line-segments.el index b08a1f0..532f0e5 100644 --- a/whale-line-segments.el +++ b/whale-line-segments.el @@ -17,6 +17,7 @@ ;;; Code: +(require 'mule-util) (require 'whale-line) ;;;; Customization @@ -48,7 +49,7 @@ frame." :group 'whale-line-segments :type 'string) -(defcustom whale-line-segments-org-ellipsis "…" +(defcustom whale-line-segments-org-ellipsis (truncate-string-ellipsis) "The string indicating truncation of a heading." :group 'whale-line-segments :type 'string)