Files
.emacs.d/modules/text-editing/siren-smart-shift.el
Jim Myhrberg fe6a4e7ce5 fix(elisp): add lexical-binding comment to all files to suppress new Emacs 31 warnings
I've set `lexical-binding` to `nil` in all Emacs Lisp files to suppress
the warnings introduced in Emacs 31 requiring all elisp files to have a
`lexical-binding` comment.

This retains the default behavior of dynamic binding when no
`lexical-binding` comment is present. With it set to `t` across the
board, various things break, and fixing those is a task for another day.
2025-06-29 12:23:03 +01:00

34 lines
1.2 KiB
EmacsLisp

;;; siren-smart-shift.el --- jimeh's Emacs Siren: smart-shift -*- lexical-binding: nil; -*-
;;; Commentary:
;; Configuration for smart-shift
;;; Code:
(use-package smart-shift
:general
("C-c [" 'smart-shift-left)
("C-c ]" 'smart-shift-right)
:config
;; Override default keymap adding support additional keybindings once
;; smart-shift is activated.
(defun smart-shift-override-local-map ()
"Override local key map for continuous indentation."
(setq overriding-local-map
(let ((map (copy-keymap smart-shift-mode-map)))
(define-key map (kbd "[") 'smart-shift-left)
(define-key map (kbd "]") 'smart-shift-right)
(define-key map (kbd "<left>") 'smart-shift-left)
(define-key map (kbd "<right>") 'smart-shift-right)
(define-key map (kbd "<up>") 'smart-shift-up)
(define-key map (kbd "<down>") 'smart-shift-down)
(define-key map [t] 'smart-shift-pass-through) ;done with shifting
map))
(message (propertize "Still in smart-shift key chord..."
'face 'error))))
(provide 'siren-smart-shift)
;;; siren-smart-shift.el ends here