branch: externals/sokoban commit f52e1bf91f425c72eb6999e47921213c8733f881 Author: Syohei YOSHIDA <syo...@gmail.com> Commit: Leo Liu <sdl....@gmail.com>
* sokoban.el (sokoban-init-level-data): Compatibility fix. --- sokoban.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sokoban.el b/sokoban.el index 3a90cef..3c63ca0 100644 --- a/sokoban.el +++ b/sokoban.el @@ -428,7 +428,9 @@ static char * player_xpm[] = { (defun sokoban-init-level-data () (setq sokoban-level-data nil) (with-current-buffer (find-file-noselect sokoban-level-file) - (read-only-mode 1) + (if (fboundp 'read-only-mode) + (read-only-mode 1) + (setq buffer-read-only t)) (goto-char (point-min)) (re-search-forward sokoban-level-regexp nil t) (forward-char)