]> git.eshelyaron.com Git - emacs.git/commitdiff
; Improve documentation of 2 symbol-related functions
authorEli Zaretskii <eliz@gnu.org>
Thu, 6 Mar 2025 10:52:05 +0000 (12:52 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Mar 2025 07:17:34 +0000 (08:17 +0100)
* src/data.c (Fremove_pos_from_symbol, Fbare_symbol): Doc fixes.
(Bug#75290)

(cherry picked from commit 9065423e709de50509f45d08cc6697d9bb95fc93)

src/data.c

index b2e5ffe4eedbf72b099e97c9c6496ba94d4a7e8a..5d1c065e78577d6f302ac4d8e921d6b6b60169d4 100644 (file)
@@ -823,8 +823,9 @@ Doing that might make Emacs dysfunctional, and might even crash Emacs.  */)
 
 DEFUN ("bare-symbol", Fbare_symbol, Sbare_symbol, 1, 1, 0,
        doc: /* Extract, if need be, the bare symbol from SYM.
-SYM is either a symbol or a symbol with position.
-Ignore `symbols-with-pos-enabled'.  */)
+SYM must be either a symbol or a symbol with position, otherwise
+the function will signal the `wrong-type-argument' error.
+This function ignores `symbols-with-pos-enabled'.  */)
   (register Lisp_Object sym)
 {
   if (BARE_SYMBOL_P (sym))
@@ -847,7 +848,8 @@ DEFUN ("remove-pos-from-symbol", Fremove_pos_from_symbol,
        Sremove_pos_from_symbol, 1, 1, 0,
        doc: /* If ARG is a symbol with position, return it without the position.
 Otherwise, return ARG unchanged.  Ignore `symbols-with-pos-enabled'.
-Compare with `bare-symbol'.  */)
+Compare with `bare-symbol', which does the same, but signals an error
+if ARG is not a symbol.  */)
   (register Lisp_Object arg)
 {
   if (SYMBOL_WITH_POS_P (arg))