[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 09/10: [gnugo int] Revamp gnugo-{put, get} doc / indentation decl
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 09/10: [gnugo int] Revamp gnugo-{put, get} doc / indentation decl. |
Date: |
Sat, 15 Feb 2014 11:58:32 +0000 |
ttn pushed a commit to branch ttn-gnugo
in repository elpa.
commit 54cdb33b94478d60c4eadbcf8ef155a67ce52f49
Author: Thien-Thi Nguyen <address@hidden>
Date: Sat Feb 15 12:35:36 2014 +0100
[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.
---
packages/gnugo/ChangeLog | 9 +++++++++
packages/gnugo/gnugo.el | 19 ++++++++++---------
2 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/packages/gnugo/ChangeLog b/packages/gnugo/ChangeLog
index cebbc0d..2191eac 100644
--- a/packages/gnugo/ChangeLog
+++ b/packages/gnugo/ChangeLog
@@ -1,5 +1,14 @@
2014-02-15 Thien-Thi Nguyen <address@hidden>
+ [gnugo int] Revamp gnugo-{put,get} doc / indentation decl.
+
+ * 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.
+
+2014-02-15 Thien-Thi Nguyen <address@hidden>
+
[gnugo int] Use ‘dolist’ and ‘destructuring-bind’.
* gnugo.el (gnugo-board-mode): ...here,
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 340c46e..f3c3b4f 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/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] branch ttn-gnugo updated (cfa23d6 -> 5d7da3f), Thien-Thi Nguyen, 2014/02/15
- [elpa] 06/10: [gnugo int] Zonk unused local var., Thien-Thi Nguyen, 2014/02/15
- [elpa] 02/10: [gnugo maint] Update NEWS file; nfc., Thien-Thi Nguyen, 2014/02/15
- [elpa] 04/10: [gnugo int] Add abstraction: gnugo--unclose-game, Thien-Thi Nguyen, 2014/02/15
- [elpa] 07/10: [gnugo int] Use ‘set-p rocess-query-on-exit-flag’., Thien-Thi Nguyen, 2014/02/15
- [elpa] 05/10: [gnugo] Use ‘user-erro r’., Thien-Thi Nguyen, 2014/02/15
- [elpa] 10/10: [gnugo maint] Update "next" in HACKING; nfc., Thien-Thi Nguyen, 2014/02/15
- [elpa] 09/10: [gnugo int] Revamp gnugo-{put, get} doc / indentation decl.,
Thien-Thi Nguyen <=
- [elpa] 03/10: [gnugo maint] Sync ChangeLog email addr w/ that in VCS commit message; nfc., Thien-Thi Nguyen, 2014/02/15
- [elpa] 01/10: [gnugo] Indicate buffer not modified after load., Thien-Thi Nguyen, 2014/02/15
- [elpa] 08/10: [gnugo int] Use ‘dolis t’ and ‘destructuring-bind’., Thien-Thi Nguyen, 2014/02/15