bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

function keys do not appear as kbd equivs on menus


From: Matt Swift
Subject: function keys do not appear as kbd equivs on menus
Date: Sun, 02 Mar 2003 13:57:01 -0500
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (i386-debian-linux-gnu)

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.2.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2002-11-06 on beth, modified by Debian
configured using `configure  i386-debian-linux-gnu --prefix=/usr/local 
--sharedstatedir=/var/lib --libexecdir=/usr/local/lib --localstatedir=/var/lib 
--infodir=/usr/local/share/info --mandir=/usr/local/share/man --with-pop=yes 
--with-x=yes --with-x-toolkit=athena --without-gif'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I have been trying to define menu-bar menus for a minor mode in which
keys are bound to a function key f5.  After much experimentation and
trying for a good while to master the labyrinth of keyboard input in
general, my conclusion is that Emacs will not pick up and display
keyboard equivalents on menus when the key sequence to invoke them
begins with a function key.  I have a vague idea that this is so
because menu items are implemented as bindings for a hierarchy of
pseudo-keys in the form of vectors, or function keys.  But other than
seeing that suspicioius connection, I cannot find any documented or
clear reason why this should be so, so I am submitting this behavior
as a bug.  The relatively short keymap below demonstrates a few
things: that Emacs will pick up and display bindings for sequences
like C-f3; that Emacs will not pick up sequences beginning with f5 (or
other function keys); and lastly that Emacs will not pick them up even
if the precise binding is supplied with a :key-sequence keyword (in
this case [f5 108] = <f5>l bound to `ox-set-subtree-level'; notice
that Emacs has stored (nil) as the 5th element of that list, meaning
it has not found a binding for that menu item -- you can see that all
the keys not bound first of all to function keys do show up there.)

The behavior is the same with 21.2 as it is with this week's 21.3.50.

     ox-minor-mode-map =>
    (keymap
     (C-f1 . hide-sublevels)
     (C-f2 . ox-hide-2-sublevels)
     (C-f3 . ox-hide-3-sublevels)
     (C-f4 . ox-hide-4-sublevels)
     (C-f5 . ox-hide-5-sublevels)
     (C-f6 . ox-hide-6-sublevels)
     (menu-bar keymap
               (ox "Ox" keymap
                   (view-surface "View Surface" keymap
                                 (MB-hide-sublevels menu-item "View top level" 
hide-sublevels
                                                    ([C-f1]
                                                     . "  (<C-f1>)")
                                                    :help "Hide all but level 
1")
                                 (MB-ox-hide-2-sublevels menu-item "View top 2 
levels" ox-hide-2-sublevels
                                                         ([C-f2]
                                                          . "  (<C-f2>)")
                                                         :help "Hide all but 
levels 1-2")
                                 (MB-ox-hide-3-sublevels menu-item "View top 3 
levels" ox-hide-3-sublevels
                                                         ([C-f3]
                                                          . "  (<C-f3>)")
                                                         :help "Hide all but 
levels 1-3")
                                 (MB-ox-hide-4-sublevels menu-item "View top 4 
levels" ox-hide-4-sublevels
                                                         ([C-f4]
                                                          . "  (<C-f4>)")
                                                         :help "Hide all but 
levels 1-4")
                                 (MB-ox-hide-5-sublevels menu-item "View top 5 
levels" ox-hide-5-sublevels
                                                         ([C-f5]
                                                          . "  (<C-f5>)")
                                                         :help "Hide all but 
levels 1-5")
                                 (MB-ox-hide-6-sublevels menu-item "View top 6 
levels" ox-hide-6-sublevels
                                                         ([C-f6]
                                                          . "  (<C-f6>)")
                                                         :help "Hide all but 
levels 1-6"))
                   (adjust-levels menu-item "--")
                   (MB-ox-inc-heading-level menu-item "Demote heading" 
ox-inc-heading-level
                                            (nil)
                                            :help "Increase level of this 
heading")
                   (MB-ox-inc-subtree-level menu-item "Demote subtree" 
ox-inc-subtree-level
                                            (nil)
                                            :help "Increase the level of 
heading and subheadings")
                   (MB-ox-dec-subtree-level menu-item "Promote subtree" 
ox-dec-subtree-level
                                            (nil)
                                            :help "Decrease the level of 
heading and subheadings")
                   (MB-ox-inc-region-subtree-level menu-item "Demote region" 
ox-inc-region-subtree-level
                                                   (nil)
                                                   :help "Increase the level of 
headings in region")
                   (MB-ox-dec-region-subtree-level menu-item "Promote region" 
ox-dec-region-subtree-level
                                                   (nil)
                                                   :help "Decrease the level of 
headings in region")
                   (set-levels menu-item "--")
                   (MB-ox-set-heading-level menu-item "Set level" 
ox-set-heading-level
                                            (nil)
                                            :help "Set level of this heading")
                   (MB-ox-set-subtree-level menu-item "Set subtree level" 
ox-set-subtree-level
                                            (nil)
                                            :help "Set the level of this 
subtree" :key-sequence
                                            [f5 108])
                   (MB-ox-set-region-subtree-level menu-item "Set region 
subtree level" ox-set-region-subtree-level
                                                   (nil)
                                                   :help "Set the level of 
subtrees in the region")
                   (MB-ox-normalize-heading menu-item "Normalize heading" 
ox-normalize-heading
                                            (nil)
                                            :help "Normalize the spacing in 
this header")
                   (MB-ox-normalize-subtree menu-item "Normalize subtree" 
ox-normalize-subtree
                                            (nil)
                                            :help "Normalize the spacing in 
this subtree")
                   (MB-ox-normalize-region menu-item "Normalize region" 
ox-normalize-region
                                           (nil)
                                           :help "Normalize the spacing in 
headings in the region")
                   (MB-ox-normalize-buffer menu-item "Normalize buffer" 
ox-normalize-buffer
                                           (nil)
                                           :help "Normalize the spacing in all 
headings in the buffer")
                   (easier-menu-1 menu-item "--")
                   (MB-ox-make-line-heading menu-item "New heading" 
ox-make-line-heading
                                            (nil)
                                            :help "Insert a new heading at 
point")
                   (MB-outline-mark-subtree menu-item "Mark subtree" 
outline-mark-subtree
                                            ([3 67108910 64]
                                             . "  (C-c C-. @)")
                                            :help "Put point at the beginning 
and the mark at the end of the current subtree")))
     (f5 keymap
         (62 . ox-inc-heading-level)
         (46 . ox-inc-heading-level)
         (60 . ox-inc-heading-level)
         (44 . ox-inc-heading-level)
         (9 . ox-inc-subtree-level)
         (backtab . ox-dec-subtree-level)
         (82 . ox-inc-region-subtree-level)
         (114 . ox-dec-region-subtree-level)
         (108 . ox-set-heading-level)
         (76 . ox-set-subtree-level)
         (12 . ox-set-region-subtree-level)
         (normalize)
         (110 . ox-normalize-heading)
         (78 . ox-normalize-subtree)
         (14 . ox-normalize-region)
         (27 keymap
             (110 . ox-normalize-buffer))
         (99 . ox-make-line-heading)
         (64 . outline-mark-subtree)))



Recent input:
t . e m c s <backspace> <backspace> a c s - d e <tab> 
<return> C-n B q B r <return> q s <down-mouse-5> <mouse-5> 
<double-down-mouse-5> <double-mouse-5> <triple-down-mouse-5> 
<triple-mouse-5> <triple-down-mouse-5> <triple-mouse-5> 
<triple-down-mouse-5> <triple-mouse-5> <triple-down-mouse-5> 
<triple-mouse-5> <triple-down-mouse-5> <triple-mouse-5> 
<triple-down-mouse-5> <triple-mouse-5> <triple-down-mouse-5> 
<triple-mouse-5> <prior> <prior> <prior> <down-mouse-5> 
<mouse-5> <double-down-mouse-5> <double-mouse-5> <down-mouse-1> 
<mouse-1> <return> <return> <down> <down> <down> <return> 
q <up> <up> <up> <down> <down> g <up> <up> <up> <up> 
<up> <up> <up> <up> <return> <return> n M-1 q M-x r 
e p o r t - e m a c x - <backspace> <backspace> s - 
b u g <tab> <return>

Recent messages:
1 -> require: sort
1 <- require: sort
Auto-saving...done
1 -> require: nnml
1 <- require: nnml

Loading emacsbug...
1 -> require: sendmail
1 <- require: sendmail
Loading emacsbug...done




reply via email to

[Prev in Thread] Current Thread [Next in Thread]