emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/bind-map 4cccf8fb82 23/97: Add configuration var for defau


From: ELPA Syncer
Subject: [nongnu] elpa/bind-map 4cccf8fb82 23/97: Add configuration var for default map suffix
Date: Thu, 20 Jan 2022 07:59:11 -0500 (EST)

branch: elpa/bind-map
commit 4cccf8fb821060cba95af33151783a2441894c4a
Author: justbur <justin@burkett.cc>
Commit: justbur <justin@burkett.cc>

    Add configuration var for default map suffix
---
 bind-map.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/bind-map.el b/bind-map.el
index 15c5c5bb43..a524f81788 100644
--- a/bind-map.el
+++ b/bind-map.el
@@ -88,6 +88,11 @@
   "Default states for evil bindings."
   :group 'bind-map)
 
+(defcustom bind-map-default-map-suffix "-bm-map"
+  "Default suffix to use for `bind-map-for-major-mode' and
+`bind-map-for-minor-mode'."
+  :group 'bind-map)
+
 ;;;###autoload
 (defmacro bind-map (map &rest args)
   "Bind keymap MAP in multiple locations.
@@ -188,7 +193,8 @@ a major mode. This macro makes the call
 where ARGS should include :keys or :evil-keys. The name of the
 generated keymap is returned, which is always the name of the
 major mode with -bm-map appended."
-  (let ((map-name (intern (format "%s-bm-map" major-mode))))
+  (let ((map-name (intern (concat (symbol-name major-mode)
+                                  bind-map-default-map-suffix))))
     `(progn
        (bind-map ,map-name
          :major-modes (,major-mode)
@@ -209,7 +215,8 @@ a minor mode. This macro makes the call
 where ARGS should include :keys or :evil-keys. The name of the
 generated keymap is returned, which is always the name of the
 minor mode with -bm-map appended."
-  (let ((map-name (intern (format "%s-bm-map" minor-mode))))
+  (let ((map-name (intern (concat (symbol-name minor-mode)
+                                  bind-map-default-map-suffix))))
     `(progn
        (bind-map ,map-name
          :minor-modes (,minor-mode)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]