aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2007-03-07 02:13:26 +0000
committerStefan Monnier2007-03-07 02:13:26 +0000
commitd9d7b298650b04290fb37ce06a13bdc797d741f5 (patch)
treed58d36440b9a2e2e8eeb5ba4be084ef3adef46e1
parentdc9b75ac40ebca6586da6ebf0e601744adbde71f (diff)
downloademacs-d9d7b298650b04290fb37ce06a13bdc797d741f5.tar.gz
emacs-d9d7b298650b04290fb37ce06a13bdc797d741f5.zip
(read_minibuf): Bind inhibit-read-only a bit longer so as
to handle correctly prompts with read-only property.
-rw-r--r--src/ChangeLog27
-rw-r--r--src/minibuf.c36
2 files changed, 33 insertions, 30 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 76dbb289120..fb36fff06ce 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12007-03-07 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * minibuf.c (read_minibuf): Bind inhibit-read-only a bit longer so as
4 to handle correctly prompts with read-only property.
5
12007-03-06 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 62007-03-06 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 7
3 * sound.c (wav_play): Check header->data_length to see how much we 8 * sound.c (wav_play): Check header->data_length to see how much we
@@ -29,8 +34,7 @@
29 34
302007-03-02 Stuart D. Herring <herring@lanl.gov> 352007-03-02 Stuart D. Herring <herring@lanl.gov>
31 36
32 * keymap.c (Fkey_binding): Don't consider one-element lists as 37 * keymap.c (Fkey_binding): Don't consider one-element lists as events.
33 events.
34 38
352007-03-01 Kenichi Handa <handa@m17n.org> 392007-03-01 Kenichi Handa <handa@m17n.org>
36 40
@@ -59,8 +63,8 @@
59 (x_scroll_bar_create, XTset_vertical_scroll_bar) 63 (x_scroll_bar_create, XTset_vertical_scroll_bar)
60 [USE_TOOLKIT_SCROLL_BARS]: Initialize bar->min_handle. 64 [USE_TOOLKIT_SCROLL_BARS]: Initialize bar->min_handle.
61 65
62 * macterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS]: New 66 * macterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS]:
63 member `min_handle'. 67 New member `min_handle'.
64 68
652007-02-23 Kim F. Storm <storm@cua.dk> 692007-02-23 Kim F. Storm <storm@cua.dk>
66 70
@@ -83,11 +87,11 @@
83 (mac_flush_display_optional) [USE_CG_DRAWING]: New function. 87 (mac_flush_display_optional) [USE_CG_DRAWING]: New function.
84 (x_redisplay_interface) [USE_CG_DRAWING]: Set it as handler for 88 (x_redisplay_interface) [USE_CG_DRAWING]: Set it as handler for
85 flush_display_optional. 89 flush_display_optional.
86 [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_press): New 90 [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_press):
87 argument MOUSE_POS. All uses changed. Set bar->dragging to 91 New argument MOUSE_POS. All uses changed. Set bar->dragging to
88 negative integer if scroll bar handle is pressed. 92 negative integer if scroll bar handle is pressed.
89 [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_release): Negative 93 [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_release):
90 bar->dragging means scroll bar handle is not dragged. 94 Negative bar->dragging means scroll bar handle is not dragged.
91 [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_drag): Get initial 95 [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_drag): Get initial
92 offset of scroll bar handle from negative bar->dragging. 96 offset of scroll bar handle from negative bar->dragging.
93 (XTread_socket) [USE_TOOLKIT_SCROLL_BARS]: Modifiers for scroll 97 (XTread_socket) [USE_TOOLKIT_SCROLL_BARS]: Modifiers for scroll
@@ -122,8 +126,7 @@
122 126
123 * w32menu.c (current_popup_menu): Make available globally. 127 * w32menu.c (current_popup_menu): Make available globally.
124 (menubar_selection_callback): Free menu strings before pushing the 128 (menubar_selection_callback): Free menu strings before pushing the
125 menu event into the keyboard buffer. Remove 129 menu event into the keyboard buffer. Remove menu_command_in_progress.
126 menu_command_in_progress.
127 130
128 * w32fns.c (current_popup_menu): Use from w32menu.c. 131 * w32fns.c (current_popup_menu): Use from w32menu.c.
129 (w32_wnd_proc) [WM_EXITMENULOOP, WM_TIMER]: Use menubar_active 132 (w32_wnd_proc) [WM_EXITMENULOOP, WM_TIMER]: Use menubar_active
@@ -393,8 +396,8 @@
393 396
3942007-01-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 3972007-01-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
395 398
396 * macmenu.c (create_and_show_dialog) [TARGET_API_MAC_CARBON]: Use 399 * macmenu.c (create_and_show_dialog) [TARGET_API_MAC_CARBON]:
397 DisableControl for disabled items. Set default button to first 400 Use DisableControl for disabled items. Set default button to first
398 enabled one. Use icon of application in execution. 401 enabled one. Use icon of application in execution.
399 402
4002007-01-13 Eli Zaretskii <eliz@gnu.org> 4032007-01-13 Eli Zaretskii <eliz@gnu.org>
diff --git a/src/minibuf.c b/src/minibuf.c
index 667799bf170..5bb91cf7348 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -700,27 +700,27 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
700 specbind (Qinhibit_read_only, Qt); 700 specbind (Qinhibit_read_only, Qt);
701 specbind (Qinhibit_modification_hooks, Qt); 701 specbind (Qinhibit_modification_hooks, Qt);
702 Ferase_buffer (); 702 Ferase_buffer ();
703
704 if (!NILP (current_buffer->enable_multibyte_characters)
705 && ! STRING_MULTIBYTE (minibuf_prompt))
706 minibuf_prompt = Fstring_make_multibyte (minibuf_prompt);
707
708 /* Insert the prompt, record where it ends. */
709 Finsert (1, &minibuf_prompt);
710 if (PT > BEG)
711 {
712 Fput_text_property (make_number (BEG), make_number (PT),
713 Qfront_sticky, Qt, Qnil);
714 Fput_text_property (make_number (BEG), make_number (PT),
715 Qrear_nonsticky, Qt, Qnil);
716 Fput_text_property (make_number (BEG), make_number (PT),
717 Qfield, Qt, Qnil);
718 Fadd_text_properties (make_number (BEG), make_number (PT),
719 Vminibuffer_prompt_properties, Qnil);
720 }
703 unbind_to (count1, Qnil); 721 unbind_to (count1, Qnil);
704 } 722 }
705 723
706 if (!NILP (current_buffer->enable_multibyte_characters)
707 && ! STRING_MULTIBYTE (minibuf_prompt))
708 minibuf_prompt = Fstring_make_multibyte (minibuf_prompt);
709
710 /* Insert the prompt, record where it ends. */
711 Finsert (1, &minibuf_prompt);
712 if (PT > BEG)
713 {
714 Fput_text_property (make_number (BEG), make_number (PT),
715 Qfront_sticky, Qt, Qnil);
716 Fput_text_property (make_number (BEG), make_number (PT),
717 Qrear_nonsticky, Qt, Qnil);
718 Fput_text_property (make_number (BEG), make_number (PT),
719 Qfield, Qt, Qnil);
720 Fadd_text_properties (make_number (BEG), make_number (PT),
721 Vminibuffer_prompt_properties, Qnil);
722 }
723
724 minibuf_prompt_width = (int) current_column (); /* iftc */ 724 minibuf_prompt_width = (int) current_column (); /* iftc */
725 725
726 /* Put in the initial input. */ 726 /* Put in the initial input. */