Arbortext Command Language > set Command Options > set docmapcurrenttag
  
set docmapcurrenttag
set docmapcurrenttag= { on | off}
This option controls how the oid_current_tag() and current_tag_name() ACL functions and the $tagname predefined variable determine the “current tag” in the Document Map view. It is provided for backward compatibility with certain pre-Adept 7.0 ACL scripts.
If this option is set to on (the default), Arbortext Editor determines the “current tag” per the following rules:
If the cursor is anywhere in the Edit view, the current tag is always the tag to the left of the cursor.
If the cursor is at the start of a line in the Document Map view (that is, between the element icon and the element name), the current tag is the element to the right of the cursor.
If the cursor is anywhere else in the Document Map, the current tag is the element to the left of the cursor.
If the option is set to off, then the current tag is always the tag to the left of the cursor in both the Document Map and Edit views.
If you have an ACL script from a pre-7.0 version of Adept that uses the current tag, you may want to add the set docmapcurrenttag=off command to the beginning of the script. This will guarantee that the “current tag” will always be to the left of the cursor, even if the cursor is at the start of a line in the Document Map view. When your script completes, it should execute the set docmapcurrenttag=on command to restore the default value.
If your script relies on a user's interaction with Arbortext Editor, you may wish to leave docmapcurrenttag set to its default value of on.
For example, assume that your script makes specific modifications to element attributes for the current element (tag). If a user executes your script using a menu command or control-key, you are relying on them to position the cursor such that they modify the attributes for the desired element. In this case, you would want to exploit the intuitive nature of “current tag” determination in the Document Map view.
* 
The modify_tag, change_tag, and delete_tag commands operate on the current tag, so they are affected by this option setting.
Related Topics
oid_current_tag function
current_tag_name function
change_tag command
delete_tag command
modify_tag command
Predefined variables ($tagname variable)