summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2008-04-09 03:29:46 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2008-04-09 03:29:46 +0000
commit5c4cc82aeb11c15e591ec0ad51225db6d384a338 (patch)
treeda3cfbb5b8bdd0d598eb1597073499bdb43577a8 /src
parent9b2cd403209d7fa25b310b29a2f0a570865fbbb3 (diff)
downloademacs-5c4cc82aeb11c15e591ec0ad51225db6d384a338.tar.gz
emacs-5c4cc82aeb11c15e591ec0ad51225db6d384a338.tar.bz2
emacs-5c4cc82aeb11c15e591ec0ad51225db6d384a338.zip
(Qdeactivate_mark): New var.
(command_loop_1): Use it to call `deactivate-mark'. (syms_of_keyboard): Initialize it.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/keyboard.c17
2 files changed, 10 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 68e50dd376f..81106ff2417 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
2008-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
+ * keyboard.c (Qdeactivate_mark): New var.
+ (command_loop_1): Use it to call `deactivate-mark'.
+ (syms_of_keyboard): Initialize it.
+
* xdisp.c (redisplay_internal): Reset tty's color_mode when switching
to another frame.
* frame.c (do_switch_frame): Refine the top_frame/async_visible code.
diff --git a/src/keyboard.c b/src/keyboard.c
index 54a626268a2..bb65acbbde7 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -397,6 +397,7 @@ Lisp_Object Vinput_method_previous_message;
/* Non-nil means deactivate the mark at end of this command. */
Lisp_Object Vdeactivate_mark;
+Lisp_Object Qdeactivate_mark;
/* Menu bar specified in Lucid Emacs fashion. */
@@ -1977,17 +1978,8 @@ command_loop_1 ()
else if (EQ (Vtransient_mark_mode, Qonly))
Vtransient_mark_mode = Qidentity;
- if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode))
- {
- /* We could also call `deactivate'mark'. */
- if (EQ (Vtransient_mark_mode, Qlambda))
- Vtransient_mark_mode = Qnil;
- else
- {
- current_buffer->mark_active = Qnil;
- call1 (Vrun_hooks, intern ("deactivate-mark-hook"));
- }
- }
+ if (!NILP (Vdeactivate_mark))
+ call0 (Qdeactivate_mark);
else if (current_buffer != prev_buffer || MODIFF != prev_modiff)
call1 (Vrun_hooks, intern ("activate-mark-hook"));
}
@@ -2039,6 +2031,7 @@ adjust_point_for_property (last_pt, modified)
can't be usefully combined anyway. */
while (check_composition || check_display || check_invisible)
{
+ /* FIXME: check `intangible'. */
if (check_composition
&& PT > BEGV && PT < ZV
&& get_property_and_range (PT, Qcomposition, &val, &beg, &end, Qnil)
@@ -12283,6 +12276,8 @@ The command loop sets this to nil before each command,
and tests the value when the command returns.
Buffer modification stores t in this variable. */);
Vdeactivate_mark = Qnil;
+ Qdeactivate_mark = intern ("deactivate-mark");
+ staticpro (&Qdeactivate_mark);
DEFVAR_LISP ("command-hook-internal", &Vcommand_hook_internal,
doc: /* Temporary storage of pre-command-hook or post-command-hook. */);