+2001-10-08 Stefan Monnier <monnier@cs.yale.edu>
+
+ * 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 <gerd@gnu.org>
* atimer.c (alarm_signal_handler) [USG && !POSIX_SIGNALS]:
#include "dispextern.h"
#include "syntax.h"
#include "intervals.h"
+#include "keymap.h"
#include "blockinput.h"
#include "puresize.h"
#include "systime.h"
\f
-/* 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));
/* 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;
}
/* 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;
}