diff options
author | Ulrich Müller <ulm@gentoo.org> | 2024-10-05 19:41:36 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2024-10-05 19:41:36 +0200 |
commit | 25b2258ea947a50f39bd01ef8a309ed6b244c3ff (patch) | |
tree | 4f582adfc491aea6d7aa645dddec724751a29811 | |
parent | Set font-lock keywords for gentoo-newsitem-mode in the mode hook (diff) | |
download | ebuild-mode-25b2258ea947a50f39bd01ef8a309ed6b244c3ff.tar.gz ebuild-mode-25b2258ea947a50f39bd01ef8a309ed6b244c3ff.tar.bz2 ebuild-mode-25b2258ea947a50f39bd01ef8a309ed6b244c3ff.zip |
Update the condition for enabling bug-reference
* ebuild-mode.el (ebuild-repo-mode): Don't set the bug-reference-*
variables if ebuild-mode-enable-bug-reference is nil. Test for
bug-reference-prog-mode at run time instead of compile time.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ebuild-mode.el | 19 |
2 files changed, 15 insertions, 10 deletions
@@ -1,3 +1,9 @@ +2024-10-05 Ulrich Müller <ulm@gentoo.org> + + * ebuild-mode.el (ebuild-repo-mode): Don't set the bug-reference-* + variables if ebuild-mode-enable-bug-reference is nil. Test for + bug-reference-prog-mode at run time instead of compile time. + 2024-09-30 Ulrich Müller <ulm@gentoo.org> * gentoo-newsitem-mode.el (gentoo-newsitem-mode): Don't set diff --git a/ebuild-mode.el b/ebuild-mode.el index d826b32..768207a 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -1004,16 +1004,15 @@ See `bug-reference-url-format' for further details.") (setq fill-column 72)) (unless (local-variable-p 'tab-width (current-buffer)) (setq tab-width 4)) - (static-if (fboundp 'bug-reference-prog-mode) - (progn - (unless (local-variable-p 'bug-reference-bug-regexp (current-buffer)) - (set (make-local-variable 'bug-reference-bug-regexp) - ebuild-mode-bug-regexp)) - (unless (local-variable-p 'bug-reference-url-format (current-buffer)) - (set (make-local-variable 'bug-reference-url-format) - ebuild-mode-bug-url-format)) - (if ebuild-mode-enable-bug-reference - (bug-reference-prog-mode 1)))) + (when (and (fboundp 'bug-reference-prog-mode) + ebuild-mode-enable-bug-reference) + (unless (local-variable-p 'bug-reference-bug-regexp (current-buffer)) + (set (make-local-variable 'bug-reference-bug-regexp) + ebuild-mode-bug-regexp)) + (unless (local-variable-p 'bug-reference-url-format (current-buffer)) + (set (make-local-variable 'bug-reference-url-format) + ebuild-mode-bug-url-format)) + (bug-reference-prog-mode 1)) (cond ((derived-mode-p 'conf-unix-mode) (unless (local-variable-p 'paragraph-separate (current-buffer)) |