From fb15524b930e20fc88d6a9ecb8855a3190b7b9a8 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 7 Dec 2020 16:29:59 +0100 Subject: [PATCH] Emacs: Only install cmake-mode if it isn't already installed. And generalize ebuild-mode check. --- init.d/programming/c++.el | 7 +++++-- init.d/text/misc.el | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/init.d/programming/c++.el b/init.d/programming/c++.el index 6cc8a93..ce00364 100644 --- a/init.d/programming/c++.el +++ b/init.d/programming/c++.el @@ -1,6 +1,6 @@ ;;; c++.el --- C++ settings. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-12-01T18:47:44+0100> +;; Time-stamp: <2020-12-07T16:21:12+0100> ;;; Commentary: @@ -82,7 +82,10 @@ ;; Highlighting, indentation and documentation for CMake. (use-package cmake-mode - :unless (fboundp 'cmake-mode) ; The ebuild installs and activates the mode. + :straight nil ; Only install if not installed by OS. + :init (unless (fboundp 'cmake-mode) + (straight-use-package + '(cmake-mode))) :mode (("CMakeLists\\.txt$" . cmake-mode) ("\\.cmake$" . cmake-mode))) diff --git a/init.d/text/misc.el b/init.d/text/misc.el index cc71ae1..fdcf2d9 100644 --- a/init.d/text/misc.el +++ b/init.d/text/misc.el @@ -1,6 +1,6 @@ ;;; misc.el --- Miscellaneous file formats. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-11-29T08:21:09+0100> +;; Time-stamp: <2020-12-07T16:26:16+0100> ;;; Commentary: @@ -187,8 +187,8 @@ :mode ("Dockerfile$" . dockerfile-mode)) (use-package ebuild-mode - :straight nil ; Only install if not on Gentoo. - :init (unless (string-match-p "gentoo" operating-system-release) + :straight nil ; Only install if not installed by OS. + :init (unless (fboundp 'ebuild-mode) (straight-use-package '(ebuild-mode :host nil