Emacs: Only install cmake-mode if it isn't already installed.

And generalize ebuild-mode check.
This commit is contained in:
tastytea 2020-12-07 16:29:59 +01:00
parent 4a8dc7e2ce
commit fb15524b93
2 changed files with 8 additions and 5 deletions

View File

@ -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)))

View File

@ -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