From bdb7aa47e4797b9b7ad88f09d4513c14e6303a0c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 8 Oct 2001 11:13:04 +0000 Subject: [PATCH] (map_prompt): Remove. (read_char_x_menu_prompt, read_char_minibuf_menu_prompt): Use Fkeymap_prompt. --- src/ChangeLog | 12 ++++++++++++ src/keyboard.c | 24 +++--------------------- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 823289fa6cf..a77a8e367d5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2001-10-08 Stefan Monnier + + * xmenu.c (keymap_panes, Fx_popup_menu): Use Fkeymap_prompt. + + * w32menu.c (keymap_panes, Fx_popup_menu): Use Fkeymap_prompt. + + * keyboard.c (map_prompt): Remove. + (read_char_x_menu_prompt, read_char_minibuf_menu_prompt): + Use Fkeymap_prompt. + + * keymap.h: New file. Extracted from lisp.h. + 2001-10-08 Gerd Moellmann * atimer.c (alarm_signal_handler) [USG && !POSIX_SIGNALS]: diff --git a/src/keyboard.c b/src/keyboard.c index 6319ca2ff64..0ebee3d3902 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -37,6 +37,7 @@ Boston, MA 02111-1307, USA. */ #include "dispextern.h" #include "syntax.h" #include "intervals.h" +#include "keymap.h" #include "blockinput.h" #include "puresize.h" #include "systime.h" @@ -6338,25 +6339,6 @@ reinvoke_input_signal () -/* Return the prompt-string of a sparse keymap. - This is the first element which is a string. - Return nil if there is none. */ - -Lisp_Object -map_prompt (map) - Lisp_Object map; -{ - while (CONSP (map)) - { - register Lisp_Object tem; - tem = Fcar (map); - if (STRINGP (tem)) - return tem; - map = Fcdr (map); - } - return Qnil; -} - static void menu_bar_item P_ ((Lisp_Object, Lisp_Object)); static void menu_bar_one_keymap P_ ((Lisp_Object)); @@ -7446,7 +7428,7 @@ read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu) /* Get the menu name from the first map that has one (a prompt string). */ for (mapno = 0; mapno < nmaps; mapno++) { - name = map_prompt (maps[mapno]); + name = Fkeymap_prompt (maps[mapno]); if (!NILP (name)) break; } @@ -7556,7 +7538,7 @@ read_char_minibuf_menu_prompt (commandflag, nmaps, maps) /* Get the menu name from the first map that has one (a prompt string). */ for (mapno = 0; mapno < nmaps; mapno++) { - name = map_prompt (maps[mapno]); + name = Fkeymap_prompt (maps[mapno]); if (!NILP (name)) break; } -- 2.39.2