From: Paul Eggert Date: Tue, 13 Feb 2024 17:54:51 +0000 (-0800) Subject: Simplify position-symbol X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d01789f6dae51f72e41080ccb43666bf19423c86;p=emacs.git Simplify position-symbol * src/data.c (Fposition_symbol): Simplify by calling Fbare_symbol rather than open-coding it. (cherry picked from commit a4a99405d00b98aeb86040117402ed0e1f954833) --- diff --git a/src/data.c b/src/data.c index 530bb774171..f2f35fb355a 100644 --- a/src/data.c +++ b/src/data.c @@ -821,16 +821,9 @@ POS, the position, is either a fixnum or a symbol with position from which the position will be taken. */) (register Lisp_Object sym, register Lisp_Object pos) { - Lisp_Object bare; + Lisp_Object bare = Fbare_symbol (sym); Lisp_Object position; - if (BARE_SYMBOL_P (sym)) - bare = sym; - else if (SYMBOL_WITH_POS_P (sym)) - bare = XSYMBOL_WITH_POS_SYM (sym); - else - wrong_type_argument (Qsymbolp, sym); - if (FIXNUMP (pos)) position = pos; else if (SYMBOL_WITH_POS_P (pos))