summaryrefslogtreecommitdiff
path: root/lisp/play/hanoi.el
Commit message (Collapse)AuthorAge
* Abolish max-specpdl-size (bug#57911)Mattias Engdegård2022-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The max-lisp-eval-depth limit is sufficient to prevent unbounded stack growth including the specbind stack; simplify matters for the user by not having them to worry about two different limits. This change turns max-specpdl-size into a harmless variable with no effects, to keep existing code happy. * lisp/subr.el (max-specpdl-size): Define as an ordinary (but obsolete) dynamic variable. * admin/grammars/Makefile.in: * doc/lispintro/emacs-lisp-intro.texi (Loops & Recursion): * doc/lispref/control.texi (Cleanups): * doc/lispref/edebug.texi (Checking Whether to Stop): * doc/lispref/eval.texi (Eval): * doc/lispref/variables.texi (Local Variables): * doc/misc/calc.texi (Recursion Depth): Update documentation. * etc/NEWS: Announce. * src/eval.c (FletX): Use safe iteration to guard against circular bindings list. (syms_of_eval): Remove old max-specpdl-size definition. (init_eval_once, restore_stack_limits, call_debugger) (signal_or_quit, grow_specpdl_allocation): * leim/Makefile.in: * lisp/Makefile.in: * lisp/calc/calc-stuff.el (calc-more-recursion-depth) (calc-less-recursion-depth): * lisp/calc/calc.el (calc-do): * lisp/cedet/semantic/ede-grammar.el (ede-proj-makefile-insert-rules): * lisp/cedet/semantic/grammar.el (semantic-grammar-batch-build-one-package): * lisp/cus-start.el (standard): * lisp/emacs-lisp/comp.el (comp--native-compile): * lisp/emacs-lisp/edebug.el (edebug-max-depth): (edebug-read-and-maybe-wrap-form, edebug-default-enter): * lisp/emacs-lisp/regexp-opt.el (regexp-opt): * lisp/eshell/esh-mode.el (eshell-mode): * lisp/loadup.el (max-specpdl-size): * lisp/mh-e/mh-e.el (mh-invisible-headers): * lisp/net/shr.el (shr-insert-document, shr-descend): * lisp/play/hanoi.el (hanoi-internal): * lisp/progmodes/cperl-mode.el: * src/fileio.c (Fdo_auto_save): Remove references to and modifications of max-specpdl-size.
* Fix year-285428751 bug in hanoi-unix-64Paul Eggert2022-08-01
| | | | | | * lisp/play/hanoi.el (hanoi-move-period, hanoi, hanoi-unix) (hanoi-unix-64): Use integers, not floating point, to avoid rounding errors for timestamps greater than 2**53.
* ; More minor stylistic fixes found by checkdocStefan Kangas2021-09-22
|
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-09-16
|
* Use lexical-binding in almost all of play/*.elStefan Kangas2021-02-10
| | | | | | | | | | | | | | | | | | | | | * lisp/play/5x5.el: Use lexical-binding. (5x5-draw-grid-end, 5x5-draw-grid, 5x5-solver) (5x5-solve-suggest): Silence byte-compiler. * lisp/play/cookie1.el: Use lexical-binding. (cookie-shuffle-vector, cookie-apropos): Silence byte-compiler. * lisp/play/zone.el: Use lexical-binding. (zone): Convert lambda to proper lexical closure. (zone-replace-char, zone-fill-out-screen): Silence byte-compiler. * lisp/play/blackbox.el: * lisp/play/doctor.el: * lisp/play/gametree.el: * lisp/play/hanoi.el: Use lexical-binding. * test/lisp/play/cookie1-resources/cookies: * test/lisp/play/cookie1-tests.el: New files.
* Remove redundant :group args in play/*.elStefan Kangas2021-02-02
| | | | | | | | | | * lisp/play/bubbles.el: * lisp/play/cookie1.el: * lisp/play/decipher.el: * lisp/play/dunnet.el: * lisp/play/gametree.el: * lisp/play/gomoku.el: * lisp/play/hanoi.el: Remove redundant :group args.
* Go back to "Maintainer: emacs-devel@gnu.org"Paul Eggert2019-05-25
| | | | | | Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is no special maintainer for a file. Although this wasn't documented it was common practice and removing the lines didn't have consensus.
* Fixes for "Maintainer:" and related linesPaul Eggert2019-05-19
| | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* Avoid some double-rounding of Lisp timestampsPaul Eggert2019-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, simplify some time-related Lisp timestamp code while we’re in the neighborhood. * lisp/battery.el (battery-linux-proc-acpi) (battery-linux-sysfs, battery-upower, battery-bsd-apm): * lisp/calendar/timeclock.el (timeclock-seconds-to-string) (timeclock-log, timeclock-last-period) (timeclock-entry-length, timeclock-entry-list-span) (timeclock-find-discrep, timeclock-generate-report): * lisp/cedet/ede/detect.el (ede-detect-qtest): * lisp/completion.el (cmpl-hours-since-origin): * lisp/ecomplete.el (ecomplete-decay-1): * lisp/emacs-lisp/ert.el (ert--results-update-stats-display) (ert--results-update-stats-display-maybe): * lisp/emacs-lisp/timer-list.el (list-timers): * lisp/emacs-lisp/timer.el (timer-until) (timer-event-handler): * lisp/erc/erc-backend.el (erc-server-send-ping) (erc-server-send-queue, erc-handle-parsed-server-response) (erc-handle-unknown-server-response): * lisp/erc/erc-track.el (erc-buffer-visible): * lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p) (erc-cmd-PING, erc-send-current-line): * lisp/eshell/em-pred.el (eshell-pred-file-time): * lisp/eshell/em-unix.el (eshell-show-elapsed-time): * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event:org-timestamp): * lisp/gnus/gnus-int.el (gnus-backend-trace): * lisp/gnus/gnus-sum.el (gnus-user-date): * lisp/gnus/mail-source.el (mail-source-delete-crash-box): * lisp/gnus/nnmaildir.el (nnmaildir--scan): * lisp/ibuf-ext.el (ibuffer-mark-old-buffers): * lisp/gnus/nnmaildir.el (nnmaildir--scan): * lisp/mouse.el (mouse--down-1-maybe-follows-link) (mouse--click-1-maybe-follows-link): * lisp/mpc.el (mpc--faster-toggle): * lisp/net/rcirc.el (rcirc-handler-ctcp-KEEPALIVE) (rcirc-sentinel): * lisp/net/tramp-cache.el (tramp-get-file-property): * lisp/net/tramp-sh.el (tramp-sh-handle-file-newer-than-file-p) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): * lisp/org/org-clock.el (org-clock-resolve): (org-resolve-clocks, org-clock-in, org-clock-out, org-clock-sum): * lisp/org/org-timer.el (org-timer-start) (org-timer-pause-or-continue, org-timer-seconds): * lisp/org/org.el (org-evaluate-time-range): * lisp/org/ox-publish.el (org-publish-cache-ctime-of-src): * lisp/pixel-scroll.el (pixel-scroll-in-rush-p): * lisp/play/hanoi.el (hanoi-move-ring): * lisp/proced.el (proced-format-time): * lisp/progmodes/cpp.el (cpp-progress-message): * lisp/progmodes/flymake.el (flymake--handle-report): * lisp/progmodes/js.el (js--wait-for-matching-output): * lisp/subr.el (progress-reporter-do-update): * lisp/term/xterm.el (xterm--read-event-for-query): * lisp/time.el (display-time-update, emacs-uptime): * lisp/tooltip.el (tooltip-delay): * lisp/url/url-cookie.el (url-cookie-parse-file-netscape): * lisp/url/url-queue.el (url-queue-prune-old-entries): * lisp/url/url.el (url-retrieve-synchronously): * lisp/xt-mouse.el (xterm-mouse-event): Avoid double-rounding of time-related values. Simplify. * lisp/calendar/icalendar.el (icalendar--decode-isodatetime): When hoping for the best (unlikely), use a better decoded time. (icalendar--convert-sexp-to-ical): Avoid unnecessary encode-time. * lisp/calendar/timeclock.el (timeclock-when-to-leave): * lisp/cedet/ede/detect.el (ede-detect-qtest): * lisp/desktop.el (desktop-create-buffer): * lisp/emacs-lisp/benchmark.el (benchmark-elapse): * lisp/gnus/gnus-art.el (article-lapsed-string): * lisp/gnus/gnus-group.el (gnus-group-timestamp-delta): * lisp/gnus/nnmail.el (nnmail-expired-article-p): * lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles): * lisp/nxml/rng-maint.el (rng-time-function): * lisp/org/org-clock.el (org-clock-get-clocked-time) (org-clock-resolve, org-resolve-clocks, org-resolve-clocks-if-idle): * lisp/org/org-habit.el (org-habit-insert-consistency-graphs): * lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info) (vhdl-fix-case-region-1): Use time-since instead of open-coding most of it. * lisp/erc/erc-dcc.el (erc-dcc-get-sentinel): * lisp/erc/erc.el (erc-string-to-emacs-time, erc-time-gt): Now obsolete. All uses changed. (erc-time-diff): Accept all Lisp time values. All uses changed. * lisp/gnus/gnus-demon.el (gnus-demon-idle-since): * lisp/gnus/gnus-score.el (gnus-score-headers): * lisp/gnus/nneething.el (nneething-make-head): * lisp/gnus/nnheader.el (nnheader-message-maybe): * lisp/gnus/nnimap.el (nnimap-keepalive): * lisp/image.el (image-animate-timeout): * lisp/mail/feedmail.el (feedmail-rfc822-date): * lisp/net/imap.el (imap-wait-for-tag): * lisp/net/newst-backend.el (newsticker--image-get): * lisp/net/rcirc.el (rcirc-handler-317, rcirc-handler-333): * lisp/obsolete/xesam.el (xesam-refresh-entry): * lisp/org/org-agenda.el (org-agenda-show-clocking-issues) (org-agenda-check-clock-gap, org-agenda-to-appt): * lisp/org/org-capture.el (org-capture-set-target-location): * lisp/org/org-clock.el (org-clock-resolve-clock) (org-clocktable-steps): * lisp/org/org-colview.el (org-columns-edit-value) (org-columns, org-agenda-columns): * lisp/org/org-duration.el (org-duration-from-minutes): * lisp/org/org-element.el (org-element-cache-sync-duration) (org-element-cache-sync-break) (org-element--cache-interrupt-p, org-element--cache-sync): * lisp/org/org-habit.el (org-habit-get-faces) * lisp/org/org-indent.el (org-indent-add-properties): * lisp/org/org-table.el (org-table-sum): * lisp/org/org-timer.el (org-timer-show-remaining-time) (org-timer-set-timer): * lisp/org/org.el (org-babel-load-file, org-today) (org-auto-repeat-maybe, org-2ft, org-time-stamp) (org-read-date-analyze, org-time-stamp-to-now) (org-small-year-to-year, org-goto-calendar): * lisp/org/ox.el (org-export-insert-default-template): * lisp/ses.el (ses--time-check): * lisp/type-break.el (type-break-time-warning) (type-break-statistics, type-break-demo-boring): * lisp/url/url-cache.el (url-cache-expired) (url-cache-prune-cache): * lisp/vc/vc-git.el (vc-git-stash-snapshot): * lisp/erc/erc-match.el (erc-log-matches-come-back): Simplify.
* cl-lib.el: Partial revert of "2015-04-05 Rationalize c[ad]+r"Stefan Monnier2015-04-10
| | | | | | * lisp/emacs-lisp/cl-lib.el: Partial revert of "2015-04-05 Rationalize use of c[ad]+r", so as to keep the "cl-" prefix on all cl-lib definitions.
* Rationalize use of c[ad]+r, expunging cl-c[ad]\{3,4\}r.Alan Mackenzie2015-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also expunge eudc-c[ad]+r. * subr.el (internal--compiler-macro-cXXr): "New" function, copied from cl--compiler-macro-cXXr. (caar, cadr, cdar, cddr): Change from defsubsts to defuns with the above compiler-macro. * net/eudc.el (eudc-cadr, eudc-cdar, eudc-caar, eudc-cdaar): Remove. * emacs-lisp/cl.el (Top level dolist doing defaliases): Remove caaar, etc., from list of new alias functions. * emacs-lisp/cl-lib.el (cl-caaar, etc): Rename to caaar, etc. (gen-cXXr--rawname, gen-cXXr-all-cl-aliases): New function/macro which generate obsolete cl- aliases for caaar, etc. Invoke them. * desktop.el: * edmacro.el: * emacs-lisp/cl-macs.el: * frameset.el: * ibuffer.el: * mail/footnote.el: * net/dbus.el: * net/eudc-export.el: * net/eudc.el: * net/eudcb-ph.el: * net/rcirc.el: * net/secrets.el: * play/5x5.el: * play/decipher.el: * play/hanoi.el: * progmodes/hideif.el: * ses.el: Replace cl-caaar, eudc-cadr, etc. with caaar and cadr, etc.
* Replace "Maintainer: FSF" with the emacs-devel mailing addressGlenn Morris2014-02-09
|
* More CL cleanups and reduction of use of cl.el.Stefan Monnier2012-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * woman.el, winner.el, vc/vc-rcs.el, vc/vc-hooks.el, vc/vc-hg.el: * vc/vc-git.el, vc/vc-dir.el, vc/vc-bzr.el, vc/vc-annotate.el: * textmodes/tex-mode.el, textmodes/sgml-mode.el, tar-mode.el: * strokes.el, ses.el, server.el, progmodes/js.el, progmodes/gdb-mi.el: * progmodes/flymake.el, progmodes/ebrowse.el, progmodes/compile.el: * play/tetris.el, play/snake.el, play/pong.el, play/landmark.el: * play/hanoi.el, play/decipher.el, play/5x5.el, nxml/nxml-mode.el: * net/secrets.el, net/quickurl.el, midnight.el, mail/footnote.el: * image-dired.el, ibuffer.el, ibuf-macs.el, ibuf-ext.el, hexl.el: * eshell/eshell.el, eshell/esh-io.el, eshell/esh-ext.el: * eshell/esh-cmd.el, eshell/em-ls.el, eshell/em-hist.el: * eshell/em-cmpl.el, eshell/em-banner.el: * url/url.el, url/url-queue.el, url/url-parse.el, url/url-http.el: * url/url-future.el, url/url-dav.el, url/url-cookie.el: * calendar/parse-time.el, test/eshell.el: Use cl-lib. * wid-browse.el, wdired.el, vc/vc.el, vc/vc-mtn.el, vc/vc-cvs.el: * vc/vc-arch.el, tree-widget.el, textmodes/texinfo.el: * textmodes/refill.el, textmodes/css-mode.el, term/tvi970.el: * term/ns-win.el, term.el, shell.el, ps-samp.el: * progmodes/perl-mode.el, progmodes/pascal.el, progmodes/gud.el: * progmodes/glasses.el, progmodes/etags.el, progmodes/cwarn.el: * play/gamegrid.el, play/bubbles.el, novice.el, notifications.el: * net/zeroconf.el, net/xesam.el, net/snmp-mode.el, net/mairix.el: * net/ldap.el, net/eudc.el, net/browse-url.el, man.el: * mail/mailheader.el, mail/feedmail.el: * url/url-util.el, url/url-privacy.el, url/url-nfs.el, url/url-misc.el: * url/url-methods.el, url/url-gw.el, url/url-file.el, url/url-expand.el: Dont use CL. * ibuf-ext.el (ibuffer-mark-old-buffers): Use float-time. * eshell/esh-opt.el (eshell-eval-using-options): Quote code with `lambda' rather than with `quote'. (eshell-do-opt): Adjust accordingly. (eshell-process-option): Simplify. * eshell/esh-var.el: * eshell/em-script.el: Require `esh-opt' for eshell-eval-using-options. * emacs-pcase.el (pcase--dontcare-upats, pcase--let*) (pcase--expand, pcase--u1): Rename pcase's internal `dontcare' pattern to `pcase--dontcare'. * emacs-cl.el (labels): Mark obsolete. (cl--letf, letf): Move to cl-lib. (cl--letf*, letf*): Remove. * emacs-cl-lib.el (cl-nth-value): Use defalias. * emacs-cl-macs.el (cl-dolist, cl-dotimes): Add indent rule. (cl-progv): Rewrite. (cl--letf, cl-letf): Move from cl.el. (cl-letf*): New macro. * emacs-cl-extra.el (cl--progv-before, cl--progv-after): Remove.
* * play/hanoi.el (hanoi-current-time-float): Remove.Paul Eggert2011-06-30
| | | | All uses replaced by float-time.
* lisp/play/*.el: Lexical-binding cleanup.Juanma Barranquero2011-04-21
|
* Nuke arch-tags.Glenn Morris2011-01-15
|
* Reword header to fool copyright-update-year.Glenn Morris2009-09-04
| | | | Remove leading * from defcustom and defface docs.
* Fix up comment convention on the arch-tag lines.Stefan Monnier2008-04-10
|
* (hanoi-internal): Set `show-trailing-whitespace' to nil.Juanma Barranquero2008-02-21
|
* (hanoi-unix-64): Fix typo in docstring.Juanma Barranquero2006-11-06
|
* * subr.el (sit-for): New function.Chong Yidong2006-07-10
| | | | * play/hanoi.el (hanoi-sit-for): Check sit-for return value.
* Add arch taglinesMiles Bader2003-09-01
|
* Trailing whitepace deleted.Juanma Barranquero2003-02-04
|
* Some fixes to follow coding conventions in files maintained by FSF.Pavel Janík2001-07-15
|
* (hanoi-internal): Don't use oddp.Dave Love2000-03-11
|
* Declare dynamic vars.Dave Love1999-08-19
|
* Mostly rewritten. Customized. To support an s2GKarl Heuer1999-08-14
| | | | | | | | | | | | | | | | | | | doomsday clock, speed control is added and changes are made to allow large numbers of rings: rings now show the whole ring number, not just the last digit; consecutive rings are allowed to be the same size when necessary to fit all the rings in the window; and poles can be oriented horizontally. Face support is thrown in gratuitously. (hanoi): Changed default number of rings back to 3. (hanoi-unix, hanoi-unix-64): New commands (hanoi-horizontal-flag, hanoi-move-period, hanoi-use-faces, hanoi-pole-face, hanoi-base-face, hanoi-even-ring-face, hanoi-odd-ring-face): New variables. (hanoi-internal, hanoi-current-time-float, hanoi-put-face, hanoi-n, hanoi-insert-ring, hanoi-goto-char, hanoi-sit-for, hanoi-ring-to-pos, hanoi-pos-on-tower-p): New functions. (hanoi-0): Renamed from hanoi0, for symmetry with hanoi-n. (hanoi-topos, hanoi-draw-ring): Removed.
* (hanoi): Don't show line and column numbers.Karl Heuer1996-02-16
| | | | | | | Compute height and width of the window in the correct way, give the correct error message if the window is too small. Make rings only with numerical characters. Set default number of rings to 7 (was 3 before).
* (hanoi): Don't show line and column numbers.Karl Heuer1996-02-14
|
* (hanoi): Use force-mode-line-update.Karl Heuer1995-04-25
|
* Add (provide 'hanoi).Roland McGrath1993-07-08
|
* Apply typo patches from Paul Eggert.Jim Blandy1993-06-09
|
* Added or corrected Commentary sectionsEric S. Raymond1993-03-22
|
* Tue Dec 1 22:34:42 1992 Jim Blandy (jimb@totoro.cs.oberlin.edu)Jim Blandy1992-12-06
| | | | | | * hanoi.el (hanoi): If pole-spacing is odd, round down, not up. To see if the window is wide enough, just check if one half of a ring will fit inside pole-spacing.
* entered into RCSEric S. Raymond1992-07-22
|
* *** empty log message ***Eric S. Raymond1992-07-16
|
* *** empty log message ***Richard M. Stallman1992-05-31
|
* *** empty log message ***Eric S. Raymond1992-05-30
|
* *** empty log message ***Jim Blandy1991-05-09
|
* Initial revisionJoseph Arceneaux1990-03-06