Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
458c8af4
Commit
458c8af4
authored
Jun 01, 2003
by
Kenichi Handa
Browse files
(Fset_buffer_multibyte): Correctly recover a narrowed
region when a buffer is changed to unibyte.
parent
3bb804d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
src/ChangeLog
src/ChangeLog
+3
-0
src/buffer.c
src/buffer.c
+6
-1
No files found.
src/ChangeLog
View file @
458c8af4
...
...
@@ -5,6 +5,9 @@
2003-05-31 Kenichi Handa <handa@m17n.org>
* buffer.c (Fset_buffer_multibyte): Correctly recover a narrowed
region when a buffer is changed to unibyte.
* charset.h (VALID_LEADING_CODE_P): New macro.
(UNIBYTE_STR_AS_MULTIBYTE_P): Check more rigidly.
...
...
src/buffer.c
View file @
458c8af4
...
...
@@ -2049,7 +2049,7 @@ but the contents viewed as characters do change. */)
Lisp_Object
tail
,
markers
;
struct
buffer
*
other
;
int
undo_enabled_p
=
!
EQ
(
current_buffer
->
undo_list
,
Qt
);
int begv
= BEGV, zv = ZV
;
int
begv
,
zv
;
int
narrowed
=
(
BEG
!=
begv
||
Z
!=
zv
);
int
modified_p
=
!
NILP
(
Fbuffer_modified_p
(
Qnil
));
...
...
@@ -2068,6 +2068,11 @@ but the contents viewed as characters do change. */)
/* If the cached position is for this buffer, clear it out. */
clear_charpos_cache
(
current_buffer
);
if
(
NILP
(
flag
))
begv
=
BEGV_BYTE
,
zv
=
ZV_BYTE
;
else
begv
=
BEGV
,
zv
=
ZV
;
if
(
narrowed
)
Fwiden
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment