diff options
| author | Craig Jennings <c@cjennings.net> | 2025-09-06 13:57:59 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-09-06 13:57:59 -0500 |
| commit | 0d0bbf0ea7c73b0e26060d9cf45967d406d96d30 (patch) | |
| tree | 32b6e96a6c29727085a118605505c2964fdf71dc /modules | |
| parent | 4fdbff77b03014f89c69ba1011b6e8db95b13f48 (diff) | |
| download | dotemacs-0d0bbf0ea7c73b0e26060d9cf45967d406d96d30.tar.gz dotemacs-0d0bbf0ea7c73b0e26060d9cf45967d406d96d30.zip | |
don't leave trailing space if there's no end-comment character
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/custom-functions.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/custom-functions.el b/modules/custom-functions.el index b3a2b0a6..04be6c19 100644 --- a/modules/custom-functions.el +++ b/modules/custom-functions.el @@ -623,8 +623,11 @@ begin and end the line with the appropriate comment symbols based on programming (- space-on-each-side 1) space-on-each-side)) (insert comment-char)) - (insert " ") - (insert comment-end))))) + ;; Only insert trailing space and comment-end if comment-end is not empty + (when (not (string-empty-p comment-end)) + (insert " ") + (insert comment-end)))))) + (defun cj/comment-box () "Insert a comment box around text that the user inputs. The box extends to the fill column, centers the text, and uses the current |
