mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-03-10 08:41:32 -07:00
In the spirit of6f40ad5, I'm deprecating this macro because it doesn't provide enough value to exist and serves only to complicate a casual reader's understanding of Doom's modules. Ref:6f40ad55f5
20 lines
831 B
EmacsLisp
20 lines
831 B
EmacsLisp
;;; editor/rotate-text/autoload.el -*- lexical-binding: t; -*-
|
|
|
|
;;;###autoload
|
|
(with-eval-after-load 'rotate-text
|
|
(add-to-list 'rotate-text-words '("true" "false"))
|
|
(add-to-list 'rotate-text-words '("enable" "disable")))
|
|
|
|
;;;###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 (ensure-list 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))))
|