From da8b85b577d79dd45632d9c40a1336b58b955812 Mon Sep 17 00:00:00 2001 From: Jeremy Bryant Date: Sun, 29 Oct 2023 21:56:54 +0000 Subject: Add two docstrings in cl-lib.el * lisp/emacs-lisp/cl-lib.el (cl--set-buffer-substring) (cl--defalias): Add docstrings. (Bug#66828) --- lisp/emacs-lisp/cl-lib.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lisp/emacs-lisp/cl-lib.el') diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 152a1fe9434..96197d43c3d 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el @@ -157,6 +157,7 @@ to an element already in the list stored in PLACE. `(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) @@ -183,6 +184,9 @@ to an element already in the list stored in PLACE. ;; 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)) -- cgit v1.2.3 From a64336cbb9c95663067da9a2a09a9c281e602161 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 30 Oct 2023 18:50:47 -0400 Subject: * lisp/emacs-lisp/cl-lib.el (cl--defalias): Improve&fix docstring --- lisp/emacs-lisp/cl-lib.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lisp/emacs-lisp/cl-lib.el') diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 96197d43c3d..ac986adc722 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el @@ -185,8 +185,7 @@ to an element already in the list stored in PLACE. (defun cl--defalias (cl-f el-f &optional doc) "Define function CL-F as definition EL-F. - -For example, (cl--defalias 'cl-first 'car)." +Like `defalias' but marks the alias itself as inlinable." (defalias cl-f el-f doc) (put cl-f 'byte-optimizer 'byte-compile-inline-expand)) -- cgit v1.2.3