D0 Emacs Extensions
This page describes D0 specific extensions to the gnu emacs editor. The
extensions have been tested on VMS, Sgi and IBM/AIX platforms. The
discussion assumes that users have a file called .emacs
in their login directory (all platforms).
Enabling D0 Extensions
The extensions are contained in the file d0.el released as part of
the D0 unix library. You currently need to include an explicit reference
in your .emacs file. The reference is:
(setq ftest (substitute-in-file-name "$d0test/unix/emacs/d0.el" ))
(setq fprod (substitute-in-file-name "$d0library/unix/emacs/d0.el" ))
(cond ((file-readable-p ftest) (load-file ftest))
((file-readable-p fprod) (load-file fprod))
(t (message "No d0.el found")))
This can be found in the unix library in stdemacs.
Using the Extensions
All D0 extensions are invoked with a two key sequence. The sequences
are defined in the following table. (The character '^' in the table
means to simultaneously depress the control key and the character key
following the '^'. For example, ^z means simulataneously press ctrl and
z.) Users are prompted for input at the bottom line of the emacs window.
- ^z^e - Read D0 library source
- ^z^z - Read a .zeb file
- ^c^h - Insert a standard header (Fortran and C/C++)
Customization
The default D0 extensions can be customized in the following ways:
- Standard Header The username entered into the standard
header by default is taken from the full name field of the users account
(See /etc/passwd on Unix systems). This can be overridden in the
by including
(defvar d0-username "your preferred name here")
in the users .emacs file.
- Standard skeleton prefixTo add text prior to the
start of a standared header add
(setq fortran-header-prefix "C- additional header text \n")
(setq fortran-header-prefix "/* additional header text */\n")
to your .emacs file.
- Standard skeleton appendix To add text following the
end of the routine inserted as a standard header add
(setq fortran-header-appendix "C- trailing text here\n")
(setq c-header-appendix "/* trailing text here */\n")
to your .emacs file.
hobbs@fnal.fnal.gov