summaryrefslogtreecommitdiff
path: root/doc/lispref/modes.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref/modes.texi')
-rw-r--r--doc/lispref/modes.texi50
1 files changed, 33 insertions, 17 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index de40fa7f963..be2ee5721c2 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -469,9 +469,10 @@ variable @code{imenu-generic-expression}, for the two variables
@code{imenu-create-index-function} (@pxref{Imenu}).
@item
-The mode can specify a local value for
-@code{eldoc-documentation-function} to tell ElDoc mode how to handle
-this mode.
+The mode can tell ElDoc mode how to retrieve different types of
+documentation for whatever is at point, by adding one or more
+buffer-local entries to the special hook
+@code{eldoc-documentation-functions}.
@item
The mode can specify how to complete various keywords by adding one or
@@ -1352,19 +1353,11 @@ illustrate how these modes are written.
@end smallexample
The three modes for Lisp share much of their code. For instance,
-each calls the following function to set various variables:
-
-@smallexample
-@group
-(defun lisp-mode-variables (&optional syntax keywords-case-insensitive elisp)
- (when syntax
- (set-syntax-table lisp-mode-syntax-table))
- @dots{}
-@end group
-@end smallexample
+Lisp mode and Emacs Lisp mode inherit from Lisp Data mode and Lisp
+Interaction Mode inherits from Emacs Lisp mode.
@noindent
-Amongst other things, this function sets up the @code{comment-start}
+Amongst other things, Lisp Data mode sets up the @code{comment-start}
variable to handle Lisp comments:
@smallexample
@@ -1414,7 +1407,7 @@ Finally, here is the major mode command for Lisp mode:
@smallexample
@group
-(define-derived-mode lisp-mode prog-mode "Lisp"
+(define-derived-mode lisp-mode lisp-data-mode "Lisp"
"Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
Commands:
Delete converts tabs to spaces as it moves back.
@@ -1425,10 +1418,9 @@ Note that `run-lisp' may be used either to start an inferior Lisp job
or to switch back to an existing one."
@end group
@group
- (lisp-mode-variables nil t)
(setq-local find-tag-default-function 'lisp-find-tag-default)
(setq-local comment-start-skip
- "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
+ "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
(setq imenu-case-fold-search t))
@end group
@end smallexample
@@ -2174,6 +2166,29 @@ Mode line construct for miscellaneous information. By default, this
shows the information specified by @code{global-mode-string}.
@end defvar
+@defvar mode-line-position-line-format
+The format used to display line numbers when @code{line-number-mode}
+(@pxref{Optional Mode Line,,, emacs, The GNU Emacs Manual}) is
+switched on. @samp{%l} in the format will be replaced with the line
+number.
+@end defvar
+
+@defvar mode-line-position-column-format
+The format used to display column numbers when
+@code{column-number-mode} (@pxref{Optional Mode Line,,, emacs, The GNU
+Emacs Manual}) is switched on. @samp{%c} in the format will be
+replaced with the column number, and this is zero-based if
+@code{column-number-indicator-zero-based} is non-@code{nil}, and
+one-based if @code{column-number-indicator-zero-based} is @code{nil}.
+@end defvar
+
+@defvar mode-line-position-column-line-format
+The format used to display column numbers when both
+@code{line-number-mode} and @code{column-number-mode} are switched on.
+See the previous two variables for the meaning of the @samp{%l} and
+@samp{%c} format specs.
+@end defvar
+
@defvar minor-mode-alist
@anchor{Definition of minor-mode-alist}
This variable holds an association list whose elements specify how the
@@ -2674,6 +2689,7 @@ Setting this variable makes it buffer-local in the current buffer.
@node Font Lock Mode
@section Font Lock Mode
@cindex Font Lock mode
+@cindex syntax highlighting and coloring
@dfn{Font Lock mode} is a buffer-local minor mode that automatically
attaches @code{face} properties to certain parts of the buffer based on