diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-09-04 12:24:26 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-04 12:24:26 -0400 |
| commit | 25e59673601a4cf7e24f32b838dc2d7c5129eb05 (patch) | |
| tree | 007f01b9186ab6937c488106cf0b69283e899f68 | |
| parent | e59d0ae5f3f6e339a8bcf131d6d68cf8c11e5ad1 (diff) | |
| parent | 0eecea083e23f85d3a987b1cf4f8956c7d3a6dda (diff) | |
Merge pull request #19 from sternenseemann/emacs-fixes
editors/emacs: fix bytecode compilation and reduce warnings
| -rw-r--r-- | editors/emacs/bqn-input.el | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/editors/emacs/bqn-input.el b/editors/emacs/bqn-input.el index 4e847094..82c0184b 100644 --- a/editors/emacs/bqn-input.el +++ b/editors/emacs/bqn-input.el @@ -3,8 +3,9 @@ (require 'cl-lib) (require 'bqn-symbols) -(defun bqn--make-key-command-sym (n) - (intern (concat "insert-sym-bqn-" n))) +(eval-and-compile + (defun bqn--make-key-command-sym (n) + (intern (concat "insert-sym-bqn-" n)))) (cl-macrolet ((make-insert-functions () `(progn @@ -29,23 +30,22 @@ (define-key map [menu-bar bqn] (cons "BQN" (make-sparse-keymap "BQN"))) map)) -(defun bqn--make-bqn-mode-map () - (bqn--make-base-mode-map bqn-mode-map-prefix)) +;; value gets updated by initialization of bqn-mode-map-prefix +(defvar bqn--mode-map nil + "The keymap for ‘bqn-mode’.") (defun bqn--set-mode-map-prefix (symbol new) "Recreate the prefix and the keymap." (set-default symbol new) - (setq bqn--mode-map (bqn--make-bqn-mode-map))) + (setq bqn--mode-map (bqn--make-base-mode-map new))) (defcustom bqn-mode-map-prefix "s-" - "The keymap prefix for ‘bqn--mode-map’ used both to store the new value -using ‘set-create’ and to update ‘bqn--mode-map’ using - `bqn--make-bqn-mode-map'. Kill and re-start your BQN buffers to reflect the change." + "The keymap prefix for ‘bqn--mode-map’ used both to store the new value using + ‘set-create’ and to update ‘bqn--mode-map’ using `bqn--make-base-mode-map'. + Kill and re-start your BQN buffers to reflect the change." :type 'string :group 'bqn - :set 'bqn--set-mode-map-prefix) - -(defvar bqn--mode-map (bqn--make-bqn-mode-map) - "The keymap for ‘bqn-mode’.") + :set 'bqn--set-mode-map-prefix + :initialize 'custom-initialize-set) (provide 'bqn-input) |
