[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 35571e3 287/357: [gnugo int] Use private obarray
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 35571e3 287/357: [gnugo int] Use private obarray for :all-yy elems, display props. |
Date: |
Sun, 29 Nov 2020 14:51:41 -0500 (EST) |
branch: externals/gnugo
commit 35571e3a9611b2336f7b348196f036f9eb0e1b80
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo int] Use private obarray for :all-yy elems, display props.
* packages/gnugo/gnugo.el (gnugo-put): Update :all-yy blurb.
(gnugo-f): Rewrite.
(gnugo-cleanup): Don't bother w/ symbol cleanup.
(gnugo-board-mode): Init :obarray.
---
gnugo.el | 24 +++++++-----------------
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index e32f18a..e67c29c 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -275,7 +275,7 @@ you may never really understand to any degree of personal
satisfaction\".
`gnugo-toggle-image-display' and `gnugo-refresh',
as well as gnugo-xpms.el (available elsewhere)
- :all-yy -- list of 46 keywords used as the `category' text property
+ :all-yy -- list of 46 symbols used as the `category' text property
(so that their plists, typically w/ property `display' or
`do-not-display') are consulted by the Emacs display engine;
46 = 9 places * (4 moku + 1 empty) + 1 hoshi; see functions
@@ -505,8 +505,11 @@ when you are sure the command cannot fail."
(1- letter)))
?A)))))
-(defun gnugo-f (frag)
- (intern (format ":gnugo-%s%s-props" (gnugo-get :diamond) frag)))
+(defun gnugo-f (id)
+ (intern (if (symbolp id)
+ (symbol-name id)
+ id)
+ (gnugo-get :obarray)))
(defun gnugo-yang (c)
(cdr (assq c '((?+ . hoshi)
@@ -1744,20 +1747,6 @@ its move."
(when (gnugo-board-buffer-p)
(unless (zerop (buffer-size))
(message "Thank you for playing GNU Go."))
- (mapc (lambda (sym)
- (setplist sym nil) ; "...is next to fordliness." --Huxley
- ;; Sigh, "2nd arg optional" obsolete as of Emacs 23.3.
- ;; No worries, things will be Much Better w/ structs, RSN...
- (unintern sym nil))
- (append (gnugo-get :all-yy)
- (mapcar 'gnugo-f
- '(anim
- tpad
- gpad
- gspc
- lpad
- rpad
- ispc))))
(setq gnugo-state nil)))
(defun gnugo-position ()
@@ -2544,6 +2533,7 @@ In this mode, keys do not self insert.
(overlay-put ov 'display ")")
ov)))
(gnugo-put :mul '(1 . 1))
+ (gnugo-put :obarray (make-vector 31 nil))
(add-to-invisibility-spec :nogrid))
;;;---------------------------------------------------------------------------
- [elpa] externals/gnugo 21e1d9a 303/357: [gnugo int] Expose function to byte-compiler., (continued)
- [elpa] externals/gnugo 21e1d9a 303/357: [gnugo int] Expose function to byte-compiler., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 0469947 322/357: [gnugo slog] Prefer Cursor Intangible mode, if available., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 4930156 239/357: [gnugo int] Move ‘gnugo-position’ call down-chain., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 57faa71 256/357: [gnugo] Don't display "Abdication {en, dis}abled"., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6edd793 252/357: [gnugo] Make undo commands silently handle overkill., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b0b18d0 254/357: [gnugo int] Decorate w/ plist instead of alist., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b07f602 248/357: [gnugo int] Move ‘gnugo--passp’ earlier in file., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5524a47 262/357: [gnugo int] Maintain current buffer in ‘gnugo--finish-move’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 2b8d5aa 258/357: [gnugo int] Compute "Abd" in mode-line at time of change., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6a7af2a 274/357: [gnugo int] Decruft: Presume ‘display-images-p’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 35571e3 287/357: [gnugo int] Use private obarray for :all-yy elems, display props.,
Stefan Monnier <=
- [elpa] externals/gnugo 0473d72 264/357: [gnugo int] Comment munging; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5b49aad 316/357: [gnugo int] Use ‘line-end-position’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7544ffe 311/357: [gnugo maint] Add copyright policy to HACKING; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 1ff7a11 307/357: [gnugo maint] Add ‘URL’ header; trim Hacking URL; drop Tip Jar URL., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 10d29a9 301/357: [gnugo] Only set AP for modified gametrees in the collection., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo da98bc8 288/357: [gnugo int] Replace COND expression w/ IF., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 26c849f 330/357: [gnugo int] Decruft: Don't declare hook and keymap vars., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b5b3fd6 337/357: [gnugo int] Reduce ‘setq’ usage., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo c885c9c 020/357: [gnugo int] Avoid variable FORMAT for ‘message’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo fce1fb0 077/357: [gnugo sgf] Fix bug: Output subtrees correctly., Stefan Monnier, 2020/11/29