From: Mattias EngdegÄrd Date: Thu, 18 Aug 2022 10:08:24 +0000 (+0200) Subject: Copy-edit doc strings and comments wrt bignum and fixnum X-Git-Tag: emacs-29.0.90~1447^2~75 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f33a429a53ea2647199804f12e16c65768d526d5;p=emacs.git Copy-edit doc strings and comments wrt bignum and fixnum Don't say that a value is a fixnum if small enough and a bignum otherwise, because that is now how Lisp integers always work, and we generally don't expose the fixnum/bignum difference to the user unless really necessary. * src/charset.c (Fencode_char): * src/editfns.c (Fuser_uid, Fuser_real_uid, Fgroup_gid) (Fgroup_real_gid, Femacs_pid): * src/font.c (Ffont_variation_glyphs): * src/process.c (Fprocess_id): Edit doc strings. * src/pgtkselect.c: * src/xselect.c: Edit comments. --- diff --git a/src/charset.c b/src/charset.c index 9edbd4c8c84..bb59262fe98 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1852,9 +1852,8 @@ although this usage is obsolescent. */) DEFUN ("encode-char", Fencode_char, Sencode_char, 2, 2, 0, doc: /* Encode the character CH into a code-point of CHARSET. -Return the encoded code-point, a fixnum if its value is small enough, -otherwise a bignum. -Return nil if CHARSET doesn't support CH. */) +Return the encoded code-point as an integer, +or nil if CHARSET doesn't support CH. */) (Lisp_Object ch, Lisp_Object charset) { int c, id; diff --git a/src/editfns.c b/src/editfns.c index 07f5c0bbef7..4fb82485abe 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1172,8 +1172,7 @@ This ignores the environment variables LOGNAME and USER, so it differs from } DEFUN ("user-uid", Fuser_uid, Suser_uid, 0, 0, 0, - doc: /* Return the effective uid of Emacs. -Value is a fixnum, if it's small enough, otherwise a bignum. */) + doc: /* Return the effective uid of Emacs, as an integer. */) (void) { uid_t euid = geteuid (); @@ -1181,8 +1180,7 @@ Value is a fixnum, if it's small enough, otherwise a bignum. */) } DEFUN ("user-real-uid", Fuser_real_uid, Suser_real_uid, 0, 0, 0, - doc: /* Return the real uid of Emacs. -Value is a fixnum, if it's small enough, otherwise a bignum. */) + doc: /* Return the real uid of Emacs, as an integer. */) (void) { uid_t uid = getuid (); @@ -1208,8 +1206,7 @@ Return nil if a group with such GID does not exists or is not known. */) } DEFUN ("group-gid", Fgroup_gid, Sgroup_gid, 0, 0, 0, - doc: /* Return the effective gid of Emacs. -Value is a fixnum, if it's small enough, otherwise a bignum. */) + doc: /* Return the effective gid of Emacs, as an integer. */) (void) { gid_t egid = getegid (); @@ -1217,8 +1214,7 @@ Value is a fixnum, if it's small enough, otherwise a bignum. */) } DEFUN ("group-real-gid", Fgroup_real_gid, Sgroup_real_gid, 0, 0, 0, - doc: /* Return the real gid of Emacs. -Value is a fixnum, if it's small enough, otherwise a bignum. */) + doc: /* Return the real gid of Emacs, as an integer. */) (void) { gid_t gid = getgid (); @@ -1306,8 +1302,7 @@ DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, } DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, - doc: /* Return the process ID of Emacs, as a number. -Value is a fixnum, if it's small enough, otherwise a bignum. */) + doc: /* Return the process ID of Emacs, as an integer. */) (void) { pid_t pid = getpid (); diff --git a/src/font.c b/src/font.c index 3846cfc1079..8acedb9bf88 100644 --- a/src/font.c +++ b/src/font.c @@ -4691,8 +4691,7 @@ Each element of the value is a cons (VARIATION-SELECTOR . GLYPH-ID), where VARIATION-SELECTOR is a character code of variation selector (#xFE00..#xFE0F or #xE0100..#xE01EF). - GLYPH-ID is a glyph code of the corresponding variation glyph, -a fixnum, if it's small enough, otherwise a bignum. */) + GLYPH-ID is a glyph code of the corresponding variation glyph, an integer. */) (Lisp_Object font_object, Lisp_Object character) { unsigned variations[256]; @@ -4729,8 +4728,7 @@ a fixnum, if it's small enough, otherwise a bignum. */) that apply to POSITION. POSITION may be nil, in which case, FONT-SPEC is the font for displaying the character CH with the default face. GLYPH-CODE is the glyph code in the font to use for - the character, it is a fixnum, if it is small enough, otherwise a - bignum. + the character, as an integer. For a text terminal, return a nonnegative integer glyph code for the character, or a negative integer if the character is not diff --git a/src/pgtkselect.c b/src/pgtkselect.c index e0230003b3a..212bbd56aa4 100644 --- a/src/pgtkselect.c +++ b/src/pgtkselect.c @@ -1248,8 +1248,7 @@ pgtk_get_window_property_as_lisp_data (struct pgtk_display_info *dpyinfo, ATOM 32 > 1 Vector of Symbols * 16 1 Integer * 16 > 1 Vector of Integers - * 32 1 if small enough: fixnum - otherwise: bignum + * 32 1 Integer * 32 > 1 Vector of the above When converting an object to C, it may be of the form (SYMBOL diff --git a/src/process.c b/src/process.c index 23479c06194..697249a461b 100644 --- a/src/process.c +++ b/src/process.c @@ -1209,8 +1209,8 @@ If PROCESS has not yet exited or died, return 0. */) DEFUN ("process-id", Fprocess_id, Sprocess_id, 1, 1, 0, doc: /* Return the process id of PROCESS. -This is the pid of the external process which PROCESS uses or talks to. -It is a fixnum if the value is small enough, otherwise a bignum. +This is the pid of the external process which PROCESS uses or talks to, +an integer. For a network, serial, and pipe connections, this value is nil. */) (register Lisp_Object process) { diff --git a/src/xselect.c b/src/xselect.c index d6e6d0c30b8..bab0400540e 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -1754,8 +1754,7 @@ x_get_window_property_as_lisp_data (struct x_display_info *dpyinfo, ATOM 32 > 1 Vector of Symbols * 16 1 Integer * 16 > 1 Vector of Integers - * 32 1 if small enough: fixnum - otherwise: bignum + * 32 1 Integer * 32 > 1 Vector of the above When converting an object to C, it may be of the form (SYMBOL . )