mirror of
https://github.com/tanrax/burn.el.git
synced 2024-11-12 17:15:40 +01:00
Update variables assignaments
This commit is contained in:
parent
8b57e8dad3
commit
c7f1f63ee1
9
burn.el
9
burn.el
@ -1,3 +1,4 @@
|
|||||||
|
-*- lexical-binding: t; -*-
|
||||||
;;; burn.el --- Burn your code by replacing it with 🔥
|
;;; burn.el --- Burn your code by replacing it with 🔥
|
||||||
|
|
||||||
;; Copyright © 2020 Erick Navarro
|
;; Copyright © 2020 Erick Navarro
|
||||||
@ -11,10 +12,11 @@
|
|||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(setf burn--emoji "🔥")
|
(defvar burn--emoji "🔥")
|
||||||
(setf burn--interval 0.001)
|
(defvar burn--interval 0.001)
|
||||||
|
|
||||||
(defun burn--is-empty ()
|
(defun burn--is-empty ()
|
||||||
|
"Check if there is nothing left to burn."
|
||||||
(= 0 (length
|
(= 0 (length
|
||||||
(replace-regexp-in-string (concat "\\`[ \t\n" burn--emoji "]*") ""
|
(replace-regexp-in-string (concat "\\`[ \t\n" burn--emoji "]*") ""
|
||||||
(replace-regexp-in-string (concat "[ \t\n" burn--emoji "]*\\'") "" (buffer-string))))))
|
(replace-regexp-in-string (concat "[ \t\n" burn--emoji "]*\\'") "" (buffer-string))))))
|
||||||
@ -36,8 +38,7 @@
|
|||||||
(while (not (burn--is-empty))
|
(while (not (burn--is-empty))
|
||||||
(sit-for burn--interval)
|
(sit-for burn--interval)
|
||||||
(burn--replace-backward-at-point)
|
(burn--replace-backward-at-point)
|
||||||
(burn--replace-forward-at-point)
|
(burn--replace-forward-at-point))
|
||||||
)
|
|
||||||
(erase-buffer))
|
(erase-buffer))
|
||||||
|
|
||||||
;;; burn.el ends here
|
;;; burn.el ends here
|
||||||
|
Loading…
Reference in New Issue
Block a user