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
03d18690
Commit
03d18690
authored
May 13, 1994
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(save_excursion_restore): Don't run activate-mark-hook
if mark position is unchanged.
parent
8b550e92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/editfns.c
src/editfns.c
+10
-2
No files found.
src/editfns.c
View file @
03d18690
...
...
@@ -295,7 +295,7 @@ Lisp_Object
save_excursion_restore
(
info
)
register
Lisp_Object
info
;
{
register
Lisp_Object
tem
,
tem1
;
register
Lisp_Object
tem
,
tem1
,
omark
,
nmark
;
tem
=
Fmarker_buffer
(
Fcar
(
info
));
/* If buffer being returned to is now deleted, avoid error */
...
...
@@ -309,7 +309,9 @@ save_excursion_restore (info)
Fgoto_char
(
tem
);
unchain_marker
(
tem
);
tem
=
Fcar
(
Fcdr
(
info
));
omark
=
Fmarker_position
(
current_buffer
->
mark
);
Fset_marker
(
current_buffer
->
mark
,
tem
,
Fcurrent_buffer
());
nmark
=
Fmarker_position
(
tem
);
unchain_marker
(
tem
);
tem
=
Fcdr
(
Fcdr
(
info
));
#if 0 /* We used to make the current buffer visible in the selected window
...
...
@@ -326,8 +328,14 @@ save_excursion_restore (info)
current_buffer
->
mark_active
=
Fcdr
(
tem
);
if
(
!
NILP
(
Vrun_hooks
))
{
/* If mark is active now, and either was not active
or was at a different place, run the activate hook. */
if
(
!
NILP
(
current_buffer
->
mark_active
))
call1
(
Vrun_hooks
,
intern
(
"activate-mark-hook"
));
{
if
(
!
EQ
(
omark
,
nmark
))
call1
(
Vrun_hooks
,
intern
(
"activate-mark-hook"
));
}
/* If mark has ceased to be active, run deactivate hook. */
else
if
(
!
NILP
(
tem1
))
call1
(
Vrun_hooks
,
intern
(
"deactivate-mark-hook"
));
}
...
...
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