[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 7ef5c66 036/357: [gnugo int] Revamp gnugo-{put, g
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 7ef5c66 036/357: [gnugo int] Revamp gnugo-{put, get} doc / indentation decl. |
Date: |
Sun, 29 Nov 2020 14:50:42 -0500 (EST) |
branch: externals/gnugo
commit 7ef5c66f816a15f25c158e4cb2484cf6682eef9e
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo int] Revamp gnugo-{put,get} doc / indentation decl.
* packages/gnugo/gnugo.el (gnugo-put): Move shared docstring here;
specialize it; replace top-level direct symbol-plist
assignment w/ an internal ‘declare’ form for indentation.
(gnugo-get): Add docstring.
---
gnugo.el | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index 340c46e..f3c3b4f 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -170,12 +170,8 @@ For ~t, the value is a snapshot, use `gnugo-refresh' to
update it.")
;;;---------------------------------------------------------------------------
;;; Support functions
-(put 'gnugo-put 'lisp-indent-function 1)
-(defun gnugo-put (key value) (puthash key value gnugo-state))
-(defun gnugo-get (key) (gethash key gnugo-state))
-
-(let ((docs "Put or get move/game/board-specific properties.
-\(This docstring is shared by `gnugo-put' and `gnugo-get'.\)
+(defun gnugo-put (key value)
+ "Associate move/game/board-specific property KEY with VALUE.
There are many properties, each named by a keyword, that record and control
how gnugo.el manages each game. Each GNUGO Board buffer has its own set
@@ -233,9 +229,14 @@ you may never really understand to any degree of personal
satisfaction\".
:last-user-bpos -- board position; keep the hapless human happy
-As things stabilize probably more info will be added to this docstring."))
- (put 'gnugo-put 'function-documentation docs)
- (put 'gnugo-get 'function-documentation docs))
+As things stabilize probably more info will be added to this docstring."
+ (declare (indent 1))
+ (puthash key value gnugo-state))
+
+(defun gnugo-get (key)
+ "Return the move/game/board-specific value for KEY.
+See `gnugo-put'."
+ (gethash key gnugo-state))
(defun gnugo-describe-internal-properties ()
"Pretty-print `gnugo-state' properties in another buffer.
- [elpa] externals/gnugo ae25c81 050/357: [gnugo maint] Update NEWS, HACKING; nfc., (continued)
- [elpa] externals/gnugo ae25c81 050/357: [gnugo maint] Update NEWS, HACKING; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo f282ec7 063/357: [gnugo int] Associate process w/ buffer immediately., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 8e3f44e 070/357: [gnugo] Make ‘C-u M-u’ switch roles., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo d02a500 095/357: [gnugo maint] NEWS futzing; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 273da4b 098/357: [gnugo sgf] Normalize PASS internal rep on read, as ""., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 61be18a 022/357: [gnugo maint] Add .dir-locals.el file, link in HACKING; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 0c7bc82 025/357: [gnugo int] Use cl-{plus, minus}p more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6d835b3 023/357: [gnugo int] Drop unused local var., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 2a75447 034/357: [gnugo int] Use ‘set-process-query-on-exit-flag’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo bd4d40f 028/357: [gnugo int] Drop leading "*" in docstrings., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7ef5c66 036/357: [gnugo int] Revamp gnugo-{put, get} doc / indentation decl.,
Stefan Monnier <=
- [elpa] externals/gnugo d41a581 029/357: [gnugo] Indicate buffer not modified after load., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 80a22a5 032/357: [gnugo] Use ‘user-error’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 423683d 055/357: [gnugo int] Use ‘dolist’, ‘destructuring-bind’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7c3a30f 100/357: [gnugo int] Use ‘pop’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a35692a 106/357: [gnugo int] Add abstraction: gnugo--move-prop, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6ee477d 112/357: [gnugo int] Remove abstraction: continue-on, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 58d4d6d 117/357: [gnugo int] Add abstractions: gnugo--{, set-}tree-ends, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo f107328 122/357: [gnugo int] Expand gametree IR: MNUM, KIDS, ROOT., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo c3b3c3f 123/357: [gnugo int] Fix bug: Detect case for KIDS addition correctly., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a63d31b 128/357: [gnugo int] Comment munging; nfc., Stefan Monnier, 2020/11/29