diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ebuild-mode.el | 15 |
2 files changed, 15 insertions, 6 deletions
@@ -1,3 +1,9 @@ +2023-08-26 Ulrich Müller <ulm@gentoo.org> + + * ebuild-mode.el (ebuild-mode): Set paragraph-separate for + eclasses, in order to prevent rewrapping of paragraphs into a + preceding eclass documentation token. + 2023-08-24 Ulrich Müller <ulm@gentoo.org> * ebuild-mode.el: diff --git a/ebuild-mode.el b/ebuild-mode.el index 546ca61..6206ccf 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -412,12 +412,15 @@ Compatibility function for XEmacs." (setq fill-column 72) (setq tab-width 4) (setq indent-tabs-mode t) - (and buffer-file-name - (let ((case-fold-search t)) - (string-match "\\.eclass\\'" - (file-name-sans-versions buffer-file-name))) - ;; Eclass documentation uses two spaces after sentence ends - (set (make-local-variable 'sentence-end-double-space) t))) + (when (and buffer-file-name + (let ((case-fold-search t)) + (string-match "\\.eclass\\'" + (file-name-sans-versions buffer-file-name)))) + ;; Eclass documentation uses two spaces after sentence ends + (set (make-local-variable 'sentence-end-double-space) t) + ;; Don't rewrap paragraphs into a preceding eclassdoc token + (set (make-local-variable 'paragraph-separate) + (concat paragraph-start "\\|^# @")))) (add-hook 'ebuild-mode-hook (lambda () (font-lock-add-keywords |