aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2019-03-10 23:39:48 -0700
committerPaul Eggert2019-03-10 23:41:21 -0700
commit9b4d34fa7884d6b67ec19593c5d2d3b587434966 (patch)
tree19231ec9e0ed203dfe4e0192c9f682aace879149 /src
parente81c44fdb4110a1e5af97669c1a7ef8277528b6c (diff)
downloademacs-9b4d34fa7884d6b67ec19593c5d2d3b587434966.tar.gz
emacs-9b4d34fa7884d6b67ec19593c5d2d3b587434966.zip
Improve binary-as-unsigned treatment (Bug#34792)
* etc/NEWS: * src/editfns.c (Fformat, binary_as_unsigned): Update now that we always have bignums. (syms_of_editfns) [!defined lisp_h_FIXNUMP]: Remove now-obsolete code, since lisp_h_FIXNUMP is always defined now. * test/src/editfns-tests.el (read-large-integer): Simplify, now that we can assume binary-as-unsigned defaults to nil.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/editfns.c b/src/editfns.c
index f5a9e0a6408..7f11037f1e3 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3001,8 +3001,8 @@ the next available argument, or the argument explicitly specified:
3001%S means print any object as an s-expression (using `prin1'). 3001%S means print any object as an s-expression (using `prin1').
3002 3002
3003The argument used for %d, %o, %x, %e, %f, %g or %c must be a number. 3003The argument used for %d, %o, %x, %e, %f, %g or %c must be a number.
3004The value of `binary-as-unsigned' determines whether it's printed as 3004%o, %x, and %X treat arguments as unsigned if `binary-as-unsigned' is t
3005 signed or unsigned by %o, %x, and %X. 3005 (this is experimental; email 32252@debbugs.gnu.org if you need it).
3006Use %% to put a single % into the output. 3006Use %% to put a single % into the output.
3007 3007
3008A %-sequence other than %% may contain optional field number, flag, 3008A %-sequence other than %% may contain optional field number, flag,
@@ -4485,17 +4485,13 @@ functions if all the text being accessed has this property. */);
4485 binary_as_unsigned, 4485 binary_as_unsigned,
4486 doc: /* Non-nil means `format' %x and %o treat integers as unsigned. 4486 doc: /* Non-nil means `format' %x and %o treat integers as unsigned.
4487This has machine-dependent results. Nil means to treat integers as 4487This has machine-dependent results. Nil means to treat integers as
4488signed, which is portable; for example, if N is a negative integer, 4488signed, which is portable and is the default; for example, if N is a
4489(read (format "#x%x") N) returns N only when this variable is nil. 4489negative integer, (read (format "#x%x") N) returns N only when this
4490variable is nil.
4490 4491
4491This variable is experimental; email 32252@debbugs.gnu.org if you need 4492This variable is experimental; email 32252@debbugs.gnu.org if you need
4492it to be non-nil. */); 4493it to be non-nil. */);
4493 /* For now, default to true if bignums exist, false in traditional Emacs. */
4494#ifdef lisp_h_FIXNUMP
4495 binary_as_unsigned = false; 4494 binary_as_unsigned = false;
4496#else
4497 binary_as_unsigned = true;
4498#endif
4499 4495
4500 defsubr (&Spropertize); 4496 defsubr (&Spropertize);
4501 defsubr (&Schar_equal); 4497 defsubr (&Schar_equal);