diff options
Diffstat (limited to 'src/fns.c')
| -rw-r--r-- | src/fns.c | 10 |
1 files changed, 4 insertions, 6 deletions
| @@ -1100,7 +1100,7 @@ an error is signaled. */) | |||
| 1100 | { | 1100 | { |
| 1101 | ptrdiff_t chars = SCHARS (string); | 1101 | ptrdiff_t chars = SCHARS (string); |
| 1102 | unsigned char *str = xmalloc (chars); | 1102 | unsigned char *str = xmalloc (chars); |
| 1103 | ptrdiff_t converted = str_to_unibyte (SDATA (string), str, chars, 0); | 1103 | ptrdiff_t converted = str_to_unibyte (SDATA (string), str, chars); |
| 1104 | 1104 | ||
| 1105 | if (converted < chars) | 1105 | if (converted < chars) |
| 1106 | error ("Can't convert the %"pD"dth character to unibyte", converted); | 1106 | error ("Can't convert the %"pD"dth character to unibyte", converted); |
| @@ -4656,13 +4656,12 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_ | |||
| 4656 | { | 4656 | { |
| 4657 | struct buffer *prev = current_buffer; | 4657 | struct buffer *prev = current_buffer; |
| 4658 | 4658 | ||
| 4659 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 4659 | record_unwind_current_buffer (); |
| 4660 | 4660 | ||
| 4661 | CHECK_BUFFER (object); | 4661 | CHECK_BUFFER (object); |
| 4662 | 4662 | ||
| 4663 | bp = XBUFFER (object); | 4663 | bp = XBUFFER (object); |
| 4664 | if (bp != current_buffer) | 4664 | set_buffer_internal (bp); |
| 4665 | set_buffer_internal (bp); | ||
| 4666 | 4665 | ||
| 4667 | if (NILP (start)) | 4666 | if (NILP (start)) |
| 4668 | b = BEGV; | 4667 | b = BEGV; |
| @@ -4749,8 +4748,7 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_ | |||
| 4749 | } | 4748 | } |
| 4750 | 4749 | ||
| 4751 | object = make_buffer_string (b, e, 0); | 4750 | object = make_buffer_string (b, e, 0); |
| 4752 | if (prev != current_buffer) | 4751 | set_buffer_internal (prev); |
| 4753 | set_buffer_internal (prev); | ||
| 4754 | /* Discard the unwind protect for recovering the current | 4752 | /* Discard the unwind protect for recovering the current |
| 4755 | buffer. */ | 4753 | buffer. */ |
| 4756 | specpdl_ptr--; | 4754 | specpdl_ptr--; |