]> git.eshelyaron.com Git - emacs.git/commit
Implement a tool bar containing modifier keys
authorPo Lu <luangruo@yahoo.com>
Tue, 4 Jul 2023 08:40:20 +0000 (16:40 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 4 Jul 2023 08:40:20 +0000 (16:40 +0800)
commit8ed8f08ed2ff297754d6db83983d3f8f2822c599
tree4e5545280bc671f4d9952cc70826b86ce6c76b18
parent2963924d803e2d0247169f477c31d4c91281928b
Implement a tool bar containing modifier keys

* doc/emacs/frames.texi (Tool Bars): Describe modifier bars.
* doc/lispref/keymaps.texi (Extended Menu Items, Tool Bar):
Document changes to tool bar menu item handling and secondary
tool bars.
* etc/NEWS: Announce changes.
* lisp/simple.el (event-apply-modifier): Correctly apply Ctrl
and Shift modifiers to lower case ASCII key events that already
have other modifiers applied.
* lisp/tool-bar.el (tool-bar--cache-key)
(tool-bar--secondary-cache-key): New defsubsts.
(tool-bar--flush-cache): Flush secondary tool bar cache.
(tool-bar-make-keymap): Include secondary tool bar if necessary.
(tool-bar-make-keymap-1): New arg MAP.  Generate a keymap for
that map if specified, else default to tool-bar-map.
(set-text-conversion-style, tool-bar-apply-modifiers)
(overriding-text-conversion-style)
(tool-bar-event-apply-alt-modifier)
(tool-bar-event-apply-super-modifier)
(tool-bar-event-apply-hyper-modifier)
(tool-bar-event-apply-shift-modifier)
(tool-bar-event-apply-control-modifier)
(tool-bar-event-apply-meta-modifier, modifier-bar-mode): New
functions.
* src/dispextern.h (enum tool_bar_item_idx): Add
TOOL_BAR_ITEM_WRAP.
* src/frame.c (make_frame): Clear new field `tool_bar_wraps_p'.
* src/frame.h (struct frame): New field `tool_bar_wraps_p'.
* src/keyboard.c (parse_tool_bar_item): Handle QCwrap properties
in tool bar menu items.
(syms_of_keyboard): New defsym QCwrap.
* src/xdisp.c (build_desired_tool_bar_string): Clear
f->tool_bar_wraps_p and set it appropriately.  Insert new line
characters in the tool bar string upon encountering a wrap
character.
(display_tool_bar_line): Stop at EOB, not line end.  Reseat on
the next line upon encountering EOL characters.
(redisplay_tool_bar): Allow rows to be different heights if
explicit new lines are present upon the tool bar string.
16 files changed:
doc/emacs/frames.texi
doc/lispref/keymaps.texi
etc/NEWS
etc/images/alt.pbm [new file with mode: 0644]
etc/images/ctrl.pbm [new file with mode: 0644]
etc/images/hyper.pbm [new file with mode: 0644]
etc/images/meta.pbm [new file with mode: 0644]
etc/images/shift.pbm [new file with mode: 0644]
etc/images/super.pbm [new file with mode: 0644]
lisp/simple.el
lisp/tool-bar.el
src/dispextern.h
src/frame.c
src/frame.h
src/keyboard.c
src/xdisp.c