[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 36/51: [gnugo int] Revamp gnugo-{put, get} doc / indentation decl
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 36/51: [gnugo int] Revamp gnugo-{put, get} doc / indentation decl. |
Date: |
Mon, 24 Feb 2014 12:30:24 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit 687f614ae6da3015bb0ba71090a9d70461cfbc59
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/gnugo.el | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
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] 22/51: [gnugo maint] Add .dir-locals.el file, link in HACKING; nfc., (continued)
- [elpa] 22/51: [gnugo maint] Add .dir-locals.el file, link in HACKING; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 29/51: [gnugo] Indicate buffer not modified after load., Thien-Thi Nguyen, 2014/02/24
- [elpa] 30/51: [gnugo maint] Update NEWS file; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 34/51: [gnugo int] Use ‘set-p rocess-query-on-exit-flag’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 33/51: [gnugo int] Zonk unused local var., Thien-Thi Nguyen, 2014/02/24
- [elpa] 35/51: [gnugo int] Use ‘dolis t’ and ‘destructuring-bind’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 28/51: [gnugo int] Drop leading "*" in docstrings., Thien-Thi Nguyen, 2014/02/24
- [elpa] 26/51: [gnugo] Give names and docstr ings to ‘lambda’ commands., Thien-Thi Nguyen, 2014/02/24
- [elpa] 38/51: [gnugo] Fix bug: Relax sync regexp., Thien-Thi Nguyen, 2014/02/24
- [elpa] 39/51: [gnugo] Don't show underscore in group-animation message., Thien-Thi Nguyen, 2014/02/24
- [elpa] 36/51: [gnugo int] Revamp gnugo-{put, get} doc / indentation decl.,
Thien-Thi Nguyen <=
- [elpa] 37/51: [gnugo maint] Update "next" in HACKING; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 32/51: [gnugo] Use ‘user-erro r’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 02/51: Import gnugo.el from ttn-pers-elisp 1.59., Thien-Thi Nguyen, 2014/02/24
- [elpa] 40/51: [gnugo] Use special constructs for keybindings in docstrings., Thien-Thi Nguyen, 2014/02/24
- [elpa] 21/51: [gnugo gtp int] Use :post-thunk instead of :post-hook., Thien-Thi Nguyen, 2014/02/24
- [elpa] 31/51: [gnugo int] Add abstraction: gnugo--unclose-game, Thien-Thi Nguyen, 2014/02/24
- [elpa] 45/51: [gnugo] New command: ‘ A’ (gnugo-switch-to-another), Thien-Thi Nguyen, 2014/02/24
- [elpa] 42/51: [gnugo int] Use internal macros more., Thien-Thi Nguyen, 2014/02/24
- [elpa] 46/51: [gnugo] New command: ‘ _’ and ‘M-_’ (gnugo-boss-is-near), Thien-Thi Nguyen, 2014/02/24
- [elpa] 43/51: [gnugo maint] Update HACKING; nfc., Thien-Thi Nguyen, 2014/02/24