Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7d7e0027
Commit
7d7e0027
authored
Jun 28, 2012
by
Stefan Monnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/editfns.c (region_limit): Clip to narrowing.
Fixes: debbugs:11770
parent
94eb8e0a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
10 deletions
+19
-10
src/ChangeLog
src/ChangeLog
+4
-0
src/alloc.c
src/alloc.c
+2
-1
src/editfns.c
src/editfns.c
+6
-2
src/keyboard.c
src/keyboard.c
+3
-3
src/w32fns.c
src/w32fns.c
+4
-4
No files found.
src/ChangeLog
View file @
7d7e0027
2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
* editfns.c (region_limit): Clip to narrowing (bug#11770).
2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
Avoid integer overflow on scroll-left and scroll-right.
...
...
src/alloc.c
View file @
7d7e0027
...
...
@@ -5384,7 +5384,8 @@ See Info node `(elisp)Garbage Collection'. */)
turned off in that buffer. Calling truncate_undo_list on
Qt tends to return NULL, which effectively turns undo back on.
So don't call truncate_undo_list if undo_list is Qt. */
if (! NILP (nextb->BUFFER_INTERNAL_FIELD (name)) && ! EQ (nextb->BUFFER_INTERNAL_FIELD (undo_list), Qt))
if (! NILP (nextb->BUFFER_INTERNAL_FIELD (name))
&& ! EQ (nextb->BUFFER_INTERNAL_FIELD (undo_list), Qt))
truncate_undo_list (nextb);
/* Shrink buffer gaps, but skip indirect and dead buffers. */
...
...
src/editfns.c
View file @
7d7e0027
...
...
@@ -283,8 +283,12 @@ region_limit (int beginningp)
error
(
"The mark is not set now, so there is no region"
);
if
((
PT
<
XFASTINT
(
m
))
==
(
beginningp
!=
0
))
m
=
make_number
(
PT
);
return
m
;
return
make_number
(
PT
);
else
{
/* Clip to the current narrowing (bug#11770). */
ptrdiff_t
mark
=
XFASTINT
(
m
);
return
make_number
(
mark
<
BEGV
?
BEGV
:
mark
>
ZV
?
ZV
:
m
);
}
}
DEFUN
(
"region-beginning"
,
Fregion_beginning
,
Sregion_beginning
,
0
,
0
,
0
,
...
...
src/keyboard.c
View file @
7d7e0027
...
...
@@ -3854,7 +3854,7 @@ kbd_buffer_get_event (KBOARD **kbp,
EMACS_TIME duration;
EMACS_GET_TIME (duration);
if (EMACS_TIME_GE (duration, *end_time))
return Qnil; /*
f
inished waiting */
return Qnil; /*
F
inished waiting
.
*/
else
{
EMACS_SUB_TIME (duration, *end_time, duration);
...
...
@@ -7309,8 +7309,8 @@ handle_user_signal (int sig)
for (p = user_signals; p; p = p->next)
if (p->sig == sig)
{
if (special_event_name
&&
strcmp (special_event_name, p->name) == 0)
if (special_event_name
&&
strcmp (special_event_name, p->name) == 0)
{
/* Enter the debugger in many ways. */
debug_on_next_call = 1;
...
...
src/w32fns.c
View file @
7d7e0027
...
...
@@ -2509,19 +2509,19 @@ post_character_message (HWND hwnd, UINT msg,
woken up if blocked in sys_select, but we do NOT want to post
the quit_char message itself (because it will usually be as if
the user had typed quit_char twice). Instead, we post a dummy
message that has no particular effect. */
message that has no particular effect.
*/
{
int
c
=
wParam
;
if
(
isalpha
(
c
)
&&
wmsg
.
dwModifiers
==
ctrl_modifier
)
c
=
make_ctrl_char
(
c
)
&
0377
;
if
(
c
==
quit_char
||
(
wmsg
.
dwModifiers
==
0
&&
w32_quit_key
&&
wParam
==
w32_quit_key
))
||
(
wmsg
.
dwModifiers
==
0
&&
w32_quit_key
&&
wParam
==
w32_quit_key
))
{
Vquit_flag
=
Qt
;
/* The choice of message is somewhat arbitrary, as long as
the main thread handler just ignores it. */
the main thread handler just ignores it.
*/
msg
=
WM_NULL
;
/* Interrupt any blocking system calls. */
...
...
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