Subject: bug#66828: [PATCH] Add docstrings in cl-lib.el

From: Jeremy Bryant <[email-masked]>
Date: Sun, 29 Oct 2023 22:07:13 +0000

Tags: patch

Hello Emacs maintainers,

Following recent discussions on documentation in cl-lib, I would like to
submit a simple patch, creating docstrings where there were none
previously.

Feedback welcome on format, conventions and any other aspects.

Best,
Jeremy

>From 02e487816f5542d30b8cdf0e3f748926f9b7cf2e Mon Sep 17 00:00:00 2001
From: Jeremy Bryant <[email-masked]>
Date: Sun, 29 Oct 2023 21:56:54 +0000
Subject: [PATCH] Add docstrings in cl-lib.el

* lisp/emacs-lisp/cl-lib.el (cl--set-buffer-substring): Add docstring

(cl--defalias): Add docstring
---
 lisp/emacs-lisp/cl-lib.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index f4c1ac85b13..29b6c2f3545 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -157,6 +157,7 @@ cl-pushnew
     `(cl-callf2 cl-adjoin ,x ,place ,@keys)))
 
 (defun cl--set-buffer-substring (start end val)
+  "Delete region from START to END and insert VAL."
   (save-excursion (delete-region start end)
 		  (goto-char start)
 		  (insert val)
@@ -194,6 +195,9 @@ 'cl--block-throw
 ;; the target form to return the values as a list.
 
 (defun cl--defalias (cl-f el-f &optional doc)
+  "Define function CL-F as definition EL-F.
+
+For example, (cl--defalias 'cl-first 'car)."
   (defalias cl-f el-f doc)
   (put cl-f 'byte-optimizer 'byte-compile-inline-expand))
 
-- 
2.40.1