mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-23 11:30:23 +10:00
Moving to Doom Emacs!
This commit is contained in:
19
.emacs.d/modules/editor/rotate-text/autoload.el
Normal file
19
.emacs.d/modules/editor/rotate-text/autoload.el
Normal file
@@ -0,0 +1,19 @@
|
||||
;;; editor/rotate-text/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(with-eval-after-load 'rotate-text
|
||||
(add-to-list 'rotate-text-words '("true" "false")))
|
||||
|
||||
;;;###autodef
|
||||
(cl-defun set-rotate-patterns! (modes &key symbols words patterns)
|
||||
"Declare :symbols, :words or :patterns (all lists of strings) that
|
||||
`rotate-text' will cycle through."
|
||||
(declare (indent defun))
|
||||
(dolist (mode (doom-enlist modes))
|
||||
(let ((fn-name (intern (format "+rotate-text-init-%s-h" mode))))
|
||||
(fset fn-name
|
||||
(lambda ()
|
||||
(setq-local rotate-text-local-symbols symbols)
|
||||
(setq-local rotate-text-local-words words)
|
||||
(setq-local rotate-text-local-patterns patterns)))
|
||||
(add-hook (intern (format "%s-hook" mode)) fn-name))))
|
||||
Reference in New Issue
Block a user