On Tue, Nov 16, 2021 at 01:36:53AM +0100, Dominik Vogt wrote:
> This is the full set of patches for splitting the man page, to be
> applied to master.

Second attempt.  The style docs are not moved aound in the man
page.  The .section files have been renamed to .ad because
asciidoc only evaluates "ifdef" in included files if they have a
known extesion.  ".adoc" cannot be used because the pattern rules
in the Makefile.am would conflict.

The patch stack has been reshuffled and patches have heen merged,
and two new ones on top have been added.

0001: Man page split (only one patch now)
0002,3,4: General cleanup in man page.
0005: (new) Remove "open look" and "xview" from man page.
0006: (new) Remove "GlobalOpts" from man page, code and oteher files.

Ciao

Dominik ^_^  ^_^

--

Dominik Vogt
From de749130845071272c41c34e84de2ebd8e6dc61d Mon Sep 17 00:00:00 2001
From: Dominik Vogt <dominik.v...@gmx.de>
Date: Mon, 15 Nov 2021 16:52:38 +0100
Subject: [PATCH 1/6] Split main man page.

fvwm3.1 basic documentation
fvwm3commands.1 command documentation
fvwm3all.1 all documentation
fvwm3menus.1 menu documentation
---
 doc/.gitignore                                |   1 +
 doc/{modules => }/FvwmAnimate.adoc            |   0
 doc/{modules => }/FvwmAuto.adoc               |   0
 doc/{modules => }/FvwmBacker.adoc             |   0
 doc/{modules => }/FvwmButtons.adoc            |   0
 doc/{bin => }/FvwmCommand.adoc                |   0
 doc/{modules => }/FvwmConsole.adoc            |   0
 doc/{modules => }/FvwmEvent.adoc              |   0
 doc/{modules => }/FvwmForm.adoc               |   0
 doc/{modules => }/FvwmIconMan.adoc            |   0
 doc/{modules => }/FvwmIdent.adoc              |   0
 doc/{modules => }/FvwmMFL.adoc                |   0
 doc/{modules => }/FvwmPager.adoc              |   0
 doc/{modules => }/FvwmPerl.adoc               |   0
 doc/{bin => }/FvwmPrompt.adoc                 |   0
 doc/{modules => }/FvwmRearrange.adoc          |   0
 doc/{modules => }/FvwmScript.adoc             |   0
 doc/Makefile.am                               |  61 +-
 doc/README                                    |   8 -
 doc/{bin => }/fvwm-config.adoc                |   0
 doc/{bin => }/fvwm-convert-2.6.adoc           |   0
 doc/{bin => }/fvwm-menu-desktop.adoc          |   0
 doc/{bin => }/fvwm-root.adoc                  |   0
 doc/fvwm3.adoc                                |   7 +
 .../fvwm3.adoc => fvwm3_manpage_source.adoc}  | 545 +++++++++---------
 doc/fvwm3all.adoc                             |   7 +
 doc/fvwm3commands.adoc                        |   7 +
 doc/fvwm3menus.adoc                           |   7 +
 doc/fvwm3styles.adoc                          |   7 +
 29 files changed, 350 insertions(+), 300 deletions(-)
 create mode 100644 doc/.gitignore
 rename doc/{modules => }/FvwmAnimate.adoc (100%)
 rename doc/{modules => }/FvwmAuto.adoc (100%)
 rename doc/{modules => }/FvwmBacker.adoc (100%)
 rename doc/{modules => }/FvwmButtons.adoc (100%)
 rename doc/{bin => }/FvwmCommand.adoc (100%)
 rename doc/{modules => }/FvwmConsole.adoc (100%)
 rename doc/{modules => }/FvwmEvent.adoc (100%)
 rename doc/{modules => }/FvwmForm.adoc (100%)
 rename doc/{modules => }/FvwmIconMan.adoc (100%)
 rename doc/{modules => }/FvwmIdent.adoc (100%)
 rename doc/{modules => }/FvwmMFL.adoc (100%)
 rename doc/{modules => }/FvwmPager.adoc (100%)
 rename doc/{modules => }/FvwmPerl.adoc (100%)
 rename doc/{bin => }/FvwmPrompt.adoc (100%)
 rename doc/{modules => }/FvwmRearrange.adoc (100%)
 rename doc/{modules => }/FvwmScript.adoc (100%)
 rename doc/{bin => }/fvwm-config.adoc (100%)
 rename doc/{bin => }/fvwm-convert-2.6.adoc (100%)
 rename doc/{bin => }/fvwm-menu-desktop.adoc (100%)
 rename doc/{bin => }/fvwm-root.adoc (100%)
 create mode 100644 doc/fvwm3.adoc
 rename doc/{fvwm3/fvwm3.adoc => fvwm3_manpage_source.adoc} (99%)
 create mode 100644 doc/fvwm3all.adoc
 create mode 100644 doc/fvwm3commands.adoc
 create mode 100644 doc/fvwm3menus.adoc
 create mode 100644 doc/fvwm3styles.adoc

diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 00000000..38ff07fe
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1 @@
+/*.ad
diff --git a/doc/modules/FvwmAnimate.adoc b/doc/FvwmAnimate.adoc
similarity index 100%
rename from doc/modules/FvwmAnimate.adoc
rename to doc/FvwmAnimate.adoc
diff --git a/doc/modules/FvwmAuto.adoc b/doc/FvwmAuto.adoc
similarity index 100%
rename from doc/modules/FvwmAuto.adoc
rename to doc/FvwmAuto.adoc
diff --git a/doc/modules/FvwmBacker.adoc b/doc/FvwmBacker.adoc
similarity index 100%
rename from doc/modules/FvwmBacker.adoc
rename to doc/FvwmBacker.adoc
diff --git a/doc/modules/FvwmButtons.adoc b/doc/FvwmButtons.adoc
similarity index 100%
rename from doc/modules/FvwmButtons.adoc
rename to doc/FvwmButtons.adoc
diff --git a/doc/bin/FvwmCommand.adoc b/doc/FvwmCommand.adoc
similarity index 100%
rename from doc/bin/FvwmCommand.adoc
rename to doc/FvwmCommand.adoc
diff --git a/doc/modules/FvwmConsole.adoc b/doc/FvwmConsole.adoc
similarity index 100%
rename from doc/modules/FvwmConsole.adoc
rename to doc/FvwmConsole.adoc
diff --git a/doc/modules/FvwmEvent.adoc b/doc/FvwmEvent.adoc
similarity index 100%
rename from doc/modules/FvwmEvent.adoc
rename to doc/FvwmEvent.adoc
diff --git a/doc/modules/FvwmForm.adoc b/doc/FvwmForm.adoc
similarity index 100%
rename from doc/modules/FvwmForm.adoc
rename to doc/FvwmForm.adoc
diff --git a/doc/modules/FvwmIconMan.adoc b/doc/FvwmIconMan.adoc
similarity index 100%
rename from doc/modules/FvwmIconMan.adoc
rename to doc/FvwmIconMan.adoc
diff --git a/doc/modules/FvwmIdent.adoc b/doc/FvwmIdent.adoc
similarity index 100%
rename from doc/modules/FvwmIdent.adoc
rename to doc/FvwmIdent.adoc
diff --git a/doc/modules/FvwmMFL.adoc b/doc/FvwmMFL.adoc
similarity index 100%
rename from doc/modules/FvwmMFL.adoc
rename to doc/FvwmMFL.adoc
diff --git a/doc/modules/FvwmPager.adoc b/doc/FvwmPager.adoc
similarity index 100%
rename from doc/modules/FvwmPager.adoc
rename to doc/FvwmPager.adoc
diff --git a/doc/modules/FvwmPerl.adoc b/doc/FvwmPerl.adoc
similarity index 100%
rename from doc/modules/FvwmPerl.adoc
rename to doc/FvwmPerl.adoc
diff --git a/doc/bin/FvwmPrompt.adoc b/doc/FvwmPrompt.adoc
similarity index 100%
rename from doc/bin/FvwmPrompt.adoc
rename to doc/FvwmPrompt.adoc
diff --git a/doc/modules/FvwmRearrange.adoc b/doc/FvwmRearrange.adoc
similarity index 100%
rename from doc/modules/FvwmRearrange.adoc
rename to doc/FvwmRearrange.adoc
diff --git a/doc/modules/FvwmScript.adoc b/doc/FvwmScript.adoc
similarity index 100%
rename from doc/modules/FvwmScript.adoc
rename to doc/FvwmScript.adoc
diff --git a/doc/Makefile.am b/doc/Makefile.am
index b7da155a..2734f4c2 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,40 +1,41 @@
 docdir = @FVWM_DOCDIR@
-MODULE_ADOCS = $(wildcard fvwm3/fvwm3.adoc bin/*.adoc modules/*.adoc)
+MODULE_ADOC = \
+	fvwm3.adoc \
+	fvwm3all.adoc \
+	fvwm3commands.adoc \
+	fvwm3menus.adoc \
+	fvwm3styles.adoc \
+	$(wildcard Fvwm*.adoc) \
+	$(wildcard fvwm-*.adoc)

-EXTRA_DIST = $(MODULE_ADOCS)
+EXTRA_DIST = $(MODULE_ADOC)

-if FVWM_BUILD_MANDOC
-BUILD_MANS = $(patsubst %.adoc,%, $(MODULE_ADOCS))
-else
-BUILD_MANS =
-endif
-
-all: docs
-docs: $(BUILD_MANS)
+nothing:

 clean:
-	rm -fr man1/
+	rm -f *.1 *.ad

 distclean-local: clean

 if FVWM_BUILD_MANDOC
-QUIET_ASCIIDOC = @echo '  ' DOC '    ' $@'.1';
-
-%: %.adoc
-	$(QUIET_ASCIIDOC) \
-	NAME=`basename "$@" | "$(SED)" -e "${transform}"`; \
-	$(ASCIIDOC) -b manpage $< -o "man1/$$NAME.1"
-
-install-data-local:
-	install -d -m 755 $(DESTDIR)$(mandir)/man1/
-	@for i in $(notdir $(BUILD_MANS)); do \
-		NAME=`basename "$$i" | "$(SED)" -e "${transform}"`; \
-		install -m 644 "man1/$$NAME.1" $(DESTDIR)$(mandir)/man1/; \
-	done
-
-uninstall-local:
-	@for i in $(notdir $(BUILD_MANS)); do \
-		NAME=`basename "$$i" | "$(SED)" -e "${transform}"`; \
-		rm -f "$(DESTDIR)$(mandir)/man1/$$NAME.1"; \
-	done
+man1_MANS = $(patsubst %.adoc,%.1, $(MODULE_ADOC))
+EXTRACT_SECTIONS = \
+	commands \
+	menus \
+	styles
+SECTION_FILES = $(patsubst %,fvwm3_%.ad, $(EXTRACT_SECTIONS))
+
+all: docs
+docs: $(man1_MANS)
+$(man1_MANS): $(SECTION_FILES)
+
+%.ad: fvwm3_manpage_source.adoc
+	SECTION=$(patsubst fvwm3_%.ad,%,$@); \
+	cat "$<" | \
+	"$(GREP)" -A 1000000 -- "^// BEGIN '$$SECTION'" | \
+	"$(GREP)" -B 1000000 -- "^// END '$$SECTION'" | \
+	"$(GREP)" -v "^// .* '$$SECTION'" > "$@"
+
+%.1: %.adoc
+	"$(ASCIIDOC)" -b manpage -a "$(patsubst %.1,%,$@)" "$<" -o "$@"
 endif
diff --git a/doc/README b/doc/README
index 85d7cceb..4dfba038 100644
--- a/doc/README
+++ b/doc/README
@@ -10,11 +10,3 @@ For more information about the specific markup available, see:

 * https://asciidoctor.org/docs/asciidoc-writers-guide/
 * https://asciidoctor.org/docs/user-manual/
-
-To add additional documents, see:
-
-	doc/fvwm3/*.adoc
-	doc/modules/*.adoc
-
-Documentation for modules now resides under `doc/`, rather than its own
-module.
diff --git a/doc/bin/fvwm-config.adoc b/doc/fvwm-config.adoc
similarity index 100%
rename from doc/bin/fvwm-config.adoc
rename to doc/fvwm-config.adoc
diff --git a/doc/bin/fvwm-convert-2.6.adoc b/doc/fvwm-convert-2.6.adoc
similarity index 100%
rename from doc/bin/fvwm-convert-2.6.adoc
rename to doc/fvwm-convert-2.6.adoc
diff --git a/doc/bin/fvwm-menu-desktop.adoc b/doc/fvwm-menu-desktop.adoc
similarity index 100%
rename from doc/bin/fvwm-menu-desktop.adoc
rename to doc/fvwm-menu-desktop.adoc
diff --git a/doc/bin/fvwm-root.adoc b/doc/fvwm-root.adoc
similarity index 100%
rename from doc/bin/fvwm-root.adoc
rename to doc/fvwm-root.adoc
diff --git a/doc/fvwm3.adoc b/doc/fvwm3.adoc
new file mode 100644
index 00000000..8e1e7d2a
--- /dev/null
+++ b/doc/fvwm3.adoc
@@ -0,0 +1,7 @@
+= FVWM3(1)
+
+== NAME
+
+fvwm3 - F? Virtual Window Manager for X11
+
+include::fvwm3_manpage_source.adoc[]
diff --git a/doc/fvwm3/fvwm3.adoc b/doc/fvwm3_manpage_source.adoc
similarity index 99%
rename from doc/fvwm3/fvwm3.adoc
rename to doc/fvwm3_manpage_source.adoc
index deed1e7d..31a4fbcb 100644
--- a/doc/fvwm3/fvwm3.adoc
+++ b/doc/fvwm3_manpage_source.adoc
@@ -1,9 +1,3 @@
-= FVWM3(1)
-
-== NAME
-
-fvwm3 - F? Virtual Window Manager for X11
-
 == SYNOPSIS

 *fvwm3* [*-c* _config-command_] [*-d* _displayname_] [*-f*
@@ -1757,29 +1751,14 @@ confuse some programs. For example, the xwd program refuses to make
 screen shots when run from a complex function. To achieve the same
 functionality you can use the *Read* or *PipeRead* command instead.

-== LIST OF FVWM COMMANDS
+ifdef::fvwm3[]
+== MENU CONCEPTS AND COMMANDS

-The command descriptions below are grouped together in the following
-sections. The sections are hopefully sorted in order of usefulness to
-the newcomer.
-
-* *Menu commands*
-* *Miscellaneous commands*
-* *Commands affecting window movement and placement*
-* *Commands for focus and mouse movement*
-* *Commands controlling window state*
-* *Commands for mouse and key bindings*
-* *The Style command (controlling window styles)*
-* *Other commands controlling window styles*
-* *Commands controlling the virtual desktop*
-* *Commands for user functions and shell commands*
-* *Conditional commands*
-* *Module commands*
-* *Quit, restart and session management commands*
-* *Colorsets*
-* *Color gradients*
-
-=== Menus
+Please refer to the fvwm3menus man page.
+endif::[]
+ifdef::fvwm3all[]
+// BEGIN 'menus'
+== MENUS

 Before a menu can be opened, it has to be populated with menu items
 using the *AddToMenu* command and bound to a key or mouse button with
@@ -1793,29 +1772,28 @@ generating menus dynamically and many other features. Please refer to
 the *MenuStyle* command to learn more.

 *Types of Menus*::
-In fvwm there are four slightly different types of menus:
+There are four slightly different types of menus:
 +
-*Popup* menus can appear everywhere on the screen on their own or
+Popup menus can appear everywhere on the screen on their own or
 attached to a part of a window. The *Popup* command opens popup menus.
 If the popup menu was invoked with a mouse button held down, it is
 closed when the button is released. The item under the pointer is then
 activated and the associated action is executed.
 +
-*Menu* is a very similar command, but the menus it opens are slightly
-less transient. When invoked by clicking a mouse button, it stays open
-and can be navigated with no button held. But if it is invoked by a
+Normal menus are very similar command, but slightly transient.
+When invoked by clicking a mouse button, they stay open
+and can be navigated with no button held. But if invoked by a
 button press followed by mouse motion, it behaves exactly like a popup
-menu.
+menu. The *Menu* command creates normal menus.
 +
-_Tear off menus_ or _Pin up menus_ are menus from either of the above
-two commands that have been "torn off" their original context and
-pinned on the desktop like a normal window. They are created from
+"Sub menus" are menus inside other menus. When a menu item that has the
+*Popup* command as its action is selected, the named menu is opened as
+a sub menu to the parent. Any type of menu can have sub menus.
++
+"Tear off menus" are menus that have been "torn off" their original
+context on the desktop like a normal window. They are created from
 other menus by certain key presses or mouse sequences or with the
 *TearMenuOff* command from inside a menu.
-+
-_Sub menus_ are menus inside menus. When a menu item that has the
-*Popup* command as its action is selected, the named menu is opened as
-an inferior menu to the parent. Any type of menu can have sub menus.

 *Menu Anatomy*::
 Menus consist of any number of titles which are inactive menu items
@@ -1835,9 +1813,9 @@ Finally, there may be a picture running up either side of the menu (a
 "side bar").

 *Menu Navigation*::
-Menus can be navigated either with the keyboard or with the mouse.
-Many people prefer to use the mouse, but it can be rather tedious.
-Once you get the hang of it, keyboard navigation can be much faster.
+Menus are navigated with the keyboard and the mouse.
+Many people prefer to use the mouse, but it can be tedious.
+Keyboard navigation can be much faster.
 While fvwm displays a menu, it can do nothing else. For example, new
 windows do not appear before the menu is closed. However, this is not
 exactly true for tear off menus. See the *Tear Off Menus* section for
@@ -2057,6 +2035,7 @@ To create a tear off menu without opening the normal menu first, the
 option _TearOffImmediately_ can be added to the *Menu* or *Popup*
 command.

+=== Building menu contents
 *AddToMenu* _menu-name_ [_menu-label_ _action_]::
 Begins or adds to a menu definition. Typically a menu definition looks
 like this:
@@ -2273,15 +2252,6 @@ with blue the region of the menu containing the picture.
 In all the above cases, the name of the resulting menu is name
 specified, stripped of the substrings between the various delimiters.

-*ChangeMenuStyle* _menustyle_ _menu_ ...::
-Changes the menu style of _menu_ to _menustyle_. You may specify more
-than one menu in each call of *ChangeMenuStyle*.
-
-*CopyMenuStyle* _orig-menustyle_ _dest-menustyle_::
-Copy _orig-menustyle_ to _dest-menustyle_, where _orig-menustyle_ is
-an existing menu style. If the menu style _dest_menustyle_ does not
-exist, then it is created.
-
 *DestroyMenu* [recreate] _menu_::
 Deletes a menu, so that subsequent references to it are no longer
 valid. You can use this to change the contents of a menu during an
@@ -2293,14 +2263,10 @@ but to throw away all the menu items (including the title).
 DestroyMenu Utilities
 ....

-*DestroyMenuStyle* _menustyle_::
-Deletes the menu style named _menustyle_ and changes all menus using
-this style to the default style, you cannot destroy the default menu
-style.
-+
-....
-DestroyMenuStyle pixmap1
-....
+*Title*::
+	Does nothing. It is used to insert a title line in a popup or menu.
+
+=== Commands that open menus

 *Menu* _menu-name_ [_position_] [_double-click-action_]::
 Causes a previously defined menu to be popped up in a sticky manner.
@@ -2324,7 +2290,7 @@ and an offset to this rectangle by which the upper left corner of the
 menu is moved from the upper left corner of the rectangle. The
 _position_ arguments consist of several parts:
 +
-{empty}[_context-rectangle_] _x_ _y_ [_special-options_]
+{empty}[_context-rectangle_] _x_ _y_ [_special options_]
 +
 The _context-rectangle_ can be one of:
 +
@@ -2343,7 +2309,8 @@ _Interior_:::
 _Title_:::
 	the title of the context window or icon.
 +
-__Button__<n>:::
+_Button<n>_:::
+        button <n> of the context window.
 +
 _Icon_:::
 	the icon of the context window.
@@ -2361,8 +2328,8 @@ _This_:::
 	whatever widget the pointer is on (e.g. a corner of a window or the
 	root window).
 +
-_Rectangle_ <__geometry__>:::
-	the rectangle defined by <__geometry__> in X geometry format. Width
+_Rectangle_ <_geometry_>:::
+	the rectangle defined by <_geometry_> in X geometry format. Width
 	and height default to 1 if omitted.

 If the context-rectangle is omitted or illegal (e.g. "item" on a
@@ -2375,11 +2342,11 @@ interpreted as a percentage of the context rectangle's width (height),
 but with a trailing '_m_' the menu's width (height) is used instead.
 Furthermore a trailing '_p_' changes the interpretation to mean
 pixels.
-
++
 Instead of a single value you can use a list of values. All additional
 numbers after the first one are separated from their predecessor by
 their sign. Do not use any other separators.
-
++
 If _x_ or _y_ are prefixed with "'__o__<number>" where <number> is an
 integer, the menu and the rectangle are moved to overlap at the
 specified position before any other offsets are applied. The menu and
@@ -2391,9 +2358,9 @@ borders and if you use "o50" they are centered upon each other (try it
 and you will see it is much simpler than this description). The
 default is "o0". The prefix "o<number>" is an abbreviation for
 "+<number>-<number>m".
-
++
 A prefix of '_c_' is equivalent to "o50". Examples:
-
++
 ....
 # window list in the middle of the screen
 WindowList Root c c
@@ -2417,48 +2384,165 @@ AddToMenu foobar-menu
 AddToMenu foobar-menu
  + "first item" Popup "another menu" item +0 -100m
 ....
-
-
++
 Note that you can put a sub menu far off the current menu so you could
 not reach it with the mouse without leaving the menu. If the pointer
 leaves the current menu in the general direction of the sub menu the
 menu stays up.
-
-The _special-options_:
-
++
+_Special options_:::
++
 To create a tear off menu without opening the normal menu, add the
 option _TearOffImmediately_. Normally the menu opens in normal state
 for a split second before being torn off. As tearing off places the
 menu like any other window, a position should be specified explicitly:
-
++
 ....
 # Forbid fvwm to place the menu window
 Style <name of menu> UsePPosition
 # Menu at top left corner of screen
 Menu Root 0p 0p TearOffImmediately
 ....
-
-
++
 The _Animated_ and _Mwm_ or _Win_ menu styles may move a menu
 somewhere else on the screen. If you do not want this you can add
 _Fixed_ as an option. This might happen for example if you want the
 menu always in the top right corner of the screen.
-
++
 Where do you want a menu to appear when you click on its menu item?
 The default is to place the title under the cursor, but if you want it
 where the position arguments say, use the _SelectInPlace_ option. If
 you want the pointer on the title of the menu, use _SelectWarp_ too.
 Note that these options apply only if the _PopupAsRootMenu_
 *MenuStyle* option is used.
-
++
 The pointer is warped to the title of a sub menu whenever the pointer
 would be on an item when the sub menu is popped up (_fvwm_ menu style)
 or never warped to the title at all (_Mwm_ or _Win_ menu styles). You
 can force (forbid) warping whenever the sub menu is opened with the
 _WarpTitle_ (_NoWarp_) option.
-
++
 Note that the _special-options_ do work with a normal menu that has no
 other position arguments.
+
+*Popup* _PopupName_ [_position_] [_default-action_]::
+	This command has two purposes: to bind a menu to a key or mouse
+	button, and to bind a sub menu into a menu. The formats for the two
+	purposes differ slightly. The _position_ arguments are the same as for
+	*Menu*. The command _default-action_ is invoked if the user clicks a
+	button to invoke the menu and releases it immediately again (or hits
+	the key rapidly twice if the menu is bound to a key). If the default
+	action is not specified, double clicking on the menu does nothing.
+	However, if the menu begins with a menu item (i.e. not with a title or
+	a separator) and the default action is not given, double clicking
+	invokes the first item of the menu (but only if the pointer really was
+	over the item).
++
+To bind a previously defined pop-up menu to a key or mouse button:
++
+The following example binds mouse buttons 2 and 3 to a pop-up called
+"Window Ops". The menu pops up if the buttons 2 or 3 are pressed in
+the window frame, side-bar, or title-bar, with no modifiers (none of
+shift, control, or meta).
++
+
+....
+Mouse 2 FST N Popup "Window Ops"
+Mouse 3 FST N Popup "Window Ops"
+....
+
++
+Pop-ups can be bound to keys through the use of the *Key* command.
+Pop-ups can be operated without using the mouse by binding to keys and
+operating via the up arrow, down arrow, and enter keys.
++
+To bind a previously defined pop-up menu to another menu, for use as a
+sub menu:
++
+The following example defines a sub menu "Quit-Verify" and binds it
+into a main menu, called "RootMenu":
++
+
+....
+AddToMenu Quit-Verify
+ + "Really Quit Fvwm?" Title
+ + "Yes, Really Quit"  Quit
+ + "Restart Fvwm"      Restart
+ + "Restart Fvwm 1.xx" Restart fvwm1 -s
+ + ""                  Nop
+ + "No, Don't Quit"    Nop
+
+AddToMenu RootMenu "Root Menu" Title
+ + "Open XTerm Window" Popup NewWindowMenu
+ + "Login as Root"     Exec exec xterm -T Root -n Root -e su -
+ + "Login as Anyone"   Popup AnyoneMenu
+ + "Remote Hosts"      Popup HostMenu
+ + ""                  Nop
+ + "X utilities"       Popup Xutils
+ + ""                  Nop
+ + "Fvwm Modules"      Popup Module-Popup
+ + "Fvwm Window Ops"   Popup Window-Ops
+ + ""                  Nop
+ + "Previous Focus"    Prev (AcceptsFocus) Focus
+ + "Next Focus"        Next (AcceptsFocus) Focus
+ + ""                  Nop
+ + "Refresh screen"    Refresh
+ + ""                  Nop
+ + "Reset X defaults"  Exec xrdb -load \
+                 $HOME/.Xdefaults
+ + ""                  Nop
+ + ""                  Nop
+ + Quit                Popup Quit-Verify
+....
+
++
+Popup differs from *Menu* in that pop-ups do not stay up if the user
+simply clicks. These are popup-menus, which are a little hard on the
+wrist. *Menu* menus stay up on a click action. See the *Menu* command
+for an explanation of the interactive behavior of menus. A menu can be
+open up to ten times at once, so a menu may even use itself or any of
+its predecessors as a sub menu.
+
+*TearMenuOff*::
+When assigned to a menu item, it inserts a tear off bar into the menu
+(a horizontal broken line). Activating that item tears off the menu.
+If the menu item has a label, it is shown instead of the broken line.
+If used outside menus, this command does nothing. Examples:
++
+....
+AddToMenu WindowMenu
++ I "" TearMenuOff
+
+AddToMenu RootMenu
++ I "click here to tear me off" TearMenuOff
+....
+
+=== Menu style commands
+
+Menu styles describe the looks and behaviour like normal styles do
+for windows. Menu styles are assigned to individual or all menus,
+and changing the menu style immediately affects all menus taht use
+it.  (If a menu style is used from within a menu, the changes are
+applied the next time an affected menu is opened.)
+
+*ChangeMenuStyle* _menustyle_ _menu_ ...::
+Changes the menu style of _menu_ to _menustyle_. You may specify more
+than one menu in each call of *ChangeMenuStyle*.
+
+*CopyMenuStyle* _orig-menustyle_ _dest-menustyle_::
+Copy _orig-menustyle_ to _dest-menustyle_, where _orig-menustyle_ is
+an existing menu style. If the menu style _dest_menustyle_ does not
+exist, then it is created.
+
+*DestroyMenuStyle* _menustyle_::
+Deletes the menu style named _menustyle_ and changes all menus using
+this style to the default style, you cannot destroy the default menu
+style.
++
+....
+DestroyMenuStyle pixmap1
+....
+
 *MenuStyle* _stylename_ [_options_]::
 Sets a new menu style or changes a previously defined style. The
 _stylename_ is the style name; if it contains spaces or tabs it has to
@@ -2467,7 +2551,7 @@ default menu style is used for every menu-like object (e.g. the window
 created by the *WindowList* command) that had not be assigned a style
 using the *ChangeMenuStyle*. See also *DestroyMenuStyle*. When using
 monochrome color options are ignored.
-
++
 _options_ is a comma separated list containing some of the keywords
 Fvwm / Mwm / Win, BorderWidth, Foreground, Background, Greyed,
 HilightBack / !HilightBack, HilightTitleBack, ActiveFore /
@@ -2485,20 +2569,20 @@ VerticalMargins, VerticalTitleSpacing, AutomaticHotkeys /
 !AutomaticHotkeys, UniqueHotkeyActivatesImmediate /
 !UniqueHotkeyActivatesImmediate, MouseWheel, ScrollOffPage /
 !ScrollOffPage, TrianglesUseFore / !TrianglesUseFore.
-
++
 In the above list some options are listed as option pairs or triples
 with a '/' in between. These options exclude each other. All paired
 options can be negated to have the effect of the counterpart option by
 prefixing ! to the option.
-
++
 Some options are now negated by prefixing ! to the option. This is the
 preferred form for all such options. The other negative forms are now
 deprecated and will be removed in the future.
-
++
 This is a list of MenuStyle deprecated negative options:
 ActiveForeOff, AnimationOff, AutomaticHotkeysOff, HilightBackOff,
 TitleWarpOff
-
++
 _Fvwm_, _Mwm_, _Win_ reset all options to the style with the same name
 in former versions of fvwm. The default for new menu styles is _Fvwm_
 style. These options override all others except _Foreground_,
@@ -2506,33 +2590,33 @@ _Background_, _Greyed_, _HilightBack_, _ActiveFore_ and _PopupDelay_,
 so they should be used only as the first option specified for a menu
 style or to reset the style to defined behavior. The same effect can
 be created by setting all the other options one by one.
-
++
 _Mwm_ and _Win_ style menus popup sub menus automatically. _Win_ menus
 indicate the current menu item by changing the background to dark.
 _Fvwm_ sub menus overlap the parent menu, _Mwm_ and _Win_ style menus
 never overlap the parent menu.
-
++
 _Fvwm_ style is equivalent to !HilightBack, Hilight3DThin,
 !ActiveFore, !Animation, Font, MenuFace, PopupOffset 0 67, TitleWarp,
 TitleUnderlines1, SeparatorsShort, TrianglesRelief, PopupDelayed,
 PopdownDelayed, PopupDelay 150, PopdownDelay 150, PopupAsSubmenu,
 HoldSubmenus, SubmenusRight, BorderWidth 2, !AutomaticHotkeys,
 UniqueHotkeyActivatesImmediate, PopupActiveArea 75.
-
++
 _Mwm_ style is equivalent to !HilightBack, Hilight3DThick,
 !ActiveFore, !Animation, Font, MenuFace, PopupOffset -3 100,
 !TitleWarp, TitleUnderlines2, SeparatorsLong, TrianglesRelief,
 PopupImmediately, PopdownDelayed, PopdownDelay 150, PopupAsSubmenu,
 HoldSubmenus, SubmenusRight, BorderWidth 2,
 UniqueHotkeyActivatesImmediate, !AutomaticHotkeys, PopupActiveArea 75.
-
++
 _Win_ style is equivalent to HilightBack, Hilight3DOff, ActiveFore,
 !Animation, Font, MenuFace, PopupOffset -5 100, !TitleWarp,
 TitleUnderlines1, SeparatorsShort, TrianglesSolid, PopupImmediately,
 PopdownDelayed, PopdownDelay 150, PopupAsSubmenu, RemoveSubmenus,
 SubmenusRight, BorderWidth 2, UniqueHotkeyActivatesImmediate,
 !AutomaticHotkeys, PopupActiveArea 75.
-
++
 _BorderWidth_ takes the thickness of the border around the menus in
 pixels. It may be zero to 50 pixels. The default is 2. Using an
 illegal value reverts the border width to the default.
@@ -2540,13 +2624,13 @@ illegal value reverts the border width to the default.
 _Foreground_ and _Background_ may have a color name as an argument.
 This color is used for menu text or the menu's background. You can
 omit the color name to reset these colors to the built-in default.
-
++
 _Greyed_ may have a color name as an argument. This color is the one
 used to draw a menu-selection which is prohibited (or not recommended)
 by the Mwm hints which an application has specified. If the color is
 omitted the color of greyed menu entries is based on the background
 color of the menu.
-
++
 _HilightBack_ and _!HilightBack_ switch hilighting the background of
 the selected menu item on and off. A specific background color may be
 used by providing the color name as an argument to _HilightBack_. If
@@ -2554,19 +2638,19 @@ you use this option without an argument the color is based on the
 menu's background color. The _ActiveColorset_ option overrides the
 specified color. If the colorset has a non solid background it is used
 for the hilighting.
-
++
 _HilightTitleBack_ switches hilighting the background of menu titles
 on. If a _TitleColorset_ was used, the background colour is taken from
 there. Otherwise the color is based on the menu's background color. If
 the colorset has a non solid background it is used for the hilighting.
-
++
 _ActiveFore_ and _!ActiveFore_ switch hilighting the foreground of the
 selected menu item on and off. A specific foreground color may be used
 by providing the color name as an argument to _ActiveFore_. Omitting
 the color turns hilighting on when an _ActiveColorset_ is used.
 _ActiveFore_ turns off hilighting the foreground completely. The
 _ActiveColorset_ option overrides the specified color.
-
++
 _MenuColorset_ controls if a colorset is used instead of the
 _Foreground_, _Background_ and _MenuFace_ menu styles. If the
 _MenuColorset_ keyword is followed by a number equal to zero or
@@ -2580,7 +2664,7 @@ for memory consumption and may use less memory than the background
 from a colorset. The shape mask from the colorset is used to shape the
 menu. Please refer to the *Colorsets* section for details about
 colorsets.
-
++
 _ActiveColorset_ works exactly like _MenuColorset_, but the foreground
 from the colorset replaces the color given with the _ActiveFore_ menu
 style and the colorset's background color replaces the color given
@@ -2590,80 +2674,80 @@ hilight and shadow colors from the colorset are used too. The pixmap
 and shape mask from the colorset are not used. Hilighting the
 background or foreground can be turned off individually with the
 _!ActiveFore_ or _!HilightBack_ menu styles.
-
++
 _GreyedColorset_ works exactly like _MenuColorset_, but the foreground
 from the colorset replaces the color given with the _Greyed_ menu
 style. No other parts of the colorset are used.
-
++
 _TitleColorset_ works exactly like _MenuColorset_, but is used only
 for menu titles.
-
++
 _Hilight3DThick_, _Hilight3DThin_ and _Hilight3DOff_ determine if the
 selected menu item is hilighted with a 3D relief. Thick reliefs are
 two pixels wide, thin reliefs are one pixel wide.
-
++
 _Hilight3DThickness_ takes one numeric argument that may be between
 -50 and +50 pixels. With negative values the menu item gets a pressed
 in look. The above three commands are equivalent to a thickness of 2,
 1 and 0.
-
++
 _Animation_ and _!Animation_ turn menu animation on or off. When
 animation is on, sub menus that do not fit on the screen cause the
 parent menu to be shifted to the left so the sub menu can be seen.
-
++
 _Font_ and _TitleFont_ take a font name as an argument. If a font by
 this name exists it is used for the text of all menu items. If it does
 not exist or if the name is left blank the built-in default is used.
 If a _TitleFont_ is given, it is used for all menu titles instead of
 the normal font.
-
++
 _MenuFace_ enforces a fancy background upon the menus. You can use the
 same options for _MenuFace_ as for the *ButtonStyle*. See description
 of *ButtonStyle* command and the *Color Gradients* sections for more
 information. If you use _MenuFace_ without arguments the style is
 reverted back to normal.
-
++
 Some examples of MenuFaces are:
-
++
 ....
 MenuFace DGradient 128 2 lightgrey 50 blue 50 white
 MenuFace TiledPixmap texture10.xpm
 MenuFace HGradient 128 2 Red 40 Maroon 60 White
 MenuFace Solid Maroon
 ....
-
++
 Note: The gradient styles H, V, B and D are optimized for high speed
 and low memory consumption in menus. This is not the case for all the
 other gradient styles. They may be slow and consume huge amounts of
 memory, so if you encounter performance problems with them you may be
 better off by not using them. To improve performance you can try one
 or all of the following:
-
++
 Turn hilighting of the active menu item other than foreground color
 off:
-
++
 ....
 MenuStyle <style> Hilight3DOff, !HilightBack
 MenuStyle <style> ActiveFore <preferred color>
 ....
-
++
 Make sure sub menus do not overlap the parent menu. This can prevent
 menus being redrawn every time a sub menu pops up or down.
-
++
 ....
 MenuStyle <style> PopupOffset 1 100
 ....
-
++
 Run your X server with backing storage. If your X Server is started
 with the -bs option, turn it off. If not try the -wm and +bs options:
-
++
 ....
 startx -- -wm +bs
 ....

 You may have to adapt this example to your system (e.g. if you use
 xinit to start X).
-
++
 _PopupDelay_ requires one numeric argument. This value is the delay in
 milliseconds before a sub menu is popped up when the pointer moves
 over a menu item that has a sub menu. If the value is zero no
@@ -2671,15 +2755,15 @@ automatic pop up is done. If the argument is omitted the built-in
 default is used. Note that the popup delay has no effect if the
 _PopupImmediately_ option is used since sub menus pop up immediately
 then.
-
++
 _PopupImmediately_ makes menu items with sub menus pop up it up as
 soon as the pointer enters the item. The _PopupDelay option_ is
 ignored then. If _PopupDelayed_ is used fvwm looks at the _PopupDelay_
 option if or when this automatic popup happens.
-
++
 _PopdownDelay_ works exactly like _PopupDelay_ but determines the
 timeout of the _PopupDelayed_ style.
-
++
 _PopdownImmediately_ makes sub menus vanish as soon as the pointer
 leaves the sub menu and the correspondent item in the parent menu.
 With the opposite option _PopdownDelayed_ the sub menu only pops down
@@ -2690,7 +2774,7 @@ _PopupImmediately_, _PopupDelayed_, _PopupDelay_ styles and the
 _PopdownImmediately_, _PopdownDelayed_, _PopdownDelay_ styles, the
 _Popup..._ styles win when using mouse navigation and the _Popdown..._
 styles win when navigating with the keyboard.
-
++
 _PopupOffset_ requires two integer arguments. Both values affect where
 sub menus are placed relative to the parent menu. If both values are
 zero, the left edge of the sub menu overlaps the left edge of the
@@ -2698,7 +2782,7 @@ parent menu. If the first value is non-zero the sub menu is shifted
 that many pixels to the right (or left if negative). If the second
 value is non-zero the menu is moved by that many percent of the parent
 menu's width to the right or left.
-
++
 _PopupActiveArea_ requires an integer value between 51 and 100.
 Normally, when the pointer is over a menu item with a sub menu and the
 pointer enters the area that starts at 75% of the menu width, the sub
@@ -2711,36 +2795,36 @@ _TitleWarp_ and _!TitleWarp_ affect if the pointer warps to the menu
 title when a sub menu is opened or not. Note that regardless of this
 setting the pointer is not warped if the menu does not pop up under
 the pointer.
-
++
 _TitleUnderlines0_, _TitleUnderlines1_ and _TitleUnderlines2_ specify
 how many lines are drawn below a menu title.
-
++
 _SeparatorsLong_ and _SeparatorsShort_ set the length of menu
 separators. Long separators run from the left edge all the way to the
 right edge. Short separators leave a few pixels to the edges of the
 menu.
-
++
 _TrianglesSolid_ and _TrianglesRelief_ affect how the small triangles
 for sub menus is drawn. Solid triangles are filled with a color while
 relief triangles are hollow.
-
++
 _DoubleClickTime_ requires one numeric argument. This value is the
 time in milliseconds between two mouse clicks in a menu to be
 considered as a double click. The default is 450 milliseconds. If the
 argument is omitted the double click time is reset to this default.
-
++
 _SidePic_ takes the name of an image file as an argument. The picture
 is drawn along the left side of the menu. The _SidePic_ option can be
 overridden by a menu specific side pixmap (see *AddToMenu*). If the
 file name is omitted an existing side pixmap is removed from the menu
 style.
-
++
 _SideColor_ takes the name of an X11 color as an argument. This color
 is used to color the column containing the side picture (see above).
 The SideColor option can be overridden by a menu specific side color
 (see *AddToMenu*). If the color name is omitted the side color option
 is switched off.
-
++
 _PopupAsRootMenu_, _PopupAsSubmenu_, _PopupIgnore_ and _PopupClose_
 change the behavior when you click on a menu item that opens a sub
 menu. With _PopupAsRootMenu_ the original menu is closed before the
@@ -2753,25 +2837,24 @@ the normal behavior. With _PopupClose_ the menu is closed when a sub
 menu item is activated, and the menu stays open if _PopupIgnore_ is
 used (even if the menu was invoked with the *Popup* command).
 _PopupAsSubmenu_ is the default.
-
++
 _RemoveSubmenus_ instructs fvwm to remove sub menu when you move back
 into the parent menu. With _HoldSubmenus_ the sub menu remains
 visible. You probably want to use _HoldSubmenus_ if you are using the
 _PopupDelayed_ style. _RemoveSubmenus_ affects menu navigation with
 the keyboard.
-
++
 _SelectOnRelease_ takes an optional key name as an argument. If the
 given key is released in a menu using this style, the current menu
 item is selected. This is intended for
-
 *WindowList* navigation. The key name is a standard X11 key name as
 defined in _/usr/include/X11/keysymdef.h_, (without the _XK__ prefix),
 or the keysym database _/usr/X11R6/lib/X11/XKeysymDB_. To disable this
 behavior, omit the key name.
-
++
 Note: Some X servers do not support KeyRelease events.
 _SelectOnRelease_ does not work on such a machine.
-
++
 _ItemFormat_ takes a special string as its argument that determines
 the layout of the menu items. Think of the format string as if it were
 a menu item. All you have to do is tell fvwm where to place the
@@ -2781,46 +2864,41 @@ area. The string consists of spaces,

 characters and formatting directives beginning with '%'. Any illegal
 characters and formatting directives are silently ignored:
-
-*%l*, *%c* and *%r*::
++
+--
+*%l*, *%c* and *%r*:::
 	Insert the next item label. Up to three labels can be used. The item
 	column is left-aligned (*%l*), centered (*%c*) or right-aligned
 	(*%r*).
-+
-*%i*::
+*%i*:::
 	Inserts the mini icon.
-+
-*%>* and *%<*::
+*%>* and *%<*:::
 	Insert the sub menu triangle pointing either to the right (*%>*) or to
 	the left (*%<*).
-+
-*%|*::
+*%|*:::
 	The first *%|* denotes the beginning of the area that is highlighted
 	either with a background color or a relief (or both). The second *%|*
 	marks the end of this area. *%|* can be used up to twice in the
 	string. If you do not add one or both of them, fvwm sets the margins
 	to the margins of the whole item (not counting the side picture).
-+
-*%s*::
+*%s*:::
 	Places the side picture either at the beginning or the end of the
 	menu. This directive may be used only once and only as the first or
 	last in the format string. If the *%s* is not at the beginning of the
 	string, menus are not drawn properly.
-
-+
-*Space*, *Tab*, *%Space* and *%Tab*::
+*Space*, *Tab*, *%Space* and *%Tab*:::
 	Add gap of one space, or a tab, using the width of the menu font. When
 	using a tab, the size of the gap can be one to 8 spaces since the tab
 	position is a multiple of 8 from the edge of the menu. The whole
 	string must be quoted if spaces or tabs are used.
-+
-*%p*::
+*%p*:::
 	Like Space and Tab *%p* inserts an empty area into the item, but with
 	better control of its size (see below).
-
+--
++
 You can define an additional space before and after each of the
-objects like this:
-
+objects like this
++
 ....
 %left.rightp
 ....
@@ -2833,14 +2911,14 @@ leave out the _left_ or the _.right_ parts if you do not need them.
 All values up to the screen width are allowed. Even negative values
 can be used with care. The *p* may be replaced with any other
 formatting directives described above.
-
++
 Note: Only items defined in the format string are visible in the
 menus. So if you do not put a *%s* in there you do not see a side
 picture, even if one is specified.
-
++
 Note: The _SubmenusLeft_ style changes the default _ItemFormat_
 string, but if it was set manually it is not modified.
-
++
 Note: If any unformatted title of the menu is wider than the widest
 menu item, the spaces between the different parts of the menu items
 are enlarged to match the width of the title. Leading left aligned
@@ -2848,27 +2926,25 @@ objects in the format string (*%l*, *%i*, *%<*, first *%|*) stick to
 the left edge of the menu and trailing right aligned objects (*%r*,
 *%i*, *%>*, second *%|*) stick to the right edge. The gaps between the
 remaining items are enlarged equally.
-
++
 Examples:
-
++
 ....
 MenuStyle * ItemFormat "%.4s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|"
 ....
-
-
++
 Is the default string used by fvwm: (side picture + 4 pixels gap)
 (beginning of the hilighted area + 1 pixel gap) (mini icon + 5p)
 (first column left aligned + 5p) (second column left aligned + 5p)
 (third column right aligned + 5p) (second mini icon + 5p) (2p + sub
 menu triangle + 3p) (1p + end of hilighted area).
-
++
 ....
 MenuStyle * ItemFormat "%.1|%3.2<%5i%5l%5l%5r%5i%1|%4s"
 ....
-
-
++
 Is used by fvwm with the _SubmenusLeft_ option below.
-
++
 _VerticalItemSpacing_ and _VerticalTitleSpacing_ control the vertical
 spacing of menu items and titles like _ItemFormat_ controls the
 horizontal spacing. Both take two numeric arguments that may range
@@ -2878,26 +2954,26 @@ Negative numbers do not make much sense and may screw up the menu
 completely. If no arguments are given or the given arguments are
 invalid, the built-in defaults are used: one pixel above the item or
 title and two below.
-
++
 _VerticalMargins_ can be used to add some padding at the top and
 bottom of menus. It takes two numeric arguments that must be positive
 integers (or zero). If the number of arguments or its values are
 incorrect, fvwm defaults both to 0, which means no padding at all. If
 the values are correct, the first one is used for the top margin, and
 the second one is used for the bottom margin.
-
++
 _SubmenusLeft_ mirrors the menu layout and behavior. Sub menus pop up
 to the left, the sub menu triangle is drawn left and the mini icon and
 side picture are drawn at the right side of the menu. The default is
 _SubmenusRight_. The position hints of a menu are also affected by
 this setting, i.e. position hints using _item_ or _menu_ as context
 rectangle and position hints using _m_ offsets.
-
++
 _AutomaticHotkeys_ and _!AutomaticHotkeys_ control the menu's ability
 to automatically provide hot-keys on the first character of each menu
 item's label. This behavior is always overridden if an explicit
 hot-key is assigned in the *AddToMenu* command.
-
++
 _UniqueHotkeyActivatesImmediate_ and _!UniqueHotkeyActivatesImmediate_
 controls how menu items are invoked when used with hotkeys. By
 default, if a given menu entry only has one completeable match for a
@@ -2907,7 +2983,7 @@ However, the menu can be told to remain open, waiting for the user to
 invoke the selected item instead when there is only one matched item
 for a given hotkey, by using the _!UniqueHotkeyActivatesImmediate_
 option.
-
++
 _MouseWheel_ controls the ability to scroll the menu using a mouse
 wheel. It takes one argument, that can be one of ScrollsPointer,
 ScrollsMenu, ScrollsMenuBackwards or ActivatesItem. ScrollsPointer
@@ -2916,17 +2992,17 @@ default. ScrollsMenu and ScrollsMenuBackwards scroll the menu beneath
 the pointer. ActivatesItem disables scrolling by mouse wheel and makes
 the use of a mouse wheel act as if the menu was clicked. If no
 argument is supplied the default setting is restored.
-
++
 _ScrollOffPage_ allows a menu to be scrolled out of the visible area
 if _MouseWheel_ is set to ScrollsMenu or ScrollsMenuBackwards. This is
 the default. The opposite, _!ScrollOffPage_ disables this behaviour.
-
++
 _TrianglesUseFore_ draws sub menu triangles with the foreground color
 of the menu colorset (normally drawn with the hilight color).
 _!TrianglesUseFore_ disables this behaviour.
-
++
 Examples:
-
++
 ....
 MenuStyle * Mwm
 MenuStyle * Foreground Black, Background gray40
@@ -2943,8 +3019,7 @@ MenuStyle red !HilightBack, Hilight3DOff
 MenuStyle red Font lucidasanstypewriter-12
 MenuStyle red MenuFace DGradient 64 Red Black
 ....
-
-
++
 Note that all style options could be placed on a single line for each
 style name.

@@ -2967,101 +3042,37 @@ never overlap the parent menu.
 When the _anim_ option is given, sub menus that do not fit on the
 screen cause the parent menu to be shifted to the left so the sub menu
 can be seen. See also *SetAnimation* command.
+// END 'menus'
+endif::[]

-*Popup* _PopupName_ [_position_] [_default-action_]::
-	This command has two purposes: to bind a menu to a key or mouse
-	button, and to bind a sub menu into a menu. The formats for the two
-	purposes differ slightly. The _position_ arguments are the same as for
-	*Menu*. The command _default-action_ is invoked if the user clicks a
-	button to invoke the menu and releases it immediately again (or hits
-	the key rapidly twice if the menu is bound to a key). If the default
-	action is not specified, double clicking on the menu does nothing.
-	However, if the menu begins with a menu item (i.e. not with a title or
-	a separator) and the default action is not given, double clicking
-	invokes the first item of the menu (but only if the pointer really was
-	over the item).
-+
-To bind a previously defined pop-up menu to a key or mouse button:
-+
-The following example binds mouse buttons 2 and 3 to a pop-up called
-"Window Ops". The menu pops up if the buttons 2 or 3 are pressed in
-the window frame, side-bar, or title-bar, with no modifiers (none of
-shift, control, or meta).
-+
-
-....
-Mouse 2 FST N Popup "Window Ops"
-Mouse 3 FST N Popup "Window Ops"
-....
-
-+
-Pop-ups can be bound to keys through the use of the *Key* command.
-Pop-ups can be operated without using the mouse by binding to keys and
-operating via the up arrow, down arrow, and enter keys.
-+
-To bind a previously defined pop-up menu to another menu, for use as a
-sub menu:
-+
-The following example defines a sub menu "Quit-Verify" and binds it
-into a main menu, called "RootMenu":
-+
-
-....
-AddToMenu Quit-Verify
- + "Really Quit Fvwm?" Title
- + "Yes, Really Quit"  Quit
- + "Restart Fvwm"      Restart
- + "Restart Fvwm 1.xx" Restart fvwm1 -s
- + ""                  Nop
- + "No, Don't Quit"    Nop
-
-AddToMenu RootMenu "Root Menu" Title
- + "Open XTerm Window" Popup NewWindowMenu
- + "Login as Root"     Exec exec xterm -T Root -n Root -e su -
- + "Login as Anyone"   Popup AnyoneMenu
- + "Remote Hosts"      Popup HostMenu
- + ""                  Nop
- + "X utilities"       Popup Xutils
- + ""                  Nop
- + "Fvwm Modules"      Popup Module-Popup
- + "Fvwm Window Ops"   Popup Window-Ops
- + ""                  Nop
- + "Previous Focus"    Prev (AcceptsFocus) Focus
- + "Next Focus"        Next (AcceptsFocus) Focus
- + ""                  Nop
- + "Refresh screen"    Refresh
- + ""                  Nop
- + "Reset X defaults"  Exec xrdb -load \
-                 $HOME/.Xdefaults
- + ""                  Nop
- + ""                  Nop
- + Quit                Popup Quit-Verify
-....
-
-+
-Popup differs from *Menu* in that pop-ups do not stay up if the user
-simply clicks. These are popup-menus, which are a little hard on the
-wrist. *Menu* menus stay up on a click action. See the *Menu* command
-for an explanation of the interactive behavior of menus. A menu can be
-open up to ten times at once, so a menu may even use itself or any of
-its predecessors as a sub menu.
-*TearMenuOff*::
-When assigned to a menu item, it inserts a tear off bar into the menu
-(a horizontal broken line). Activating that item tears off the menu.
-If the menu item has a label, it is shown instead of the broken line.
-If used outside menus, this command does nothing. Examples:
-+
+ifdef::fvwm3[]
+== LIST OF FVWM COMMANDS

-....
-AddToMenu WindowMenu
-+ I "" TearMenuOff
+Please refer to the fvwm3commands and fvwm3styles man pages.
+endif::[]
+ifdef::fvwm3all[]
+// BEGIN 'commands'
+== LIST OF FVWM COMMANDS

-AddToMenu RootMenu
-+ I "click here to tear me off" TearMenuOff
-....
+The command descriptions below are grouped together in the following
+sections. The sections are hopefully sorted in order of usefulness to
+the newcomer.

-*Title*::
-	Does nothing This is used to insert a title line in a popup or menu.
+* *Menu commands*
+* *Miscellaneous commands*
+* *Commands affecting window movement and placement*
+* *Commands for focus and mouse movement*
+* *Commands controlling window state*
+* *Commands for mouse and key bindings*
+* *The Style command (controlling window styles)*
+* *Other commands controlling window styles*
+* *Commands controlling the virtual desktop*
+* *Commands for user functions and shell commands*
+* *Conditional commands*
+* *Module commands*
+* *Quit, restart and session management commands*
+* *Colorsets*
+* *Color gradients*

 === Miscellaneous Commands

@@ -5175,6 +5186,13 @@ PointerKey f1 a m Menu MainMenu
 ....


+ifdef::fvwm3[]
+== WINDOW STYLES
+
+Please refer to the fvwm3styles man page.
+endif::[]
+ifdef::fvwm3all[]
+// BEGIN 'styles'
 === Controlling Window Styles

 For readability, the commands in this section are not sorted
@@ -7585,6 +7603,8 @@ assigned to that particular _decor_ are updated. This command is
 useful, for instance, after a *ButtonStyle*, *TitleStyle* or
 *BorderStyle* (possibly used in conjunction with *AddToDecor*).
 Specifying an invalid decor results in all windows being updated.
+// END 'styles'
+endif::[]

 === Controlling the Virtual Desktop

@@ -9575,7 +9595,8 @@ MenuFace DGradient 100 3 Red 20 Blue 30 Black 50 Grey
 # 50% from yellow to red
 Colorset 0 HGradient 128 3 Blue 1000 Green 1 Yellow 1000 Red
 ....
-
+// END 'commands'
+endif::[]

 == ENVIRONMENT

diff --git a/doc/fvwm3all.adoc b/doc/fvwm3all.adoc
new file mode 100644
index 00000000..2ea88f08
--- /dev/null
+++ b/doc/fvwm3all.adoc
@@ -0,0 +1,7 @@
+= FVWM3ALL(1)
+
+== NAME
+
+fvwm3all - F? Virtual Window Manager for X11 - meta-man page
+
+include::fvwm3_manpage_source.adoc[]
diff --git a/doc/fvwm3commands.adoc b/doc/fvwm3commands.adoc
new file mode 100644
index 00000000..0525716d
--- /dev/null
+++ b/doc/fvwm3commands.adoc
@@ -0,0 +1,7 @@
+= FVWM3COMMANDS(1)
+
+== NAME
+
+fvwm3commands - fvwm built-in commands
+
+include::fvwm3_commands.ad[]
diff --git a/doc/fvwm3menus.adoc b/doc/fvwm3menus.adoc
new file mode 100644
index 00000000..01759d8f
--- /dev/null
+++ b/doc/fvwm3menus.adoc
@@ -0,0 +1,7 @@
+= FVWM3MENUS(1)
+
+== NAME
+
+fvwm3menus - fvwm menus
+
+include::fvwm3_menus.ad[]
diff --git a/doc/fvwm3styles.adoc b/doc/fvwm3styles.adoc
new file mode 100644
index 00000000..67b3165a
--- /dev/null
+++ b/doc/fvwm3styles.adoc
@@ -0,0 +1,7 @@
+= FVWM3STYLES(1)
+
+== NAME
+
+fvwm3styles - fvwm styles
+
+include::fvwm3_styles.ad[leveloffset=-1]
--
2.30.2

From 04dd031ccca2be0d0739bd2db01cbde1e71dd4c6 Mon Sep 17 00:00:00 2001
From: Dominik Vogt <dominik.v...@gmx.de>
Date: Mon, 15 Nov 2021 12:19:12 +0100
Subject: [PATCH 2/6] Correct a sentence in the man page.

---
 doc/fvwm3_manpage_source.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/fvwm3_manpage_source.adoc b/doc/fvwm3_manpage_source.adoc
index 31a4fbcb..0b7c46af 100644
--- a/doc/fvwm3_manpage_source.adoc
+++ b/doc/fvwm3_manpage_source.adoc
@@ -1632,7 +1632,7 @@ $[pointer.screen]::
 	The screen name the pointer is currently on. No expansion if RandR is
 	not enabled.
 +
-This command is deprecated; use $[monitor.current] instead.
+This is deprecated; use $[monitor.current] instead.

 $[monitor.<n>.x], $[monitor.<n>.y], $[monitor.<n>.width], $[monitor.<n>.height], $[monitor.<n>.desk], $[monitor.<n>.pagex], $[monitor.<n>.pagey] $[monitor.primary], $[monitor.current], $[monitor.output], $[monitor.count], $[monitor.<n>.prev_desk], $[monitor.<n>.prev_pagex], $[monitor.<n>.prev_pagey]::
 	Returns information about the selected monitor. These can be nested, for
--
2.30.2

From 220b18f3e469002c7ec121c8d5c33392417325f6 Mon Sep 17 00:00:00 2001
From: Dominik Vogt <dominik.v...@gmx.de>
Date: Mon, 15 Nov 2021 12:19:35 +0100
Subject: [PATCH 3/6] Rephrase Title style documentation.

---
 doc/fvwm3_manpage_source.adoc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/fvwm3_manpage_source.adoc b/doc/fvwm3_manpage_source.adoc
index 0b7c46af..4ca17353 100644
--- a/doc/fvwm3_manpage_source.adoc
+++ b/doc/fvwm3_manpage_source.adoc
@@ -5532,9 +5532,9 @@ _FPGrabFocusTransient_ + _FPReleaseFocusTransient_.
 _Lenience_ is equivalent to the new style _FPLenient_.

 *Window title*::
-	The _Title_ and !Title options determine if the window has a
-	title-bar or not. By default all windows have a title-bar. _NoTitle_
-	is equivalent to _!Title_ but is deprecated.
+	The _Title_ and !Title options determine whether the window is
+        decorated with a title-bar. By default all windows have a title-bar.
+        _NoTitle_ is equivalent to _!Title_ but is deprecated.
 +
 Windows with the _TitleAtBottom_, _TitleAtLeft_ or _TitleAtRight_
 style have a title-bar below, to the left or to the right of the
--
2.30.2

From e7640b8a6f99ca33d37198a753f843596a6872a0 Mon Sep 17 00:00:00 2001
From: Dominik Vogt <dominik.v...@gmx.de>
Date: Mon, 15 Nov 2021 23:29:24 +0100
Subject: [PATCH 4/6] Cleanup man page.

---
 doc/fvwm3_manpage_source.adoc | 72 +++++++++++++++++------------------
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/doc/fvwm3_manpage_source.adoc b/doc/fvwm3_manpage_source.adoc
index 4ca17353..b97d1bc9 100644
--- a/doc/fvwm3_manpage_source.adoc
+++ b/doc/fvwm3_manpage_source.adoc
@@ -616,7 +616,7 @@ might look something like this:

 By default, SVG images are rendered as the image creator intended them
 to. But since SVG is a vector graphics format, the images can be
-rendered at any chosen size and rotation, e.g. making it possible to use
+rendered at any chosen size and rotation, e.g. making it possible to use
 the same icon file rendered at different sizes for the _Icon_ and
 _MiniIcon_ styles.

@@ -1281,7 +1281,7 @@ desk, stickiness, shadiness, maximizedness, iconifiedness for all
 windows. Furthermore, some global state is saved.

 Fvwm doesn't save any information regarding styles, decors, functions or
-menus. If you change any of these resources during a session (e.g. by
+menus. If you change any of these resources during a session (e.g. by
 issuing *Style* commands or by using various modules), these changes are
 lost after saving and restarting the session. To become permanent, such
 changes have to be added to the configuration file.
@@ -1554,7 +1554,7 @@ $[page.nx] $[page.ny]::
 	equivalent to _area_ in the GNOME terminology.

 $[w.id]::
-	The window-id (expressed in hex, e.g. 0x10023c) of the window the
+	The window-id (expressed in hex, e.g. 0x10023c) of the window the
 	command was called for or "$[w.id]" if no window is associated with the
 	command.

@@ -1729,7 +1729,7 @@ $[infostore._key_]::
 $[...]::
 	If the string within the braces is neither of the above, fvwm tries to
 	find an environment variable with this name and replaces its value if
-	one is found (e.g. "$[PAGER]" could be replaced by "more"). Otherwise
+	one is found (e.g. "$[PAGER]" could be replaced by "more"). Otherwise
 	the string is left as is.
 +
 Some examples can be found in the description of the *AddToFunc*
@@ -2325,17 +2325,17 @@ _Context_:::
 	the current window, menu or icon.
 +
 _This_:::
-	whatever widget the pointer is on (e.g. a corner of a window or the
+	whatever widget the pointer is on (e.g. a corner of a window or the
 	root window).
 +
 _Rectangle_ <_geometry_>:::
 	the rectangle defined by <_geometry_> in X geometry format. Width
 	and height default to 1 if omitted.
-
-If the context-rectangle is omitted or illegal (e.g. "item" on a
++
+If the context-rectangle is omitted or invalid (e.g. "item" on a
 window), "Mouse" is the default. Note that not all of these make sense
-under all circumstances (e.g. "Icon" if the pointer is on a menu).
-
+under all circumstances (e.g. "Icon" if the pointer is on a menu).
++
 The offset values _x_ and _y_ specify how far the menu is moved from
 its default position. By default, the numeric value given is
 interpreted as a percentage of the context rectangle's width (height),
@@ -2547,7 +2547,7 @@ DestroyMenuStyle pixmap1
 Sets a new menu style or changes a previously defined style. The
 _stylename_ is the style name; if it contains spaces or tabs it has to
 be quoted. The name "*" is reserved for the default menu style. The
-default menu style is used for every menu-like object (e.g. the window
+default menu style is used for every menu-like object (e.g. the window
 created by the *WindowList* command) that had not be assigned a style
 using the *ChangeMenuStyle*. See also *DestroyMenuStyle*. When using
 monochrome color options are ignored.
@@ -2619,8 +2619,8 @@ SubmenusRight, BorderWidth 2, UniqueHotkeyActivatesImmediate,
 +
 _BorderWidth_ takes the thickness of the border around the menus in
 pixels. It may be zero to 50 pixels. The default is 2. Using an
-illegal value reverts the border width to the default.
-
+invalid value reverts the border width to the default.
++
 _Foreground_ and _Background_ may have a color name as an argument.
 This color is used for menu text or the menu's background. You can
 omit the color name to reset these colors to the built-in default.
@@ -2744,8 +2744,8 @@ with the -bs option, turn it off. If not try the -wm and +bs options:
 ....
 startx -- -wm +bs
 ....
-
-You may have to adapt this example to your system (e.g. if you use
++
+You may have to adapt this example to your system (e.g. if you use
 xinit to start X).
 +
 _PopupDelay_ requires one numeric argument. This value is the delay in
@@ -2789,8 +2789,8 @@ pointer enters the area that starts at 75% of the menu width, the sub
 menu is shown immediately. This percentage can be changed with
 _PopupActiveArea_. Setting this value to 100 disables this kind of
 automatic popups altogether. The default value is restored if no or an
-illegal value is given.
-
+invalid value is given.
++
 _TitleWarp_ and _!TitleWarp_ affect if the pointer warps to the menu
 title when a sub menu is opened or not. Note that regardless of this
 setting the pointer is not warped if the menu does not pop up under
@@ -2861,8 +2861,8 @@ a menu item. All you have to do is tell fvwm where to place the
 different parts of the menu item (i.e. the labels, the triangle
 denoting a sub menu, the mini icons and the side pic) in the blank
 area. The string consists of spaces,
-
-characters and formatting directives beginning with '%'. Any illegal
++
+characters and formatting directives beginning with '%'. Any invalid
 characters and formatting directives are silently ignored:
 +
 --
@@ -2902,8 +2902,8 @@ objects like this
 ....
 %left.rightp
 ....
-
-This means: if the object is defined in the menu (e.g. if it is *%s*
++
+This means: if the object is defined in the menu (e.g. if it is *%s*
 and you use a side picture, or it is *%l* for the third column and
 there are items defined that actually have a third column), then add
 _left_ pixels before the object and _right_ pixels after it. You may
@@ -3095,7 +3095,7 @@ the application.
 _MixedVisualWorkaround_ makes fvwm install the root colormap before it
 does some operations using the root window visuals. This is only
 useful when the *-visual* option is used to start fvwm and then only
-with some configurations of some servers (e.g. Exceed 6.0 with an 8
+with some configurations of some servers (e.g. Exceed 6.0 with an 8
 bit PseudoColor root and fvwm using a 24 bit TrueColor visual).
 +
 The _ModalityIsEvil_ option controls whether Motif applications have
@@ -4703,7 +4703,7 @@ WindowId root 1 WarpToWindow 50 50
 	iconified and de-iconified states.
 +
 There are a number of *Style* options which influence the appearance
-and behavior of icons (e.g. _StickyIcon_, _NoIcon_).
+and behavior of icons (e.g. _StickyIcon_, _NoIcon_).
 +
 For backward compatibility, the optional argument may also be a
 positive number instead of "True", or a negative number instead of
@@ -4879,7 +4879,7 @@ obsolete, and will be removed in the future.
 	command belongs into your _config_. If you issue it when your fvwm
 	session is already up and running the results are unpredictable. The
 	should appear before any applications or modules are started in your
-	_config_ file (e.g. with the *Exec* command).
+	_config_ file (e.g. with the *Exec* command).
 +
 _Modifiers_ has the same syntax as in the *Mouse* or *Key* bindings, with the
 addition of 'L' meaning the caps lock key. The default is "L".  _Modifiers_
@@ -6043,7 +6043,7 @@ the application to redraw frequently it can be quite slow and make the
 window flicker excessively, depending on the amount of graphics the
 application redraws. The _ResizeOutline_ style (default) negates the
 _ResizeOpaque_ style. Many applications do not like their windows
-being resized opaque, e.g. XEmacs, Netscape or terminals with a pixmap
+being resized opaque, e.g. XEmacs, Netscape or terminals with a pixmap
 background. If you do not like the result, do not use the
 _ResizeOpaque_ style for these windows. To exempt certain windows from
 opaque resizing you could use these lines in your configuration file:
@@ -6514,7 +6514,7 @@ _!IconPosition_
 +
 _StartsOnDesk_ takes a numeric argument which is the desktop number on
 which the window should be initially placed. Note that standard Xt
-programs can also specify this via a resource (e.g. "-xrm '*Desk:
+programs can also specify this via a resource (e.g. "-xrm '*Desk:
 1'").
 +
 _StartsOnPage_ takes 1, 2, or 3 numeric arguments. If one or three
@@ -6716,7 +6716,7 @@ _SaveUnder_ enables the corresponding window attribute in the X
 server. For a window using this style, the X server tries to store the
 graphics below it in memory which is usually slower if the client runs
 on the same machine as the X server. _SaveUnder_ may speed up fvwm if
-the connection to the X server is slow (e.g. over a modem link). To
+the connection to the X server is slow (e.g. over a modem link). To
 disable save under, use the _SaveUnderOff_ style. This is the default.
 See also _BackingStore_ above.
 +
@@ -6811,7 +6811,7 @@ _Prev_ or _All_. Windows with _CirculateSkip_, are never selected by
 conditional commands. However, the styles can be overridden explicitly
 in the condition with the _CirculateHit_, _CirculateHitIcon_ or
 _CirculateHitShaded_ conditions, and some conditional commands,
-e.g. *Current* and _All_, do this by default. The styles
+e.g. *Current* and _All_, do this by default. The styles
 _CirculateSkipIcon_, _CirculateHitIcon_, _CirculateSkipShaded_ and
 _CirculateHitShaded_ work like _CirculateSkip_ and _CirculateHit_ but
 apply only to iconic or shaded windows. Note: if multiple ...Skip...
@@ -6834,21 +6834,21 @@ of these styles as condition names. Take care not to confuse them.
 # Change default fvwm behavior to no title-
 # bars on windows! Also define a default icon.

-Style *       !Title,                	   \
-              Icon unknown1.xpm,     	   \
-              BorderWidth 4,         	   \
+Style *       !Title,                      \
+              Icon unknown1.xpm,           \
+              BorderWidth 4,               \
               HandleWidth 5

 # now, window specific changes:
-Style Fvwm* !Handles, Sticky,        	   \
-            WindowListSkip,          	   \
+Style Fvwm* !Handles, Sticky,              \
+            WindowListSkip,                \
             BorderWidth 0
 Style FvwmPager   StaysOnTop, BorderWidth 0
 Style *lock       !Handles, Sticky,        \
-            	  StaysOnTop, WindowListSkip
+                  StaysOnTop, WindowListSkip
 Style xbiff       Sticky, WindowListSkip
 Style FvwmButtons !Handles, Sticky,        \
-            	  WindowListSkip
+                  WindowListSkip
 Style sxpm        !Handles

 # Put title-bars back on xterms only!
@@ -7087,7 +7087,7 @@ _UseBorderStyle_ flag (see *ButtonStyle*).
 	("False"). The _bool_ flag is the same as other commands, and not
 	limited to just "True" or "False"; "Yes" and "No" may also be used.
 	The "ActiveUp" state cannot be deactivated. If no arguments are
-	provided or the given arguments are illegal, the default is restored.
+	provided or the given arguments are invalid, the default is restored.
 +
 If _ActiveDown_ argument is "False", no different button style for the
 pressed down buttons used, instead "ActiveUp" state is used even when
@@ -7308,7 +7308,7 @@ ButtonStyle 0 Vector 10 45x65@2 45x75@0 \
 ....

 +
-The _?Gradient_ styles denote color gradients. Fill in the question
+The _Gradient_ styles denote color gradients. Fill in the question
 mark with any one of the defined gradient types. Please refer to the
 *Color Gradients* section for a description of the gradient syntax.
 The gradient styles are fully destructive.
--
2.30.2

From 55f9fb424993cb373a5313b02fcc8d25341ba9a5 Mon Sep 17 00:00:00 2001
From: Dominik Vogt <dominik.v...@gmx.de>
Date: Tue, 16 Nov 2021 01:40:35 +0100
Subject: [PATCH 5/6] Remove "open look" and "xview" sections from man page.

---
 doc/fvwm3_manpage_source.adoc | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/doc/fvwm3_manpage_source.adoc b/doc/fvwm3_manpage_source.adoc
index b97d1bc9..6be8321a 100644
--- a/doc/fvwm3_manpage_source.adoc
+++ b/doc/fvwm3_manpage_source.adoc
@@ -897,36 +897,6 @@ type "xprop | grep _NET_WM_STRUT" in a terminal and select the
 application. If four numbers appear then these numbers define the
 reserved space as explained in the *EwmhBaseStruts* command.

-== OPEN LOOK AND XVIEW COMPATIBILITY
-
-Fvwm supports all the Open Look decoration hints (except pushpins).
-Should you use any such application, please add the following line to
-your config:
-
-....
-Style * OLDecor
-....
-
-Most (perhaps all) Open Look applications have a strange notion of
-keyboard focus handling. Although a lot of work went into fvwm to work
-well with these, you may still encounter problems. It is recommended to
-use the _NeverFocus_ focus policy and the _Lenience_ style for all such
-applications (the windows still get the focus):
-
-....
-Style <application name> NeverFocus, Lenience
-....
-
-But in case you can not live with that focus policy, you can try using
-one of the other focus policies in combination with the _Lenience_
-style:
-
-....
-Style <application name> MouseFocus, Lenience
-Style <application name> SloppyFocus, Lenience
-Style <application name> ClickToFocus, Lenience
-....
-
 == CONFIGURATION

 === Configuration Files
--
2.30.2

From 6aa396bd3ee424f508c5b464b06860fbbeebde07 Mon Sep 17 00:00:00 2001
From: Dominik Vogt <dominik.v...@gmx.de>
Date: Wed, 17 Nov 2021 14:05:25 +0100
Subject: [PATCH 6/6] Eliminate GlobalOpts command.

---
 dev-docs/COMMANDS             |   1 -
 dev-docs/PARSING.md           |   1 -
 doc/fvwm3_manpage_source.adoc | 100 +----------------------------
 fvwm/builtins.c               | 115 ----------------------------------
 fvwm/commands.h               |   1 -
 fvwm/functable.c              |   3 -
 perllib/FVWM/Commands.pm      |   6 --
 7 files changed, 1 insertion(+), 226 deletions(-)

diff --git a/dev-docs/COMMANDS b/dev-docs/COMMANDS
index 4c46f320..0f69b9ca 100644
--- a/dev-docs/COMMANDS
+++ b/dev-docs/COMMANDS
@@ -68,7 +68,6 @@ The recognized commands for fvwm 2.6.6 (from cvs) as of 09-Sep-2014:
   Focus                 - Give focus to a window
   FocusStyle            - Configure focus and raise policy for windows
   Function              - Execute a user defined function, see AddToFunc
-  GlobalOpts            - (obsolete, use corresponding Style * instead)
   GnomeButton           - Pass mouse button presses on root to GNOME program
   GnomeShowDesks        - Limit GNOME pager to the number of desks
   GotoDesk              - Switch viewport to another desk same page
diff --git a/dev-docs/PARSING.md b/dev-docs/PARSING.md
index 3a7c4c4c..af1ef34e 100644
--- a/dev-docs/PARSING.md
+++ b/dev-docs/PARSING.md
@@ -1819,7 +1819,6 @@ CMD_WINDOWSHADEANIMATE = "WindowShadeAnimate" ; Style * WindowShadeSteps
 CMD_WINDOWSDESK = "WindowsDesk" ; See 'MoveToDesk'
 CMD_DESK = "Desk" ; See 'Gotodesk'
 CMD_EDGERESISTANCE = "EdgeResistance" ; Style * EdgeMoveDelay, EdgeMoveResistance
-CMD_GLOBALOPTS = "GlobalOpts" ; Various Style options
 CMD_HIDEGEOMETRYWINDOW = "HideGeometryWindow" ; GeometryWindow Hide
 CMD_HILIGHTCOLOR = "HilightColor" ; Style
 CMD_ICONFONT = "IconFont" FONTNAME ; Style
diff --git a/doc/fvwm3_manpage_source.adoc b/doc/fvwm3_manpage_source.adoc
index 6be8321a..e9642463 100644
--- a/doc/fvwm3_manpage_source.adoc
+++ b/doc/fvwm3_manpage_source.adoc
@@ -3465,93 +3465,6 @@ WindowId 0x3800002 FakeKeypress press A
 +
 Note: all command names can be abbreviated with their first letter.

-*GlobalOpts* [_options_]::
-	This command is obsolete. Please replace the global options in your
-	configuration file according to the following table:
-+
-
-....
-GlobalOpts WindowShadeShrinks
--->
-Style * WindowShadeShrinks
-
-GlobalOpts WindowShadeScrolls
--->
-Style * WindowShadeScrolls
-
-GlobalOpts SmartPlacementIsReallySmart
--->
-Style * MinOverlapPlacement
-
-GlobalOpts SmartPlacementIsNormal
--->
-Style * TileCascadePlacement
-
-GlobalOpts ClickToFocusDoesntPassClick
--->
-Style * ClickToFocusPassesClickOff
-
-GlobalOpts ClickToFocusPassesClick
--->
-Style * ClickToFocusPassesClick
-
-GlobalOpts ClickToFocusDoesntRaise
--->
-Style * ClickToFocusRaisesOff
-
-GlobalOpts ClickToFocusRaises
--->
-Style * ClickToFocusRaises
-
-GlobalOpts MouseFocusClickDoesntRaise
--->
-Style * MouseFocusClickRaisesOff
-
-GlobalOpts MouseFocusClickRaises
--->
-Style * MouseFocusClickRaises
-
-GlobalOpts NoStipledTitles
--->
-Style * !StippledTitle
-
-GlobalOpts StipledTitles
--->
-Style * StippledTitle
-
-GlobalOpts CaptureHonorsStartsOnPage
--->
-Style * CaptureHonorsStartsOnPage
-
-GlobalOpts CaptureIgnoresStartsOnPage
--->
-Style * CaptureIgnoresStartsOnPage
-
-GlobalOpts RecaptureHonorsStartsOnPage
--->
-Style * RecaptureHonorsStartsOnPage
-
-GlobalOpts RecaptureIgnoresStartsOnPage
--->
-Style * RecaptureIgnoresStartsOnPage
-
-GlobalOpts ActivePlacementHonorsStartsOnPage
--->
-Style * ManualPlacementHonorsStartsOnPage
-
-GlobalOpts ActivePlacementIgnoresStartsOnPage
--->
-Style * ManualPlacementIgnoresStartsOnPage
-
-GlobalOpts RaiseOverNativeWindows
--->
-BugOpts RaiseOverNativeWindows on
-
-GlobalOpts IgnoreNativeWindows
--->
-BugOpts RaiseOverNativeWindows off
-....
-
 *HilightColor* _textcolor_ _backgroundcolor_::
 	This command is obsoleted by the *Style* options _HilightFore_ and
 	_HilightBack_. Please use
@@ -6404,23 +6317,12 @@ it hits the bottom screen border.
 _Old placement styles_ DumbPlacement / SmartPlacement /
 SmartPlacementOff, CleverPlacement / CleverPlacementOff,
 ActivePlacement / RandomPlacement, ActivePlacementsHonorsStartsOnPage
-/ ActivePlacementsHonorsStartsOnPageOff, GlobalOpts
-SmartPlacementIsReallySmart / GlobalOpts SmartPlacementIsNormal are
+/ ActivePlacementsHonorsStartsOnPageOff are
 still supported but will be removed in the future. The old and new
 styles can be translated according to the following table:
 +

 ....
-GlobalOpts SmartPlacementIsReallySmart
-Style * SmartPlacement
--->
-Style * SmartPlacement, CleverPlacement
-
-GlobalOpts SmartPlacementIsNormal
-Style * SmartPlacement
--->
-Style * SmartPlacement, CleverPlacementOff
-
 Style * DumbPlacement, RandomPlacement
 -->
 Style * CascadePlacement
diff --git a/fvwm/builtins.c b/fvwm/builtins.c
index 53e6d287..4065051d 100644
--- a/fvwm/builtins.c
+++ b/fvwm/builtins.c
@@ -3526,121 +3526,6 @@ void CMD_UnsetEnv(F_CMD_ARGS)
 	return;
 }

-void CMD_GlobalOpts(F_CMD_ARGS)
-{
-	char *opt;
-	char *replace;
-	char buf[64];
-	int i;
-	Bool is_bugopt;
-	char *optlist[] = {
-		"WindowShadeShrinks",
-		"WindowShadeScrolls",
-		"SmartPlacementIsReallySmart",
-		"SmartPlacementIsNormal",
-		"ClickToFocusDoesntPassClick",
-		"ClickToFocusPassesClick",
-		"ClickToFocusDoesntRaise",
-		"ClickToFocusRaises",
-		"MouseFocusClickDoesntRaise",
-		"MouseFocusClickRaises",
-		"NoStipledTitles",
-		"StipledTitles",
-		"CaptureHonorsStartsOnPage",
-		"CaptureIgnoresStartsOnPage",
-		"RecaptureHonorsStartsOnPage",
-		"RecaptureIgnoresStartsOnPage",
-		"ActivePlacementHonorsStartsOnPage",
-		"ActivePlacementIgnoresStartsOnPage",
-		"RaiseOverNativeWindows",
-		"IgnoreNativeWindows",
-		NULL
-	};
-	char *replacelist[] = {
-		/* These options are mapped to the Style * command */
-		NULL, /* NULL means to use "Style * <optionname>" */
-		NULL,
-		"* MinOverlapPlacement",
-		"* TileCascadePlacement",
-		"* ClickToFocusPassesClickOff",
-		"* ClickToFocusPassesClick",
-		"* ClickToFocusRaisesOff",
-		"* ClickToFocusRaises",
-		"* MouseFocusClickRaisesOff",
-		"* MouseFocusClickRaises",
-		"* StippledTitleOff",
-		"* StippledTitle",
-		NULL,
-		NULL,
-		NULL,
-		NULL,
-		"* ManualPlacementHonorsStartsOnPage",
-		"* ManualPlacementIgnoresStartsOnPage",
-		/* These options are mapped to the BugOpts command */
-		"RaiseOverNativeWindows on",
-		"RaiseOverNativeWindows off"
-	};
-
-	fvwm_debug(__func__,
-		   "The GlobalOpts command is obsolete.");
-	for (action = GetNextSimpleOption(action, &opt); opt;
-	     action = GetNextSimpleOption(action, &opt))
-	{
-		replace = NULL;
-		is_bugopt = False;
-
-		i = GetTokenIndex(opt, optlist, 0, NULL);
-		if (i > -1)
-		{
-			char *cmd;
-			char *tmp;
-
-			replace = replacelist[i];
-			if (replace == NULL)
-			{
-				replace = &(buf[0]);
-				sprintf(buf, "* %s", opt);
-			}
-			else if (*replace != '*')
-			{
-				is_bugopt = True;
-			}
-			tmp = action;
-			action = replace;
-			if (!is_bugopt)
-			{
-				CMD_Style(F_PASS_ARGS);
-				cmd = "Style";
-			}
-			else
-			{
-				CMD_BugOpts(F_PASS_ARGS);
-				cmd = "BugOpts";
-			}
-			action = tmp;
-			fvwm_debug(__func__,
-				   "Please replace 'GlobalOpts %s' with '%s %s'.",
-				   opt, cmd, replace);
-		}
-		else
-		{
-			fvwm_debug(__func__,
-				   "Unknown Global Option '%s'", opt);
-		}
-		/* should never be null, but checking anyways... */
-		if (opt)
-		{
-			free(opt);
-		}
-	}
-	if (opt)
-	{
-		free(opt);
-	}
-
-	return;
-}
-
 void CMD_BugOpts(F_CMD_ARGS)
 {
 	char *opt;
diff --git a/fvwm/commands.h b/fvwm/commands.h
index d0a509ff..4663111a 100644
--- a/fvwm/commands.h
+++ b/fvwm/commands.h
@@ -276,7 +276,6 @@ void CMD_Focus(F_CMD_ARGS);
 void CMD_FocusStyle(F_CMD_ARGS);
 void CMD_Function(F_CMD_ARGS);
 void CMD_GeometryWindow(F_CMD_ARGS);
-void CMD_GlobalOpts(F_CMD_ARGS);
 void CMD_GotoDesk(F_CMD_ARGS);
 void CMD_GotoDeskAndPage(F_CMD_ARGS);
 void CMD_GotoPage(F_CMD_ARGS);
diff --git a/fvwm/functable.c b/fvwm/functable.c
index 0215017a..aa53a045 100644
--- a/fvwm/functable.c
+++ b/fvwm/functable.c
@@ -285,9 +285,6 @@ const func_t func_table[] =
 	CMD_ENT("geometrywindow", CMD_GeometryWindow, F_GEOMWINDOW, 0, 0),
 	/* - Configuration settings for position/size window */

-	CMD_ENT("globalopts", CMD_GlobalOpts, F_GLOBAL_OPTS, 0, 0),
-	/* - (obsolete, use corresponding Style * instead) */
-
 	CMD_ENT("gotodesk", CMD_GotoDesk, F_GOTO_DESK, 0, 0),
 	/* - Switch viewport to another desk same page */

diff --git a/perllib/FVWM/Commands.pm b/perllib/FVWM/Commands.pm
index 32c45842..faed723e 100644
--- a/perllib/FVWM/Commands.pm
+++ b/perllib/FVWM/Commands.pm
@@ -416,12 +416,6 @@ $TIME = 1410306754;
 		window => 0,
 		descr => q{Execute a user defined function, see AddToFunc},
 	},
-	{
-		name => 'GlobalOpts',
-		cursor => '',
-		window => 0,
-		descr => q{(obsolete, use corresponding Style * instead)},
-	},
 	{
 		name => 'GnomeButton',
 		cursor => '',
--
2.30.2

Reply via email to