diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ebuild-mode.el | 12 |
2 files changed, 15 insertions, 1 deletions
@@ -1,5 +1,9 @@ 2023-10-15 Ulrich Müller <ulm@gentoo.org> + * ebuild-mode.el (static-if): New macro, taken from APEL. + (sh-must-be-shell-mode): Use it. This should finally fix the + byte-compile warning for defadvice in Emacs 30. + * glep-mode.el (glep): Change parent group to text, because the wp group is deprecated since Emacs 26. diff --git a/ebuild-mode.el b/ebuild-mode.el index 5d4f38b..05fb011 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -921,7 +921,17 @@ in a Gentoo profile." ["Insert package.mask tag line" ebuild-mode-insert-tag-line] ["Customize ebuild-mode" (customize-group 'ebuild)])) -(if (eval-when-compile (fboundp 'sh-must-be-shell-mode)) + +(eval-when-compile + (unless (fboundp 'static-if) + (defmacro static-if (cond then &rest else) ; from APEL + "Like `if', but evaluate COND at compile time." + (if (eval cond) + then + `(progn ,@else))) + )) + +(static-if (fboundp 'sh-must-be-shell-mode) ;; make TAB key work (defadvice sh-must-be-shell-mode (around ebuild-mode-sh-must-be-shell-mode activate) |