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
10b0f752
Commit
10b0f752
authored
Aug 01, 2000
by
Miles Bader
Browse files
(Fconstrain_to_field): Fix the conditions for deciding when to constrain
NEW_POS (they were pretty screwed up before).
parent
032ebb29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
14 deletions
+22
-14
src/ChangeLog
src/ChangeLog
+5
-0
src/editfns.c
src/editfns.c
+17
-14
No files found.
src/ChangeLog
View file @
10b0f752
2000-08-01 Miles Bader <miles@gnu.org>
* editfns.c (Fconstrain_to_field): Fix the conditions for deciding
when to constrain NEW_POS (they were pretty screwed up before).
2000-07-31 Eli Zaretskii <eliz@is.elta.co.il>
* msdos.c (run_msdos_command): Save and restore the master
...
...
src/editfns.c
View file @
10b0f752
...
...
@@ -593,20 +593,23 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil.")
else
field_bound
=
Ffield_beginning
(
old_pos
,
escape_from_edge
);
if
(
/* If ONLY_IN_LINE is non-nil, we only constrain NEW_POS if doing
so would remain within the same line. */
NILP
(
only_in_line
)
/* In that case, see if ESCAPE_FROM_EDGE caused FIELD_BOUND
to jump to the other side of NEW_POS, which would mean
that NEW_POS is already acceptable, and that we don't
have to do the line-check. */
||
((
XFASTINT
(
field_bound
)
<
XFASTINT
(
new_pos
))
?
!
fwd
:
fwd
)
/* If not, see if there's no newline intervening between
NEW_POS and FIELD_BOUND. */
||
(
scan_buffer
(
'\n'
,
XFASTINT
(
new_pos
),
XFASTINT
(
field_bound
),
fwd
?
-
1
:
1
,
&
shortage
,
1
),
shortage
!=
0
))
if
(
/* See if ESCAPE_FROM_EDGE caused FIELD_BOUND to jump to the
other side of NEW_POS, which would mean that NEW_POS is
already acceptable, and it's not necessary to constrain it
to FIELD_BOUND. */
((
XFASTINT
(
field_bound
)
<
XFASTINT
(
new_pos
))
?
fwd
:
!
fwd
)
/* NEW_POS should be constrained, but only if either
ONLY_IN_LINE is nil (in which case any constraint is OK),
or NEW_POS and FIELD_BOUND are on the same line (in which
case the constraint is OK even if ONLY_IN_LINE is non-nil). */
&&
(
NILP
(
only_in_line
)
/* This is the ONLY_IN_LINE case, check that NEW_POS and
FIELD_BOUND are on the same line by seeing whether
there's an intervening newline or not. */
||
(
scan_buffer
(
'\n'
,
XFASTINT
(
new_pos
),
XFASTINT
(
field_bound
),
fwd
?
-
1
:
1
,
&
shortage
,
1
),
shortage
!=
0
)))
/* Constrain NEW_POS to FIELD_BOUND. */
new_pos
=
field_bound
;
...
...
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