Skip to content

Commit

Permalink
Generate gocumentation strings for (SETF C*R).
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-strandh committed Jul 12, 2024
1 parent 43f4275 commit a3fe767
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Code/accessors.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -688,12 +688,26 @@
string
(split string 0)))))

(defun setf-c*r-documentation (symbol)
(let* ((name (symbol-name symbol))
(string (subseq name 1 (1- (length name)))))
(setf (documentation `(setf ,symbol) 'function)
(format nil
"Syntax: (setf (c~ar list) object)~@
~@
(SETF (C~aR LIST) OBJECT) is equivalent to~@
(SETF ~s OBJECT)."
(string-downcase string)
string
(split string 0)))))

(loop for symbol in
'(caar cadr cdar cddr
caaar caadr cadar caddr cdaar cdadr cddar cdddr
caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr
cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr)
do (c*r-documentation symbol))
do (c*r-documentation symbol)
(setf-c*r-documentation symbol))

(defun integer-to-cl-symbol (integer)
(find-symbol (string-upcase (format nil "~:R" integer))
Expand Down

0 comments on commit a3fe767

Please sign in to comment.