diff options
| author | Andrea Corallo | 2020-07-07 20:44:39 +0100 |
|---|---|---|
| committer | Andrea Corallo | 2020-07-07 20:44:39 +0100 |
| commit | 3d43d45755b2c38d5378496ff6b0fc40538ee924 (patch) | |
| tree | ee43ee3f19bc6ef5cb37c2462c6876584e01364b /src | |
| parent | 2593bbee51f4d15d3a4fc1d4e2e3b215222f783a (diff) | |
| parent | df3ece9d2ed61c9526dbf718e3c96d72bd53dccb (diff) | |
| download | emacs-3d43d45755b2c38d5378496ff6b0fc40538ee924.tar.gz emacs-3d43d45755b2c38d5378496ff6b0fc40538ee924.zip | |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'src')
| -rw-r--r-- | src/json.c | 2 | ||||
| -rw-r--r-- | src/keyboard.c | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 27 |
3 files changed, 26 insertions, 5 deletions
diff --git a/src/json.c b/src/json.c index 30027675580..814afc6d741 100644 --- a/src/json.c +++ b/src/json.c | |||
| @@ -365,6 +365,7 @@ lisp_to_json_toplevel_1 (Lisp_Object lisp, | |||
| 365 | Lisp_Object key = HASH_KEY (h, i); | 365 | Lisp_Object key = HASH_KEY (h, i); |
| 366 | if (!EQ (key, Qunbound)) | 366 | if (!EQ (key, Qunbound)) |
| 367 | { | 367 | { |
| 368 | CHECK_STRING (key); | ||
| 368 | Lisp_Object ekey = json_encode (key); | 369 | Lisp_Object ekey = json_encode (key); |
| 369 | /* We can't specify the length, so the string must be | 370 | /* We can't specify the length, so the string must be |
| 370 | NUL-terminated. */ | 371 | NUL-terminated. */ |
| @@ -975,6 +976,7 @@ usage: (json-parse-string STRING &rest ARGS) */) | |||
| 975 | #endif | 976 | #endif |
| 976 | 977 | ||
| 977 | Lisp_Object string = args[0]; | 978 | Lisp_Object string = args[0]; |
| 979 | CHECK_STRING (string); | ||
| 978 | Lisp_Object encoded = json_encode (string); | 980 | Lisp_Object encoded = json_encode (string); |
| 979 | check_string_without_embedded_nuls (encoded); | 981 | check_string_without_embedded_nuls (encoded); |
| 980 | struct json_configuration conf = | 982 | struct json_configuration conf = |
diff --git a/src/keyboard.c b/src/keyboard.c index f9b9399d502..5fa58abce1d 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -10531,7 +10531,7 @@ The value is always a vector. */) | |||
| 10531 | DEFUN ("clear-this-command-keys", Fclear_this_command_keys, | 10531 | DEFUN ("clear-this-command-keys", Fclear_this_command_keys, |
| 10532 | Sclear_this_command_keys, 0, 1, 0, | 10532 | Sclear_this_command_keys, 0, 1, 0, |
| 10533 | doc: /* Clear out the vector that `this-command-keys' returns. | 10533 | doc: /* Clear out the vector that `this-command-keys' returns. |
| 10534 | Also clear the record of the last 100 events, unless optional arg | 10534 | Also clear the record of the last 300 input events, unless optional arg |
| 10535 | KEEP-RECORD is non-nil. */) | 10535 | KEEP-RECORD is non-nil. */) |
| 10536 | (Lisp_Object keep_record) | 10536 | (Lisp_Object keep_record) |
| 10537 | { | 10537 | { |
diff --git a/src/xdisp.c b/src/xdisp.c index e454fd7b83f..97c55cdf5b8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1872,10 +1872,13 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y, | |||
| 1872 | /* Account for line-number display, if IT3 still | 1872 | /* Account for line-number display, if IT3 still |
| 1873 | didn't. This can happen if START - 1 is the | 1873 | didn't. This can happen if START - 1 is the |
| 1874 | first or the last character on its display line. */ | 1874 | first or the last character on its display line. */ |
| 1875 | if (it3.lnum_pixel_width > 0) | 1875 | if (!it3.line_number_produced_p) |
| 1876 | top_x += it3.lnum_pixel_width; | 1876 | { |
| 1877 | else if (it.line_number_produced_p) | 1877 | if (it3.lnum_pixel_width > 0) |
| 1878 | top_x += it.lnum_pixel_width; | 1878 | top_x += it3.lnum_pixel_width; |
| 1879 | else if (it.line_number_produced_p) | ||
| 1880 | top_x += it.lnum_pixel_width; | ||
| 1881 | } | ||
| 1879 | /* Normally, we would exit the above loop because we | 1882 | /* Normally, we would exit the above loop because we |
| 1880 | found the display element whose character | 1883 | found the display element whose character |
| 1881 | position is CHARPOS. For the contingency that we | 1884 | position is CHARPOS. For the contingency that we |
| @@ -26382,6 +26385,22 @@ decode_mode_spec (struct window *w, register int c, int field_width, | |||
| 26382 | startpos = marker_position (w->start); | 26385 | startpos = marker_position (w->start); |
| 26383 | startpos_byte = marker_byte_position (w->start); | 26386 | startpos_byte = marker_byte_position (w->start); |
| 26384 | height = WINDOW_TOTAL_LINES (w); | 26387 | height = WINDOW_TOTAL_LINES (w); |
| 26388 | /* We cannot cope with w->start being outside of the | ||
| 26389 | accessible portion of the buffer; in particular, | ||
| 26390 | display_count_lines call below will infloop if called with | ||
| 26391 | startpos_byte outside of the [BEGV_BYTE..ZV_BYTE] region. | ||
| 26392 | Such w->start means we were called in some "creative" way | ||
| 26393 | when the buffer's restriction was changed, but the window | ||
| 26394 | wasn't yet redisplayed after that. If that happens, we | ||
| 26395 | need to determine a new base line. */ | ||
| 26396 | if (!(BUF_BEGV_BYTE (b) <= startpos_byte | ||
| 26397 | && startpos_byte <= BUF_ZV_BYTE (b))) | ||
| 26398 | { | ||
| 26399 | startpos = BUF_BEGV (b); | ||
| 26400 | startpos_byte = BUF_BEGV_BYTE (b); | ||
| 26401 | w->base_line_pos = 0; | ||
| 26402 | w->base_line_number = 0; | ||
| 26403 | } | ||
| 26385 | 26404 | ||
| 26386 | /* If we decided that this buffer isn't suitable for line numbers, | 26405 | /* If we decided that this buffer isn't suitable for line numbers, |
| 26387 | don't forget that too fast. */ | 26406 | don't forget that too fast. */ |