diff options
| author | Stefan Monnier | 2008-04-09 03:29:46 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-04-09 03:29:46 +0000 |
| commit | 5c4cc82aeb11c15e591ec0ad51225db6d384a338 (patch) | |
| tree | da3cfbb5b8bdd0d598eb1597073499bdb43577a8 | |
| parent | 9b2cd403209d7fa25b310b29a2f0a570865fbbb3 (diff) | |
| download | emacs-5c4cc82aeb11c15e591ec0ad51225db6d384a338.tar.gz emacs-5c4cc82aeb11c15e591ec0ad51225db6d384a338.zip | |
(Qdeactivate_mark): New var.
(command_loop_1): Use it to call `deactivate-mark'.
(syms_of_keyboard): Initialize it.
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/keyboard.c | 17 |
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 @@ | |||
| 1 | 2008-04-09 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2008-04-09 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * keyboard.c (Qdeactivate_mark): New var. | ||
| 4 | (command_loop_1): Use it to call `deactivate-mark'. | ||
| 5 | (syms_of_keyboard): Initialize it. | ||
| 6 | |||
| 3 | * xdisp.c (redisplay_internal): Reset tty's color_mode when switching | 7 | * xdisp.c (redisplay_internal): Reset tty's color_mode when switching |
| 4 | to another frame. | 8 | to another frame. |
| 5 | * frame.c (do_switch_frame): Refine the top_frame/async_visible code. | 9 | * 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; | |||
| 397 | 397 | ||
| 398 | /* Non-nil means deactivate the mark at end of this command. */ | 398 | /* Non-nil means deactivate the mark at end of this command. */ |
| 399 | Lisp_Object Vdeactivate_mark; | 399 | Lisp_Object Vdeactivate_mark; |
| 400 | Lisp_Object Qdeactivate_mark; | ||
| 400 | 401 | ||
| 401 | /* Menu bar specified in Lucid Emacs fashion. */ | 402 | /* Menu bar specified in Lucid Emacs fashion. */ |
| 402 | 403 | ||
| @@ -1977,17 +1978,8 @@ command_loop_1 () | |||
| 1977 | else if (EQ (Vtransient_mark_mode, Qonly)) | 1978 | else if (EQ (Vtransient_mark_mode, Qonly)) |
| 1978 | Vtransient_mark_mode = Qidentity; | 1979 | Vtransient_mark_mode = Qidentity; |
| 1979 | 1980 | ||
| 1980 | if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode)) | 1981 | if (!NILP (Vdeactivate_mark)) |
| 1981 | { | 1982 | call0 (Qdeactivate_mark); |
| 1982 | /* We could also call `deactivate'mark'. */ | ||
| 1983 | if (EQ (Vtransient_mark_mode, Qlambda)) | ||
| 1984 | Vtransient_mark_mode = Qnil; | ||
| 1985 | else | ||
| 1986 | { | ||
| 1987 | current_buffer->mark_active = Qnil; | ||
| 1988 | call1 (Vrun_hooks, intern ("deactivate-mark-hook")); | ||
| 1989 | } | ||
| 1990 | } | ||
| 1991 | else if (current_buffer != prev_buffer || MODIFF != prev_modiff) | 1983 | else if (current_buffer != prev_buffer || MODIFF != prev_modiff) |
| 1992 | call1 (Vrun_hooks, intern ("activate-mark-hook")); | 1984 | call1 (Vrun_hooks, intern ("activate-mark-hook")); |
| 1993 | } | 1985 | } |
| @@ -2039,6 +2031,7 @@ adjust_point_for_property (last_pt, modified) | |||
| 2039 | can't be usefully combined anyway. */ | 2031 | can't be usefully combined anyway. */ |
| 2040 | while (check_composition || check_display || check_invisible) | 2032 | while (check_composition || check_display || check_invisible) |
| 2041 | { | 2033 | { |
| 2034 | /* FIXME: check `intangible'. */ | ||
| 2042 | if (check_composition | 2035 | if (check_composition |
| 2043 | && PT > BEGV && PT < ZV | 2036 | && PT > BEGV && PT < ZV |
| 2044 | && get_property_and_range (PT, Qcomposition, &val, &beg, &end, Qnil) | 2037 | && get_property_and_range (PT, Qcomposition, &val, &beg, &end, Qnil) |
| @@ -12283,6 +12276,8 @@ The command loop sets this to nil before each command, | |||
| 12283 | and tests the value when the command returns. | 12276 | and tests the value when the command returns. |
| 12284 | Buffer modification stores t in this variable. */); | 12277 | Buffer modification stores t in this variable. */); |
| 12285 | Vdeactivate_mark = Qnil; | 12278 | Vdeactivate_mark = Qnil; |
| 12279 | Qdeactivate_mark = intern ("deactivate-mark"); | ||
| 12280 | staticpro (&Qdeactivate_mark); | ||
| 12286 | 12281 | ||
| 12287 | DEFVAR_LISP ("command-hook-internal", &Vcommand_hook_internal, | 12282 | DEFVAR_LISP ("command-hook-internal", &Vcommand_hook_internal, |
| 12288 | doc: /* Temporary storage of pre-command-hook or post-command-hook. */); | 12283 | doc: /* Temporary storage of pre-command-hook or post-command-hook. */); |