9801 lines
359 KiB
Plaintext
9801 lines
359 KiB
Plaintext
|
# SOME DESCRIPTIVE TITLE
|
|||
|
# Copyright (C) YEAR Free Software Foundation, Inc.
|
|||
|
# This file is distributed under the same license as the PACKAGE package.
|
|||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|||
|
#
|
|||
|
#, fuzzy
|
|||
|
msgid ""
|
|||
|
msgstr ""
|
|||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
|||
|
"POT-Creation-Date: 2021-11-07 12:11+0900\n"
|
|||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|||
|
"Language: \n"
|
|||
|
"MIME-Version: 1.0\n"
|
|||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|||
|
"Content-Transfer-Encoding: 8bit\n"
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:6
|
|||
|
#, no-wrap
|
|||
|
msgid "Modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: chapter
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:7
|
|||
|
#, no-wrap
|
|||
|
msgid "Major and Minor Modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:8
|
|||
|
#, no-wrap
|
|||
|
msgid "mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:16
|
|||
|
msgid ""
|
|||
|
"A @dfn{mode} is a set of definitions that customize Emacs behavior in useful "
|
|||
|
"ways. There are two varieties of modes: @dfn{minor modes}, which provide "
|
|||
|
"features that users can turn on and off while editing; and @dfn{major "
|
|||
|
"modes}, which are used for editing or interacting with a particular kind of "
|
|||
|
"text. Each buffer has exactly one @dfn{major mode} at a time."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:21
|
|||
|
msgid ""
|
|||
|
"This chapter describes how to write both major and minor modes, how to "
|
|||
|
"indicate them in the mode line, and how they run hooks supplied by the "
|
|||
|
"user. For related topics such as keymaps and syntax tables, see "
|
|||
|
"@ref{Keymaps}, and @ref{Syntax Tables}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: section
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:34
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:35
|
|||
|
#, no-wrap
|
|||
|
msgid "Hooks"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
msgid "How to use hooks; how to write code that provides hooks."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: section
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:228
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:229
|
|||
|
#, no-wrap
|
|||
|
msgid "Major Modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
msgid "Defining major modes."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: section
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1475
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1476
|
|||
|
#, no-wrap
|
|||
|
msgid "Minor Modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
msgid "Defining minor modes."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: section
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1913
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1914
|
|||
|
#, no-wrap
|
|||
|
msgid "Mode Line Format"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
msgid "Customizing the text that appears in the mode line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2603
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2604
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2606
|
|||
|
#, no-wrap
|
|||
|
msgid "Imenu"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
msgid "Providing a menu of definitions made in a buffer."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: section
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2796
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2797
|
|||
|
#, no-wrap
|
|||
|
msgid "Font Lock Mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
msgid "How modes can highlight text according to syntax."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3717
|
|||
|
#, no-wrap
|
|||
|
msgid "Auto-Indentation"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
msgid "How to teach Emacs to indent for a major mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: section
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4437
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4438
|
|||
|
#, no-wrap
|
|||
|
msgid "Desktop Save Mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:32
|
|||
|
msgid "How modes can have buffer state saved between Emacs sessions."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:36
|
|||
|
#, no-wrap
|
|||
|
msgid "hooks"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:44
|
|||
|
msgid ""
|
|||
|
"A @dfn{hook} is a variable where you can store a function or functions "
|
|||
|
"(@pxref{What Is a Function}) to be called on a particular occasion by an "
|
|||
|
"existing program. Emacs provides hooks for the sake of customization. Most "
|
|||
|
"often, hooks are set up in the init file (@pxref{Init File}), but Lisp "
|
|||
|
"programs can set them also. @xref{Standard Hooks}, for a list of some "
|
|||
|
"standard hook variables."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:45
|
|||
|
#, no-wrap
|
|||
|
msgid "normal hook"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:51
|
|||
|
msgid ""
|
|||
|
"Most of the hooks in Emacs are @dfn{normal hooks}. These variables contain "
|
|||
|
"lists of functions to be called with no arguments. By convention, whenever "
|
|||
|
"the hook name ends in @samp{-hook}, that tells you it is normal. We try to "
|
|||
|
"make all hooks normal, as much as possible, so that you can use them in a "
|
|||
|
"uniform way."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:59
|
|||
|
msgid ""
|
|||
|
"Every major mode command is supposed to run a normal hook called the "
|
|||
|
"@dfn{mode hook} as one of the last steps of initialization. This makes it "
|
|||
|
"easy for a user to customize the behavior of the mode, by overriding the "
|
|||
|
"buffer-local variable assignments already made by the mode. Most minor mode "
|
|||
|
"functions also run a mode hook at the end. But hooks are used in other "
|
|||
|
"contexts too. For example, the hook @code{suspend-hook} runs just before "
|
|||
|
"Emacs suspends itself (@pxref{Suspending Emacs})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:60
|
|||
|
#, no-wrap
|
|||
|
msgid "abnormal hook"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:69
|
|||
|
msgid ""
|
|||
|
"If the hook variable's name does not end with @samp{-hook}, that indicates "
|
|||
|
"it is probably an @dfn{abnormal hook}. These differ from normal hooks in "
|
|||
|
"two ways: they can be called with one or more arguments, and their return "
|
|||
|
"values can be used in some way. The hook's documentation says how the "
|
|||
|
"functions are called and how their return values are used. Any functions "
|
|||
|
"added to an abnormal hook must follow the hook's calling convention. By "
|
|||
|
"convention, abnormal hook names end in @samp{-functions}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:70
|
|||
|
#, no-wrap
|
|||
|
msgid "single-function hook"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:76
|
|||
|
msgid ""
|
|||
|
"If the name of the variable ends in @samp{-predicate} or @samp{-function} "
|
|||
|
"(singular) then its value must be a function, not a list of functions. As "
|
|||
|
"with abnormal hooks, the expected arguments and meaning of the return value "
|
|||
|
"vary across such @emph{single function hooks}. The details are explained in "
|
|||
|
"each variable's docstring."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:91
|
|||
|
msgid ""
|
|||
|
"Since hooks (both multi and single function) are variables, their values can "
|
|||
|
"be modified with @code{setq} or temporarily with @code{let}. However, it is "
|
|||
|
"often useful to add or remove a particular function from a hook while "
|
|||
|
"preserving any other functions it might have. For multi function hooks, the "
|
|||
|
"recommended way of doing this is with @code{add-hook} and @code{remove-hook} "
|
|||
|
"(@pxref{Setting Hooks}). Most normal hook variables are initially void; "
|
|||
|
"@code{add-hook} knows how to deal with this. You can add hooks either "
|
|||
|
"globally or buffer-locally with @code{add-hook}. For hooks which hold only "
|
|||
|
"a single function, @code{add-hook} is not appropriate, but you can use "
|
|||
|
"@code{add-function} (@pxref{Advising Functions}) to combine new functions "
|
|||
|
"with the hook. Note that some single function hooks may be @code{nil} which "
|
|||
|
"@code{add-function} cannot deal with, so you must check for that before "
|
|||
|
"calling @code{add-function}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:95
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:97
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:98
|
|||
|
#, no-wrap
|
|||
|
msgid "Running Hooks"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:95
|
|||
|
msgid "How to run a hook."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:95
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:146
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:147
|
|||
|
#, no-wrap
|
|||
|
msgid "Setting Hooks"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:95
|
|||
|
msgid "How to put functions on a hook, or remove them."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:103
|
|||
|
msgid ""
|
|||
|
"In this section, we document the @code{run-hooks} function, which is used to "
|
|||
|
"run a normal hook. We also document the functions for running various kinds "
|
|||
|
"of abnormal hooks."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:104
|
|||
|
#, no-wrap
|
|||
|
msgid "run-hooks &rest hookvars"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:109
|
|||
|
msgid ""
|
|||
|
"This function takes one or more normal hook variable names as arguments, and "
|
|||
|
"runs each hook in turn. Each argument should be a symbol that is a normal "
|
|||
|
"hook variable. These arguments are processed in the order specified."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:113
|
|||
|
msgid ""
|
|||
|
"If a hook variable has a non-@code{nil} value, that value should be a list "
|
|||
|
"of functions. @code{run-hooks} calls all the functions, one by one, with no "
|
|||
|
"arguments."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:117
|
|||
|
msgid ""
|
|||
|
"The hook variable's value can also be a single function---either a lambda "
|
|||
|
"expression or a symbol with a function definition---which @code{run-hooks} "
|
|||
|
"calls. But this usage is obsolete."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:122
|
|||
|
msgid ""
|
|||
|
"If the hook variable is buffer-local, the buffer-local variable will be used "
|
|||
|
"instead of the global variable. However, if the buffer-local variable "
|
|||
|
"contains the element @code{t}, the global hook variable will be run as well."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:124
|
|||
|
#, no-wrap
|
|||
|
msgid "run-hook-with-args hook &rest args"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:127
|
|||
|
msgid ""
|
|||
|
"This function runs an abnormal hook by calling all the hook functions in "
|
|||
|
"@var{hook}, passing each one the arguments @var{args}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:129
|
|||
|
#, no-wrap
|
|||
|
msgid "run-hook-with-args-until-failure hook &rest args"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:135
|
|||
|
msgid ""
|
|||
|
"This function runs an abnormal hook by calling each hook function in turn, "
|
|||
|
"stopping if one of them fails by returning @code{nil}. Each hook function "
|
|||
|
"is passed the arguments @var{args}. If this function stops because one of "
|
|||
|
"the hook functions fails, it returns @code{nil}; otherwise it returns a "
|
|||
|
"non-@code{nil} value."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:137
|
|||
|
#, no-wrap
|
|||
|
msgid "run-hook-with-args-until-success hook &rest args"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:144
|
|||
|
msgid ""
|
|||
|
"This function runs an abnormal hook by calling each hook function, stopping "
|
|||
|
"if one of them succeeds by returning a non-@code{nil} value. Each hook "
|
|||
|
"function is passed the arguments @var{args}. If this function stops because "
|
|||
|
"one of the hook functions returns a non-@code{nil} value, it returns that "
|
|||
|
"value; otherwise it returns @code{nil}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:151
|
|||
|
msgid ""
|
|||
|
"Here's an example that adds a function to a mode hook to turn on Auto Fill "
|
|||
|
"mode when in Lisp Interaction mode:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:154
|
|||
|
#, no-wrap
|
|||
|
msgid "(add-hook 'lisp-interaction-mode-hook 'auto-fill-mode)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:161
|
|||
|
msgid ""
|
|||
|
"The value of a hook variable should be a list of functions. You can "
|
|||
|
"manipulate that list using the normal Lisp facilities, but the modular way "
|
|||
|
"is to use the functions @code{add-hook} and @code{remove-hook}, defined "
|
|||
|
"below. They take care to handle some unusual situations and avoid problems."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:168
|
|||
|
msgid ""
|
|||
|
"It works to put a @code{lambda}-expression function on a hook, but we "
|
|||
|
"recommend avoiding this because it can lead to confusion. If you add the "
|
|||
|
"same @code{lambda}-expression a second time but write it slightly "
|
|||
|
"differently, you will get two equivalent but distinct functions on the "
|
|||
|
"hook. If you then remove one of them, the other will still be on it."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:169
|
|||
|
#, no-wrap
|
|||
|
msgid "add-hook hook function &optional depth local"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:174
|
|||
|
msgid ""
|
|||
|
"This function is the handy way to add function @var{function} to hook "
|
|||
|
"variable @var{hook}. You can use it for abnormal hooks as well as for "
|
|||
|
"normal hooks. @var{function} can be any Lisp function that can accept the "
|
|||
|
"proper number of arguments for @var{hook}. For example,"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:177
|
|||
|
#, no-wrap
|
|||
|
msgid "(add-hook 'text-mode-hook 'my-text-hook-function)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:181
|
|||
|
msgid "adds @code{my-text-hook-function} to the hook called @code{text-mode-hook}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:184
|
|||
|
msgid ""
|
|||
|
"If @var{function} is already present in @var{hook} (comparing using "
|
|||
|
"@code{equal}), then @code{add-hook} does not add it a second time."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:189
|
|||
|
msgid ""
|
|||
|
"If @var{function} has a non-@code{nil} property @code{permanent-local-hook}, "
|
|||
|
"then @code{kill-all-local-variables} (or changing major modes) won't delete "
|
|||
|
"it from the hook variable's local value."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:195
|
|||
|
msgid ""
|
|||
|
"For a normal hook, hook functions should be designed so that the order in "
|
|||
|
"which they are executed does not matter. Any dependence on the order is "
|
|||
|
"asking for trouble. However, the order is predictable: normally, "
|
|||
|
"@var{function} goes at the front of the hook list, so it is executed first "
|
|||
|
"(barring another @code{add-hook} call)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:206
|
|||
|
msgid ""
|
|||
|
"In some cases, it is important to control the relative ordering of functions "
|
|||
|
"on the hook. The optional argument @var{depth} lets you indicate where the "
|
|||
|
"function should be inserted in the list: it should then be a number between "
|
|||
|
"-100 and 100 where the higher the value, the closer to the end of the list "
|
|||
|
"the function should go. The @var{depth} defaults to 0 and for backward "
|
|||
|
"compatibility when @var{depth} is a non-nil symbol it is interpreted as a "
|
|||
|
"depth of 90. Furthermore, when @var{depth} is strictly greater than 0 the "
|
|||
|
"function is added @emph{after} rather than before functions of the same "
|
|||
|
"depth. One should never use a depth of 100 (or -100), because one can never "
|
|||
|
"be sure that no other function will ever need to come before (or after) us."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:210
|
|||
|
msgid ""
|
|||
|
"@code{add-hook} can handle the cases where @var{hook} is void or its value "
|
|||
|
"is a single function; it sets or changes the value to a list of functions."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:216
|
|||
|
msgid ""
|
|||
|
"If @var{local} is non-@code{nil}, that says to add @var{function} to the "
|
|||
|
"buffer-local hook list instead of to the global hook list. This makes the "
|
|||
|
"hook buffer-local and adds @code{t} to the buffer-local value. The latter "
|
|||
|
"acts as a flag to run the hook functions in the default value as well as in "
|
|||
|
"the local value."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:218
|
|||
|
#, no-wrap
|
|||
|
msgid "remove-hook hook function &optional local"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:223
|
|||
|
msgid ""
|
|||
|
"This function removes @var{function} from the hook variable @var{hook}. It "
|
|||
|
"compares @var{function} with elements of @var{hook} using @code{equal}, so "
|
|||
|
"it works for both symbols and lambda expressions."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:226
|
|||
|
msgid ""
|
|||
|
"If @var{local} is non-@code{nil}, that says to remove @var{function} from "
|
|||
|
"the buffer-local hook list instead of from the global hook list."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:230
|
|||
|
#, no-wrap
|
|||
|
msgid "major mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:232
|
|||
|
#, no-wrap
|
|||
|
msgid "major mode command"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:233
|
|||
|
#, no-wrap
|
|||
|
msgid "suspend major mode temporarily"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:244
|
|||
|
msgid ""
|
|||
|
"Major modes specialize Emacs for editing or interacting with particular "
|
|||
|
"kinds of text. Each buffer has exactly one major mode at a time. Every "
|
|||
|
"major mode is associated with a @dfn{major mode command}, whose name should "
|
|||
|
"end in @samp{-mode}. This command takes care of switching to that mode in "
|
|||
|
"the current buffer, by setting various buffer-local variables such as a "
|
|||
|
"local keymap. @xref{Major Mode Conventions}. Note that unlike minor modes "
|
|||
|
"there is no way to ``turn off'' a major mode, instead the buffer must be "
|
|||
|
"switched to a different one. However, you can temporarily @dfn{suspend} a "
|
|||
|
"major mode and later @dfn{restore} the suspended mode, see below."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:247
|
|||
|
msgid ""
|
|||
|
"The least specialized major mode is called @dfn{Fundamental mode}, which has "
|
|||
|
"no mode-specific definitions or variable settings."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:248
|
|||
|
#, no-wrap
|
|||
|
msgid "Command fundamental-mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:252
|
|||
|
msgid ""
|
|||
|
"This is the major mode command for Fundamental mode. Unlike other mode "
|
|||
|
"commands, it does @emph{not} run any mode hooks (@pxref{Major Mode "
|
|||
|
"Conventions}), since you are not supposed to customize this mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:254
|
|||
|
#, no-wrap
|
|||
|
msgid "major-mode-suspend"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:262
|
|||
|
msgid ""
|
|||
|
"This function works like @code{fundamental-mode}, in that it kills all "
|
|||
|
"buffer-local variables, but it also records the major mode in effect, so "
|
|||
|
"that it could subsequently be restored. This function and "
|
|||
|
"@code{major-mode-restore} (described next) are useful when you need to put a "
|
|||
|
"buffer under some specialized mode other than the one Emacs chooses for it "
|
|||
|
"automatically (@pxref{Auto Major Mode}), but would also like to be able to "
|
|||
|
"switch back to the original mode later."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:264
|
|||
|
#, no-wrap
|
|||
|
msgid "major-mode-restore &optional avoided-modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:270
|
|||
|
msgid ""
|
|||
|
"This function restores the major mode recorded by "
|
|||
|
"@code{major-mode-suspend}. If no major mode was recorded, this function "
|
|||
|
"calls @code{normal-mode} (@pxref{Auto Major Mode, normal-mode}), but tries "
|
|||
|
"to force it not to choose any modes in @var{avoided-modes}, if that argument "
|
|||
|
"is non-@code{nil}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:272
|
|||
|
#, no-wrap
|
|||
|
msgid "clean-mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:282
|
|||
|
msgid ""
|
|||
|
"Changing the major mode clears out most local variables, but it doesn't "
|
|||
|
"remove all artefacts in the buffer (like text properties and overlays). "
|
|||
|
"It's rare to change a buffer from one major mode to another (except from "
|
|||
|
"@code{fundamental-mode} to everything else), so this is usually not a "
|
|||
|
"concern. It can sometimes be convenient (mostly when debugging a problem in "
|
|||
|
"a buffer) to do a ``full reset'' of the buffer, and that's what the "
|
|||
|
"@code{clean-mode} major mode offers. It will kill all local variables (even "
|
|||
|
"the permanently local ones), and also removes all overlays and text "
|
|||
|
"properties."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:291
|
|||
|
msgid ""
|
|||
|
"The easiest way to write a major mode is to use the macro "
|
|||
|
"@code{define-derived-mode}, which sets up the new mode as a variant of an "
|
|||
|
"existing major mode. @xref{Derived Modes}. We recommend using "
|
|||
|
"@code{define-derived-mode} even if the new mode is not an obvious derivative "
|
|||
|
"of another mode, as it automatically enforces many coding conventions for "
|
|||
|
"you. @xref{Basic Major Modes}, for common modes to derive from."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:296
|
|||
|
msgid ""
|
|||
|
"The standard GNU Emacs Lisp directory tree contains the code for several "
|
|||
|
"major modes, in files such as @file{text-mode.el}, @file{texinfo.el}, "
|
|||
|
"@file{lisp-mode.el}, and @file{rmail.el}. You can study these libraries to "
|
|||
|
"see how modes are written."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:297
|
|||
|
#, no-wrap
|
|||
|
msgid "major-mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:301
|
|||
|
msgid ""
|
|||
|
"The buffer-local value of this variable holds the symbol for the current "
|
|||
|
"major mode. Its default value holds the default major mode for new "
|
|||
|
"buffers. The standard default value is @code{fundamental-mode}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:308
|
|||
|
msgid ""
|
|||
|
"If the default value is @code{nil}, then whenever Emacs creates a new buffer "
|
|||
|
"via a command such as @kbd{C-x b} (@code{switch-to-buffer}), the new buffer "
|
|||
|
"is put in the major mode of the previously current buffer. As an exception, "
|
|||
|
"if the major mode of the previous buffer has a @code{mode-class} symbol "
|
|||
|
"property with value @code{special}, the new buffer is put in Fundamental "
|
|||
|
"mode (@pxref{Major Mode Conventions})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:324
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:325
|
|||
|
#, no-wrap
|
|||
|
msgid "Major Mode Conventions"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
msgid "Coding conventions for keymaps, etc."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:613
|
|||
|
#, no-wrap
|
|||
|
msgid "Auto Major Mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
msgid "How Emacs chooses the major mode automatically."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:784
|
|||
|
#, no-wrap
|
|||
|
msgid "Mode Help"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
msgid "Finding out how to use a mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:806
|
|||
|
#, no-wrap
|
|||
|
msgid "Derived Modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
msgid "Defining a new major mode based on another major mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:939
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:940
|
|||
|
#, no-wrap
|
|||
|
msgid "Basic Major Modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
msgid "Modes that other modes are often derived from."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:995
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:996
|
|||
|
#, no-wrap
|
|||
|
msgid "Mode Hooks"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
msgid "Hooks run at the end of major mode functions."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1058
|
|||
|
#, no-wrap
|
|||
|
msgid "Tabulated List Mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
msgid "Parent mode for buffers containing tabulated data."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1283
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1284
|
|||
|
#, no-wrap
|
|||
|
msgid "Generic Modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
msgid ""
|
|||
|
"Defining a simple major mode that supports comment syntax and Font Lock "
|
|||
|
"mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1324
|
|||
|
#, no-wrap
|
|||
|
msgid "Example Major Modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:322
|
|||
|
msgid "Text mode and Lisp modes."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:326
|
|||
|
#, no-wrap
|
|||
|
msgid "major mode conventions"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:327
|
|||
|
#, no-wrap
|
|||
|
msgid "conventions for writing major modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:332
|
|||
|
msgid ""
|
|||
|
"The code for every major mode should follow various coding conventions, "
|
|||
|
"including conventions for local keymap and syntax table initialization, "
|
|||
|
"function and variable names, and hooks."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:337
|
|||
|
msgid ""
|
|||
|
"If you use the @code{define-derived-mode} macro, it will take care of many "
|
|||
|
"of these conventions automatically. @xref{Derived Modes}. Note also that "
|
|||
|
"Fundamental mode is an exception to many of these conventions, because it "
|
|||
|
"represents the default state of Emacs."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:344
|
|||
|
msgid ""
|
|||
|
"The following list of conventions is only partial. Each major mode should "
|
|||
|
"aim for consistency in general with other Emacs major modes, as this makes "
|
|||
|
"Emacs as a whole more coherent. It is impossible to list here all the "
|
|||
|
"possible points where this issue might come up; if the Emacs developers "
|
|||
|
"point out an area where your major mode deviates from the usual conventions, "
|
|||
|
"please make it compatible."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:352
|
|||
|
msgid ""
|
|||
|
"Define a major mode command whose name ends in @samp{-mode}. When called "
|
|||
|
"with no arguments, this command should switch to the new mode in the current "
|
|||
|
"buffer by setting up the keymap, syntax table, and buffer-local variables in "
|
|||
|
"an existing buffer. It should not change the buffer's contents."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:356
|
|||
|
msgid ""
|
|||
|
"Write a documentation string for this command that describes the special "
|
|||
|
"commands available in this mode. @xref{Mode Help}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:362
|
|||
|
msgid ""
|
|||
|
"The documentation string may include the special documentation substrings, "
|
|||
|
"@samp{\\[@var{command}]}, @samp{\\@{@var{keymap}@}}, and "
|
|||
|
"@samp{\\<@var{keymap}>}, which allow the help display to adapt automatically "
|
|||
|
"to the user's own key bindings. @xref{Keys in Documentation}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:369
|
|||
|
msgid ""
|
|||
|
"The major mode command should start by calling "
|
|||
|
"@code{kill-all-local-variables}. This runs the normal hook "
|
|||
|
"@code{change-major-mode-hook}, then gets rid of the buffer-local variables "
|
|||
|
"of the major mode previously in effect. @xref{Creating Buffer-Local}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:374
|
|||
|
msgid ""
|
|||
|
"The major mode command should set the variable @code{major-mode} to the "
|
|||
|
"major mode command symbol. This is how @code{describe-mode} discovers which "
|
|||
|
"documentation to print."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:380
|
|||
|
msgid ""
|
|||
|
"The major mode command should set the variable @code{mode-name} to the "
|
|||
|
"``pretty'' name of the mode, usually a string (but see @ref{Mode Line Data}, "
|
|||
|
"for other possible forms). The name of the mode appears in the mode line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:385
|
|||
|
msgid ""
|
|||
|
"Calling the major mode command twice in direct succession should not fail "
|
|||
|
"and should do the same thing as calling the command only once. In other "
|
|||
|
"words, the major mode command should be idempotent."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:387
|
|||
|
#, no-wrap
|
|||
|
msgid "functions in modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:392
|
|||
|
msgid ""
|
|||
|
"Since all global names are in the same name space, all the global variables, "
|
|||
|
"constants, and functions that are part of the mode should have names that "
|
|||
|
"start with the major mode name (or with an abbreviation of it if the name is "
|
|||
|
"long). @xref{Coding Conventions}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:399
|
|||
|
msgid ""
|
|||
|
"In a major mode for editing some kind of structured text, such as a "
|
|||
|
"programming language, indentation of text according to structure is probably "
|
|||
|
"useful. So the mode should set @code{indent-line-function} to a suitable "
|
|||
|
"function, and probably customize other variables for indentation. "
|
|||
|
"@xref{Auto-Indentation}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:401
|
|||
|
#, no-wrap
|
|||
|
msgid "keymaps in modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:406
|
|||
|
msgid ""
|
|||
|
"The major mode should usually have its own keymap, which is used as the "
|
|||
|
"local keymap in all buffers in that mode. The major mode command should "
|
|||
|
"call @code{use-local-map} to install this local map. @xref{Active Keymaps}, "
|
|||
|
"for more information."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:410
|
|||
|
msgid ""
|
|||
|
"This keymap should be stored permanently in a global variable named "
|
|||
|
"@code{@var{modename}-mode-map}. Normally the library that defines the mode "
|
|||
|
"sets this variable."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:413
|
|||
|
msgid ""
|
|||
|
"@xref{Tips for Defining}, for advice about how to write the code to set up "
|
|||
|
"the mode's keymap variable."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:420
|
|||
|
msgid ""
|
|||
|
"The key sequences bound in a major mode keymap should usually start with "
|
|||
|
"@kbd{C-c}, followed by a control character, a digit, or @kbd{@{}, @kbd{@}}, "
|
|||
|
"@kbd{<}, @kbd{>}, @kbd{:} or @kbd{;}. The other punctuation characters are "
|
|||
|
"reserved for minor modes, and ordinary letters are reserved for users."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:425
|
|||
|
msgid ""
|
|||
|
"A major mode can also rebind the keys @kbd{M-n}, @kbd{M-p} and @kbd{M-s}. "
|
|||
|
"The bindings for @kbd{M-n} and @kbd{M-p} should normally be some kind of "
|
|||
|
"moving forward and backward, but this does not necessarily mean cursor "
|
|||
|
"motion."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:434
|
|||
|
msgid ""
|
|||
|
"It is legitimate for a major mode to rebind a standard key sequence if it "
|
|||
|
"provides a command that does the same job in a way better suited to the text "
|
|||
|
"this mode is used for. For example, a major mode for editing a programming "
|
|||
|
"language might redefine @kbd{C-M-a} to move to the beginning of a function "
|
|||
|
"in a way that works better for that language. The recommended way of "
|
|||
|
"tailoring @kbd{C-M-a} to the needs of a major mode is to set "
|
|||
|
"@code{beginning-of-defun-function} (@pxref{List Motion}) to invoke the "
|
|||
|
"function specific to the mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:441
|
|||
|
msgid ""
|
|||
|
"It is also legitimate for a major mode to rebind a standard key sequence "
|
|||
|
"whose standard meaning is rarely useful in that mode. For instance, "
|
|||
|
"minibuffer modes rebind @kbd{M-r}, whose standard meaning is rarely of any "
|
|||
|
"use in the minibuffer. Major modes such as Dired or Rmail that do not allow "
|
|||
|
"self-insertion of text can reasonably redefine letters and other printing "
|
|||
|
"characters as special commands."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:448
|
|||
|
msgid ""
|
|||
|
"Major modes for editing text should not define @key{RET} to do anything "
|
|||
|
"other than insert a newline. However, it is ok for specialized modes for "
|
|||
|
"text that users don't directly edit, such as Dired and Info modes, to "
|
|||
|
"redefine @key{RET} to do something entirely different."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:455
|
|||
|
msgid ""
|
|||
|
"Major modes should not alter options that are primarily a matter of user "
|
|||
|
"preference, such as whether Auto-Fill mode is enabled. Leave this to each "
|
|||
|
"user to decide. However, a major mode should customize other variables so "
|
|||
|
"that Auto-Fill mode will work usefully @emph{if} the user decides to use it."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:457
|
|||
|
#, no-wrap
|
|||
|
msgid "syntax tables in modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:462
|
|||
|
msgid ""
|
|||
|
"The mode may have its own syntax table or may share one with other related "
|
|||
|
"modes. If it has its own syntax table, it should store this in a variable "
|
|||
|
"named @code{@var{modename}-mode-syntax-table}. @xref{Syntax Tables}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:467
|
|||
|
msgid ""
|
|||
|
"If the mode handles a language that has a syntax for comments, it should set "
|
|||
|
"the variables that define the comment syntax. @xref{Options for Comments,, "
|
|||
|
"Options Controlling Comments, emacs, The GNU Emacs Manual}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:469
|
|||
|
#, no-wrap
|
|||
|
msgid "abbrev tables in modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:476
|
|||
|
msgid ""
|
|||
|
"The mode may have its own abbrev table or may share one with other related "
|
|||
|
"modes. If it has its own abbrev table, it should store this in a variable "
|
|||
|
"named @code{@var{modename}-mode-abbrev-table}. If the major mode command "
|
|||
|
"defines any abbrevs itself, it should pass @code{t} for the "
|
|||
|
"@var{system-flag} argument to @code{define-abbrev}. @xref{Defining "
|
|||
|
"Abbrevs}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:481
|
|||
|
msgid ""
|
|||
|
"The mode should specify how to do highlighting for Font Lock mode, by "
|
|||
|
"setting up a buffer-local value for the variable @code{font-lock-defaults} "
|
|||
|
"(@pxref{Font Lock Mode})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:485
|
|||
|
msgid ""
|
|||
|
"Each face that the mode defines should, if possible, inherit from an "
|
|||
|
"existing Emacs face. @xref{Basic Faces}, and @ref{Faces for Font Lock}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:491
|
|||
|
msgid ""
|
|||
|
"Consider adding a mode-specific menu to the menu bar. This should "
|
|||
|
"preferably include the most important menu-specific settings and commands "
|
|||
|
"that will allow users discovering the main features quickly and efficiently."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:493
|
|||
|
#, no-wrap
|
|||
|
msgid "context menus, for a major mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:494
|
|||
|
#, no-wrap
|
|||
|
msgid "context-menu-functions"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:501
|
|||
|
msgid ""
|
|||
|
"Consider adding mode-specific context menus for the mode, to be used if and "
|
|||
|
"when users activate the @code{context-menu-mode} (@pxref{Menu Mouse "
|
|||
|
"Clicks,,, emacs, The Emacs Manual}). To this end, define a mode-specific "
|
|||
|
"function which builds one or more menus depending on the location of the "
|
|||
|
"@kbd{mouse-3} click in the buffer, and then add that function to the "
|
|||
|
"buffer-local value of @code{context-menu-functions}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:509
|
|||
|
msgid ""
|
|||
|
"The mode should specify how Imenu should find the definitions or sections of "
|
|||
|
"a buffer, by setting up a buffer-local value for the variable "
|
|||
|
"@code{imenu-generic-expression}, for the two variables "
|
|||
|
"@code{imenu-prev-index-position-function} and "
|
|||
|
"@code{imenu-extract-index-name-function}, or for the variable "
|
|||
|
"@code{imenu-create-index-function} (@pxref{Imenu})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:515
|
|||
|
msgid ""
|
|||
|
"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}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:520
|
|||
|
msgid ""
|
|||
|
"The mode can specify how to complete various keywords by adding one or more "
|
|||
|
"buffer-local entries to the special hook "
|
|||
|
"@code{completion-at-point-functions}. @xref{Completion in Buffers}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:522
|
|||
|
#, no-wrap
|
|||
|
msgid "buffer-local variables in modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:529
|
|||
|
msgid ""
|
|||
|
"To make a buffer-local binding for an Emacs customization variable, use "
|
|||
|
"@code{make-local-variable} in the major mode command, not "
|
|||
|
"@code{make-variable-buffer-local}. The latter function would make the "
|
|||
|
"variable local to every buffer in which it is subsequently set, which would "
|
|||
|
"affect buffers that do not use this mode. It is undesirable for a mode to "
|
|||
|
"have such global effects. @xref{Buffer-Local Variables}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:534
|
|||
|
msgid ""
|
|||
|
"With rare exceptions, the only reasonable way to use "
|
|||
|
"@code{make-variable-buffer-local} in a Lisp package is for a variable which "
|
|||
|
"is used only within that package. Using it on a variable used by other "
|
|||
|
"packages would interfere with them."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:536
|
|||
|
#, no-wrap
|
|||
|
msgid "mode hook"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:537
|
|||
|
#, no-wrap
|
|||
|
msgid "major mode hook"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:545
|
|||
|
msgid ""
|
|||
|
"Each major mode should have a normal @dfn{mode hook} named "
|
|||
|
"@code{@var{modename}-mode-hook}. The very last thing the major mode command "
|
|||
|
"should do is to call @code{run-mode-hooks}. This runs the normal hook "
|
|||
|
"@code{change-major-mode-after-body-hook}, the mode hook, the function "
|
|||
|
"@code{hack-local-variables} (when the buffer is visiting a file), and then "
|
|||
|
"the normal hook @code{after-change-major-mode-hook}. @xref{Mode Hooks}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:555
|
|||
|
msgid ""
|
|||
|
"The major mode command may start by calling some other major mode command "
|
|||
|
"(called the @dfn{parent mode}) and then alter some of its settings. A mode "
|
|||
|
"that does this is called a @dfn{derived mode}. The recommended way to "
|
|||
|
"define one is to use the @code{define-derived-mode} macro, but this is not "
|
|||
|
"required. Such a mode should call the parent mode command inside a "
|
|||
|
"@code{delay-mode-hooks} form. (Using @code{define-derived-mode} does this "
|
|||
|
"automatically.) @xref{Derived Modes}, and @ref{Mode Hooks}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:560
|
|||
|
msgid ""
|
|||
|
"If something special should be done if the user switches a buffer from this "
|
|||
|
"mode to any other major mode, this mode can set up a buffer-local value for "
|
|||
|
"@code{change-major-mode-hook} (@pxref{Creating Buffer-Local})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:567
|
|||
|
msgid ""
|
|||
|
"If this mode is appropriate only for specially-prepared text produced by the "
|
|||
|
"mode itself (rather than by the user typing at the keyboard or by an "
|
|||
|
"external file), then the major mode command symbol should have a property "
|
|||
|
"named @code{mode-class} with value @code{special}, put on as follows:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: kindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:568
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-class @r{(property)}"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:569
|
|||
|
#, no-wrap
|
|||
|
msgid "@code{special} modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:572
|
|||
|
#, no-wrap
|
|||
|
msgid "(put 'funny-mode 'mode-class 'special)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:582
|
|||
|
msgid ""
|
|||
|
"This tells Emacs that new buffers created while the current buffer is in "
|
|||
|
"Funny mode should not be put in Funny mode, even though the default value of "
|
|||
|
"@code{major-mode} is @code{nil}. By default, the value of @code{nil} for "
|
|||
|
"@code{major-mode} means to use the current buffer's major mode when creating "
|
|||
|
"new buffers (@pxref{Auto Major Mode}), but with such @code{special} modes, "
|
|||
|
"Fundamental mode is used instead. Modes such as Dired, Rmail, and Buffer "
|
|||
|
"List use this feature."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:586
|
|||
|
msgid ""
|
|||
|
"The function @code{view-buffer} does not enable View mode in buffers whose "
|
|||
|
"mode-class is special, because such modes usually provide their own "
|
|||
|
"View-like bindings."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:591
|
|||
|
msgid ""
|
|||
|
"The @code{define-derived-mode} macro automatically marks the derived mode as "
|
|||
|
"special if the parent mode is special. Special mode is a convenient parent "
|
|||
|
"for such modes to inherit from; @xref{Basic Major Modes}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:602
|
|||
|
msgid ""
|
|||
|
"If you want to make the new mode the default for files with certain "
|
|||
|
"recognizable names, add an element to @code{auto-mode-alist} to select the "
|
|||
|
"mode for those file names (@pxref{Auto Major Mode}). If you define the mode "
|
|||
|
"command to autoload, you should add this element in the same file that calls "
|
|||
|
"@code{autoload}. If you use an autoload cookie for the mode command, you "
|
|||
|
"can also use an autoload cookie for the form that adds the element "
|
|||
|
"(@pxref{autoload cookie}). If you do not autoload the mode command, it is "
|
|||
|
"sufficient to add the element in the file that contains the mode definition."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:604
|
|||
|
#, no-wrap
|
|||
|
msgid "mode loading"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:610
|
|||
|
msgid ""
|
|||
|
"The top-level forms in the file defining the mode should be written so that "
|
|||
|
"they may be evaluated more than once without adverse consequences. For "
|
|||
|
"instance, use @code{defvar} or @code{defcustom} to set mode-related "
|
|||
|
"variables, so that they are not reinitialized if they already have a value "
|
|||
|
"(@pxref{Defining Variables})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:614
|
|||
|
#, no-wrap
|
|||
|
msgid "How Emacs Chooses a Major Mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:615
|
|||
|
#, no-wrap
|
|||
|
msgid "major mode, automatic selection"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:620
|
|||
|
msgid ""
|
|||
|
"When Emacs visits a file, it automatically selects a major mode for the "
|
|||
|
"buffer based on information in the file name or in the file itself. It also "
|
|||
|
"processes local variables specified in the file text."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:621
|
|||
|
#, no-wrap
|
|||
|
msgid "Command normal-mode &optional find-file"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:628
|
|||
|
msgid ""
|
|||
|
"This function establishes the proper major mode and buffer-local variable "
|
|||
|
"bindings for the current buffer. It calls @code{set-auto-mode} (see "
|
|||
|
"below). As of Emacs 26.1, it no longer runs @code{hack-local-variables}, "
|
|||
|
"this now being done in @code{run-mode-hooks} at the initialization of major "
|
|||
|
"modes (@pxref{Mode Hooks})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:636
|
|||
|
msgid ""
|
|||
|
"If the @var{find-file} argument to @code{normal-mode} is non-@code{nil}, "
|
|||
|
"@code{normal-mode} assumes that the @code{find-file} function is calling "
|
|||
|
"it. In this case, it may process local variables in the @samp{-*-} line or "
|
|||
|
"at the end of the file. The variable @code{enable-local-variables} controls "
|
|||
|
"whether to do so. @xref{File Variables, , Local Variables in Files, emacs, "
|
|||
|
"The GNU Emacs Manual}, for the syntax of the local variables section of a "
|
|||
|
"file."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:640
|
|||
|
msgid ""
|
|||
|
"If you run @code{normal-mode} interactively, the argument @var{find-file} is "
|
|||
|
"normally @code{nil}. In this case, @code{normal-mode} unconditionally "
|
|||
|
"processes any file local variables."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:644
|
|||
|
msgid ""
|
|||
|
"The function calls @code{set-auto-mode} to choose and set a major mode. If "
|
|||
|
"this does not specify a mode, the buffer stays in the major mode determined "
|
|||
|
"by the default value of @code{major-mode} (see below)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:645
|
|||
|
#, no-wrap
|
|||
|
msgid "file mode specification error"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:649
|
|||
|
msgid ""
|
|||
|
"@code{normal-mode} uses @code{condition-case} around the call to the major "
|
|||
|
"mode command, so errors are caught and reported as a @samp{File mode "
|
|||
|
"specification error}, followed by the original error message."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:651
|
|||
|
#, no-wrap
|
|||
|
msgid "set-auto-mode &optional keep-mode-if-same"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:652
|
|||
|
#, no-wrap
|
|||
|
msgid "visited file mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:664
|
|||
|
msgid ""
|
|||
|
"This function selects and sets the major mode that is appropriate for the "
|
|||
|
"current buffer. It bases its decision (in order of precedence) on the "
|
|||
|
"@w{@samp{-*-}} line, on any @samp{mode:} local variable near the end of a "
|
|||
|
"file, on the @w{@samp{#!}} line (using @code{interpreter-mode-alist}), on "
|
|||
|
"the text at the beginning of the buffer (using @code{magic-mode-alist}), and "
|
|||
|
"finally on the visited file name (using @code{auto-mode-alist}). "
|
|||
|
"@xref{Choosing Modes, , How Major Modes are Chosen, emacs, The GNU Emacs "
|
|||
|
"Manual}. If @code{enable-local-variables} is @code{nil}, "
|
|||
|
"@code{set-auto-mode} does not check the @w{@samp{-*-}} line, or near the end "
|
|||
|
"of the file, for any mode tag."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:665
|
|||
|
#, no-wrap
|
|||
|
msgid "inhibit-local-variables-regexps"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:676
|
|||
|
msgid ""
|
|||
|
"There are some file types where it is not appropriate to scan the file "
|
|||
|
"contents for a mode specifier. For example, a tar archive may happen to "
|
|||
|
"contain, near the end of the file, a member file that has a local variables "
|
|||
|
"section specifying a mode for that particular file. This should not be "
|
|||
|
"applied to the containing tar file. Similarly, a tiff image file might just "
|
|||
|
"happen to contain a first line that seems to match the @w{@samp{-*-}} "
|
|||
|
"pattern. For these reasons, both these file extensions are members of the "
|
|||
|
"list @code{inhibit-local-variables-regexps}. Add patterns to this list to "
|
|||
|
"prevent Emacs searching them for local variables of any kind (not just mode "
|
|||
|
"specifiers)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:682
|
|||
|
msgid ""
|
|||
|
"If @var{keep-mode-if-same} is non-@code{nil}, this function does not call "
|
|||
|
"the mode command if the buffer is already in the proper major mode. For "
|
|||
|
"instance, @code{set-visited-file-name} sets this to @code{t} to avoid "
|
|||
|
"killing buffer local variables that the user may have set."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:684
|
|||
|
#, no-wrap
|
|||
|
msgid "set-buffer-major-mode buffer"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:690
|
|||
|
msgid ""
|
|||
|
"This function sets the major mode of @var{buffer} to the default value of "
|
|||
|
"@code{major-mode}; if that is @code{nil}, it uses the current buffer's major "
|
|||
|
"mode (if that is suitable). As an exception, if @var{buffer}'s name is "
|
|||
|
"@file{*scratch*}, it sets the mode to @code{initial-major-mode}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:694
|
|||
|
msgid ""
|
|||
|
"The low-level primitives for creating buffers do not use this function, but "
|
|||
|
"medium-level commands such as @code{switch-to-buffer} and "
|
|||
|
"@code{find-file-noselect} use it whenever they create buffers."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:696
|
|||
|
#, no-wrap
|
|||
|
msgid "initial-major-mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: file{#1}
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:697
|
|||
|
#, no-wrap
|
|||
|
msgid "*scratch*"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:701
|
|||
|
msgid ""
|
|||
|
"The value of this variable determines the major mode of the initial "
|
|||
|
"@file{*scratch*} buffer. The value should be a symbol that is a major mode "
|
|||
|
"command. The default value is @code{lisp-interaction-mode}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:703
|
|||
|
#, no-wrap
|
|||
|
msgid "interpreter-mode-alist"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:710
|
|||
|
msgid ""
|
|||
|
"This variable specifies major modes to use for scripts that specify a "
|
|||
|
"command interpreter in a @samp{#!} line. Its value is an alist with "
|
|||
|
"elements of the form @code{(@var{regexp} . @var{mode})}; this says to use "
|
|||
|
"mode @var{mode} if the file specifies an interpreter which matches "
|
|||
|
"@code{\\\\`@var{regexp}\\\\'}. For example, one of the default elements is "
|
|||
|
"@code{(\"python[0-9.]*\" . python-mode)}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:712
|
|||
|
#, no-wrap
|
|||
|
msgid "magic-mode-alist"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:720
|
|||
|
msgid ""
|
|||
|
"This variable's value is an alist with elements of the form "
|
|||
|
"@code{(@var{regexp} . @var{function})}, where @var{regexp} is a regular "
|
|||
|
"expression and @var{function} is a function or @code{nil}. After visiting a "
|
|||
|
"file, @code{set-auto-mode} calls @var{function} if the text at the beginning "
|
|||
|
"of the buffer matches @var{regexp} and @var{function} is non-@code{nil}; if "
|
|||
|
"@var{function} is @code{nil}, @code{auto-mode-alist} gets to decide the "
|
|||
|
"mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:722
|
|||
|
#, no-wrap
|
|||
|
msgid "magic-fallback-mode-alist"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:725
|
|||
|
msgid ""
|
|||
|
"This works like @code{magic-mode-alist}, except that it is handled only if "
|
|||
|
"@code{auto-mode-alist} does not specify a mode for this file."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:727
|
|||
|
#, no-wrap
|
|||
|
msgid "auto-mode-alist"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:733
|
|||
|
msgid ""
|
|||
|
"This variable contains an association list of file name patterns (regular "
|
|||
|
"expressions) and corresponding major mode commands. Usually, the file name "
|
|||
|
"patterns test for suffixes, such as @samp{.el} and @samp{.c}, but this need "
|
|||
|
"not be the case. An ordinary element of the alist looks like "
|
|||
|
"@code{(@var{regexp} . @var{mode-function})}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:735
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3133
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3153
|
|||
|
msgid "For example,"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:741
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"((\"\\\\`/tmp/fol/\" . text-mode)\n"
|
|||
|
" (\"\\\\.texinfo\\\\'\" . texinfo-mode)\n"
|
|||
|
" (\"\\\\.texi\\\\'\" . texinfo-mode)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:747
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" (\"\\\\.el\\\\'\" . emacs-lisp-mode)\n"
|
|||
|
" (\"\\\\.c\\\\'\" . c-mode)\n"
|
|||
|
" (\"\\\\.h\\\\'\" . c-mode)\n"
|
|||
|
" @dots{})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:756
|
|||
|
msgid ""
|
|||
|
"When you visit a file whose expanded file name (@pxref{File Name "
|
|||
|
"Expansion}), with version numbers and backup suffixes removed using "
|
|||
|
"@code{file-name-sans-versions} (@pxref{File Name Components}), matches a "
|
|||
|
"@var{regexp}, @code{set-auto-mode} calls the corresponding "
|
|||
|
"@var{mode-function}. This feature enables Emacs to select the proper major "
|
|||
|
"mode for most files."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:764
|
|||
|
msgid ""
|
|||
|
"If an element of @code{auto-mode-alist} has the form @code{(@var{regexp} "
|
|||
|
"@var{function} t)}, then after calling @var{function}, Emacs searches "
|
|||
|
"@code{auto-mode-alist} again for a match against the portion of the file "
|
|||
|
"name that did not match before. This feature is useful for uncompression "
|
|||
|
"packages: an entry of the form @code{(\"\\\\.gz\\\\'\" @var{function} t)} "
|
|||
|
"can uncompress the file and then put the uncompressed file in the proper "
|
|||
|
"mode according to the name sans @samp{.gz}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:768
|
|||
|
msgid ""
|
|||
|
"Here is an example of how to prepend several pattern pairs to "
|
|||
|
"@code{auto-mode-alist}. (You might use this sort of expression in your init "
|
|||
|
"file.)"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:780
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(setq auto-mode-alist\n"
|
|||
|
" (append\n"
|
|||
|
" ;; @r{File name (within directory) starts with a dot.}\n"
|
|||
|
" '((\"/\\\\.[^/]*\\\\'\" . fundamental-mode)\n"
|
|||
|
" ;; @r{File name has no dot.}\n"
|
|||
|
" (\"/[^\\\\./]*\\\\'\" . fundamental-mode)\n"
|
|||
|
" ;; @r{File name ends in @samp{.C}.}\n"
|
|||
|
" (\"\\\\.C\\\\'\" . c++-mode))\n"
|
|||
|
" auto-mode-alist))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:785
|
|||
|
#, no-wrap
|
|||
|
msgid "Getting Help about a Major Mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:786
|
|||
|
#, no-wrap
|
|||
|
msgid "mode help"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:787
|
|||
|
#, no-wrap
|
|||
|
msgid "help for major mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:788
|
|||
|
#, no-wrap
|
|||
|
msgid "documentation for major mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:794
|
|||
|
msgid ""
|
|||
|
"The @code{describe-mode} function provides information about major modes. "
|
|||
|
"It is normally bound to @kbd{C-h m}. It uses the value of the variable "
|
|||
|
"@code{major-mode} (@pxref{Major Modes}), which is why every major mode "
|
|||
|
"command needs to set that variable."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:795
|
|||
|
#, no-wrap
|
|||
|
msgid "Command describe-mode &optional buffer"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:800
|
|||
|
msgid ""
|
|||
|
"This command displays the documentation of the current buffer's major mode "
|
|||
|
"and minor modes. It uses the @code{documentation} function to retrieve the "
|
|||
|
"documentation strings of the major and minor mode commands (@pxref{Accessing "
|
|||
|
"Documentation})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:804
|
|||
|
msgid ""
|
|||
|
"If called from Lisp with a non-@code{nil} @var{buffer} argument, this "
|
|||
|
"function displays the documentation for that buffer's major and minor modes, "
|
|||
|
"rather than those of the current buffer."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:807
|
|||
|
#, no-wrap
|
|||
|
msgid "Defining Derived Modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:808
|
|||
|
#, no-wrap
|
|||
|
msgid "derived mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:816
|
|||
|
msgid ""
|
|||
|
"The recommended way to define a new major mode is to derive it from an "
|
|||
|
"existing one using @code{define-derived-mode}. If there is no closely "
|
|||
|
"related mode, you should inherit from either @code{text-mode}, "
|
|||
|
"@code{special-mode}, or @code{prog-mode}. @xref{Basic Major Modes}. If "
|
|||
|
"none of these are suitable, you can inherit from @code{fundamental-mode} "
|
|||
|
"(@pxref{Major Modes})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:817
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"define-derived-mode variant parent name docstring keyword-args@dots{} "
|
|||
|
"body@dots{}"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:821
|
|||
|
msgid ""
|
|||
|
"This macro defines @var{variant} as a major mode command, using @var{name} "
|
|||
|
"as the string form of the mode name. @var{variant} and @var{parent} should "
|
|||
|
"be unquoted symbols."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:824
|
|||
|
msgid ""
|
|||
|
"The new command @var{variant} is defined to call the function @var{parent}, "
|
|||
|
"then override certain aspects of that parent mode:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:831
|
|||
|
msgid ""
|
|||
|
"The new mode has its own sparse keymap, named @code{@var{variant}-map}. "
|
|||
|
"@code{define-derived-mode} makes the parent mode's keymap the parent of the "
|
|||
|
"new map, unless @code{@var{variant}-map} is already set and already has a "
|
|||
|
"parent."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:839
|
|||
|
msgid ""
|
|||
|
"The new mode has its own syntax table, kept in the variable "
|
|||
|
"@code{@var{variant}-syntax-table}, unless you override this using the "
|
|||
|
"@code{:syntax-table} keyword (see below). @code{define-derived-mode} makes "
|
|||
|
"the parent mode's syntax-table the parent of "
|
|||
|
"@code{@var{variant}-syntax-table}, unless the latter is already set and "
|
|||
|
"already has a parent different from the standard syntax table."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:844
|
|||
|
msgid ""
|
|||
|
"The new mode has its own abbrev table, kept in the variable "
|
|||
|
"@code{@var{variant}-abbrev-table}, unless you override this using the "
|
|||
|
"@code{:abbrev-table} keyword (see below)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:850
|
|||
|
msgid ""
|
|||
|
"The new mode has its own mode hook, @code{@var{variant}-hook}. It runs this "
|
|||
|
"hook, after running the hooks of its ancestor modes, with "
|
|||
|
"@code{run-mode-hooks}, as the last thing it does, apart from running any "
|
|||
|
"@code{:after-hook} form it may have. @xref{Mode Hooks}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:856
|
|||
|
msgid ""
|
|||
|
"In addition, you can specify how to override other aspects of @var{parent} "
|
|||
|
"with @var{body}. The command @var{variant} evaluates the forms in "
|
|||
|
"@var{body} after setting up all its usual overrides, just before running the "
|
|||
|
"mode hooks."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:862
|
|||
|
msgid ""
|
|||
|
"If @var{parent} has a non-@code{nil} @code{mode-class} symbol property, then "
|
|||
|
"@code{define-derived-mode} sets the @code{mode-class} property of "
|
|||
|
"@var{variant} to the same value. This ensures, for example, that if "
|
|||
|
"@var{parent} is a special mode, then @var{variant} is also a special mode "
|
|||
|
"(@pxref{Major Mode Conventions})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:866
|
|||
|
msgid ""
|
|||
|
"You can also specify @code{nil} for @var{parent}. This gives the new mode "
|
|||
|
"no parent. Then @code{define-derived-mode} behaves as described above, but, "
|
|||
|
"of course, omits all actions connected with @var{parent}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:872
|
|||
|
msgid ""
|
|||
|
"The argument @var{docstring} specifies the documentation string for the new "
|
|||
|
"mode. @code{define-derived-mode} adds some general information about the "
|
|||
|
"mode's hook, followed by the mode's keymap, at the end of this documentation "
|
|||
|
"string. If you omit @var{docstring}, @code{define-derived-mode} generates a "
|
|||
|
"documentation string."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:876
|
|||
|
msgid ""
|
|||
|
"The @var{keyword-args} are pairs of keywords and values. The values, except "
|
|||
|
"for @code{:after-hook}'s, are evaluated. The following keywords are "
|
|||
|
"currently supported:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:878
|
|||
|
#, no-wrap
|
|||
|
msgid ":syntax-table"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:885
|
|||
|
msgid ""
|
|||
|
"You can use this to explicitly specify a syntax table for the new mode. If "
|
|||
|
"you specify a @code{nil} value, the new mode uses the same syntax table as "
|
|||
|
"@var{parent}, or the standard syntax table if @var{parent} is @code{nil}. "
|
|||
|
"(Note that this does @emph{not} follow the convention used for non-keyword "
|
|||
|
"arguments that a @code{nil} value is equivalent with not specifying the "
|
|||
|
"argument.)"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:886
|
|||
|
#, no-wrap
|
|||
|
msgid ":abbrev-table"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:892
|
|||
|
msgid ""
|
|||
|
"You can use this to explicitly specify an abbrev table for the new mode. If "
|
|||
|
"you specify a @code{nil} value, the new mode uses the same abbrev table as "
|
|||
|
"@var{parent}, or @code{fundamental-mode-abbrev-table} if @var{parent} is "
|
|||
|
"@code{nil}. (Again, a @code{nil} value is @emph{not} equivalent to not "
|
|||
|
"specifying this keyword.)"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:893
|
|||
|
#, no-wrap
|
|||
|
msgid ":interactive"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:899
|
|||
|
msgid ""
|
|||
|
"Modes are interactive commands by default. If you specify a @code{nil} "
|
|||
|
"value, the mode defined here won't be interactive. This is useful for modes "
|
|||
|
"that are never meant to be activated by users manually, but are only "
|
|||
|
"supposed to be used in some specially-formatted buffer."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:900
|
|||
|
#, no-wrap
|
|||
|
msgid ":group"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:905
|
|||
|
msgid ""
|
|||
|
"If this is specified, the value should be the customization group for this "
|
|||
|
"mode. (Not all major modes have one.) The command @code{customize-mode} "
|
|||
|
"uses this. @code{define-derived-mode} does @emph{not} automatically define "
|
|||
|
"the specified customization group."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:906
|
|||
|
#, no-wrap
|
|||
|
msgid ":after-hook"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:914
|
|||
|
msgid ""
|
|||
|
"This optional keyword specifies a single Lisp form to evaluate as the final "
|
|||
|
"act of the mode function, after the mode hooks have been run. It should not "
|
|||
|
"be quoted. Since the form might be evaluated after the mode function has "
|
|||
|
"terminated, it should not access any element of the mode function's local "
|
|||
|
"state. An @code{:after-hook} form is useful for setting up aspects of the "
|
|||
|
"mode which depend on the user's settings, which in turn may have been "
|
|||
|
"changed in a mode hook."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:917
|
|||
|
msgid "Here is a hypothetical example:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:923
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(defvar hypertext-mode-map\n"
|
|||
|
" (let ((map (make-sparse-keymap)))\n"
|
|||
|
" (define-key map [down-mouse-3] 'do-hyper-link)\n"
|
|||
|
" map))\n"
|
|||
|
"\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:928
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(define-derived-mode hypertext-mode\n"
|
|||
|
" text-mode \"Hypertext\"\n"
|
|||
|
" \"Major mode for hypertext.\"\n"
|
|||
|
" (setq-local case-fold-search nil))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:932
|
|||
|
msgid ""
|
|||
|
"Do not write an @code{interactive} spec in the definition; "
|
|||
|
"@code{define-derived-mode} does that automatically."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:934
|
|||
|
#, no-wrap
|
|||
|
msgid "derived-mode-p &rest modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:937
|
|||
|
msgid ""
|
|||
|
"This function returns non-@code{nil} if the current major mode is derived "
|
|||
|
"from any of the major modes given by the symbols @var{modes}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:947
|
|||
|
msgid ""
|
|||
|
"Apart from Fundamental mode, there are three major modes that other major "
|
|||
|
"modes commonly derive from: Text mode, Prog mode, and Special mode. While "
|
|||
|
"Text mode is useful in its own right (e.g., for editing files ending in "
|
|||
|
"@file{.txt}), Prog mode and Special mode exist mainly to let other modes "
|
|||
|
"derive from them."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:948
|
|||
|
#, no-wrap
|
|||
|
msgid "prog-mode-hook"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:954
|
|||
|
msgid ""
|
|||
|
"As far as possible, new major modes should be derived, either directly or "
|
|||
|
"indirectly, from one of these three modes. One reason is that this allows "
|
|||
|
"users to customize a single mode hook (e.g., @code{prog-mode-hook}) for an "
|
|||
|
"entire family of relevant modes (e.g., all programming language modes)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:955
|
|||
|
#, no-wrap
|
|||
|
msgid "Command text-mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:961
|
|||
|
msgid ""
|
|||
|
"Text mode is a major mode for editing human languages. It defines the "
|
|||
|
"@samp{\"} and @samp{\\} characters as having punctuation syntax "
|
|||
|
"(@pxref{Syntax Class Table}), and binds @kbd{M-@key{TAB}} to "
|
|||
|
"@code{ispell-complete-word} (@pxref{Spelling,,, emacs, The GNU Emacs "
|
|||
|
"Manual})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:964
|
|||
|
msgid ""
|
|||
|
"An example of a major mode derived from Text mode is HTML mode. @xref{HTML "
|
|||
|
"Mode,,SGML and HTML Modes, emacs, The GNU Emacs Manual}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:966
|
|||
|
#, no-wrap
|
|||
|
msgid "Command prog-mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:970
|
|||
|
msgid ""
|
|||
|
"Prog mode is a basic major mode for buffers containing programming language "
|
|||
|
"source code. Most of the programming language major modes built into Emacs "
|
|||
|
"are derived from it."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:974
|
|||
|
msgid ""
|
|||
|
"Prog mode binds @code{parse-sexp-ignore-comments} to @code{t} (@pxref{Motion "
|
|||
|
"via Parsing}) and @code{bidi-paragraph-direction} to @code{left-to-right} "
|
|||
|
"(@pxref{Bidirectional Display})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:976
|
|||
|
#, no-wrap
|
|||
|
msgid "Command special-mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:981
|
|||
|
msgid ""
|
|||
|
"Special mode is a basic major mode for buffers containing text that is "
|
|||
|
"produced specially by Emacs, rather than directly from a file. Major modes "
|
|||
|
"derived from Special mode are given a @code{mode-class} property of "
|
|||
|
"@code{special} (@pxref{Major Mode Conventions})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:985
|
|||
|
msgid ""
|
|||
|
"Special mode sets the buffer to read-only. Its keymap defines several "
|
|||
|
"common bindings, including @kbd{q} for @code{quit-window} and @kbd{g} for "
|
|||
|
"@code{revert-buffer} (@pxref{Reverting})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:989
|
|||
|
msgid ""
|
|||
|
"An example of a major mode derived from Special mode is Buffer Menu mode, "
|
|||
|
"which is used by the @file{*Buffer List*} buffer. @xref{List "
|
|||
|
"Buffers,,Listing Existing Buffers, emacs, The GNU Emacs Manual}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:994
|
|||
|
msgid ""
|
|||
|
"In addition, modes for buffers of tabulated data can inherit from Tabulated "
|
|||
|
"List mode, which is in turn derived from Special mode. @xref{Tabulated List "
|
|||
|
"Mode}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1007
|
|||
|
msgid ""
|
|||
|
"Every major mode command should finish by running the mode-independent "
|
|||
|
"normal hook @code{change-major-mode-after-body-hook}, its mode hook, and the "
|
|||
|
"normal hook @code{after-change-major-mode-hook}. It does this by calling "
|
|||
|
"@code{run-mode-hooks}. If the major mode is a derived mode, that is if it "
|
|||
|
"calls another major mode (the parent mode) in its body, it should do this "
|
|||
|
"inside @code{delay-mode-hooks} so that the parent won't run these hooks "
|
|||
|
"itself. Instead, the derived mode's call to @code{run-mode-hooks} runs the "
|
|||
|
"parent's mode hook too. @xref{Major Mode Conventions}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1015
|
|||
|
msgid ""
|
|||
|
"Emacs versions before Emacs 22 did not have @code{delay-mode-hooks}. "
|
|||
|
"Versions before 24 did not have @code{change-major-mode-after-body-hook}. "
|
|||
|
"When user-implemented major modes do not use @code{run-mode-hooks} and have "
|
|||
|
"not been updated to use these newer features, they won't entirely follow "
|
|||
|
"these conventions: they may run the parent's mode hook too early, or fail to "
|
|||
|
"run @code{after-change-major-mode-hook}. If you encounter such a major "
|
|||
|
"mode, please correct it to follow these conventions."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1020
|
|||
|
msgid ""
|
|||
|
"When you define a major mode using @code{define-derived-mode}, it "
|
|||
|
"automatically makes sure these conventions are followed. If you define a "
|
|||
|
"major mode ``by hand'', not using @code{define-derived-mode}, use the "
|
|||
|
"following functions to handle these conventions automatically."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1021
|
|||
|
#, no-wrap
|
|||
|
msgid "run-mode-hooks &rest hookvars"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1029
|
|||
|
msgid ""
|
|||
|
"Major modes should run their mode hook using this function. It is similar "
|
|||
|
"to @code{run-hooks} (@pxref{Hooks}), but it also runs "
|
|||
|
"@code{change-major-mode-after-body-hook}, @code{hack-local-variables} (when "
|
|||
|
"the buffer is visiting a file) (@pxref{File Local Variables}), and "
|
|||
|
"@code{after-change-major-mode-hook}. The last thing it does is to evaluate "
|
|||
|
"any @code{:after-hook} forms declared by parent modes (@pxref{Derived "
|
|||
|
"Modes})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1035
|
|||
|
msgid ""
|
|||
|
"When this function is called during the execution of a "
|
|||
|
"@code{delay-mode-hooks} form, it does not run the hooks or "
|
|||
|
"@code{hack-local-variables} or evaluate the forms immediately. Instead, it "
|
|||
|
"arranges for the next call to @code{run-mode-hooks} to run them."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1037
|
|||
|
#, no-wrap
|
|||
|
msgid "delay-mode-hooks body@dots{}"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1040
|
|||
|
msgid ""
|
|||
|
"When one major mode command calls another, it should do so inside of "
|
|||
|
"@code{delay-mode-hooks}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1046
|
|||
|
msgid ""
|
|||
|
"This macro executes @var{body}, but tells all @code{run-mode-hooks} calls "
|
|||
|
"during the execution of @var{body} to delay running their hooks. The hooks "
|
|||
|
"will actually run during the next call to @code{run-mode-hooks} after the "
|
|||
|
"end of the @code{delay-mode-hooks} construct."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1048
|
|||
|
#, no-wrap
|
|||
|
msgid "change-major-mode-after-body-hook"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1051
|
|||
|
msgid ""
|
|||
|
"This is a normal hook run by @code{run-mode-hooks}. It is run before the "
|
|||
|
"mode hooks."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1053
|
|||
|
#, no-wrap
|
|||
|
msgid "after-change-major-mode-hook"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1056
|
|||
|
msgid ""
|
|||
|
"This is a normal hook run by @code{run-mode-hooks}. It is run at the very "
|
|||
|
"end of every properly-written major mode command."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1059
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1060
|
|||
|
#, no-wrap
|
|||
|
msgid "Tabulated List mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1068
|
|||
|
msgid ""
|
|||
|
"Tabulated List mode is a major mode for displaying tabulated data, i.e., "
|
|||
|
"data consisting of @dfn{entries}, each entry occupying one row of text with "
|
|||
|
"its contents divided into columns. Tabulated List mode provides facilities "
|
|||
|
"for pretty-printing rows and columns, and sorting the rows according to the "
|
|||
|
"values in each column. It is derived from Special mode (@pxref{Basic Major "
|
|||
|
"Modes})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1073
|
|||
|
msgid ""
|
|||
|
"Tabulated List mode is intended to be used as a parent mode by a more "
|
|||
|
"specialized major mode. Examples include Process Menu mode (@pxref{Process "
|
|||
|
"Information}) and Package Menu mode (@pxref{Package Menu,,, emacs, The GNU "
|
|||
|
"Emacs Manual})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: findex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1074
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1082
|
|||
|
msgid ""
|
|||
|
"Such a derived mode should use @code{define-derived-mode} in the usual way, "
|
|||
|
"specifying @code{tabulated-list-mode} as the second argument (@pxref{Derived "
|
|||
|
"Modes}). The body of the @code{define-derived-mode} form should specify the "
|
|||
|
"format of the tabulated data, by assigning values to the variables "
|
|||
|
"documented below; optionally, it can then call the function "
|
|||
|
"@code{tabulated-list-init-header}, which will populate a header with the "
|
|||
|
"names of the columns."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1088
|
|||
|
msgid ""
|
|||
|
"The derived mode should also define a @dfn{listing command}. This, not the "
|
|||
|
"mode command, is what the user calls (e.g., @kbd{M-x list-processes}). The "
|
|||
|
"listing command should create or switch to a buffer, turn on the derived "
|
|||
|
"mode, specify the tabulated data, and finally call "
|
|||
|
"@code{tabulated-list-print} to populate the buffer."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1089
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-gui-sort-indicator-asc"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1092
|
|||
|
msgid ""
|
|||
|
"This variable specifies the character to be used on GUI frames as an "
|
|||
|
"indication that the column is sorted in the ascending order."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1095
|
|||
|
msgid ""
|
|||
|
"Whenever you change the sort direction in Tabulated List buffers, this "
|
|||
|
"indicator toggles between ascending (``asc'') and descending (``desc'')."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1097
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-gui-sort-indicator-desc"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1100
|
|||
|
msgid ""
|
|||
|
"Like @code{tabulated-list-gui-sort-indicator-asc}, but used when the column "
|
|||
|
"is sorted in the descending order."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1102
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-tty-sort-indicator-asc"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1105
|
|||
|
msgid ""
|
|||
|
"Like @code{tabulated-list-gui-sort-indicator-asc}, but used for text-mode "
|
|||
|
"frames."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1107
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-tty-sort-indicator-desc"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1110
|
|||
|
msgid ""
|
|||
|
"Like @code{tabulated-list-tty-sort-indicator-asc}, but used when the column "
|
|||
|
"is sorted in the descending order."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1112
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-format"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1117
|
|||
|
msgid ""
|
|||
|
"This buffer-local variable specifies the format of the Tabulated List data. "
|
|||
|
"Its value should be a vector. Each element of the vector represents a data "
|
|||
|
"column, and should be a list @code{(@var{name} @var{width} @var{sort})}, "
|
|||
|
"where"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1121
|
|||
|
msgid "@var{name} is the column's name (a string)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1125
|
|||
|
msgid ""
|
|||
|
"@var{width} is the width to reserve for the column (an integer). This is "
|
|||
|
"meaningless for the last column, which runs to the end of each line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1133
|
|||
|
msgid ""
|
|||
|
"@var{sort} specifies how to sort entries by the column. If @code{nil}, the "
|
|||
|
"column cannot be used for sorting. If @code{t}, the column is sorted by "
|
|||
|
"comparing string values. Otherwise, this should be a predicate function for "
|
|||
|
"@code{sort} (@pxref{Rearrangement}), which accepts two arguments with the "
|
|||
|
"same form as the elements of @code{tabulated-list-entries} (see below)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1136
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-entries"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1140
|
|||
|
msgid ""
|
|||
|
"This buffer-local variable specifies the entries displayed in the Tabulated "
|
|||
|
"List buffer. Its value should be either a list, or a function."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1143
|
|||
|
msgid ""
|
|||
|
"If the value is a list, each list element corresponds to one entry, and "
|
|||
|
"should have the form @w{@code{(@var{id} @var{contents})}}, where"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1149
|
|||
|
msgid ""
|
|||
|
"@var{id} is either @code{nil}, or a Lisp object that identifies the entry. "
|
|||
|
"If the latter, the cursor stays on the same entry when re-sorting entries. "
|
|||
|
"Comparison is done with @code{equal}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1158
|
|||
|
msgid ""
|
|||
|
"@var{contents} is a vector with the same number of elements as "
|
|||
|
"@code{tabulated-list-format}. Each vector element is either a string, which "
|
|||
|
"is inserted into the buffer as-is; an image descriptor, which is used to "
|
|||
|
"insert an image (@pxref{Image Descriptors}); or a list @w{@code{(@var{label} "
|
|||
|
". @var{properties})}}, which means to insert a text button by calling "
|
|||
|
"@code{insert-text-button} with @var{label} and @var{properties} as arguments "
|
|||
|
"(@pxref{Making Buttons})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1160
|
|||
|
msgid "There should be no newlines in any of these strings."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1164
|
|||
|
msgid ""
|
|||
|
"Otherwise, the value should be a function which returns a list of the above "
|
|||
|
"form when called with no arguments."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1166
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-revert-hook"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1170
|
|||
|
msgid ""
|
|||
|
"This normal hook is run prior to reverting a Tabulated List buffer. A "
|
|||
|
"derived mode can add a function to this hook to recompute "
|
|||
|
"@code{tabulated-list-entries}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1172
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-printer"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1179
|
|||
|
msgid ""
|
|||
|
"The value of this variable is the function called to insert an entry at "
|
|||
|
"point, including its terminating newline. The function should accept two "
|
|||
|
"arguments, @var{id} and @var{contents}, having the same meanings as in "
|
|||
|
"@code{tabulated-list-entries}. The default value is a function which "
|
|||
|
"inserts an entry in a straightforward way; a mode which uses Tabulated List "
|
|||
|
"mode in a more complex way can specify another function."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1181
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-sort-key"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1188
|
|||
|
msgid ""
|
|||
|
"The value of this variable specifies the current sort key for the Tabulated "
|
|||
|
"List buffer. If it is @code{nil}, no sorting is done. Otherwise, it should "
|
|||
|
"have the form @code{(@var{name} . @var{flip})}, where @var{name} is a string "
|
|||
|
"matching one of the column names in @code{tabulated-list-format}, and "
|
|||
|
"@var{flip}, if non-@code{nil}, means to invert the sort order."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1190
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-init-header"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1194
|
|||
|
msgid ""
|
|||
|
"This function computes and sets @code{header-line-format} for the Tabulated "
|
|||
|
"List buffer (@pxref{Header Lines}), and assigns a keymap to the header line "
|
|||
|
"to allow sorting entries by clicking on column headers."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1198
|
|||
|
msgid ""
|
|||
|
"Modes derived from Tabulated List mode should call this after setting the "
|
|||
|
"above variables (in particular, only after setting "
|
|||
|
"@code{tabulated-list-format})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1200
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-print &optional remember-pos update"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1206
|
|||
|
msgid ""
|
|||
|
"This function populates the current buffer with entries. It should be "
|
|||
|
"called by the listing command. It erases the buffer, sorts the entries "
|
|||
|
"specified by @code{tabulated-list-entries} according to "
|
|||
|
"@code{tabulated-list-sort-key}, then calls the function specified by "
|
|||
|
"@code{tabulated-list-printer} to insert each entry."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1210
|
|||
|
msgid ""
|
|||
|
"If the optional argument @var{remember-pos} is non-@code{nil}, this function "
|
|||
|
"looks for the @var{id} element on the current line, if any, and tries to "
|
|||
|
"move to that entry after all the entries are (re)inserted."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1217
|
|||
|
msgid ""
|
|||
|
"If the optional argument @var{update} is non-@code{nil}, this function will "
|
|||
|
"only erase or add entries that have changed since the last print. This is "
|
|||
|
"several times faster if most entries haven't changed since the last time "
|
|||
|
"this function was called. The only difference in outcome is that tags "
|
|||
|
"placed via @code{tabulated-list-put-tag} will not be removed from entries "
|
|||
|
"that haven't changed (normally all tags are removed)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1219
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-delete-entry"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1221
|
|||
|
msgid "This function deletes the entry at point."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1226
|
|||
|
msgid ""
|
|||
|
"It returns a list @code{(@var{id} @var{cols})}, where @var{id} is the ID of "
|
|||
|
"the deleted entry and @var{cols} is a vector of its column descriptors. It "
|
|||
|
"moves point to the beginning of the current line. It returns @code{nil} if "
|
|||
|
"there is no entry at point."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1229
|
|||
|
msgid ""
|
|||
|
"Note that this function only changes the buffer contents; it does not alter "
|
|||
|
"@code{tabulated-list-entries}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1231
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-get-id &optional pos"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1236
|
|||
|
msgid ""
|
|||
|
"This @code{defsubst} returns the ID object from "
|
|||
|
"@code{tabulated-list-entries} (if that is a list) or from the list returned "
|
|||
|
"by @code{tabulated-list-entries} (if it is a function). If omitted or "
|
|||
|
"@code{nil}, @var{pos} defaults to point."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1238
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-get-entry &optional pos"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1244
|
|||
|
msgid ""
|
|||
|
"This @code{defsubst} returns the entry object from "
|
|||
|
"@code{tabulated-list-entries} (if that is a list) or from the list returned "
|
|||
|
"by @code{tabulated-list-entries} (if it is a function). This will be a "
|
|||
|
"vector for the ID at @var{pos}. If there is no entry at @var{pos}, then the "
|
|||
|
"function returns @code{nil}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1246
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-use-header-line"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1247
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-header-overlay-p &optional POS"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1253
|
|||
|
msgid ""
|
|||
|
"This @code{defsubst} returns non-nil if there is a fake header at "
|
|||
|
"@var{pos}. A fake header is used if @code{tabulated-list-use-header-line} "
|
|||
|
"is @code{nil} to put the column names at the beginning of the buffer. If "
|
|||
|
"omitted or @code{nil}, @var{pos} defaults to @code{point-min}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1255
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-padding"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1256
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-put-tag tag &optional advance"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1263
|
|||
|
msgid ""
|
|||
|
"This function puts @var{tag} in the padding area of the current line. The "
|
|||
|
"padding area can be empty space at the beginning of the line, the width of "
|
|||
|
"which is governed by @code{tabulated-list-padding}. @var{tag} should be a "
|
|||
|
"string, with a length less than or equal to @code{tabulated-list-padding}. "
|
|||
|
"If @var{advance} is non-nil, this function advances point by one line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1265
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-clear-all-tags"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1268
|
|||
|
msgid "This function clears all tags from the padding area in the current buffer."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1270
|
|||
|
#, no-wrap
|
|||
|
msgid "tabulated-list-set-col col desc &optional change-entry-data"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1275
|
|||
|
msgid ""
|
|||
|
"This function changes the tabulated list entry at point, setting @var{col} "
|
|||
|
"to @var{desc}. @var{col} is the column number to change, or the name of the "
|
|||
|
"column to change. @var{desc} is the new column descriptor, which is "
|
|||
|
"inserted via @code{tabulated-list-print-col}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1280
|
|||
|
msgid ""
|
|||
|
"If @var{change-entry-data} is non-nil, this function modifies the underlying "
|
|||
|
"data (usually the column descriptor in the list "
|
|||
|
"@code{tabulated-list-entries}) by setting the column descriptor of the "
|
|||
|
"vector to @code{desc}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1285
|
|||
|
#, no-wrap
|
|||
|
msgid "generic mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1291
|
|||
|
msgid ""
|
|||
|
"@dfn{Generic modes} are simple major modes with basic support for comment "
|
|||
|
"syntax and Font Lock mode. To define a generic mode, use the macro "
|
|||
|
"@code{define-generic-mode}. See the file @file{generic-x.el} for some "
|
|||
|
"examples of the use of @code{define-generic-mode}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1292
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"define-generic-mode mode comment-list keyword-list font-lock-list "
|
|||
|
"auto-mode-list function-list &optional docstring"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1297
|
|||
|
msgid ""
|
|||
|
"This macro defines a generic mode command named @var{mode} (a symbol, not "
|
|||
|
"quoted). The optional argument @var{docstring} is the documentation for the "
|
|||
|
"mode command. If you do not supply it, @code{define-generic-mode} generates "
|
|||
|
"one by default."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1307
|
|||
|
msgid ""
|
|||
|
"The argument @var{comment-list} is a list in which each element is either a "
|
|||
|
"character, a string of one or two characters, or a cons cell. A character "
|
|||
|
"or a string is set up in the mode's syntax table as a comment starter. If "
|
|||
|
"the entry is a cons cell, the @sc{car} is set up as a comment starter and "
|
|||
|
"the @sc{cdr} as a comment ender. (Use @code{nil} for the latter if you want "
|
|||
|
"comments to end at the end of the line.) Note that the syntax table "
|
|||
|
"mechanism has limitations about what comment starters and enders are "
|
|||
|
"actually possible. @xref{Syntax Tables}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1314
|
|||
|
msgid ""
|
|||
|
"The argument @var{keyword-list} is a list of keywords to highlight with "
|
|||
|
"@code{font-lock-keyword-face}. Each keyword should be a string. Meanwhile, "
|
|||
|
"@var{font-lock-list} is a list of additional expressions to highlight. Each "
|
|||
|
"element of this list should have the same form as an element of "
|
|||
|
"@code{font-lock-keywords}. @xref{Search-based Fontification}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1318
|
|||
|
msgid ""
|
|||
|
"The argument @var{auto-mode-list} is a list of regular expressions to add to "
|
|||
|
"the variable @code{auto-mode-alist}. They are added by the execution of the "
|
|||
|
"@code{define-generic-mode} form, not by expanding the macro call."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1322
|
|||
|
msgid ""
|
|||
|
"Finally, @var{function-list} is a list of functions for the mode command to "
|
|||
|
"call for additional setup. It calls these functions just before it runs the "
|
|||
|
"mode hook variable @code{@var{mode}-hook}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1325
|
|||
|
#, no-wrap
|
|||
|
msgid "Major Mode Examples"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1330
|
|||
|
msgid ""
|
|||
|
"Text mode is perhaps the simplest mode besides Fundamental mode. Here are "
|
|||
|
"excerpts from @file{text-mode.el} that illustrate many of the conventions "
|
|||
|
"listed above:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1343
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
";; @r{Create the syntax table for this mode.}\n"
|
|||
|
"(defvar text-mode-syntax-table\n"
|
|||
|
" (let ((st (make-syntax-table)))\n"
|
|||
|
" (modify-syntax-entry ?\\\" \". \" st)\n"
|
|||
|
" (modify-syntax-entry ?\\\\ \". \" st)\n"
|
|||
|
" ;; Add 'p' so M-c on 'hello' leads to 'Hello', not 'hello'.\n"
|
|||
|
" (modify-syntax-entry ?' \"w p\" st)\n"
|
|||
|
" @dots{}\n"
|
|||
|
" st)\n"
|
|||
|
" \"Syntax table used while in `text-mode'.\")\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: smallexample
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1346
|
|||
|
#, no-wrap
|
|||
|
msgid ";; @r{Create the keymap for this mode.}\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1355
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(defvar text-mode-map\n"
|
|||
|
" (let ((map (make-sparse-keymap)))\n"
|
|||
|
" (define-key map \"\\e\\t\" 'ispell-complete-word)\n"
|
|||
|
" @dots{}\n"
|
|||
|
" map)\n"
|
|||
|
" \"Keymap for `text-mode'.\n"
|
|||
|
"Many other modes, such as `mail-mode', `outline-mode' and\n"
|
|||
|
"`indented-text-mode', inherit all the commands defined in this map.\")\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1359
|
|||
|
msgid "Here is how the actual mode command is defined now:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1369
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(define-derived-mode text-mode nil \"Text\"\n"
|
|||
|
" \"Major mode for editing text written for humans to read.\n"
|
|||
|
"In this mode, paragraphs are delimited only by blank or white lines.\n"
|
|||
|
"You can thus get the full benefit of adaptive filling\n"
|
|||
|
" (see the variable `adaptive-fill-mode').\n"
|
|||
|
"\\\\@{text-mode-map@}\n"
|
|||
|
"Turning on Text mode runs the normal hook `text-mode-hook'.\"\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1373
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" (setq-local text-mode-variant t)\n"
|
|||
|
" (setq-local require-final-newline mode-require-final-newline))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: file{#1}
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1376
|
|||
|
#, no-wrap
|
|||
|
msgid "lisp-mode.el"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1381
|
|||
|
msgid ""
|
|||
|
"The three Lisp modes (Lisp mode, Emacs Lisp mode, and Lisp Interaction mode) "
|
|||
|
"have more features than Text mode and the code is correspondingly more "
|
|||
|
"complicated. Here are excerpts from @file{lisp-mode.el} that illustrate how "
|
|||
|
"these modes are written."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1383
|
|||
|
msgid "Here is how the Lisp mode syntax and abbrev tables are defined:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1384
|
|||
|
#, no-wrap
|
|||
|
msgid "syntax table example"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1390
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
";; @r{Create mode-specific table variables.}\n"
|
|||
|
"(define-abbrev-table 'lisp-mode-abbrev-table ()\n"
|
|||
|
" \"Abbrev table for Lisp mode.\")\n"
|
|||
|
"\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1399
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(defvar lisp-mode-syntax-table\n"
|
|||
|
" (let ((table (make-syntax-table lisp--mode-syntax-table)))\n"
|
|||
|
" (modify-syntax-entry ?\\[ \"_ \" table)\n"
|
|||
|
" (modify-syntax-entry ?\\] \"_ \" table)\n"
|
|||
|
" (modify-syntax-entry ?# \"' 14\" table)\n"
|
|||
|
" (modify-syntax-entry ?| \"\\\" 23bn\" table)\n"
|
|||
|
" table)\n"
|
|||
|
" \"Syntax table used in `lisp-mode'.\")\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1405
|
|||
|
msgid ""
|
|||
|
"The three modes for Lisp share much of their code. For instance, Lisp mode "
|
|||
|
"and Emacs Lisp mode inherit from Lisp Data mode and Lisp Interaction Mode "
|
|||
|
"inherits from Emacs Lisp mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1409
|
|||
|
msgid ""
|
|||
|
"Amongst other things, Lisp Data mode sets up the @code{comment-start} "
|
|||
|
"variable to handle Lisp comments:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1414
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" (setq-local comment-start \";\")\n"
|
|||
|
" @dots{}\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1421
|
|||
|
msgid ""
|
|||
|
"Each of the different Lisp modes has a slightly different keymap. For "
|
|||
|
"example, Lisp mode binds @kbd{C-c C-z} to @code{run-lisp}, but the other "
|
|||
|
"Lisp modes do not. However, all Lisp modes have some commands in common. "
|
|||
|
"The following code sets up the common commands:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1431
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(defvar lisp-mode-shared-map\n"
|
|||
|
" (let ((map (make-sparse-keymap)))\n"
|
|||
|
" (set-keymap-parent map prog-mode-map)\n"
|
|||
|
" (define-key map \"\\e\\C-q\" 'indent-sexp)\n"
|
|||
|
" (define-key map \"\\177\" 'backward-delete-char-untabify)\n"
|
|||
|
" map)\n"
|
|||
|
" \"Keymap for commands shared by all sorts of Lisp modes.\")\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1436
|
|||
|
msgid "And here is the code to set up the keymap for Lisp mode:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1449
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(defvar lisp-mode-map\n"
|
|||
|
" (let ((map (make-sparse-keymap))\n"
|
|||
|
" (menu-map (make-sparse-keymap \"Lisp\")))\n"
|
|||
|
" (set-keymap-parent map lisp-mode-shared-map)\n"
|
|||
|
" (define-key map \"\\e\\C-x\" 'lisp-eval-defun)\n"
|
|||
|
" (define-key map \"\\C-c\\C-z\" 'run-lisp)\n"
|
|||
|
" @dots{}\n"
|
|||
|
" map)\n"
|
|||
|
" \"Keymap for ordinary Lisp mode.\n"
|
|||
|
"All commands in `lisp-mode-shared-map' are inherited by this map.\")\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1454
|
|||
|
msgid "Finally, here is the major mode command for Lisp mode:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1462
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(define-derived-mode lisp-mode lisp-data-mode \"Lisp\"\n"
|
|||
|
" \"Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.\n"
|
|||
|
"Commands:\n"
|
|||
|
"Delete converts tabs to spaces as it moves back.\n"
|
|||
|
"Blank lines separate paragraphs. Semicolons start comments.\n"
|
|||
|
"\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1466
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"\\\\@{lisp-mode-map@}\n"
|
|||
|
"Note that `run-lisp' may be used either to start an inferior Lisp job\n"
|
|||
|
"or to switch back to an existing one.\"\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1472
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" (setq-local find-tag-default-function 'lisp-find-tag-default)\n"
|
|||
|
" (setq-local comment-start-skip\n"
|
|||
|
" "
|
|||
|
"\"\\\\(\\\\(^\\\\|[^\\\\\\n]\\\\)\\\\(\\\\\\\\\\\\\\\\\\\\)*\\\\)\\\\(;+\\\\|#|\\\\) "
|
|||
|
"*\")\n"
|
|||
|
" (setq imenu-case-fold-search t))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1477
|
|||
|
#, no-wrap
|
|||
|
msgid "minor mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1482
|
|||
|
msgid ""
|
|||
|
"A @dfn{minor mode} provides optional features that users may enable or "
|
|||
|
"disable independently of the choice of major mode. Minor modes can be "
|
|||
|
"enabled individually or in combination."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1489
|
|||
|
msgid ""
|
|||
|
"Most minor modes implement features that are independent of the major mode, "
|
|||
|
"and can thus be used with most major modes. For example, Auto Fill mode "
|
|||
|
"works with any major mode that permits text insertion. A few minor modes, "
|
|||
|
"however, are specific to a particular major mode. For example, Diff Auto "
|
|||
|
"Refine mode is a minor mode that is intended to be used only with Diff mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1493
|
|||
|
msgid ""
|
|||
|
"Ideally, a minor mode should have its desired effect regardless of the other "
|
|||
|
"minor modes in effect. It should be possible to activate and deactivate "
|
|||
|
"minor modes in any order."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1494
|
|||
|
#, no-wrap
|
|||
|
msgid "local-minor-modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1497
|
|||
|
msgid ""
|
|||
|
"This buffer-local variable lists the currently enabled minor modes in the "
|
|||
|
"current buffer, and is a list of symbols."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1499
|
|||
|
#, no-wrap
|
|||
|
msgid "global-minor-modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1502
|
|||
|
msgid ""
|
|||
|
"This variable lists the currently enabled global minor modes, and is a list "
|
|||
|
"of symbols."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1504
|
|||
|
#, no-wrap
|
|||
|
msgid "minor-mode-list"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1506
|
|||
|
msgid "The value of this variable is a list of all minor mode commands."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1512
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1514
|
|||
|
#, no-wrap
|
|||
|
msgid "Minor Mode Conventions"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1512
|
|||
|
msgid "Tips for writing a minor mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1512
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1663
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1664
|
|||
|
#, no-wrap
|
|||
|
msgid "Keymaps and Minor Modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1512
|
|||
|
msgid "How a minor mode can have its own keymap."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1512
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1687
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1688
|
|||
|
#, no-wrap
|
|||
|
msgid "Defining Minor Modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1512
|
|||
|
msgid "A convenient facility for defining minor modes."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1515
|
|||
|
#, no-wrap
|
|||
|
msgid "Conventions for Writing Minor Modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1516
|
|||
|
#, no-wrap
|
|||
|
msgid "minor mode conventions"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1517
|
|||
|
#, no-wrap
|
|||
|
msgid "conventions for writing minor modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1523
|
|||
|
msgid ""
|
|||
|
"There are conventions for writing minor modes just as there are for major "
|
|||
|
"modes (@pxref{Major Modes}). These conventions are described below. The "
|
|||
|
"easiest way to follow them is to use the macro @code{define-minor-mode}. "
|
|||
|
"@xref{Defining Minor Modes}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1526
|
|||
|
#, no-wrap
|
|||
|
msgid "mode variable"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1532
|
|||
|
msgid ""
|
|||
|
"Define a variable whose name ends in @samp{-mode}. We call this the "
|
|||
|
"@dfn{mode variable}. The minor mode command should set this variable. The "
|
|||
|
"value will be @code{nil} if the mode is disabled, and non-@code{nil} if the "
|
|||
|
"mode is enabled. The variable should be buffer-local if the minor mode is "
|
|||
|
"buffer-local."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1538
|
|||
|
msgid ""
|
|||
|
"This variable is used in conjunction with the @code{minor-mode-alist} to "
|
|||
|
"display the minor mode name in the mode line. It also determines whether "
|
|||
|
"the minor mode keymap is active, via @code{minor-mode-map-alist} "
|
|||
|
"(@pxref{Controlling Active Maps}). Individual commands or hooks can also "
|
|||
|
"check its value."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1544
|
|||
|
msgid ""
|
|||
|
"Define a command, called the @dfn{mode command}, whose name is the same as "
|
|||
|
"the mode variable. Its job is to set the value of the mode variable, plus "
|
|||
|
"anything else that needs to be done to actually enable or disable the mode's "
|
|||
|
"features."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1550
|
|||
|
msgid ""
|
|||
|
"The mode command should accept one optional argument. If called "
|
|||
|
"interactively with no prefix argument, it should toggle the mode (i.e., "
|
|||
|
"enable if it is disabled, and disable if it is enabled). If called "
|
|||
|
"interactively with a prefix argument, it should enable the mode if the "
|
|||
|
"argument is positive and disable it otherwise."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1556
|
|||
|
msgid ""
|
|||
|
"If the mode command is called from Lisp (i.e., non-interactively), it should "
|
|||
|
"enable the mode if the argument is omitted or @code{nil}; it should toggle "
|
|||
|
"the mode if the argument is the symbol @code{toggle}; otherwise it should "
|
|||
|
"treat the argument in the same way as for an interactive call with a numeric "
|
|||
|
"prefix argument, as described above."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1559
|
|||
|
msgid ""
|
|||
|
"The following example shows how to implement this behavior (it is similar to "
|
|||
|
"the code generated by the @code{define-minor-mode} macro):"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1569
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(interactive (list (or current-prefix-arg 'toggle)))\n"
|
|||
|
"(let ((enable\n"
|
|||
|
" (if (eq arg 'toggle)\n"
|
|||
|
" (not foo-mode) ; @r{this is the mode's mode variable}\n"
|
|||
|
" (> (prefix-numeric-value arg) 0))))\n"
|
|||
|
" (if enable\n"
|
|||
|
" @var{do-enable}\n"
|
|||
|
" @var{do-disable}))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1574
|
|||
|
msgid ""
|
|||
|
"The reason for this somewhat complex behavior is that it lets users easily "
|
|||
|
"toggle the minor mode interactively, and also lets the minor mode be easily "
|
|||
|
"enabled in a mode hook, like this:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1577
|
|||
|
#, no-wrap
|
|||
|
msgid "(add-hook 'text-mode-hook 'foo-mode)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1584
|
|||
|
msgid ""
|
|||
|
"This behaves correctly whether or not @code{foo-mode} was already enabled, "
|
|||
|
"since the @code{foo-mode} mode command unconditionally enables the minor "
|
|||
|
"mode when it is called from Lisp with no argument. Disabling a minor mode "
|
|||
|
"in a mode hook is a little uglier:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1587
|
|||
|
#, no-wrap
|
|||
|
msgid "(add-hook 'text-mode-hook (lambda () (foo-mode -1)))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1591
|
|||
|
msgid "However, this is not very commonly done."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1595
|
|||
|
msgid ""
|
|||
|
"Enabling or disabling a minor mode twice in direct succession should not "
|
|||
|
"fail and should do the same thing as enabling or disabling it only once. In "
|
|||
|
"other words, the minor mode command should be idempotent."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1601
|
|||
|
msgid ""
|
|||
|
"Add an element to @code{minor-mode-alist} for each minor mode "
|
|||
|
"(@pxref{Definition of minor-mode-alist}), if you want to indicate the minor "
|
|||
|
"mode in the mode line. This element should be a list of the following form:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: smallexample
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1604
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{mode-variable} @var{string})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1610
|
|||
|
msgid ""
|
|||
|
"Here @var{mode-variable} is the variable that controls enabling of the minor "
|
|||
|
"mode, and @var{string} is a short string, starting with a space, to "
|
|||
|
"represent the mode in the mode line. These strings must be short so that "
|
|||
|
"there is room for several of them at once."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1613
|
|||
|
msgid ""
|
|||
|
"When you add an element to @code{minor-mode-alist}, use @code{assq} to check "
|
|||
|
"for an existing element, to avoid duplication. For example:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1618
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(unless (assq 'leif-mode minor-mode-alist)\n"
|
|||
|
" (push '(leif-mode \" Leif\") minor-mode-alist))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1623
|
|||
|
msgid "or like this, using @code{add-to-list} (@pxref{List Variables}):"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1627
|
|||
|
#, no-wrap
|
|||
|
msgid "(add-to-list 'minor-mode-alist '(leif-mode \" Leif\"))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1635
|
|||
|
msgid ""
|
|||
|
"In addition, several major mode conventions (@pxref{Major Mode Conventions}) "
|
|||
|
"apply to minor modes as well: those regarding the names of global symbols, "
|
|||
|
"the use of a hook at the end of the initialization function, and the use of "
|
|||
|
"keymaps and other tables."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1646
|
|||
|
msgid ""
|
|||
|
"The minor mode should, if possible, support enabling and disabling via "
|
|||
|
"Custom (@pxref{Customization}). To do this, the mode variable should be "
|
|||
|
"defined with @code{defcustom}, usually with @code{:type 'boolean}. If just "
|
|||
|
"setting the variable is not sufficient to enable the mode, you should also "
|
|||
|
"specify a @code{:set} method which enables the mode by invoking the mode "
|
|||
|
"command. Note in the variable's documentation string that setting the "
|
|||
|
"variable other than via Custom may not take effect. Also, mark the "
|
|||
|
"definition with an autoload cookie (@pxref{autoload cookie}), and specify a "
|
|||
|
"@code{:require} so that customizing the variable will load the library that "
|
|||
|
"defines the mode. For example:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1660
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
";;;###autoload\n"
|
|||
|
"(defcustom msb-mode nil\n"
|
|||
|
" \"Toggle msb-mode.\n"
|
|||
|
"Setting this variable directly does not take effect;\n"
|
|||
|
"use either \\\\[customize] or the function `msb-mode'.\"\n"
|
|||
|
" :set 'custom-set-minor-mode\n"
|
|||
|
" :initialize 'custom-initialize-default\n"
|
|||
|
" :version \"20.4\"\n"
|
|||
|
" :type 'boolean\n"
|
|||
|
" :group 'msb\n"
|
|||
|
" :require 'msb)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1669
|
|||
|
msgid ""
|
|||
|
"Each minor mode can have its own keymap, which is active when the mode is "
|
|||
|
"enabled. To set up a keymap for a minor mode, add an element to the alist "
|
|||
|
"@code{minor-mode-map-alist}. @xref{Definition of minor-mode-map-alist}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1670
|
|||
|
#, no-wrap
|
|||
|
msgid "@code{self-insert-command}, minor modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1680
|
|||
|
msgid ""
|
|||
|
"One use of minor mode keymaps is to modify the behavior of certain "
|
|||
|
"self-inserting characters so that they do something else as well as "
|
|||
|
"self-insert. (Another way to customize @code{self-insert-command} is "
|
|||
|
"through @code{post-self-insert-hook}, see @ref{Commands for Insertion}. "
|
|||
|
"Apart from this, the facilities for customizing @code{self-insert-command} "
|
|||
|
"are limited to special cases, designed for abbrevs and Auto Fill mode. Do "
|
|||
|
"not try substituting your own definition of @code{self-insert-command} for "
|
|||
|
"the standard one. The editor command loop handles this function specially.)"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1686
|
|||
|
msgid ""
|
|||
|
"Minor modes may bind commands to key sequences consisting of @kbd{C-c} "
|
|||
|
"followed by a punctuation character. However, sequences consisting of "
|
|||
|
"@kbd{C-c} followed by one of @kbd{@{@}<>:;}, or a control character or "
|
|||
|
"digit, are reserved for major modes. Also, @kbd{C-c @var{letter}} is "
|
|||
|
"reserved for users. @xref{Key Binding Conventions}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1692
|
|||
|
msgid ""
|
|||
|
"The macro @code{define-minor-mode} offers a convenient way of implementing a "
|
|||
|
"mode in one self-contained definition."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1693
|
|||
|
#, no-wrap
|
|||
|
msgid "define-minor-mode mode doc keyword-args@dots{} body@dots{}"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1697
|
|||
|
msgid ""
|
|||
|
"This macro defines a new minor mode whose name is @var{mode} (a symbol). It "
|
|||
|
"defines a command named @var{mode} to toggle the minor mode, with @var{doc} "
|
|||
|
"as its documentation string."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1706
|
|||
|
msgid ""
|
|||
|
"The toggle command takes one optional (prefix) argument. If called "
|
|||
|
"interactively with no argument it toggles the mode on or off. A positive "
|
|||
|
"prefix argument enables the mode, any other prefix argument disables it. "
|
|||
|
"From Lisp, an argument of @code{toggle} toggles the mode, whereas an omitted "
|
|||
|
"or @code{nil} argument enables the mode. This makes it easy to enable the "
|
|||
|
"minor mode in a major mode hook, for example. If @var{doc} is @code{nil}, "
|
|||
|
"the macro supplies a default documentation string explaining the above."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1709
|
|||
|
msgid ""
|
|||
|
"By default, it also defines a variable named @var{mode}, which is set to "
|
|||
|
"@code{t} or @code{nil} by enabling or disabling the mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1712
|
|||
|
msgid ""
|
|||
|
"The @var{keyword-args} consist of keywords followed by corresponding "
|
|||
|
"values. A few keywords have special meanings:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1714
|
|||
|
#, no-wrap
|
|||
|
msgid ":global @var{global}"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1717
|
|||
|
msgid ""
|
|||
|
"If non-@code{nil}, this specifies that the minor mode should be global "
|
|||
|
"rather than buffer-local. It defaults to @code{nil}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1726
|
|||
|
msgid ""
|
|||
|
"One of the effects of making a minor mode global is that the @var{mode} "
|
|||
|
"variable becomes a customization variable. Toggling it through the "
|
|||
|
"Customize interface turns the mode on and off, and its value can be saved "
|
|||
|
"for future Emacs sessions (@pxref{Saving Customizations,,, emacs, The GNU "
|
|||
|
"Emacs Manual}. For the saved variable to work, you should ensure that the "
|
|||
|
"minor mode function is available each time Emacs starts; usually this is "
|
|||
|
"done by marking the @code{define-minor-mode} form as autoloaded."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1727
|
|||
|
#, no-wrap
|
|||
|
msgid ":init-value @var{init-value}"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1731
|
|||
|
msgid ""
|
|||
|
"This is the value to which the @var{mode} variable is initialized. Except "
|
|||
|
"in unusual circumstances (see below), this value must be @code{nil}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1732
|
|||
|
#, no-wrap
|
|||
|
msgid ":lighter @var{lighter}"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1736
|
|||
|
msgid ""
|
|||
|
"The string @var{lighter} says what to display in the mode line when the mode "
|
|||
|
"is enabled; if it is @code{nil}, the mode is not displayed in the mode line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1737
|
|||
|
#, no-wrap
|
|||
|
msgid ":keymap @var{keymap}"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1741
|
|||
|
msgid ""
|
|||
|
"The optional argument @var{keymap} specifies the keymap for the minor mode. "
|
|||
|
"If non-@code{nil}, it should be a variable name (whose value is a keymap), a "
|
|||
|
"keymap, or an alist of the form"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1744
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{key-sequence} . @var{definition})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1751
|
|||
|
msgid ""
|
|||
|
"where each @var{key-sequence} and @var{definition} are arguments suitable "
|
|||
|
"for passing to @code{define-key} (@pxref{Changing Key Bindings}). If "
|
|||
|
"@var{keymap} is a keymap or an alist, this also defines the variable "
|
|||
|
"@code{@var{mode}-map}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1752
|
|||
|
#, no-wrap
|
|||
|
msgid ":variable @var{place}"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1763
|
|||
|
msgid ""
|
|||
|
"This replaces the default variable @var{mode}, used to store the state of "
|
|||
|
"the mode. If you specify this, the @var{mode} variable is not defined, and "
|
|||
|
"any @var{init-value} argument is unused. @var{place} can be a different "
|
|||
|
"named variable (which you must define yourself), or anything that can be "
|
|||
|
"used with the @code{setf} function (@pxref{Generalized Variables}). "
|
|||
|
"@var{place} can also be a cons @code{(@var{get} . @var{set})}, where "
|
|||
|
"@var{get} is an expression that returns the current state, and @var{set} is "
|
|||
|
"a function of one argument (a state) which should be assigned to "
|
|||
|
"@var{place}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1764
|
|||
|
#, no-wrap
|
|||
|
msgid ":after-hook @var{after-hook}"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1767
|
|||
|
msgid ""
|
|||
|
"This defines a single Lisp form which is evaluated after the mode hooks have "
|
|||
|
"run. It should not be quoted."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1768
|
|||
|
#, no-wrap
|
|||
|
msgid ":interactive @var{value}"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1772
|
|||
|
msgid ""
|
|||
|
"Minor modes are interactive commands by default. If @var{value} is "
|
|||
|
"@code{nil}, this is inhibited. If @var{value} is a list of symbols, it's "
|
|||
|
"used to say which major modes this minor mode is useful in."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1776
|
|||
|
msgid ""
|
|||
|
"Any other keyword arguments are passed directly to the @code{defcustom} "
|
|||
|
"generated for the variable @var{mode}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1783
|
|||
|
msgid ""
|
|||
|
"The command named @var{mode} first performs the standard actions such as "
|
|||
|
"setting the variable named @var{mode} and then executes the @var{body} "
|
|||
|
"forms, if any. It then runs the mode hook variable @code{@var{mode}-hook} "
|
|||
|
"and finishes by evaluating any form in @code{:after-hook}. (Note that all "
|
|||
|
"of this, including running the hook, is done both when the mode is enabled "
|
|||
|
"and disabled.)"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1792
|
|||
|
msgid ""
|
|||
|
"The initial value must be @code{nil} except in cases where (1) the mode is "
|
|||
|
"preloaded in Emacs, or (2) it is painless for loading to enable the mode "
|
|||
|
"even though the user did not request it. For instance, if the mode has no "
|
|||
|
"effect unless something else is enabled, and will always be loaded by that "
|
|||
|
"time, enabling it by default is harmless. But these are unusual "
|
|||
|
"circumstances. Normally, the initial value must be @code{nil}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: findex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1793
|
|||
|
#, no-wrap
|
|||
|
msgid "easy-mmode-define-minor-mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1796
|
|||
|
msgid "The name @code{easy-mmode-define-minor-mode} is an alias for this macro."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1798
|
|||
|
msgid "Here is an example of using @code{define-minor-mode}:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: smallexample
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1806
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(define-minor-mode hungry-mode\n"
|
|||
|
" \"Toggle Hungry mode.\n"
|
|||
|
"Interactively with no argument, this command toggles the mode.\n"
|
|||
|
"A positive prefix argument enables the mode, any other prefix\n"
|
|||
|
"argument disables it. From Lisp, argument omitted or nil enables\n"
|
|||
|
"the mode, `toggle' toggles the state.\n"
|
|||
|
"\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: smallexample
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1816
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"When Hungry mode is enabled, the control delete key\n"
|
|||
|
"gobbles all preceding whitespace except the last.\n"
|
|||
|
"See the command \\\\[hungry-electric-delete].\"\n"
|
|||
|
" ;; The initial value.\n"
|
|||
|
" nil\n"
|
|||
|
" ;; The indicator for the mode line.\n"
|
|||
|
" \" Hungry\"\n"
|
|||
|
" ;; The minor mode bindings.\n"
|
|||
|
" '(([C-backspace] . hungry-electric-delete)))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1826
|
|||
|
msgid ""
|
|||
|
"This defines a minor mode named ``Hungry mode'', a command named "
|
|||
|
"@code{hungry-mode} to toggle it, a variable named @code{hungry-mode} which "
|
|||
|
"indicates whether the mode is enabled, and a variable named "
|
|||
|
"@code{hungry-mode-map} which holds the keymap that is active when the mode "
|
|||
|
"is enabled. It initializes the keymap with a key binding for "
|
|||
|
"@kbd{C-@key{DEL}}. There are no @var{body} forms---many minor modes don't "
|
|||
|
"need any."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1828
|
|||
|
msgid "Here's an equivalent way to write it:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: smallexample
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1844
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(define-minor-mode hungry-mode\n"
|
|||
|
" \"Toggle Hungry mode.\n"
|
|||
|
"...rest of documentation as before...\"\n"
|
|||
|
" ;; The initial value.\n"
|
|||
|
" :init-value nil\n"
|
|||
|
" ;; The indicator for the mode line.\n"
|
|||
|
" :lighter \" Hungry\"\n"
|
|||
|
" ;; The minor mode bindings.\n"
|
|||
|
" :keymap\n"
|
|||
|
" '(([C-backspace] . hungry-electric-delete)\n"
|
|||
|
" ([C-M-backspace]\n"
|
|||
|
" . (lambda ()\n"
|
|||
|
" (interactive)\n"
|
|||
|
" (hungry-electric-delete t)))))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1846
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"define-globalized-minor-mode global-mode mode turn-on keyword-args@dots{} "
|
|||
|
"body@dots{}"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1853
|
|||
|
msgid ""
|
|||
|
"This defines a global toggle named @var{global-mode} whose meaning is to "
|
|||
|
"enable or disable the buffer-local minor mode @var{mode} in all (or some; "
|
|||
|
"see below) buffers. It also executes the @var{body} forms. To turn on the "
|
|||
|
"minor mode in a buffer, it uses the function @var{turn-on}; to turn off the "
|
|||
|
"minor mode, it calls @var{mode} with @minus{}1 as argument."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1858
|
|||
|
msgid ""
|
|||
|
"Globally enabling the mode also affects buffers subsequently created by "
|
|||
|
"visiting files, and buffers that use a major mode other than Fundamental "
|
|||
|
"mode; but it does not detect the creation of a new buffer in Fundamental "
|
|||
|
"mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1864
|
|||
|
msgid ""
|
|||
|
"This defines the customization option @var{global-mode} "
|
|||
|
"(@pxref{Customization}), which can be toggled in the Customize interface to "
|
|||
|
"turn the minor mode on and off. As with @code{define-minor-mode}, you "
|
|||
|
"should ensure that the @code{define-globalized-minor-mode} form is evaluated "
|
|||
|
"each time Emacs starts, for example by providing a @code{:require} keyword."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1867
|
|||
|
msgid ""
|
|||
|
"Use @code{:group @var{group}} in @var{keyword-args} to specify the custom "
|
|||
|
"group for the mode variable of the global minor mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1872
|
|||
|
msgid ""
|
|||
|
"By default, the buffer-local minor mode variable that says whether the mode "
|
|||
|
"is switched on or off is the same as the name of the mode itself. Use "
|
|||
|
"@code{:variable @var{variable}} if that's not the case--some minor modes use "
|
|||
|
"a different variable to store this state information."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1878
|
|||
|
msgid ""
|
|||
|
"Generally speaking, when you define a globalized minor mode, you should also "
|
|||
|
"define a non-globalized version, so that people can use (or disable) it in "
|
|||
|
"individual buffers. This also allows them to disable a globally enabled "
|
|||
|
"minor mode in a specific major mode, by using that mode's hook."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1887
|
|||
|
msgid ""
|
|||
|
"If given a @code{:predicate} keyword, a user option called the same as the "
|
|||
|
"global mode variable, but with @code{-modes} instead of @code{-mode} at the "
|
|||
|
"end will be created. The variable is used as a predicate that specifies "
|
|||
|
"which major modes the minor mode should be activated in. Valid values "
|
|||
|
"include @code{t} (use in all major modes, @code{nil} (use in no major "
|
|||
|
"modes), or a list of mode names (or @code{(not mode-name ...)}) elements (as "
|
|||
|
"well as @code{t} and @code{nil})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1890
|
|||
|
#, no-wrap
|
|||
|
msgid "(c-mode (not mail-mode message-mode) text-mode)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1896
|
|||
|
msgid ""
|
|||
|
"This means ``use in modes derived from @code{c-mode}, and not in modes "
|
|||
|
"derived from @code{message-mode} or @code{mail-mode}, but do use in modes "
|
|||
|
"derived from @code{text-mode}, and otherwise no other modes''."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1899
|
|||
|
#, no-wrap
|
|||
|
msgid "((not c-mode) t)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1903
|
|||
|
msgid ""
|
|||
|
"This means ``don't use modes derived from @code{c-mode}, but use everywhere "
|
|||
|
"else''."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1906
|
|||
|
#, no-wrap
|
|||
|
msgid "(text-mode)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defmac
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1910
|
|||
|
msgid ""
|
|||
|
"This means ``use in modes derived from @code{text-mode}, but nowhere "
|
|||
|
"else''. (There's an implicit @code{nil} element at the end.)"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1915
|
|||
|
#, no-wrap
|
|||
|
msgid "mode line"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1924
|
|||
|
msgid ""
|
|||
|
"Each Emacs window (aside from minibuffer windows) typically has a mode line "
|
|||
|
"at the bottom, which displays status information about the buffer displayed "
|
|||
|
"in the window. The mode line contains information about the buffer, such as "
|
|||
|
"its name, associated file, depth of recursive editing, and major and minor "
|
|||
|
"modes. A window can also have a @dfn{header line}, which is much like the "
|
|||
|
"mode line but appears at the top of the window."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1929
|
|||
|
msgid ""
|
|||
|
"This section describes how to control the contents of the mode line and "
|
|||
|
"header line. We include it in this chapter because much of the information "
|
|||
|
"displayed in the mode line relates to the enabled major and minor modes."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
msgid "Base: Mode Line Basics"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
msgid "Basic ideas of mode line control."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
msgid "Data: Mode Line Data"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
msgid "The data structure that controls the mode line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
msgid "Top: Mode Line Top"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
msgid "The top level variable, mode-line-format."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2159
|
|||
|
#, no-wrap
|
|||
|
msgid "Mode Line Variables"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
msgid "Variables used in that data structure."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2358
|
|||
|
#, no-wrap
|
|||
|
msgid "%-Constructs"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
msgid "Putting information into a mode line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2490
|
|||
|
#, no-wrap
|
|||
|
msgid "Properties in Mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
msgid "Using text properties in the mode line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2533
|
|||
|
#, no-wrap
|
|||
|
msgid "Header Lines"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
msgid "Like a mode line, but at the top."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2561
|
|||
|
#, no-wrap
|
|||
|
msgid "Emulating Mode Line"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1939
|
|||
|
msgid "Formatting text as the mode line would."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1941
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1942
|
|||
|
#, no-wrap
|
|||
|
msgid "Mode Line Basics"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1953
|
|||
|
msgid ""
|
|||
|
"The contents of each mode line are specified by the buffer-local variable "
|
|||
|
"@code{mode-line-format} (@pxref{Mode Line Top}). This variable holds a "
|
|||
|
"@dfn{mode line construct}: a template that controls what is displayed on the "
|
|||
|
"buffer's mode line. The value of @code{header-line-format} specifies the "
|
|||
|
"buffer's header line in the same way. All windows for the same buffer use "
|
|||
|
"the same @code{mode-line-format} and @code{header-line-format} unless a "
|
|||
|
"@code{mode-line-format} or @code{header-line-format} parameter has been "
|
|||
|
"specified for that window (@pxref{Window Parameters})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1963
|
|||
|
msgid ""
|
|||
|
"For efficiency, Emacs does not continuously recompute each window's mode "
|
|||
|
"line and header line. It does so when circumstances appear to call for "
|
|||
|
"it---for instance, if you change the window configuration, switch buffers, "
|
|||
|
"narrow or widen the buffer, scroll, or modify the buffer. If you alter any "
|
|||
|
"of the variables referenced by @code{mode-line-format} or "
|
|||
|
"@code{header-line-format} (@pxref{Mode Line Variables}), or any other data "
|
|||
|
"structures that affect how text is displayed (@pxref{Display}), you should "
|
|||
|
"use the function @code{force-mode-line-update} to update the display."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1964
|
|||
|
#, no-wrap
|
|||
|
msgid "force-mode-line-update &optional all"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1969
|
|||
|
msgid ""
|
|||
|
"This function forces Emacs to update the current buffer's mode line and "
|
|||
|
"header line, based on the latest values of all relevant variables, during "
|
|||
|
"its next redisplay cycle. If the optional argument @var{all} is "
|
|||
|
"non-@code{nil}, it forces an update for all mode lines and header lines."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1971
|
|||
|
msgid "This function also forces an update of the menu bar and frame title."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1976
|
|||
|
msgid ""
|
|||
|
"The selected window's mode line is usually displayed in a different color "
|
|||
|
"using the face @code{mode-line}. Other windows' mode lines appear in the "
|
|||
|
"face @code{mode-line-inactive} instead. @xref{Faces}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1977
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-compact"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1987
|
|||
|
msgid ""
|
|||
|
"Some modes put a lot of data in the mode line, pushing elements at the end "
|
|||
|
"of the mode line off to the right. Emacs can ``compress'' the mode line if "
|
|||
|
"the @code{mode-line-compact} variable is non-@code{nil} by turning stretches "
|
|||
|
"of spaces into a single space. If this variable is @code{long}, this is "
|
|||
|
"only done when the mode line is wider than the currently selected window. "
|
|||
|
"(This computation is approximate, based on the number of characters, and not "
|
|||
|
"their displayed width.) This variable can be buffer-local to only compress "
|
|||
|
"mode-lines in certain buffers."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1988
|
|||
|
#, no-wrap
|
|||
|
msgid "Mode Line Data"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1989
|
|||
|
#, no-wrap
|
|||
|
msgid "The Data Structure of the Mode Line"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1990
|
|||
|
#, no-wrap
|
|||
|
msgid "mode line construct"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:1998
|
|||
|
msgid ""
|
|||
|
"The mode line contents are controlled by a data structure called a @dfn{mode "
|
|||
|
"line construct}, made up of lists, strings, symbols, and numbers kept in "
|
|||
|
"buffer-local variables. Each data type has a specific meaning for the mode "
|
|||
|
"line appearance, as described below. The same data structure is used for "
|
|||
|
"constructing frame titles (@pxref{Frame Titles}) and header lines "
|
|||
|
"(@pxref{Header Lines})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2003
|
|||
|
msgid ""
|
|||
|
"A mode line construct may be as simple as a fixed string of text, but it "
|
|||
|
"usually specifies how to combine fixed strings with variables' values to "
|
|||
|
"construct the text. Many of these variables are themselves defined to have "
|
|||
|
"mode line constructs as their values."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2005
|
|||
|
msgid "Here are the meanings of various data types as mode line constructs:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2007
|
|||
|
#, no-wrap
|
|||
|
msgid "percent symbol in mode line"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: var{#1}
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2008
|
|||
|
#, no-wrap
|
|||
|
msgid "string"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2012
|
|||
|
msgid ""
|
|||
|
"A string as a mode line construct appears verbatim except for "
|
|||
|
"@dfn{@code{%}-constructs} in it. These stand for substitution of other "
|
|||
|
"data; see @ref{%-Constructs}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2020
|
|||
|
msgid ""
|
|||
|
"If parts of the string have @code{face} properties, they control display of "
|
|||
|
"the text just as they would text in the buffer. Any characters which have "
|
|||
|
"no @code{face} properties are displayed, by default, in the face "
|
|||
|
"@code{mode-line} or @code{mode-line-inactive} (@pxref{Standard Faces,,, "
|
|||
|
"emacs, The GNU Emacs Manual}). The @code{help-echo} and @code{keymap} "
|
|||
|
"properties in @var{string} have special meanings. @xref{Properties in "
|
|||
|
"Mode}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: var{#1}
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2021
|
|||
|
#, no-wrap
|
|||
|
msgid "symbol"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2026
|
|||
|
msgid ""
|
|||
|
"A symbol as a mode line construct stands for its value. The value of "
|
|||
|
"@var{symbol} is used as a mode line construct, in place of @var{symbol}. "
|
|||
|
"However, the symbols @code{t} and @code{nil} are ignored, as is any symbol "
|
|||
|
"whose value is void."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2029
|
|||
|
msgid ""
|
|||
|
"There is one exception: if the value of @var{symbol} is a string, it is "
|
|||
|
"displayed verbatim: the @code{%}-constructs are not recognized."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2037
|
|||
|
msgid ""
|
|||
|
"Unless @var{symbol} is marked as risky (i.e., it has a non-@code{nil} "
|
|||
|
"@code{risky-local-variable} property), all text properties specified in "
|
|||
|
"@var{symbol}'s value are ignored. This includes the text properties of "
|
|||
|
"strings in @var{symbol}'s value, as well as all @code{:eval} and "
|
|||
|
"@code{:propertize} forms in it. (The reason for this is security: non-risky "
|
|||
|
"variables could be set automatically from file variables without prompting "
|
|||
|
"the user.)"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2038
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{string} @var{rest}@dots{})"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemx
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2039
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{list} @var{rest}@dots{})"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2049
|
|||
|
msgid ""
|
|||
|
"A list whose first element is a string or list means to process all the "
|
|||
|
"elements recursively and concatenate the results. This is the most common "
|
|||
|
"form of mode line construct. (Note that text properties are handled "
|
|||
|
"specially (for reasons of efficiency) when displaying strings in the mode "
|
|||
|
"line: Only the text property on the first character of the string are "
|
|||
|
"considered, and they are then used over the entire string. If you need a "
|
|||
|
"string with different text properties, you have to use the special "
|
|||
|
"@code{:propertize} mode line construct.)"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2050
|
|||
|
#, no-wrap
|
|||
|
msgid "(:eval @var{form})"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2055
|
|||
|
msgid ""
|
|||
|
"A list whose first element is the symbol @code{:eval} says to evaluate "
|
|||
|
"@var{form}, and use the result as a string to display. Make sure this "
|
|||
|
"evaluation cannot load any files, as doing so could cause infinite "
|
|||
|
"recursion."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2056
|
|||
|
#, no-wrap
|
|||
|
msgid "(:propertize @var{elt} @var{props}@dots{})"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2065
|
|||
|
msgid ""
|
|||
|
"A list whose first element is the symbol @code{:propertize} says to process "
|
|||
|
"the mode line construct @var{elt} recursively, then add the text properties "
|
|||
|
"specified by @var{props} to the result. The argument @var{props} should "
|
|||
|
"consist of zero or more pairs @var{text-property} @var{value}. If @var{elt} "
|
|||
|
"is or produces a string with text properties, all the characters of that "
|
|||
|
"string should have the same properties, or else some of them might be "
|
|||
|
"removed by @code{:propertize}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2066
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{symbol} @var{then} @var{else})"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2074
|
|||
|
msgid ""
|
|||
|
"A list whose first element is a symbol that is not a keyword specifies a "
|
|||
|
"conditional. Its meaning depends on the value of @var{symbol}. If "
|
|||
|
"@var{symbol} has a non-@code{nil} value, the second element, @var{then}, is "
|
|||
|
"processed recursively as a mode line construct. Otherwise, the third "
|
|||
|
"element, @var{else}, is processed recursively. You may omit @var{else}; "
|
|||
|
"then the mode line construct displays nothing if the value of @var{symbol} "
|
|||
|
"is @code{nil} or void."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2075
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{width} @var{rest}@dots{})"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2083
|
|||
|
msgid ""
|
|||
|
"A list whose first element is an integer specifies truncation or padding of "
|
|||
|
"the results of @var{rest}. The remaining elements @var{rest} are processed "
|
|||
|
"recursively as mode line constructs and concatenated together. When "
|
|||
|
"@var{width} is positive, the result is space filled on the right if its "
|
|||
|
"width is less than @var{width}. When @var{width} is negative, the result is "
|
|||
|
"truncated on the right to @minus{}@var{width} columns if its width exceeds "
|
|||
|
"@minus{}@var{width}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2086
|
|||
|
msgid ""
|
|||
|
"For example, the usual way to show what percentage of a buffer is above the "
|
|||
|
"top of the window is to use a list like this: @code{(-3 \"%p\")}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2088
|
|||
|
#, no-wrap
|
|||
|
msgid "Mode Line Top"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2089
|
|||
|
#, no-wrap
|
|||
|
msgid "The Top Level of Mode Line Control"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2093
|
|||
|
msgid "The variable in overall control of the mode line is @code{mode-line-format}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2094
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-format"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2097
|
|||
|
msgid ""
|
|||
|
"The value of this variable is a mode line construct that controls the "
|
|||
|
"contents of the mode-line. It is always buffer-local in all buffers."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2101
|
|||
|
msgid ""
|
|||
|
"If you set this variable to @code{nil} in a buffer, that buffer does not "
|
|||
|
"have a mode line. (A window that is just one line tall also does not "
|
|||
|
"display a mode line.)"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2110
|
|||
|
msgid ""
|
|||
|
"The default value of @code{mode-line-format} is designed to use the values "
|
|||
|
"of other variables such as @code{mode-line-position} and "
|
|||
|
"@code{mode-line-modes} (which in turn incorporates the values of the "
|
|||
|
"variables @code{mode-name} and @code{minor-mode-alist}). Very few modes "
|
|||
|
"need to alter @code{mode-line-format} itself. For most purposes, it is "
|
|||
|
"sufficient to alter some of the variables that @code{mode-line-format} "
|
|||
|
"either directly or indirectly refers to."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2117
|
|||
|
msgid ""
|
|||
|
"If you do alter @code{mode-line-format} itself, the new value should use the "
|
|||
|
"same variables that appear in the default value (@pxref{Mode Line "
|
|||
|
"Variables}), rather than duplicating their contents or displaying the "
|
|||
|
"information in another fashion. This way, customizations made by the user "
|
|||
|
"or by Lisp programs (such as @code{display-time} and major modes) via "
|
|||
|
"changes to those variables remain effective."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2121
|
|||
|
msgid ""
|
|||
|
"Here is a hypothetical example of a @code{mode-line-format} that might be "
|
|||
|
"useful for Shell mode (in reality, Shell mode does not set "
|
|||
|
"@code{mode-line-format}):"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2130
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(setq mode-line-format\n"
|
|||
|
" (list \"-\"\n"
|
|||
|
" 'mode-line-mule-info\n"
|
|||
|
" 'mode-line-modified\n"
|
|||
|
" 'mode-line-frame-identification\n"
|
|||
|
" \"%b--\"\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2135
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" ;; @r{Note that this is evaluated while making the list.}\n"
|
|||
|
" ;; @r{It makes a mode line construct which is just a string.}\n"
|
|||
|
" (getenv \"HOST\")\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2146
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" \":\"\n"
|
|||
|
" 'default-directory\n"
|
|||
|
" \" \"\n"
|
|||
|
" 'global-mode-string\n"
|
|||
|
" \" %[(\"\n"
|
|||
|
" '(:eval (format-time-string \"%F\"))\n"
|
|||
|
" 'mode-line-process\n"
|
|||
|
" 'minor-mode-alist\n"
|
|||
|
" \"%n\"\n"
|
|||
|
" \")%]--\"\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2151
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" '(which-function-mode (\"\" which-func-format \"--\"))\n"
|
|||
|
" '(line-number-mode \"L%l--\")\n"
|
|||
|
" '(column-number-mode \"C%c--\")\n"
|
|||
|
" '(-3 \"%p\")))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2158
|
|||
|
msgid ""
|
|||
|
"(The variables @code{line-number-mode}, @code{column-number-mode} and "
|
|||
|
"@code{which-function-mode} enable particular minor modes; as usual, these "
|
|||
|
"variable names are also the minor mode command names.)"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2160
|
|||
|
#, no-wrap
|
|||
|
msgid "Variables Used in the Mode Line"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2171
|
|||
|
msgid ""
|
|||
|
"This section describes variables incorporated by the standard value of "
|
|||
|
"@code{mode-line-format} into the text of the mode line. There is nothing "
|
|||
|
"inherently special about these variables; any other variables could have the "
|
|||
|
"same effects on the mode line if the value of @code{mode-line-format} is "
|
|||
|
"changed to use them. However, various parts of Emacs set these variables on "
|
|||
|
"the understanding that they will control parts of the mode line; therefore, "
|
|||
|
"practically speaking, it is essential for the mode line to use them. Also "
|
|||
|
"see @ref{Optional Mode Line,,, emacs, The GNU Emacs Manual}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2172
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-mule-info"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2176
|
|||
|
msgid ""
|
|||
|
"This variable holds the value of the mode line construct that displays "
|
|||
|
"information about the language environment, buffer coding system, and "
|
|||
|
"current input method. @xref{Non-ASCII Characters}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2178
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-modified"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2184
|
|||
|
msgid ""
|
|||
|
"This variable holds the value of the mode line construct that displays "
|
|||
|
"whether the current buffer is modified. Its default value displays "
|
|||
|
"@samp{**} if the buffer is modified, @samp{--} if the buffer is not "
|
|||
|
"modified, @samp{%%} if the buffer is read only, and @samp{%*} if the buffer "
|
|||
|
"is read only and modified."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2186
|
|||
|
msgid "Changing this variable does not force an update of the mode line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2188
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-frame-identification"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2193
|
|||
|
msgid ""
|
|||
|
"This variable identifies the current frame. Its default value displays "
|
|||
|
"@code{\" \"} if you are using a window system which can show multiple "
|
|||
|
"frames, or @code{\"-%F \"} on an ordinary terminal which shows only one "
|
|||
|
"frame at a time."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2195
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-buffer-identification"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2199
|
|||
|
msgid ""
|
|||
|
"This variable identifies the buffer being displayed in the window. Its "
|
|||
|
"default value displays the buffer name, padded with spaces to at least 12 "
|
|||
|
"columns."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2201
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-position"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2205
|
|||
|
msgid ""
|
|||
|
"This variable indicates the position in the buffer. Its default value "
|
|||
|
"displays the buffer percentage and, optionally, the buffer size, the line "
|
|||
|
"number and the column number."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2207
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-percent-position"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2213
|
|||
|
msgid ""
|
|||
|
"This option is used in @code{mode-line-position}. Its value specifies both "
|
|||
|
"the buffer percentage to display (one of @code{nil}, @code{\"%o\"}, "
|
|||
|
"@code{\"%p\"}, @code{\"%P\"} or @code{\"%q\"}, @pxref{%-Constructs}) and a "
|
|||
|
"width to space-fill or truncate to. You are recommended to set this option "
|
|||
|
"with the @code{customize-variable} facility."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2215
|
|||
|
#, no-wrap
|
|||
|
msgid "vc-mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2220
|
|||
|
msgid ""
|
|||
|
"The variable @code{vc-mode}, buffer-local in each buffer, records whether "
|
|||
|
"the buffer's visited file is maintained with version control, and, if so, "
|
|||
|
"which kind. Its value is a string that appears in the mode line, or "
|
|||
|
"@code{nil} for no version control."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2222
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-modes"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2226
|
|||
|
msgid ""
|
|||
|
"This variable displays the buffer's major and minor modes. Its default "
|
|||
|
"value also displays the recursive editing level, information on the process "
|
|||
|
"status, and whether narrowing is in effect."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2228
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-remote"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2231
|
|||
|
msgid ""
|
|||
|
"This variable is used to show whether @code{default-directory} for the "
|
|||
|
"current buffer is remote."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2233
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-client"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2235
|
|||
|
msgid "This variable is used to identify @code{emacsclient} frames."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2238
|
|||
|
msgid "The following three variables are used in @code{mode-line-modes}:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2239
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-name"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2247
|
|||
|
msgid ""
|
|||
|
"This buffer-local variable holds the ``pretty'' name of the current buffer's "
|
|||
|
"major mode. Each major mode should set this variable so that the mode name "
|
|||
|
"will appear in the mode line. The value does not have to be a string, but "
|
|||
|
"can use any of the data types valid in a mode-line construct (@pxref{Mode "
|
|||
|
"Line Data}). To compute the string that will identify the mode name in the "
|
|||
|
"mode line, use @code{format-mode-line} (@pxref{Emulating Mode Line})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2249
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-process"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2257
|
|||
|
msgid ""
|
|||
|
"This buffer-local variable contains the mode line information on process "
|
|||
|
"status in modes used for communicating with subprocesses. It is displayed "
|
|||
|
"immediately following the major mode name, with no intervening space. For "
|
|||
|
"example, its value in the @file{*shell*} buffer is @code{(\":%s\")}, which "
|
|||
|
"allows the shell to display its status along with the major mode as: "
|
|||
|
"@samp{(Shell:run)}. Normally this variable is @code{nil}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2259
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-front-space"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2263
|
|||
|
msgid ""
|
|||
|
"This variable is displayed at the front of the mode line. By default, this "
|
|||
|
"construct is displayed right at the beginning of the mode line, except that "
|
|||
|
"if there is a memory-full message, it is displayed first."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2265
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-end-spaces"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2267
|
|||
|
msgid "This variable is displayed at the end of the mode line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2269
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-misc-info"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2272
|
|||
|
msgid ""
|
|||
|
"Mode line construct for miscellaneous information. By default, this shows "
|
|||
|
"the information specified by @code{global-mode-string}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2274
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-position-line-format"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2279
|
|||
|
msgid ""
|
|||
|
"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."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2281
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-position-column-format"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2287
|
|||
|
msgid ""
|
|||
|
"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 a zero-based column number, "
|
|||
|
"and @samp{%C} will be replaced with a one-based column number."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2289
|
|||
|
#, no-wrap
|
|||
|
msgid "mode-line-position-column-line-format"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2294
|
|||
|
msgid ""
|
|||
|
"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}, @samp{%c} and @samp{%C} format "
|
|||
|
"specs."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2296
|
|||
|
#, no-wrap
|
|||
|
msgid "minor-mode-alist"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: anchor{#1}
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2301
|
|||
|
msgid "Definition of minor-mode-alist"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2301
|
|||
|
msgid ""
|
|||
|
"This variable holds an association list whose elements specify how the mode "
|
|||
|
"line should indicate that a minor mode is active. Each element of the "
|
|||
|
"@code{minor-mode-alist} should be a two-element list:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2304
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{minor-mode-variable} @var{mode-line-string})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2312
|
|||
|
msgid ""
|
|||
|
"More generally, @var{mode-line-string} can be any mode line construct. It "
|
|||
|
"appears in the mode line when the value of @var{minor-mode-variable} is "
|
|||
|
"non-@code{nil}, and not otherwise. These strings should begin with spaces "
|
|||
|
"so that they don't run together. Conventionally, the "
|
|||
|
"@var{minor-mode-variable} for a specific mode is set to a non-@code{nil} "
|
|||
|
"value when that minor mode is activated."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2316
|
|||
|
msgid ""
|
|||
|
"@code{minor-mode-alist} itself is not buffer-local. Each variable mentioned "
|
|||
|
"in the alist should be buffer-local if its minor mode can be enabled "
|
|||
|
"separately in each buffer."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2318
|
|||
|
#, no-wrap
|
|||
|
msgid "global-mode-string"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2328
|
|||
|
msgid ""
|
|||
|
"This variable holds a mode line construct that, by default, appears in the "
|
|||
|
"mode line just after the @code{which-function-mode} minor mode if set, else "
|
|||
|
"after @code{mode-line-modes}. Elements that are added to this construct "
|
|||
|
"should normally end in a space (to ensure that consecutive "
|
|||
|
"@code{global-mode-string} elements display properly). For instance, the "
|
|||
|
"command @code{display-time} sets @code{global-mode-string} to refer to the "
|
|||
|
"variable @code{display-time-string}, which holds a string containing the "
|
|||
|
"time and load information."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2332
|
|||
|
msgid ""
|
|||
|
"The @samp{%M} construct substitutes the value of @code{global-mode-string}, "
|
|||
|
"but that is obsolete, since the variable is included in the mode line from "
|
|||
|
"@code{mode-line-format}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2337
|
|||
|
msgid ""
|
|||
|
"Here is a simplified version of the default value of "
|
|||
|
"@code{mode-line-format}. The real default value also specifies addition of "
|
|||
|
"text properties."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2345
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(\"-\"\n"
|
|||
|
" mode-line-mule-info\n"
|
|||
|
" mode-line-modified\n"
|
|||
|
" mode-line-frame-identification\n"
|
|||
|
" mode-line-buffer-identification\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2350
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" \" \"\n"
|
|||
|
" mode-line-position\n"
|
|||
|
" (vc-mode vc-mode)\n"
|
|||
|
" \" \"\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2355
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" mode-line-modes\n"
|
|||
|
" (which-function-mode (\"\" which-func-format \"--\"))\n"
|
|||
|
" (global-mode-string (\"--\" global-mode-string))\n"
|
|||
|
" \"-%-\")\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2359
|
|||
|
#, no-wrap
|
|||
|
msgid "@code{%}-Constructs in the Mode Line"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2365
|
|||
|
msgid ""
|
|||
|
"Strings used as mode line constructs can use certain @code{%}-constructs to "
|
|||
|
"substitute various kinds of data. The following is a list of the defined "
|
|||
|
"@code{%}-constructs, and what they mean."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2372
|
|||
|
msgid ""
|
|||
|
"In any construct except @samp{%%}, you can add a decimal integer after the "
|
|||
|
"@samp{%} to specify a minimum field width. If the width is less, the field "
|
|||
|
"is padded to that width. Purely numeric constructs (@samp{c}, @samp{i}, "
|
|||
|
"@samp{I}, and @samp{l}) are padded by inserting spaces to the left, and "
|
|||
|
"others are padded by inserting spaces to the right."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2374
|
|||
|
#, no-wrap
|
|||
|
msgid "%b"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2377
|
|||
|
msgid ""
|
|||
|
"The current buffer name, obtained with the @code{buffer-name} function. "
|
|||
|
"@xref{Buffer Names}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2378
|
|||
|
#, no-wrap
|
|||
|
msgid "%c"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2381
|
|||
|
msgid ""
|
|||
|
"The current column number of point, counting from zero starting at the left "
|
|||
|
"margin of the window."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2382
|
|||
|
#, no-wrap
|
|||
|
msgid "%C"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2385
|
|||
|
msgid ""
|
|||
|
"The current column number of point, counting from one starting at the left "
|
|||
|
"margin of the window."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2386
|
|||
|
#, no-wrap
|
|||
|
msgid "%e"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2389
|
|||
|
msgid ""
|
|||
|
"When Emacs is nearly out of memory for Lisp objects, a brief message saying "
|
|||
|
"so. Otherwise, this is empty."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2390
|
|||
|
#, no-wrap
|
|||
|
msgid "%f"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2393
|
|||
|
msgid ""
|
|||
|
"The visited file name, obtained with the @code{buffer-file-name} function. "
|
|||
|
"@xref{Buffer File Name}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2394
|
|||
|
#, no-wrap
|
|||
|
msgid "%F"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2397
|
|||
|
msgid ""
|
|||
|
"The title (only on a window system) or the name of the selected frame. "
|
|||
|
"@xref{Basic Parameters}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2398
|
|||
|
#, no-wrap
|
|||
|
msgid "%i"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2401
|
|||
|
msgid ""
|
|||
|
"The size of the accessible part of the current buffer; basically @code{(- "
|
|||
|
"(point-max) (point-min))}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2402
|
|||
|
#, no-wrap
|
|||
|
msgid "%I"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2406
|
|||
|
msgid ""
|
|||
|
"Like @samp{%i}, but the size is printed in a more readable way by using "
|
|||
|
"@samp{k} for 10^3, @samp{M} for 10^6, @samp{G} for 10^9, etc., to "
|
|||
|
"abbreviate."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2407
|
|||
|
#, no-wrap
|
|||
|
msgid "%l"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2410
|
|||
|
msgid ""
|
|||
|
"The current line number of point, counting within the accessible portion of "
|
|||
|
"the buffer."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2411
|
|||
|
#, no-wrap
|
|||
|
msgid "%n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2414
|
|||
|
msgid ""
|
|||
|
"@samp{Narrow} when narrowing is in effect; nothing otherwise (see "
|
|||
|
"@code{narrow-to-region} in @ref{Narrowing})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2415
|
|||
|
#, no-wrap
|
|||
|
msgid "%o"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2420
|
|||
|
msgid ""
|
|||
|
"The degree of @dfn{travel} of the window through (the visible portion of) "
|
|||
|
"the buffer, i.e. the size of the text above the top of the window expressed "
|
|||
|
"as a percentage of all the text outside the window, or @samp{Top}, "
|
|||
|
"@samp{Bottom} or @samp{All}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2421
|
|||
|
#, no-wrap
|
|||
|
msgid "%p"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2425
|
|||
|
msgid ""
|
|||
|
"The percentage of the buffer text above the @strong{top} of window, or "
|
|||
|
"@samp{Top}, @samp{Bottom} or @samp{All}. Note that the default mode line "
|
|||
|
"construct truncates this to three characters."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2426
|
|||
|
#, no-wrap
|
|||
|
msgid "%P"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2431
|
|||
|
msgid ""
|
|||
|
"The percentage of the buffer text that is above the @strong{bottom} of the "
|
|||
|
"window (which includes the text visible in the window, as well as the text "
|
|||
|
"above the top), plus @samp{Top} if the top of the buffer is visible on "
|
|||
|
"screen; or @samp{Bottom} or @samp{All}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2432
|
|||
|
#, no-wrap
|
|||
|
msgid "%q"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2435
|
|||
|
msgid ""
|
|||
|
"The percentages of text above both the @strong{top} and the @strong{bottom} "
|
|||
|
"of the window, separated by @samp{-}, or @samp{All}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2436
|
|||
|
#, no-wrap
|
|||
|
msgid "%s"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2439
|
|||
|
msgid ""
|
|||
|
"The status of the subprocess belonging to the current buffer, obtained with "
|
|||
|
"@code{process-status}. @xref{Process Information}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2440
|
|||
|
#, no-wrap
|
|||
|
msgid "%z"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2442
|
|||
|
msgid "The mnemonics of keyboard, terminal, and buffer coding systems."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2443
|
|||
|
#, no-wrap
|
|||
|
msgid "%Z"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2445
|
|||
|
msgid "Like @samp{%z}, but including the end-of-line format."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2446
|
|||
|
#, no-wrap
|
|||
|
msgid "%*"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2450
|
|||
|
msgid ""
|
|||
|
"@samp{%} if the buffer is read only (see @code{buffer-read-only}); @* "
|
|||
|
"@samp{*} if the buffer is modified (see @code{buffer-modified-p}); @* "
|
|||
|
"@samp{-} otherwise. @xref{Buffer Modification}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2451
|
|||
|
#, no-wrap
|
|||
|
msgid "%+"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2456
|
|||
|
msgid ""
|
|||
|
"@samp{*} if the buffer is modified (see @code{buffer-modified-p}); @* "
|
|||
|
"@samp{%} if the buffer is read only (see @code{buffer-read-only}); @* "
|
|||
|
"@samp{-} otherwise. This differs from @samp{%*} only for a modified "
|
|||
|
"read-only buffer. @xref{Buffer Modification}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2457
|
|||
|
#, no-wrap
|
|||
|
msgid "%&"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2459
|
|||
|
msgid "@samp{*} if the buffer is modified, and @samp{-} otherwise."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2460
|
|||
|
#, no-wrap
|
|||
|
msgid "%@@"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2463
|
|||
|
msgid ""
|
|||
|
"@samp{@@} if the buffer's @code{default-directory} (@pxref{File Name "
|
|||
|
"Expansion}) is on a remote machine, and @samp{-} otherwise."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2464
|
|||
|
#, no-wrap
|
|||
|
msgid "%["
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2468
|
|||
|
msgid ""
|
|||
|
"An indication of the depth of recursive editing levels (not counting "
|
|||
|
"minibuffer levels): one @samp{[} for each editing level. @xref{Recursive "
|
|||
|
"Editing}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2469
|
|||
|
#, no-wrap
|
|||
|
msgid "%]"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2472
|
|||
|
msgid ""
|
|||
|
"One @samp{]} for each recursive editing level (not counting minibuffer "
|
|||
|
"levels)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2473
|
|||
|
#, no-wrap
|
|||
|
msgid "%-"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2475
|
|||
|
msgid "Dashes sufficient to fill the remainder of the mode line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2476
|
|||
|
#, no-wrap
|
|||
|
msgid "%%"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2479
|
|||
|
msgid ""
|
|||
|
"The character @samp{%}---this is how to include a literal @samp{%} in a "
|
|||
|
"string in which @code{%}-constructs are allowed."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2484
|
|||
|
msgid ""
|
|||
|
"The following @code{%}-construct is still supported, but it is obsolete, "
|
|||
|
"since you can get the same result using the variable @code{mode-name}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2486
|
|||
|
#, no-wrap
|
|||
|
msgid "%m"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2488
|
|||
|
msgid "The value of @code{mode-name}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2491
|
|||
|
#, no-wrap
|
|||
|
msgid "Properties in the Mode Line"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2492
|
|||
|
#, no-wrap
|
|||
|
msgid "text properties in the mode line"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2498
|
|||
|
msgid ""
|
|||
|
"Certain text properties are meaningful in the mode line. The @code{face} "
|
|||
|
"property affects the appearance of text; the @code{help-echo} property "
|
|||
|
"associates help strings with the text, and @code{keymap} can make the text "
|
|||
|
"mouse-sensitive."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2501
|
|||
|
msgid "There are four ways to specify text properties for text in the mode line:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: enumerate
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2506
|
|||
|
msgid ""
|
|||
|
"Put a string with a text property directly into the mode line data "
|
|||
|
"structure, but see @ref{Mode Line Data} for caveats for that."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: enumerate
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2510
|
|||
|
msgid ""
|
|||
|
"Put a text property on a mode line %-construct such as @samp{%12b}; then the "
|
|||
|
"expansion of the %-construct will have that same text property."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: enumerate
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2514
|
|||
|
msgid ""
|
|||
|
"Use a @code{(:propertize @var{elt} @var{props}@dots{})} construct to give "
|
|||
|
"@var{elt} a text property specified by @var{props}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: enumerate
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2519
|
|||
|
msgid ""
|
|||
|
"Use a list containing @code{:eval @var{form}} in the mode line data "
|
|||
|
"structure, and make @var{form} evaluate to a string that has a text "
|
|||
|
"property."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2525
|
|||
|
msgid ""
|
|||
|
"You can use the @code{keymap} property to specify a keymap. This keymap "
|
|||
|
"only takes real effect for mouse clicks; binding character keys and function "
|
|||
|
"keys to it has no effect, since it is impossible to move point into the mode "
|
|||
|
"line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2532
|
|||
|
msgid ""
|
|||
|
"When the mode line refers to a variable which does not have a non-@code{nil} "
|
|||
|
"@code{risky-local-variable} property, any text properties given or specified "
|
|||
|
"within that variable's values are ignored. This is because such properties "
|
|||
|
"could otherwise specify functions to be called, and those functions could "
|
|||
|
"come from file local variables."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2534
|
|||
|
#, no-wrap
|
|||
|
msgid "Window Header Lines"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2535
|
|||
|
#, no-wrap
|
|||
|
msgid "header line (of a window)"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2536
|
|||
|
#, no-wrap
|
|||
|
msgid "window header line"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2542
|
|||
|
msgid ""
|
|||
|
"A window can have a @dfn{header line} at the top, just as it can have a mode "
|
|||
|
"line at the bottom. The header line feature works just like the mode line "
|
|||
|
"feature, except that it's controlled by @code{header-line-format}:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2543
|
|||
|
#, no-wrap
|
|||
|
msgid "header-line-format"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2548
|
|||
|
msgid ""
|
|||
|
"This variable, local in every buffer, specifies how to display the header "
|
|||
|
"line, for windows displaying the buffer. The format of the value is the "
|
|||
|
"same as for @code{mode-line-format} (@pxref{Mode Line Data}). It is "
|
|||
|
"normally @code{nil}, so that ordinary buffers have no header line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2550
|
|||
|
#, no-wrap
|
|||
|
msgid "window-header-line-height &optional window"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2554
|
|||
|
msgid ""
|
|||
|
"This function returns the height in pixels of @var{window}'s header line. "
|
|||
|
"@var{window} must be a live window, and defaults to the selected window."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2560
|
|||
|
msgid ""
|
|||
|
"A window that is just one line tall never displays a header line. A window "
|
|||
|
"that is two lines tall cannot display both a mode line and a header line at "
|
|||
|
"once; if it has a mode line, then it does not display a header line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2562
|
|||
|
#, no-wrap
|
|||
|
msgid "Emulating Mode Line Formatting"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2567
|
|||
|
msgid ""
|
|||
|
"You can use the function @code{format-mode-line} to compute the text that "
|
|||
|
"would appear in a mode line or header line based on a certain mode line "
|
|||
|
"construct."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2568
|
|||
|
#, no-wrap
|
|||
|
msgid "format-mode-line format &optional face window buffer"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2575
|
|||
|
msgid ""
|
|||
|
"This function formats a line of text according to @var{format} as if it were "
|
|||
|
"generating the mode line for @var{window}, but it also returns the text as a "
|
|||
|
"string. The argument @var{window} defaults to the selected window. If "
|
|||
|
"@var{buffer} is non-@code{nil}, all the information used is taken from "
|
|||
|
"@var{buffer}; by default, it comes from @var{window}'s buffer."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2584
|
|||
|
msgid ""
|
|||
|
"The value string normally has text properties that correspond to the faces, "
|
|||
|
"keymaps, etc., that the mode line would have. Any character for which no "
|
|||
|
"@code{face} property is specified by @var{format} gets a default value "
|
|||
|
"determined by @var{face}. If @var{face} is @code{t}, that stands for either "
|
|||
|
"@code{mode-line} if @var{window} is selected, otherwise "
|
|||
|
"@code{mode-line-inactive}. If @var{face} is @code{nil} or omitted, that "
|
|||
|
"stands for the default face. If @var{face} is an integer, the value "
|
|||
|
"returned by this function will have no text properties."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2588
|
|||
|
msgid ""
|
|||
|
"You can also specify other valid faces as the value of @var{face}. If "
|
|||
|
"specified, that face provides the @code{face} property for characters whose "
|
|||
|
"face is not specified by @var{format}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2594
|
|||
|
msgid ""
|
|||
|
"Note that using @code{mode-line}, @code{mode-line-inactive}, or "
|
|||
|
"@code{header-line} as @var{face} will actually redisplay the mode line or "
|
|||
|
"the header line, respectively, using the current definitions of the "
|
|||
|
"corresponding face, in addition to returning the formatted string. (Other "
|
|||
|
"faces do not cause redisplay.)"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2601
|
|||
|
msgid ""
|
|||
|
"For example, @code{(format-mode-line header-line-format)} returns the text "
|
|||
|
"that would appear in the selected window's header line (@code{\"\"} if it "
|
|||
|
"has no header line). @code{(format-mode-line header-line-format "
|
|||
|
"'header-line)} returns the same text, with each character carrying the face "
|
|||
|
"that it will have in the header line itself, and also redraws the header "
|
|||
|
"line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2614
|
|||
|
msgid ""
|
|||
|
"@dfn{Imenu} is a feature that lets users select a definition or section in "
|
|||
|
"the buffer, from a menu which lists all of them, to go directly to that "
|
|||
|
"location in the buffer. Imenu works by constructing a buffer index which "
|
|||
|
"lists the names and buffer positions of the definitions, or other named "
|
|||
|
"portions of the buffer; then the user can choose one of them and move point "
|
|||
|
"to it. Major modes can add a menu bar item to use Imenu using "
|
|||
|
"@code{imenu-add-to-menubar}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2615
|
|||
|
#, no-wrap
|
|||
|
msgid "Command imenu-add-to-menubar name"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2618
|
|||
|
msgid "This function defines a local menu bar item named @var{name} to run Imenu."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2624
|
|||
|
msgid ""
|
|||
|
"The user-level commands for using Imenu are described in the Emacs Manual "
|
|||
|
"(@pxref{Imenu,, Imenu, emacs, the Emacs Manual}). This section explains how "
|
|||
|
"to customize Imenu's method of finding definitions or buffer portions for a "
|
|||
|
"particular major mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2627
|
|||
|
msgid ""
|
|||
|
"The usual and simplest way is to set the variable "
|
|||
|
"@code{imenu-generic-expression}:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2628
|
|||
|
#, no-wrap
|
|||
|
msgid "imenu-generic-expression"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2632
|
|||
|
msgid ""
|
|||
|
"This variable, if non-@code{nil}, is a list that specifies regular "
|
|||
|
"expressions for finding definitions for Imenu. Simple elements of "
|
|||
|
"@code{imenu-generic-expression} look like this:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2635
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{menu-title} @var{regexp} @var{index})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2642
|
|||
|
msgid ""
|
|||
|
"Here, if @var{menu-title} is non-@code{nil}, it says that the matches for "
|
|||
|
"this element should go in a submenu of the buffer index; @var{menu-title} "
|
|||
|
"itself specifies the name for the submenu. If @var{menu-title} is "
|
|||
|
"@code{nil}, the matches for this element go directly in the top level of the "
|
|||
|
"buffer index."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2648
|
|||
|
msgid ""
|
|||
|
"The second item in the list, @var{regexp}, is a regular expression "
|
|||
|
"(@pxref{Regular Expressions}); anything in the buffer that it matches is "
|
|||
|
"considered a definition, something to mention in the buffer index. The "
|
|||
|
"third item, @var{index}, is a non-negative integer that indicates which "
|
|||
|
"subexpression in @var{regexp} matches the definition's name."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2650
|
|||
|
msgid "An element can also look like this:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2653
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(@var{menu-title} @var{regexp} @var{index} @var{function} "
|
|||
|
"@var{arguments}@dots{})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2658
|
|||
|
msgid ""
|
|||
|
"Each match for this element creates an index item, and when the index item "
|
|||
|
"is selected by the user, it calls @var{function} with arguments consisting "
|
|||
|
"of the item name, the buffer position, and @var{arguments}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2661
|
|||
|
msgid "For Emacs Lisp mode, @code{imenu-generic-expression} could look like this:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2667
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"((nil \"^\\\\s-*(def\\\\(un\\\\|subst\\\\|macro\\\\|advice\\\\)\\\n"
|
|||
|
"\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2671
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" (\"*Vars*\" \"^\\\\s-*(def\\\\(var\\\\|const\\\\)\\\n"
|
|||
|
"\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2677
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" (\"*Types*\"\n"
|
|||
|
" \"^\\\\s-*\\\n"
|
|||
|
"(def\\\\(type\\\\|struct\\\\|class\\\\|ine-condition\\\\)\\\n"
|
|||
|
"\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2681
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2690
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2722
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2737
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2746
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2794
|
|||
|
msgid "Setting this variable makes it buffer-local in the current buffer."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2683
|
|||
|
#, no-wrap
|
|||
|
msgid "imenu-case-fold-search"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2688
|
|||
|
msgid ""
|
|||
|
"This variable controls whether matching against the regular expressions in "
|
|||
|
"the value of @code{imenu-generic-expression} is case-sensitive: @code{t}, "
|
|||
|
"the default, means matching should ignore case."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2692
|
|||
|
#, no-wrap
|
|||
|
msgid "imenu-syntax-alist"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2696
|
|||
|
msgid ""
|
|||
|
"This variable is an alist of syntax table modifiers to use while processing "
|
|||
|
"@code{imenu-generic-expression}, to override the syntax table of the current "
|
|||
|
"buffer. Each element should have this form:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2699
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{characters} . @var{syntax-description})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2705
|
|||
|
msgid ""
|
|||
|
"The @sc{car}, @var{characters}, can be either a character or a string. The "
|
|||
|
"element says to give that character or characters the syntax specified by "
|
|||
|
"@var{syntax-description}, which is passed to @code{modify-syntax-entry} "
|
|||
|
"(@pxref{Syntax Table Functions})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2710
|
|||
|
msgid ""
|
|||
|
"This feature is typically used to give word syntax to characters which "
|
|||
|
"normally have symbol syntax, and thus to simplify "
|
|||
|
"@code{imenu-generic-expression} and speed up matching. For example, Fortran "
|
|||
|
"mode uses it this way:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2713
|
|||
|
#, no-wrap
|
|||
|
msgid "(setq imenu-syntax-alist '((\"_$\" . \"w\")))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2720
|
|||
|
msgid ""
|
|||
|
"The @code{imenu-generic-expression} regular expressions can then use "
|
|||
|
"@samp{\\\\sw+} instead of @samp{\\\\(\\\\sw\\\\|\\\\s_\\\\)+}. Note that "
|
|||
|
"this technique may be inconvenient when the mode needs to limit the initial "
|
|||
|
"character of a name to a smaller set of characters than are allowed in the "
|
|||
|
"rest of a name."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2727
|
|||
|
msgid ""
|
|||
|
"Another way to customize Imenu for a major mode is to set the variables "
|
|||
|
"@code{imenu-prev-index-position-function} and "
|
|||
|
"@code{imenu-extract-index-name-function}:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2728
|
|||
|
#, no-wrap
|
|||
|
msgid "imenu-prev-index-position-function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2735
|
|||
|
msgid ""
|
|||
|
"If this variable is non-@code{nil}, its value should be a function that "
|
|||
|
"finds the next definition to put in the buffer index, scanning backward in "
|
|||
|
"the buffer from point. It should return @code{nil} if it doesn't find "
|
|||
|
"another definition before point. Otherwise it should leave point at the "
|
|||
|
"place it finds a definition and return any non-@code{nil} value."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2739
|
|||
|
#, no-wrap
|
|||
|
msgid "imenu-extract-index-name-function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2744
|
|||
|
msgid ""
|
|||
|
"If this variable is non-@code{nil}, its value should be a function to return "
|
|||
|
"the name for a definition, assuming point is in that definition as the "
|
|||
|
"@code{imenu-prev-index-position-function} function would leave it."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2750
|
|||
|
msgid ""
|
|||
|
"The last way to customize Imenu for a major mode is to set the variable "
|
|||
|
"@code{imenu-create-index-function}:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2751
|
|||
|
#, no-wrap
|
|||
|
msgid "imenu-create-index-function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2756
|
|||
|
msgid ""
|
|||
|
"This variable specifies the function to use for creating a buffer index. "
|
|||
|
"The function should take no arguments, and return an index alist for the "
|
|||
|
"current buffer. It is called within @code{save-excursion}, so where it "
|
|||
|
"leaves point makes no difference."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2759
|
|||
|
msgid ""
|
|||
|
"The index alist can have three types of elements. Simple elements look like "
|
|||
|
"this:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2762
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{index-name} . @var{index-position})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2766
|
|||
|
msgid ""
|
|||
|
"Selecting a simple element has the effect of moving to position "
|
|||
|
"@var{index-position} in the buffer. Special elements look like this:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2769
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(@var{index-name} @var{index-position} @var{function} "
|
|||
|
"@var{arguments}@dots{})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2772
|
|||
|
msgid "Selecting a special element performs:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2776
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(funcall @var{function}\n"
|
|||
|
" @var{index-name} @var{index-position} @var{arguments}@dots{})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2779
|
|||
|
msgid "A nested sub-alist element looks like this:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2782
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{menu-title} . @var{sub-alist})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2785
|
|||
|
msgid "It creates the submenu @var{menu-title} specified by @var{sub-alist}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2792
|
|||
|
msgid ""
|
|||
|
"The default value of @code{imenu-create-index-function} is "
|
|||
|
"@code{imenu-default-create-index-function}. This function calls the value "
|
|||
|
"of @code{imenu-prev-index-position-function} and the value of "
|
|||
|
"@code{imenu-extract-index-name-function} to produce the index alist. "
|
|||
|
"However, if either of these two variables is @code{nil}, the default "
|
|||
|
"function uses @code{imenu-generic-expression} instead."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2798
|
|||
|
#, no-wrap
|
|||
|
msgid "Font Lock mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2799
|
|||
|
#, no-wrap
|
|||
|
msgid "syntax highlighting and coloring"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2807
|
|||
|
msgid ""
|
|||
|
"@dfn{Font Lock mode} is a buffer-local minor mode that automatically "
|
|||
|
"attaches @code{face} properties to certain parts of the buffer based on "
|
|||
|
"their syntactic role. How it parses the buffer depends on the major mode; "
|
|||
|
"most major modes define syntactic criteria for which faces to use in which "
|
|||
|
"contexts. This section explains how to customize Font Lock for a particular "
|
|||
|
"major mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2813
|
|||
|
msgid ""
|
|||
|
"Font Lock mode finds text to highlight in two ways: through syntactic "
|
|||
|
"parsing based on the syntax table, and through searching (usually for "
|
|||
|
"regular expressions). Syntactic fontification happens first; it finds "
|
|||
|
"comments and string constants and highlights them. Search-based "
|
|||
|
"fontification happens second."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2829
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2830
|
|||
|
#, no-wrap
|
|||
|
msgid "Font Lock Basics"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
msgid "Overview of customizing Font Lock."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2951
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2952
|
|||
|
#, no-wrap
|
|||
|
msgid "Search-based Fontification"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
msgid "Fontification based on regexps."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3181
|
|||
|
#, no-wrap
|
|||
|
msgid "Customizing Keywords"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
msgid "Customizing search-based fontification."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3256
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3257
|
|||
|
#, no-wrap
|
|||
|
msgid "Other Font Lock Variables"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
msgid "Additional customization facilities."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3354
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3355
|
|||
|
#, no-wrap
|
|||
|
msgid "Levels of Font Lock"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
msgid ""
|
|||
|
"Each mode can define alternative levels so that the user can select more or "
|
|||
|
"less."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3386
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3387
|
|||
|
#, no-wrap
|
|||
|
msgid "Precalculated Fontification"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
msgid ""
|
|||
|
"How Lisp programs that produce the buffer contents can also specify how to "
|
|||
|
"fontify it."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3410
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3411
|
|||
|
#, no-wrap
|
|||
|
msgid "Faces for Font Lock"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
msgid "Special faces specifically for Font Lock."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3499
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3500
|
|||
|
#, no-wrap
|
|||
|
msgid "Syntactic Font Lock"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
msgid "Fontification based on syntax tables."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3559
|
|||
|
#, no-wrap
|
|||
|
msgid "Multiline Font Lock"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2827
|
|||
|
msgid "How to coerce Font Lock into properly highlighting multiline constructs."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2842
|
|||
|
msgid ""
|
|||
|
"The Font Lock functionality is based on several basic functions. Each of "
|
|||
|
"these calls the function specified by the corresponding variable. This "
|
|||
|
"indirection allows major and minor modes to modify the way fontification "
|
|||
|
"works in the buffers of that mode, and even use the Font Lock mechanisms for "
|
|||
|
"features that have nothing to do with fontification. (This is why the "
|
|||
|
"description below says ``should'' when it describes what the functions do: "
|
|||
|
"the mode can customize the values of the corresponding variables to do "
|
|||
|
"something entirely different.) The variables mentioned below are described "
|
|||
|
"in @ref{Other Font Lock Variables}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2844
|
|||
|
msgid "@ftable @code"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2844
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-fontify-buffer"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2848
|
|||
|
msgid ""
|
|||
|
"This function should fontify the current buffer's accessible portion, by "
|
|||
|
"calling the function specified by @code{font-lock-fontify-buffer-function}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2849
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-unfontify-buffer"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2852
|
|||
|
msgid ""
|
|||
|
"Used when turning Font Lock off to remove the fontification. Calls the "
|
|||
|
"function specified by @code{font-lock-unfontify-buffer-function}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2853
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-fontify-region beg end &optional loudly"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2858
|
|||
|
msgid ""
|
|||
|
"Should fontify the region between @var{beg} and @var{end}. If @var{loudly} "
|
|||
|
"is non-@code{nil}, should display status messages while fontifying. Calls "
|
|||
|
"the function specified by @code{font-lock-fontify-region-function}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2859
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-unfontify-region beg end"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2863
|
|||
|
msgid ""
|
|||
|
"Should remove fontification from the region between @var{beg} and "
|
|||
|
"@var{end}. Calls the function specified by "
|
|||
|
"@code{font-lock-unfontify-region-function}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2864
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-flush &optional beg end"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2870
|
|||
|
msgid ""
|
|||
|
"This function should mark the fontification of the region between @var{beg} "
|
|||
|
"and @var{end} as outdated. If not specified or @code{nil}, @var{beg} and "
|
|||
|
"@var{end} default to the beginning and end of the buffer's accessible "
|
|||
|
"portion. Calls the function specified by @code{font-lock-flush-function}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2871
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-ensure &optional beg end"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2877
|
|||
|
msgid ""
|
|||
|
"This function should make sure the region between @var{beg} and @var{end} "
|
|||
|
"has been fontified. The optional arguments @var{beg} and @var{end} default "
|
|||
|
"to the beginning and the end of the buffer's accessible portion. Calls the "
|
|||
|
"function specified by @code{font-lock-ensure-function}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2878
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-debug-fontify"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2883
|
|||
|
msgid ""
|
|||
|
"This is a convenience command meant to be used when developing font locking "
|
|||
|
"for a mode, and should not be called from Lisp code. It recomputes all the "
|
|||
|
"relevant variables and then calls @code{font-lock-fontify-region} on the "
|
|||
|
"entire buffer."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2890
|
|||
|
msgid ""
|
|||
|
"There are several variables that control how Font Lock mode highlights "
|
|||
|
"text. But major modes should not set any of these variables directly. "
|
|||
|
"Instead, they should set @code{font-lock-defaults} as a buffer-local "
|
|||
|
"variable. The value assigned to this variable is used, if and when Font "
|
|||
|
"Lock mode is enabled, to set all the other variables."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2891
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-defaults"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2898
|
|||
|
msgid ""
|
|||
|
"This variable is set by modes to specify how to fontify text in that mode. "
|
|||
|
"It automatically becomes buffer-local when set. If its value is @code{nil}, "
|
|||
|
"Font Lock mode does no highlighting, and you can use the @samp{Faces} menu "
|
|||
|
"(under @samp{Edit} and then @samp{Text Properties} in the menu bar) to "
|
|||
|
"assign faces explicitly to text in the buffer."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2900
|
|||
|
msgid "If non-@code{nil}, the value should look like this:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2904
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(@var{keywords} [@var{keywords-only} [@var{case-fold}\n"
|
|||
|
" [@var{syntax-alist} @var{other-vars}@dots{}]]])\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2916
|
|||
|
msgid ""
|
|||
|
"The first element, @var{keywords}, indirectly specifies the value of "
|
|||
|
"@code{font-lock-keywords} which directs search-based fontification. It can "
|
|||
|
"be a symbol, a variable or a function whose value is the list to use for "
|
|||
|
"@code{font-lock-keywords}. It can also be a list of several such symbols, "
|
|||
|
"one for each possible level of fontification. The first symbol specifies "
|
|||
|
"the @samp{mode default} level of fontification, the next symbol level 1 "
|
|||
|
"fontification, the next level 2, and so on. The @samp{mode default} level "
|
|||
|
"is normally the same as level 1. It is used when "
|
|||
|
"@code{font-lock-maximum-decoration} has a @code{nil} value. @xref{Levels of "
|
|||
|
"Font Lock}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2922
|
|||
|
msgid ""
|
|||
|
"The second element, @var{keywords-only}, specifies the value of the variable "
|
|||
|
"@code{font-lock-keywords-only}. If this is omitted or @code{nil}, syntactic "
|
|||
|
"fontification (of strings and comments) is also performed. If this is "
|
|||
|
"non-@code{nil}, syntactic fontification is not performed. @xref{Syntactic "
|
|||
|
"Font Lock}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2926
|
|||
|
msgid ""
|
|||
|
"The third element, @var{case-fold}, specifies the value of "
|
|||
|
"@code{font-lock-keywords-case-fold-search}. If it is non-@code{nil}, Font "
|
|||
|
"Lock mode ignores case during search-based fontification."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2934
|
|||
|
msgid ""
|
|||
|
"If the fourth element, @var{syntax-alist}, is non-@code{nil}, it should be a "
|
|||
|
"list of cons cells of the form @code{(@var{char-or-string} "
|
|||
|
". @var{string})}. These are used to set up a syntax table for syntactic "
|
|||
|
"fontification; the resulting syntax table is stored in "
|
|||
|
"@code{font-lock-syntax-table}. If @var{syntax-alist} is omitted or "
|
|||
|
"@code{nil}, syntactic fontification uses the syntax table returned by the "
|
|||
|
"@code{syntax-table} function. @xref{Syntax Table Functions}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2942
|
|||
|
msgid ""
|
|||
|
"All the remaining elements (if any) are collectively called "
|
|||
|
"@var{other-vars}. Each of these elements should have the form "
|
|||
|
"@code{(@var{variable} . @var{value})}---which means, make @var{variable} "
|
|||
|
"buffer-local and then set it to @var{value}. You can use these "
|
|||
|
"@var{other-vars} to set other variables that affect fontification, aside "
|
|||
|
"from those you can control with the first five elements. @xref{Other Font "
|
|||
|
"Lock Variables}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2950
|
|||
|
msgid ""
|
|||
|
"If your mode fontifies text explicitly by adding @code{font-lock-face} "
|
|||
|
"properties, it can specify @code{(nil t)} for @code{font-lock-defaults} to "
|
|||
|
"turn off all automatic fontification. However, this is not required; it is "
|
|||
|
"possible to fontify some things using @code{font-lock-face} properties and "
|
|||
|
"set up automatic fontification for other parts of the text."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2957
|
|||
|
msgid ""
|
|||
|
"The variable which directly controls search-based fontification is "
|
|||
|
"@code{font-lock-keywords}, which is typically specified via the "
|
|||
|
"@var{keywords} element in @code{font-lock-defaults}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2958
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-keywords"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2965
|
|||
|
msgid ""
|
|||
|
"The value of this variable is a list of the keywords to highlight. Lisp "
|
|||
|
"programs should not set this variable directly. Normally, the value is "
|
|||
|
"automatically set by Font Lock mode, using the @var{keywords} element in "
|
|||
|
"@code{font-lock-defaults}. The value can also be altered using the "
|
|||
|
"functions @code{font-lock-add-keywords} and @code{font-lock-remove-keywords} "
|
|||
|
"(@pxref{Customizing Keywords})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2974
|
|||
|
msgid ""
|
|||
|
"Each element of @code{font-lock-keywords} specifies how to find certain "
|
|||
|
"cases of text, and how to highlight those cases. Font Lock mode processes "
|
|||
|
"the elements of @code{font-lock-keywords} one by one, and for each element, "
|
|||
|
"it finds and handles all matches. Ordinarily, once part of the text has "
|
|||
|
"been fontified already, this cannot be overridden by a subsequent match in "
|
|||
|
"the same text; but you can specify different behavior using the "
|
|||
|
"@var{override} element of a @var{subexp-highlighter}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2977
|
|||
|
msgid "Each element of @code{font-lock-keywords} should have one of these forms:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: var{#1}
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2979
|
|||
|
#, no-wrap
|
|||
|
msgid "regexp"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2982
|
|||
|
msgid ""
|
|||
|
"Highlight all matches for @var{regexp} using @code{font-lock-keyword-face}. "
|
|||
|
"For example,"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2987
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
";; @r{Highlight occurrences of the word @samp{foo}}\n"
|
|||
|
";; @r{using @code{font-lock-keyword-face}.}\n"
|
|||
|
"\"\\\\<foo\\\\>\"\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2993
|
|||
|
msgid ""
|
|||
|
"Be careful when composing these regular expressions; a poorly written "
|
|||
|
"pattern can dramatically slow things down! The function @code{regexp-opt} "
|
|||
|
"(@pxref{Regexp Functions}) is useful for calculating optimal regular "
|
|||
|
"expressions to match several keywords."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: var{#1}
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2994
|
|||
|
#, no-wrap
|
|||
|
msgid "function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:2997
|
|||
|
msgid ""
|
|||
|
"Find text by calling @var{function}, and highlight the matches it finds "
|
|||
|
"using @code{font-lock-keyword-face}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3003
|
|||
|
msgid ""
|
|||
|
"When @var{function} is called, it receives one argument, the limit of the "
|
|||
|
"search; it should begin searching at point, and not search beyond the "
|
|||
|
"limit. It should return non-@code{nil} if it succeeds, and set the match "
|
|||
|
"data to describe the match that was found. Returning @code{nil} indicates "
|
|||
|
"failure of the search."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3008
|
|||
|
msgid ""
|
|||
|
"Fontification will call @var{function} repeatedly with the same limit, and "
|
|||
|
"with point where the previous invocation left it, until @var{function} "
|
|||
|
"fails. On failure, @var{function} need not reset point in any particular "
|
|||
|
"way."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3009
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{matcher} . @var{subexp})"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3014
|
|||
|
msgid ""
|
|||
|
"In this kind of element, @var{matcher} is either a regular expression or a "
|
|||
|
"function, as described above. The @sc{cdr}, @var{subexp}, specifies which "
|
|||
|
"subexpression of @var{matcher} should be highlighted (instead of the entire "
|
|||
|
"text that @var{matcher} matched)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3019
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
";; @r{Highlight the @samp{bar} in each occurrence of @samp{fubar},}\n"
|
|||
|
";; @r{using @code{font-lock-keyword-face}.}\n"
|
|||
|
"(\"fu\\\\(bar\\\\)\" . 1)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3021
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{matcher} . @var{facespec})"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3026
|
|||
|
msgid ""
|
|||
|
"In this kind of element, @var{facespec} is an expression whose value "
|
|||
|
"specifies the face to use for highlighting. In the simplest case, "
|
|||
|
"@var{facespec} is a Lisp variable (a symbol) whose value is a face name."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3031
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
";; @r{Highlight occurrences of @samp{fubar},}\n"
|
|||
|
";; @r{using the face which is the value of @code{fubar-face}.}\n"
|
|||
|
"(\"fubar\" . fubar-face)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3034
|
|||
|
msgid "However, @var{facespec} can also evaluate to a list of this form:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3038
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(@var{subexp}\n"
|
|||
|
"(face @var{face} @var{prop1} @var{val1} @var{prop2} @var{val2}@dots{}))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3049
|
|||
|
msgid ""
|
|||
|
"to specify the face @var{face} and various additional text properties to put "
|
|||
|
"on the text that matches. If you do this, be sure to add the other text "
|
|||
|
"property names that you set in this way to the value of "
|
|||
|
"@code{font-lock-extra-managed-props} so that the properties will also be "
|
|||
|
"cleared out when they are no longer appropriate. Alternatively, you can set "
|
|||
|
"the variable @code{font-lock-unfontify-region-function} to a function that "
|
|||
|
"clears these properties. @xref{Other Font Lock Variables}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3050
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{matcher} . @var{subexp-highlighter})"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3054
|
|||
|
msgid ""
|
|||
|
"In this kind of element, @var{subexp-highlighter} is a list which specifies "
|
|||
|
"how to highlight matches found by @var{matcher}. It has the form:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3057
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{subexp} @var{facespec} [@var{override} [@var{laxmatch}]])\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3063
|
|||
|
msgid ""
|
|||
|
"The @sc{car}, @var{subexp}, is an integer specifying which subexpression of "
|
|||
|
"the match to fontify (0 means the entire matching text). The second "
|
|||
|
"subelement, @var{facespec}, is an expression whose value specifies the face, "
|
|||
|
"as described above."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3073
|
|||
|
msgid ""
|
|||
|
"The last two values in @var{subexp-highlighter}, @var{override} and "
|
|||
|
"@var{laxmatch}, are optional flags. If @var{override} is @code{t}, this "
|
|||
|
"element can override existing fontification made by previous elements of "
|
|||
|
"@code{font-lock-keywords}. If it is @code{keep}, then each character is "
|
|||
|
"fontified if it has not been fontified already by some other element. If it "
|
|||
|
"is @code{prepend}, the face specified by @var{facespec} is added to the "
|
|||
|
"beginning of the @code{font-lock-face} property. If it is @code{append}, "
|
|||
|
"the face is added to the end of the @code{font-lock-face} property."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3081
|
|||
|
msgid ""
|
|||
|
"If @var{laxmatch} is non-@code{nil}, it means there should be no error if "
|
|||
|
"there is no subexpression numbered @var{subexp} in @var{matcher}. "
|
|||
|
"Obviously, fontification of the subexpression numbered @var{subexp} will not "
|
|||
|
"occur. However, fontification of other subexpressions (and other regexps) "
|
|||
|
"will continue. If @var{laxmatch} is @code{nil}, and the specified "
|
|||
|
"subexpression is missing, then an error is signaled which terminates "
|
|||
|
"search-based fontification."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3083
|
|||
|
msgid "Here are some examples of elements of this kind, and what they do:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: smallexample
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3089
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
";; @r{Highlight occurrences of either @samp{foo} or @samp{bar}, using}\n"
|
|||
|
";; @r{@code{foo-bar-face}, even if they have already been highlighted.}\n"
|
|||
|
";; @r{@code{foo-bar-face} should be a variable whose value is a face.}\n"
|
|||
|
"(\"foo\\\\|bar\" 0 foo-bar-face t)\n"
|
|||
|
"\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: smallexample
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3094
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
";; @r{Highlight the first subexpression within each occurrence}\n"
|
|||
|
";; @r{that the function @code{fubar-match} finds,}\n"
|
|||
|
";; @r{using the face which is the value of @code{fubar-face}.}\n"
|
|||
|
"(fubar-match 1 fubar-face)\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3096
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{matcher} . @var{anchored-highlighter})"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3102
|
|||
|
msgid ""
|
|||
|
"In this kind of element, @var{anchored-highlighter} specifies how to "
|
|||
|
"highlight text that follows a match found by @var{matcher}. So a match "
|
|||
|
"found by @var{matcher} acts as the anchor for further searches specified by "
|
|||
|
"@var{anchored-highlighter}. @var{anchored-highlighter} is a list of the "
|
|||
|
"following form:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3106
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(@var{anchored-matcher} @var{pre-form} @var{post-form}\n"
|
|||
|
" @var{subexp-highlighters}@dots{})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3115
|
|||
|
msgid ""
|
|||
|
"Here, @var{anchored-matcher}, like @var{matcher}, is either a regular "
|
|||
|
"expression or a function. After a match of @var{matcher} is found, point is "
|
|||
|
"at the end of the match. Now, Font Lock evaluates the form @var{pre-form}. "
|
|||
|
"Then it searches for matches of @var{anchored-matcher} and uses "
|
|||
|
"@var{subexp-highlighters} to highlight these. A @var{subexp-highlighter} is "
|
|||
|
"as described above. Finally, Font Lock evaluates @var{post-form}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3122
|
|||
|
msgid ""
|
|||
|
"The forms @var{pre-form} and @var{post-form} can be used to initialize "
|
|||
|
"before, and cleanup after, @var{anchored-matcher} is used. Typically, "
|
|||
|
"@var{pre-form} is used to move point to some position relative to the match "
|
|||
|
"of @var{matcher}, before starting with @var{anchored-matcher}. "
|
|||
|
"@var{post-form} might be used to move back, before resuming with "
|
|||
|
"@var{matcher}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3131
|
|||
|
msgid ""
|
|||
|
"After Font Lock evaluates @var{pre-form}, it does not search for "
|
|||
|
"@var{anchored-matcher} beyond the end of the line. However, if "
|
|||
|
"@var{pre-form} returns a buffer position that is greater than the position "
|
|||
|
"of point after @var{pre-form} is evaluated, then the position returned by "
|
|||
|
"@var{pre-form} is used as the limit of the search instead. It is generally "
|
|||
|
"a bad idea to return a position greater than the end of the line; in other "
|
|||
|
"words, the @var{anchored-matcher} search should not span lines."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: smallexample
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3139
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
";; @r{Highlight occurrences of the word @samp{item} following}\n"
|
|||
|
";; @r{an occurrence of the word @samp{anchor} (on the same line)}\n"
|
|||
|
";; @r{in the value of @code{item-face}.}\n"
|
|||
|
"(\"\\\\<anchor\\\\>\" \"\\\\<item\\\\>\" nil nil (0 item-face))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3145
|
|||
|
msgid ""
|
|||
|
"Here, @var{pre-form} and @var{post-form} are @code{nil}. Therefore "
|
|||
|
"searching for @samp{item} starts at the end of the match of @samp{anchor}, "
|
|||
|
"and searching for subsequent instances of @samp{anchor} resumes from where "
|
|||
|
"searching for @samp{item} concluded."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3146
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{matcher} @var{highlighters}@dots{})"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3151
|
|||
|
msgid ""
|
|||
|
"This sort of element specifies several @var{highlighter} lists for a single "
|
|||
|
"@var{matcher}. A @var{highlighter} list can be of the type "
|
|||
|
"@var{subexp-highlighter} or @var{anchored-highlighter} as described above."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: smallexample
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3160
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
";; @r{Highlight occurrences of the word @samp{anchor} in the value}\n"
|
|||
|
";; @r{of @code{anchor-face}, and subsequent occurrences of the word}\n"
|
|||
|
";; @r{@samp{item} (on the same line) in the value of @code{item-face}.}\n"
|
|||
|
"(\"\\\\<anchor\\\\>\" (0 anchor-face)\n"
|
|||
|
" (\"\\\\<item\\\\>\" nil nil (0 item-face)))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: item
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3162
|
|||
|
#, no-wrap
|
|||
|
msgid "(eval . @var{form})"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3166
|
|||
|
msgid ""
|
|||
|
"Here @var{form} is an expression to be evaluated the first time this value "
|
|||
|
"of @code{font-lock-keywords} is used in a buffer. Its value should have one "
|
|||
|
"of the forms described in this table."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3171
|
|||
|
msgid ""
|
|||
|
"@strong{Warning:} Do not design an element of @code{font-lock-keywords} to "
|
|||
|
"match text which spans lines; this does not work reliably. For details, "
|
|||
|
"@pxref{Multiline Font Lock}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3175
|
|||
|
msgid ""
|
|||
|
"You can use @var{case-fold} in @code{font-lock-defaults} to specify the "
|
|||
|
"value of @code{font-lock-keywords-case-fold-search} which says whether "
|
|||
|
"search-based fontification should be case-insensitive."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3176
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-keywords-case-fold-search"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3179
|
|||
|
msgid ""
|
|||
|
"Non-@code{nil} means that regular expression matching for the sake of "
|
|||
|
"@code{font-lock-keywords} should be case-insensitive."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3182
|
|||
|
#, no-wrap
|
|||
|
msgid "Customizing Search-Based Fontification"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3187
|
|||
|
msgid ""
|
|||
|
"You can use @code{font-lock-add-keywords} to add additional search-based "
|
|||
|
"fontification rules to a major mode, and @code{font-lock-remove-keywords} to "
|
|||
|
"remove rules."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3188
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-add-keywords mode keywords &optional how"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3192
|
|||
|
msgid ""
|
|||
|
"This function adds highlighting @var{keywords}, for the current buffer or "
|
|||
|
"for major mode @var{mode}. The argument @var{keywords} should be a list "
|
|||
|
"with the same format as the variable @code{font-lock-keywords}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3198
|
|||
|
msgid ""
|
|||
|
"If @var{mode} is a symbol which is a major mode command name, such as "
|
|||
|
"@code{c-mode}, the effect is that enabling Font Lock mode in @var{mode} will "
|
|||
|
"add @var{keywords} to @code{font-lock-keywords}. Calling with a "
|
|||
|
"non-@code{nil} value of @var{mode} is correct only in your @file{~/.emacs} "
|
|||
|
"file."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3202
|
|||
|
msgid ""
|
|||
|
"If @var{mode} is @code{nil}, this function adds @var{keywords} to "
|
|||
|
"@code{font-lock-keywords} in the current buffer. This way of calling "
|
|||
|
"@code{font-lock-add-keywords} is usually used in mode hook functions."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3208
|
|||
|
msgid ""
|
|||
|
"By default, @var{keywords} are added at the beginning of "
|
|||
|
"@code{font-lock-keywords}. If the optional argument @var{how} is "
|
|||
|
"@code{set}, they are used to replace the value of "
|
|||
|
"@code{font-lock-keywords}. If @var{how} is any other non-@code{nil} value, "
|
|||
|
"they are added at the end of @code{font-lock-keywords}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3213
|
|||
|
msgid ""
|
|||
|
"Some modes provide specialized support you can use in additional "
|
|||
|
"highlighting patterns. See the variables @code{c-font-lock-extra-types}, "
|
|||
|
"@code{c++-font-lock-extra-types}, and @code{java-font-lock-extra-types}, for "
|
|||
|
"example."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3220
|
|||
|
msgid ""
|
|||
|
"@strong{Warning:} Major mode commands must not call "
|
|||
|
"@code{font-lock-add-keywords} under any circumstances, either directly or "
|
|||
|
"indirectly, except through their mode hooks. (Doing so would lead to "
|
|||
|
"incorrect behavior for some minor modes.) They should set up their rules "
|
|||
|
"for search-based fontification by setting @code{font-lock-keywords}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3222
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-remove-keywords mode keywords"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3230
|
|||
|
msgid ""
|
|||
|
"This function removes @var{keywords} from @code{font-lock-keywords} for the "
|
|||
|
"current buffer or for major mode @var{mode}. As in "
|
|||
|
"@code{font-lock-add-keywords}, @var{mode} should be a major mode command "
|
|||
|
"name or @code{nil}. All the caveats and requirements for "
|
|||
|
"@code{font-lock-add-keywords} apply here too. The argument @var{keywords} "
|
|||
|
"must exactly match the one used by the corresponding "
|
|||
|
"@code{font-lock-add-keywords}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3236
|
|||
|
msgid ""
|
|||
|
"For example, the following code adds two fontification patterns for C mode: "
|
|||
|
"one to fontify the word @samp{FIXME}, even in comments, and another to "
|
|||
|
"fontify the words @samp{and}, @samp{or} and @samp{not} as keywords."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: smallexample
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3241
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(font-lock-add-keywords 'c-mode\n"
|
|||
|
" '((\"\\\\<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend)\n"
|
|||
|
" (\"\\\\<\\\\(and\\\\|or\\\\|not\\\\)\\\\>\" . font-lock-keyword-face)))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3246
|
|||
|
msgid ""
|
|||
|
"This example affects only C mode proper. To add the same patterns to C mode "
|
|||
|
"@emph{and} all modes derived from it, do this instead:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: smallexample
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3254
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(add-hook 'c-mode-hook\n"
|
|||
|
" (lambda ()\n"
|
|||
|
" (font-lock-add-keywords nil\n"
|
|||
|
" '((\"\\\\<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend)\n"
|
|||
|
" (\"\\\\<\\\\(and\\\\|or\\\\|not\\\\)\\\\>\" .\n"
|
|||
|
" font-lock-keyword-face)))))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3262
|
|||
|
msgid ""
|
|||
|
"This section describes additional variables that a major mode can set by "
|
|||
|
"means of @var{other-vars} in @code{font-lock-defaults} (@pxref{Font Lock "
|
|||
|
"Basics})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3263
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-mark-block-function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3267
|
|||
|
msgid ""
|
|||
|
"If this variable is non-@code{nil}, it should be a function that is called "
|
|||
|
"with no arguments, to choose an enclosing range of text for refontification "
|
|||
|
"for the command @kbd{M-x font-lock-fontify-block}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3273
|
|||
|
msgid ""
|
|||
|
"The function should report its choice by placing the region around it. A "
|
|||
|
"good choice is a range of text large enough to give proper results, but not "
|
|||
|
"too large so that refontification becomes slow. Typical values are "
|
|||
|
"@code{mark-defun} for programming modes or @code{mark-paragraph} for textual "
|
|||
|
"modes."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3275
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-extra-managed-props"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3283
|
|||
|
msgid ""
|
|||
|
"This variable specifies additional properties (other than "
|
|||
|
"@code{font-lock-face}) that are being managed by Font Lock mode. It is used "
|
|||
|
"by @code{font-lock-default-unfontify-region}, which normally only manages "
|
|||
|
"the @code{font-lock-face} property. If you want Font Lock to manage other "
|
|||
|
"properties as well, you must specify them in a @var{facespec} in "
|
|||
|
"@code{font-lock-keywords} as well as add them to this list. "
|
|||
|
"@xref{Search-based Fontification}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3285
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-fontify-buffer-function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3288
|
|||
|
msgid ""
|
|||
|
"Function to use for fontifying the buffer. The default value is "
|
|||
|
"@code{font-lock-default-fontify-buffer}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3290
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-unfontify-buffer-function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3294
|
|||
|
msgid ""
|
|||
|
"Function to use for unfontifying the buffer. This is used when turning off "
|
|||
|
"Font Lock mode. The default value is "
|
|||
|
"@code{font-lock-default-unfontify-buffer}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3296
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-fontify-region-function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3302
|
|||
|
msgid ""
|
|||
|
"Function to use for fontifying a region. It should take two arguments, the "
|
|||
|
"beginning and end of the region, and an optional third argument "
|
|||
|
"@var{verbose}. If @var{verbose} is non-@code{nil}, the function should "
|
|||
|
"print status messages. The default value is "
|
|||
|
"@code{font-lock-default-fontify-region}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3304
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-unfontify-region-function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3308
|
|||
|
msgid ""
|
|||
|
"Function to use for unfontifying a region. It should take two arguments, "
|
|||
|
"the beginning and end of the region. The default value is "
|
|||
|
"@code{font-lock-default-unfontify-region}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3310
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-flush-function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3315
|
|||
|
msgid ""
|
|||
|
"Function to use for declaring that a region's fontification is out of date. "
|
|||
|
"It takes two arguments, the beginning and end of the region. The default "
|
|||
|
"value of this variable is @code{font-lock-after-change-function}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3317
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-ensure-function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3324
|
|||
|
msgid ""
|
|||
|
"Function to use for making sure a region of the current buffer has been "
|
|||
|
"fontified. It is called with two arguments, the beginning and end of the "
|
|||
|
"region. The default value of this variable is a function that calls "
|
|||
|
"@code{font-lock-default-fontify-buffer} if the buffer is not fontified; the "
|
|||
|
"effect is to make sure the entire accessible portion of the buffer is "
|
|||
|
"fontified."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3326
|
|||
|
#, no-wrap
|
|||
|
msgid "jit-lock-register function &optional contextual"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3337
|
|||
|
msgid ""
|
|||
|
"This function tells Font Lock mode to run the Lisp function @var{function} "
|
|||
|
"any time it has to fontify or refontify part of the current buffer. It "
|
|||
|
"calls @var{function} before calling the default fontification functions, and "
|
|||
|
"gives it two arguments, @var{start} and @var{end}, which specify the region "
|
|||
|
"to be fontified or refontified. If @var{function} performs fontifications, "
|
|||
|
"it can return a list of the form @w{@code{(jit-lock-bounds @var{beg} "
|
|||
|
". @var{end})}}, to indicate the bounds of the region it actually fontified; "
|
|||
|
"JIT font-lock will use this information to optimize subsequent redisplay "
|
|||
|
"cycles and regions of buffer text it will pass to future calls to "
|
|||
|
"@var{function}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3342
|
|||
|
msgid ""
|
|||
|
"The optional argument @var{contextual}, if non-@code{nil}, forces Font Lock "
|
|||
|
"mode to always refontify a syntactically relevant part of the buffer, and "
|
|||
|
"not just the modified lines. This argument can usually be omitted."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3347
|
|||
|
msgid ""
|
|||
|
"When Font Lock is activated in a buffer, it calls this function with a "
|
|||
|
"non-@code{nil} value of @var{contextual} if the value of "
|
|||
|
"@code{font-lock-keywords-only} (@pxref{Syntactic Font Lock}) is @code{nil}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3349
|
|||
|
#, no-wrap
|
|||
|
msgid "jit-lock-unregister function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3352
|
|||
|
msgid ""
|
|||
|
"If @var{function} was previously registered as a fontification function "
|
|||
|
"using @code{jit-lock-register}, this function unregisters it."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3364
|
|||
|
msgid ""
|
|||
|
"Some major modes offer three different levels of fontification. You can "
|
|||
|
"define multiple levels by using a list of symbols for @var{keywords} in "
|
|||
|
"@code{font-lock-defaults}. Each symbol specifies one level of "
|
|||
|
"fontification; it is up to the user to choose one of these levels, normally "
|
|||
|
"by setting @code{font-lock-maximum-decoration} (@pxref{Font Lock,,, emacs, "
|
|||
|
"the GNU Emacs Manual}). The chosen level's symbol value is used to "
|
|||
|
"initialize @code{font-lock-keywords}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3367
|
|||
|
msgid "Here are the conventions for how to define the levels of fontification:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3373
|
|||
|
msgid ""
|
|||
|
"Level 1: highlight function declarations, file directives (such as include "
|
|||
|
"or import directives), strings and comments. The idea is speed, so only the "
|
|||
|
"most important and top-level components are fontified."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3379
|
|||
|
msgid ""
|
|||
|
"Level 2: in addition to level 1, highlight all language keywords, including "
|
|||
|
"type names that act like keywords, as well as named constant values. The "
|
|||
|
"idea is that all keywords (either syntactic or semantic) should be "
|
|||
|
"fontified appropriately."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3384
|
|||
|
msgid ""
|
|||
|
"Level 3: in addition to level 2, highlight the symbols being defined in "
|
|||
|
"function and variable declarations, and all builtin function names, wherever "
|
|||
|
"they appear."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3393
|
|||
|
msgid ""
|
|||
|
"Some major modes such as @code{list-buffers} and @code{occur} construct the "
|
|||
|
"buffer text programmatically. The easiest way for them to support Font Lock "
|
|||
|
"mode is to specify the faces of text when they insert the text in the "
|
|||
|
"buffer."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3399
|
|||
|
msgid ""
|
|||
|
"The way to do this is to specify the faces in the text with the special text "
|
|||
|
"property @code{font-lock-face} (@pxref{Special Properties}). When Font Lock "
|
|||
|
"mode is enabled, this property controls the display, just like the "
|
|||
|
"@code{face} property. When Font Lock mode is disabled, "
|
|||
|
"@code{font-lock-face} has no effect on the display."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3409
|
|||
|
msgid ""
|
|||
|
"It is ok for a mode to use @code{font-lock-face} for some text and also use "
|
|||
|
"the normal Font Lock machinery. But if the mode does not use the normal "
|
|||
|
"Font Lock machinery, it should not set the variable "
|
|||
|
"@code{font-lock-defaults}. In this case the @code{face} property will not "
|
|||
|
"be overridden, so using the @code{face} property could work too. However, "
|
|||
|
"using @code{font-lock-face} is generally preferable as it allows the user to "
|
|||
|
"control the fontification by toggling @code{font-lock-mode}, and lets the "
|
|||
|
"code work regardless of whether the mode uses Font Lock machinery or not."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3412
|
|||
|
#, no-wrap
|
|||
|
msgid "faces for font lock"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3413
|
|||
|
#, no-wrap
|
|||
|
msgid "font lock faces"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3420
|
|||
|
msgid ""
|
|||
|
"Font Lock mode can highlight using any face, but Emacs defines several faces "
|
|||
|
"specifically for Font Lock to use to highlight text. These @dfn{Font Lock "
|
|||
|
"faces} are listed below. They can also be used by major modes for syntactic "
|
|||
|
"highlighting outside of Font Lock mode (@pxref{Major Mode Conventions})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3424
|
|||
|
msgid ""
|
|||
|
"Each of these symbols is both a face name, and a variable whose default "
|
|||
|
"value is the symbol itself. Thus, the default value of "
|
|||
|
"@code{font-lock-comment-face} is @code{font-lock-comment-face}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3429
|
|||
|
msgid ""
|
|||
|
"The faces are listed with descriptions of their typical usage, and in order "
|
|||
|
"of greater to lesser prominence. If a mode's syntactic categories do not "
|
|||
|
"fit well with the usage descriptions, the faces can be assigned using the "
|
|||
|
"ordering as a guide."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3431
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3432
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-warning-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3437
|
|||
|
msgid ""
|
|||
|
"for a construct that is peculiar (e.g., an unescaped confusable quote in an "
|
|||
|
"Emacs Lisp symbol like @samp{‘foo}), or that greatly changes the meaning of "
|
|||
|
"other text, like @samp{;;;###autoload} in Emacs Lisp and @samp{#error} in C."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3438
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3439
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-function-name-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3441
|
|||
|
msgid "for the name of a function being defined or declared."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3442
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3443
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-variable-name-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3445
|
|||
|
msgid "for the name of a variable being defined or declared."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3446
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3447
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-keyword-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3450
|
|||
|
msgid ""
|
|||
|
"for a keyword with special syntactic significance, like @samp{for} and "
|
|||
|
"@samp{if} in C."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3451
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3452
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-comment-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3454
|
|||
|
msgid "for comments."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3455
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3456
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-comment-delimiter-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3459
|
|||
|
msgid ""
|
|||
|
"for comments delimiters, like @samp{/*} and @samp{*/} in C@. On most "
|
|||
|
"terminals, this inherits from @code{font-lock-comment-face}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3460
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3461
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-type-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3463
|
|||
|
msgid "for the names of user-defined data types."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3464
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3465
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-constant-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3467
|
|||
|
msgid "for the names of constants, like @samp{NULL} in C."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3468
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3469
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-builtin-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3471
|
|||
|
msgid "for the names of built-in functions."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3472
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3473
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-preprocessor-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3476
|
|||
|
msgid ""
|
|||
|
"for preprocessor commands. This inherits, by default, from "
|
|||
|
"@code{font-lock-builtin-face}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3477
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3478
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-string-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3480
|
|||
|
msgid "for string constants."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3481
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3482
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-doc-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3486
|
|||
|
msgid ""
|
|||
|
"for documentation embedded in program code inside specially-formed comments "
|
|||
|
"or strings. This face inherits, by default, from "
|
|||
|
"@code{font-lock-string-face}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3487
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3488
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-doc-markup-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3493
|
|||
|
msgid ""
|
|||
|
"for mark-up elements in text using @code{font-lock-doc-face}. It is "
|
|||
|
"typically used for the mark-up constructs in documentation embedded in "
|
|||
|
"program code, following conventions such as Haddock, Javadoc or Doxygen. "
|
|||
|
"This face inherits, by default, from @code{font-lock-constant-face}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: vindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3494
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3495
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-negation-char-face"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: table
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3497
|
|||
|
msgid "for easily-overlooked negation characters."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3501
|
|||
|
#, no-wrap
|
|||
|
msgid "syntactic font lock"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3510
|
|||
|
msgid ""
|
|||
|
"Syntactic fontification uses a syntax table (@pxref{Syntax Tables}) to find "
|
|||
|
"and highlight syntactically relevant text. If enabled, it runs prior to "
|
|||
|
"search-based fontification. The variable "
|
|||
|
"@code{font-lock-syntactic-face-function}, documented below, determines which "
|
|||
|
"syntactic constructs to highlight. There are several variables that affect "
|
|||
|
"syntactic fontification; you should set them by means of "
|
|||
|
"@code{font-lock-defaults} (@pxref{Font Lock Basics})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3516
|
|||
|
msgid ""
|
|||
|
"Whenever Font Lock mode performs syntactic fontification on a stretch of "
|
|||
|
"text, it first calls the function specified by "
|
|||
|
"@code{syntax-propertize-function}. Major modes can use this to apply "
|
|||
|
"@code{syntax-table} text properties to override the buffer's syntax table in "
|
|||
|
"special cases. @xref{Syntax Properties}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3517
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-keywords-only"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3526
|
|||
|
msgid ""
|
|||
|
"If the value of this variable is non-@code{nil}, Font Lock does not do "
|
|||
|
"syntactic fontification, only search-based fontification based on "
|
|||
|
"@code{font-lock-keywords}. It is normally set by Font Lock mode based on "
|
|||
|
"the @var{keywords-only} element in @code{font-lock-defaults}. If the value "
|
|||
|
"is @code{nil}, Font Lock will call @code{jit-lock-register} (@pxref{Other "
|
|||
|
"Font Lock Variables}) to set up for automatic refontification of buffer text "
|
|||
|
"following a modified line to reflect the new syntactic context due to the "
|
|||
|
"change."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3528
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-syntax-table"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3535
|
|||
|
msgid ""
|
|||
|
"This variable holds the syntax table to use for fontification of comments "
|
|||
|
"and strings. It is normally set by Font Lock mode based on the "
|
|||
|
"@var{syntax-alist} element in @code{font-lock-defaults}. If this value is "
|
|||
|
"@code{nil}, syntactic fontification uses the buffer's syntax table (the "
|
|||
|
"value returned by the function @code{syntax-table}; @pxref{Syntax Table "
|
|||
|
"Functions})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3537
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-syntactic-face-function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3540
|
|||
|
msgid ""
|
|||
|
"If this variable is non-@code{nil}, it should be a function to determine "
|
|||
|
"which face to use for a given syntactic element (a string or a comment)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3546
|
|||
|
msgid ""
|
|||
|
"The function is called with one argument, the parse state at point returned "
|
|||
|
"by @code{parse-partial-sexp}, and should return a face. The default value "
|
|||
|
"returns @code{font-lock-comment-face} for comments and "
|
|||
|
"@code{font-lock-string-face} for strings (@pxref{Faces for Font Lock})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3549
|
|||
|
msgid ""
|
|||
|
"This variable is normally set through the ``other'' elements in "
|
|||
|
"@code{font-lock-defaults}:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: lisp
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3556
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(setq-local font-lock-defaults\n"
|
|||
|
" `(,python-font-lock-keywords\n"
|
|||
|
" nil nil nil nil\n"
|
|||
|
" (font-lock-syntactic-face-function\n"
|
|||
|
" . python-font-lock-syntactic-face-function)))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3560
|
|||
|
#, no-wrap
|
|||
|
msgid "Multiline Font Lock Constructs"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3561
|
|||
|
#, no-wrap
|
|||
|
msgid "multiline font lock"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3568
|
|||
|
msgid ""
|
|||
|
"Normally, elements of @code{font-lock-keywords} should not match across "
|
|||
|
"multiple lines; that doesn't work reliably, because Font Lock usually scans "
|
|||
|
"just part of the buffer, and it can miss a multi-line construct that crosses "
|
|||
|
"the line boundary where the scan starts. (The scan normally starts at the "
|
|||
|
"beginning of a line.)"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3579
|
|||
|
msgid ""
|
|||
|
"Making elements that match multiline constructs work properly has two "
|
|||
|
"aspects: correct @emph{identification} and correct @emph{rehighlighting}. "
|
|||
|
"The first means that Font Lock finds all multiline constructs. The second "
|
|||
|
"means that Font Lock will correctly rehighlight all the relevant text when a "
|
|||
|
"multiline construct is changed---for example, if some of the text that was "
|
|||
|
"previously part of a multiline construct ceases to be part of it. The two "
|
|||
|
"aspects are closely related, and often getting one of them to work will "
|
|||
|
"appear to make the other also work. However, for reliable results you must "
|
|||
|
"attend explicitly to both aspects."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3582
|
|||
|
msgid ""
|
|||
|
"There are three ways to ensure correct identification of multiline "
|
|||
|
"constructs:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3588
|
|||
|
msgid ""
|
|||
|
"Add a function to @code{font-lock-extend-region-functions} that does the "
|
|||
|
"@emph{identification} and extends the scan so that the scanned text never "
|
|||
|
"starts or ends in the middle of a multiline construct."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3592
|
|||
|
msgid ""
|
|||
|
"Use the @code{font-lock-fontify-region-function} hook similarly to extend "
|
|||
|
"the scan so that the scanned text never starts or ends in the middle of a "
|
|||
|
"multiline construct."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3598
|
|||
|
msgid ""
|
|||
|
"Somehow identify the multiline construct right when it gets inserted into "
|
|||
|
"the buffer (or at any point after that but before font-lock tries to "
|
|||
|
"highlight it), and mark it with a @code{font-lock-multiline} which will "
|
|||
|
"instruct font-lock not to start or end the scan in the middle of the "
|
|||
|
"construct."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3601
|
|||
|
msgid "There are several ways to do rehighlighting of multiline constructs:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3608
|
|||
|
msgid ""
|
|||
|
"Place a @code{font-lock-multiline} property on the construct. This will "
|
|||
|
"rehighlight the whole construct if any part of it is changed. In some cases "
|
|||
|
"you can do this automatically by setting the @code{font-lock-multiline} "
|
|||
|
"variable, which see."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3616
|
|||
|
msgid ""
|
|||
|
"Make sure @code{jit-lock-contextually} is set and rely on it doing its job. "
|
|||
|
"This will only rehighlight the part of the construct that follows the actual "
|
|||
|
"change, and will do it after a short delay. This only works if the "
|
|||
|
"highlighting of the various parts of your multiline construct never depends "
|
|||
|
"on text in subsequent lines. Since @code{jit-lock-contextually} is "
|
|||
|
"activated by default, this can be an attractive solution."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3622
|
|||
|
msgid ""
|
|||
|
"Place a @code{jit-lock-defer-multiline} property on the construct. This "
|
|||
|
"works only if @code{jit-lock-contextually} is used, and with the same delay "
|
|||
|
"before rehighlighting, but like @code{font-lock-multiline}, it also handles "
|
|||
|
"the case where highlighting depends on subsequent lines."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3633
|
|||
|
msgid ""
|
|||
|
"If parsing the @emph{syntax} of a construct depends on it being parsed in "
|
|||
|
"one single chunk, you can add the @code{syntax-multiline} text property over "
|
|||
|
"the construct in question. The most common use for this is when the syntax "
|
|||
|
"property to apply to @samp{FOO} depend on some later text @samp{BAR}: By "
|
|||
|
"placing this text property over the whole of @samp{FOO...BAR}, you make sure "
|
|||
|
"that any change of @samp{BAR} will also cause the syntax property of "
|
|||
|
"@samp{FOO} to be recomputed. Note: For this to work, the mode needs to add "
|
|||
|
"@code{syntax-propertize-multiline} to "
|
|||
|
"@code{syntax-propertize-extend-region-functions}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsubsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3639
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3641
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3642
|
|||
|
#, no-wrap
|
|||
|
msgid "Font Lock Multiline"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3639
|
|||
|
msgid "Marking multiline chunks with a text property."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3639
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3688
|
|||
|
#, no-wrap
|
|||
|
msgid "Region to Refontify"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3639
|
|||
|
msgid "Controlling which region gets refontified after a buffer change."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3648
|
|||
|
msgid ""
|
|||
|
"One way to ensure reliable rehighlighting of multiline Font Lock constructs "
|
|||
|
"is to put on them the text property @code{font-lock-multiline}. It should "
|
|||
|
"be present and non-@code{nil} for text that is part of a multiline "
|
|||
|
"construct."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3656
|
|||
|
msgid ""
|
|||
|
"When Font Lock is about to highlight a range of text, it first extends the "
|
|||
|
"boundaries of the range as necessary so that they do not fall within text "
|
|||
|
"marked with the @code{font-lock-multiline} property. Then it removes any "
|
|||
|
"@code{font-lock-multiline} properties from the range, and highlights it. "
|
|||
|
"The highlighting specification (mostly @code{font-lock-keywords}) must "
|
|||
|
"reinstall this property each time, whenever it is appropriate."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3659
|
|||
|
msgid ""
|
|||
|
"@strong{Warning:} don't use the @code{font-lock-multiline} property on large "
|
|||
|
"ranges of text, because that will make rehighlighting slow."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3660
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-multiline"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3667
|
|||
|
msgid ""
|
|||
|
"If the @code{font-lock-multiline} variable is set to @code{t}, Font Lock "
|
|||
|
"will try to add the @code{font-lock-multiline} property automatically on "
|
|||
|
"multiline constructs. This is not a universal solution, however, since it "
|
|||
|
"slows down Font Lock somewhat. It can miss some multiline constructs, or "
|
|||
|
"make the property larger or smaller than necessary."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3672
|
|||
|
msgid ""
|
|||
|
"For elements whose @var{matcher} is a function, the function should ensure "
|
|||
|
"that submatch 0 covers the whole relevant multiline construct, even if only "
|
|||
|
"a small subpart will be highlighted. It is often just as easy to add the "
|
|||
|
"@code{font-lock-multiline} property by hand."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3683
|
|||
|
msgid ""
|
|||
|
"The @code{font-lock-multiline} property is meant to ensure proper "
|
|||
|
"refontification; it does not automatically identify new multiline "
|
|||
|
"constructs. Identifying them requires that Font Lock mode operate on large "
|
|||
|
"enough chunks at a time. This will happen by accident on many cases, which "
|
|||
|
"may give the impression that multiline constructs magically work. If you "
|
|||
|
"set the @code{font-lock-multiline} variable non-@code{nil}, this impression "
|
|||
|
"will be even stronger, since the highlighting of those constructs which are "
|
|||
|
"found will be properly updated from then on. But that does not work "
|
|||
|
"reliably."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3687
|
|||
|
msgid ""
|
|||
|
"To find multiline constructs reliably, you must either manually place the "
|
|||
|
"@code{font-lock-multiline} property on the text before Font Lock mode looks "
|
|||
|
"at it, or use @code{font-lock-fontify-region-function}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsubsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3689
|
|||
|
#, no-wrap
|
|||
|
msgid "Region to Fontify after a Buffer Change"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3696
|
|||
|
msgid ""
|
|||
|
"When a buffer is changed, the region that Font Lock refontifies is by "
|
|||
|
"default the smallest sequence of whole lines that spans the change. While "
|
|||
|
"this works well most of the time, sometimes it doesn't---for example, when a "
|
|||
|
"change alters the syntactic meaning of text on an earlier line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3699
|
|||
|
msgid ""
|
|||
|
"You can enlarge (or even reduce) the region to refontify by setting the "
|
|||
|
"following variable:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3700
|
|||
|
#, no-wrap
|
|||
|
msgid "font-lock-extend-after-change-region-function"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3703
|
|||
|
msgid ""
|
|||
|
"This buffer-local variable is either @code{nil} or a function for Font Lock "
|
|||
|
"mode to call to determine the region to scan and fontify."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3712
|
|||
|
msgid ""
|
|||
|
"The function is given three parameters, the standard @var{beg}, @var{end}, "
|
|||
|
"and @var{old-len} from @code{after-change-functions} (@pxref{Change "
|
|||
|
"Hooks}). It should return either a cons of the beginning and end buffer "
|
|||
|
"positions (in that order) of the region to fontify, or @code{nil} (which "
|
|||
|
"means choose the region in the standard way). This function needs to "
|
|||
|
"preserve point, the match-data, and the current restriction. The region it "
|
|||
|
"returns may start or end in the middle of a line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3715
|
|||
|
msgid ""
|
|||
|
"Since this function is called after every buffer change, it should be "
|
|||
|
"reasonably fast."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: section
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3718
|
|||
|
#, no-wrap
|
|||
|
msgid "Automatic Indentation of code"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3727
|
|||
|
msgid ""
|
|||
|
"For programming languages, an important feature of a major mode is to "
|
|||
|
"provide automatic indentation. There are two parts: one is to decide what "
|
|||
|
"is the right indentation of a line, and the other is to decide when to "
|
|||
|
"reindent a line. By default, Emacs reindents a line whenever you type a "
|
|||
|
"character in @code{electric-indent-chars}, which by default only includes "
|
|||
|
"Newline. Major modes can add chars to @code{electric-indent-chars} "
|
|||
|
"according to the syntax of the language."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3734
|
|||
|
msgid ""
|
|||
|
"Deciding what is the right indentation is controlled in Emacs by "
|
|||
|
"@code{indent-line-function} (@pxref{Mode-Specific Indent}). For some modes, "
|
|||
|
"the @emph{right} indentation cannot be known reliably, typically because "
|
|||
|
"indentation is significant so several indentations are valid but with "
|
|||
|
"different meanings. In that case, the mode should set "
|
|||
|
"@code{electric-indent-inhibit} to make sure the line is not constantly "
|
|||
|
"re-indented against the user's wishes."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3743
|
|||
|
msgid ""
|
|||
|
"Writing a good indentation function can be difficult and to a large extent "
|
|||
|
"it is still a black art. Many major mode authors will start by writing a "
|
|||
|
"simple indentation function that works for simple cases, for example by "
|
|||
|
"comparing with the indentation of the previous text line. For most "
|
|||
|
"programming languages that are not really line-based, this tends to scale "
|
|||
|
"very poorly: improving such a function to let it handle more diverse "
|
|||
|
"situations tends to become more and more difficult, resulting in the end "
|
|||
|
"with a large, complex, unmaintainable indentation function which nobody "
|
|||
|
"dares to touch."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3750
|
|||
|
msgid ""
|
|||
|
"A good indentation function will usually need to actually parse the text, "
|
|||
|
"according to the syntax of the language. Luckily, it is not necessary to "
|
|||
|
"parse the text in as much detail as would be needed for a compiler, but on "
|
|||
|
"the other hand, the parser embedded in the indentation code will want to be "
|
|||
|
"somewhat friendly to syntactically incorrect code."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3764
|
|||
|
msgid ""
|
|||
|
"Good maintainable indentation functions usually fall into two categories: "
|
|||
|
"either parsing forward from some safe starting point until the position of "
|
|||
|
"interest, or parsing backward from the position of interest. Neither of the "
|
|||
|
"two is a clearly better choice than the other: parsing backward is often "
|
|||
|
"more difficult than parsing forward because programming languages are "
|
|||
|
"designed to be parsed forward, but for the purpose of indentation it has the "
|
|||
|
"advantage of not needing to guess a safe starting point, and it generally "
|
|||
|
"enjoys the property that only a minimum of text will be analyzed to decide "
|
|||
|
"the indentation of a line, so indentation will tend to be less affected by "
|
|||
|
"syntax errors in some earlier unrelated piece of code. Parsing forward on "
|
|||
|
"the other hand is usually easier and has the advantage of making it possible "
|
|||
|
"to reindent efficiently a whole region at a time, with a single parse."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. FIXME: documentation?
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3774
|
|||
|
msgid ""
|
|||
|
"Rather than write your own indentation function from scratch, it is often "
|
|||
|
"preferable to try and reuse some existing ones or to rely on a generic "
|
|||
|
"indentation engine. There are sadly few such engines. The CC-mode "
|
|||
|
"indentation code (used with C, C++, Java, Awk and a few other such modes) "
|
|||
|
"has been made more generic over the years, so if your language seems "
|
|||
|
"somewhat similar to one of those languages, you might try to use that "
|
|||
|
"engine. Another one is SMIE which takes an approach in the spirit of Lisp "
|
|||
|
"sexps and adapts it to non-Lisp languages."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3777
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3779
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3781
|
|||
|
#, no-wrap
|
|||
|
msgid "SMIE"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3777
|
|||
|
msgid "A simple minded indentation engine."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3780
|
|||
|
#, no-wrap
|
|||
|
msgid "Simple Minded Indentation Engine"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3788
|
|||
|
msgid ""
|
|||
|
"SMIE is a package that provides a generic navigation and indentation "
|
|||
|
"engine. Based on a very simple parser using an operator precedence grammar, "
|
|||
|
"it lets major modes extend the sexp-based navigation of Lisp to non-Lisp "
|
|||
|
"languages as well as provide a simple to use but reliable auto-indentation."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3801
|
|||
|
msgid ""
|
|||
|
"Operator precedence grammar is a very primitive technology for parsing "
|
|||
|
"compared to some of the more common techniques used in compilers. It has "
|
|||
|
"the following characteristics: its parsing power is very limited, and it is "
|
|||
|
"largely unable to detect syntax errors, but it has the advantage of being "
|
|||
|
"algorithmically efficient and able to parse forward just as well as "
|
|||
|
"backward. In practice that means that SMIE can use it for indentation based "
|
|||
|
"on backward parsing, that it can provide both @code{forward-sexp} and "
|
|||
|
"@code{backward-sexp} functionality, and that it will naturally work on "
|
|||
|
"syntactically incorrect code without any extra effort. The downside is that "
|
|||
|
"it also means that most programming languages cannot be parsed correctly "
|
|||
|
"using SMIE, at least not without resorting to some special tricks "
|
|||
|
"(@pxref{SMIE Tricks})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3814
|
|||
|
#, no-wrap
|
|||
|
msgid "SMIE setup"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
msgid "SMIE setup and features."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsubsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3861
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3862
|
|||
|
#, no-wrap
|
|||
|
msgid "Operator Precedence Grammars"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
msgid "A very simple parsing technique."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3949
|
|||
|
#, no-wrap
|
|||
|
msgid "SMIE Grammar"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
msgid "Defining the grammar of a language."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4026
|
|||
|
#, no-wrap
|
|||
|
msgid "SMIE Lexer"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
msgid "Defining tokens."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4084
|
|||
|
#, no-wrap
|
|||
|
msgid "SMIE Tricks"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
msgid "Working around the parser's limitations."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4162
|
|||
|
#, no-wrap
|
|||
|
msgid "SMIE Indentation"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
msgid "Specifying indentation rules."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4238
|
|||
|
#, no-wrap
|
|||
|
msgid "SMIE Indentation Helpers"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
msgid "Helper functions for indentation rules."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4299
|
|||
|
#, no-wrap
|
|||
|
msgid "SMIE Indentation Example"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
msgid "Sample indentation rules."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: node
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4392
|
|||
|
#, no-wrap
|
|||
|
msgid "SMIE Customization"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: menuentry
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3812
|
|||
|
msgid "Customizing indentation."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsubsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3815
|
|||
|
#, no-wrap
|
|||
|
msgid "SMIE Setup and Features"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3822
|
|||
|
msgid ""
|
|||
|
"SMIE is meant to be a one-stop shop for structural navigation and various "
|
|||
|
"other features which rely on the syntactic structure of code, in particular "
|
|||
|
"automatic indentation. The main entry point is @code{smie-setup} which is a "
|
|||
|
"function typically called while setting up a major mode."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3823
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-setup grammar rules-function &rest keywords"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3830
|
|||
|
msgid ""
|
|||
|
"Setup SMIE navigation and indentation. @var{grammar} is a grammar table "
|
|||
|
"generated by @code{smie-prec2->grammar}. @var{rules-function} is a set of "
|
|||
|
"indentation rules for use on @code{smie-rules-function}. @var{keywords} are "
|
|||
|
"additional arguments, which can include the following keywords:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3833
|
|||
|
msgid "@code{:forward-token} @var{fun}: Specify the forward lexer to use."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3835
|
|||
|
msgid "@code{:backward-token} @var{fun}: Specify the backward lexer to use."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3845
|
|||
|
msgid ""
|
|||
|
"Calling this function is sufficient to make commands such as "
|
|||
|
"@code{forward-sexp}, @code{backward-sexp}, and @code{transpose-sexps} be "
|
|||
|
"able to properly handle structural elements other than just the paired "
|
|||
|
"parentheses already handled by syntax tables. For example, if the provided "
|
|||
|
"grammar is precise enough, @code{transpose-sexps} can correctly transpose "
|
|||
|
"the two arguments of a @code{+} operator, taking into account the precedence "
|
|||
|
"rules of the language."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3851
|
|||
|
msgid ""
|
|||
|
"Calling @code{smie-setup} is also sufficient to make @key{TAB} indentation "
|
|||
|
"work in the expected way, extends @code{blink-matching-paren} to apply to "
|
|||
|
"elements like @code{begin...end}, and provides some commands that you can "
|
|||
|
"bind in the major mode keymap."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3852
|
|||
|
#, no-wrap
|
|||
|
msgid "Command smie-close-block"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3854
|
|||
|
msgid "This command closes the most recently opened (and not yet closed) block."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3856
|
|||
|
#, no-wrap
|
|||
|
msgid "Command smie-down-list &optional arg"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3859
|
|||
|
msgid ""
|
|||
|
"This command is like @code{down-list} but it also pays attention to nesting "
|
|||
|
"of tokens other than parentheses, such as @code{begin...end}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3877
|
|||
|
msgid ""
|
|||
|
"SMIE's precedence grammars simply give to each token a pair of precedences: "
|
|||
|
"the left-precedence and the right-precedence. We say @code{T1 < T2} if the "
|
|||
|
"right-precedence of token @code{T1} is less than the left-precedence of "
|
|||
|
"token @code{T2}. A good way to read this @code{<} is as a kind of "
|
|||
|
"parenthesis: if we find @code{... T1 something T2 ...} then that should be "
|
|||
|
"parsed as @code{... T1 (something T2 ...} rather than as @code{... T1 "
|
|||
|
"something) T2 ...}. The latter interpretation would be the case if we had "
|
|||
|
"@code{T1 > T2}. If we have @code{T1 = T2}, it means that token T2 follows "
|
|||
|
"token T1 in the same syntactic construction, so typically we have "
|
|||
|
"@code{\"begin\" = \"end\"}. Such pairs of precedences are sufficient to "
|
|||
|
"express left-associativity or right-associativity of infix operators, "
|
|||
|
"nesting of tokens like parentheses and many other cases."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3885
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-prec2->grammar table"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3889
|
|||
|
msgid ""
|
|||
|
"This function takes a @emph{prec2} grammar @var{table} and returns an alist "
|
|||
|
"suitable for use in @code{smie-setup}. The @emph{prec2} @var{table} is "
|
|||
|
"itself meant to be built by one of the functions below."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3891
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-merge-prec2s &rest tables"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3894
|
|||
|
msgid ""
|
|||
|
"This function takes several @emph{prec2} @var{tables} and merges them into a "
|
|||
|
"new @emph{prec2} table."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3896
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-precs->prec2 precs"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3905
|
|||
|
msgid ""
|
|||
|
"This function builds a @emph{prec2} table from a table of precedences "
|
|||
|
"@var{precs}. @var{precs} should be a list, sorted by precedence (for "
|
|||
|
"example @code{\"+\"} will come before @code{\"*\"}), of elements of the form "
|
|||
|
"@code{(@var{assoc} @var{op} ...)}, where each @var{op} is a token that acts "
|
|||
|
"as an operator; @var{assoc} is their associativity, which can be either "
|
|||
|
"@code{left}, @code{right}, @code{assoc}, or @code{nonassoc}. All operators "
|
|||
|
"in a given element share the same precedence level and associativity."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3907
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-bnf->prec2 bnf &rest resolvers"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3912
|
|||
|
msgid ""
|
|||
|
"This function lets you specify the grammar using a BNF notation. It accepts "
|
|||
|
"a @var{bnf} description of the grammar along with a set of conflict "
|
|||
|
"resolution rules @var{resolvers}, and returns a @emph{prec2} table."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3916
|
|||
|
msgid ""
|
|||
|
"@var{bnf} is a list of nonterminal definitions of the form "
|
|||
|
"@code{(@var{nonterm} @var{rhs1} @var{rhs2} ...)} where each @var{rhs} is a "
|
|||
|
"(non-empty) list of terminals (aka tokens) or non-terminals."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3918
|
|||
|
msgid "Not all grammars are accepted:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3922
|
|||
|
msgid ""
|
|||
|
"An @var{rhs} cannot be an empty list (an empty list is never needed, since "
|
|||
|
"SMIE allows all non-terminals to match the empty string anyway)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3926
|
|||
|
msgid ""
|
|||
|
"An @var{rhs} cannot have 2 consecutive non-terminals: each pair of "
|
|||
|
"non-terminals needs to be separated by a terminal (aka token). This is a "
|
|||
|
"fundamental limitation of operator precedence grammars."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3929
|
|||
|
msgid "Additionally, conflicts can occur:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3934
|
|||
|
msgid ""
|
|||
|
"The returned @emph{prec2} table holds constraints between pairs of tokens, "
|
|||
|
"and for any given pair only one constraint can be present: T1 < T2, T1 = T2, "
|
|||
|
"or T1 > T2."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3938
|
|||
|
msgid ""
|
|||
|
"A token can be an @code{opener} (something similar to an open-paren), a "
|
|||
|
"@code{closer} (like a close-paren), or @code{neither} of the two (e.g., an "
|
|||
|
"infix operator, or an inner token like @code{\"else\"})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3947
|
|||
|
msgid ""
|
|||
|
"Precedence conflicts can be resolved via @var{resolvers}, which is a list of "
|
|||
|
"@emph{precs} tables (see @code{smie-precs->prec2}): for each precedence "
|
|||
|
"conflict, if those @code{precs} tables specify a particular constraint, then "
|
|||
|
"the conflict is resolved by using this constraint instead, else a conflict "
|
|||
|
"is reported and one of the conflicting constraints is picked arbitrarily and "
|
|||
|
"the others are simply ignored."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsubsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3950
|
|||
|
#, no-wrap
|
|||
|
msgid "Defining the Grammar of a Language"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3951
|
|||
|
#, no-wrap
|
|||
|
msgid "SMIE grammar"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3952
|
|||
|
#, no-wrap
|
|||
|
msgid "grammar, SMIE"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3959
|
|||
|
msgid ""
|
|||
|
"The usual way to define the SMIE grammar of a language is by defining a new "
|
|||
|
"global variable that holds the precedence table by giving a set of BNF "
|
|||
|
"rules. For example, the grammar definition for a small Pascal-like language "
|
|||
|
"could look like:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3965
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(require 'smie)\n"
|
|||
|
"(defvar sample-smie-grammar\n"
|
|||
|
" (smie-prec2->grammar\n"
|
|||
|
" (smie-bnf->prec2\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3977
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" '((id)\n"
|
|||
|
" (inst (\"begin\" insts \"end\")\n"
|
|||
|
" (\"if\" exp \"then\" inst \"else\" inst)\n"
|
|||
|
" (id \":=\" exp)\n"
|
|||
|
" (exp))\n"
|
|||
|
" (insts (insts \";\" insts) (inst))\n"
|
|||
|
" (exp (exp \"+\" exp)\n"
|
|||
|
" (exp \"*\" exp)\n"
|
|||
|
" (\"(\" exps \")\"))\n"
|
|||
|
" (exps (exps \",\" exps) (exp)))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3982
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" '((assoc \";\"))\n"
|
|||
|
" '((assoc \",\"))\n"
|
|||
|
" '((assoc \"+\") (assoc \"*\")))))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3987
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4319
|
|||
|
msgid "A few things to note:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3994
|
|||
|
msgid ""
|
|||
|
"The above grammar does not explicitly mention the syntax of function calls: "
|
|||
|
"SMIE will automatically allow any sequence of sexps, such as identifiers, "
|
|||
|
"balanced parentheses, or @code{begin ... end} blocks to appear anywhere "
|
|||
|
"anyway."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:3998
|
|||
|
msgid ""
|
|||
|
"The grammar category @code{id} has no right hand side: this does not mean "
|
|||
|
"that it can match only the empty string, since as mentioned any sequence of "
|
|||
|
"sexps can appear anywhere anyway."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4003
|
|||
|
msgid ""
|
|||
|
"Because non terminals cannot appear consecutively in the BNF grammar, it is "
|
|||
|
"difficult to correctly handle tokens that act as terminators, so the above "
|
|||
|
"grammar treats @code{\";\"} as a statement @emph{separator} instead, which "
|
|||
|
"SMIE can handle very well."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4008
|
|||
|
msgid ""
|
|||
|
"Separators used in sequences (such as @code{\",\"} and @code{\";\"} above) "
|
|||
|
"are best defined with BNF rules such as @code{(foo (foo \"separator\" foo) "
|
|||
|
"...)} which generate precedence conflicts which are then resolved by giving "
|
|||
|
"them an explicit @code{(assoc \"separator\")}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4014
|
|||
|
msgid ""
|
|||
|
"The @code{(\"(\" exps \")\")} rule was not needed to pair up parens, since "
|
|||
|
"SMIE will pair up any characters that are marked as having paren syntax in "
|
|||
|
"the syntax table. What this rule does instead (together with the definition "
|
|||
|
"of @code{exps}) is to make it clear that @code{\",\"} should not appear "
|
|||
|
"outside of parentheses."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4018
|
|||
|
msgid ""
|
|||
|
"Rather than have a single @emph{precs} table to resolve conflicts, it is "
|
|||
|
"preferable to have several tables, so as to let the BNF part of the grammar "
|
|||
|
"specify relative precedences where possible."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4024
|
|||
|
msgid ""
|
|||
|
"Unless there is a very good reason to prefer @code{left} or @code{right}, it "
|
|||
|
"is usually preferable to mark operators as associative, using @code{assoc}. "
|
|||
|
"For that reason @code{\"+\"} and @code{\"*\"} are defined above as "
|
|||
|
"@code{assoc}, although the language defines them formally as left "
|
|||
|
"associative."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsubsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4027
|
|||
|
#, no-wrap
|
|||
|
msgid "Defining Tokens"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4028
|
|||
|
#, no-wrap
|
|||
|
msgid "SMIE lexer"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4029
|
|||
|
#, no-wrap
|
|||
|
msgid "defining tokens, SMIE"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4038
|
|||
|
msgid ""
|
|||
|
"SMIE comes with a predefined lexical analyzer which uses syntax tables in "
|
|||
|
"the following way: any sequence of characters that have word or symbol "
|
|||
|
"syntax is considered a token, and so is any sequence of characters that have "
|
|||
|
"punctuation syntax. This default lexer is often a good starting point but "
|
|||
|
"is rarely actually correct for any given language. For example, it will "
|
|||
|
"consider @code{\"2,+3\"} to be composed of 3 tokens: @code{\"2\"}, "
|
|||
|
"@code{\",+\"}, and @code{\"3\"}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4047
|
|||
|
msgid ""
|
|||
|
"To describe the lexing rules of your language to SMIE, you need 2 functions, "
|
|||
|
"one to fetch the next token, and another to fetch the previous token. Those "
|
|||
|
"functions will usually first skip whitespace and comments and then look at "
|
|||
|
"the next chunk of text to see if it is a special token. If so it should "
|
|||
|
"skip the token and return a description of this token. Usually this is "
|
|||
|
"simply the string extracted from the buffer, but it can be anything you "
|
|||
|
"want. For example:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4051
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(defvar sample-keywords-regexp\n"
|
|||
|
" (regexp-opt '(\"+\" \"*\" \",\" \";\" \">\" \">=\" \"<\" \"<=\" \":=\" "
|
|||
|
"\"=\")))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4063
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(defun sample-smie-forward-token ()\n"
|
|||
|
" (forward-comment (point-max))\n"
|
|||
|
" (cond\n"
|
|||
|
" ((looking-at sample-keywords-regexp)\n"
|
|||
|
" (goto-char (match-end 0))\n"
|
|||
|
" (match-string-no-properties 0))\n"
|
|||
|
" (t (buffer-substring-no-properties\n"
|
|||
|
" (point)\n"
|
|||
|
" (progn (skip-syntax-forward \"w_\")\n"
|
|||
|
" (point))))))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: group
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4075
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(defun sample-smie-backward-token ()\n"
|
|||
|
" (forward-comment (- (point)))\n"
|
|||
|
" (cond\n"
|
|||
|
" ((looking-back sample-keywords-regexp (- (point) 2) t)\n"
|
|||
|
" (goto-char (match-beginning 0))\n"
|
|||
|
" (match-string-no-properties 0))\n"
|
|||
|
" (t (buffer-substring-no-properties\n"
|
|||
|
" (point)\n"
|
|||
|
" (progn (skip-syntax-backward \"w_\")\n"
|
|||
|
" (point))))))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4083
|
|||
|
msgid ""
|
|||
|
"Notice how those lexers return the empty string when in front of "
|
|||
|
"parentheses. This is because SMIE automatically takes care of the "
|
|||
|
"parentheses defined in the syntax table. More specifically if the lexer "
|
|||
|
"returns @code{nil} or an empty string, SMIE tries to handle the "
|
|||
|
"corresponding text as a sexp according to syntax tables."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsubsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4085
|
|||
|
#, no-wrap
|
|||
|
msgid "Living With a Weak Parser"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4091
|
|||
|
msgid ""
|
|||
|
"The parsing technique used by SMIE does not allow tokens to behave "
|
|||
|
"differently in different contexts. For most programming languages, this "
|
|||
|
"manifests itself by precedence conflicts when converting the BNF grammar."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4095
|
|||
|
msgid ""
|
|||
|
"Sometimes, those conflicts can be worked around by expressing the grammar "
|
|||
|
"slightly differently. For example, for Modula-2 it might seem natural to "
|
|||
|
"have a BNF grammar that looks like this:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4105
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" ...\n"
|
|||
|
" (inst (\"IF\" exp \"THEN\" insts \"ELSE\" insts \"END\")\n"
|
|||
|
" (\"CASE\" exp \"OF\" cases \"END\")\n"
|
|||
|
" ...)\n"
|
|||
|
" (cases (cases \"|\" cases)\n"
|
|||
|
" (caselabel \":\" insts)\n"
|
|||
|
" (\"ELSE\" insts))\n"
|
|||
|
" ...\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4112
|
|||
|
msgid ""
|
|||
|
"But this will create conflicts for @code{\"ELSE\"}: on the one hand, the IF "
|
|||
|
"rule implies (among many other things) that @code{\"ELSE\" = \"END\"}; but "
|
|||
|
"on the other hand, since @code{\"ELSE\"} appears within @code{cases}, which "
|
|||
|
"appears left of @code{\"END\"}, we also have @code{\"ELSE\" > \"END\"}. We "
|
|||
|
"can solve the conflict either by using:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4120
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" ...\n"
|
|||
|
" (inst (\"IF\" exp \"THEN\" insts \"ELSE\" insts \"END\")\n"
|
|||
|
" (\"CASE\" exp \"OF\" cases \"END\")\n"
|
|||
|
" (\"CASE\" exp \"OF\" cases \"ELSE\" insts \"END\")\n"
|
|||
|
" ...)\n"
|
|||
|
" (cases (cases \"|\" cases) (caselabel \":\" insts))\n"
|
|||
|
" ...\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4122
|
|||
|
msgid "or"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4130
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" ...\n"
|
|||
|
" (inst (\"IF\" exp \"THEN\" else \"END\")\n"
|
|||
|
" (\"CASE\" exp \"OF\" cases \"END\")\n"
|
|||
|
" ...)\n"
|
|||
|
" (else (insts \"ELSE\" insts))\n"
|
|||
|
" (cases (cases \"|\" cases) (caselabel \":\" insts) (else))\n"
|
|||
|
" ...\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4136
|
|||
|
msgid ""
|
|||
|
"Reworking the grammar to try and solve conflicts has its downsides, tho, "
|
|||
|
"because SMIE assumes that the grammar reflects the logical structure of the "
|
|||
|
"code, so it is preferable to keep the BNF closer to the intended abstract "
|
|||
|
"syntax tree."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4149
|
|||
|
msgid ""
|
|||
|
"Other times, after careful consideration you may conclude that those "
|
|||
|
"conflicts are not serious and simply resolve them via the @var{resolvers} "
|
|||
|
"argument of @code{smie-bnf->prec2}. Usually this is because the grammar is "
|
|||
|
"simply ambiguous: the conflict does not affect the set of programs described "
|
|||
|
"by the grammar, but only the way those programs are parsed. This is "
|
|||
|
"typically the case for separators and associative infix operators, where you "
|
|||
|
"want to add a resolver like @code{'((assoc \"|\"))}. Another case where "
|
|||
|
"this can happen is for the classic @emph{dangling else} problem, where you "
|
|||
|
"will use @code{'((assoc \"else\" \"then\"))}. It can also happen for cases "
|
|||
|
"where the conflict is real and cannot really be resolved, but it is unlikely "
|
|||
|
"to pose a problem in practice."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4161
|
|||
|
msgid ""
|
|||
|
"Finally, in many cases some conflicts will remain despite all efforts to "
|
|||
|
"restructure the grammar. Do not despair: while the parser cannot be made "
|
|||
|
"more clever, you can make the lexer as smart as you want. So, the solution "
|
|||
|
"is then to look at the tokens involved in the conflict and to split one of "
|
|||
|
"those tokens into 2 (or more) different tokens. E.g., if the grammar needs "
|
|||
|
"to distinguish between two incompatible uses of the token @code{\"begin\"}, "
|
|||
|
"make the lexer return different tokens (say @code{\"begin-fun\"} and "
|
|||
|
"@code{\"begin-plain\"}) depending on which kind of @code{\"begin\"} it "
|
|||
|
"finds. This pushes the work of distinguishing the different cases to the "
|
|||
|
"lexer, which will thus have to look at the surrounding text to find ad-hoc "
|
|||
|
"clues."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsubsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4163
|
|||
|
#, no-wrap
|
|||
|
msgid "Specifying Indentation Rules"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4164
|
|||
|
#, no-wrap
|
|||
|
msgid "indentation rules, SMIE"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4170
|
|||
|
msgid ""
|
|||
|
"Based on the provided grammar, SMIE will be able to provide automatic "
|
|||
|
"indentation without any extra effort. But in practice, this default "
|
|||
|
"indentation style will probably not be good enough. You will want to tweak "
|
|||
|
"it in many different cases."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4185
|
|||
|
msgid ""
|
|||
|
"SMIE indentation is based on the idea that indentation rules should be as "
|
|||
|
"local as possible. To this end, it relies on the idea of @emph{virtual} "
|
|||
|
"indentation, which is the indentation that a particular program point would "
|
|||
|
"have if it were at the beginning of a line. Of course, if that program "
|
|||
|
"point is indeed at the beginning of a line, its virtual indentation is its "
|
|||
|
"current indentation. But if not, then SMIE uses the indentation algorithm "
|
|||
|
"to compute the virtual indentation of that point. Now in practice, the "
|
|||
|
"virtual indentation of a program point does not have to be identical to the "
|
|||
|
"indentation it would have if we inserted a newline before it. To see how "
|
|||
|
"this works, the SMIE rule for indentation after a @code{@{} in C does not "
|
|||
|
"care whether the @code{@{} is standing on a line of its own or is at the end "
|
|||
|
"of the preceding line. Instead, these different cases are handled in the "
|
|||
|
"indentation rule that decides how to indent before a @code{@{}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4198
|
|||
|
msgid ""
|
|||
|
"Another important concept is the notion of @emph{parent}: The @emph{parent} "
|
|||
|
"of a token, is the head token of the nearest enclosing syntactic construct. "
|
|||
|
"For example, the parent of an @code{else} is the @code{if} to which it "
|
|||
|
"belongs, and the parent of an @code{if}, in turn, is the lead token of the "
|
|||
|
"surrounding construct. The command @code{backward-sexp} jumps from a token "
|
|||
|
"to its parent, but there are some caveats: for @emph{openers} (tokens which "
|
|||
|
"start a construct, like @code{if}), you need to start with point before the "
|
|||
|
"token, while for others you need to start with point after the token. "
|
|||
|
"@code{backward-sexp} stops with point before the parent token if that is the "
|
|||
|
"@emph{opener} of the token of interest, and otherwise it stops with point "
|
|||
|
"after the parent token."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4202
|
|||
|
msgid ""
|
|||
|
"SMIE indentation rules are specified using a function that takes two "
|
|||
|
"arguments @var{method} and @var{arg} where the meaning of @var{arg} and the "
|
|||
|
"expected return value depend on @var{method}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4204
|
|||
|
msgid "@var{method} can be:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4208
|
|||
|
msgid ""
|
|||
|
"@code{:after}, in which case @var{arg} is a token and the function should "
|
|||
|
"return the @var{offset} to use for indentation after @var{arg}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4211
|
|||
|
msgid ""
|
|||
|
"@code{:before}, in which case @var{arg} is a token and the function should "
|
|||
|
"return the @var{offset} to use to indent @var{arg} itself."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4216
|
|||
|
msgid ""
|
|||
|
"@code{:elem}, in which case the function should return either the offset to "
|
|||
|
"use to indent function arguments (if @var{arg} is the symbol @code{arg}) or "
|
|||
|
"the basic indentation step (if @var{arg} is the symbol @code{basic})."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4220
|
|||
|
msgid ""
|
|||
|
"@code{:list-intro}, in which case @var{arg} is a token and the function "
|
|||
|
"should return non-@code{nil} if the token is followed by a list of "
|
|||
|
"expressions (not separated by any token) rather than an expression."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4226
|
|||
|
msgid ""
|
|||
|
"When @var{arg} is a token, the function is called with point just before "
|
|||
|
"that token. A return value of @code{nil} always means to fallback on the "
|
|||
|
"default behavior, so the function should return @code{nil} for arguments it "
|
|||
|
"does not expect."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4228
|
|||
|
msgid "@var{offset} can be:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4231
|
|||
|
msgid "@code{nil}: use the default indentation rule."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4233
|
|||
|
msgid "@code{(column . @var{column})}: indent to column @var{column}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4236
|
|||
|
msgid ""
|
|||
|
"@var{number}: offset by @var{number}, relative to a base token which is the "
|
|||
|
"current token for @code{:after} and its parent for @code{:before}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsubsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4239
|
|||
|
#, no-wrap
|
|||
|
msgid "Helper Functions for Indentation Rules"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4245
|
|||
|
msgid ""
|
|||
|
"SMIE provides various functions designed specifically for use in the "
|
|||
|
"indentation rules function (several of those functions break if used in "
|
|||
|
"another context). These functions all start with the prefix "
|
|||
|
"@code{smie-rule-}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4246
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-rule-bolp"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4248
|
|||
|
msgid "Return non-@code{nil} if the current token is the first on the line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4250
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-rule-hanging-p"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4255
|
|||
|
msgid ""
|
|||
|
"Return non-@code{nil} if the current token is @emph{hanging}. A token is "
|
|||
|
"@emph{hanging} if it is the last token on the line and if it is preceded by "
|
|||
|
"other tokens: a lone token on a line is not hanging."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4257
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-rule-next-p &rest tokens"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4259
|
|||
|
msgid "Return non-@code{nil} if the next token is among @var{tokens}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4261
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-rule-prev-p &rest tokens"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4263
|
|||
|
msgid "Return non-@code{nil} if the previous token is among @var{tokens}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4265
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-rule-parent-p &rest parents"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4267
|
|||
|
msgid "Return non-@code{nil} if the current token's parent is among @var{parents}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4269
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-rule-sibling-p"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4273
|
|||
|
msgid ""
|
|||
|
"Return non-@code{nil} if the current token's parent is actually a sibling. "
|
|||
|
"This is the case for example when the parent of a @code{\",\"} is just the "
|
|||
|
"previous @code{\",\"}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4275
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-rule-parent &optional offset"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4279
|
|||
|
msgid ""
|
|||
|
"Return the proper offset to align the current token with the parent. If "
|
|||
|
"non-@code{nil}, @var{offset} should be an integer giving an additional "
|
|||
|
"offset to apply."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4281
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-rule-separator method"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4283
|
|||
|
msgid "Indent current token as a @emph{separator}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4288
|
|||
|
msgid ""
|
|||
|
"By @emph{separator}, we mean here a token whose sole purpose is to separate "
|
|||
|
"various elements within some enclosing syntactic construct, and which does "
|
|||
|
"not have any semantic significance in itself (i.e., it would typically not "
|
|||
|
"exist as a node in an abstract syntax tree)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4294
|
|||
|
msgid ""
|
|||
|
"Such a token is expected to have an associative syntax and be closely tied "
|
|||
|
"to its syntactic parent. Typical examples are @code{\",\"} in lists of "
|
|||
|
"arguments (enclosed inside parentheses), or @code{\";\"} in sequences of "
|
|||
|
"instructions (enclosed in a @code{@{...@}} or @code{begin...end} block)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4297
|
|||
|
msgid ""
|
|||
|
"@var{method} should be the method name that was passed to "
|
|||
|
"@code{smie-rules-function}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsubsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4300
|
|||
|
#, no-wrap
|
|||
|
msgid "Sample Indentation Rules"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4303
|
|||
|
msgid "Here is an example of an indentation function:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4315
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"(defun sample-smie-rules (kind token)\n"
|
|||
|
" (pcase (cons kind token)\n"
|
|||
|
" (`(:elem . basic) sample-indent-basic)\n"
|
|||
|
" (`(,_ . \",\") (smie-rule-separator kind))\n"
|
|||
|
" (`(:after . \":=\") sample-indent-basic)\n"
|
|||
|
" (`(:before . ,(or `\"begin\" `\"(\" `\"@{\"))\n"
|
|||
|
" (if (smie-rule-hanging-p) (smie-rule-parent)))\n"
|
|||
|
" (`(:before . \"if\")\n"
|
|||
|
" (and (not (smie-rule-bolp)) (smie-rule-prev-p \"else\")\n"
|
|||
|
" (smie-rule-parent)))))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4327
|
|||
|
msgid ""
|
|||
|
"The first case indicates the basic indentation increment to use. If "
|
|||
|
"@code{sample-indent-basic} is @code{nil}, then SMIE uses the global setting "
|
|||
|
"@code{smie-indent-basic}. The major mode could have set "
|
|||
|
"@code{smie-indent-basic} buffer-locally instead, but that is discouraged."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4333
|
|||
|
msgid ""
|
|||
|
"The rule for the token @code{\",\"} make SMIE try to be more clever when the "
|
|||
|
"comma separator is placed at the beginning of lines. It tries to outdent "
|
|||
|
"the separator so as to align the code after the comma; for example:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4339
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"x = longfunctionname (\n"
|
|||
|
" arg1\n"
|
|||
|
" , arg2\n"
|
|||
|
" );\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4345
|
|||
|
msgid ""
|
|||
|
"The rule for indentation after @code{\":=\"} exists because otherwise SMIE "
|
|||
|
"would treat @code{\":=\"} as an infix operator and would align the right "
|
|||
|
"argument with the left one."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4353
|
|||
|
msgid ""
|
|||
|
"The rule for indentation before @code{\"begin\"} is an example of the use of "
|
|||
|
"virtual indentation: This rule is used only when @code{\"begin\"} is "
|
|||
|
"hanging, which can happen only when @code{\"begin\"} is not at the beginning "
|
|||
|
"of a line. So this is not used when indenting @code{\"begin\"} itself but "
|
|||
|
"only when indenting something relative to this @code{\"begin\"}. "
|
|||
|
"Concretely, this rule changes the indentation from:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4358
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" if x > 0 then begin\n"
|
|||
|
" dosomething(x);\n"
|
|||
|
" end\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4360
|
|||
|
msgid "to"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4364
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
" if x > 0 then begin\n"
|
|||
|
" dosomething(x);\n"
|
|||
|
" end\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4373
|
|||
|
msgid ""
|
|||
|
"The rule for indentation before @code{\"if\"} is similar to the one for "
|
|||
|
"@code{\"begin\"}, but where the purpose is to treat @code{\"else if\"} as a "
|
|||
|
"single unit, so as to align a sequence of tests rather than indent each test "
|
|||
|
"further to the right. This function does this only in the case where the "
|
|||
|
"@code{\"if\"} is not placed on a separate line, hence the "
|
|||
|
"@code{smie-rule-bolp} test."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4377
|
|||
|
msgid ""
|
|||
|
"If we know that the @code{\"else\"} is always aligned with its @code{\"if\"} "
|
|||
|
"and is always at the beginning of a line, we can use a more efficient rule:"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4384
|
|||
|
#, no-wrap
|
|||
|
msgid ""
|
|||
|
"((equal token \"if\")\n"
|
|||
|
" (and (not (smie-rule-bolp))\n"
|
|||
|
" (smie-rule-prev-p \"else\")\n"
|
|||
|
" (save-excursion\n"
|
|||
|
" (sample-smie-backward-token)\n"
|
|||
|
" (cons 'column (current-column)))))\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: itemize
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4389
|
|||
|
msgid ""
|
|||
|
"The advantage of this formulation is that it reuses the indentation of the "
|
|||
|
"previous @code{\"else\"}, rather than going all the way back to the first "
|
|||
|
"@code{\"if\"} of the sequence."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: subsubsection
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4393
|
|||
|
#, no-wrap
|
|||
|
msgid "Customizing Indentation"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4400
|
|||
|
msgid ""
|
|||
|
"If you are using a mode whose indentation is provided by SMIE, you can "
|
|||
|
"customize the indentation to suit your preferences. You can do this on a "
|
|||
|
"per-mode basis (using the option @code{smie-config}), or a per-file basis "
|
|||
|
"(using the function @code{smie-config-local} in a file-local variable "
|
|||
|
"specification)."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4401
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-config"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defopt
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4406
|
|||
|
msgid ""
|
|||
|
"This option lets you customize indentation on a per-mode basis. It is an "
|
|||
|
"alist with elements of the form @code{(@var{mode} . @var{rules})}. For the "
|
|||
|
"precise form of rules, see the variable's documentation; but you may find it "
|
|||
|
"easier to use the command @code{smie-config-guess}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4408
|
|||
|
#, no-wrap
|
|||
|
msgid "Command smie-config-guess"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4412
|
|||
|
msgid ""
|
|||
|
"This command tries to work out appropriate settings to produce your "
|
|||
|
"preferred style of indentation. Simply call the command while visiting a "
|
|||
|
"file that is indented with your style."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4414
|
|||
|
#, no-wrap
|
|||
|
msgid "Command smie-config-save"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4417
|
|||
|
msgid ""
|
|||
|
"Call this command after using @code{smie-config-guess}, to save your "
|
|||
|
"settings for future sessions."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4419
|
|||
|
#, no-wrap
|
|||
|
msgid "Command smie-config-show-indent &optional move"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4422
|
|||
|
msgid "This command displays the rules that are used to indent the current line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4424
|
|||
|
#, no-wrap
|
|||
|
msgid "Command smie-config-set-indent"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: deffn
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4426
|
|||
|
msgid ""
|
|||
|
"This command adds a local rule to adjust the indentation of the current "
|
|||
|
"line."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4428
|
|||
|
#, no-wrap
|
|||
|
msgid "smie-config-local rules"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defun
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4434
|
|||
|
msgid ""
|
|||
|
"This function adds @var{rules} as indentation rules for the current buffer. "
|
|||
|
"These add to any mode-specific rules defined by the @code{smie-config} "
|
|||
|
"option. To specify custom indentation rules for a specific file, add an "
|
|||
|
"entry to the file's local variables of the form: @code{eval: "
|
|||
|
"(smie-config-local '(@var{rules}))}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: cindex
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4439
|
|||
|
#, no-wrap
|
|||
|
msgid "desktop save mode"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4446
|
|||
|
msgid ""
|
|||
|
"@dfn{Desktop Save Mode} is a feature to save the state of Emacs from one "
|
|||
|
"session to another. The user-level commands for using Desktop Save Mode are "
|
|||
|
"described in the GNU Emacs Manual (@pxref{Saving Emacs Sessions,,, emacs, "
|
|||
|
"the GNU Emacs Manual}). Modes whose buffers visit a file, don't have to do "
|
|||
|
"anything to use this feature."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4450
|
|||
|
msgid ""
|
|||
|
"For buffers not visiting a file to have their state saved, the major mode "
|
|||
|
"must bind the buffer local variable @code{desktop-save-buffer} to a "
|
|||
|
"non-@code{nil} value."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4451
|
|||
|
#, no-wrap
|
|||
|
msgid "desktop-save-buffer"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4459
|
|||
|
msgid ""
|
|||
|
"If this buffer-local variable is non-@code{nil}, the buffer will have its "
|
|||
|
"state saved in the desktop file at desktop save. If the value is a "
|
|||
|
"function, it is called at desktop save with argument @var{desktop-dirname}, "
|
|||
|
"and its value is saved in the desktop file along with the state of the "
|
|||
|
"buffer for which it was called. When file names are returned as part of the "
|
|||
|
"auxiliary information, they should be formatted using the call"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4462
|
|||
|
#, no-wrap
|
|||
|
msgid "(desktop-file-name @var{file-name} @var{desktop-dirname})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: Plain text
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4469
|
|||
|
msgid ""
|
|||
|
"For buffers not visiting a file to be restored, the major mode must define a "
|
|||
|
"function to do the job, and that function must be listed in the alist "
|
|||
|
"@code{desktop-buffer-mode-handlers}."
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4470
|
|||
|
#, no-wrap
|
|||
|
msgid "desktop-buffer-mode-handlers"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4472
|
|||
|
msgid "Alist with elements"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4475
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{major-mode} . @var{restore-buffer-function})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4479
|
|||
|
msgid "The function @var{restore-buffer-function} will be called with argument list"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: example
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4482
|
|||
|
#, no-wrap
|
|||
|
msgid "(@var{buffer-file-name} @var{buffer-name} @var{desktop-buffer-misc})\n"
|
|||
|
msgstr ""
|
|||
|
|
|||
|
#. type: defvar
|
|||
|
#: /Users/suzume/Documents/Repositories/Projet OmegaT de Documentation Emacs -
|
|||
|
#: Sources/doc/lispref/modes.texi:4487
|
|||
|
msgid ""
|
|||
|
"and it should return the restored buffer. Here @var{desktop-buffer-misc} is "
|
|||
|
"the value returned by the function optionally bound to "
|
|||
|
"@code{desktop-save-buffer}."
|
|||
|
msgstr ""
|