2013-11-25 12:29:08 +00:00
|
|
|
(require 'cl)
|
2013-12-26 00:39:23 +00:00
|
|
|
(require 'etype-lines)
|
|
|
|
|
|
|
|
(defcustom etype-word-directory nil
|
|
|
|
"A path to a directory that contains a file 'etype.lines'. If
|
|
|
|
NIL a standard set of words will be used in the game.")
|
2013-11-25 12:29:08 +00:00
|
|
|
|
2013-11-26 01:05:33 +00:00
|
|
|
(defvar etype-words-in-play nil)
|
2013-11-25 12:29:08 +00:00
|
|
|
|
2013-11-26 01:05:33 +00:00
|
|
|
(defvar etype-unused-words nil)
|
2013-11-25 12:29:08 +00:00
|
|
|
|
2013-11-26 01:05:33 +00:00
|
|
|
(defvar etype-score 0)
|
2013-11-25 12:29:08 +00:00
|
|
|
|
2013-11-26 01:05:33 +00:00
|
|
|
(defvar etype-in-game nil)
|
2013-11-25 12:29:08 +00:00
|
|
|
|
|
|
|
(defvar etype-timers nil)
|
|
|
|
|
2013-11-26 01:05:33 +00:00
|
|
|
(defvar etype-overlay nil)
|
|
|
|
|
2013-12-07 12:18:26 +00:00
|
|
|
(defvar etype-point-max nil)
|
|
|
|
|
2013-11-26 01:05:33 +00:00
|
|
|
(defvar etype-completing-word nil)
|
2013-11-25 12:29:08 +00:00
|
|
|
|
2013-12-17 20:56:46 +00:00
|
|
|
(defvar etype-level 1)
|
|
|
|
|
2013-11-25 12:29:08 +00:00
|
|
|
(defconst etype-lines-file "etype.lines")
|
|
|
|
|
|
|
|
(defun etype-read-file ()
|
2013-12-14 22:26:00 +00:00
|
|
|
"Returns a vector of lines from the 'etype-lines-file'."
|
2013-12-26 00:39:23 +00:00
|
|
|
(if etype-word-directory
|
|
|
|
(with-temp-buffer
|
|
|
|
(insert-file-contents
|
|
|
|
(expand-file-name etype-lines-file etype-word-directory))
|
|
|
|
(apply
|
|
|
|
'vector
|
|
|
|
(split-string
|
|
|
|
(buffer-substring-no-properties (point-min) (point-max)) "\n")))
|
|
|
|
etype-word-vector))
|
2013-11-25 12:29:08 +00:00
|
|
|
|
|
|
|
(defun init-game ()
|
2013-12-14 22:26:00 +00:00
|
|
|
"Sets up the game grid containing 'fill-column' number of spaces and 30
|
|
|
|
lines. Also some variables are set."
|
2013-11-25 12:29:08 +00:00
|
|
|
(let ((space (make-string fill-column ? )))
|
|
|
|
(dotimes (i 30)
|
|
|
|
(insert space)
|
|
|
|
(newline))
|
2013-12-07 12:18:26 +00:00
|
|
|
(setq etype-point-max (point))
|
2013-12-17 20:56:46 +00:00
|
|
|
(let* ((score "\nScore: 0")
|
|
|
|
(level "Level: 1"))
|
|
|
|
(insert (make-string fill-column ?-))
|
|
|
|
(insert score)
|
|
|
|
(insert (make-string
|
|
|
|
(- fill-column
|
|
|
|
(+ (length score) (length level))) ? ))
|
|
|
|
(insert level)))
|
2013-11-26 01:05:33 +00:00
|
|
|
(goto-char (point-min))
|
2013-12-17 20:56:46 +00:00
|
|
|
(setq cursor-type nil)
|
2013-11-26 01:05:33 +00:00
|
|
|
(setq etype-score 0)
|
|
|
|
(setq etype-in-game t)
|
2013-12-14 22:26:00 +00:00
|
|
|
;; Shuffle the vector returned from etype-read-file, and turns it in to a
|
|
|
|
;; list.
|
2013-12-26 01:21:10 +00:00
|
|
|
(setq etype-unused-words
|
|
|
|
(mapcar 'eval (shuffle-vector (etype-read-file))))
|
|
|
|
(read-only-mode 1))
|
2013-11-25 12:29:08 +00:00
|
|
|
|
2013-12-17 20:56:46 +00:00
|
|
|
(defun etype-increase-level ()
|
|
|
|
"Increases the level."
|
|
|
|
(interactive)
|
|
|
|
(when (< etype-level 10)
|
2013-12-26 01:21:10 +00:00
|
|
|
(setq inhibit-read-only t)
|
2013-12-17 20:56:46 +00:00
|
|
|
(incf etype-level)
|
2013-12-26 01:21:10 +00:00
|
|
|
(etype-update-level)
|
|
|
|
(setq inhibit-read-only nil)))
|
2013-12-17 20:56:46 +00:00
|
|
|
|
|
|
|
(defun etype-decrease-level ()
|
|
|
|
"Decreases the level."
|
|
|
|
(interactive)
|
|
|
|
(when (> etype-level 1)
|
2013-12-26 01:21:10 +00:00
|
|
|
(setq inhibit-read-only t)
|
2013-12-17 20:56:46 +00:00
|
|
|
(decf etype-level)
|
2013-12-26 01:21:10 +00:00
|
|
|
(etype-update-level)
|
|
|
|
(setq inhibit-read-only nil)))
|
2013-12-17 20:56:46 +00:00
|
|
|
|
2013-11-25 12:29:08 +00:00
|
|
|
(defun etype-fit-word (word)
|
2013-12-14 22:26:00 +00:00
|
|
|
"Returns a point that a word can be inserted on the next
|
|
|
|
line. If there is no room (a word is directly beneath it) it
|
|
|
|
tries to find the nearest point it could fit. If there is no room
|
|
|
|
NIL is returned, and the word is not moved."
|
|
|
|
(let* ((point (point))
|
|
|
|
(space (make-string (+ 2 (length word)) ? )))
|
|
|
|
(if (and (or (looking-back " ") (bolp)) (looking-at space))
|
|
|
|
point
|
|
|
|
(let* ((backward (search-backward space (point-at-bol) t))
|
|
|
|
(backward (and backward (+ backward 1))))
|
|
|
|
(goto-char point)
|
|
|
|
(let* ((forward (search-forward space (point-at-eol) t))
|
|
|
|
(forward (and forward (- forward (- (length space) 1)))))
|
|
|
|
(cond ((not backward) forward)
|
|
|
|
((not forward) backward)
|
|
|
|
((< (- point backward) (- forward point)) backward)
|
|
|
|
(t forward)))))))
|
2013-11-25 12:29:08 +00:00
|
|
|
|
2013-12-07 12:18:26 +00:00
|
|
|
(defun etype-search-timers (word)
|
2013-12-15 16:55:53 +00:00
|
|
|
"Returns the timer that is associated with WORD."
|
2013-11-25 12:29:08 +00:00
|
|
|
(first
|
|
|
|
(remove-if-not
|
|
|
|
(lambda (timer)
|
2013-12-07 12:18:26 +00:00
|
|
|
(member word (timer--args timer))) etype-timers)))
|
2013-12-06 02:14:55 +00:00
|
|
|
|
2013-12-15 16:55:53 +00:00
|
|
|
(defun etype-remove-word (point word)
|
|
|
|
"Removes a word and replacing it with whitespace."
|
|
|
|
(let* ((len (length word))
|
|
|
|
(space (make-string len ? )))
|
|
|
|
(goto-char point)
|
|
|
|
(when (looking-at word)
|
|
|
|
(delete-char len)
|
|
|
|
(insert space))))
|
|
|
|
|
|
|
|
(defun etype-insert-word (point word)
|
|
|
|
"Inserts word 'overwrite-mode' style, but only if the word fits on the
|
|
|
|
line."
|
|
|
|
(goto-char point)
|
|
|
|
(let* ((destination (etype-fit-word word)))
|
|
|
|
(when destination
|
|
|
|
(goto-char destination)
|
|
|
|
(delete-char (length word))
|
|
|
|
(insert word)
|
|
|
|
(goto-char destination))))
|
|
|
|
|
2013-12-26 00:39:23 +00:00
|
|
|
(defun etype-next-line ()
|
|
|
|
(let ((column (current-column)))
|
|
|
|
(forward-line)
|
|
|
|
(forward-char column)))
|
|
|
|
|
|
|
|
(defun etype-previous-line ()
|
|
|
|
(let ((column (current-column)))
|
|
|
|
(forward-line -1)
|
|
|
|
(forward-char column)))
|
|
|
|
|
2013-12-07 12:18:26 +00:00
|
|
|
(defun etype-move-word (point word)
|
2013-12-15 16:55:53 +00:00
|
|
|
"Move WORD at POINT to the next line. If there is not enough space on the
|
|
|
|
next line the word will not move."
|
2013-12-06 02:14:55 +00:00
|
|
|
(when etype-in-game
|
2013-12-26 01:21:10 +00:00
|
|
|
(setq inhibit-read-only t)
|
2013-12-29 18:38:24 +00:00
|
|
|
(when etype-completing-word
|
|
|
|
(goto-char etype-completing-word))
|
2013-12-07 12:18:26 +00:00
|
|
|
(let ((moving-word-at-point (string= word (current-word t)))
|
2013-12-06 02:14:55 +00:00
|
|
|
(search-string (buffer-substring-no-properties point (point))))
|
|
|
|
(save-excursion
|
2013-11-26 01:05:33 +00:00
|
|
|
(goto-char point)
|
2013-12-07 12:18:26 +00:00
|
|
|
(unless (looking-at word)
|
2013-12-26 00:39:23 +00:00
|
|
|
(goto-char (point-min))
|
2013-12-07 12:18:26 +00:00
|
|
|
(search-forward word etype-point-max)
|
|
|
|
(backward-word))
|
2013-12-15 16:55:53 +00:00
|
|
|
;; The point is now in front of the word that is to be moved.
|
2013-12-07 12:18:26 +00:00
|
|
|
(let ((point (point))
|
|
|
|
(timer (etype-search-timers word)))
|
2013-12-26 00:39:23 +00:00
|
|
|
(etype-next-line)
|
2013-12-15 16:55:53 +00:00
|
|
|
(let ((destination (etype-insert-word (point) word)))
|
2013-12-07 12:18:26 +00:00
|
|
|
(when destination
|
2013-12-15 16:55:53 +00:00
|
|
|
(etype-remove-word point word)
|
2013-12-07 12:18:26 +00:00
|
|
|
(setf (timer--args timer) (list destination word))))))
|
2013-12-15 16:55:53 +00:00
|
|
|
;; If we are moving the word at point the overlay must be moved and
|
|
|
|
;; the point needs to be updated.
|
2013-12-07 12:18:26 +00:00
|
|
|
(when moving-word-at-point
|
|
|
|
(search-forward-regexp (concat "\\<" search-string))
|
2013-12-29 18:38:24 +00:00
|
|
|
(setq etype-completing-word (point))
|
2013-12-06 02:14:55 +00:00
|
|
|
(save-excursion
|
|
|
|
(let ((point (point)))
|
2013-12-14 22:26:00 +00:00
|
|
|
(backward-word)
|
2013-12-26 01:21:10 +00:00
|
|
|
(move-overlay etype-overlay (point) point)))))
|
|
|
|
(setq inhibit-read-only nil)))
|
2013-11-26 01:05:33 +00:00
|
|
|
|
|
|
|
(defun etype-random ()
|
2013-12-26 00:39:23 +00:00
|
|
|
"Returns a random float between 1 and 10, depending on the
|
|
|
|
level."
|
|
|
|
(let* ((random (abs (random))))
|
2013-12-17 20:56:46 +00:00
|
|
|
(/ random (expt 10.0 (floor (log random 10))))))
|
2013-11-26 01:05:33 +00:00
|
|
|
|
2013-11-26 14:44:19 +00:00
|
|
|
(defun etype-get-word (&optional count)
|
2013-12-15 16:55:53 +00:00
|
|
|
"Tries to find a word in ETYPE-UNUSED-WORDS that has a
|
|
|
|
different capital letter from all words in
|
|
|
|
ETYPE-WORDS-IN-PLAY. It does not try very hard, and gives up
|
|
|
|
after checking 5 words - this is done to give a natural slow down
|
|
|
|
when there are a lot of words in play."
|
2013-11-26 01:05:33 +00:00
|
|
|
(let ((word (pop etype-unused-words)))
|
|
|
|
(if (null (member
|
|
|
|
(string-to-char word)
|
|
|
|
(mapcar 'string-to-char etype-words-in-play)))
|
|
|
|
word
|
|
|
|
(add-to-list 'etype-unused-words word t)
|
|
|
|
(unless (and count (> count 5))
|
|
|
|
(etype-get-word (if count (+ count 1) 1))))))
|
2013-11-25 12:29:08 +00:00
|
|
|
|
2013-12-26 00:39:23 +00:00
|
|
|
(defun etype-spawn-word (&optional recur)
|
2013-12-15 16:55:53 +00:00
|
|
|
"This function spawns a word in the game. It does this by
|
|
|
|
finding a word and inserting it where it fits. It also updates
|
|
|
|
the timer which is associated with this function, setting it to a
|
|
|
|
new random time."
|
2013-11-25 12:29:08 +00:00
|
|
|
(save-excursion
|
2013-11-26 01:05:33 +00:00
|
|
|
(when etype-in-game
|
2013-12-26 01:21:10 +00:00
|
|
|
(setq inhibit-read-only t)
|
2013-11-26 01:05:33 +00:00
|
|
|
(let* ((word (etype-get-word))
|
2013-12-15 16:55:53 +00:00
|
|
|
(point (random (- fill-column (length word))))
|
2013-12-26 00:39:23 +00:00
|
|
|
(random (etype-random)))
|
2013-12-15 16:55:53 +00:00
|
|
|
(when (and word (etype-insert-word point word))
|
|
|
|
(push word etype-words-in-play)
|
|
|
|
(push (run-at-time random random 'etype-move-word (point) word)
|
2013-12-26 00:39:23 +00:00
|
|
|
etype-timers)))
|
|
|
|
(when recur
|
|
|
|
(run-at-time (- 30 (* (etype-random) etype-level)) nil 'etype-spawn-word t)
|
|
|
|
(dotimes (i (+ (+ (random 10) etype-level)))
|
|
|
|
(run-at-time (- 30 (* (etype-random) etype-level))
|
2013-12-26 01:21:10 +00:00
|
|
|
nil 'etype-spawn-word)))
|
|
|
|
(setq inhibit-read-only nil))))
|
2013-11-25 12:29:08 +00:00
|
|
|
|
2013-12-11 02:02:23 +00:00
|
|
|
(defun etype-move-shooter (column)
|
2013-12-15 16:55:53 +00:00
|
|
|
"Moves the shooter to COLUMN."
|
2013-12-11 02:02:23 +00:00
|
|
|
(save-excursion
|
2013-12-26 00:39:23 +00:00
|
|
|
(goto-char (point-max))
|
|
|
|
(forward-line -1)
|
2013-12-11 02:02:23 +00:00
|
|
|
(delete-region (point-at-bol) (point-at-eol))
|
|
|
|
(insert (make-string (- fill-column 5) ?-))
|
|
|
|
(beginning-of-line)
|
|
|
|
(let* ((shooter " /.\\ ")
|
|
|
|
(len (length shooter)))
|
|
|
|
(cond ((and (> column 1) (< column (- fill-column (+ len 1))))
|
|
|
|
(forward-char (- column 2)))
|
2013-12-15 21:05:13 +00:00
|
|
|
((> column (- fill-column (+ len 2)))
|
2013-12-11 02:02:23 +00:00
|
|
|
(forward-char (- fill-column len))))
|
|
|
|
(insert shooter))))
|
|
|
|
|
|
|
|
(defun etype-shoot (&optional steps)
|
2013-12-15 16:55:53 +00:00
|
|
|
"Triggers the shooter to fire at a word. It calls itself
|
|
|
|
recursively until the bullet hits the word."
|
2013-12-26 01:21:10 +00:00
|
|
|
(setq inhibit-read-only t)
|
2013-12-15 21:05:13 +00:00
|
|
|
(unless (= 0 (current-column))
|
|
|
|
(let* ((bullet-dest (+ (- etype-point-max
|
|
|
|
(* (or steps 0) (+ fill-column 1)))
|
|
|
|
(current-column)))
|
|
|
|
(overlay (make-overlay bullet-dest (+ bullet-dest 1)))
|
|
|
|
(time (* 0.00005 (or steps 0))))
|
|
|
|
(etype-move-shooter (current-column))
|
|
|
|
(overlay-put overlay 'display "|")
|
|
|
|
(run-at-time (+ time 0.05) nil 'delete-overlay overlay)
|
|
|
|
(when (< (point) (- bullet-dest (+ fill-column 1)))
|
2013-12-26 01:21:10 +00:00
|
|
|
(run-at-time time nil 'etype-shoot (+ (or steps 0) 1)))))
|
|
|
|
(setq inhibit-read-only nil))
|
2013-12-11 02:02:23 +00:00
|
|
|
|
2013-11-25 12:29:08 +00:00
|
|
|
(defun etype-search-word (key-etyped)
|
2013-12-15 16:55:53 +00:00
|
|
|
"Searches the buffer for a word that begins with the typed
|
|
|
|
key. If a word is found a shot is fired at it, and a overlay is
|
|
|
|
created."
|
2013-11-25 12:29:08 +00:00
|
|
|
(setq etype-completing-word
|
2013-11-30 02:22:34 +00:00
|
|
|
(search-forward-regexp
|
|
|
|
(concat
|
2013-12-07 12:18:26 +00:00
|
|
|
"\\<" (single-key-description last-input-event))
|
|
|
|
etype-point-max t))
|
2013-11-26 01:05:33 +00:00
|
|
|
(when etype-completing-word
|
2013-12-26 01:21:10 +00:00
|
|
|
(setq inhibit-read-only t)
|
2013-12-11 02:02:23 +00:00
|
|
|
(etype-shoot)
|
2013-11-26 01:05:33 +00:00
|
|
|
(setq etype-overlay
|
|
|
|
(make-overlay (- etype-completing-word 1) etype-completing-word))
|
2013-12-26 01:21:10 +00:00
|
|
|
(overlay-put etype-overlay 'face '(:inherit isearch))
|
|
|
|
(setq inhibit-read-only nil)))
|
2013-11-25 12:29:08 +00:00
|
|
|
|
2013-12-07 12:18:26 +00:00
|
|
|
(defun etype-continue-word (key-typed)
|
2013-12-15 16:55:53 +00:00
|
|
|
"Moves the point forward if the typed key is the char in front of the
|
|
|
|
point. If the word is complete the word is cleared."
|
2013-12-29 18:38:24 +00:00
|
|
|
(goto-char etype-completing-word)
|
2013-12-11 02:02:23 +00:00
|
|
|
(when (looking-at key-typed) (forward-char)
|
2013-12-29 18:38:24 +00:00
|
|
|
(setq etype-completing-word (point))
|
2013-12-26 01:21:10 +00:00
|
|
|
(setq inhibit-read-only t)
|
2013-12-11 02:02:23 +00:00
|
|
|
(move-overlay etype-overlay (overlay-start etype-overlay) (point))
|
|
|
|
(etype-shoot)
|
|
|
|
(when (looking-at " ")
|
|
|
|
(etype-clear-word)
|
2013-12-26 01:21:10 +00:00
|
|
|
(setq etype-completing-word nil))
|
|
|
|
(setq inhibit-read-only nil)))
|
2013-11-25 12:29:08 +00:00
|
|
|
|
2013-12-17 20:56:46 +00:00
|
|
|
(defun etype-update-score (word)
|
|
|
|
"Updates the score."
|
|
|
|
(save-excursion
|
|
|
|
(incf etype-score (* (length word) etype-level))
|
|
|
|
(re-search-forward "Score: [0-9]+")
|
|
|
|
(replace-match (concat "Score: " (number-to-string etype-score)))))
|
|
|
|
|
|
|
|
(defun etype-update-level ()
|
|
|
|
"Updates the level."
|
|
|
|
(save-excursion
|
|
|
|
(re-search-forward "Level: [0-9]+")
|
|
|
|
(replace-match (concat "Level: " (number-to-string etype-level)))))
|
|
|
|
|
2013-11-26 01:05:33 +00:00
|
|
|
(defun etype-clear-word ()
|
2013-12-15 16:55:53 +00:00
|
|
|
"Removes a word from the game, and updating score."
|
2013-12-26 01:21:10 +00:00
|
|
|
(setq inhibit-read-only t)
|
2013-12-07 12:18:26 +00:00
|
|
|
(let* ((word (current-word t))
|
2013-12-15 16:55:53 +00:00
|
|
|
(timer (etype-search-timers (current-word t))))
|
|
|
|
(cancel-timer timer)
|
|
|
|
(setq etype-timers (remove timer etype-timers))
|
|
|
|
(delete-overlay etype-overlay)
|
|
|
|
(etype-move-shooter (/ fill-column 2))
|
2013-12-07 12:18:26 +00:00
|
|
|
(backward-word)
|
2013-12-15 16:55:53 +00:00
|
|
|
(etype-remove-word (point) word)
|
2013-11-30 02:22:34 +00:00
|
|
|
(setq etype-words-in-play
|
|
|
|
(remove word etype-words-in-play))
|
2013-11-26 01:05:33 +00:00
|
|
|
(add-to-list 'etype-unused-words word t)
|
2013-12-17 20:56:46 +00:00
|
|
|
(etype-update-score word)
|
2013-12-26 01:21:10 +00:00
|
|
|
(goto-char (point-min)))
|
|
|
|
(setq inhibit-read-only nil))
|
2013-11-26 01:05:33 +00:00
|
|
|
|
2013-11-25 12:29:08 +00:00
|
|
|
(defun etype-catch-input ()
|
2013-12-15 16:55:53 +00:00
|
|
|
"'self-insert-command' is remapped to this function. Instead of
|
|
|
|
inserting the typed key, it triggers a shot."
|
2013-11-25 12:29:08 +00:00
|
|
|
(interactive)
|
2013-12-11 02:02:23 +00:00
|
|
|
(let ((key-typed (single-key-description last-input-event)))
|
2013-11-25 12:29:08 +00:00
|
|
|
(if etype-completing-word
|
2013-12-11 02:02:23 +00:00
|
|
|
(etype-continue-word key-typed)
|
|
|
|
(etype-search-word key-typed))))
|
2013-11-25 12:29:08 +00:00
|
|
|
|
|
|
|
(defun etype ()
|
2013-12-15 16:55:53 +00:00
|
|
|
"Starts a game of Etype."
|
2013-11-25 12:29:08 +00:00
|
|
|
(interactive)
|
|
|
|
(switch-to-buffer "Etype")
|
|
|
|
(etype-mode)
|
|
|
|
(init-game)
|
2013-12-26 00:39:23 +00:00
|
|
|
(run-at-time 0 nil 'etype-spawn-word t)
|
|
|
|
(dotimes (i 10)
|
|
|
|
(run-at-time (random 10) nil 'etype-spawn-word)))
|
2013-11-25 12:29:08 +00:00
|
|
|
|
|
|
|
(defun etype-cleanup ()
|
2013-12-15 16:55:53 +00:00
|
|
|
"Cancels all etype-timers."
|
2013-11-25 12:29:08 +00:00
|
|
|
(mapc 'cancel-timer etype-timers))
|
|
|
|
|
|
|
|
(define-derived-mode etype-mode nil "Etype"
|
|
|
|
"A mode for playing Etype."
|
2013-11-26 01:05:33 +00:00
|
|
|
(make-local-variable 'etype-score)
|
2013-11-25 12:29:08 +00:00
|
|
|
(make-local-variable 'etype-timers)
|
2013-11-26 01:05:33 +00:00
|
|
|
(make-local-variable 'etype-overlay)
|
2013-11-25 12:29:08 +00:00
|
|
|
(make-local-variable 'etype-in-game)
|
2013-12-07 12:18:26 +00:00
|
|
|
(make-local-variable 'etype-point-max)
|
2013-11-26 14:44:19 +00:00
|
|
|
(make-local-variable 'etype-unused-words)
|
|
|
|
(make-local-variable 'etype-words-in-play)
|
2013-11-25 12:29:08 +00:00
|
|
|
(make-local-variable 'etype-completing-word)
|
2013-12-17 20:56:46 +00:00
|
|
|
(make-local-variable 'etype-level)
|
|
|
|
|
2013-11-30 02:22:34 +00:00
|
|
|
(define-key (current-local-map)
|
|
|
|
[remap self-insert-command] 'etype-catch-input)
|
2013-12-17 20:56:46 +00:00
|
|
|
|
|
|
|
(local-set-key (kbd "<up>") 'etype-increase-level)
|
|
|
|
(local-set-key (kbd "<down>") 'etype-decrease-level)
|
|
|
|
|
2013-11-25 12:29:08 +00:00
|
|
|
(add-hook 'kill-buffer-hook 'etype-cleanup))
|