# global-mode(2)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

global-mode - Change a global buffer mode
add-global-mode - Set a global buffer mode
delete-global-mode - Remove a global buffer mode

## SYNOPSIS

n global-mode "mode" (esc m)
add-global-mode "mode"
delete-global-mode "mode"

## DESCRIPTION

global-mode changes the state of one of the hereditary global modes. A buffer's modes are initialized to the global modes when first created. This command is very useful in changing some of the default behavior such as case sensitive searching (see the example below). See Operating Modes for a full list and description of modes. Also see buffer-mode(2) for a full description of the use of the argument n.

The about(2) command gives a list of the current global and buffer modes.

add-global-mode and delete-global-mode are macros defined in meme3_8.emf which use global-mode to add or remove a global mode. They are defined for backward compatibility with MicroEMACS v3.8 and for ease of use; they are simple macros, add-global-mode is defined as follows:

    define-macro add-global-mode
        ; Has the require mode been given as an argument, if so add it
        !force 1 global-mode @1
        !if &not $status
            ; No - use 1 global-mode to add a mode
            !nma 1 global-mode
        !endif
    !emacro

## EXAMPLE

The following example globally disables exact(2m) and magic(2m) modes, if these lines are copied to the user setup file then are searches will be simple and case insensitive by default:

    -1 global-mode "exact"
    -1 global-mode "magic"

## NOTES

Globally adding binary(2m), crypt(2m) and rbin(2m) modes is strongly discouraged as any file loaded would be assigned these modes. Instead use the numeric argument of command find-file(2) or commands find-bfile(3) and find-cfile(3).

auto(2m), autosv(2m), backup(2m), exact(2m), magic(2m), quiet(5), tab(2m) and undo(2m) modes are present on all platforms by default. On Windows and DOS platforms cr(2m) and lf(2m) is also present and on DOS ctrlz(2m) is also present.

## SEE ALSO

Operating Modes, buffer-mode(2), find-bfile(3), find-cfile(3), about(2).

(c) Copyright JASSPA 2009
Last Modified: 2009/10/03
Generated On: 2009/10/12

</HMTL>