aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1993-12-23 01:56:43 +0000
committerRichard M. Stallman <[email protected]>1993-12-23 01:56:43 +0000
commitb6c537745e6b9ad2065275cee1a245a208455e54 (patch)
treee036617b09e4f855efe15c12826dca1e0124a765 /src
parent5b8bcf48ed4d65ec026ac4bf1ee59cf3f225e70a (diff)
(Fsubstitute_command_keys): Ignore menu bar bindings.
(Fdocumentation_property): 3 args is maximum.
Diffstat (limited to 'src')
-rw-r--r--src/doc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/doc.c b/src/doc.c
index 499033c5f4..aee321c342 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -183,7 +183,7 @@ subcommands.)");
return doc;
}
-DEFUN ("documentation-property", Fdocumentation_property, Sdocumentation_property, 2, 2, 0,
+DEFUN ("documentation-property", Fdocumentation_property, Sdocumentation_property, 2, 3, 0,
"Return the documentation string that is SYMBOL's PROP property.\n\
This is like `get', but it can refer to strings stored in the\n\
`etc/DOC' file; and if the value is a string, it is passed through\n\
@@ -409,6 +409,8 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int
}
else if (strp[0] == '\\' && strp[1] == '[')
{
+ Lisp_Object firstkey;
+
changed = 1;
strp += 2; /* skip \[ */
start = strp;
@@ -425,6 +427,13 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int
tem = Fintern (make_string (start, length), Qnil);
tem = Fwhere_is_internal (tem, keymap, Qnil, Qt, Qnil);
+ /* Disregard menu bar bindings; it is positively annoying to
+ mention them when there's no menu bar, and it isn't terribly
+ useful even when there is a menu bar. */
+ firstkey = Faref (tem, make_number (0));
+ if (EQ (firstkey, Qmenu_bar))
+ tem = Qnil;
+
if (NILP (tem)) /* but not on any keys */
{
new = (unsigned char *) xrealloc (buf, bsize += 4);