[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make command available accordnig to major mode
From: |
Heime |
Subject: |
Re: Make command available accordnig to major mode |
Date: |
Tue, 02 Apr 2024 16:20:56 +0000 |
Have different files that are to be used according to the specific
major mode (avus-elisp, avus-bash) of the file I am working on.
I made the following inside a minor-mode named gali-minor-mode.
What can I do so that when a bash file gets loaded, I get the functionality
provided by avus-bash when I enable gali-minor-mode
(defun gali-avus ()
"Require libraries based on major mode."
(interactive)
(cond
( (or (eq major-mode 'lisp-interaction-mode)
(eq major-mode 'emacs-lisp-mode))
(require 'avus-elisp) )
( (eq major-mode 'sh-mode)
(require 'avus-bash) ) ))