From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: [PATCH] elpa/packages/sokoban/sokoban.el
Date: Tue, 25 Jul 2017 10:24:30 -0400 [thread overview]
Message-ID: <jwvo9s8ob04.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 87tw20hhp1.fsf@deyke2
> + (with-temp-buffer
> + (insert-file-contents sokoban-level-file)
> + (goto-char (point-min))
> + (if (looking-at "<\\?xml version=")
> + (let ((n 0) (tree (xml-parse-region)))
> + (erase-buffer)
> + (dolist (SokobanLevels tree)
> + (dolist (LevelCollection (xml-get-children SokobanLevels 'LevelCollection))
> + (dolist (Level (xml-get-children LevelCollection 'Level))
> + (incf n)
> + (insert (format ";LEVEL %d\n" n))
> + (dolist (L (xml-get-children Level 'L))
> + (insert (car (xml-node-children L)))
> + (insert "\n")))))))
Why not put this code in its own function?
> @@ -884,8 +896,8 @@ sokoban-mode keybindings:
> '("Sokoban Commands"
> ["Restart this level" sokoban-restart-level]
> ["Start new game" sokoban-start-game]
> - ["Go to specific level" sokoban-goto-level])))
> -
> + ["Go to specific level" sokoban-goto-level]
> + ["Fit frame to buffer" fit-frame-to-buffer])))
I doubt the current sokoban.el works in XEmacs, so I'd get rid of the
XEmacs-specific code.
Other than that, looks very good,
Stefan
next prev parent reply other threads:[~2017-07-25 14:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 11:36 [PATCH] elpa/packages/sokoban/sokoban.el Dieter Deyke
2017-07-25 14:24 ` Stefan Monnier [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-02-12 12:30 Dieter Deyke
2019-02-07 10:51 Dieter Deyke
2019-02-07 12:53 ` Clément Pit-Claudel
2019-02-07 14:42 ` Eli Zaretskii
2019-02-07 15:57 ` Dieter Deyke
2019-02-07 16:08 ` Clément Pit-Claudel
2019-02-07 16:11 ` Dieter Deyke
2019-02-07 16:55 ` Andreas Schwab
2019-02-08 3:34 ` Stefan Monnier
2019-02-07 14:56 ` Stefan Monnier
2017-07-16 14:14 Dieter Deyke
2017-07-16 16:01 ` Stefan Monnier
2017-07-16 16:57 ` Dieter Deyke
2017-07-09 13:36 Dieter Deyke
2017-07-09 14:15 ` Eli Zaretskii
2017-07-09 14:34 ` Dieter Deyke
2017-07-09 14:52 ` Eli Zaretskii
2017-07-11 15:17 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvo9s8ob04.fsf-monnier+gmane.emacs.devel@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.