# HG changeset patch # User Lute Kamstra # Date 1117121169 0 # Node ID 93e71f3dcd146c1785197fb077bea79bd6c8aaa3 # Parent a1fa16a75bde950ccda0b175390fffd6ba17068e * play/5x5.el (5x5-mode): * play/decipher.el (decipher-mode, decipher-stats-mode): * play/gomoku.el (gomoku-mode): * play/snake.el (snake-mode): * play/solitaire.el (solitaire-mode): * play/tetris.el (tetris-mode): Use run-mode-hooks. * play/landmark.el (lm-mode): * play/mpuz.el (mpuz-mode): Use kill-all-local-variables and run-mode-hooks. diff -r a1fa16a75bde -r 93e71f3dcd14 lisp/play/5x5.el --- a/lisp/play/5x5.el Thu May 26 15:24:51 2005 +0000 +++ b/lisp/play/5x5.el Thu May 26 15:26:09 2005 +0000 @@ -178,10 +178,10 @@ (use-local-map 5x5-mode-map) (setq major-mode '5x5-mode mode-name "5x5") - (run-hooks '5x5-mode-hook) + (run-mode-hooks '5x5-mode-hook) (setq buffer-read-only t truncate-lines t) - (buffer-disable-undo (current-buffer))) + (buffer-disable-undo)) ;;;###autoload (defun 5x5 (&optional size) diff -r a1fa16a75bde -r 93e71f3dcd14 lisp/play/decipher.el --- a/lisp/play/decipher.el Thu May 26 15:24:51 2005 +0000 +++ b/lisp/play/decipher.el Thu May 26 15:26:09 2005 +0000 @@ -314,7 +314,7 @@ (lambda () (setq buffer-read-only nil buffer-undo-list nil)) nil t) - (run-hooks 'decipher-mode-hook) + (run-mode-hooks 'decipher-mode-hook) (setq buffer-read-only t)) (put 'decipher-mode 'mode-class 'special) @@ -998,7 +998,7 @@ major-mode 'decipher-stats-mode mode-name "Decipher-Stats") (use-local-map decipher-stats-mode-map) - (run-hooks 'decipher-stats-mode-hook)) + (run-mode-hooks 'decipher-stats-mode-hook)) (put 'decipher-stats-mode 'mode-class 'special) ;;-------------------------------------------------------------------- diff -r a1fa16a75bde -r 93e71f3dcd14 lisp/play/gomoku.el --- a/lisp/play/gomoku.el Thu May 26 15:24:51 2005 +0000 +++ b/lisp/play/gomoku.el Thu May 26 15:26:09 2005 +0000 @@ -206,7 +206,7 @@ (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(gomoku-font-lock-keywords t)) (toggle-read-only t) - (run-hooks 'gomoku-mode-hook)) + (run-mode-hooks 'gomoku-mode-hook)) ;;; ;;; THE BOARD. diff -r a1fa16a75bde -r 93e71f3dcd14 lisp/play/landmark.el --- a/lisp/play/landmark.el Thu May 26 15:24:51 2005 +0000 +++ b/lisp/play/landmark.el Thu May 26 15:26:09 2005 +0000 @@ -248,6 +248,7 @@ Entry to this mode calls the value of `lm-mode-hook' if that value is non-nil. One interesting value is `turn-on-font-lock'." (interactive) + (kill-all-local-variables) (setq major-mode 'lm-mode mode-name "Lm") (lm-display-statistics) @@ -255,7 +256,7 @@ (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(lm-font-lock-keywords t)) (toggle-read-only t) - (run-hooks 'lm-mode-hook)) + (run-mode-hooks 'lm-mode-hook)) ;;;_ + THE SCORE TABLE. diff -r a1fa16a75bde -r 93e71f3dcd14 lisp/play/mpuz.el --- a/lisp/play/mpuz.el Thu May 26 15:24:51 2005 +0000 +++ b/lisp/play/mpuz.el Thu May 26 15:26:09 2005 +0000 @@ -129,11 +129,12 @@ Then you may resume the game with M-x mpuz. You may abort a game by typing \\\\[mpuz-offer-abort]." (interactive) + (kill-all-local-variables) (setq major-mode 'mpuz-mode mode-name "Mult Puzzle" tab-width 30) (use-local-map mpuz-mode-map) - (run-hooks 'mpuz-mode-hook)) + (run-mode-hooks 'mpuz-mode-hook)) ;; Some variables for statistics diff -r a1fa16a75bde -r 93e71f3dcd14 lisp/play/snake.el --- a/lisp/play/snake.el Thu May 26 15:24:51 2005 +0000 +++ b/lisp/play/snake.el Thu May 26 15:26:09 2005 +0000 @@ -385,7 +385,7 @@ (gamegrid-init (snake-display-options)) - (run-hooks 'snake-mode-hook)) + (run-mode-hooks 'snake-mode-hook)) ;;;###autoload (defun snake () diff -r a1fa16a75bde -r 93e71f3dcd14 lisp/play/solitaire.el --- a/lisp/play/solitaire.el Thu May 26 15:24:51 2005 +0000 +++ b/lisp/play/solitaire.el Thu May 26 15:26:09 2005 +0000 @@ -105,7 +105,7 @@ (setq truncate-lines t) (setq major-mode 'solitaire-mode) (setq mode-name "Solitaire") - (run-hooks 'solitaire-mode-hook)) + (run-mode-hooks 'solitaire-mode-hook)) (defvar solitaire-stones 0 "Counter for the stones that are still there.") diff -r a1fa16a75bde -r 93e71f3dcd14 lisp/play/tetris.el --- a/lisp/play/tetris.el Thu May 26 15:24:51 2005 +0000 +++ b/lisp/play/tetris.el Thu May 26 15:26:09 2005 +0000 @@ -616,7 +616,7 @@ (gamegrid-init (tetris-display-options)) - (run-hooks 'tetris-mode-hook)) + (run-mode-hooks 'tetris-mode-hook)) ;;;###autoload (defun tetris ()