mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
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.
34 lines
1.2 KiB
EmacsLisp
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
|