From 654644b5262fbe7ee7a9a1322ddd91e56674d32f Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Mon, 4 Sep 2023 20:22:26 +0200 Subject: Fix ebuild-mode-insert-tag-line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ebuild-mode.el (ebuild-mode-insert-tag-line): Make it work when comment-start is nil or empty. Signed-off-by: Ulrich Müller --- ChangeLog | 5 +++++ ebuild-mode.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b76a390..dbc4c82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2023-09-04 Ulrich Müller + + * ebuild-mode.el (ebuild-mode-insert-tag-line): Make it work when + comment-start is nil or empty. + 2023-09-01 Ulrich Müller * ebuild-mode.el (ebuild-mode-insert-skeleton): Add S and BDEPEND. diff --git a/ebuild-mode.el b/ebuild-mode.el index 7c8d461..e014b43 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -857,8 +857,9 @@ This is intended for package.mask and similar configuration files in a Gentoo profile." (interactive) (beginning-of-line) - (insert (format "%s %s <%s> (%s)\n" - comment-start + (insert (concat comment-start + (if (/= 0 (length comment-start)) " ")) + (format "%s <%s> (%s)\n" ebuild-mode-full-name ebuild-mode-mail-address (ebuild-mode-time-string "%Y-%m-%d")))) -- cgit v1.2.3-65-gdbad