1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
emacs/etc/images/ctrl.pbm
Po Lu 8ed8f08ed2 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.
2023-07-04 16:40:20 +08:00

104 B