aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-01-10 21:30:25 +0000
committerRichard M. Stallman1994-01-10 21:30:25 +0000
commitaf1d6f09ce1b864c69bec7829a594f45e65ae8cb (patch)
tree3701ac92853c4f130c6aafc35e99a2650f773427 /src
parentf8ba73c1c26cbf20baeb53ad474682519649fcc7 (diff)
downloademacs-af1d6f09ce1b864c69bec7829a594f45e65ae8cb.tar.gz
emacs-af1d6f09ce1b864c69bec7829a594f45e65ae8cb.zip
(describe_map_tree): New arg NOMENU.
(describe_buffer_bindings): Pass new arg.
Diffstat (limited to 'src')
-rw-r--r--src/keymap.c34
1 files changed, 28 insertions, 6 deletions
diff --git a/src/keymap.c b/src/keymap.c
index d2a2f4f189c..23cef9a0c87 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -938,7 +938,7 @@ KEY is a key sequence (a string or vector of characters or event types).\n\
938Non-ASCII characters with codes above 127 (such as ISO Latin-1)\n\ 938Non-ASCII characters with codes above 127 (such as ISO Latin-1)\n\
939can be included if you use a vector.\n\ 939can be included if you use a vector.\n\
940The binding goes in the current buffer's local map,\n\ 940The binding goes in the current buffer's local map,\n\
941which is shared with other buffers in the same major mode.") 941which in most cases is shared with all other buffers in the same major mode.")
942 (keys, function) 942 (keys, function)
943 Lisp_Object keys, function; 943 Lisp_Object keys, function;
944{ 944{
@@ -1761,7 +1761,7 @@ nominal alternate\n\
1761 p += sizeof (" Minor Mode Bindings"); 1761 p += sizeof (" Minor Mode Bindings");
1762 *p = 0; 1762 *p = 0;
1763 1763
1764 describe_map_tree (maps[i], 0, shadow, prefix, title); 1764 describe_map_tree (maps[i], 0, shadow, prefix, title, 0);
1765 shadow = Fcons (maps[i], shadow); 1765 shadow = Fcons (maps[i], shadow);
1766 } 1766 }
1767 } 1767 }
@@ -1771,12 +1771,12 @@ nominal alternate\n\
1771 if (!NILP (start1)) 1771 if (!NILP (start1))
1772 { 1772 {
1773 describe_map_tree (start1, 0, shadow, prefix, 1773 describe_map_tree (start1, 0, shadow, prefix,
1774 "Major Mode Bindings"); 1774 "Major Mode Bindings", 0);
1775 shadow = Fcons (start1, shadow); 1775 shadow = Fcons (start1, shadow);
1776 } 1776 }
1777 1777
1778 describe_map_tree (current_global_map, 0, shadow, prefix, 1778 describe_map_tree (current_global_map, 0, shadow, prefix,
1779 "Global Bindings"); 1779 "Global Bindings", 0);
1780 1780
1781 Fset_buffer (descbuf); 1781 Fset_buffer (descbuf);
1782 return Qnil; 1782 return Qnil;
@@ -1790,13 +1790,15 @@ nominal alternate\n\
1790 don't mention keys which would be shadowed by any of them. 1790 don't mention keys which would be shadowed by any of them.
1791 PREFIX, if non-nil, says mention only keys that start with PREFIX. 1791 PREFIX, if non-nil, says mention only keys that start with PREFIX.
1792 TITLE, if not 0, is a string to insert at the beginning. 1792 TITLE, if not 0, is a string to insert at the beginning.
1793 TITLE should not end with a colon or a newline; we supply that. */ 1793 TITLE should not end with a colon or a newline; we supply that.
1794 If NOMENU is not 0, then omit menu-bar commands. */
1794 1795
1795void 1796void
1796describe_map_tree (startmap, partial, shadow, prefix, title) 1797describe_map_tree (startmap, partial, shadow, prefix, title, nomenu)
1797 Lisp_Object startmap, shadow, prefix; 1798 Lisp_Object startmap, shadow, prefix;
1798 int partial; 1799 int partial;
1799 char *title; 1800 char *title;
1801 int nomenu;
1800{ 1802{
1801 Lisp_Object maps; 1803 Lisp_Object maps;
1802 struct gcpro gcpro1; 1804 struct gcpro gcpro1;
@@ -1809,6 +1811,26 @@ key binding\n\
1809 maps = Faccessible_keymaps (startmap, prefix); 1811 maps = Faccessible_keymaps (startmap, prefix);
1810 GCPRO1 (maps); 1812 GCPRO1 (maps);
1811 1813
1814 if (nomenu)
1815 {
1816 Lisp_Object list;
1817
1818 /* Delete from MAPS each element that is for the menu bar. */
1819 for (list = maps; !NILP (list); list = XCONS (list)->cdr)
1820 {
1821 Lisp_Object elt, prefix, tem;
1822
1823 elt = Fcar (list);
1824 prefix = Fcar (elt);
1825 if (XVECTOR (prefix)->size >= 1)
1826 {
1827 tem = Faref (prefix, make_number (0));
1828 if (EQ (tem, Qmenu_bar))
1829 maps = Fdelq (elt, maps);
1830 }
1831 }
1832 }
1833
1812 if (!NILP (maps)) 1834 if (!NILP (maps))
1813 { 1835 {
1814 if (title) 1836 if (title)