2018-06-22 00:32:42 +02:00
|
|
|
;;; editor/rotate-text/autoload.el -*- lexical-binding: t; -*-
|
2018-05-25 00:46:11 +02:00
|
|
|
|
2018-06-18 17:32:44 +02:00
|
|
|
;;;###autoload
|
2019-11-04 03:35:37 -05:00
|
|
|
(with-eval-after-load 'rotate-text
|
2021-10-04 21:20:13 +07:00
|
|
|
(pushnew! rotate-text-words
|
|
|
|
'("true" "false")
|
|
|
|
'("enable" "disable")))
|
2018-06-18 17:32:44 +02:00
|
|
|
|
2018-06-15 17:58:21 +02:00
|
|
|
;;;###autodef
|
|
|
|
(cl-defun set-rotate-patterns! (modes &key symbols words patterns)
|
2018-05-25 00:46:11 +02:00
|
|
|
"Declare :symbols, :words or :patterns (all lists of strings) that
|
|
|
|
`rotate-text' will cycle through."
|
2018-06-22 01:30:27 +02:00
|
|
|
(declare (indent defun))
|
2022-08-07 12:24:14 +02:00
|
|
|
(dolist (mode (ensure-list modes))
|
2019-07-24 22:13:19 +02:00
|
|
|
(let ((fn-name (intern (format "+rotate-text-init-%s-h" mode))))
|
2018-06-15 17:58:21 +02:00
|
|
|
(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))))
|