This section describes how a user profile should be incorporated into MicroEmacs '06. A user profile defines a set of extensions to MicroEmacs which encapsulates settings which are used by an individual user.
The user profile allows:-
In order to identify a user MicroEmacs '06 uses information in the system to determine the name of the user, and in turn the configuration to use. On all systems the value of the environment variable $MENAME(5) takes priority over any other means of user identification. If this variable is not defined then the host system typically provides a mechanism to determine the current user. MS-DOS and Microsoft Windows systems present problems where a login prompt is not used.
Each of the supported platforms are now described.
Remember to re-boot the system before the new command takes effect. (see the next step, there is another change to autoexec.bat).
Platforms may share the same set of configuration files. Consider a system which may boot under MS-DOS, Windows '98, NT and Linux. Provided that the macro files are located on a file system that may be mounted by all of the other operating systems and the $MEUSERPATH(5) and $MEPATH(5) are set appropriately to point to the users private MicroEmacs and system directories, then a single set of macro files may be shared across all platforms.
The private user profile is stored in a separate directory. The directory that MicroEmacs uses is typically automatically created at start up, but may be created manually by the user. If the directory is to be placed in a special location then the $MEUSERPATH(5) environment variable should be defined and set to point at this directory location.
Change or add the environment variable $MEUSERPATH(5) in the autoexec.bat to include the new directory i.e.
The user data area $user-path(5) may be modified by creating a new directory and setting the environment variable $MEUSERPATH(5) to point to this new directory location. The location be specified by a meuserpath entry in the me32.ini(8) file rather than setting the environment variable $MEUSERPATH(5).
On starting MicroEmacs for the first time then the user is guided through the configuration file setup to create any local configuration files. Once set up then MicroEmacs may be configured using the user-setup(3) dialog:-
Help => User Setup
Files created in the user directory include:-
In addition to the above, if new private macro files are constructed then they should be added to this directory (if they are not global to the company).
The following are examples of some individuals start-up files:-
; Jon's special settings ; ; Last Modified <190698.2226> ; ; Macro to delete the whitespace, or if an a word all of the ; word until the next word is reached. define-macro super-delete set-variable #l0 0 !while ¬ &sin @wc " \t\n" forward-char set-variable #l0 &add #l0 1 !done !repeat !force forward-char !if $status set-variable #l0 &add #l0 1 !endif !until &or &seq @wc "" ¬ &sin @wc " \t\n" #l0 backward-delete-char !return !emacro ; Make a previous-buffer command. define-macro previous-buffer &neg @# next-buffer !emacro ; spotless; Perform a clean and remove any multi-blank lines. define-macro spotless -1 clean !emacro ; comment-adjust; Used for comments in electric-c mode (and the other ; electic modes. Moves to the comment fill position, saves having to mess ; around with comments at the end of the line. 0 define-macro comment-adjust ; delete all spaces up until the next character !while &sin @wc " \t" forward-delete-char !done ; Fill the line to the current $c-margin. We use this as ; this is the only variable that tells us where the margin ; should be. !if &gre $window-acol 0 backward-char !if &sin @wc " \t" forward-delete-char !jump -4 !else forward-char !endif !endif ; Now fill to the $c-margin &sub $c-margin $window-acol insert-string " " !emacro ; Macro to force buffer to compile buffer for C-x ' define-macro compile-error-buffer !force delete-buffer *compile* change-buffer-name "*compile*" !emacro ; ; Set up the bindings. ; global-bind-key super-delete "C-delete" global-bind-key beginning-of-line "home" global-bind-key end-of-line "end" global-bind-key undo "f4" !if &seq %emulate "ERROR" global-bind-key comment-adjust "esc tab" global-bind-key comment-adjust "C-insert" ; Like a korn shell please. ml-bind-key tab "esc esc" !endif ; ; Setup for windows and UNIX. ; ; Define my hilighting colour for Windows and UNIX. !if &equ &band $system 0x001 0 !if ¬ &seq $platform "win32" ; Small bold font is better for me. change-font "-*-clean-medium-r-*-*-*-130-*-*-*-*-*-*" !endif !endif ; Change the default diff command-line for GNU diff utility all platforms set-variable %diff-com "diff --context --minimal --ignore-space-change --report-identical-files --recursive" set-variable %gdiff-com "diff --context --ignore-space-change -w" ; Setup for cygwin !if &seq $platform "win32" set-variable %cygwin-path "c:/cygwin" set-variable %cygwin-hilight 1 !endif ; Set up the ftp flags. The letters have the following meaning: ; c - Create a console (*ftp-console* for ftp, *http-console* for http) ; s - Show the console ; p - Show download progress ('#' every 2Kb downloaded) set-variable %ftp-flags "csp" ; Info files ;To hilight the .info and also the dir file add-file-hook ".info dir" fhook-info ; Info-files ;To hilight all info files without the extension .info ;but starting with the text "This is info file.. -2 add-file-hook "This is Info file" fhook-info ; Finished ml-write "Configured to Jon's requirements"
user-setup(3), $search-path(5), $user-name(5), $user-path(5), $MEINSTALLPATH(5), $MENAME(5), $MEPATH(5), $MEUSERPATH(5), me32.ini(8), Company Profiles, File Hooks, File Language Templates, Installation.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2004/02/22
Generated On: 2006/10/07