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
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
7df74da6
Commit
7df74da6
authored
Feb 08, 1998
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Fformat): Handle a symbol of which name contains
multibyte characters correctly.
parent
4a8f3b3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
4 deletions
+26
-4
src/editfns.c
src/editfns.c
+26
-4
No files found.
src/editfns.c
View file @
7df74da6
...
@@ -455,6 +455,14 @@ is in effect, in which case it is less.")
...
@@ -455,6 +455,14 @@ is in effect, in which case it is less.")
return
buildmark
(
ZV
,
ZV_BYTE
);
return
buildmark
(
ZV
,
ZV_BYTE
);
}
}
DEFUN
(
"position-bytes"
,
Fposition_bytes
,
Sposition_bytes
,
1
,
1
,
0
,
"Return the byte position for character position POSITION."
)
(
position
)
{
CHECK_NUMBER
(
position
,
1
);
return
make_number
(
CHAR_TO_BYTE
(
position
));
}
DEFUN
(
"following-char"
,
Ffollowing_char
,
Sfollowing_char
,
0
,
0
,
0
,
DEFUN
(
"following-char"
,
Ffollowing_char
,
Sfollowing_char
,
0
,
0
,
0
,
"Return the character following point, as a number.
\n
\
"Return the character following point, as a number.
\n
\
At the end of the buffer or accessible region, return 0.
\n
\
At the end of the buffer or accessible region, return 0.
\n
\
...
@@ -2268,6 +2276,11 @@ Use %% to put a single % into the output.")
...
@@ -2268,6 +2276,11 @@ Use %% to put a single % into the output.")
else
if
(
SYMBOLP
(
args
[
n
]))
else
if
(
SYMBOLP
(
args
[
n
]))
{
{
XSETSTRING
(
args
[
n
],
XSYMBOL
(
args
[
n
])
->
name
);
XSETSTRING
(
args
[
n
],
XSYMBOL
(
args
[
n
])
->
name
);
if
(
STRING_MULTIBYTE
(
args
[
n
])
&&
!
multibyte
)
{
multibyte
=
1
;
goto
retry
;
}
goto
string
;
goto
string
;
}
}
else
if
(
STRINGP
(
args
[
n
]))
else
if
(
STRINGP
(
args
[
n
]))
...
@@ -2396,7 +2409,14 @@ Use %% to put a single % into the output.")
...
@@ -2396,7 +2409,14 @@ Use %% to put a single % into the output.")
nchars
+=
this_nchars
;
nchars
+=
this_nchars
;
}
}
}
}
else
if
(
multibyte
&&
!
STRING_MULTIBYTE
(
args
[
0
]))
else
if
(
STRING_MULTIBYTE
(
args
[
0
]))
{
/* Copy a whole multibyte character. */
*
p
++
=
*
format
++
;
while
(
!
CHAR_HEAD_P
(
*
format
))
*
p
++
=
*
format
++
;
nchars
++
;
}
else
if
(
multibyte
)
{
{
/* Convert a single-byte character to multibyte. */
/* Convert a single-byte character to multibyte. */
int
len
=
copy_text
(
format
,
p
,
1
,
0
,
1
);
int
len
=
copy_text
(
format
,
p
,
1
,
0
,
1
);
...
@@ -2890,6 +2910,10 @@ functions if all the text being accessed has this property.");
...
@@ -2890,6 +2910,10 @@ functions if all the text being accessed has this property.");
defsubr
(
&
Spoint
);
defsubr
(
&
Spoint
);
defsubr
(
&
Sregion_beginning
);
defsubr
(
&
Sregion_beginning
);
defsubr
(
&
Sregion_end
);
defsubr
(
&
Sregion_end
);
defsubr
(
&
Sline_beginning_position
);
defsubr
(
&
Sline_end_position
);
/* defsubr (&Smark); */
/* defsubr (&Smark); */
/* defsubr (&Sset_mark); */
/* defsubr (&Sset_mark); */
defsubr
(
&
Ssave_excursion
);
defsubr
(
&
Ssave_excursion
);
...
@@ -2900,9 +2924,7 @@ functions if all the text being accessed has this property.");
...
@@ -2900,9 +2924,7 @@ functions if all the text being accessed has this property.");
defsubr
(
&
Spoint_min
);
defsubr
(
&
Spoint_min
);
defsubr
(
&
Spoint_min_marker
);
defsubr
(
&
Spoint_min_marker
);
defsubr
(
&
Spoint_max_marker
);
defsubr
(
&
Spoint_max_marker
);
defsubr
(
&
Sposition_bytes
);
defsubr
(
&
Sline_beginning_position
);
defsubr
(
&
Sline_end_position
);
defsubr
(
&
Sbobp
);
defsubr
(
&
Sbobp
);
defsubr
(
&
Seobp
);
defsubr
(
&
Seobp
);
...
...
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