hilight-print - Define a hilighting print scheme
n hilight-print printNum ["printFormat" color1 color2 ... ]
hilight-print defines the mapping of the screen hilighting to the printer, converting the screen hilighting information to a printer hilighting definition. The print hilighting is file format specific and is typically defined in the hook files hkxxxx.emf.
The printer hilighting uses the hilighing number printNum, as defined by hilight(2) as an identifier. hilight-print is called with a numerical argument n of zero to initialize the printer. The printFormat and color arguments are omitted. An initialization call MUST be made prior to binding the hilighting codes.
hilight-print is invoked with no numerical argument to bind a hilighting scheme number to a printer format. printNum identifies the printer hilighting scheme number. printFormat identifies the rendering to appear on the printer, comprising single letters to identify the print typeface. Multiple print typeface`s may be defined, their effect is accumulative (i.e. bold and italic is printed in a bold-italic font). The printer codes are defined as follows:-
b - Bold
i - Italic
u - Underline
r - Reverse
n - Normal print (i.e. not hilighted).
a bold-italic font would be defined as "bi". The color1 argument then 'binds' the given printer format to the given color1 color scheme. One or more color schemes may be given, binding them all to the given printer format.
The following example is the default hilight print scheme, taken from scheme.emf, which can be used to print a variety of different file types including 'C' programming language files:-
; Create the default printing scheme ; Reset the hilighting printer format and define the color scheme bindings. 0 hilight-print 0 ; Programing hilight-print 0 "i" .scheme.comment hilight-print 0 "b" .scheme.prepro .scheme.type .scheme.operator .scheme.variable hilight-print 0 "bi" .scheme.quote .scheme.error .scheme.string .scheme.vstring ; Misc hilight-print 0 "i" .scheme.italic .scheme.vitalic .scheme.under hilight-print 0 "b" .scheme.no1 .scheme.no2 .scheme.header hilight-print 0 "b" .scheme.file .scheme.dirslink .scheme.bold .scheme.vbold hilight-print 0 "bi" .scheme.link
This prints all comments in italic text, pre-processor lines, types, operators and variables in bold and quoted text strings and errors in bold-italic.
When printing, if the current buffer has no specific hilight-print scheme then the default is used, which is hilight-print scheme 0.
(c) Copyright JASSPA 1999
Last Modified: 1999/02/27
Generated On: 1999/12/01