diff options
| author | Stefan Monnier | 2019-07-26 16:55:59 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2019-07-26 16:55:59 -0400 |
| commit | 0f09808e522cd3de6bd9ea1350beed1feddfbda9 (patch) | |
| tree | 6831e3a40ff70ab0091cd691bbcdc37d14153d6e /src/print.c | |
| parent | 0dc5a85a1c3772a6e78f077719d82f437f626b1e (diff) | |
| download | emacs-0f09808e522cd3de6bd9ea1350beed1feddfbda9.tar.gz emacs-0f09808e522cd3de6bd9ea1350beed1feddfbda9.zip | |
Adjust remaining uses of `NILP (HASH_HASH)`.
* src/json.c (lisp_to_json_toplevel_1):
* src/pdumper.c (dump_hash_table_stable_p, hash_table_contents):
* src/print.c (print, print_vectorlike):
* src/minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
Use `EQ (HASH_KEY, Qunbound)` instead of `NILP (HASH_HASH)`.
Diffstat (limited to 'src/print.c')
| -rw-r--r-- | src/print.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/print.c b/src/print.c index cb340905142..7c3da68fc98 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1135,9 +1135,12 @@ print (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) | |||
| 1135 | ptrdiff_t i; | 1135 | ptrdiff_t i; |
| 1136 | 1136 | ||
| 1137 | for (i = 0; i < HASH_TABLE_SIZE (h); ++i) | 1137 | for (i = 0; i < HASH_TABLE_SIZE (h); ++i) |
| 1138 | if (!NILP (HASH_HASH (h, i)) | 1138 | { |
| 1139 | && EQ (HASH_VALUE (h, i), Qt)) | 1139 | Lisp_Object key = HASH_KEY (h, i); |
| 1140 | Fremhash (HASH_KEY (h, i), Vprint_number_table); | 1140 | if (!EQ (key, Qunbound) |
| 1141 | && EQ (HASH_VALUE (h, i), Qt)) | ||
| 1142 | Fremhash (key, Vprint_number_table); | ||
| 1143 | } | ||
| 1141 | } | 1144 | } |
| 1142 | } | 1145 | } |
| 1143 | 1146 | ||
| @@ -1593,13 +1596,16 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag, | |||
| 1593 | 1596 | ||
| 1594 | printchar ('(', printcharfun); | 1597 | printchar ('(', printcharfun); |
| 1595 | for (ptrdiff_t i = 0; i < size; i++) | 1598 | for (ptrdiff_t i = 0; i < size; i++) |
| 1596 | if (!NILP (HASH_HASH (h, i))) | 1599 | { |
| 1597 | { | 1600 | Lisp_Object key = HASH_KEY (h, i); |
| 1598 | if (i) printchar (' ', printcharfun); | 1601 | if (!EQ (key, Qunbound)) |
| 1599 | print_object (HASH_KEY (h, i), printcharfun, escapeflag); | 1602 | { |
| 1600 | printchar (' ', printcharfun); | 1603 | if (i) printchar (' ', printcharfun); |
| 1601 | print_object (HASH_VALUE (h, i), printcharfun, escapeflag); | 1604 | print_object (key, printcharfun, escapeflag); |
| 1602 | } | 1605 | printchar (' ', printcharfun); |
| 1606 | print_object (HASH_VALUE (h, i), printcharfun, escapeflag); | ||
| 1607 | } | ||
| 1608 | } | ||
| 1603 | 1609 | ||
| 1604 | if (size < real_size) | 1610 | if (size < real_size) |
| 1605 | print_c_string (" ...", printcharfun); | 1611 | print_c_string (" ...", printcharfun); |