(if test then-clause else-clause)
Executes and returns the value of then-clause if test is not zero; otherwise it executes else-clause if it is present.
Example: Tab to column 33 if dot is currently at the start of a line:
(if (bolp) (to-col 33) )You can also have multiple tests, which gives you the equivalent of switch or case statements in other programming languages:
(defun (month response (setq response (get-tty-string "Month number: ")) (if (= response 1) (insert-string "January") (= response 2) (insert-string "February") (= response 3) (insert-string "March")) ) ; if ) )
(illegal-operation) All keys not currently bound
illegal-operation is bound to those keys that do not have a defined interpretation. Executing illegal-operation is an error.
Start incremental search in forward search mode. See extension incsearch for details
Locates the current C language procedure and passes it as the standard input to the INDENT program. The resulting indented C procedure will replace the initial C procedure. The old text is temporarily stored in Kill buffer.
Inserts its numeric argument into the buffer as a single character prefix-argument times.
Example: Each of the following inserts a zero into the current buffer:
(insert-character 48) (insert-character '0')
Inserts the specified file's contents at dot in the current buffer.
See also:
Inserts the string that results from evaluating the given expression. insert-string concatenates multiple string arguments.
Examples:
Insert the current date and time into the current buffer:
(insert-string (current-time))Insert the current time and buffer name:
(insert-string "Time: " (current-time) "\nBuffer: " (current-buffer-name) "\n")Sample output from this line:
Time: Tue Sep 28 10:48:41 1999 Buffer: fred
Returns 1 if the invoking MLisp function was called interactively.
When bound to a single key causes any current activity within Emacs to be aborted, and forces Emacs to accept commands from the keyboard when that key is struck.
Binding interrupt-key to a sequence longer than one character does not allow the key sequence to interrupt Emacs. Only single key sequences can be used for interrupting.
Returns 1 if all of its variable name arguments are bound to some storage.
Checks that its string parameter is a defined function. It returns 1 if it is defined and 0 otherwise.
You can use this function to determine whether a function is defined before attempting to execute it.