3 @c Copyright (C) 2002, 2003 Free Software Foundation, Inc.
4 @c Copyright (C) 2003 Jake Colman <jake.colman@xemacs.org>
5 @c Copyright (C) 2004 Ville Skyttä <scop@xemacs.org>
6 @c Copyright (C) 2012 Mats Lidell <matsl@xemacs.org>
8 @c @setfilename prog-modes.info
9 @settitle Programming Modes for XEmacs
11 @dircategory XEmacs Editor
13 * Programming Modes: (prog-modes). Programming Modes for XEmacs.
19 This manual is part of XEmacs.
21 XEmacs is free software; you can redistribute it and/or modify it
22 under the terms of the GNU General Public License as published by
23 the Free Software Foundation; either version 2, or (at your option)
26 XEmacs is distributed in the hope that it will be useful, but
27 WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 General Public License for more details.
31 You should have received a copy of the GNU General Public License
32 along with XEmacs; see the file COPYING. If not, write to the Free
33 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
38 @node Top, Copying, (dir), (dir)
39 @chapter The Programming Modes Package
42 This Info file contains the manual for the Programming Modes package.
45 The node name for each entry in the menu is the name of the elisp file
46 containing the code that implements the functionality described. It is
47 highly recommended that you briefly peruse the elisp source code since it can
48 provide valuable information on usage and technique. This can easily be done
49 by typing @code{C-x 4 l <filename> RET} where <filename> is the name of the
50 elisp file to be loaded.
52 In many cases, the @code{customize} command can be used to customize a
53 package's options. For those packages that support @code{customize}, the
54 appropriate command is given. Otherwise, peruse the code as described above
55 to learn how to set the package's options.
57 When you have entered a mode, you may get more info on the capabilities of
58 that mode by pressing @kbd{C-h m}. You may also get online help describing
59 functions provided by the mode by pressing @code{C-h f <function name>}.
64 * asm-mode:: Editing Assembler Code
65 * autoconf-mode:: Editing Autoconf Input Files
66 * awk-mode:: Editing AWK Code
67 * cl-indent:: Enhanced Lisp-Indent Mode
68 * cvs:: Light CVS Support
69 * diff-mode:: Viewing and Editing Context Diffs
70 * eiffel:: Editing Eiffel Code
71 * go-mode:: Editing Go Code
72 * icon:: Editing Icon Code
73 * javascript-mode:: Editing JavaScript Code
74 * ksh-mode:: Editing Shell Script (sh, ksh, bash) Code
75 * lua-mode:: Editing Lua Code
76 * m4-mode:: Editing m4 Code
77 * make-mode:: Editing Makefiles
78 * mode-compile:: Compiling Files According to Major-Mode
79 * modula2:: Editing Modula-2 Code
80 * old-c-mode:: Editing C Code
81 * p4:: Integration with Perforce Version Control
82 * pascal:: Editing Pascal Code
83 * php-mode:: Editing PHP Code
84 * postscript:: Editing PostScript Programs
85 * prolog:: Editing and Running Prolog Code
86 * rexx-mode:: Editing REXX Code
87 * rpm-spec-mode:: Editing RPM Spec Files
88 * simula:: Editing SIMULA 87 Code
89 * sql:: Specialized Mode for SQL Interpreters
90 * tcl:: Editing Tcl Code
91 * teco:: Teco Interpreter
92 * uil-mode:: Editing Motif UIL Code
93 * verilog-mode:: Editing Verilog HDL Source
94 * vrml-mode:: Editing VRML (.wrl) Files
96 * XEmacs License:: XEmacs License
99 @node Copying, asm-mode, Top, Top
102 This document may be redistributed, verbatim or in modified form, under
103 the terms of the GNU General Public License, version 2 or any later
104 version. The same terms apply to the libraries it documents. A copy
105 of the General Public License is provided as an Appendix.
107 Most XEmacs documentation has its own license, which is an ancestor of
108 the GNU Free Documentation License (@dfn{FDL}), and whose terms are
109 quite similar to those imposed by GNU on Emacs documentation. Why is
110 this manual licensed differently (under the GNU General Public License,
111 or @dfn{GPL}), and why does it have to be distributed separately from
112 the XEmacs User's Guide and the XEmacs Lisp Reference Manual?
114 Taking the second question first, XEmacs is @dfn{community-owned}
115 software. That is, unlike GNU Emacs, there is no monopoly copyright
116 holder. Many of us, including the original Lucid authors, have
117 contributed our copyrights to the Free Software Foundation (FSF), and of
118 course much content is derived from GNU Emacs, and therefore is held by
119 the FSF. Another large chunk is held by Sun Microsystems, and a few
120 individual authors hold copyright to thousands of lines each. But many
121 individuals hold copyright to only a few dozen lines. Like the Linux
122 kernel, copyright ownership is distributed throughout a community.
124 However, its license is ``copyleft,'' @emph{i.e.}, it @emph{requires}
125 that you redistribute it under terms @emph{identical} to those under
126 which you received it, unless you have explicit permission of the
127 copyright holder. Because of the multiple owners, determining the
128 ownership of any given part of XEmacs is tedious, and perhaps
129 impossible. For practical purposes, then, the license of any
130 substantial chunk of existing XEmacs content cannot be changed, except
131 to a later version of the GPL, for those parts under GPL. (That is due
132 to the @emph{explicit} permission to change to a later version of the
133 GPL, present in every file of XEmacs.)
135 Unfortunately, this severe restriction means that the GPL, FDL, and the
136 XEmacs documentation license (@dfn{XDL}) are @emph{mutually
137 incompatible}. That is, content licensed under any of the GPL, FDL, or
138 XDL @emph{may not} be mixed with content licensed under either of the
139 other two without changing the license of some of the content. But this
140 requires permission of the copyright holder, which is often difficult or
143 For example, you @emph{may not} take comments or docstrings from XEmacs
144 code and add them to the Lispref to mend a gap in the latter's coverage.
145 You @emph{may not} copy text from the Lispref into docstrings in the
146 code. And you @emph{may not} copy text from the GNU Emacs Lisp
147 Reference to the XEmacs Lisp Reference Manual. (In this case it is at
148 least trivial to ask permission, although it is rather unclear whether
149 it would be granted.)
151 In fact, parts of this document were derived by copying from XEmacs code
152 under the GPL, without any further permission from the authors. Thus,
153 this document must be distributed under the GPL, as a ``volume''
154 separate from the XEmacs documentation under the XDL. Note that the
155 ``mere aggregation'' clauses allow us to distribute in the same
156 tarball. But incorporating it as a node in the Lispref is prohibited,
157 even if done by inclusion.
161 If you look carefully at the additional restrictions imposed by the
162 soi-disant "free" documentation licenses, you discover that they are
163 simply proprietary restrictions guaranteeing a certain amount of
164 @emph{unpaid} political advertising to the Free Software Foundation and
165 GNU Project (and in the case of the FDL, this is extended to commercial
166 advertising by authors of original or derived works). Whether this is
167 ``ethically justified'' or not is a difficult question. What is certain
168 is that there is little social benefit to these terms (since the license
169 documents themselves contain the advocacy and must be included with any
172 I conclude it makes sense for XEmacs to reduce its restrictions, where
173 possible, to the ``least common denominator,'' the GNU General Public
176 @node asm-mode, autoconf-mode, Copying, Top
177 @chapter Editing Assembler Code
179 This mode is used for editing Assembler code. The mode is automatically
180 invoked for buffers visiting any file ending with one of the following
181 extensions: @file{.s}, @file{.S}, @file{.asm}.
183 The mode is based on text-mode. It defines a private abbrev table that can
184 be used to save abbrevs for assembler mnemonics. It binds just five keys:
192 Outdent preceding label, tab to tab stop
195 Place or move comment. @code{asm-comment-char} specifies which character
196 this is; you can use a different character in different Asm mode buffers.
197 Alternatively, you may set this variable in @code{asm-mode-set-comment-hook},
198 which is called near the beginning of mode initialization.
201 Newline and tab to tab stop
205 Code is automatically indented to the first tab stop level.
207 Turning on Asm mode runs the hook @code{asm-mode-hook} at the end of
210 To configure this package, type:
213 M-x customize-group RET asm RET
216 @node autoconf-mode, awk-mode, asm-mode, Top
217 @chapter Editing Autoconf Input Files
219 This mode is used for editing autoconf input files. It is automatically
220 invoked for buffers visiting the following types of files:
224 @item any file ending with an extension of @file{.m4}
226 @item any file named @file{configure} ending with an extension of either
227 @file{.in} or @file{.ac}.
231 To configure this package please view the source code. This can be done by
232 typing @kbd{C-x 4 l autoconf-mode}.
235 * About Autoconf: about-autoconf.
238 @node about-autoconf, , autoconf-mode, autoconf-mode
239 @section About Autoconf
241 Autoconf is an extensible package of m4 macros that produce shell scripts to
242 automatically configure software source code packages. These scripts can
243 adapt the packages to many kinds of UNIX-like systems without manual user
244 intervention. Autoconf creates a configuration script for a package from a
245 template file that lists the operating system features that the package can
246 use, in the form of m4 macro calls.
248 @node awk-mode, cl-indent, autoconf-mode, Top
249 @chapter Editing AWK Code
251 This mode is used for editing Awk code. It is automatically invoked for
252 buffers visiting the following types of files:
256 @item any file ending with an extension of @file{.awk}.
258 @item any file that has an interpretor line (the "shebang" line) specifying
263 The mode operates much like C mode except for the syntax of comments. It
264 uses the same keymap as C mode and has the same variables for customizing
265 indentation. It has its own abbrev table and its own syntax table.
267 Turning on AWK mode calls the value of the variable @code{awk-mode-hook} with
268 no arguments, if that value is non-nil.
270 NOTE: This library is obsolete. Support for AWK is now available directly
271 via the cc-mode package. @xref{AWK Mode, , , cc-mode, CC Mode Manual}., for
275 * About Awk: about-awk.
278 @node about-awk, , awk-mode, awk-mode
281 Awk is a text-processing programming language. It is a useful and simple
282 tool for manipulating text.
284 @node cl-indent, cvs, awk-mode, Top
285 @chapter Enhanced Lisp-Indent Mode
287 This package provides an extension to lisp-mode. It supplies a single entry
288 point, @code{common-lisp-indent-function}, which performs indentation in the
289 preferred style for Common Lisp code. To enable it add the following to your
290 @code{user-init-file}:
293 (setq lisp-indent-function 'common-lisp-indent-function)
296 To configure this package, type:
299 M-x customize-group RET lisp-indent RET
302 @node cvs, diff-mode, cl-indent, Top
303 @chapter Light CVS Support
305 This package provides simple CVS support within the editing session.
307 The package provides the following features:
311 @item Displays the CVS revision in the mode line.
312 @item Compares file changes between CVS revisions using @code{ediff}.
313 @item Keystrokes and menu entries to execute `cvs status', `cvs log' and `cvsann'.
314 @item Simple interface to `cvs commit' and `cvs update' commands.
315 @item Status listing per directory.
316 @item @code{msb} support (better buffer selection).
317 @item @code{dired} support.
318 @item Softlink tree support.
319 @item Little module support (status and update).
323 To install this library, add the following to your @code{user-init-file}:
329 To configure this package please view the source code. This can be done by
330 typing @kbd{C-x 4 l cvs}.
332 For related packages please see @ref{Top, PCL-CVS, , pcl-cvs, Pcl-cvs -
333 The Emacs Front-End to CVS}. and @ref{Version Control, , ,xemacs, The XEmacs
337 * About CVS: about-cvs.
340 @node about-cvs, , cvs, cvs
343 CVS is the Concurrent Versions System, an open-source network-transparent
344 version control system. More information on CVS can be found at
345 @uref{http://www.cvshome.org/,CVS Home}.
347 @node diff-mode, eiffel, cvs, Top
348 @chapter Viewing and Editing Context Diffs
350 This mode facilitates viewing and editing of context diffs. It is
351 automatically invoked buffers visiting any file ending with one of the
352 following extensions: @file{.diff}, @file{.diffs}, @file{.patch}, @file{.rej}.
354 The mode provides support for font-lock, outline, navigation commands,
355 editing and various conversions as well as jumping.
357 The following key mappings are defined:
359 @multitable {M-delete } {diff-reverse-direction}
360 @item @code{C-c} @tab << Prefix Command >>
361 @item @code{M-A} @tab diff-ediff-patch
362 @item @code{M-C} @tab diff-unified->context
363 @item @code{M-K} @tab diff-file-kill
364 @item @code{M-N} @tab diff-file-next
365 @item @code{M-P} @tab diff-file-prev
366 @item @code{M-R} @tab diff-reverse-direction
367 @item @code{M-U} @tab diff-context->unified
368 @item @code{M-W} @tab widen
369 @item @code{M-k} @tab diff-hunk-kill
370 @item @code{M-n} @tab diff-hunk-next
371 @item @code{M-o} @tab diff-goto-source
372 @item @code{M-p} @tab diff-hunk-prev
373 @item @code{M-r} @tab diff-restrict-view
374 @item @code{M-@{} @tab diff-file-prev
375 @item @code{M-@}} @tab diff-file-next
376 @item @code{M-delete} @tab scroll-down
377 @item @code{M-return} @tab diff-goto-source
378 @item @code{M-space} @tab scroll-up
379 @item @code{M-C-m} @tab diff-goto-source
381 @item @code{C-c C-a} @tab diff-apply-hunk
382 @item @code{C-c C-c} @tab diff-goto-source
383 @item @code{C-c C-s} @tab diff-split-hunk
384 @item @code{C-c C-t} @tab diff-test-hunk
387 To configure this package, type:
390 M-x customize-group RET diff-mode RET
393 @node eiffel, go-mode, diff-mode, Top
394 @chapter Editing Eiffel Code
396 This mode is used for editing Eiffel code. It is automatically invoked for
397 buffers visiting any file ending in an extension of @file{.e}.
399 The following key mappings are defined:
401 @multitable {C-c C-c } {diff-reverse-direction}
402 @item @code{return} @tab reindent-then-newline-and-indent
403 @item @code{C-c} @tab << Prefix Command >>
404 @item @code{C-j} @tab newline-and-indent
405 @item @code{C-x} @tab << Prefix Command >>
406 @item @code{M-'} @tab eif-feature-quote
407 @item @code{M-q} @tab eif-fill-paragraph
408 @item @code{M-C-a} @tab eif-beginning-of-feature
409 @item @code{M-C-e} @tab eif-end-of-feature
410 @item @code{M-C-q} @tab eif-indent-construct
411 @item @code{C-c C-c} @tab eif-compile
412 @item @code{C-c C-o} @tab eif-set-compile-options
413 @item @code{C-c C-r} @tab eif-run
414 @item @code{C-c C-s} @tab eif-short
415 @item @code{C-x n} @tab << Prefix Command >>
416 @item @code{C-x n d} @tab eif-narrow-to-feature
419 To configure this package, type:
422 M-x customize-group RET eiffel RET
426 * About Eiffel: about-eiffel.
429 @node about-eiffel, , eiffel, eiffel
430 @section About Eiffel
432 The Eiffel programming language was created by Bertrand Meyer and developed
433 by his company, Interactive Software Engineering (ISE) of Goleta, CA in 1985.
434 More information on Eiffel can be found at
435 @uref{http://www.engin.umd.umich.edu/CIS/course.des/cis400/eiffel/eiffel.html,the
438 @node go-mode, icon, eiffel, Top
440 @chapter Editing Go Code
442 This mode is used for editing Go code. It is automatically invoked for
443 buffers visiting any file ending in an extension of @file{.go}.
445 Turning on Go mode runs the hook @code{go-mode-hook} at the end of
448 The mode provides the following features:
451 @item Basic syntax highlighting for keywords, built-ins, functions and
453 @item Tab indents for Go code. Identation is almost identical to gofmt
456 The following key mappings are defined:
458 @multitable {M-backspace } {backward-delete-char-untabify}
459 @item @code{)} @tab go-mode-insert-and-indent
460 @item @code{,} @tab go-mode-insert-and-indent
461 @item @code{:} @tab go-mode-delayed-electric
462 @item @code{=} @tab go-mode-insert-and-indent
463 @item @code{@}} @tab go-mode-insert-and-indent
466 Other useful functions are:
470 Uses the gofmt tool to format the current buffer. The current buffer
471 is replaced on success. On failure an error message is displayed.
474 Show Go documentation for a query in a style similar to M-x man.
479 * About Go: about-go.
482 @node about-go, , go-mode, go-mode
485 Go is a high-level, general-purpose programming language that is
486 compiled, uses garbage collection and has strong support for
487 concurrent programming. It is open source and developed by Google Inc.
489 For more information on Go see
490 @uref{http://www.golang.org,The Go Programming Language}.
492 @node icon, javascript-mode, go-mode, Top
493 @chapter Editing Icon Code
495 This mode is used for editing Icon code. It is automatically invoked for
496 buffers visiting any file ending in an extension of @file{.icn}.
498 The mode provides the following features:
501 @item Expression and list commands understand all Icon brackets.
502 @item Tab indents for Icon code.
503 @item Paragraphs are separated by blank lines only.
504 @item Delete converts tabs to spaces as it moves back.
507 The following key mappings are defined:
509 @multitable {M-backspace } {backward-delete-char-untabify}
510 @item @code{@{} @tab electric-icon-brace
511 @item @code{@}} @tab electric-icon-brace
512 @item @code{delete} @tab backward-delete-char-untabify
513 @item @code{menu-bar} @tab << Prefix command "Icon" >>
514 @item @code{M-backspace} @tab mark-icon-function
515 @item @code{M-C-a} @tab beginning-of-icon-defun
516 @item @code{M-C-e} @tab end-of-icon-defun
517 @item @code{M-C-h} @tab mark-icon-function
518 @item @code{M-C-q} @tab indent-icon-exp
521 The variables controlling indentation style are:
525 @item icon-tab-always-indent
526 Non-nil means TAB in Icon mode should always reindent the current line,
527 regardless of where in the line point is when the TAB command is used.
529 @item icon-auto-newline
530 Non-nil means automatically newline before and after braces
531 inserted in Icon code.
533 @item icon-indent-level
534 Indentation of Icon statements within surrounding block.
535 The surrounding block's indentation is the indentation
536 of the line on which the open-brace appears.
538 @item icon-continued-statement-offset
539 Extra indentation given to a substatement, such as the
540 then-clause of an if or body of a while.
542 @item icon-continued-brace-offset
543 Extra indentation given to a brace that starts a substatement.
544 This is in addition to `icon-continued-statement-offset'.
546 @item icon-brace-offset
547 Extra indentation for line if it starts with an open brace.
549 @item icon-brace-imaginary-offset
550 An open brace following other text is treated as if it were
551 this far to the right of the start of its line.
555 Turning on Icon mode calls the value of the variable @code{icon-mode-hook}
556 with no args, if that value is non-nil.
558 To configure this package, type:
561 M-x customize-group RET icon RET
565 * About Icon: about-icon.
568 @node about-icon, , icon, icon
571 Icon is a high-level, general-purpose programming language with a large
572 repertoire of features for processing data structures and character
573 strings. Icon is an imperative, procedural language with a syntax reminiscent
574 of C and Pascal, but with semantics at a much higher level. More information
575 on Icon can be found at @uref{http://www.cs.arizona.edu/icon/,The Icon
576 Programming Language}.
578 @node javascript-mode, ksh-mode, icon, Top
579 @chapter Editing JavaScript Code
581 This mode is used for editing JavaScript code. It is automatically invoked
582 for buffers visiting any file ending in an extension of @file{.js} or
585 See the documentation for @code{c++-mode}: JavaScript mode is an extension of
586 it (@pxref{Top, CC Mode, , cc-mode, CC Mode Manual}). Use the hook
587 @code{javascript-mode-hook} to execute custom code when entering JavaScript
590 The following key mappings are defined:
592 @multitable {M-C-kp-right } {c-show-syntactic-information}
593 @item @code{#} @tab c-electric-pound
594 @item @code{(, )} @tab c-electric-paren
595 @item @code{*} @tab c-electric-star
596 @item @code{,} @tab c-electric-semi&comma
597 @item @code{/} @tab c-electric-slash
598 @item @code{:} @tab c-electric-colon
599 @item @code{;} @tab c-electric-semi&comma
600 @item @code{<} @tab c-electric-lt-gt
601 @item @code{>} @tab c-electric-lt-gt
602 @item @code{@{} @tab c-electric-brace
603 @item @code{@}} @tab c-electric-brace
604 @item @code{backspace} @tab c-electric-backspace
605 @item @code{delete} @tab c-electric-delete
606 @item @code{return} @tab c-context-line-break
607 @item @code{tab} @tab c-indent-command
608 @item @code{C-c} @tab << Prefix Command >>
609 @item @code{C-i} @tab c-indent-command
610 @item @code{C-m} @tab c-context-line-break
611 @item @code{C-x} @tab << Prefix Command >>
612 @item @code{M-a} @tab c-beginning-of-statement
613 @item @code{M-c} @tab c-comment-edit-at-point
614 @item @code{M-e} @tab c-end-of-statement
615 @item @code{M-j} @tab c-indent-new-comment-line
616 @item @code{M-q} @tab c-fill-paragraph
617 @item @code{M-backspace} @tab backward-kill-word
618 @item @code{M-backward} @tab backward-kill-word
619 @item @code{M-delete} @tab backward-kill-word
620 @item @code{M-linefeed} @tab c-indent-new-comment-line
621 @item @code{M-C-h} @tab backward-kill-word
622 @item @code{M-C-j} @tab c-indent-new-comment-line
623 @item @code{M-C-q} @tab c-indent-exp
624 @item @code{M-C-kp-left} @tab c-beginning-of-statement
625 @item @code{M-C-kp-right} @tab c-end-of-statement
626 @item @code{M-C-left} @tab c-beginning-of-statement
627 @item @code{M-C-right} @tab c-end-of-statement
628 @item @code{C-c .} @tab c-set-style
629 @item @code{C-c C-\} @tab c-backslash-region
630 @item @code{C-c C-a} @tab c-toggle-auto-state
631 @item @code{C-c C-b} @tab c-submit-bug-report
632 @item @code{C-c C-c} @tab comment-region
633 @item @code{C-c C-d} @tab c-toggle-hungry-state
634 @item @code{C-c C-n} @tab c-forward-conditional
635 @item @code{C-c C-o} @tab c-set-offset
636 @item @code{C-c C-p} @tab c-backward-conditional
637 @item @code{C-c C-q} @tab c-indent-defun
638 @item @code{C-c C-s} @tab c-show-syntactic-information
639 @item @code{C-c C-t} @tab c-toggle-auto-hungry-state
640 @item @code{C-c C-u} @tab c-up-conditional
641 @item @code{C-x f} @tab c-fill-paragraph
644 To configure this package, type:
647 M-x customize-group RET javascript RET
651 * About JavaScript: about-javascript.
654 @node about-javascript, , javascript-mode, javascript-mode
655 @section About JavaScript
657 JavaScript is a compact, object-based scripting language for developing
658 client and server Internet applications.
660 @node ksh-mode, lua-mode, javascript-mode, Top
661 @chapter Editing Shell Script (sh, ksh, bash) Code
663 This mode is used for editing shell scripts written for the Bourne (sh), Korn
664 (ksh) or Bourne Again (bash) shells. It is NOT automatically invoked for any
665 particular file extension. To invoke this mode while editing a file, type
668 The following key mappings are defined:
670 @multitable {C-c tab } {reindent-then-newline-and-indent}
671 @item @code{linefeed} @tab reindent-then-newline-and-indent
672 @item @code{tab} @tab ksh-indent-line
673 @item @code{C-c} @tab << Prefix Command >>
674 @item @code{C-i} @tab ksh-indent-line
675 @item @code{C-j} @tab reindent-then-newline-and-indent
676 @item @code{M-tab} @tab ksh-complete-symbol
677 @item @code{M-C-i} @tab ksh-complete-symbol
678 @item @code{C-c tab} @tab ksh-completion-init-and-pickup
679 @item @code{C-c C-i} @tab ksh-completion-init-and-pickup
682 The variables controlling indentation style are:
687 Indentation of ksh statements with respect to containing block.
690 @item ksh-case-indent
691 Additional indentation for statements under case items.
692 Default value is nil which will align the statements one position
693 past the ")" of the pattern.
695 @item ksh-case-item-offset
696 Additional indentation for case items within a case statement.
699 @item ksh-group-offset
700 Additional indentation for keywords "do" and "then".
703 @item ksh-brace-offset
704 Additional indentation of "@{" under functions or brace groupings.
707 @item ksh-multiline-offset
708 Additional indentation of line that is preceded of a line ending with a
709 @code{\} to make it continue on next line.
711 @item ksh-tab-always-indent
712 Controls the operation of the @code{TAB} key. If t (the default), always
713 reindent the current line. If nil, indent the current line only if
714 point is at the left margin or in the line's indentation; otherwise
717 @item ksh-match-and-tell
718 If non-nil echo in the minibuffer the matching compound command
719 for the "done", "@}", "fi", or "esac". Default value is t.
721 @item ksh-align-to-keyword
722 Controls whether nested constructs align from the keyword or
723 the current indentation. If non-nil, indentation will be relative to
724 the column the keyword starts. If nil, indentation will be relative to
725 the current indentation of the line the keyword is on.
726 The default value is non-nil.
728 @item ksh-comment-regexp
729 Regular expression used to recognize comments. Customize to support
730 ksh-like languages. Default value is "
\1c\s *#".
734 An example of how to set up this mode is as follows:
739 (font-lock-mode 1) ;; font-lock the buffer
741 (setq ksh-group-offset -8)
742 (setq ksh-brace-offset -8)
743 (setq ksh-tab-always-indent t)
744 (setq ksh-match-and-tell t)
745 (setq ksh-align-to-keyword t) ;; Turn on keyword alignment
749 To configure this package please view the source code. This can be done by
750 typing @kbd{C-x 4 l ksh-mode}.
752 For a related package, see @code{sh-script}.
754 @node lua-mode, m4-mode, ksh-mode, Top
755 @chapter Editing Lua Code
757 This mode is used for editing Lua code. It is automatically invoked for
758 buffers visiting any file ending in the extension @file{.lua}.
760 To configure this mode, type:
763 M-x customize-group RET lua RET
767 * About Lua: about-lua.
770 @node about-lua, , lua-mode, lua-mode
773 Lua is a powerful light-weight programming language designed for
774 extending applications. Lua is also frequently used as a
775 general-purpose, stand-alone language. More information on Lua can be
776 found at @uref{http://www.lua.org/,The Programming Language Lua}.
778 @node m4-mode, make-mode, lua-mode, Top
779 @chapter Editing m4 Code
781 This mode is used for editing m4 macro definitions. It is NOT automatically
782 invoked for any particular file extension. To invoke this mode while editing
783 a file, type @code{M-x m4-mode}.
785 The mode has most of the syntax right (i.e., sexp motion commands work, but
786 function motion commands don't). It also sets up font-lock for colorization.
788 To configure this package please view the source code. This can be done by
789 typing @kbd{C-x 4 l m4-mode}.
791 NOTE: The preferred package for editing m4 code is autoconf mode.
792 @xref{autoconf-mode}., for details.
795 * About m4: about-m4.
798 @node about-m4, , m4-mode, m4-mode
801 m4 is a general purpose macro processor that can be used to preprocess C and
802 assembly language programs, among other things. Besides the straightforward
803 replacement of one string of text by another, m4 lets you perform:
807 @item integer arithmetic
809 @item conditional macro expansion
810 @item string and substring manipulation
814 @node make-mode, mode-compile, m4-mode, Top
815 @chapter Editing Makefiles
817 This mode is used for editing Makefiles. It is automatically invoked for
818 for buffers visiting the following types of files:
822 @item any file ending with an extension of @file{.ma?ke?} or @file{.am}
824 @item any file named @file{GNU[Mm]akefile} or @file{[Mm]akefile} with an
825 extension of @file{.in}.
827 @item any file that has an interpretor line (the "shebang" line) specifying
832 The mode knows about Makefile syntax and defines @kbd{M-n} and @kbd{M-p} to
833 move to next and previous productions.
835 The keys @kbd{$}, @kbd{=}, @kbd{:} and @kbd{.} are electric; they try to help
836 you fill in a macro reference, macro definition, ordinary target name, or
837 special target name, respectively. Such names are completed using a list of
838 targets and macro names parsed out of the makefile. This list is
839 automatically updated, if necessary, whenever you invoke one of these
840 commands. You can force it to be updated with @kbd{C-c C-p}.
842 The command @kbd{C-c C-f} adds certain filenames in the current directory as
843 targets. You can filter out filenames by setting the variable
844 @code{makefile-ignored-files-in-pickup-regex}.
846 The command @kbd{C-c C-u} grinds for a bit, then pops up a report buffer
847 showing which target names are up-to-date with respect to their
848 prerequisites, which targets are out-of-date, and which have no
851 The command @kbd{C-c C-b} pops up a browser window listing all target and
852 macro names. You can mark or unmark items wit @kbd{C-c SPC}, and insert all
853 marked items back in the Makefile with @kbd{C-c TAB}.
855 The command @kbd{C-c TAB} in the makefile buffer inserts a GNU make builtin.
856 You will be prompted for the builtin's args.
858 The following key mappings are defined:
860 @multitable {C-c return } {makefile-browser-insert-selection-and-quit}
861 @item @code{C-c} @tab << Prefix Command >>
862 @item @code{M-n} @tab makefile-next-dependency
863 @item @code{M-p} @tab makefile-previous-dependency
864 @item @code{M-tab} @tab makefile-complete
865 @item @code{M-C-i} @tab makefile-complete
866 @item @code{C-c :} @tab makefile-insert-target-ref
867 @item @code{C-c tab} @tab makefile-insert-gmake-function
868 @item @code{C-c C-\} @tab makefile-backslash-region
869 @item @code{C-c C-b} @tab makefile-switch-to-browser
870 @item @code{C-c C-c} @tab comment-region
871 @item @code{C-c C-f} @tab makefile-pickup-filenames-as-targets
872 @item @code{C-c C-i} @tab makefile-insert-gmake-function
873 @item @code{C-c C-p} @tab makefile-pickup-everything
874 @item @code{C-c C-u} @tab makefile-create-up-to-date-overview
877 In the browser, use the following keys:
879 @multitable {C-c return } {makefile-browser-insert-selection-and-quit}
880 @item @code{I} @tab makefile-browser-insert-selection-and-quit
881 @item @code{i} @tab makefile-browser-insert-selection
882 @item @code{n} @tab makefile-browser-next-line
883 @item @code{p} @tab makefile-browser-previous-line
884 @item @code{q} @tab makefile-browser-quit
885 @item @code{space} @tab makefile-browser-toggle
886 @item @code{C-c} @tab << Prefix Command >>
887 @item @code{C-n} @tab makefile-browser-next-line
888 @item @code{C-p} @tab makefile-browser-previous-line
889 @item @code{C-c return} @tab makefile-browser-insert-continuation
890 @item @code{C-c C-m} @tab makefile-browser-insert-continuation
893 Makefile mode can be configured by modifying the following variables:
897 @item makefile-browser-buffer-name:
898 Name of the macro- and target browser buffer.
900 @item makefile-target-colon:
901 The string that gets appended to all target names
902 inserted by @code{makefile-insert-target}.
903 ":" or "::" are quite common values.
905 @item makefile-macro-assign:
906 The string that gets appended to all macro names
907 inserted by @code{makefile-insert-macro}.
908 The normal value should be " = ", since this is what
909 standard make expects. However, newer makes such as dmake
910 allow a larger variety of different macro assignments, so you
911 might prefer to use " += " or " := " .
913 @item makefile-tab-after-target-colon:
914 If you want a @code{TAB} (instead of a space) to be appended after the
915 target colon, then set this to a non-nil value.
917 @item makefile-browser-leftmost-column:
918 Number of blanks to the left of the browser selection mark.
920 @item makefile-browser-cursor-column:
921 Column in which the cursor is positioned when it moves
922 up or down in the browser.
924 @item makefile-browser-selected-mark:
925 String used to mark selected entries in the browser.
927 @item makefile-browser-unselected-mark:
928 String used to mark unselected entries in the browser.
930 @item makefile-browser-auto-advance-after-selection-p:
931 If this variable is set to a non-nil value the cursor
932 will automagically advance to the next line after an item
933 has been selected in the browser.
935 @item makefile-pickup-everything-picks-up-filenames-p:
936 If this variable is set to a non-nil value then
937 @code{makefile-pickup-everything} also picks up filenames as targets
938 (i.e. it calls @code{makefile-pickup-filenames-as-targets}), otherwise
939 filenames are omitted.
941 @item makefile-cleanup-continuations-p:
942 If this variable is set to a non-nil value then Makefile mode
943 will assure that no line in the file ends with a backslash
944 (the continuation character) followed by any whitespace.
945 This is done by silently removing the trailing whitespace, leaving
946 the backslash itself intact.
947 IMPORTANT: Please note that enabling this option causes Makefile mode
948 to MODIFY A FILE WITHOUT YOUR CONFIRMATION when "it seems necessary".
950 @item makefile-browser-hook:
951 A function or list of functions to be called just before the
952 browser is entered. This is executed in the makefile buffer.
954 @item makefile-special-targets-list:
955 List of special targets. You will be offered to complete
956 on one of those in the minibuffer whenever you enter a `.'.
957 at the beginning of a line in Makefile mode.
961 To configure this package, type:
964 M-x customize-group RET makefile RET
968 * About Make: about-make.
971 @node about-make, , make-mode, make-mode
974 A Makefile is used by a `make' utility to automatically determine which
975 pieces of a large program need to be recompiled, and to issue the commands to
976 recompile them. @xref{Top, Make, , make, GNU Make Manual}., for details.
978 @node mode-compile, modula2, make-mode, Top
979 @chapter Compiling Files According to Major-Mode
981 The @code{compile} command is very rudimentary in its creation of its
982 compilation command, using "make -k" by default. This package provides an
983 intelligent replacement for the @code{compile} command. @xref{Compilation, ,
984 ,xemacs, The XEmacs Editor}., for details.
986 The @code{mode-compile} command functions as a layer above @code{compile}.
987 Its purpose is mainly to build a smarter compile command for @code{compile}
988 to execute. This compile command is built according to number of parameters:
993 @item presence or absence of a makefile in the current directory
994 @item the @code{buffer-file-name} and extension
995 @item contents of the current buffer (`main' function, "#!/path/shell", ...)
996 @item and more ... (see below)
1000 Most of these parameters are highly customizable through Emacs Lisp variables
1001 (to be set in your @code{user-init-file} or through the Customization menu).
1002 Running @code{mode-compile} after a universal-argument (@kbd{C-u}) allows
1003 remote compilations; the user is prompted for the host name to execute the
1004 compilation command. The @code{mode-compile-kill} function terminates a
1005 running compilation session launched by @code{mode-compile}.
1007 By default, @code{mode-compile} is very verbose and waits a user-specified
1008 number of seconds after displaying each message to give the user time to read
1009 it. The variables @code{mode-compile-expert-p} and
1010 @code{mode-compile-reading-time} can be used to change this behaviour. On
1011 Windows-based systems, the variable @code{mode-compile-other-frame-p} will
1012 create a new frame and launch the compilation command in it.
1015 * compile-cust:: Customization
1016 * compile-compilation-mode:: compilation-mode
1017 * compile-makefile-mode:: makefile-mode
1018 * compile-emacs-lisp-mode:: emacs-lisp-mode, lisp-interaction-mode
1019 * compile-dired-mode:: dired-mode
1020 * compile-sh-mode:: sh-mode, csh-mode, zsh-mode
1021 * compile-c?perl-mode:: c?perl-mode
1022 * compile-tcl-mode:: tcl-mode
1023 * compile-c-mode:: c-mode, c++-mode
1024 * compile-ada-mode:: ada-mode
1025 * compile-fortran-mode:: fortran-mode
1026 * compile-java-mode:: java-mode
1027 * compile-python-mode:: python-mode
1028 * compile-message-mode:: message-mode
1029 * compile-catchall:: Miscellaneous Modes
1032 @node compile-cust, compile-compilation-mode, mode-compile, mode-compile
1033 @section Customization
1035 This section explains how the @code{compile-command} is built according
1036 to the @code{major-mode} and how to customize it. The major modes currently
1039 @multitable {lisp-interaction-mode} {lisp-interaction-mode} {lisp-interaction-mode}
1041 @item ada-mode @tab c++-mode @tab c-mode
1042 @item c?perl-mode @tab compilation-mode @tab csh-mode
1043 @item dired-mode @tab emacs-lisp-mode @tab fortran-mode
1044 @item fundamental-mode @tab indented-text-mode @tab java-mode
1045 @item lisp-interaction-mode @tab makefile-mode @tab python-mode
1046 @item sh-mode @tab tcl-mode @tab text-mode
1051 For other modes a default behaviour is provided.
1053 When running @code{mode-compile} or @code{mode-compile-kill} the hooks
1054 @code{mode-compile-(before|after)-(compile|kill)-hook} are executed. The
1055 current buffer can be automatically saved if
1056 @code{mode-compile-always-save-buffer-p} is set to @code{t}. All the
1057 modified buffers can be automatically saved if @code{mode-compile-save-all-p}
1060 To configure this package, type:
1063 M-x customize-group RET compilation RET
1066 @node compile-compilation-mode, compile-makefile-mode, compile-cust, mode-compile
1067 @section compilation-mode
1069 Calls @code{compile} with the last compile command.
1071 @node compile-makefile-mode, compile-emacs-lisp-mode, compile-compilation-mode, mode-compile
1072 @section makefile-mode
1074 The makefile is run with make through @code{compile} (user is prompted for
1075 the rule to run, see variable @code{mode-compile-preferred-default-makerule}
1076 to see how a default choice could be selected).
1078 @node compile-emacs-lisp-mode, compile-dired-mode, compile-makefile-mode, mode-compile
1079 @section emacs-lisp-mode, lisp-interaction-mode
1081 If the buffer is a @file{.el} file we @code{byte-compile} it to produce a
1082 @file{.elc} file. Otherwise, just @code{byte-compile} the buffer (this does
1083 not use @code{compile} but @code{byte-compile}).
1085 @node compile-dired-mode, compile-sh-mode, compile-emacs-lisp-mode, mode-compile
1088 Find a @file{makefile} in the directory and run make with it (like in
1089 @code{makefile-mode}), else try to @code{byte-recompile} all @file{.el} files
1090 older than their associated @file{.elc} files (unlike
1091 @code{byte-recompile-directory} this is not recursive), finally if no
1092 @file{.el} files are present ask compilation command to user by calling
1093 @code{default-compile}. To find a @file{makefile} a regexp is provided which
1094 name is @code{mode-compile-makefile-regexp}.
1096 @node compile-sh-mode, compile-c?perl-mode, compile-dired-mode, mode-compile
1097 @section sh-mode, csh-mode, zsh-mode
1099 Run "[cz]?sh" with debugging arguments as specified in
1100 @code{[cz]?sh-dbg-flags} on the currently edited file.
1102 @node compile-c?perl-mode, compile-tcl-mode, compile-sh-mode, mode-compile
1103 @section c?perl-mode
1105 Run file with "perl -w" (can step through errors with compile's @code{next-error}
1108 @node compile-tcl-mode, compile-c-mode, compile-c?perl-mode, mode-compile
1111 Run file with "wish" (can step through errors with compile's
1112 @code{next-error} command).
1114 @node compile-c-mode, compile-ada-mode, compile-tcl-mode, mode-compile
1115 @section c-mode, c++-mode
1117 First it tries to see if there is a @file{makefile} in the
1118 directory. Makefiles to look for are specified by the variable
1119 @code{mode-compile-makefile-regexp}. If yes two cases could happen: there is
1120 only one makefile so use it, or there is more than one (sometimes when you
1121 need to write portable soft you could have some makefiles by system:
1122 SunOs.make, HP.make ...), in that case prompt to user for choice (with smart
1123 completion). Once the makefile has been selected it extract the rules from
1124 it and ask to user to choose a rule to make (with smart completion, see
1125 variable @code{mode-compile-preferred-default-makerule} to see how a default
1126 choice could be selected).
1128 There are some cases where no makefiles are present (YES I KNOW this is bad
1129 practice but you sometimes have no need to write a Makefile). In that case
1130 the function tries to build the most intelligent compilation command by using
1131 the favourite user C/C++ compiler: value of environment variable "CC" or
1132 "CXX" or first found, in the PATH, of compilers specified in variable
1133 @code{cc-compilers-list} or @code{c++-compilers-list}. Then it looks for the
1134 environment variable "CFLAGS" of "CXXFLAGS" to append to the compiler command,
1135 finds the file to compile: <name-of-the-file-to-compiled>.(c|cc|C|cpp) (see *)
1136 and asks for confirmation. If you really trust mode-compile will build the
1137 correct command and want to bypass confirmation you could set the variable
1138 @code{mode-compile-never-edit-command-p} to @code{t}.
1140 @node compile-ada-mode, compile-fortran-mode, compile-c-mode, mode-compile
1143 Same as c/c++-mode but run Ada compiler on the Ada file. There are no
1144 companion file and no way to find a main function in Ada.
1146 @node compile-fortran-mode, compile-java-mode, compile-ada-mode, mode-compile
1147 @section fortran-mode
1149 Same as c-mode but run Fortran compiler on .[Ff](or)? files.
1151 @node compile-java-mode, compile-python-mode, compile-fortran-mode, mode-compile
1154 Same as c-mode but call "javac" without the -o option on .java files
1156 @node compile-python-mode, compile-message-mode, compile-java-mode, mode-compile
1157 @section python-mode
1159 Run file with "python" (can step through errors with compile's
1160 @code{next-error} command).
1162 @node compile-message-mode, compile-catchall, compile-python-mode, mode-compile
1163 @section message-mode
1165 Run @code{message-send}.
1167 @node compile-catchall, , compile-message-mode, mode-compile
1168 @section Miscellaneous Modes
1170 This handles @code{fundamental-mode}, @code{text-mode},
1171 @code{indented-text-mode} and any unknown modes.
1173 Try to guess what the file is by
1177 @item Looking at its name and extension (see variable
1178 @code{mode-compile-filename-regexp-alist}).
1180 @item Looking at string "#!/path/shell" at first line to extract shell to run
1181 the script with (see variable @code{mode-compile-shell-alist}).
1183 @item Looking at a makefile in current directory.
1185 @item Calling @code{compile} with the last compile command which is asked to
1190 The @code{kill-compile} command is then bound dynamically (buffer-local).
1192 @node modula2, old-c-mode, mode-compile, Top
1193 @chapter Editing Modula-2 Code
1195 This mode is used for editing Modula-2 code. It is NOT automatically invoked
1196 for any particular file extension. To invoke this mode while editing a file,
1197 type @code{M-x modula-2-mode}.
1199 The mode provides convenient abbrevs for Modula-2 keywords, knows about the
1200 standard layout rules, and supports a native compile command.
1202 All control constructs of Modula-2 can be reached by typing C-c followed by
1203 the first character of the construct.
1205 The following key mappings are defined:
1207 @multitable {C-c C-z suspend Emacs} {Control-c Control-w with}
1208 @item C-c b begin @tab C-c c case
1209 @item C-c d definition @tab C-c e else
1210 @item C-c f for @tab C-c h header
1211 @item C-c i if @tab C-c m module
1212 @item C-c l loop @tab C-c o or
1213 @item C-c p procedure @tab Control-c Control-w with
1214 @item C-c r record @tab C-c s stdio
1215 @item C-c t type @tab C-c u until
1216 @item C-c v var @tab C-c w while
1217 @item C-c x export @tab C-c y import
1218 @item C-c @{ begin-comment @tab C-c @} end-comment
1219 @item C-c C-z suspend Emacs @tab C-c C-t toggle
1220 @item C-c C-c compile @tab M-x m2-next-error next-error
1224 Following are some important variables:
1228 controls the number of spaces for each indentation.
1229 @item m2-compile-command
1230 holds the command to compile a Modula-2 program.
1231 @item m2-link-command
1232 holds the command to link a Modula-2 program.
1235 To configure this package, type:
1238 M-x customize-group RET modula2 RET
1242 * About Modula-2: about-modula2.
1245 @node about-modula2, , modula2, modula2
1246 @section About Modula-2
1248 Modula-2 is a programming language developed by Niklaus Wirth at ETH in
1249 Zurich, Switzerland in the late 70's. Wirth also developed Algol-W, Pascal,
1252 Modula-2 corrects some of the deficiencies of Pascal. It is suitable for
1253 learning programming, for large projects written and maintained in the
1254 fashion of professional software engineers, and for real time embedded
1255 systems. Modula-2 is small, expressive, easy to learn and to read.
1257 @node old-c-mode, p4, modula2, Top
1258 @chapter Editing C Code
1260 This is a smart editing mode for C code. It knows a lot about C syntax and
1261 tries to position the cursor according to C layout conventions. You can
1262 change the details of the layout style with option variables.
1264 The mode provides the following features:
1267 @item Expression and list commands understand all C brackets.
1268 @item Tab indents for C code.
1269 @item Comments are delimited with /* ... */.
1270 @item Paragraphs are separated by blank lines only.
1271 @item Delete converts tabs to spaces as it moves back.
1274 The variables controlling indentation style are:
1278 @item c-tab-always-indent
1279 Non-nil means TAB in C mode should always reindent the current line,
1280 regardless of where in the line point is when the TAB command is used.
1282 @item c-auto-newline
1283 Non-nil means automatically newline before and after braces,
1284 and after colons and semicolons, inserted in C code.
1286 @item c-indent-level
1287 Indentation of C statements within surrounding block.
1288 The surrounding block's indentation is the indentation
1289 of the line on which the open-brace appears.
1291 @item c-continued-statement-offset
1292 Extra indentation given to a substatement, such as the
1293 then-clause of an if or body of a while.
1295 @item c-continued-brace-offset
1296 Extra indentation given to a brace that starts a substatement.
1297 This is in addition to c-continued-statement-offset.
1299 @item c-brace-offset
1300 Extra indentation for line if it starts with an open brace.
1302 @item c-brace-imaginary-offset
1303 An open brace following other text is treated as if it were
1304 this far to the right of the start of its line.
1306 @item c-argdecl-indent
1307 Indentation level of declarations of C function arguments.
1309 @item c-label-offset
1310 Extra indentation for line that is a label, or case or default.
1314 NOTE: This package has been obsoleted by the cc-mode package (@pxref{Top, CC
1315 Mode, , cc-mode, CC Mode Manual}). cc-mode can be quite slow, however, on
1316 large files, even on fast machines. This version works with no problems on
1317 the XEmacs source code and is very very fast.
1319 To configure this package, type:
1322 M-x customize-group RET old-c RET
1325 @node p4, pascal, old-c-mode, Top
1326 @chapter Integration with Perforce Version Control
1328 This package provides simple integration with Perforce Version Control.
1330 To use this package, add the following line to your @code{user-init-file}:
1336 To configure this package, type:
1339 M-x customize-group RET p4 RET
1343 * About Perforce: about-perforce.
1346 @node about-perforce, , p4, p4
1347 @section About Perforce
1349 The Perforce SCM System features comprehensive software configuration
1350 management capabilities built around a scalable client/server
1351 architecture. Requiring only TCP/IP, developers can access the Perforce
1352 Server through a variety of Perforce clients (Windows GUI, Web, or
1353 Command-Line). Perforce can be deployed quickly and easily, and requires
1354 minimal administration1, even for large or distributed sites.
1356 More information on Perforce can be found at @uref{http://www.perforce.com/}.
1358 @node pascal, php-mode, p4, Top
1359 @chapter Editing Pascal Code
1361 This mode is used for editing Pascal code. It is automatically invoked for
1362 buffers visiting any file ending with an extension of @file{.pas}.
1364 The mode provides the following capabilities:
1367 @item TAB indents for Pascal code.
1368 @item Delete converts tabs to spaces as it moves back.
1369 @item @code{pascal-complete-word} completes the word around current point
1370 with respect \ to position in code
1371 @item @code{pascal-show-completions} shows all possible completions at this
1375 Other useful functions are:
1378 @item pascal-mark-defun
1381 @item pascal-insert-block
1382 insert begin ... end;
1384 @item pascal-star-comment
1387 @item pascal-comment-area
1388 Put marked area in a comment, fixing nested comments.
1390 @item pascal-uncomment-area
1391 Uncomment an area commented with @code{pascal-comment-area}.
1393 @item pascal-beg-of-defun
1394 Move to beginning of current function.
1396 @item pascal-end-of-defun
1397 Move to end of current function.
1399 @item pascal-goto-defun
1400 Goto function prompted for in the minibuffer.
1402 @item pascal-outline
1403 Enter pascal-outline-mode (see also pascal-outline).
1407 The variables controlling indentation/edit style are:
1411 @item pascal-indent-level
1412 Indentation of Pascal statements with respect to containing block.
1414 @item pascal-case-indent
1415 Indentation for case statements.
1417 @item pascal-auto-newline
1418 Non-nil means automatically newline after semicolons and the punctuation
1421 @item pascal-tab-always-indent
1422 Non-nil means TAB in Pascal mode should always reindent the current line,
1423 regardless of where in the line point is when the TAB command is used.
1425 @item pascal-auto-endcomments
1426 Non-nil means a comment @{ ... @} is set after the ends which ends cases and
1427 functions. The name of the function or case will be set between the braces.
1429 @item pascal-auto-lineup
1430 List of contexts where auto lineup of :'s or ='s should be done.
1434 See also the user variables @code{pascal-type-keywords},
1435 @code{pascal-start-keywords} and @code{pascal-separator-keywords}.
1437 Turning on Pascal mode calls the value of the variable
1438 @code{pascal-mode-hook} with no args, if that value is non-nil.
1440 To configure this package, type:
1443 M-x customize-group RET pascal RET
1446 @node php-mode, postscript, pascal, Top
1447 @chapter Editing PHP Code
1449 PHP mode is a major mode for editing PHP source code. It is
1450 automatically invoked for buffers visiting the following files of files:
1453 @item any file ending with one of the following extensions: @file{.phps},
1454 @file{.php3}, @file{.php4}
1455 @item any file ending with the extension @file{.phtml}
1456 @item any file ending with the extension @file{.inc}
1459 The mode is an extension of cc-mode; thus it inherits all cc-mode's
1460 navigation functionality (@pxref{Top, CC Mode, , cc-mode, CC Mode Manual}).
1461 But it colors according to the PHP grammar and indents according to the PEAR
1462 coding guidelines. It also includes a couple of handy IDE-type features such
1463 as documentation search and a source and class browser.
1465 For colorization, turn on @code{global-font-lock} or add the following to
1466 your @code{user-init-file}:
1469 (add-hook 'php-mode-user-hook 'turn-on-font-lock)
1472 To use abbrev-mode, add lines like this to your @code{user-init-file}:
1475 (add-hook 'php-mode-user-hook
1476 '(lambda () (define-abbrev php-mode-abbrev-table "ex" "extends")))
1479 To make php-mode compatible with html-mode, see @uref{http://php-mode.sourceforge.net/}.
1481 To configure this package, type:
1484 M-x customize-group RET php RET
1488 * About PHP: about-php.
1491 @node about-php, , php-mode, php-mode
1494 PHP is a widely-used general-purpose scripting language that is especially
1495 suited for Web development and can be embedded into HTML. For more
1496 information, see @uref{http://www.php.net/}.
1498 @node postscript, prolog, php-mode, Top
1499 @chapter Editing PostScript Programs
1501 This mode is used for editing PostScript programs. It is automatically
1502 invoked for buffers visiting any file ending with an extension of @file{.cps}
1505 @code{C-c C-c} will send the contents of the buffer to the NeWS server using
1506 psh(1). @code{C-c |} sends the current region. @code{C-c !} starts an
1507 interactive psh(1) window which will be used for subsequent @code{C-c C-c} or
1508 @code{C-c |} commands.
1510 In this mode, @code{TAB} and @code{M-C-\} attempt to indent code based on the
1511 position of @{@}, [], and begin/end pairs. The variable
1512 @code{ps-indent-level} controls the amount of indentation used inside arrays
1513 and begin/end pairs.
1515 The following key mappings are defined:
1517 @multitable {C-c C-c } {<< Prefix Command >>}
1518 @item @code{tab} @tab ps-tab
1519 @item @code{C-c} @tab << Prefix Command >>
1520 @item @code{C-i} @tab ps-tab
1521 @item @code{C-c !} @tab ps-shell
1522 @item @code{C-c |} @tab ps-execute-region
1523 @item @code{C-c C-c} @tab ps-execute-buffer
1526 @code{M-x postscript-mode} calls the value of the variable
1527 @code{postscript-mode-hook} with no args, if that value is non-nil.
1529 To configure this package please view the source code. This can be done by
1530 typing @kbd{C-x 4 l postscript}.
1533 * About PostScript: about-postscript.
1536 @node about-postscript, , postscript, postscript
1537 @section About PostScript
1539 PostScript is a programming language optimized for printing graphics and text
1540 (whether on paper, film, or CRT is immaterial). In the jargon of the day, it
1541 is a page description language. It was introduced by Adobe in 1985 and first
1542 (to my knowledge) appeared in the Apple LaserWriter. The main purpose of
1543 PostScript was to provide a convenient language in which to describe images
1544 in a device independent manner. This device independence means that the image
1545 is described without reference to any specific device features (e.g. printer
1546 resolution) so that the same description could be used on any PostScript
1547 printer (say, a LaserWriter or a Linotron) without modification.
1549 @node prolog, rexx-mode, postscript, Top
1550 @chapter Editing and Running Prolog Code
1552 This mode is used for editing Prolog code. It is automatically invoked for
1553 buffers visiting any file ending with an of extension @file{.prolog}.
1555 The mode knows about Prolog syntax and comments, and can send regions to an
1556 inferior Prolog interpreter process.
1558 Blank lines and `%%...' separate paragraphs. `%'s start comments.
1560 The following key mappings are defined:
1562 @multitable {M-C-x } {prolog-consult-region}
1563 @item @code{tab} @tab prolog-indent-line
1564 @item @code{C-i} @tab prolog-indent-line
1565 @item @code{M-C-x} @tab prolog-consult-region
1568 Entry to this mode calls the value of @code{prolog-mode-hook} if that value
1571 To configure this package, type:
1574 M-x customize-group RET prolog RET
1577 @node rexx-mode, rpm-spec-mode, prolog, Top
1578 @chapter Editing REXX Code
1580 This mode is used for editing REXX code. It is automatically invoked for
1581 buffers visiting the following types of files:
1584 @item any file ending with an extension of @file{.rexx}.
1585 @item any file that has an interpretor line (the "shebang" line) specifying "rexx".
1588 The following key mappings are defined:
1590 @multitable {backspace } {backward-delete-char-untabify}
1591 @item @code{backspace} @tab backward-delete-char-untabify
1592 @item @code{return} @tab rexx-indent-and-newline
1593 @item @code{tab} @tab rexx-indent-command
1594 @item @code{C-c} @tab << Prefix Command >>
1595 @item @code{C-i} @tab rexx-indent-command
1596 @item @code{C-m} @tab rexx-indent-and-newline
1597 @item @code{C-c C-c} @tab rexx-debug
1598 @item @code{C-c C-p} @tab rexx-find-matching-do
1601 The following variables control indentation style:
1607 The basic indentation for do-blocks.
1609 @item rexx-end-indent
1611 The relative offset of the \"end\" statement. 0 places it in the same column
1612 as the statements of the block. Setting it to the same value as rexx-indent
1613 places the \"end\" under the do-line.
1615 @item rexx-cont-indent
1617 The indention for lines following \"then\", \"else\" and \",\" (continued)
1620 @item rexx-tab-always-indent
1622 Non-nil means TAB in REXX mode should always reindent the current line,
1623 regardless of where in the line the point is when the TAB command is used.
1627 If you have set @code{rexx-end-indent} to a nonzero value, you probably want
1628 to remap @kbd{RETURN} to @code{rexx-indent-newline-indent}. It makes sure
1629 that lines indents correctly when you press @kbd{RETURN}.
1631 An extensive abbreviation table consisting of all the keywords of REXX are
1632 supplied. Expanded keywords are converted into upper case making it easier
1633 to distinguish them. To use this feature the buffer must be in
1634 @code{abbrev-mode}. (See example below.)
1636 Turning on REXX mode calls the value of the variable @code{rexx-mode-hook}
1637 with no args, if that value is non-nil.
1642 (setq rexx-mode-hook '(lambda ()
1643 (setq rexx-indent 4)
1644 (setq rexx-end-indent 4)
1645 (setq rexx-cont-indent 4)
1646 (local-set-key \"\\C-m\" 'rexx-indent-newline-indent)
1651 will make the END aligned with the DO/SELECT. It will indent blocks and
1652 IF-statements four steps and make sure that the END jumps into the correct
1653 position when RETURN is pressed. Finally it will use the abbrev table to
1654 convert all REXX keywords into upper case.
1656 To configure this package, type:
1659 M-x customize-group RET rexx RET
1663 * About REXX: about-rexx.
1666 @node about-rexx, , rexx-mode, rexx-mode
1669 REXX is a programming language designed by Michael Cowlishaw of IBM UK
1670 Laboratories. Rexx is an acronym which stands for "Restructured Extended
1671 Executor Language". In Mike's own words: "REXX is a procedural language that
1672 allows programs and algorithms to be written in a clear and structured way."
1674 @node rpm-spec-mode, simula, rexx-mode, Top
1675 @chapter Editing RPM Spec Files
1677 This mode is used for editing spec files for building RPM packages.
1678 It is automatically invoked for buffers visiting any file ending with an
1679 extension of @file{.spec?} or @file{.spec.in}.
1681 The mode much like C mode except for the syntax of comments. It uses the
1682 same keymap as C mode and has the same variables for customizing indentation.
1683 It has its own abbrev table and its own syntax table. @xref{Top, CC Mode, ,
1684 cc-mode, CC Mode Manual}., for details.
1686 Turning on RPM spec mode calls the value of the variable
1687 @code{rpm-spec-mode-hook} with no args, if that value is non-nil.
1689 To configure this package, type:
1692 M-x customize-group RET rpm-spec RET
1696 * About RPM: about-rpm.
1699 @node about-rpm, , rpm-spec-mode, rpm-spec-mode
1702 The RPM Package Manager (RPM) is a powerful command line driven package
1703 management system capable of installing, uninstalling, verifying, querying,
1704 and updating computer software packages. Each software package consists of an
1705 archive of files along with information about the package like its version, a
1706 description, and the like. There is also a related API ("Application Program
1707 Interface"), permitting advanced developers to bypass 'shelling out' to a
1708 command line, and to manage such transactions from within a native coding
1711 For more information, see @uref{http://www.rpm.org/}.
1713 @node simula, sql, rpm-spec-mode, Top
1714 @chapter Editing SIMULA 87 Code
1716 This mode is used for editing SIMULA code. It is NOT automatically
1717 invoked for any particular file extension. To invoke this mode while editing
1718 a file, type @code{M-x simula-mode}.
1720 The mode knows about Simula syntax and standard indentation commands. It
1721 also provides convenient abbrevs for Simula keywords.
1723 The following key mappings are defined:
1725 @multitable {C-c C-d } {simula-forward-down-level}
1726 @item @code{:} @tab simula-electric-label
1727 @item @code{tab} @tab simula-indent-command
1728 @item @code{C-c} @tab << Prefix Command >>
1729 @item @code{C-i} @tab simula-indent-command
1730 @item @code{C-c C-d} @tab simula-forward-down-level
1731 @item @code{C-c C-n} @tab simula-next-statement
1732 @item @code{C-c C-p} @tab simula-previous-statement
1733 @item @code{C-c C-u} @tab simula-backward-up-level
1736 The following variables controlling indentation style:
1740 @item simula-tab-always-indent
1741 Non-nil means TAB in SIMULA mode should always reindent the current line,
1742 regardless of where in the line point is when the TAB command is used.
1744 @item simula-indent-level
1745 Indentation of SIMULA statements with respect to containing block.
1747 @item simula-substatement-offset
1748 Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE.
1750 @item simula-continued-statement-offset
1751 Extra indentation for lines not starting a statement or substatement,
1752 e.g. a nested FOR-loop. If value is a list, each line in a multiple-
1753 line continued statement will have the car of the list extra indentation
1754 with respect to the previous line of the statement.
1756 @item simula-label-offset -4711
1757 Offset of SIMULA label lines relative to usual indentation.
1759 @item simula-if-indent '(0 . 0)
1760 Extra indentation of THEN and ELSE with respect to the starting IF.
1761 Value is a cons cell, the car is extra THEN indentation and the cdr
1762 extra ELSE indentation. IF after ELSE is indented as the starting IF.
1764 @item simula-inspect-indent '(0 . 0)
1765 Extra indentation of WHEN and OTHERWISE with respect to the
1766 corresponding INSPECT. Value is a cons cell, the car is
1767 extra WHEN indentation and the cdr extra OTHERWISE indentation.
1769 @item simula-electric-indent nil
1770 If this variable is non-nil, `simula-indent-line'
1771 will check the previous line to see if it has to be reindented.
1773 @item simula-abbrev-keyword 'upcase
1774 Determine how SIMULA keywords will be expanded. Value is one of
1775 the symbols `upcase', `downcase', `capitalize', (as in) `abbrev-table',
1776 or nil if they should not be changed.
1778 @item simula-abbrev-stdproc 'abbrev-table
1779 Determine how standard SIMULA procedure and class names will be
1780 expanded. Value is one of the symbols `upcase', `downcase', `capitalize',
1781 (as in) `abbrev-table', or nil if they should not be changed.
1785 Turning on SIMULA mode calls the value of the variable
1786 @code{simula-mode-hook} with no arguments, if that value is non-nil.
1788 Warning: @code{simula-mode-hook} should not read in an abbrev file without
1789 calling the function @code{simula-install-standard-abbrevs} afterwards,
1790 preferably not at all.
1792 To configure this package, type:
1795 M-x customize-group RET simula RET
1799 * About SIMULA: about-simula.
1802 @node about-simula, , simula, simula
1803 @section About SIMULA
1805 The SIMULA programming language was designed and built by Ole-Johan Dahl and
1806 Kristen Nygaard at the Norwegian Computing Center (NCC) in Oslo between 1962
1807 and 1967. It was originally designed and implemented as a language for
1808 discrete event simulation, but was later extended and reimplemented as a full
1809 scale general purpose programming language.
1811 For more information, see
1812 @uref{http://www.engin.umd.umich.edu/CIS/course.des/cis400/simula/simula.html}.
1814 @node sql, tcl, simula, Top
1815 @chapter Specialized Mode for SQL Interpreters
1817 This package provides a @code{sql-mode} and a @code{sql-interactive-mode}.
1818 The goals were two simple modes providing syntactic highlighting. The
1819 interactive mode had to provide a command-line history; the other mode had to
1820 provide "send region/buffer to SQL interpreter" functions. "simple" in this
1821 context means easy to use, easy to maintain and little or no bells and
1824 @code{sql-interactive-mode} is used to interact with a SQL interpreter
1825 process in a SQLi buffer (usually called `*SQL*'). The SQLi buffer
1826 is created by calling a SQL interpreter-specific entry function. Do
1827 @emph{not} call @code{sql-interactive-mode} by itself.
1829 The list of currently supported interpreters and the corresponding entry
1830 function used to create the SQLi buffers is shown with @kbd{M-x sql-help}.
1832 Since @code{sql-interactive-mode} is built on top of the general
1833 command-interpreter-in-a-buffer mode (comint mode), it shares a common base
1834 functionality, and a common set of bindings, with all modes derived from
1835 comint mode. This makes these modes easier to use.
1837 @code{sql-mode} can be used to keep editing SQL statements. The SQL
1838 statements can be sent to the SQL process in the SQLi buffer.
1840 For documentation on the functionality provided by comint mode, and the hooks
1841 available for customizing it, see the file @file{comint.el}.
1843 Hint for newbies: take a look at @code{dabbrev-expand}, @code{abbrev-mode},
1844 and @code{imenu-add-menubar-index}.
1846 To configure this package, type:
1849 M-x customize-group RET SQL RET
1852 @node tcl, teco, sql, Top
1853 @chapter Editing Tcl Code
1855 This mode is used to edit Tcl code. The mode is automatically invoked
1856 for buffers visiting the following types of files:
1859 @item any file ending with an extension of @file{.tcl} or @file{.exp}.
1860 @item any file that has an interpretor line (the "shebang" line) specifying
1861 "scope", "wish", "tcl", "tclsh", or "expect".
1864 The mode provides the following capabilities:
1867 @item Expression and list commands understand all Tcl brackets.
1868 @item Tab indents for Tcl code.
1869 @item Paragraphs are separated by blank lines only.
1870 @item Delete converts tabs to spaces as it moves back.
1873 The variables controlling indentation style are:
1877 @item tcl-indent-level
1878 Indentation of Tcl statements within surrounding block.
1880 @item tcl-continued-indent-level
1881 Indentation of continuation line relative to first line of command.
1885 The variables controlling user interaction with mode (see variable
1886 documentation for details) are:
1890 @item tcl-tab-always-indent
1891 Controls action of TAB key.
1893 @item tcl-auto-newline
1894 Non-nil means automatically newline before and after braces, brackets,
1895 and semicolons inserted in Tcl code.
1897 @item tcl-electric-hash-style
1898 Controls action of `#' key.
1900 @item tcl-use-hairy-comment-detector
1901 If t, use more complicated, but slower, comment detector.
1902 This variable is only used in Emacs 19.
1904 @item tcl-use-smart-word-finder
1905 If not nil, use a smarter, Tcl-specific way to find the current
1906 word when looking up help on a Tcl command.
1910 Turning on Tcl mode calls the value of the variable @code{tcl-mode-hook} with
1911 no args, if that value is non-nil. Read the documentation for
1912 @code{tcl-mode-hook} to see what kinds of interesting hook functions already
1915 The following key mappings are defined:
1917 @multitable {M-backspace } {backward-delete-char-untabify}
1918 @item @code{#} @tab tcl-electric-hash
1919 @item @code{;} @tab tcl-electric-char
1920 @item @code{[} @tab tcl-electric-char
1921 @item @code{]} @tab tcl-electric-char
1922 @item @code{@{} @tab tcl-electric-char
1923 @item @code{@}} @tab tcl-electric-brace
1924 @item @code{delete} @tab backward-delete-char-untabify
1925 @item @code{tab} @tab tcl-indent-command
1926 @item @code{C-c} @tab << Prefix Command >>
1927 @item @code{C-i} @tab tcl-indent-command
1928 @item @code{M-;} @tab tcl-indent-for-comment
1929 @item @code{M-backspace} @tab tcl-mark-defun
1930 @item @code{M-C-a} @tab tcl-beginning-of-defun
1931 @item @code{M-C-e} @tab tcl-end-of-defun
1932 @item @code{M-C-h} @tab tcl-mark-defun
1933 @item @code{M-C-q} @tab indent-tcl-exp
1934 @item @code{M-C-x} @tab tcl-eval-defun
1935 @item @code{C-c tab} @tab tcl-help-on-word
1936 @item @code{C-c C-b} @tab tcl-submit-bug-report
1937 @item @code{C-c C-c} @tab comment-region
1938 @item @code{C-c C-f} @tab tcl-load-file
1939 @item @code{C-c C-i} @tab tcl-help-on-word
1940 @item @code{C-c C-s} @tab switch-to-tcl
1941 @item @code{C-c C-t} @tab inferior-tcl
1942 @item @code{C-c C-v} @tab tcl-eval-defun
1943 @item @code{C-c C-x} @tab tcl-eval-region
1946 To configure this package, type:
1949 M-x customize-group RET tcl RET
1953 * About Tcl: about-tcl.
1956 @node about-tcl, , tcl, tcl
1959 Tcl (Tool Command Language) is used by over half a million developers
1960 worldwide and has become a critical component in thousands of
1961 corporations. It has a simple and programmable syntax and can be either used
1962 as a standalone application or embedded in application programs. Best of all,
1963 Tcl is open source so it's completely free.
1965 Tk is a graphical user interface toolkit that makes it possible to create
1966 powerful GUIs incredibly quickly. It proved so popular that it now ships with
1967 all distributions of Tcl.
1969 For more information, see @uref{http://www.tcl.tk/software/tcltk/}.
1971 @node teco, uil-mode, tcl, Top
1972 @chapter Teco Interpreter
1974 This package implements a Teco Interpreter.
1976 To configure this package please view the source code. This can be done by
1977 typing @kbd{C-x 4 l teco}.
1979 @node uil-mode, verilog-mode, teco, Top
1980 @chapter Editing Motif UIL Code
1982 This mode is used to edit Motif UIL files. It is automatically invoked
1983 for buffers visiting any file ending with an extension of @file{.uil}.
1985 This mode is much like C mode except for the syntax of comments. It uses the
1986 same keymap as C mode and has the same variables for customizing indentation.
1987 It has its own abbrev table and its own syntax table. @xref{Top, CC Mode, ,
1988 cc-mode, CC Mode Manual}., for details.
1990 Turning on uilmode calls the value of the variable @code{uil-mode-hook} with
1991 no args, if that value is non-nil.
1993 To configure this package please view the source code. This can be done by
1994 typing @kbd{C-x 4 l uil-mode}.
1997 * About UIL: about-uil.
2000 @node about-uil, , uil-mode, uil-mode
2003 The Motif user interface language (UIL) is a specification language for
2004 describing the initial state of a Motif application's user interface.
2006 @node verilog-mode, vrml-mode, uil-mode, Top
2007 @chapter Editing Verilog and SystemVerilog HDL Source
2009 This mode is used to edit Verilog and SystemVerilog source files. It
2010 is automatically invoked for buffers visiting any file ending with one
2011 of the following extensions: @file{.vh?}, @file{.svh?}, @file{.dv}.
2013 The mode provides the following features:
2016 @item NEWLINE, TAB indents for Verilog code.
2017 @item Delete converts tabs to spaces as it moves back.
2018 @item Supports highlighting.
2019 @item Supports SystemVerilog OVM (Open Verification Methodology) macros.
2022 This documentation is only a teaser and does not claim to be
2023 complete. Please check out
2024 @uref{http://www.veripool.org/wiki/verilog-mode/Documentation}
2025 for further information, FAQ and change history.
2027 The variables controlling indentation/edit style are:
2031 @item verilog-indent-level
2032 Indentation of Verilog statements with respect to containing block.
2034 @item verilog-indent-level-module
2035 Absolute indentation of Module level Verilog statements.
2036 Set to 0 to get initial and always statements lined up
2037 on the left side of your screen.
2039 @item verilog-indent-level-declaration
2040 Indentation of declarations with respect to containing block.
2041 Set to 0 to get them list right under containing block.
2043 @item verilog-indent-level-behavioral
2044 Indentation of first begin in a task or function block
2045 Set to 0 to get such code to lined up underneath the task or function keyword
2047 @item verilog-indent-level-directive
2048 Indentation of `ifdef/`endif blocks
2050 @item `verilog-cexp-indent
2051 Indentation of Verilog statements broken across lines i.e.:
2057 @item verilog-case-indent
2058 Indentation for case statements.
2060 @item verilog-auto-newline
2061 Non-nil means automatically newline after semicolons and the punctuation
2064 @item verilog-auto-indent-on-newline
2065 Non-nil means automatically indent line after newline
2067 @item verilog-tab-always-indent
2068 Non-nil means TAB in Verilog mode should always reindent the current line,
2069 regardless of where in the line point is when the TAB command is used.
2071 @item verilog-indent-begin-after-if
2072 Non-nil means to indent begin statements following a preceding
2073 if, else, while, for and repeat statements, if any. otherwise,
2074 the begin is lined up with the preceding token. If t, you get:
2077 begin // amount of indent based on `verilog-cexp-indent'
2086 @item verilog-auto-endcomments
2087 Non-nil means a comment /* ... */ is set after the ends which ends
2088 cases, tasks, functions and modules.
2089 The type and name of the object will be set between the braces.
2091 @item verilog-minimum-comment-distance
2092 Minimum distance (in lines) between begin and end required before a comment
2093 will be inserted. Setting this variable to zero results in every
2094 end acquiring a comment; the default avoids too many redundant
2095 comments in tight quarters.
2097 @item verilog-auto-lineup
2098 List of contexts where auto lineup of :'s or ='s should be done.
2102 Turning on Verilog mode calls the value of the variable
2103 @code{verilog-mode-hook} with no args, if that value is non-nil.
2105 Other useful functions are:
2109 @item verilog-complete-word
2110 complete word with appropriate possibilities (functions, verilog keywords...)
2112 @item verilog-comment-region
2113 Put marked area in a comment, fixing nested comments.
2115 @item verilog-uncomment-region
2116 Uncomment an area commented with @code{verilog-comment-region}.
2118 @item verilog-insert-block
2119 insert begin ... end;
2121 @item verilog-star-comment
2124 @item verilog-mark-defun
2127 @item verilog-beg-of-defun
2128 Move to beginning of current function.
2130 @item verilog-end-of-defun
2131 Move to end of current function.
2133 @item verilog-label-be
2134 Label matching begin ... end, fork ... join and case ... endcase statements
2136 @item verilog-sk-always
2137 Insert a always @@(AS) begin .. end block
2139 @item verilog-sk-begin
2140 Insert a begin .. end block
2142 @item verilog-sk-case
2143 Insert a case block, prompting for details
2145 @item verilog-sk-else
2146 Insert an else begin .. end block
2148 @item verilog-sk-for
2149 Insert a for (...) begin .. end block, prompting for details
2151 @item verilog-sk-generate
2152 Insert a generate .. endgenerate block
2154 @item verilog-sk-header
2155 Insert a nice header block at the top of file
2157 @item verilog-sk-initial
2158 Insert an initial begin .. end block
2160 @item verilog-sk-fork
2161 Insert a fork begin .. end .. join block
2163 @item verilog-sk-module
2164 Insert a module .. (/*AUTOARG*/);.. endmodule block
2166 @item verilog-sk-primitive
2167 Insert a primitive .. (.. );.. endprimitive block
2169 @item verilog-sk-repeat
2170 Insert a repeat (..) begin .. end block
2172 @item verilog-sk-specify
2173 Insert a specify .. endspecify block
2175 @item verilog-sk-task
2176 Insert a task .. begin .. end endtask block
2178 @item verilog-sk-while
2179 Insert a while (...) begin .. end block, prompting for details
2181 @item verilog-sk-casex
2182 Insert a casex (...) item: begin.. end endcase block, prompting for details
2184 @item verilog-sk-casez
2185 Insert a casez (...) item: begin.. end endcase block, prompting for details
2188 Insert an if (..) begin .. end block
2190 @item verilog-sk-else-if
2191 Insert an else if (..) begin .. end block
2193 @item verilog-sk-comment
2194 Insert a comment block
2196 @item verilog-sk-assign
2197 Insert an assign .. = ..; statement
2199 @item verilog-sk-function
2200 Insert a function .. begin .. end endfunction block
2202 @item verilog-sk-input
2203 Insert an input declaration, prompting for details
2205 @item verilog-sk-output
2206 Insert an output declaration, prompting for details
2208 @item verilog-sk-state-machine
2209 Insert a state machine definition, prompting for details!
2211 @item verilog-sk-inout
2212 Insert an inout declaration, prompting for details
2214 @item verilog-sk-wire
2215 Insert a wire declaration, prompting for details
2217 @item verilog-sk-reg
2218 Insert a register declaration, prompting for details"
2222 To configure this package, type:
2225 M-x customize-group RET verilog-mode RET
2229 * About Verilog: about-verilog.
2232 @node about-verilog, , verilog-mode, verilog-mode
2233 @section About Verilog
2235 Verilog (IEEE 1364) and SystemVerilog (IEEE 1800) HDL are hardware
2236 description languages used to design and document electronic
2237 systems. In December 2007 IEEE 1364 has been merged into IEEE 1800,
2238 paving the way for SystemVerilog as the official successor to Verilog.
2240 SystemVerilog HDL allows designers to design at various levels of
2243 For more information, see @uref{http://www.systemverilog.org/}.
2245 @node vrml-mode, XEmacs License, verilog-mode, Top
2246 @chapter Editing VRML (.wrl) Files
2248 This mode is used for editing VRML files. It is automatically invoked for
2249 buffers visiting any file ending with an extension of @file{.wrl}.
2251 The mode has the following features:
2254 @item Expression and list commands understand all VRML brackets.
2255 @item Tab indents for VRML code.
2256 @item Paragraphs are separated by blank lines only.
2257 @item Delete converts tabs to spaces as it moves back.
2261 The variables controlling indentation style are:
2265 @item vrml-indent-level
2266 Indentation of VRML statements within surrounding block.
2270 The variables controlling user interaction with mode (see variable
2271 documentation for details) are:
2275 @item vrml-tab-always-indent
2276 Controls action of TAB key.
2278 @item vrml-auto-newline
2279 Non-nil means automatically newline before and after braces
2280 inserted in VRML code.
2284 Turning on VRML mode calls the value of the variable @code{vrml-mode-hook}
2285 with no args, if that value is non-nil. Read the documentation for
2286 @code{vrml-mode-hook} to see what kinds of interesting hook functions already
2289 To configure this package, type:
2292 M-x customize-group RET vrml RET
2295 @node XEmacs License, , vrml-mode, Top
2296 @chapter XEmacs License
2297 @unnumbered GNU GENERAL PUBLIC LICENSE
2298 @center Version 2, June 1991
2301 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
2302 675 Mass Ave, Cambridge, MA 02139, USA
2304 Everyone is permitted to copy and distribute verbatim copies
2305 of this license document, but changing it is not allowed.
2308 @unnumberedsec Preamble
2310 The licenses for most software are designed to take away your
2311 freedom to share and change it. By contrast, the GNU General Public
2312 License is intended to guarantee your freedom to share and change free
2313 software---to make sure the software is free for all its users. This
2314 General Public License applies to most of the Free Software
2315 Foundation's software and to any other program whose authors commit to
2316 using it. (Some other Free Software Foundation software is covered by
2317 the GNU Library General Public License instead.) You can apply it to
2320 When we speak of free software, we are referring to freedom, not
2321 price. Our General Public Licenses are designed to make sure that you
2322 have the freedom to distribute copies of free software (and charge for
2323 this service if you wish), that you receive source code or can get it
2324 if you want it, that you can change the software or use pieces of it
2325 in new free programs; and that you know you can do these things.
2327 To protect your rights, we need to make restrictions that forbid
2328 anyone to deny you these rights or to ask you to surrender the rights.
2329 These restrictions translate to certain responsibilities for you if you
2330 distribute copies of the software, or if you modify it.
2332 For example, if you distribute copies of such a program, whether
2333 gratis or for a fee, you must give the recipients all the rights that
2334 you have. You must make sure that they, too, receive or can get the
2335 source code. And you must show them these terms so they know their
2338 We protect your rights with two steps: (1) copyright the software, and
2339 (2) offer you this license which gives you legal permission to copy,
2340 distribute and/or modify the software.
2342 Also, for each author's protection and ours, we want to make certain
2343 that everyone understands that there is no warranty for this free
2344 software. If the software is modified by someone else and passed on, we
2345 want its recipients to know that what they have is not the original, so
2346 that any problems introduced by others will not reflect on the original
2347 authors' reputations.
2349 Finally, any free program is threatened constantly by software
2350 patents. We wish to avoid the danger that redistributors of a free
2351 program will individually obtain patent licenses, in effect making the
2352 program proprietary. To prevent this, we have made it clear that any
2353 patent must be licensed for everyone's free use or not licensed at all.
2355 The precise terms and conditions for copying, distribution and
2356 modification follow.
2359 @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2362 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2367 This License applies to any program or other work which contains
2368 a notice placed by the copyright holder saying it may be distributed
2369 under the terms of this General Public License. The ``Program'', below,
2370 refers to any such program or work, and a ``work based on the Program''
2371 means either the Program or any derivative work under copyright law:
2372 that is to say, a work containing the Program or a portion of it,
2373 either verbatim or with modifications and/or translated into another
2374 language. (Hereinafter, translation is included without limitation in
2375 the term ``modification''.) Each licensee is addressed as ``you''.
2377 Activities other than copying, distribution and modification are not
2378 covered by this License; they are outside its scope. The act of
2379 running the Program is not restricted, and the output from the Program
2380 is covered only if its contents constitute a work based on the
2381 Program (independent of having been made by running the Program).
2382 Whether that is true depends on what the Program does.
2385 You may copy and distribute verbatim copies of the Program's
2386 source code as you receive it, in any medium, provided that you
2387 conspicuously and appropriately publish on each copy an appropriate
2388 copyright notice and disclaimer of warranty; keep intact all the
2389 notices that refer to this License and to the absence of any warranty;
2390 and give any other recipients of the Program a copy of this License
2391 along with the Program.
2393 You may charge a fee for the physical act of transferring a copy, and
2394 you may at your option offer warranty protection in exchange for a fee.
2397 You may modify your copy or copies of the Program or any portion
2398 of it, thus forming a work based on the Program, and copy and
2399 distribute such modifications or work under the terms of Section 1
2400 above, provided that you also meet all of these conditions:
2404 You must cause the modified files to carry prominent notices
2405 stating that you changed the files and the date of any change.
2408 You must cause any work that you distribute or publish, that in
2409 whole or in part contains or is derived from the Program or any
2410 part thereof, to be licensed as a whole at no charge to all third
2411 parties under the terms of this License.
2414 If the modified program normally reads commands interactively
2415 when run, you must cause it, when started running for such
2416 interactive use in the most ordinary way, to print or display an
2417 announcement including an appropriate copyright notice and a
2418 notice that there is no warranty (or else, saying that you provide
2419 a warranty) and that users may redistribute the program under
2420 these conditions, and telling the user how to view a copy of this
2421 License. (Exception: if the Program itself is interactive but
2422 does not normally print such an announcement, your work based on
2423 the Program is not required to print an announcement.)
2426 These requirements apply to the modified work as a whole. If
2427 identifiable sections of that work are not derived from the Program,
2428 and can be reasonably considered independent and separate works in
2429 themselves, then this License, and its terms, do not apply to those
2430 sections when you distribute them as separate works. But when you
2431 distribute the same sections as part of a whole which is a work based
2432 on the Program, the distribution of the whole must be on the terms of
2433 this License, whose permissions for other licensees extend to the
2434 entire whole, and thus to each and every part regardless of who wrote it.
2436 Thus, it is not the intent of this section to claim rights or contest
2437 your rights to work written entirely by you; rather, the intent is to
2438 exercise the right to control the distribution of derivative or
2439 collective works based on the Program.
2441 In addition, mere aggregation of another work not based on the Program
2442 with the Program (or with a work based on the Program) on a volume of
2443 a storage or distribution medium does not bring the other work under
2444 the scope of this License.
2447 You may copy and distribute the Program (or a work based on it,
2448 under Section 2) in object code or executable form under the terms of
2449 Sections 1 and 2 above provided that you also do one of the following:
2453 Accompany it with the complete corresponding machine-readable
2454 source code, which must be distributed under the terms of Sections
2455 1 and 2 above on a medium customarily used for software interchange; or,
2458 Accompany it with a written offer, valid for at least three
2459 years, to give any third party, for a charge no more than your
2460 cost of physically performing source distribution, a complete
2461 machine-readable copy of the corresponding source code, to be
2462 distributed under the terms of Sections 1 and 2 above on a medium
2463 customarily used for software interchange; or,
2466 Accompany it with the information you received as to the offer
2467 to distribute corresponding source code. (This alternative is
2468 allowed only for noncommercial distribution and only if you
2469 received the program in object code or executable form with such
2470 an offer, in accord with Subsection b above.)
2473 The source code for a work means the preferred form of the work for
2474 making modifications to it. For an executable work, complete source
2475 code means all the source code for all modules it contains, plus any
2476 associated interface definition files, plus the scripts used to
2477 control compilation and installation of the executable. However, as a
2478 special exception, the source code distributed need not include
2479 anything that is normally distributed (in either source or binary
2480 form) with the major components (compiler, kernel, and so on) of the
2481 operating system on which the executable runs, unless that component
2482 itself accompanies the executable.
2484 If distribution of executable or object code is made by offering
2485 access to copy from a designated place, then offering equivalent
2486 access to copy the source code from the same place counts as
2487 distribution of the source code, even though third parties are not
2488 compelled to copy the source along with the object code.
2491 You may not copy, modify, sublicense, or distribute the Program
2492 except as expressly provided under this License. Any attempt
2493 otherwise to copy, modify, sublicense or distribute the Program is
2494 void, and will automatically terminate your rights under this License.
2495 However, parties who have received copies, or rights, from you under
2496 this License will not have their licenses terminated so long as such
2497 parties remain in full compliance.
2500 You are not required to accept this License, since you have not
2501 signed it. However, nothing else grants you permission to modify or
2502 distribute the Program or its derivative works. These actions are
2503 prohibited by law if you do not accept this License. Therefore, by
2504 modifying or distributing the Program (or any work based on the
2505 Program), you indicate your acceptance of this License to do so, and
2506 all its terms and conditions for copying, distributing or modifying
2507 the Program or works based on it.
2510 Each time you redistribute the Program (or any work based on the
2511 Program), the recipient automatically receives a license from the
2512 original licensor to copy, distribute or modify the Program subject to
2513 these terms and conditions. You may not impose any further
2514 restrictions on the recipients' exercise of the rights granted herein.
2515 You are not responsible for enforcing compliance by third parties to
2519 If, as a consequence of a court judgment or allegation of patent
2520 infringement or for any other reason (not limited to patent issues),
2521 conditions are imposed on you (whether by court order, agreement or
2522 otherwise) that contradict the conditions of this License, they do not
2523 excuse you from the conditions of this License. If you cannot
2524 distribute so as to satisfy simultaneously your obligations under this
2525 License and any other pertinent obligations, then as a consequence you
2526 may not distribute the Program at all. For example, if a patent
2527 license would not permit royalty-free redistribution of the Program by
2528 all those who receive copies directly or indirectly through you, then
2529 the only way you could satisfy both it and this License would be to
2530 refrain entirely from distribution of the Program.
2532 If any portion of this section is held invalid or unenforceable under
2533 any particular circumstance, the balance of the section is intended to
2534 apply and the section as a whole is intended to apply in other
2537 It is not the purpose of this section to induce you to infringe any
2538 patents or other property right claims or to contest validity of any
2539 such claims; this section has the sole purpose of protecting the
2540 integrity of the free software distribution system, which is
2541 implemented by public license practices. Many people have made
2542 generous contributions to the wide range of software distributed
2543 through that system in reliance on consistent application of that
2544 system; it is up to the author/donor to decide if he or she is willing
2545 to distribute software through any other system and a licensee cannot
2548 This section is intended to make thoroughly clear what is believed to
2549 be a consequence of the rest of this License.
2552 If the distribution and/or use of the Program is restricted in
2553 certain countries either by patents or by copyrighted interfaces, the
2554 original copyright holder who places the Program under this License
2555 may add an explicit geographical distribution limitation excluding
2556 those countries, so that distribution is permitted only in or among
2557 countries not thus excluded. In such case, this License incorporates
2558 the limitation as if written in the body of this License.
2561 The Free Software Foundation may publish revised and/or new versions
2562 of the General Public License from time to time. Such new versions will
2563 be similar in spirit to the present version, but may differ in detail to
2564 address new problems or concerns.
2566 Each version is given a distinguishing version number. If the Program
2567 specifies a version number of this License which applies to it and ``any
2568 later version'', you have the option of following the terms and conditions
2569 either of that version or of any later version published by the Free
2570 Software Foundation. If the Program does not specify a version number of
2571 this License, you may choose any version ever published by the Free Software
2575 If you wish to incorporate parts of the Program into other free
2576 programs whose distribution conditions are different, write to the author
2577 to ask for permission. For software which is copyrighted by the Free
2578 Software Foundation, write to the Free Software Foundation; we sometimes
2579 make exceptions for this. Our decision will be guided by the two goals
2580 of preserving the free status of all derivatives of our free software and
2581 of promoting the sharing and reuse of software generally.
2584 @heading NO WARRANTY
2591 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
2592 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW@. EXCEPT WHEN
2593 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
2594 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
2595 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2596 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE@. THE ENTIRE RISK AS
2597 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU@. SHOULD THE
2598 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
2599 REPAIR OR CORRECTION.
2602 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2603 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
2604 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
2605 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
2606 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
2607 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
2608 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
2609 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
2610 POSSIBILITY OF SUCH DAMAGES.
2614 @heading END OF TERMS AND CONDITIONS
2617 @center END OF TERMS AND CONDITIONS
2621 @unnumberedsec How to Apply These Terms to Your New Programs
2623 If you develop a new program, and you want it to be of the greatest
2624 possible use to the public, the best way to achieve this is to make it
2625 free software which everyone can redistribute and change under these terms.
2627 To do so, attach the following notices to the program. It is safest
2628 to attach them to the start of each source file to most effectively
2629 convey the exclusion of warranty; and each file should have at least
2630 the ``copyright'' line and a pointer to where the full notice is found.
2633 @var{one line to give the program's name and an idea of what it does.}
2634 Copyright (C) 19@var{yy} @var{name of author}
2636 This program is free software; you can redistribute it and/or
2637 modify it under the terms of the GNU General Public License
2638 as published by the Free Software Foundation; either version 2
2639 of the License, or (at your option) any later version.
2641 This program is distributed in the hope that it will be useful,
2642 but WITHOUT ANY WARRANTY; without even the implied warranty of
2643 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE@. See the
2644 GNU General Public License for more details.
2646 You should have received a copy of the GNU General Public License
2647 along with this program; if not, write to the Free Software
2648 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2651 Also add information on how to contact you by electronic and paper mail.
2653 If the program is interactive, make it output a short notice like this
2654 when it starts in an interactive mode:
2657 Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
2658 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
2659 type `show w'. This is free software, and you are welcome
2660 to redistribute it under certain conditions; type `show c'
2664 The hypothetical commands @samp{show w} and @samp{show c} should show
2665 the appropriate parts of the General Public License. Of course, the
2666 commands you use may be called something other than @samp{show w} and
2667 @samp{show c}; they could even be mouse-clicks or menu items---whatever
2670 You should also get your employer (if you work as a programmer) or your
2671 school, if any, to sign a ``copyright disclaimer'' for the program, if
2672 necessary. Here is a sample; alter the names:
2676 Yoyodyne, Inc., hereby disclaims all copyright
2677 interest in the program `Gnomovision'
2678 (which makes passes at compilers) written
2681 @var{signature of Ty Coon}, 1 April 1989
2682 Ty Coon, President of Vice
2686 This General Public License does not permit incorporating your program into
2687 proprietary programs. If your program is a subroutine library, you may
2688 consider it more useful to permit linking proprietary applications with the
2689 library. If this is what you want to do, use the GNU Library General
2690 Public License instead of this License.