(append-region-to-buffer buffer-name)
Appends the region between dot and mark to the buffer buffer-name. Neither the original text in the destination buffer nor the text in the region between dot and mark are disturbed.
Default binding: none
See also:
Appends the contents of the current buffer to the file named file-name. If the file does not exist, it is created.
Default binding: none
Scans the list of file name patterns set up by auto-execute and executes an associated command if the supplied file name matches one of the patterns.
Default binding: none
See also:
(apply-colour-to-region start end colour)
Use the command apply-colour-to-region to define the region in a buffer to which Emacs is to add colour.
Where the region covers the characters between start and end and will take on the colour colour. The valid range for colour is 1 to 8, which selects colours User 1 to User 8. To clear the colouring from a range, use colour 0.
Default binding: none.
Example:
(defun (test-0 (switch-to-buffer "Test rendition regions") (apply-colour-to-region 0 999 0) ) ) (defun (test-1 (test-0) (switch-to-buffer "Test rendition regions") (erase-buffer) (insert-string " Red Green Blue ") (apply-colour-to-region 2 5 1) (apply-colour-to-region 6 11 2) (apply-colour-to-region 12 16 3) ) )
Prints a list of all the commands and variable whose names contains the word keyword. For example, if you forget which commands and variables deal with windows, you can type ESC-? window ENTER.
Default binding: ESC-?
See also:
Prints a list of all the commands whose extended command name contains the word keyword. For example, if you forget which commands deal with windows, you can type ESC-? window ENTER.
(apropos-variable keyword) ^X-?
Prints a list of all the variables whose extended command name contains the word keyword. For example, if you forget which variables deal with windows, you can type ^X-? window ESC.
Default binding: ^X-?
See also:
(arg expression-1 prompt-string)
Evaluates the expression-1th argument of the invoking function or prompts for it if called interactively. The prompt is optional; if it is omitted, the function cannot be called interactively.
Some examples:
(arg 1 "Enter a number: ")evaluates to the value of the first argument of the current function, if the current function was called from MLisp. If it was called interactively then the argument is prompted for.
Given:
defun (foo (+ (arg 1 "Number to increment? ") 1)))then (foo 10) returns 11, but typing ESC-x foo causes Emacs to ask Number to increment?
Language purists will no doubt cringe at this rather primitive parameter mechanism, but what-the-hell... it's amazingly powerful.
Default binding: none
(arg-is-qualifier expression-1)
When Emacs is invoked it parses the command line into qualifiers and values according to the host operating system conventions. Use arg-is-qualifier to find out if the expression-1th argument if a qualifier.
The MLisp Programmers Guide has furthur information about Command Lines.
If Emacs was invoked on Windows as:
bemacs fred.dat /invertThen (arg-is-qualifier 1) returns false.
And (arg-is-qualifier 2) returns true.
Default binding: none
See also:
Returns the number of arguments that were passed to Emacs when it was invoked from DCL. If argc is called early enough, Emacs' default startup action of visiting the files named on the command line is suppressed.
The MLisp Programmers Guide has furthur information about Command Lines.
Default binding: none
See also:
When followed by a string of digits, cause that string of digits to be interpreted as a numeric prefix argument which is generally a repetition count for the following command.
For example, ^U10^N moves down 10 lines (the 10'th next).
For each ^U typed before a command, the current prefix argument is multiplied by 4. So ^U is 4, ^U-^U is 16 and ^U-^U-^U is 64.
Never call argument-prefix from an MLisp function.
Default binding: ^U
Returns the expression-1th argument that was passed to Emacs when it was invoked from DCL. If Emacs was invoked as Emacs blatto then (argv 1) would return the string blatto. If argv is called early enough, Emacs' default startup action of visiting the files named on the command line is suppressed.
The MLisp Programmers Guide has furthur information about Command Lines.
Default binding: none
See also:
(array low-bound high-bound ...)
Creates an array of up to 10 dimensions. The arguments to the command are pairs of array bounds (first the lower bound, then the upper bound). All elements of the array are initialised to integer value 0.
Example: Create a two dimension array
(setq 2d-array (array -5 5 3 7))This creates an array where the first index ranges from -5 to +5 and the second index ranges from +3 to +7. The array has a total of 55 elements in it.
Default binding: none
(auto-execute command-name file-pattern)
Sets up a filename-to-command association. When a file is read in, using visit-file or read-file, whose name matches the given pattern, the specified command will be executed. The command is generally one which sets the mode for the buffer.
Filename patterns can be either of the following:
- *string matches any filename whose suffix is "string"
- string* matches any filename prefixed by "string".
Example: To enable Lisp Mode for all files with a .ML file type:
(auto-execute "lisp-mode" "*.ml")See also:
(autoload command-string file-name)
Specifies that the code that defines the specified command should be automatically loaded from the named file. When an attempt to execute the command is encountered, the file is loaded and then the specified function is executed. You can use autoload to load functions into Emacs only when they are necessary rather than saving them as part of an environment; this saves space in Emacs and speeds Emacs startup.
Use autoload when you have some mlisp code that you do not want to have code loaded until it is needed.
Example:
If you have a function named box-it in a file named boxit.ml, then the following command will define the box-it command, but won't load its definition from boxit.ml. The loading will happen when you try to execute the box-it command.
(autoload "box-it" "boxit.ml")