(edit-macro macro-name)

Takes the body of a named macro and places it in a buffer called Macro edit. The name of the macro is associated with the buffer and appears in the mode line at the bottom of the window. The buffer may be edited just like any other buffer. After the macro body has been edited it may be redefined using define-buffer-macro.

See also:

(emacs-version)

Returns a string describing the version of Emacs that you are running. For V7.0 of Emacs, the string looks something like:

X7.0.81 of Emacs Copyright Barry A. Scott (c) Sun Mar 14 09:30:14 1999

The string contains the version number, the date, time and node where Emacs was made, and who made it.

When reporting bugs or suggestions about Emacs, always quote the version number of Emacs to which the comments refer.

(end-of-file) ESC->

Moves dot to just after the last character in the buffer.

See also:

(end-of-line) ^E

Moves dot to the end of the line in the current buffer. Dot is placed after the last character on the line. If dot is already at the end of the line, it does not move.

See also:

(end-of-window) ESC-.

Moves dot to just after the last character visible in the window.

See also:

(enlarge-window) ^X-z

Makes the current window prefix-argument lines taller, and the window below (or the one above if there is no window below) prefix-argument lines shorter. This function cannot be used if there is only one window on the screen.

Example: Make the current window twice as high as it is currently:

(provide-prefix-argument window-size (enlarge-window))

See also:

(eobp)

Returns 1 if dot is at the end of the buffer.

See also:

(eolp)

Returns 1 if dot is at the end of a line.

Example: Delete next character provided that dot is not already at the end of a line.

        (if (! (eolp))
            (delete-next-character)

        )                               ; if

See also:

(erase-buffer)

Deletes all text from the current buffer and sets the buffer as unmodified. No prompt is given asking for confirmation that the buffer should be erased.

Example: Delete the content of the current buffer provided that the buffer has not been modified:

(if (! buffer-is-modified)
    (erase-buffer)
)

See also:

(erase-region)

Deletes all text between dot and mark in the current buffer. It does not ask to make sure if you really want to do it.

See also:

(ere-looking-at regular-expression)

Returns 1 if the given regular expression search string matches the text immediately following dot. This is for use in packages that want to do limited parsing.

If a negative prefix argument is supplied, characters to the left of dot are checked, rather than those to the right.

For example, if dot is at the beginning of a line then:

(ere-looking-at "\\s*else")

is true if the line starts with any number of spaces or tabs, followed by "else".

See ere-search-forward for more information about regular expression searches.

See also:

(ere-quote string)

Quotes all special ere characters in string so that the string can be searched for literally using ere search functions.

(ere-query-replace-string pattern replacement)

Replaces all occurrences of a pattern with a string, starting at dot and ending at the end of the buffer. For each occurrence of the old string, Emacs requests that the user type a character to indicate whether or not to replace the string. Dot will be positioned just after the found string.

(ere-replace-search-text replacement)

This function performs a regular expression replacement of the text matched by the last search operations.

(ere-replace-string pattern replacement)

Replaces all occurrences of a regular expression with a string, starting at dot and ending and the end of the buffer. See the Barry's Emacs User's Guide for information on how to specify regular expressions and replacement text.

(ere-search-forward pattern)

Searches for a pattern match in the current buffer, moving forwards from dot, stopping at the end of the buffer. Dot is left at the end of the matched string if a match is found, or is unmoved if the string is not found.

(ere-search-reverse string)

Searches for a pattern match in the current buffer, moving backwards from dot, stopping at the beginning of the buffer. Dot is left at the beginning of the matched string if a match is found, or is unmoved if not. See the Barry's Emacs User's Guide for information on how to specify regular expressions.

(error-and-exit) ^G (in the Mini-buffer)

This function is used in the Mini-buffer local keymaps to abort the current input operation. If called directly, this function is the same as exit-emacs.

See also:

(error-message string-expression...)

Concatenates the supplied string expressions and sends them to the screen as an error message where they will appear in the Mini-buffer. Emacs returns to keyboard level and sounds the terminal's bell.

(error-message-parser)

Parses error messages for the parse-error-message-in-region and compile-it commands. This function is the default error message parser supplied with Emacs and is capable of locating error messages for VAX C, PL/I and BLISS.

(error-occurred expression...)

Executes the given expressions and ignores their values. If all expressions execute successfully, it returns 0. Otherwise, it returns 1 and all expressions after the one which encountered the error will not be executed.

The text of any error message is available for processing in the string variable error-message.

See also:

(exchange-dot-and-mark) ^X-^X

Sets dot to the current location of the mark and sets the mark at the old position of dot. This is useful for bouncing back and forth between two points in a file, particularly when the two points delimit a region of text that is going to be operated on by a command such as delete-to-killbuffer.

See also:

(execute-extended-command extended-command) ESC-x, Do

Executes the specified extended command.

If called interactively, it prompts for the command to execute. You can type ESC or space to invoke command completion, or a question mark (?) for a list of valid commands.

(execute-keyboard-macro) ^X-e

Invokes the currently-defined keyboard macro. This is a remembered sequence of keystrokes.

See also:

(execute-mlisp-buffer)

Parses and compiles the current buffer as a single MLisp expression and executes it. This function is useful when you are testing new functions.

See also:

(execute-mlisp-file filename)

Reads the named file as a series of MLisp expressions and executes them.

The file name given is interpreted relative to the EMACS_PATH logical name. EMACS_PATH is defined as a logical name search-list. If the file cannot be located using EMACS_PATH, a search is made in the database search-list MLisp-library.

The default file type is .ML

To modify EMACS_PATH, select Edit, Preferences, Directories.

See also:

(execute-mlisp-line MLisp-expression) ESC-ESC

Prompts for a string in the Mini-buffer, parses it as an MLisp expression, and executes it.

If called from a MLisp program, the command to be executed must be supplied as a string. This provides for dynamic compilation during the execution of a program.

See also:

(execute-monitor-command DCL-command) ^X-!

Passes the command to the operating system and places the command output into a buffer called Command execution, making that buffer visible in a window. The command that is run cannot read from its standard input, so execute-monitor-command cannot be used if the command that is run will prompt for information.

See also:

(exit-emacs) ^C or ESC-^C

Exits Emacs if the current recursion depth is zero. It will ask for confirmation if there are any buffers that have been modified but not written out.

If the recursion depth is not zero, exit-emacs exits the current recursive edit level.

See also:

(expand-and-exit) ESC (in the Mini-buffer)

Causes command completion to occur in the Mini-buffer. If called interactively, this function is the same as exit-emacs.

See also:

(expand-file-name file-name)

Returns the fully-expanded file specification of the file name argument.

Wildcards may be specified to obtain a sequence of file names. Call expand-file-name first with the wildcard file specification. Then call expand-file-name specifying a null filename until an error occurs.

Example: a function to prompt for a file specification and then insert, into the current buffer, the names of all the files that match the specification.

(defun
    (insert-filelist
        spec
        (setq spec (expand-file-name (get-tty-string "Insert names matching: ")))
            (while (!= spec "")
                (insert-string (concat spec "\n"))
                (setq spec (expand-file-name ""))
                
            )
        )
    )
)

See also:

(expand-file-name-recursive file-name)

Returns the fully-expanded file specification of the file name argument.

Wildcards may be specified to obtain a sequence of file names. Call expand-file-name-recursive first with the wildcard file specification. Then call expand-file-name-recursive specifying a null filename until an error occurs.

expand-file-name-recursive starts looking for files in the directory specified in file-name. It then looks in all of the subdirectories under the starting directory.

Example: A function prompts for an mlisp function and executes that function on all files that match the given file specification.

(defun function-on-many-files
    (
        ~files (get-tty-file "do function on these files:  ")
        ~function (get-tty-command "function to execute: ")
        ~recursive (get-tty-string "recursive? (y/n) [N] ")
    )
    
    ~target
    (setq ~function (concat "(" ~function ")"))
    
    
    (if (= ~recursive "y") 
        (setq ~target (expand-file-name-recursive ~files))
        (setq ~target (expand-file-name ~files))
    )                           ; if
    
    (while (!= ~target "")
        (save-excursion
            (visit-file ~target)
            (beginning-of-file)
            (sit-for 0)
            (execute-mlisp-line ~function)
            (if buffer-is-modified
                (write-current-file)
            )           ; if
            (delete-buffer current-buffer-name)
            
            (if (= ~recursive "y")
                (setq ~target (expand-file-name-recursive ""))
                (setq ~target (expand-file-name ""))
            )                   ; if
            
        )                       ; save-excursion
    )                           ; while
    
)                               ; defun - function-on-many-files

See also:

(expand-mlisp-variable variable-name)

Inserts the name of the specified variable in a buffer, using variable name completion.

See also:

(expand-mlisp-word command-name)

Prompts for the name of a command and then inserts the name as text into the current buffer. This is very handy when you are editing an MLisp function. It's useful to bind expand-mlisp-word to a key for easy access.

See also:

(expand-from-string-table prompt word-list-string)

Provides access to the Emacs input expansion mechanism. The function has two parameters: the first is a prompt, the second is a string that contains a space-separated list of words from which the user can select. The result of the function is the selected word. expand-from-string-table allows only one of the words in the list to be returned.

Example: A function that prompt for the name of a fruit to insert into the current buffer

(defun
    (fruit-picker
        (insert-string
            (expand-from-string-table
                "choose a fruit: "
                "strawberry apple banana"
            )
        )
    )
)

Example: Prompt for one of the words "exit", "read", "write", "quit".

(expand-from-string-table "Command: " "exit read write quit")

(expand-mlisp-word command-name)

Inserts the name of the specified function in a buffer using variable name completion.

(extend-database-search-list dbname filename access)

Adds the given database file to the database search list dbname. If the database is already in the search list, it is left there. Otherwise, the new database is added at the beginning of the database list.

Databases are help or macro libraries.

Access is a bit mask that specifies the type of access required and it is optional. The allowable values of access are:

See also:

(external-function function file routine)

Declares function as being provided by routine in the image file. This image is dynamically linked into the Emacs process when the function is called.