Mercurial > emacs
comparison src/keyboard.c @ 105758:b61f0f08b8e1
* keyboard.c (read_char_x_menu_prompt): Don't demand a prompt
string in menu maps (Bug#4471).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 25 Oct 2009 00:40:13 +0000 |
parents | 68dd71358159 |
children | 21bdda3ded62 |
comparison
equal
deleted
inserted
replaced
105757:56b02500dbd1 | 105758:b61f0f08b8e1 |
---|---|
8559 Lisp_Object *maps; | 8559 Lisp_Object *maps; |
8560 Lisp_Object prev_event; | 8560 Lisp_Object prev_event; |
8561 int *used_mouse_menu; | 8561 int *used_mouse_menu; |
8562 { | 8562 { |
8563 int mapno; | 8563 int mapno; |
8564 register Lisp_Object name = Qnil; | |
8565 | 8564 |
8566 if (used_mouse_menu) | 8565 if (used_mouse_menu) |
8567 *used_mouse_menu = 0; | 8566 *used_mouse_menu = 0; |
8568 | 8567 |
8569 /* Use local over global Menu maps */ | 8568 /* Use local over global Menu maps */ |
8575 if (inhibit_local_menu_bar_menus) | 8574 if (inhibit_local_menu_bar_menus) |
8576 { | 8575 { |
8577 maps += (nmaps - 1); | 8576 maps += (nmaps - 1); |
8578 nmaps = 1; | 8577 nmaps = 1; |
8579 } | 8578 } |
8580 | |
8581 /* Get the menu name from the first map that has one (a prompt string). */ | |
8582 for (mapno = 0; mapno < nmaps; mapno++) | |
8583 { | |
8584 name = Fkeymap_prompt (maps[mapno]); | |
8585 if (!NILP (name)) | |
8586 break; | |
8587 } | |
8588 | |
8589 /* If we don't have any menus, just read a character normally. */ | |
8590 if (!STRINGP (name)) | |
8591 return Qnil; | |
8592 | 8579 |
8593 #ifdef HAVE_MENUS | 8580 #ifdef HAVE_MENUS |
8594 /* If we got to this point via a mouse click, | 8581 /* If we got to this point via a mouse click, |
8595 use a real menu for mouse selection. */ | 8582 use a real menu for mouse selection. */ |
8596 if (EVENT_HAS_PARAMETERS (prev_event) | 8583 if (EVENT_HAS_PARAMETERS (prev_event) |