Merge remote-tracking branch 'origin/master' into feature/package+vc
This commit is contained in:
commit
2a4f37fe52
212 changed files with 17638 additions and 3731 deletions
|
@ -6,7 +6,7 @@ BreakBeforeBinaryOperators: All
|
|||
BreakBeforeBraces: GNU
|
||||
ColumnLimit: 70
|
||||
ContinuationIndentWidth: 2
|
||||
ForEachMacros: [FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE]
|
||||
ForEachMacros: [FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE, ITREE_FOREACH]
|
||||
IncludeCategories:
|
||||
- Regex: '^<config\.h>$'
|
||||
Priority: -1
|
||||
|
|
|
@ -42,6 +42,24 @@ yet another fun excursion into the exciting world of version control.
|
|||
|
||||
https://lists.gnu.org/r/emacs-devel/2010-04/msg00086.html
|
||||
|
||||
* feature and scratch branches
|
||||
|
||||
Besides the master branch, which is where development takes place, and
|
||||
the "emacs-NN" release branches, we also have branches whose names
|
||||
start with "scratch/" and "feature/". The "feature/" prefix is used
|
||||
for feature branches that are intended to live for some time, while
|
||||
"scratch/" is for one-off throw-away-after-use branches.
|
||||
|
||||
We do not intend to "git merge" from scratch branches, so force-pushes
|
||||
are tolerated, as well as commits with poor style, incomplete commit
|
||||
messages, etc.
|
||||
|
||||
We do expect to "git merge" from feature branches so: no force push,
|
||||
and no commits that don't have a proper commit message.
|
||||
|
||||
Automatic tests are run for feature/* branches on EMBA.
|
||||
See: https://emba.gnu.org/emacs/emacs/-/pipelines
|
||||
|
||||
* Installing changes from gnulib
|
||||
|
||||
Some of the files in Emacs are copied from gnulib. To synchronize
|
||||
|
|
|
@ -6708,6 +6708,7 @@ if test -f "$srcdir/$opt_makefile.in"; then
|
|||
dnl Again, it's best not to use a variable. Though you can add
|
||||
dnl ", [], [opt_makefile='$opt_makefile']" and it should work.
|
||||
AC_CONFIG_FILES([test/Makefile])
|
||||
AC_CONFIG_FILES([test/manual/noverlay/Makefile])
|
||||
fi
|
||||
opt_makefile=test/infra/Makefile
|
||||
if test -f "$srcdir/$opt_makefile.in"; then
|
||||
|
|
|
@ -537,10 +537,13 @@ C/C++ files this is usually the C compiler. Flymake can also use
|
|||
build tools such as @code{make} for checking complicated projects.
|
||||
|
||||
To enable Flymake mode, type @kbd{M-x flymake-mode}. You can jump
|
||||
to the errors that it finds by using @kbd{M-x flymake-goto-next-error}
|
||||
and @kbd{M-x flymake-goto-prev-error}. To display any error messages
|
||||
associated with the current line, type @kbd{M-x
|
||||
flymake-display-err-menu-for-current-line}.
|
||||
to the errors that it finds by using @w{@kbd{M-x
|
||||
flymake-goto-next-error}} and @w{@kbd{M-x flymake-goto-prev-error}}.
|
||||
To display a detailed overview of the diagnostics for the current
|
||||
buffer, use the command @w{@kbd{M-x flymake-show-buffer-diagnostics}};
|
||||
to display a similar overview of diagnostics for the entire project
|
||||
(@pxref{Projects}), use @w{@kbd{M-x
|
||||
flymake-show-project-diagnostics}}.
|
||||
|
||||
For more details about using Flymake,
|
||||
@ifnottex
|
||||
|
|
|
@ -1271,7 +1271,7 @@ mode: my-new
|
|||
disable a minor mode in a local variables list, use the @code{eval}
|
||||
keyword with a Lisp expression that runs the mode command
|
||||
(@pxref{Minor Modes}). For example, the following local variables
|
||||
list enables ElDoc mode (@pxref{Lisp Doc}) by calling
|
||||
list enables ElDoc mode (@pxref{Programming Language Doc}) by calling
|
||||
@code{eldoc-mode} with no argument (calling it with an argument of 1
|
||||
would do the same), and disables Font Lock mode (@pxref{Font Lock}) by
|
||||
calling @code{font-lock-mode} with an argument of @minus{}1.
|
||||
|
|
|
@ -270,7 +270,7 @@ either at the top or bottom of the window depending on the scroll
|
|||
direction. By default, @code{scroll-conservatively} is@tie{}0, which
|
||||
means to always center point in the window.
|
||||
This said, in minibuffer windows, scrolling is always conservative by
|
||||
default because @code{scroll-minibuffer-conservatively} is non-nil,
|
||||
default because @code{scroll-minibuffer-conservatively} is non-@code{nil},
|
||||
which takes precedence over @code{scroll-conservatively}.
|
||||
|
||||
@vindex scroll-step
|
||||
|
|
|
@ -718,7 +718,7 @@ Documentation Lookup
|
|||
|
||||
* Info Lookup:: Looking up library functions and commands in Info files.
|
||||
* Man Page:: Looking up man pages of library functions and commands.
|
||||
* Lisp Doc:: Looking up Emacs Lisp functions, etc.
|
||||
* Programming Language Doc:: Looking up program functions, variables, etc.
|
||||
|
||||
C and Related Modes
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ You can create such a file with the @command{xmlbmessage} tool.
|
|||
@cindex crashes, Haiku
|
||||
@cindex haiku debugger
|
||||
@vindex haiku-debug-on-fatal-error
|
||||
If the variable @code{haiku-debug-on-fatal-error} is non-nil, Emacs
|
||||
If the variable @code{haiku-debug-on-fatal-error} is non-@code{nil}, Emacs
|
||||
will launch the system debugger when a fatal signal is received. It
|
||||
defaults to @code{t}. If GDB cannot be used on your system, please
|
||||
attach the report generated by the system debugger when reporting a
|
||||
|
|
|
@ -570,8 +570,8 @@ change the variable @code{select-enable-clipboard} to @code{nil}.
|
|||
instance, a web browser will usually let you choose ``Copy Image'' on
|
||||
images, and this image will be put on the clipboard. On capable
|
||||
platforms, Emacs can yank these objects with the @code{yank-media}
|
||||
command---but only in modes that have support for it (@w{@pxref{Yanking
|
||||
Media,,, elisp, The Emacs Lisp Reference Manual}}).
|
||||
command---but only in modes that have support for it (@pxref{Yanking
|
||||
Media,,, elisp, The Emacs Lisp Reference Manual}).
|
||||
|
||||
@cindex clipboard manager
|
||||
@vindex x-select-enable-clipboard-manager
|
||||
|
|
|
@ -159,7 +159,7 @@ dialogue on quitting.
|
|||
@vindex ns-auto-hide-menu-bar
|
||||
@item ns-auto-hide-menu-bar
|
||||
This variable specifies whether the macOS menu bar is hidden when an
|
||||
Emacs frame is selected. If non-nil the menu bar is not shown unless
|
||||
Emacs frame is selected. If non-@code{nil} the menu bar is not shown unless
|
||||
the mouse pointer is moved near to the top of the screen.
|
||||
|
||||
@vindex ns-use-native-fullscreen
|
||||
|
@ -178,14 +178,14 @@ These variables only apply to macOS 10.7 (Lion) and above.
|
|||
@item ns-use-mwheel-acceleration
|
||||
This variable controls whether Emacs ignores the system mousewheel
|
||||
acceleration. When nil each `click' of the mousewheel will correspond
|
||||
exactly with one mousewheel event. When non-nil, the default, each
|
||||
exactly with one mousewheel event. When non-@code{nil}, the default, each
|
||||
`click' may correspond with more than one mousewheel event, depending
|
||||
on the user's input.
|
||||
|
||||
@vindex ns-use-mwheel-momentum
|
||||
@item ns-use-mwheel-momentum
|
||||
This variable controls whether Emacs ignores the system `momentum'
|
||||
when scrolling using a trackpad. When non-nil, the default, scrolling
|
||||
when scrolling using a trackpad. When non-@code{nil}, the default, scrolling
|
||||
rapidly may result in the buffer continuing to scroll for a short
|
||||
while after the user has lifted their fingers off the trackpad.
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
@c See file emacs.texi for copying conditions.
|
||||
@node Maintaining
|
||||
@chapter Maintaining Large Programs
|
||||
@cindex maintaining large programs
|
||||
@cindex large programming projects, maintaining
|
||||
|
||||
This chapter describes Emacs features for maintaining medium- to
|
||||
large-size programs and packages. These features include:
|
||||
|
@ -3296,7 +3298,7 @@ according to @code{bug-reference-setup-from-mail-alist},
|
|||
and @code{bug-reference-maybe-setup-from-irc} which does the setup
|
||||
according to @code{bug-reference-setup-from-irc-alist}.
|
||||
@end itemize
|
||||
A setup function should return non-nil if it could setup bug-reference
|
||||
A setup function should return non-@code{nil} if it could setup bug-reference
|
||||
mode which is the case if the last thing the function does is calling
|
||||
one of the helper functions above.
|
||||
|
||||
|
|
|
@ -1540,7 +1540,7 @@ color is supported. Therefore, Emacs provides an option
|
|||
@code{comint-terminfo-terminal} to let you choose a terminal with more
|
||||
advanced features, as defined in your system's terminfo database.
|
||||
Emacs will use this option as the value for @env{TERM} so long as
|
||||
@code{system-uses-terminfo} is non-nil.
|
||||
@code{system-uses-terminfo} is non-@code{nil}.
|
||||
|
||||
Both @code{comint-terminfo-terminal} and @code{system-uses-terminfo}
|
||||
can be declared as connection-local variables to adjust these options
|
||||
|
|
|
@ -127,7 +127,7 @@ see which mode is actually being entered.
|
|||
Modes}). For example, you can put the following lines in your init
|
||||
file to enable Flyspell minor mode in all text-based major modes
|
||||
(@pxref{Spelling}), and ElDoc minor mode in Emacs Lisp mode
|
||||
(@pxref{Lisp Doc}):
|
||||
(@pxref{Programming Language Doc}):
|
||||
|
||||
@example
|
||||
(add-hook 'text-mode-hook 'flyspell-mode)
|
||||
|
|
|
@ -1197,7 +1197,7 @@ use in your program.
|
|||
@menu
|
||||
* Info Lookup:: Looking up library functions and commands in Info files.
|
||||
* Man Page:: Looking up man pages of library functions and commands.
|
||||
* Lisp Doc:: Looking up Emacs Lisp functions, etc.
|
||||
* Programming Language Doc:: Looking up program functions, variables, etc.
|
||||
@end menu
|
||||
|
||||
@node Info Lookup
|
||||
|
@ -1298,8 +1298,10 @@ WoMan Manual}.
|
|||
the WoMan Info manual, which is distributed with Emacs.
|
||||
@end ifnotinfo
|
||||
|
||||
@node Lisp Doc
|
||||
@subsection Emacs Lisp Documentation Lookup
|
||||
@node Programming Language Doc
|
||||
@subsection Programming Language Documentation Lookup
|
||||
@cindex documentation for program symbols
|
||||
@cindex program functions and variables, documentation lookup
|
||||
|
||||
When editing Emacs Lisp code, you can use the commands @kbd{C-h f}
|
||||
(@code{describe-function}) and @kbd{C-h v} (@code{describe-variable})
|
||||
|
@ -1307,43 +1309,120 @@ to view the built-in documentation for the Lisp functions and
|
|||
variables that you want to use. @xref{Name Help}.
|
||||
|
||||
@cindex ElDoc mode
|
||||
@cindex at-point documentation for program symbols
|
||||
@findex eldoc-mode
|
||||
@findex global-eldoc-mode
|
||||
ElDoc is a buffer-local minor mode that helps with looking up Lisp
|
||||
documentation. When it is enabled, the echo area displays some useful
|
||||
information whenever there is a Lisp function or variable at point;
|
||||
for a function, it shows the argument list, and for a variable it
|
||||
shows the first line of the variable's documentation string. To
|
||||
toggle ElDoc mode, type @kbd{M-x eldoc-mode}. There's also a Global
|
||||
ElDoc mode, which is turned on by default, and affects buffers whose
|
||||
major mode sets the variables described below. Use @w{@kbd{M-x
|
||||
global-eldoc-mode}} to turn it off globally.
|
||||
ElDoc@footnote{
|
||||
The name ``ElDoc'' is a historical accident: this mode started by
|
||||
supporting Emacs Lisp buffers.
|
||||
} is a buffer-local minor mode that helps with looking up
|
||||
documentation of symbols (functions, methods, classes, variables,
|
||||
etc.) in your program. When this mode is enabled, the echo area
|
||||
displays useful information whenever there is a documented symbol at
|
||||
point. For example, in buffers under the Emacs Lisp mode, it shows
|
||||
the argument list of a function at point, and for a Lisp variable it
|
||||
shows the first line of the variable's documentation string.
|
||||
|
||||
@vindex eldoc-documentation-strategy
|
||||
@vindex eldoc-documentation-functions
|
||||
These variables can be used to configure ElDoc mode:
|
||||
To toggle ElDoc mode, type @kbd{M-x eldoc-mode}. There's also a
|
||||
Global ElDoc mode, which is turned on by default, and turns on the
|
||||
ElDoc mode in buffers whose major mode sets the variables described
|
||||
below. Use @w{@kbd{M-x global-eldoc-mode}} to turn it off globally.
|
||||
|
||||
Various major modes configure the Global ElDoc mode to use their
|
||||
documentation functions. Examples include Emacs Lisp mode, Python
|
||||
mode, and Cfengine mode. In addition, Emacs features that provide
|
||||
support for several major modes configure ElDoc to use their
|
||||
facilities for retrieving the documentation. Examples include Eglot
|
||||
(@pxref{Eglot Features,,, eglot, Eglot: The Emacs LSP Client}), which
|
||||
provides documentation based on information from language servers;
|
||||
Semantic's Idle Summary mode (@pxref{Idle Summary Mode,,, semantic,
|
||||
Semantic Manual}); and Flymake, which uses ElDoc to show diagnostics
|
||||
at point (@pxref{Finding diagnostics,,, flymake, GNU Flymake manual}).
|
||||
|
||||
The ElDoc mode works by scheduling the display of the available
|
||||
documentation for the symbol at point after Emacs has been idle for
|
||||
some short time. This avoids annoying flickering of documentation
|
||||
messages in the echo area or the mode line when you type quickly and
|
||||
without delay.
|
||||
|
||||
@findex eldoc-print-current-symbol-info
|
||||
You can also trigger the display of documentation for a symbol at
|
||||
point by using the command @kbd{M-x eldoc-print-current-symbol-info}.
|
||||
|
||||
The following variables can be used to configure ElDoc mode:
|
||||
|
||||
@vtable @code
|
||||
@item eldoc-idle-delay
|
||||
The value of this user option controls the amount of idle time before
|
||||
the at-point documentation is displayed. It should be set to the
|
||||
number of seconds to wait; the value of zero means to display without
|
||||
any delay. The default is 0.5 sec.
|
||||
|
||||
@item eldoc-print-after-edit
|
||||
If this user option is non-@code{nil}, ElDoc will show documentation
|
||||
only after some editing command, like inserting or deleting some
|
||||
text. This comes in handy if you want Emacs to display documentation
|
||||
only about symbols that you type, but not about symbols that are
|
||||
already in the buffer (so just reading the source code will not show
|
||||
documentation). The default value is @code{nil}. If you change the
|
||||
value, you need to toggle @code{eldoc-mode} off and on again.
|
||||
|
||||
@item eldoc-echo-area-use-multiline-p
|
||||
This user option controls whether and how to truncate documentation
|
||||
text if it is longer than the echo-area can display as a single screen
|
||||
line. If the value is a positive number, it specifies the number of
|
||||
screen lines that ElDoc is allowed to display in the echo area without
|
||||
truncating the documentation. A positive integer specifies the
|
||||
absolute maximum number of screen lines to use; a floating-point
|
||||
number specifies the number of screen lines as a fraction of the
|
||||
frame's height. The value of @code{t} means never truncate the
|
||||
documentation (the echo-area will be resized up to the height allowed
|
||||
by @code{max-mini-window-height}, @pxref{Minibuffer Edit}), whereas
|
||||
the value of @code{nil} means truncate if the documentation is longer
|
||||
than a single screen line. Finally, the special value
|
||||
@code{truncate-sym-name-if-fit} (the default) means to truncate the
|
||||
part of the documentation that represents a symbol's name if doing
|
||||
that will allow the documentation to fit on a single screen line.
|
||||
|
||||
@item eldoc-echo-area-display-truncation-message
|
||||
If non-@code{nil} (the default), and documentation shown in the echo
|
||||
area is truncated because it's too long, follow the documentation by
|
||||
instructions about how to view the complete documentation text. If
|
||||
@code{nil}, just indicate with @samp{@dots{}} that the documentation
|
||||
was truncated.
|
||||
|
||||
@findex eldoc-doc-buffer
|
||||
@item eldoc-echo-area-prefer-doc-buffer
|
||||
If the value of this user option is @code{t}, ElDoc will not show the
|
||||
documentation in the echo area if the ElDoc buffer with the
|
||||
documentation is already displayed in some window. (You can use the
|
||||
command @kbd{M-x eldoc-doc-buffer} any time to show the ElDoc buffer.)
|
||||
If the value of this option is the symbol @code{maybe}, the
|
||||
documentation will not be displayed in the echo area if the ElDoc
|
||||
buffer is shown in some window, and the documentation text has to be
|
||||
truncated if displayed in the echo area. Finally, the value of
|
||||
@code{nil} (the default) means always show the documentation in the
|
||||
echo area.
|
||||
|
||||
@table @code
|
||||
@item eldoc-documentation-strategy
|
||||
This variable holds the function which is used to retrieve
|
||||
documentation for the item at point from the functions in the hook
|
||||
@code{eldoc-documentation-functions}. By default,
|
||||
@code{eldoc-documentation-strategy} returns the first documentation
|
||||
string produced by the @code{eldoc-documentation-functions} hook, but
|
||||
it may be customized to compose those functions' results in other
|
||||
ways.
|
||||
This customizable variable's value is the function which is used to
|
||||
retrieve and display documentation for the symbol at point. The
|
||||
documentation is produced by the functions in the hook
|
||||
@code{eldoc-documentation-functions}. The default value of
|
||||
@code{eldoc-documentation-strategy} specifies that ElDoc should
|
||||
display the first documentation text produced by functions in the
|
||||
@code{eldoc-documentation-functions} hook, but you can customize
|
||||
@code{eldoc-documentation-strategy} to work in other ways, such as
|
||||
displaying all of the documentation texts concatenated together.
|
||||
|
||||
@item eldoc-documentation-functions
|
||||
This abnormal hook holds documentation functions. It acts as a
|
||||
collection of backends for ElDoc. This is what modes should use to
|
||||
register their documentation functions with ElDoc.
|
||||
|
||||
@vindex eldoc-echo-area-display-truncation-message
|
||||
@item eldoc-echo-area-display-truncation-message
|
||||
If non-@code{nil} (the default), display a verbose message about how
|
||||
to view a complete documentation (if it has been truncated in the echo
|
||||
area). If @code{nil}, just mark truncated messages with @samp{...}.
|
||||
@end table
|
||||
This abnormal hook's value is a list of functions that can produce
|
||||
documentation for the symbol at point as appropriate for the current
|
||||
buffer's major-mode. These functions act as a collection of backends
|
||||
for ElDoc. Major mode register their documentation lookup functions
|
||||
with ElDoc by adding their functions to the buffer-local value of this
|
||||
variable.
|
||||
@end vtable
|
||||
|
||||
@node Hideshow
|
||||
@section Hideshow minor mode
|
||||
|
|
|
@ -998,15 +998,14 @@ major mode's special commands. (The variable
|
|||
|
||||
@vindex outline-minor-mode-use-buttons
|
||||
If @code{outline-minor-mode-use-buttons} is non-@code{nil}, Outline
|
||||
minor mode will use buttons (at the start of the header lines) in
|
||||
addition to ellipsis to show that a section is hidden. Using
|
||||
@kbd{RET} (or clicking on the button with a mouse) will toggle
|
||||
displaying the section.
|
||||
|
||||
@vindex outline-minor-mode-use-margins
|
||||
If @code{outline-minor-mode-use-margins} is non-@code{nil}, Outline
|
||||
minor mode will use the window margins in addition to ellipsis to show
|
||||
that a section is hidden.
|
||||
minor mode will use buttons at the beginning of the heading lines, in
|
||||
addition to ellipsis, to show that a section is hidden. Clicking the
|
||||
mouse on the button toggles display of the section. If the value of
|
||||
this variable is @code{insert}, the buttons are inserted directly into
|
||||
the buffer text, so @key{RET} on the button will also toggle display
|
||||
of the section, like a mouse click does. If the value is
|
||||
@code{in-margins}, Outline minor mode will use the window margins to
|
||||
indicate that a section is hidden.
|
||||
|
||||
@vindex outline-minor-mode-cycle
|
||||
If the @code{outline-minor-mode-cycle} user option is
|
||||
|
|
|
@ -474,7 +474,7 @@ Each transform is a list of the form @w{@code{(@var{regexp}
|
|||
@var{replacement} [@var{uniquify}])}}. @var{regexp} is a regular
|
||||
expression to match against the file name; if it matches,
|
||||
@code{replace-match} is used to replace the matching part with
|
||||
@var{replacement}. If the optional element @var{uniquify} is non-nil,
|
||||
@var{replacement}. If the optional element @var{uniquify} is non-@code{nil},
|
||||
the auto-save file name is constructed by concatenating the directory
|
||||
part of the transformed file name with the buffer's file name in which
|
||||
all directory separators were changed to @samp{!} to prevent clashes.
|
||||
|
|
|
@ -2726,7 +2726,7 @@ coordinates @var{x} and @var{y} in a specified frame or window,
|
|||
@var{frame-or-window}, which defaults to the selected window.
|
||||
The coordinates @var{x} and @var{y} are relative to the
|
||||
text area of the selected window.
|
||||
If @var{whole} is @code{non-nil}, the @var{x} coordinate is relative
|
||||
If @var{whole} is non-@code{nil}, the @var{x} coordinate is relative
|
||||
to the entire window area including scroll bars, margins and fringes.
|
||||
@end defun
|
||||
|
||||
|
|
|
@ -1077,7 +1077,7 @@ pristine environment, that may not be true for the subprocess.
|
|||
@end defopt
|
||||
|
||||
@defopt native-comp-async-query-on-exit
|
||||
If this variable's value is non-nil, Emacs will query upon exiting
|
||||
If this variable's value is non-@code{nil}, Emacs will query upon exiting
|
||||
whether to exit and kill any asynchronous native-compilation
|
||||
subprocesses that are still running, thus preventing the corresponding
|
||||
@file{.eln} files from being written. If the value is @code{nil}, the
|
||||
|
|
|
@ -548,7 +548,7 @@ previous example as follows:
|
|||
@end example
|
||||
@end defmac
|
||||
|
||||
@defmac dolist-with-progress-reporter (var count [result]) reporter-or-message body@dots{}
|
||||
@defmac dolist-with-progress-reporter (var list [result]) reporter-or-message body@dots{}
|
||||
This is another convenience macro that works the same way as @code{dolist}
|
||||
does, but also reports loop progress using the functions described
|
||||
above. As in @code{dotimes-with-progress-reporter},
|
||||
|
@ -2587,7 +2587,7 @@ meaning the foreground color of the face. Omitting the attribute
|
|||
@code{:color} means to use the foreground color of the face.
|
||||
@var{style} should be a symbol @code{line} or @code{wave}, meaning to
|
||||
use a straight or wavy line. Omitting the attribute @code{:style}
|
||||
means to use a straight line. @var{position}, if non-nil, means to
|
||||
means to use a straight line. @var{position}, if non-@code{nil}, means to
|
||||
display the underline at the descent of the text, instead of at the
|
||||
baseline level. If it is a number, then it specifies the amount of
|
||||
pixels above the descent to display the underline.
|
||||
|
@ -7347,7 +7347,7 @@ Display the next search result in @var{xwidget}. This function will
|
|||
signal an error if a search query has not been already started in
|
||||
@var{xwidget} through @code{xwidget-webkit-search}.
|
||||
|
||||
If @code{wrap-around} was non-nil when @code{xwidget-webkit-search}
|
||||
If @code{wrap-around} was non-@code{nil} when @code{xwidget-webkit-search}
|
||||
was called, then the search will restart from the beginning of the
|
||||
document when its end is reached.
|
||||
@end defun
|
||||
|
@ -7357,7 +7357,7 @@ Display the previous search result in @var{xwidget}. This function
|
|||
signals an error if a search query has not been already started in
|
||||
@var{xwidget} through @code{xwidget-webkit-search}.
|
||||
|
||||
If @code{wrap-around} was non-nil when @code{xwidget-webkit-search}
|
||||
If @code{wrap-around} was non-@code{nil} when @code{xwidget-webkit-search}
|
||||
was called, then the search will restart from the end of the
|
||||
document when its beginning is reached.
|
||||
@end defun
|
||||
|
|
|
@ -3136,7 +3136,7 @@ a list of file names that match it.
|
|||
|
||||
@var{pattern} is, by default, a ``glob''/wildcard string, e.g.,
|
||||
@samp{"/tmp/*.png"} or @samp{"/*/*/foo.png"}, but can also be a
|
||||
regular expression if the optional @var{regexp} parameter is non-nil.
|
||||
regular expression if the optional @var{regexp} parameter is non-@code{nil}.
|
||||
In any case, the matches are applied per sub-directory, so a match
|
||||
can't span a parent/sub directory.
|
||||
|
||||
|
|
|
@ -4058,70 +4058,89 @@ amount of different data types on the clipboard.
|
|||
When the user drops something from another application over Emacs,
|
||||
Emacs will try to insert any text and open any URL that was dropped.
|
||||
If text was dropped, then it will always be inserted at the location
|
||||
of the mouse pointer when the drop happened, or saved in the kill ring
|
||||
if insertion failed (which can happen if the buffer is read-only). If
|
||||
it was an URL, then Emacs tries to call an appropriate handler
|
||||
function by first matching the URL against regexps defined in
|
||||
@code{dnd-protocol-alist}, and then against @code{browse-url-handlers}
|
||||
and @code{browse-url-default-handlers}, and failing that, inserting
|
||||
the URL as plain text.
|
||||
of the mouse pointer where the drop happened, or saved in the kill
|
||||
ring if insertion failed, which could happen if the buffer was
|
||||
read-only. If a URL was dropped instead, then Emacs will first try to
|
||||
call an appropriate handler function by matching the URL against
|
||||
regexps defined in the variable @code{dnd-protocol-alist}, and then
|
||||
against those defined in the variables @code{browse-url-handlers} and
|
||||
@code{browse-url-default-handlers}. Should no suitable handler be
|
||||
located, Emacs will fall back to inserting the URL as plain text.
|
||||
|
||||
@defvar dnd-protocol-alist
|
||||
This variable is a list of cons cells of the form
|
||||
@w{@code{(@var{pattern} . @var{action})}}. @var{pattern} is a regexp
|
||||
that URLs are matched against after being dropped. @var{action} is a
|
||||
function that is called with two arguments should a URL being dropped
|
||||
function that is called with two arguments, should a URL being dropped
|
||||
match @var{pattern}: the URL being dropped, and the action being
|
||||
performed for the drop (one of the symbols @code{copy}, @code{move},
|
||||
@code{link}, @code{private} or @code{ask}).
|
||||
performed for the drop, which is one of the symbols @code{copy},
|
||||
@code{move}, @code{link}, @code{private} or @code{ask}.
|
||||
|
||||
If @var{action} is @var{private}, then it means the program that
|
||||
initiated the drop wants Emacs to perform an unspecified action with
|
||||
the URL; a reasonable action to perform in that case is to open the URL
|
||||
or copy its contents into the current buffer. Otherwise, @var{action}
|
||||
has the same meaning as the @var{action} argument to
|
||||
@code{dnd-begin-file-drag}.
|
||||
@end defvar
|
||||
|
||||
@cindex drag and drop, X
|
||||
@cindex drag and drop, other formats
|
||||
Emacs implements drag-and-drop for text and URLs individually for
|
||||
each window system, and does not by default support the dropping of
|
||||
anything else. Code that wishes to support the dropping of content
|
||||
types not supported by Emacs can utilize the X-specific interface
|
||||
described below:
|
||||
Emacs implements receiving text and URLs individually for each
|
||||
window system, and does not by default support receiving other kinds
|
||||
of data as drops. To support receiving other kinds of data, use the
|
||||
X-specific interface described below:
|
||||
|
||||
@vindex x-dnd-test-function
|
||||
@vindex x-dnd-known-types
|
||||
When a user drags something from another application over Emacs on
|
||||
the X Window System, that other application expects Emacs to tell it
|
||||
if Emacs can handle the data that was dragged. The variable
|
||||
@code{x-dnd-test-function} is used by Emacs to determine what to
|
||||
reply. The default value is @code{x-dnd-default-test-function} which
|
||||
accepts drops if the type of the data to be dropped is present in
|
||||
@code{x-dnd-known-types}. You can customize
|
||||
@code{x-dnd-test-function} and/or @code{x-dnd-known-types} if you want
|
||||
Emacs to accept or reject drops based on some other criteria.
|
||||
When a user drags something from another application over Emacs
|
||||
under the X Window System, that other application expects Emacs to
|
||||
tell it if Emacs understands the data being dragged. The function in
|
||||
the variable @code{x-dnd-test-function} is called by Emacs to
|
||||
determine what to reply to any such inquiry. The default value is
|
||||
@code{x-dnd-default-test-function}, which accepts drops if the type of
|
||||
the data to be dropped is present in @code{x-dnd-known-types}.
|
||||
Changing the variables @code{x-dnd-test-function} and
|
||||
@code{x-dnd-known-types} can make Emacs accept or reject drops based
|
||||
on some other criteria.
|
||||
|
||||
@vindex x-dnd-types-alist
|
||||
If you want to change the way Emacs handles drop of different types
|
||||
or add a new type, customize @code{x-dnd-types-alist}. This requires
|
||||
detailed knowledge of what types other applications use for drag and
|
||||
drop.
|
||||
If you want to change the way Emacs receives drops of different data
|
||||
types, or you want to enable it to understand a new type, change the variable
|
||||
@code{x-dnd-types-alist}. Doing so correctly requires detailed
|
||||
knowledge of what data types other applications use for drag and drop.
|
||||
|
||||
Those data types are typically implemented as special data types an
|
||||
X selection provided by the other application can be converted to.
|
||||
They can either be the same data types that are typically accepted by
|
||||
@code{gui-set-selection}, or they can be MIME types, depending on the
|
||||
specific drag-n-drop protocol being used. Plain text may be
|
||||
@code{"STRING"} or @code{"text/plain"}, for example.
|
||||
These data types are typically implemented as special data types
|
||||
that can be obtained from an X selection provided by the other
|
||||
application. In most cases, they are either the same data types that
|
||||
are typically accepted by @code{gui-set-selection}, or MIME types,
|
||||
depending on the specific drag-and-drop protocol being used. For
|
||||
example, the data type used for plain text may be either
|
||||
@code{"STRING"} or @code{"text/plain"}.
|
||||
|
||||
@vindex x-dnd-direct-save-function
|
||||
@c FIXME: This description is overly-complicated and confusing. In
|
||||
@c particular, the two calls to the function basically sound
|
||||
@c identical, so it is unclear how should the function distinguish
|
||||
@c between the first and the second one. The description of who asks
|
||||
@c whom to do what is also very hard to understand. Needs rewording,
|
||||
@c and needs shorter sentences. Perhaps examples could help.
|
||||
However, @code{x-dnd-types-alist} does not handle a special kind of
|
||||
drop sent by a program which wants Emacs to save a file in a location
|
||||
Emacs must determine by itself. These drops are handled via the
|
||||
variable @code{x-dnd-direct-save-function}, which should be a function
|
||||
that accepts two arguments. If the first argument is non-@code{nil},
|
||||
then the second argument is a string describing the name (with no
|
||||
leading directory) that the other program recommends the file be saved
|
||||
under, and the function should return the complete file name under
|
||||
which it will be saved. Otherwise, the file has already been saved,
|
||||
and the second argument is the complete name of the file. The
|
||||
function should then perform whatever action is appropriate (i.e.,
|
||||
open the file or refresh the directory listing.)
|
||||
drop sent by a program that wants Emacs to tell it where to save a
|
||||
file in a specific location determined by the user. These drops are
|
||||
instead handled by a function that is the value of the variable
|
||||
@code{x-dnd-direct-save-function}. This function should accept two arguments.
|
||||
If the first argument is non-@code{nil}, then the second argument is a
|
||||
file name to save (with leading directories) that the other
|
||||
program recommends, and the
|
||||
function should return the full file name under which it should be
|
||||
saved. After the function completes, Emacs will ask the other program
|
||||
to save the file under the name that was returned, and if the file was
|
||||
successfully saved, call the function again with the first argument
|
||||
set to a non-@code{nil} value and the second argument set to the file
|
||||
name that was returned. The function should then perform whatever
|
||||
action is appropriate (i.e., opening the file or refreshing a
|
||||
directory listing.)
|
||||
|
||||
@cindex initiating drag-and-drop
|
||||
On capable window systems, Emacs also supports dragging contents
|
||||
|
|
|
@ -1961,12 +1961,12 @@ and later discarded; this is not possible with a property list.
|
|||
@cindex accessing plist properties
|
||||
|
||||
The following functions can be used to manipulate property lists.
|
||||
They all compare property names using @code{eq}.
|
||||
They all default to comparing property names using @code{eq}.
|
||||
|
||||
@defun plist-get plist property &optional predicate
|
||||
This returns the value of the @var{property} property stored in the
|
||||
property list @var{plist}. Comparisons are done with @var{predicate},
|
||||
and defaults to @code{eq}. It accepts a malformed @var{plist}
|
||||
which defaults to @code{eq}. It accepts a malformed @var{plist}
|
||||
argument. If @var{property} is not found in the @var{plist}, it
|
||||
returns @code{nil}. For example,
|
||||
|
||||
|
@ -1985,7 +1985,7 @@ returns @code{nil}. For example,
|
|||
@defun plist-put plist property value &optional predicate
|
||||
This stores @var{value} as the value of the @var{property} property in
|
||||
the property list @var{plist}. Comparisons are done with @var{predicate},
|
||||
and defaults to @code{eq}. It may modify @var{plist} destructively,
|
||||
which defaults to @code{eq}. It may modify @var{plist} destructively,
|
||||
or it may construct a new list structure without altering the old. The
|
||||
function returns the modified property list, so you can store that back
|
||||
in the place where you got @var{plist}. For example,
|
||||
|
@ -2012,7 +2012,7 @@ compares properties using @code{equal} instead of @code{eq}.
|
|||
|
||||
@defun plist-member plist property &optional predicate
|
||||
This returns non-@code{nil} if @var{plist} contains the given
|
||||
@var{property}. Comparisons are done with @var{predicate}, and
|
||||
@var{property}. Comparisons are done with @var{predicate}, which
|
||||
defaults to @code{eq}. Unlike @code{plist-get}, this allows you to
|
||||
distinguish between a missing property and a property with the value
|
||||
@code{nil}. The value is actually the tail of @var{plist} whose
|
||||
|
|
|
@ -198,7 +198,7 @@ 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
|
||||
compatibility when @var{depth} is a non-@code{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
|
||||
|
@ -1256,7 +1256,7 @@ will be a vector for the ID at @var{pos}. If there is no entry at
|
|||
|
||||
@vindex tabulated-list-use-header-line
|
||||
@defun tabulated-list-header-overlay-p &optional POS
|
||||
This @code{defsubst} returns non-nil if there is a fake header at
|
||||
This @code{defsubst} returns non-@code{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},
|
||||
|
@ -1269,7 +1269,7 @@ 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
|
||||
@code{tabulated-list-padding}. If @var{advance} is non-@code{nil}, this
|
||||
function advances point by one line.
|
||||
@end defun
|
||||
|
||||
|
@ -1284,7 +1284,7 @@ This function changes the tabulated list entry at point, setting
|
|||
the name of the column to change. @var{desc} is the new column
|
||||
descriptor, which is inserted via @code{tabulated-list-print-col}.
|
||||
|
||||
If @var{change-entry-data} is non-nil, this function modifies the
|
||||
If @var{change-entry-data} is non-@code{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}.
|
||||
|
|
|
@ -507,7 +507,7 @@ string describing this signal.
|
|||
Since there are processes violating this rule, returning exit codes
|
||||
greater than 128 which are not bound to a signal, @code{process-file}
|
||||
returns always the exit code as natural number for remote processes.
|
||||
Setting this user option to non-nil forces @code{process-file} to
|
||||
Setting this user option to non-@code{nil} forces @code{process-file} to
|
||||
interpret such exit codes as signals, and to return a corresponding
|
||||
string.
|
||||
@end defopt
|
||||
|
|
|
@ -1052,11 +1052,15 @@ customization.
|
|||
@subsubsection Constructs in @code{rx} regexps
|
||||
|
||||
The various forms in @code{rx} regexps are described below. The
|
||||
shorthand @var{rx} represents any @code{rx} form, and @var{rx}@dots{}
|
||||
means zero or more @code{rx} forms. These are all valid arguments to
|
||||
the @code{rx} macro. Where the corresponding string
|
||||
regexp syntax is given, @var{A}, @var{B}, @dots{} are string regexp
|
||||
subexpressions.
|
||||
shorthand @var{rx} represents any @code{rx} form. @var{rx}@dots{}
|
||||
means zero or more @code{rx} forms and, unless stated otherwise,
|
||||
matches these forms in sequence as if wrapped in a @code{(seq @dots{})}
|
||||
subform.
|
||||
|
||||
These are all valid arguments to the @code{rx} macro. All forms are
|
||||
defined by their described semantics; the corresponding string regexps
|
||||
are provided for ease of understanding only. @var{A}, @var{B}, @dots{}
|
||||
denote (suitably bracketed) string regexp subexpressions therein.
|
||||
|
||||
@subsubheading Literals
|
||||
|
||||
|
@ -1290,12 +1294,12 @@ Match any character that has whitespace syntax
|
|||
|
||||
@item @code{lower}, @code{lower-case}
|
||||
Match anything lower-case, as determined by the current case table.
|
||||
If @code{case-fold-search} is non-nil, this also matches any
|
||||
If @code{case-fold-search} is non-@code{nil}, this also matches any
|
||||
upper-case letter.
|
||||
|
||||
@item @code{upper}, @code{upper-case}
|
||||
Match anything upper-case, as determined by the current case table.
|
||||
If @code{case-fold-search} is non-nil, this also matches any
|
||||
If @code{case-fold-search} is non-@code{nil}, this also matches any
|
||||
lower-case letter.
|
||||
|
||||
@item @code{graph}, @code{graphic}
|
||||
|
|
|
@ -718,9 +718,9 @@ byte-compiling any of the two files has equivalent results. The
|
|||
shorthands @code{snu-split} and @code{snu-lines} used in the second
|
||||
version are @emph{not} interned in the obarray. This is easily seen
|
||||
by moving point to the location where the shorthands are used and
|
||||
waiting for ElDoc (@pxref{Lisp Doc, , Local Variables in Files, emacs,
|
||||
The GNU Emacs Manual}) to hint at the true full name of the symbol
|
||||
under point in the echo area.
|
||||
waiting for ElDoc (@pxref{Programming Language Doc, , Local Variables
|
||||
in Files, emacs, The GNU Emacs Manual}) to hint at the true full name
|
||||
of the symbol under point in the echo area.
|
||||
|
||||
Since @code{read-symbol-shorthands} is a file-local variable, it is
|
||||
possible that multiple libraries depending on
|
||||
|
@ -794,7 +794,7 @@ this case.
|
|||
@end defvar
|
||||
|
||||
@defvar print-symbols-bare
|
||||
When bound to non-nil, the Lisp printer prints only the bare symbol of
|
||||
When bound to non-@code{nil}, the Lisp printer prints only the bare symbol of
|
||||
a symbol with position, ignoring the position.
|
||||
@end defvar
|
||||
|
||||
|
|
|
@ -1525,7 +1525,7 @@ Some commands leave the region active after execution in such a way that
|
|||
it interferes with selective undo of that command. To make @code{undo}
|
||||
ignore the active region when invoked immediately after such a command,
|
||||
set the property @code{undo-inhibit-region} of the command's function
|
||||
symbol to a non-nil value. @xref{Standard Properties}.
|
||||
symbol to a non-@code{nil} value. @xref{Standard Properties}.
|
||||
|
||||
@node Maintaining Undo
|
||||
@section Maintaining Undo Lists
|
||||
|
@ -4876,7 +4876,7 @@ If the optional argument @var{no-pad} is non-@code{nil} then this
|
|||
function doesn't generate the padding.
|
||||
@end defun
|
||||
|
||||
@deffn Command base64-decode-region beg end &optional base64url
|
||||
@deffn Command base64-decode-region beg end &optional base64url ignore-invalid
|
||||
This function converts the region from @var{beg} to @var{end} from base
|
||||
64 code into the corresponding decoded text. It returns the length of
|
||||
the decoded text.
|
||||
|
@ -4885,9 +4885,11 @@ The decoding functions ignore newline characters in the encoded text.
|
|||
|
||||
If optional argument @var{base64url} is non-@code{nil}, then padding
|
||||
is optional, and the URL variant of base 64 encoding is used.
|
||||
If optional argument @var{ignore-invalid} is non-@code{nil}, then any
|
||||
unrecognized characters are ignored.
|
||||
@end deffn
|
||||
|
||||
@defun base64-decode-string string &optional base64url
|
||||
@defun base64-decode-string string &optional base64url ignore-invalid
|
||||
This function converts the string @var{string} from base 64 code into
|
||||
the corresponding decoded text. It returns a unibyte string containing the
|
||||
decoded text.
|
||||
|
@ -4897,6 +4899,8 @@ The decoding functions ignore newline characters in the encoded text.
|
|||
|
||||
If optional argument @var{base64url} is non-@code{nil}, then padding
|
||||
is optional, and the URL variant of base 64 encoding is used.
|
||||
If optional argument @var{ignore-invalid} is non-@code{nil}, then any
|
||||
unrecognized characters are ignored.
|
||||
@end defun
|
||||
|
||||
@node Checksum/Hash
|
||||
|
@ -5922,7 +5926,7 @@ methods if these concepts apply to the transport. If they do, then
|
|||
any system resources (e.g.@: processes, timers, etc.) used to listen for
|
||||
messages on the wire should be released in @code{jsonrpc-shutdown},
|
||||
i.e.@: they should only be needed while @code{jsonrpc-running-p} is
|
||||
non-nil.
|
||||
non-@code{nil}.
|
||||
|
||||
@end enumerate
|
||||
|
||||
|
|
|
@ -1183,7 +1183,7 @@ Here is an example:
|
|||
(let ((x 0)) ; @r{@code{x} is lexically bound.}
|
||||
(setq my-ticker (lambda ()
|
||||
(setq x (1+ x)))))
|
||||
@result{} (closure ((x . 0) t) ()
|
||||
@result{} (closure ((x . 0)) ()
|
||||
(setq x (1+ x)))
|
||||
|
||||
(funcall my-ticker)
|
||||
|
|
|
@ -2624,7 +2624,7 @@ default value is an empty display action, i.e., @w{@code{(nil . nil)}}.
|
|||
The value of this option is an alist mapping conditions to display
|
||||
actions. Each condition is passed to @code{buffer-match-p}, along
|
||||
with the buffer name and the @var{action} argument passed to
|
||||
@code{display-buffer}. If it returns a non-nil value, then
|
||||
@code{display-buffer}. If it returns a non-@code{nil} value, then
|
||||
@code{display-buffer} uses the corresponding display action to display
|
||||
the buffer.
|
||||
@end defopt
|
||||
|
|
|
@ -2191,7 +2191,7 @@ foo& bar
|
|||
|
||||
@defvar c-asymmetry-fontification-flag
|
||||
@vindex asymmetry-fontification-flag @r{(c-)}
|
||||
When @code{c-asymmetry-fontification-flag} is non-nil (which it is by
|
||||
When @code{c-asymmetry-fontification-flag} is non-@code{nil} (which it is by
|
||||
default), code like the above, with white space either before or after
|
||||
the operator, but not both, is fontified as a declaration. When the
|
||||
variable is nil, such a construct gets the default face.
|
||||
|
|
|
@ -4051,7 +4051,7 @@ following keywords can be used:
|
|||
|
||||
@table @code
|
||||
@item :read-only
|
||||
A non-nil value means the slot should not be @code{setf}-able;
|
||||
A non-@code{nil} value means the slot should not be @code{setf}-able;
|
||||
the slot's value is determined when the object is created and does
|
||||
not change afterward.
|
||||
|
||||
|
|
|
@ -72,12 +72,12 @@ Eglot is the Emacs client for the @dfn{Language Server Protocol}
|
|||
A @dfn{polyglot} is a
|
||||
person who is able to use several languages.
|
||||
} Eglot provides infrastructure and a set of commands for enriching
|
||||
the source code editing capabilities of Emacs via LSP. LSP is a
|
||||
the source code editing capabilities of Emacs via LSP@. LSP is a
|
||||
standardized communications protocol between source code editors (such
|
||||
as Emacs) and language servers---programs external to Emacs which
|
||||
analyze the source code on behalf of Emacs. The protocol allows Emacs
|
||||
to receive various source code services from the server, such as
|
||||
description and location of functions calls, types of variables, class
|
||||
description and location of function calls, types of variables, class
|
||||
definitions, syntactic errors, etc. This way, Emacs doesn't need to
|
||||
implement the language-specific parsing and analysis capabilities in
|
||||
its own code, but is still capable of providing sophisticated editing
|
||||
|
@ -525,7 +525,7 @@ Emacs Development Environment (@pxref{EDE,,, emacs, GNU Emacs
|
|||
Manual}).
|
||||
@end itemize
|
||||
|
||||
Eglot uses the Emacs's project management infrastructure to figure out
|
||||
Eglot uses Emacs's project management infrastructure to figure out
|
||||
which files and buffers belong to what project, so any kind of project
|
||||
supported by that infrastructure is automatically supported by Eglot.
|
||||
|
||||
|
@ -588,8 +588,8 @@ and also arranges for other Emacs features supported by Eglot
|
|||
(@pxref{Eglot Features}) to receive information from the language
|
||||
server, by changing the settings of these features. Unlike other
|
||||
minor-modes, this special minor mode is not activated manually by the
|
||||
user, but automatically as result of starting an Eglot session for the
|
||||
buffer. However, this minor mode provides a hook variable
|
||||
user, but automatically, as the result of starting an Eglot session
|
||||
for the buffer. However, this minor mode provides a hook variable
|
||||
@code{eglot-managed-mode-hook} that can be used to customize the Eglot
|
||||
management of the buffer. This hook is run both when the minor mode
|
||||
is turned on and when it's turned off; use the variable
|
||||
|
@ -614,7 +614,7 @@ visiting the file.
|
|||
@section Eglot Commands
|
||||
@cindex commands, Eglot
|
||||
|
||||
This section provides a reference of the most commonly used Eglot
|
||||
This section provides a reference for the most commonly used Eglot
|
||||
commands:
|
||||
|
||||
@ftable @code
|
||||
|
@ -672,7 +672,7 @@ communications with the language servers.
|
|||
@item M-x eglot-rename
|
||||
This command renames the program symbol (a.k.a.@: @dfn{identifier}) at
|
||||
point to another name. It prompts for the new name of the symbol, and
|
||||
then modifies all the files in the project which arte managed by the
|
||||
then modifies all the files in the project which are managed by the
|
||||
language server of the current buffer to implement the renaming.
|
||||
|
||||
@item M-x eglot-format
|
||||
|
@ -775,13 +775,13 @@ Request completion of the symbol at point.
|
|||
@section Eglot Variables
|
||||
@cindex variables, Eglot
|
||||
|
||||
This section provides a reference of the Eglot' user options.
|
||||
This section provides a reference for the Eglot user options.
|
||||
|
||||
@vtable @code
|
||||
@item eglot-autoreconnect
|
||||
This option controls the ability to reconnect automatically to the
|
||||
language server when Eglot detects that the server process terminated
|
||||
unexpectedly. The default value 3 means to attempt reconnection only
|
||||
unexpectedly. The default value @code{3} means to attempt reconnection only
|
||||
if the previous successful connection lasted for more than that number
|
||||
of seconds; a different positive value changes the minimal length of
|
||||
the connection to trigger reconnection. A value of @code{t} means
|
||||
|
@ -798,10 +798,10 @@ out. The default is 30 seconds.
|
|||
This setting is mainly important for connections which are slow to
|
||||
establish. Whereas the variable @code{eglot-connect-timeout} controls
|
||||
how long to wait for, this variable controls whether to block Emacs's
|
||||
user interface while waiting. The default value is 3; a positive
|
||||
user interface while waiting. The default value is @code{3}; a positive
|
||||
value means block for that many seconds, then wait for the connection
|
||||
in the background. The value of @code{t} means block during the whole
|
||||
waiting period. The value of @code{nil} or zero means don't block at
|
||||
waiting period. The value of @code{nil} or @code{0} means don't block at
|
||||
all during the waiting period.
|
||||
|
||||
@item eglot-events-buffer-size
|
||||
|
@ -885,7 +885,7 @@ destination, customize the ElDoc variable
|
|||
@code{eldoc-display-functions}.
|
||||
@end itemize
|
||||
|
||||
For this reason, this manual describes only how to customize the
|
||||
For this reason, this manual describes only how to customize
|
||||
Eglot's own operation, which mainly has to do with the server
|
||||
connections and the server features to be used by Eglot.
|
||||
|
||||
|
@ -919,12 +919,12 @@ A hook run after Eglot started or stopped managing a buffer.
|
|||
@vindex eglot-stay-out-of
|
||||
@item eglot-stay-out-of
|
||||
This variable's value lists Emacs features that Eglot shouldn't
|
||||
automatically try to manage on user's behalf. It is useful, for
|
||||
automatically try to manage on the user's behalf. It is useful, for
|
||||
example, when you need to use non-LSP Flymake or Company back-ends.
|
||||
To have Eglot stay away of some Emacs feature, add that feature's
|
||||
To have Eglot stay away from some Emacs feature, add that feature's
|
||||
symbol or a regexp that will match a symbol's name to the list: for
|
||||
example, the symbol @code{xref} to leave Xref alone, or the string
|
||||
@samp{company} to stay away of your Company customizations. Here's an
|
||||
@samp{company} to stay away from your Company customizations. Here's an
|
||||
example:
|
||||
|
||||
@lisp
|
||||
|
@ -949,7 +949,7 @@ tuning of per-project settings via the variable
|
|||
settings contained in this variable to each server for which such
|
||||
settings were defined in the variable. These settings are
|
||||
communicated to the server initially (upon establishing the
|
||||
connection) or when the settings are changed, or in response to the
|
||||
connection) or when the settings are changed, or in response to a
|
||||
configuration request from the server.
|
||||
|
||||
In many cases, servers can be configured globally using a
|
||||
|
@ -958,12 +958,12 @@ directory, which the language server reads. For example, the
|
|||
@command{pylsp} server for Python reads the file
|
||||
@file{~/.config/pycodestyle} and the @command{clangd} server reads the
|
||||
file @file{.clangd} anywhere in the current project's directory tree.
|
||||
If possible, we recommend to use these configuration files that are
|
||||
If possible, we recommend using those configuration files that are
|
||||
independent of Eglot and Emacs; they have the advantage that they will
|
||||
work with other LSP clients as well.
|
||||
|
||||
If you do need to provide Emacs-specific configuration for a language
|
||||
server, we recommend to define the appropriate value in the
|
||||
server, we recommend defining the appropriate value in the
|
||||
@file{.dir-locals.el} file in the project's directory. The value of
|
||||
this variable should be a property list of the following format:
|
||||
|
||||
|
@ -989,9 +989,10 @@ before actually connecting to the server.
|
|||
|
||||
Here's an example of defining the workspace-configuration settings for
|
||||
a project that uses two different language servers, one for Python,
|
||||
whose server is @command{pylsp}, the other one for Go, with
|
||||
@command{gopls} as its server (presumably, the project is written in a
|
||||
combination of these two languages):
|
||||
the other one for Go (presumably, the project is written in a
|
||||
combination of these two languages). The server for Python in this
|
||||
case is @command{pylsp}, the server for Go is @command{gopls}. The
|
||||
value of @code{eglot-workspace-configuration} in this case should be:
|
||||
|
||||
@lisp
|
||||
((python-mode
|
||||
|
@ -1104,9 +1105,9 @@ sure to repeat the process after toggling @code{debug-on-error} on
|
|||
backtrace of the error that should also be attached to the bug report.
|
||||
|
||||
@item
|
||||
An explanation how to obtain and install the language server you used.
|
||||
If possible, try to replicate the problem with the C/C@t{++} or Python
|
||||
servers, as these are very easy to install.
|
||||
An explanation of how to obtain, install, and configure the language
|
||||
server you used. If possible, try to replicate the problem with the
|
||||
C/C@t{++} or Python servers, as these are very easy to install.
|
||||
|
||||
@item
|
||||
A description of how to setup the @emph{minimal} project (one or two
|
||||
|
|
|
@ -800,12 +800,12 @@ command-line switch:
|
|||
|
||||
@table @var
|
||||
@item short
|
||||
This element, if non-nil, should be a character to be used as a short
|
||||
This element, if non-@code{nil}, should be a character to be used as a short
|
||||
switch, like @code{-@var{short}}. At least one of this element and
|
||||
@var{long} must be non-nil.
|
||||
@var{long} must be non-@code{nil}.
|
||||
|
||||
@item long
|
||||
This element, if non-nil, should be a string to be used as a long
|
||||
This element, if non-@code{nil}, should be a string to be used as a long
|
||||
switch, like @code{--@var{long}}.
|
||||
|
||||
@item value
|
||||
|
|
|
@ -312,7 +312,7 @@ been reported.
|
|||
Which fringe (if any) should show the warning/error bitmaps.
|
||||
|
||||
@item flymake-wrap-around
|
||||
If non-nil, moving to errors with @code{flymake-goto-next-error} and
|
||||
If non-@code{nil}, moving to errors with @code{flymake-goto-next-error} and
|
||||
@code{flymake-goto-prev-error} wraps around buffer boundaries.
|
||||
@end vtable
|
||||
|
||||
|
@ -878,7 +878,7 @@ line-idx col-idx err-text-idx)}. @xref{Parsing the output}.
|
|||
@item flymake-proc-diagnostic-type-pred
|
||||
A function to classify a diagnostic text as particular type of error.
|
||||
Should be a function taking an error text and returning a diagnostic
|
||||
symbol (@pxref{Flymake error types}). If non-nil is returned but
|
||||
symbol (@pxref{Flymake error types}). If non-@code{nil} is returned but
|
||||
there is no such symbol in that table, a warning is assumed. If nil
|
||||
is returned, an error is assumed. Can also be a regular expression
|
||||
that should match only warnings. This variable replaces the old
|
||||
|
|
|
@ -10497,7 +10497,7 @@ normally, but it'll make this command work a whole lot faster. Of
|
|||
course, it'll make group entry somewhat slow.
|
||||
|
||||
@vindex gnus-refer-thread-use-search
|
||||
If @code{gnus-refer-thread-use-search} is non-nil then those backends
|
||||
If @code{gnus-refer-thread-use-search} is non-@code{nil} then those backends
|
||||
that know how to find threads directly will search not just in the
|
||||
current group but all groups on the same server.
|
||||
|
||||
|
@ -10515,7 +10515,7 @@ is true and the initial referral starts from a summary buffer for a
|
|||
non-virtual group this may not be possible. In this case a new
|
||||
summary buffer is created holding a virtual group with the result of
|
||||
the thread search.) If @code{gnus-refer-thread-limit-to-thread} is
|
||||
non-nil then the summary buffer will be limited to articles in the
|
||||
non-@code{nil} then the summary buffer will be limited to articles in the
|
||||
thread.
|
||||
|
||||
@item M-^ (Summary)
|
||||
|
@ -21569,7 +21569,7 @@ Search Groups}).
|
|||
Search queries can be specified one of two ways: either using the
|
||||
syntax of the engine responsible for the group you're searching, or
|
||||
using Gnus' generalized search syntax. Set the option
|
||||
@code{gnus-search-use-parsed-queries} to a non-nil value to used the
|
||||
@code{gnus-search-use-parsed-queries} to a non-@code{nil} value to used the
|
||||
generalized syntax. The advantage of this syntax is that, if you have
|
||||
multiple backends indexed by different engines, you don't need to
|
||||
remember which one you're searching---it's also possible to issue the
|
||||
|
@ -26329,7 +26329,7 @@ size, it will reject insertion of new entries.
|
|||
@end defvar
|
||||
|
||||
@defvar gnus-registry-register-all
|
||||
If this option is non-nil, the registry will register all messages, as
|
||||
If this option is non-@code{nil}, the registry will register all messages, as
|
||||
you see them. This is important to making split-to-parent and
|
||||
Message-ID references work correctly, as the registry needs to know
|
||||
where all messages are, but it can slow down group opening and the
|
||||
|
@ -26429,7 +26429,7 @@ have to put a rule like this:
|
|||
|
||||
in your fancy split setup.
|
||||
|
||||
If @code{gnus-registry-register-all} is non-nil (the default), the
|
||||
If @code{gnus-registry-register-all} is non-@code{nil} (the default), the
|
||||
registry will perform splitting for all messages. If it is nil,
|
||||
splitting will only happen for children of messages you've explicitly
|
||||
registered.
|
||||
|
@ -26508,7 +26508,7 @@ Store @code{value} under @code{key} for message @code{id}.
|
|||
|
||||
@defun gnus-registry-get-id-key (id key)
|
||||
Get the data under @code{key} for message @code{id}. If the option
|
||||
@code{gnus-registry-register-all} is non-nil, this function will also
|
||||
@code{gnus-registry-register-all} is non-@code{nil}, this function will also
|
||||
create an entry for @code{id} if one doesn't exist.
|
||||
@end defun
|
||||
|
||||
|
@ -26633,7 +26633,7 @@ connections after the system resumes. On systems compiled with D-Bus
|
|||
support (check the value of @code{(featurep 'dbusbind)}), Gnus can
|
||||
register a D-Bus signal to automatically close all server connections
|
||||
before the system goes to sleep. To enable this, set
|
||||
@code{gnus-dbus-close-on-sleep} to a non-nil value.
|
||||
@code{gnus-dbus-close-on-sleep} to a non-@code{nil} value.
|
||||
|
||||
For more information about D-Bus and Emacs, @pxref{Top,,, dbus, D-Bus integration in Emacs}.
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
#+language: en
|
||||
#+options: ':t toc:nil author:t email:t num:t
|
||||
#+startup: content
|
||||
#+macro: stable-version 2.7.0
|
||||
#+macro: release-date 2022-10-01
|
||||
#+macro: development-version 2.8.0-dev
|
||||
#+macro: stable-version 3.0.0
|
||||
#+macro: release-date 2022-10-28
|
||||
#+macro: development-version 3.1.0-dev
|
||||
#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
|
||||
#+macro: space @@texinfo:@: @@
|
||||
#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@
|
||||
|
@ -35,6 +35,7 @@ Current development target is {{{development-version}}}.
|
|||
+ Homepage: https://protesilaos.com/emacs/modus-themes.
|
||||
+ Git repository: https://git.sr.ht/~protesilaos/modus-themes.
|
||||
+ Mailing list: https://lists.sr.ht/~protesilaos/modus-themes.
|
||||
+ Backronym: My Old Display Unexpectedly Sharpened ... themes
|
||||
|
||||
#+toc: headlines 8 insert TOC here, with eight headline levels
|
||||
|
||||
|
@ -632,7 +633,7 @@ to user options to take effect ([[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enabl
|
|||
:end:
|
||||
#+vindex: modus-themes-deuteranopia
|
||||
|
||||
Brief: When non-nil use red/blue color-coding instead of red/green,
|
||||
Brief: When non-~nil~ use red/blue color-coding instead of red/green,
|
||||
where appropriate.
|
||||
|
||||
Symbol: ~modus-themes-deuteranopia~ (=boolean= type)
|
||||
|
@ -679,7 +680,7 @@ Possible values:
|
|||
The default is to use a bold typographic weight only when it is
|
||||
required.
|
||||
|
||||
With a non-nil value (~t~) display several syntactic constructs in bold
|
||||
With a non-~nil~ value (~t~) display several syntactic constructs in bold
|
||||
weight. This concerns keywords and other important aspects of code
|
||||
syntax. It also affects certain mode line indicators and command-line
|
||||
prompts.
|
||||
|
@ -709,7 +710,7 @@ Possible values:
|
|||
The default is to not use slanted text forms (italics) unless it is
|
||||
absolutely necessary.
|
||||
|
||||
With a non-nil value (~t~) choose to render more faces in italics. This
|
||||
With a non-~nil~ value (~t~) choose to render more faces in italics. This
|
||||
typically affects documentation strings and code comments.
|
||||
|
||||
Advanced users may also want to configure the exact attributes of the
|
||||
|
@ -799,7 +800,7 @@ Possible values:
|
|||
1. ~nil~ (default)
|
||||
2. ~t~
|
||||
|
||||
When set to non-nil (~t~), configure some spacing-sensitive faces like Org
|
||||
When set to non-~nil~ (~t~), configure some spacing-sensitive faces like Org
|
||||
tables and code blocks to always inherit from the ~fixed-pitch~ face.
|
||||
This is to ensure that certain constructs like code blocks and tables
|
||||
remain monospaced even when users opt for a mode that remaps typeface
|
||||
|
@ -926,8 +927,8 @@ an empty list). The list can include any of the following symbols:
|
|||
the form of =(height . FLOAT)=
|
||||
+ ~all-buttons~
|
||||
|
||||
The default (a nil value or an empty list) is a gray background combined
|
||||
with a pseudo three-dimensional effect.
|
||||
The default (a ~nil~ value or an empty list) is a gray background
|
||||
combined with a pseudo three-dimensional effect.
|
||||
|
||||
The ~flat~ property makes the button two dimensional.
|
||||
|
||||
|
@ -1068,7 +1069,7 @@ effect, color, and border visibility:
|
|||
+ A floating point to set the height of the mode line's text. It can
|
||||
also be a cons cell in the form of ~(height . FLOAT)~.
|
||||
|
||||
The default (a nil value or an empty list) is a two-dimensional
|
||||
The default (a ~nil~ value or an empty list) is a two-dimensional
|
||||
rectangle with a border around it. The active and the inactive mode
|
||||
lines use different shades of grayscale values for the background,
|
||||
foreground, border.
|
||||
|
@ -1097,7 +1098,7 @@ of NATNUM pixels at the boundaries of the mode lines. The default value
|
|||
is 1 and does not need to be specified explicitly. The padding has no
|
||||
effect when the ~moody~ property is also used, because Moody already
|
||||
applies its own tweaks. To ensure that the underline is placed at the
|
||||
bottom of the mode line, set ~x-underline-at-descent-line~ to non-nil
|
||||
bottom of the mode line, set ~x-underline-at-descent-line~ to non-~nil~
|
||||
(this is not needed when the ~borderless~ property is also set). For
|
||||
users on Emacs 29, the ~x-use-underline-position-properties~ variable must
|
||||
also be set to nil.
|
||||
|
@ -1159,7 +1160,7 @@ colors (which have been carefully designed to be highly accessible).
|
|||
|
||||
Furthermore, because Moody expects an underline and overline instead of
|
||||
a box style, it is strongly advised to set ~x-underline-at-descent-line~
|
||||
to a non-nil value.
|
||||
to a non-~nil~ value.
|
||||
|
||||
Finally, note that various packages which heavily modify the mode line,
|
||||
such as =doom-modeline=, =nano-modeline=, =powerline=, =spaceline= may not look
|
||||
|
@ -1183,7 +1184,7 @@ Possible values:
|
|||
+ ~t~
|
||||
|
||||
By default, all tab interfaces use backgrounds which are shades of gray.
|
||||
When this option is set to non-nil, the backgrounds become colorful.
|
||||
When this option is set to non-~nil~, the backgrounds become colorful.
|
||||
|
||||
This affects the built-in ~tab-bar-mode~ and ~tab-line-mode~, as well as the
|
||||
Centaur tabs package.
|
||||
|
@ -1202,8 +1203,9 @@ Symbol: ~modus-themes-completions~ (=alist= type properties)
|
|||
|
||||
This affects Company, Corfu, Flx, Helm, Icomplete/Fido, Ido, Ivy,
|
||||
Orderless, Selectrum, Vertico. The value is an alist that takes the
|
||||
form of a =(key . properties)= combination. Here is a sample, followed
|
||||
by a description of the particularities:
|
||||
form of a =(KEY . PROPERTIES)= combination. =KEY= is a symbol, while
|
||||
=PROPERTIES= is a list. Here is a sample, followed by a description
|
||||
of the particularities:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq modus-themes-completions
|
||||
|
@ -1213,10 +1215,10 @@ by a description of the particularities:
|
|||
#+end_src
|
||||
|
||||
The ~matches~ key refers to the highlighted characters that correspond
|
||||
to the user's input. By default (nil or an empty list), they have a
|
||||
bold weight and a colored foreground. The list of properties may
|
||||
include any of the following symbols regardless of the order they may
|
||||
appear in:
|
||||
to the user's input. When its properties are ~nil~ or an empty list,
|
||||
matching characters in the user interface will have a bold weight and
|
||||
a colored foreground. The list of properties may include any of the
|
||||
following symbols regardless of the order they may appear in:
|
||||
|
||||
- ~background~ to add a background color;
|
||||
|
||||
|
@ -1232,10 +1234,10 @@ appear in:
|
|||
variable. The absence of a weight means that bold will be used.
|
||||
|
||||
The ~selection~ key applies to the current line or currently matched
|
||||
candidate, depending on the specifics of the User Interface. By default
|
||||
(nil or an empty list), it has a subtle gray background, a bold weight,
|
||||
and the base foreground value for the text. The list of properties it
|
||||
accepts is as follows (order is not significant):
|
||||
candidate, depending on the specifics of the user interface. When its
|
||||
properties are ~nil~ or an empty list, it has a subtle gray background,
|
||||
a bold weight, and the base foreground value for the text. The list
|
||||
of properties it accepts is as follows (order is not significant):
|
||||
|
||||
- ~accented~ to make the background colorful instead of gray;
|
||||
|
||||
|
@ -1251,7 +1253,11 @@ accepts is as follows (order is not significant):
|
|||
cetera. Valid symbols are defined in the ~modus-themes-weights~
|
||||
variable. The absence of a weight means that bold will be used.
|
||||
|
||||
The ~popup~ key takes the same values as ~selection~.
|
||||
The ~popup~ key takes the same values as ~selection~. The only
|
||||
difference is that it applies specifically to user interfaces that
|
||||
display an inline popup and thus have slightly different styling
|
||||
requirements than the minibuffer. The two prominent packages are
|
||||
=company= and =corfu=.
|
||||
|
||||
Apart from specifying each key separately, a fallback list is accepted.
|
||||
This is only useful when the desired aesthetic is the same across all
|
||||
|
@ -1276,21 +1282,10 @@ corresponding key is simply ignored (~matches~ does not have ~accented~
|
|||
and ~text-also~, while ~selection~ and ~popup~ do not have
|
||||
~background~).
|
||||
|
||||
A concise expression of those associations can be written as follows,
|
||||
where the ~car~ is always the key and the ~cdr~ is the list of
|
||||
properties (whatever order they may appear in):
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq modus-themes-completions
|
||||
'((matches extrabold background intense)
|
||||
(selection semibold accented intense)
|
||||
(popup accented)))
|
||||
#+end_src
|
||||
|
||||
[[#h:2793a224-2109-4f61-a106-721c57c01375][Configure bold and italic faces]].
|
||||
|
||||
Also refer to the Orderless documentation for its intersection with
|
||||
Company (if you choose to use those in tandem).
|
||||
Also refer to the documentation of the ~orderless~ package for its
|
||||
intersection with ~company~ (if you choose to use those in tandem).
|
||||
|
||||
** Option for mail citations
|
||||
:properties:
|
||||
|
@ -1312,7 +1307,7 @@ Possible values:
|
|||
3. ~faint~
|
||||
4. ~monochrome~
|
||||
|
||||
By default (a nil value) citations are styled with contrasting hues to
|
||||
By default (a ~nil~ value) citations are styled with contrasting hues to
|
||||
denote their depth. Colors are easy to tell apart because they
|
||||
complement each other, but they otherwise are not very prominent.
|
||||
|
||||
|
@ -1342,17 +1337,16 @@ Symbol: ~modus-themes-fringes~ (=choice= type)
|
|||
|
||||
Possible values:
|
||||
|
||||
1. ~nil~ (default)
|
||||
1. ~nil~
|
||||
2. ~subtle~
|
||||
3. ~intense~
|
||||
|
||||
The default is to use the same color as that of the main background,
|
||||
meaning that the fringes are not obvious though they still occupy the
|
||||
space given to them by ~fringe-mode~.
|
||||
When the value is nil, do not apply a distinct background color.
|
||||
|
||||
Options ~subtle~ and ~intense~ apply a gray background, making the fringes
|
||||
visible. The difference between the two is one of degree, as their
|
||||
names imply.
|
||||
With a value of ~subtle~ use a gray background color that is
|
||||
visible yet close to the main background color.
|
||||
|
||||
With ~intense~ use a more pronounced gray background color.
|
||||
|
||||
** Option for language checkers
|
||||
:properties:
|
||||
|
@ -1435,16 +1429,16 @@ Brief: Control the style of the current line of ~hl-line-mode~.
|
|||
|
||||
Symbol: ~modus-themes-hl-line~ (=choice= type, list of properties)
|
||||
|
||||
Possible values are expressed as a list of properties (default is ~nil~ or
|
||||
an empty list). The list can include any of the following symbols:
|
||||
The value is a list of properties, each designated by a symbol. With
|
||||
a ~nil~ value, or an empty list, the style is a subtle gray background
|
||||
color.
|
||||
|
||||
Possible properties are the following symbols:
|
||||
|
||||
+ ~accented~
|
||||
+ ~intense~
|
||||
+ ~underline~
|
||||
|
||||
The default (a ~nil~ value or an empty list) is a subtle gray background
|
||||
color.
|
||||
|
||||
The property ~accented~ changes the background to a colored variant.
|
||||
|
||||
An ~underline~ property draws a line below the highlighted area. Its
|
||||
|
@ -1471,8 +1465,9 @@ In user configuration files the form may look like this:
|
|||
(setq modus-themes-hl-line '(underline accented))
|
||||
#+end_src
|
||||
|
||||
Set ~x-underline-at-descent-line~ to a non-nil value for better results
|
||||
with underlines.
|
||||
Set ~x-underline-at-descent-line~ to a non-~nil~ value so that the
|
||||
placement of the underline coincides with the lower boundary of the
|
||||
colored background.
|
||||
|
||||
This style affects several packages that enable ~hl-line-mode~, such as
|
||||
=elfeed=, =notmuch=, and =mu4e=.
|
||||
|
@ -1506,7 +1501,7 @@ Similarly, the faces for ~display-line-numbers-major-tick~ and its
|
|||
counterpart ~display-line-numbers-minor-tick~ use appropriate styles that
|
||||
involve a bespoke background and foreground combination.
|
||||
|
||||
With a non-nil value (~t~), line numbers have no background of their own.
|
||||
With a non-~nil~ value (~t~), line numbers have no background of their own.
|
||||
Instead they retain the primary background of the theme, blending with
|
||||
the rest of the buffer. Foreground values for all relevant faces are
|
||||
updated to accommodate this aesthetic.
|
||||
|
@ -1529,7 +1524,7 @@ Possible value:
|
|||
2. ~t~
|
||||
|
||||
By default all mouseover effects apply a highlight with a subtle colored
|
||||
background. When non-nil, these have a more pronounced effect.
|
||||
background. When non-~nil~, these have a more pronounced effect.
|
||||
|
||||
Note that this affects the generic ~highlight~ which, strictly speaking,
|
||||
is not limited to mouse usage.
|
||||
|
@ -1713,11 +1708,11 @@ Option ~desaturated~ follows the same principles as with the default
|
|||
(~nil~), though it tones down all relevant colors.
|
||||
|
||||
Option ~bg-only~ applies a background but does not override the text's
|
||||
foreground. This makes it suitable for a non-nil value passed to
|
||||
foreground. This makes it suitable for a non-~nil~ value passed to
|
||||
~diff-font-lock-syntax~ (note: Magit does not support syntax highlighting
|
||||
in diffs---last checked on 2021-12-02).
|
||||
|
||||
When the user option ~modus-themes-deuteranopia~ is non-nil, all diffs
|
||||
When the user option ~modus-themes-deuteranopia~ is non-~nil~, all diffs
|
||||
will use a red/blue color-coding system instead of the standard
|
||||
red/green. Other stylistic changes are made in the interest of
|
||||
optimizing for such a use-case.
|
||||
|
@ -1776,8 +1771,8 @@ of the block. Disable the extension of such backgrounds by setting
|
|||
~org-fontify-whole-block-delimiter-line~ to nil.
|
||||
|
||||
Code blocks use their major mode's colors only when the variable
|
||||
~org-src-fontify-natively~ is non-nil. While quote/verse blocks require
|
||||
setting ~org-fontify-quote-and-verse-blocks~ to a non-nil value.
|
||||
~org-src-fontify-natively~ is non-~nil~. While quote/verse blocks require
|
||||
setting ~org-fontify-quote-and-verse-blocks~ to a non-~nil~ value.
|
||||
|
||||
[[#h:f44cc6e3-b0f1-4a5e-8a90-9e48fa557b50][Update Org block delimiter fontification]].
|
||||
|
||||
|
@ -1894,7 +1889,7 @@ An ~event~ key covers (i) headings with a plain time stamp that are
|
|||
shown on the agenda, also known as events, (ii) entries imported from
|
||||
the diary, and (iii) other items that derive from a symbolic expression
|
||||
or sexp (phases of the moon, holidays, etc.). By default all those look
|
||||
the same and have a subtle foreground color (the default is a nil value
|
||||
the same and have a subtle foreground color (the default is a ~nil~ value
|
||||
or an empty list). This key accepts a list of properties. Those are:
|
||||
|
||||
- ~accented~ applies an accent value to the event's foreground,
|
||||
|
@ -1925,7 +1920,7 @@ A ~scheduled~ key applies to tasks with a scheduled date. By default (a
|
|||
~nil~ value), those use varying shades of yellow to denote (i) a past or
|
||||
current date and (ii) a future date. Valid values are symbols:
|
||||
|
||||
- nil (default);
|
||||
- ~nil~ (default);
|
||||
- ~uniform~ to make all scheduled dates the same color;
|
||||
- ~rainbow~ to use contrasting colors for past, present, future
|
||||
scheduled dates.
|
||||
|
@ -1963,7 +1958,7 @@ passed as a symbol. Those are:
|
|||
being too late. The difference between ready and clear states is
|
||||
attenuated by painting both of them using shades of green. This
|
||||
option thus highlights the alert and overdue states.
|
||||
- When ~modus-themes-deuteranopia~ is non-nil the exact style of the habit
|
||||
- When ~modus-themes-deuteranopia~ is non-~nil~ the exact style of the habit
|
||||
graph adapts to the needs of users with red-green color deficiency by
|
||||
substituting every instance of green with blue or cyan (depending on
|
||||
the specifics).
|
||||
|
@ -2108,7 +2103,7 @@ In user configuration files the form may look like this:
|
|||
#+end_src
|
||||
|
||||
When defining the styles per heading level, it is possible to pass a
|
||||
non-nil value (~t~) instead of a list of properties. This will retain the
|
||||
non-~nil~ value (~t~) instead of a list of properties. This will retain the
|
||||
original aesthetic for that level. For example:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -2153,7 +2148,7 @@ and tab line.
|
|||
The default is to use the same font as the rest of Emacs, which usually
|
||||
is a monospaced family.
|
||||
|
||||
With a non-nil value (~t~) apply a proportionately spaced typeface. This
|
||||
With a non-~nil~ value (~t~) apply a proportionately spaced typeface. This
|
||||
is done by assigning the ~variable-pitch~ face to the relevant items.
|
||||
|
||||
[[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org and others]].
|
||||
|
@ -4681,6 +4676,7 @@ have lots of extensions, so the "full support" may not be 100% true…
|
|||
+ notmuch
|
||||
+ num3-mode
|
||||
+ nxml-mode
|
||||
+ olivetti
|
||||
+ orderless
|
||||
+ org*
|
||||
+ org-journal
|
||||
|
@ -4753,7 +4749,7 @@ have lots of extensions, so the "full support" may not be 100% true…
|
|||
+ tab-bar-groups
|
||||
+ tab-bar-mode
|
||||
+ tab-line-mode
|
||||
+ table (built-in table.el)
|
||||
+ table (built-in {{{file(table.el)}}})
|
||||
+ telega
|
||||
+ telephone-line
|
||||
+ terraform-mode
|
||||
|
@ -4768,7 +4764,7 @@ have lots of extensions, so the "full support" may not be 100% true…
|
|||
+ tuareg
|
||||
+ typescript
|
||||
+ undo-tree
|
||||
+ vc (vc-dir.el, vc-hooks.el)
|
||||
+ vc ({{{file(vc-dir.el)}}}, {{{file(vc-hooks.el)}}})
|
||||
+ vertico
|
||||
+ vertico-quick
|
||||
+ vimish-fold
|
||||
|
@ -4793,8 +4789,7 @@ have lots of extensions, so the "full support" may not be 100% true…
|
|||
+ yasnippet
|
||||
+ ztree
|
||||
|
||||
Plus many other miscellaneous faces that are provided by the upstream
|
||||
GNU Emacs distribution.
|
||||
Plus many other miscellaneous faces that are provided by Emacs.
|
||||
|
||||
** Indirectly covered packages
|
||||
:properties:
|
||||
|
@ -5397,7 +5392,7 @@ https://github.com/tumashu/company-posframe/]
|
|||
:custom_id: h:98bdf319-1e32-4469-8a01-771200fba65c
|
||||
:end:
|
||||
|
||||
The built-in IRC client ~erc~ has the ability to colorise any text using
|
||||
The built-in IRC client ~erc~ has the ability to colorize any text using
|
||||
escape sequences that start with =^C= (inserted with {{{kbd(C-q C-c)}}}) and are
|
||||
followed by a number for the foreground and background.[fn:: This page
|
||||
explains the basics, though it is not specific to Emacs:
|
||||
|
@ -5453,7 +5448,7 @@ Consult the doc string of ~shr-use-colors~.
|
|||
|
||||
By default, packages that build on top of the Simple HTML Remember (=shr=)
|
||||
use proportionately spaced fonts. This is controlled by the user option
|
||||
~shr-use-fonts~, which is set to non-nil by default. To use the standard
|
||||
~shr-use-fonts~, which is set to non-~nil~ by default. To use the standard
|
||||
font instead, set that variable to nil.
|
||||
|
||||
[[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org and others]].
|
||||
|
@ -5543,9 +5538,9 @@ ANSI color number 1 (red) from the already-supported array of
|
|||
:end:
|
||||
|
||||
Hints are drawn by [[https://imagemagick.org/][ImageMagick]], not Emacs, i.e., ImageMagick doesn't
|
||||
know about the hint face unless you tell ImageMagick about it. By
|
||||
know about the hint face unless you tell ImageMagick about it. By
|
||||
default, only the foreground and background color attributes are
|
||||
passed. The below snippet adds to those the various font attributes. As
|
||||
passed. The below snippet adds to those the various font attributes. As
|
||||
it queries various faces, specifically ~pdf-links-read-link~ and the faces
|
||||
it inherits, it needs to be added to your initialization file after
|
||||
you've customized any faces.
|
||||
|
@ -5816,9 +5811,9 @@ In general, an additional source of light other than that of the monitor
|
|||
can help reduce eye strain: the eyes are more relaxed when they do not
|
||||
have to focus on one point to gather light.
|
||||
|
||||
The monitor's display settings must be accounted for. Gamma values, in
|
||||
The monitor's display settings must be accounted for. Gamma values, in
|
||||
particular, need to be calibrated to neither amplify nor distort the
|
||||
perception of black. Same principle for sharpness, brightness, and
|
||||
perception of black. Same principle for sharpness, brightness, and
|
||||
contrast as determined by the hardware, which all have an effect on how
|
||||
text is read on the screen.
|
||||
|
||||
|
@ -5956,7 +5951,7 @@ the themes, which is partially fleshed out in this manual.
|
|||
|
||||
With regard to the artistic aspect (where "art" qua skill may amount to
|
||||
an imprecise science), there is no hard-and-fast rule in effect as it
|
||||
requires one to exercise discretion and make decisions based on
|
||||
requires one to exercize discretion and make decisions based on
|
||||
context-dependent information or constraints. As is true with most
|
||||
things in life, when in doubt, do not cling on to the letter of the law
|
||||
but try to understand its spirit.
|
||||
|
@ -6125,22 +6120,22 @@ The Modus themes are a collective effort. Every bit of work matters.
|
|||
Yiltiz, Ilja Kocken, Iris Garcia, Ivan Popovych, Jeremy Friesen,
|
||||
Jerry Zhang, Johannes Grødem, John Haman, Jonas Collberg, Jorge
|
||||
Morais, Joshua O'Connor, Julio C. Villasante, Kenta Usami, Kevin
|
||||
Fleming, Kévin Le Gouguec, Kostadin Ninev, Len Trigg, Lennart
|
||||
C. Karssen, Luis Miguel Castañeda, Magne Hov, Manuel Uberti, Mark
|
||||
Bestley, Mark Burton, Mark Simpson, Markus Beppler, Matt Armstrong,
|
||||
Mauro Aranda, Maxime Tréca, Michael Goldenberg, Morgan Smith, Morgan
|
||||
Willcock, Murilo Pereira, Nicky van Foreest, Nicolas De Jaeghere,
|
||||
Paul Poloskov, Pengji Zhang, Pete Kazmier, Peter Wu, Philip
|
||||
Kaludercic, Pierre Téchoueyres, Przemysław Kryger, Robert Hepple,
|
||||
Roman Rudakov, Ryan Phillips, Rytis Paškauskas, Rudolf Adamkovič,
|
||||
Sam Kleinman, Samuel Culpepper, Saša Janiška, Shreyas Ragavan, Simon
|
||||
Pugnet, Tassilo Horn, Thibaut Verron, Thomas Heartman, Togan
|
||||
Muftuoglu, Tony Zorman, Trey Merkley, Tomasz Hołubowicz, Toon Claes,
|
||||
Uri Sharf, Utkarsh Singh, Vincent Foley. As well as users: Ben,
|
||||
CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux, Fredrik, Moesasji,
|
||||
Nick, Summer Emacs, TheBlob42, Trey, bepolymathe, bit9tream,
|
||||
derek-upham, doolio, fleimgruber, gitrj95, iSeeU, jixiuf, okamsn,
|
||||
pRot0ta1p.
|
||||
Fleming, Kévin Le Gouguec, Kevin Kainan Li, Kostadin Ninev, Len
|
||||
Trigg, Lennart C. Karssen, Luis Miguel Castañeda, Magne Hov, Manuel
|
||||
Uberti, Mark Bestley, Mark Burton, Mark Simpson, Markus Beppler,
|
||||
Matt Armstrong, Matthias Fuchs, Mauro Aranda, Maxime Tréca, Michael
|
||||
Goldenberg, Morgan Smith, Morgan Willcock, Murilo Pereira, Nicky van
|
||||
Foreest, Nicolas De Jaeghere, Pablo Stafforini, Paul Poloskov,
|
||||
Pengji Zhang, Pete Kazmier, Peter Wu, Philip Kaludercic, Pierre
|
||||
Téchoueyres, Przemysław Kryger, Robert Hepple, Roman Rudakov, Ryan
|
||||
Phillips, Rytis Paškauskas, Rudolf Adamkovič, Sam Kleinman, Samuel
|
||||
Culpepper, Saša Janiška, Shreyas Ragavan, Simon Pugnet, Tassilo
|
||||
Horn, Thibaut Verron, Thomas Heartman, Togan Muftuoglu, Tony Zorman,
|
||||
Trey Merkley, Tomasz Hołubowicz, Toon Claes, Uri Sharf, Utkarsh
|
||||
Singh, Vincent Foley. As well as users: Ben, CsBigDataHub1, Emacs
|
||||
Contrib, Eugene, Fourchaux, Fredrik, Moesasji, Nick, Summer Emacs,
|
||||
TheBlob42, Trey, bepolymathe, bit9tream, derek-upham, doolio,
|
||||
fleimgruber, gitrj95, iSeeU, jixiuf, okamsn, pRot0ta1p.
|
||||
|
||||
+ Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii,
|
||||
Glenn Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core
|
||||
|
|
|
@ -172,7 +172,7 @@ is fetched for the very first time.
|
|||
@vindex newsticker-obsolete-item-max-age
|
||||
@item newsticker-keep-obsolete-items
|
||||
Obsolete headlines are removed immediately unless
|
||||
@code{newsticker-keep-obsolete-items} is non-nil in which case they
|
||||
@code{newsticker-keep-obsolete-items} is non-@code{nil} in which case they
|
||||
are kept until @code{newsticker-obsolete-item-max-age} is reached.
|
||||
|
||||
@vindex newsticker-automatically-mark-items-as-old
|
||||
|
|
|
@ -204,9 +204,10 @@ The GNU Emacs Manual}). Currently, function names can be indexed.
|
|||
|
||||
@cindex ElDoc Mode Support
|
||||
@vindex octave-eldoc-message-style
|
||||
ElDoc mode (@pxref{Lisp Doc,,, emacs, The GNU Emacs Manual}) is
|
||||
supported. By customizing @code{octave-eldoc-message-style} it can be
|
||||
changed from displaying one or multi line hints.
|
||||
ElDoc mode (@pxref{Programming Language Doc,,, emacs, The GNU Emacs
|
||||
Manual}) is supported. By customizing
|
||||
@code{octave-eldoc-message-style} it can be changed from displaying
|
||||
one or multi line hints.
|
||||
|
||||
@c @cindex TAGS
|
||||
@c @cindex Emacs TAGS files
|
||||
|
|
|
@ -259,7 +259,7 @@ Use @kbd{C-c C-@key{SPC}} to switch to these buffers.
|
|||
|
||||
@vindex rcirc-track-ignore-server-buffer-flag
|
||||
If the user wishes to ignore events in the server buffer, set
|
||||
@code{rcirc-track-ignore-server-buffer-flag} to a non-nil value.
|
||||
@code{rcirc-track-ignore-server-buffer-flag} to a non-@code{nil} value.
|
||||
|
||||
@node Reference
|
||||
@chapter Reference
|
||||
|
@ -693,7 +693,7 @@ buffers.
|
|||
|
||||
@cindex rcirc-track-abbrevate-flag
|
||||
By default the channel names are abbreviated, set
|
||||
@code{rcirc-track-abbrevate-flag} to a non-nil value. This might be
|
||||
@code{rcirc-track-abbrevate-flag} to a non-@code{nil} value. This might be
|
||||
interesting if the IRC activities are not tracked in the mode line,
|
||||
but somewhere else.
|
||||
|
||||
|
|
|
@ -621,7 +621,7 @@ Run the Semantic idle work function with debugging turned on.
|
|||
Semantic Idle Summary mode is a minor mode that displays a short
|
||||
summary of the symbol at point, such as its function prototype, in the
|
||||
echo area. Its functionality is similar to what ElDoc mode provides
|
||||
for Emacs Lisp (@pxref{Lisp Doc,,,emacs,Emacs manual}).
|
||||
for Emacs Lisp (@pxref{Programming Language Doc,,,emacs,Emacs manual}).
|
||||
|
||||
@deffn global-semantic-idle-summary-mode &optional arg
|
||||
This command toggles Semantic Idle Summary mode in all
|
||||
|
|
|
@ -3532,9 +3532,14 @@ the @file{~/.authinfo.gpg} authentication file. The user option
|
|||
@code{tramp-completion-use-auth-sources} controls, whether such a
|
||||
search is performed during completion.
|
||||
|
||||
@vindex tramp-completion-use-cache
|
||||
Remote hosts previously visited or hosts whose connections are kept
|
||||
persistently (@pxref{Connection caching}) will be included in the
|
||||
completion lists.
|
||||
completion lists. If you want to suppress this completion because
|
||||
there are invalid entries in the persistency file, for example if the
|
||||
host configuration changes often, or if you plug your laptop to
|
||||
different networks frequently, you can set the user option
|
||||
@code{tramp-completion-use-cache} to nil.
|
||||
|
||||
After remote host name completion comes completion of file names on
|
||||
the remote host. It works the same as with local host file completion
|
||||
|
|
|
@ -945,7 +945,7 @@ that multiple suffix commands can be bound to the same key, provided
|
|||
they are never active at the same time, see @ref{Predicate Slots}.
|
||||
|
||||
Unfortunately both false-positives and false-negatives are possible.
|
||||
To deal with the former use non-nil @var{KEEP-OTHER@.} To deal with the
|
||||
To deal with the former use non-@code{nil} @var{KEEP-OTHER@.} To deal with the
|
||||
latter remove the conflicting binding explicitly.
|
||||
@end defun
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ argument is @code{nil}, the allowed characters are those specified as
|
|||
@dfn{unreserved characters} by RFC 3986 (see the variable
|
||||
@code{url-unreserved-chars}). Otherwise, @var{allowed-chars} should
|
||||
be either a list of allowed chars, or a vector whose Nth element is
|
||||
non-nil if character N is allowed.
|
||||
non-@code{nil} if character N is allowed.
|
||||
@end defun
|
||||
|
||||
@defun url-unhex-string string &optional allow-newlines
|
||||
|
|
109
etc/NEWS
109
etc/NEWS
|
@ -105,29 +105,20 @@ configuration on X is known to have problems, such as undesirable
|
|||
frame positioning and various issues with keyboard input of sequences
|
||||
such as 'C-;' and 'C-S-u'.
|
||||
|
||||
---
|
||||
** The implementation of overlays has changed.
|
||||
Emacs now uses an implementation of overlays that is much more
|
||||
efficient than the original one, and should speed up all the
|
||||
operations that involve overlays, especially when there are lots of
|
||||
them in a buffer. However, no changes in behavior of overlays should
|
||||
be visible on the Lisp or user level, with the exception of better
|
||||
performance.
|
||||
|
||||
---
|
||||
** The docstrings of preloaded files are not in "etc/DOC" any more.
|
||||
Instead, they're fetched as needed from the corresponding ".elc" file,
|
||||
as was already the case for all the non-preloaded files.
|
||||
|
||||
** Emacs Sessions (Desktop)
|
||||
|
||||
+++
|
||||
*** New user option to load a locked desktop if locking Emacs is not running.
|
||||
The option 'desktop-load-locked-desktop' can now be set to the value
|
||||
'check-pid', which means to allow loading a locked ".emacs.desktop"
|
||||
file if the Emacs process which locked it is no longer running on the
|
||||
local machine. This allows avoiding questions about locked desktop
|
||||
files when the Emacs session which locked it crashes, or was otherwise
|
||||
interrupted, and didn't exit gracefully. See the "(emacs) Saving
|
||||
Emacs Sessions" node in the Emacs manual for more details.
|
||||
|
||||
** Miscellaneous
|
||||
|
||||
+++
|
||||
*** User option 'minibuffer-eldef-shorten-default' is now obsolete.
|
||||
Customize the user option 'minibuffer-default-prompt-format' instead.
|
||||
|
||||
|
||||
* Startup Changes in Emacs 29.1
|
||||
|
||||
|
@ -1036,15 +1027,11 @@ or is itself too long.
|
|||
+++
|
||||
*** New user option 'outline-minor-mode-use-buttons'.
|
||||
If non-nil, Outline Minor Mode will use buttons to hide/show outlines
|
||||
in addition to the ellipsis. The default is nil in editing modes, but
|
||||
non-nil in 'help-mode' and its derivatives.
|
||||
|
||||
+++
|
||||
*** New user option 'outline-minor-mode-use-margins'.
|
||||
If non-nil, Outline Minor Mode will use the window margins to
|
||||
hide/show outlines in addition to the ellipsis. The default is
|
||||
non-nil in 'special-mode' and its derivatives, and it can be used in
|
||||
editing modes.
|
||||
in addition to the ellipsis. The default is nil, but in 'help-mode'
|
||||
it has the value 'insert' that inserts the buttons directly to the
|
||||
buffer where you can use 'RET' to cycle outline visibility. When
|
||||
the value is 'in-margins', Outline Minor Mode uses the window margins
|
||||
to hide/show outlines.
|
||||
|
||||
** Windows
|
||||
|
||||
|
@ -1581,6 +1568,18 @@ packages checked out using 'package-vc-install'.
|
|||
This command helps you compose an email for sending bug reports to
|
||||
package maintainers.
|
||||
|
||||
** Emacs Sessions (Desktop)
|
||||
|
||||
+++
|
||||
*** New user option to load a locked desktop if locking Emacs is not running.
|
||||
The option 'desktop-load-locked-desktop' can now be set to the value
|
||||
'check-pid', which means to allow loading a locked ".emacs.desktop"
|
||||
file if the Emacs process which locked it is no longer running on the
|
||||
local machine. This allows avoiding questions about locked desktop
|
||||
files when the Emacs session which locked it crashes, or was otherwise
|
||||
interrupted, and didn't exit gracefully. See the "(emacs) Saving
|
||||
Emacs Sessions" node in the Emacs manual for more details.
|
||||
|
||||
** Miscellaneous
|
||||
|
||||
+++
|
||||
|
@ -1657,7 +1656,7 @@ This mode adds some highlighting, fixes the 'M-q' command, and has
|
|||
commands for doing maintenance of the Emacs NEWS files. In addition,
|
||||
this mode turns on 'outline-minor-mode', and thus displays
|
||||
customizable icons (see 'icon-preference') in the margins. To
|
||||
disable these icons, customize 'outline-minor-mode-use-margins' to a
|
||||
disable these icons, set 'outline-minor-mode-use-buttons' to a
|
||||
nil value.
|
||||
|
||||
---
|
||||
|
@ -1719,6 +1718,10 @@ but completes on the history items instead of the default completion
|
|||
table. 'minibuffer-complete-defaults' ('C-x <down>') completes
|
||||
on the list of default items.
|
||||
|
||||
+++
|
||||
*** User option 'minibuffer-eldef-shorten-default' is now obsolete.
|
||||
Customize the user option 'minibuffer-default-prompt-format' instead.
|
||||
|
||||
+++
|
||||
*** New user option 'completions-sort'.
|
||||
This option controls the sorting of the completion candidates in
|
||||
|
@ -2075,6 +2078,18 @@ Formerly it was a pair of numbers '(A B)' that represented 65536*A + B,
|
|||
to cater to older Emacs implementations that lacked bignums.
|
||||
The older form still works but is undocumented.
|
||||
|
||||
** Rmail
|
||||
|
||||
---
|
||||
*** Rmail partial summaries can now be applied one on top of the other.
|
||||
You can now narrow the filtering of messages by the summary's criteria
|
||||
(recipients, topic, senders, etc.) by making a summary of the already
|
||||
summarized messages. For example, invoking 'rmail-summary-by-senders',
|
||||
followed by 'rmail-summary-by-topic' will produce a summary where both
|
||||
the senders and the topic are according to your selection. The new
|
||||
user option 'rmail-summary-apply-filters-consecutively' controls
|
||||
whether the stacking of the filters is in effect.
|
||||
|
||||
** EIEIO
|
||||
|
||||
+++
|
||||
|
@ -2541,6 +2556,12 @@ the user requesting such a connection, and not of the user who is the
|
|||
target. This has always been needed, just the password prompt and the
|
||||
related 'auth-sources' entry were wrong.
|
||||
|
||||
+++
|
||||
*** New user option 'tramp-completion-use-cache'.
|
||||
During user and host name completion in the minibuffer, results from
|
||||
Tramp's connection cache are taken into account. This can be disabled
|
||||
by setting the user option 'tramp-completion-use-cache' to nil.
|
||||
|
||||
** Browse URL
|
||||
|
||||
---
|
||||
|
@ -2670,6 +2691,14 @@ commands with a warning face as you type.
|
|||
*** New user option 'calc-kill-line-numbering'.
|
||||
Set it to nil to exclude line numbering from kills and copies.
|
||||
|
||||
** Hierarchy
|
||||
|
||||
+++
|
||||
*** Tree Display can delay computation of children.
|
||||
'hierarchy-add-tree' and 'hierarchy-add-trees' have an optional
|
||||
argument which allows tree-widget display to be activated and computed
|
||||
only when the user expands the node.
|
||||
|
||||
** Miscellaneous
|
||||
|
||||
---
|
||||
|
@ -2779,6 +2808,13 @@ name.
|
|||
|
||||
* New Modes and Packages in Emacs 29.1
|
||||
|
||||
+++
|
||||
** Eglot: Emacs Client for the Language Server Protocol.
|
||||
Emacs now comes with the Eglot package, which enhances various Emacs
|
||||
features, such as completion, documentation, error detection, etc.,
|
||||
based on data provided by language servers using the Language Server
|
||||
Protocol (LSP).
|
||||
|
||||
+++
|
||||
** New commands 'image-crop' and 'image-cut.
|
||||
These commands allow interactively cropping/cutting the image at
|
||||
|
@ -3182,6 +3218,15 @@ The following generalized variables have been made obsolete:
|
|||
|
||||
* Lisp Changes in Emacs 29.1
|
||||
|
||||
+++
|
||||
** Interpreted closures are "safe for space".
|
||||
As was already the case for byte-compiled closures, instead of capturing
|
||||
the whole current lexical environment, interpreted closures now only
|
||||
capture the part of the environment that they need.
|
||||
The previous behavior could occasionally lead to memory leaks or
|
||||
to problems where a printed closure would not be 'read'able because
|
||||
of an un'read'able value in an unrelated lexical variable.
|
||||
|
||||
+++
|
||||
** New accessor function 'file-attribute-file-identifier'.
|
||||
It returns the list of the inode number and device identifier
|
||||
|
@ -4221,11 +4266,3 @@ GNU General Public License for more details.
|
|||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
Local variables:
|
||||
coding: utf-8
|
||||
mode: outline
|
||||
mode: emacs-news
|
||||
paragraph-separate: "[ ]*$"
|
||||
end:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Maintainer: Modus-Themes Development <~protesilaos/modus-themes@lists.sr.ht>
|
||||
;; URL: https://git.sr.ht/~protesilaos/modus-themes
|
||||
;; Mailing-List: https://lists.sr.ht/~protesilaos/modus-themes
|
||||
;; Version: 2.7.1
|
||||
;; Version: 3.0.0
|
||||
;; Package-Requires: ((emacs "27.1"))
|
||||
;; Keywords: faces, theme, accessibility
|
||||
|
||||
|
@ -71,6 +71,7 @@ which corresponds to a minimum contrast in relative luminance of
|
|||
|
||||
(provide-theme 'modus-operandi))
|
||||
|
||||
;;;###theme-autoload (put 'modus-operandi 'theme-properties '(:background-mode light :kind color-scheme :family modus))
|
||||
;;;###theme-autoload
|
||||
(put 'modus-operandi 'theme-properties '(:background-mode light :kind color-scheme :family modus))
|
||||
|
||||
;;; modus-operandi-theme.el ends here
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Maintainer: Modus-Themes Development <~protesilaos/modus-themes@lists.sr.ht>
|
||||
;; URL: https://git.sr.ht/~protesilaos/modus-themes
|
||||
;; Mailing-List: https://lists.sr.ht/~protesilaos/modus-themes
|
||||
;; Version: 2.7.1
|
||||
;; Version: 3.0.0
|
||||
;; Package-Requires: ((emacs "27.1"))
|
||||
;; Keywords: faces, theme, accessibility
|
||||
|
||||
|
@ -88,7 +88,7 @@
|
|||
(require 'subr-x))
|
||||
|
||||
(defgroup modus-themes ()
|
||||
"Options for `modus-operandi', `modus-vivendi'.
|
||||
"Options for `modus-operandi', `modus-vivendi' themes.
|
||||
The Modus themes conform with the WCAG AAA standard for color
|
||||
contrast between background and foreground combinations (a
|
||||
minimum contrast of 7:1---the highest standard of its kind). The
|
||||
|
@ -103,13 +103,13 @@ cover the blue-cyan-magenta side of the spectrum."
|
|||
:tag "Modus Themes")
|
||||
|
||||
(defgroup modus-themes-faces ()
|
||||
"Faces defined by `modus-operandi' and `modus-vivendi'."
|
||||
"Faces defined by `modus-operandi' and `modus-vivendi' themes."
|
||||
:group 'modus-themes
|
||||
:link '(info-link "(modus-themes) Top")
|
||||
:prefix "modus-themes-"
|
||||
:tag "Modus Themes Faces")
|
||||
|
||||
(defvar modus-themes--version "2.7.0"
|
||||
(defvar modus-themes--version "3.0.0"
|
||||
"Current version of the Modus themes.
|
||||
|
||||
The version either is the last tagged release, such as '1.0.0',
|
||||
|
@ -123,10 +123,7 @@ those would count as part of '1.1.0-dev'.")
|
|||
If optional INSERT argument is provided from Lisp or as a prefix
|
||||
argument, insert the `modus-themes--version' at point."
|
||||
(interactive "P")
|
||||
(if-let ((version modus-themes--version)
|
||||
((or insert current-prefix-arg)))
|
||||
(insert version)
|
||||
(message version)))
|
||||
(funcall (if insert 'insert 'message) modus-themes--version))
|
||||
|
||||
;;;###autoload
|
||||
(defun modus-themes-report-bug ()
|
||||
|
@ -1364,26 +1361,6 @@ The actual styling of the face is done by `modus-themes-faces'."
|
|||
The actual styling of the face is done by `modus-themes-faces'."
|
||||
:group 'modus-themes-faces)
|
||||
|
||||
(define-obsolete-face-alias
|
||||
'modus-themes-completion-standard-first-match
|
||||
'modus-themes-completion-selected
|
||||
"2.2.0")
|
||||
|
||||
(define-obsolete-face-alias
|
||||
'modus-themes-completion-standard-selected
|
||||
'modus-themes-completion-selected
|
||||
"2.2.0")
|
||||
|
||||
(define-obsolete-face-alias
|
||||
'modus-themes-completion-extra-selected
|
||||
'modus-themes-completion-selected
|
||||
"2.2.0")
|
||||
|
||||
(define-obsolete-face-alias
|
||||
'modus-themes-completion-key-binding
|
||||
'modus-themes-key-binding
|
||||
"2.2.0")
|
||||
|
||||
(defface modus-themes-completion-selected nil
|
||||
"Face for current selection in completion UIs.
|
||||
The actual styling of the face is done by `modus-themes-faces'."
|
||||
|
@ -1934,20 +1911,22 @@ For example:
|
|||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Org agenda"))
|
||||
|
||||
(defcustom modus-themes-fringes nil
|
||||
"Define the visibility of fringes.
|
||||
(defcustom modus-themes-fringes 'subtle
|
||||
"Control the visibility of fringes.
|
||||
|
||||
Nil means the fringes have no background color. Option `subtle'
|
||||
will apply a grayscale value that is visible yet close to the
|
||||
main buffer background color. Option `intense' will use a more
|
||||
pronounced grayscale value."
|
||||
When the value is nil, do not apply a distinct background color.
|
||||
|
||||
With a value of `subtle' use a gray background color that is
|
||||
visible yet close to the main background color.
|
||||
|
||||
With `intense' use a more pronounced gray background color."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "1.0.0")
|
||||
:version "28.1"
|
||||
:package-version '(modus-themes . "3.0.0")
|
||||
:version "29.1"
|
||||
:type '(choice
|
||||
(const :format "[%v] %t\n" :tag "No visible fringes (default)" nil)
|
||||
(const :format "[%v] %t\n" :tag "Subtle grayscale background" subtle)
|
||||
(const :format "[%v] %t\n" :tag "Intense grayscale background" intense))
|
||||
(const :format "[%v] %t\n" :tag "No visible fringes" nil)
|
||||
(const :format "[%v] %t\n" :tag "Subtle gray background" subtle)
|
||||
(const :format "[%v] %t\n" :tag "Intense gray background" intense))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Fringes"))
|
||||
|
@ -2212,13 +2191,16 @@ interest of optimizing for such a use-case."
|
|||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Diffs"))
|
||||
|
||||
(defcustom modus-themes-completions nil
|
||||
(defcustom modus-themes-completions
|
||||
'((selection . (intense))
|
||||
(popup . (intense)))
|
||||
"Control the style of completion user interfaces.
|
||||
|
||||
This affects Company, Corfu, Flx, Helm, Icomplete/Fido, Ido, Ivy,
|
||||
Mct, Orderless, Selectrum, Vertico. The value is an alist that
|
||||
takes the form of a (key . properties) combination. Here is a
|
||||
sample, followed by a description of the particularities:
|
||||
Orderless, Selectrum, Vertico. The value is an alist that takes
|
||||
the form of a (KEY . PROPERTIES) combination. KEY is a symbol,
|
||||
while PROPERTIES is a list. Here is a sample, followed by a
|
||||
description of the particularities:
|
||||
|
||||
(setq modus-themes-completions
|
||||
(quote ((matches . (extrabold background intense))
|
||||
|
@ -2226,10 +2208,11 @@ sample, followed by a description of the particularities:
|
|||
(popup . (accented)))))
|
||||
|
||||
The `matches' key refers to the highlighted characters that
|
||||
correspond to the user's input. By default (nil or an empty
|
||||
list), they have a bold weight and a colored foreground. The
|
||||
list of properties may include any of the following symbols
|
||||
regardless of the order they may appear in:
|
||||
correspond to the user's input. When its properties are nil or
|
||||
an empty list, matching characters in the user interface will
|
||||
have a bold weight and a colored foreground. The list of
|
||||
properties may include any of the following symbols regardless of
|
||||
the order they may appear in:
|
||||
|
||||
- `background' to add a background color;
|
||||
|
||||
|
@ -2246,10 +2229,10 @@ regardless of the order they may appear in:
|
|||
that bold will be used.
|
||||
|
||||
The `selection' key applies to the current line or currently
|
||||
matched candidate, depending on the specifics of the User
|
||||
Interface. By default (nil or an empty list), it has a subtle
|
||||
gray background, a bold weight, and the base foreground value
|
||||
for the text. The list of properties it accepts is as
|
||||
matched candidate, depending on the specifics of the user
|
||||
interface. When its properties are nil or an empty list, it has
|
||||
a subtle gray background, a bold weight, and the base foreground
|
||||
value for the text. The list of properties it accepts is as
|
||||
follows (order is not significant):
|
||||
|
||||
- `accented' to make the background colorful instead of gray;
|
||||
|
@ -2268,7 +2251,11 @@ follows (order is not significant):
|
|||
variable `modus-themes-weights'. The absence of a weight means
|
||||
that bold will be used.
|
||||
|
||||
The `popup' key takes the same values as `selection'.
|
||||
The `popup' key takes the same values as `selection'. The only
|
||||
difference is that it applies specifically to user interfaces
|
||||
that display an inline popup and thus have slightly different
|
||||
styling requirements than the minibuffer. The two prominent
|
||||
packages are `company' and `corfu'.
|
||||
|
||||
Apart from specifying each key separately, a fallback list is
|
||||
accepted. This is only useful when the desired aesthetic is the
|
||||
|
@ -2290,22 +2277,14 @@ the corresponding key is simply ignored (`matches' does not have
|
|||
`accented' and `text-also', while `selection' and `popup' do not
|
||||
have `background').
|
||||
|
||||
A concise expression of those associations can be written as
|
||||
follows, where the `car' is always the key and the `cdr' is the
|
||||
list of properties (whatever order they may appear in):
|
||||
|
||||
(setq modus-themes-completions
|
||||
(quote ((matches extrabold background intense)
|
||||
(selection semibold accented intense)
|
||||
(popup accented))))
|
||||
|
||||
Check the manual for tweaking `bold' and `italic' faces: Info
|
||||
node `(modus-themes) Configure bold and italic faces'.
|
||||
|
||||
Also refer to the Orderless documentation for its intersection
|
||||
with Company (if you choose to use those in tandem)."
|
||||
Also refer to the documentation of the `orderless' package for
|
||||
its intersection with `company' (if you choose to use those in
|
||||
tandem)."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "2.3.0")
|
||||
:package-version '(modus-themes . "3.0.0")
|
||||
:version "29.1"
|
||||
:type `(set
|
||||
(cons :tag "Matches"
|
||||
|
@ -2420,11 +2399,11 @@ In user configuration files the form may look like this:
|
|||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Command prompts"))
|
||||
|
||||
(defcustom modus-themes-hl-line nil
|
||||
"Control the current line highlight of HL-line mode.
|
||||
(defcustom modus-themes-hl-line '(intense)
|
||||
"Control the current line highlight of `hl-line-mode'.
|
||||
|
||||
The value is a list of properties, each designated by a symbol.
|
||||
The default (a nil value or an empty list) is a subtle gray
|
||||
With a nil value, or an empty list, the style is a subtle gray
|
||||
background color.
|
||||
|
||||
The property `accented' changes the background to a colored
|
||||
|
@ -2450,11 +2429,12 @@ In user configuration files the form may look like this:
|
|||
|
||||
(setq modus-themes-hl-line (quote (underline accented)))
|
||||
|
||||
Set `x-underline-at-descent-line' to a non-nil value for better
|
||||
results with underlines."
|
||||
Set `x-underline-at-descent-line' to a non-nil value so that the
|
||||
placement of the underline coincides with the lower boundary of
|
||||
the colored background."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "1.5.0")
|
||||
:version "28.1"
|
||||
:package-version '(modus-themes . "3.0.0")
|
||||
:version "29.1"
|
||||
:type '(set :tag "Properties" :greedy t
|
||||
(const :tag "Colored background" accented)
|
||||
(const :tag "Underline" underline)
|
||||
|
@ -2522,8 +2502,6 @@ Also check the variables `org-hide-emphasis-markers',
|
|||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Markup"))
|
||||
|
||||
(make-obsolete 'modus-themes-intense-markup 'modus-themes-markup "2.1.0")
|
||||
|
||||
(defcustom modus-themes-paren-match nil
|
||||
"Control the style of matching parentheses or delimiters.
|
||||
|
||||
|
@ -3225,11 +3203,6 @@ an alternative to the default value."
|
|||
"Get cdr of KEY in ALIST."
|
||||
(cdr (assoc key alist)))
|
||||
|
||||
(define-obsolete-variable-alias
|
||||
'modus-themes--heading-weights
|
||||
'modus-themes-weights
|
||||
"2.1.0")
|
||||
|
||||
(defconst modus-themes-weights
|
||||
'( thin ultralight extralight light semilight regular medium
|
||||
semibold bold heavy extrabold ultrabold)
|
||||
|
@ -3582,9 +3555,6 @@ foreground unspecified."
|
|||
(list deuteran)
|
||||
(list main)))
|
||||
|
||||
(make-obsolete 'modus-themes--completion 'modus-themes--completion-line "2.3.0")
|
||||
(make-obsolete 'modus-themes--completion 'modus-themes--completion-match "2.3.0")
|
||||
|
||||
(defun modus-themes--completion-line (key bg fg bgintense fgintense &optional bgaccent bgaccentintense)
|
||||
"Styles for `modus-themes-completions'.
|
||||
KEY is the key of a cons cell. BG and FG are the main colors.
|
||||
|
@ -4309,8 +4279,8 @@ by virtue of calling either of `modus-themes-load-operandi' and
|
|||
magenta-subtle-bg magenta-intense))))
|
||||
`(modus-themes-completion-match-1
|
||||
((,class ,@(modus-themes--completion-match
|
||||
'matches bg-special-faint-cold cyan
|
||||
cyan-subtle-bg cyan-intense))))
|
||||
'matches bg-special-faint-cold blue
|
||||
blue-subtle-bg blue-intense))))
|
||||
`(modus-themes-completion-match-2
|
||||
((,class ,@(modus-themes--completion-match
|
||||
'matches bg-special-faint-mild green
|
||||
|
@ -4798,9 +4768,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
|
|||
`(consult-line-number-prefix ((,class :foreground ,fg-unfocused)))
|
||||
`(consult-narrow-indicator ((,class :foreground ,magenta-alt)))
|
||||
`(consult-preview-cursor ((,class :inherit modus-themes-intense-blue)))
|
||||
`(consult-preview-error ((,class :inherit modus-themes-intense-red)))
|
||||
`(consult-preview-insertion ((,class :inherit modus-themes-special-warm)))
|
||||
`(consult-preview-line ((,class :background ,bg-hl-alt-intense)))
|
||||
;;;;; corfu
|
||||
`(corfu-current ((,class :inherit modus-themes-completion-selected-popup)))
|
||||
`(corfu-bar ((,class :background ,fg-alt)))
|
||||
|
@ -4928,16 +4896,12 @@ by virtue of calling either of `modus-themes-load-operandi' and
|
|||
;;;;; diff-hl
|
||||
`(diff-hl-change ((,class :inherit modus-themes-fringe-yellow)))
|
||||
`(diff-hl-delete ((,class :inherit modus-themes-fringe-red)))
|
||||
`(diff-hl-dired-change ((,class :inherit diff-hl-change)))
|
||||
`(diff-hl-dired-delete ((,class :inherit diff-hl-delete)))
|
||||
`(diff-hl-dired-ignored ((,class :inherit dired-ignored)))
|
||||
`(diff-hl-dired-insert ((,class :inherit diff-hl-insert)))
|
||||
`(diff-hl-dired-unknown ((,class :inherit dired-ignored)))
|
||||
`(diff-hl-insert ((,class :inherit modus-themes-grue-background-active)))
|
||||
`(diff-hl-reverted-hunk-highlight ((,class :background ,fg-main :foreground ,bg-main)))
|
||||
;;;;; diff-mode
|
||||
`(diff-added ((,class :inherit modus-themes-diff-added)))
|
||||
`(diff-changed ((,class :inherit modus-themes-diff-changed :extend t)))
|
||||
`(diff-changed-unspecified ((,class :inherit diff-changed)))
|
||||
`(diff-context ((,class ,@(unless (eq modus-themes-diffs 'bg-only) (list :foreground fg-unfocused)))))
|
||||
`(diff-error ((,class :inherit modus-themes-intense-red)))
|
||||
`(diff-file-header ((,class :inherit (bold diff-header))))
|
||||
|
@ -5741,17 +5705,43 @@ by virtue of calling either of `modus-themes-load-operandi' and
|
|||
;; HACK 2022-06-23: The :inverse-video prevents hl-line-mode from
|
||||
;; overriding the background. Such an override really defeats the
|
||||
;; purpose of setting those highlights.
|
||||
`(hi-aquamarine ((,class :background ,bg-main :foreground ,cyan :inverse-video t)))
|
||||
;;
|
||||
;; NOTE 2022-10-04: We do not use the ,class here but instead
|
||||
;; hardcode color values. We have to do this as the themes lack
|
||||
;; entries in their palette for such an edge case. Defining those
|
||||
;; entries is not appropriate.
|
||||
`(hi-aquamarine ((((class color) (min-colors 88) (background light))
|
||||
:background "white" :foreground "#227f9f" :inverse-video t)
|
||||
(((class color) (min-colors 88) (background dark))
|
||||
:background "black" :foreground "#66cbdc" :inverse-video t)))
|
||||
`(hi-black-b ((,class :inverse-video t)))
|
||||
`(hi-black-hb ((,class :background ,bg-main :foreground ,fg-alt :inverse-video t)))
|
||||
`(hi-blue ((,class :background ,bg-main :foreground ,blue-alt :inverse-video t)))
|
||||
`(hi-blue ((((class color) (min-colors 88) (background light))
|
||||
:background "white" :foreground "#3366dd" :inverse-video t)
|
||||
(((class color) (min-colors 88) (background dark))
|
||||
:background "black" :foreground "#aaccff" :inverse-video t)))
|
||||
`(hi-blue-b ((,class :inherit (bold hi-blue))))
|
||||
`(hi-green ((,class :background ,bg-main :foreground ,green :inverse-video t)))
|
||||
`(hi-green ((((class color) (min-colors 88) (background light))
|
||||
:background "white" :foreground "#008a00" :inverse-video t)
|
||||
(((class color) (min-colors 88) (background dark))
|
||||
:background "black" :foreground "#66dd66" :inverse-video t)))
|
||||
`(hi-green-b ((,class :inherit (bold hi-green))))
|
||||
`(hi-pink ((,class :background ,bg-main :foreground ,magenta :inverse-video t)))
|
||||
`(hi-red-b ((,class :inherit bold :background ,bg-main :foreground ,red :inverse-video t)))
|
||||
`(hi-salmon ((,class :background ,bg-main :foreground ,red-alt-faint :inverse-video t)))
|
||||
`(hi-yellow ((,class :background ,bg-main :foreground ,yellow-alt :inverse-video t)))
|
||||
`(hi-pink ((((class color) (min-colors 88) (background light))
|
||||
:background "white" :foreground "#bd30aa" :inverse-video t)
|
||||
(((class color) (min-colors 88) (background dark))
|
||||
:background "black" :foreground "#ff88ee" :inverse-video t)))
|
||||
`(hi-red-b ((((class color) (min-colors 88) (background light))
|
||||
:background "white" :foreground "#dd0000" :inverse-video t)
|
||||
(((class color) (min-colors 88) (background dark))
|
||||
:background "black" :foreground "#f06666" :inverse-video t)))
|
||||
`(hi-salmon ((((class color) (min-colors 88) (background light))
|
||||
:background "white" :foreground "#bf555a" :inverse-video t)
|
||||
(((class color) (min-colors 88) (background dark))
|
||||
:background "black" :foreground "#e08a50" :inverse-video t)))
|
||||
`(hi-yellow ((((class color) (min-colors 88) (background light))
|
||||
:background "white" :foreground "#af6400" :inverse-video t)
|
||||
(((class color) (min-colors 88) (background dark))
|
||||
:background "black" :foreground "#faea00" :inverse-video t)))
|
||||
`(highlight ((,class ,@(if modus-themes-intense-mouseovers
|
||||
(list :background blue-intense-bg :foreground fg-main)
|
||||
(list :background cyan-subtle-bg :foreground fg-main)))))
|
||||
|
@ -5800,6 +5790,8 @@ by virtue of calling either of `modus-themes-load-operandi' and
|
|||
`(iflipb-other-buffer-face ((,class :inherit shadow)))
|
||||
;;;;; image-dired
|
||||
`(image-dired-thumb-flagged ((,class :background ,red-intense-bg)))
|
||||
`(image-dired-thumb-header-file-name ((,class :inherit bold)))
|
||||
`(image-dired-thumb-header-file-size ((,class :foreground ,blue-active)))
|
||||
`(image-dired-thumb-mark ((,class :inherit modus-themes-grue-background-intense)))
|
||||
;;;;; imenu-list
|
||||
`(imenu-list-entry-face-0 ((,class :foreground ,cyan)))
|
||||
|
@ -6485,6 +6477,8 @@ by virtue of calling either of `modus-themes-load-operandi' and
|
|||
`(nxml-prolog-keyword ((,class :inherit font-lock-keyword-face)))
|
||||
`(nxml-ref ((,class :inherit modus-themes-bold :foreground ,fg-special-mild)))
|
||||
`(rng-error ((,class :inherit error)))
|
||||
;;;;; olivetti
|
||||
`(olivetti-fringe ((,class :background ,bg-main)))
|
||||
;;;;; orderless
|
||||
`(orderless-match-face-0 ((,class :inherit modus-themes-completion-match-0)))
|
||||
`(orderless-match-face-1 ((,class :inherit modus-themes-completion-match-1)))
|
||||
|
@ -7109,17 +7103,13 @@ by virtue of calling either of `modus-themes-load-operandi' and
|
|||
;;;;; table (built-in table.el)
|
||||
`(table-cell ((,class :background ,blue-nuanced-bg)))
|
||||
;;;;; telega
|
||||
;; FIXME 2021-03-28: Some aspects of `telega' are not fully
|
||||
;; supported or have not been tested thoroughly. Please understand
|
||||
;; that I do not use that service because it requires a smartphone
|
||||
;; and I have none. Help with testing is appreciated.
|
||||
`(telega-button ((,class :box t :foreground ,blue)))
|
||||
`(telega-button-active ((,class :box ,blue-intense-bg :background ,blue-intense-bg :foreground ,fg-main)))
|
||||
`(telega-button-highlight ((,class :inherit modus-themes-subtle-magenta)))
|
||||
`(telega-chat-prompt ((,class :inherit bold)))
|
||||
`(telega-entity-type-code ((,class :inherit modus-themes-fixed-pitch)))
|
||||
`(telega-entity-type-code ((,class :inherit modus-themes-markup-verbatim)))
|
||||
`(telega-entity-type-mention ((,class :foreground ,cyan)))
|
||||
`(telega-entity-type-pre ((,class :inherit modus-themes-fixed-pitch)))
|
||||
`(telega-entity-type-pre ((,class :inherit modus-themes-markup-code)))
|
||||
`(telega-entity-type-spoiler ((,class :background ,fg-main :foreground ,fg-main)))
|
||||
`(telega-msg-heading ((,class :background ,bg-alt)))
|
||||
`(telega-msg-self-title ((,class :inherit bold)))
|
||||
|
@ -7168,7 +7158,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
|
|||
`(term-color-yellow ((,class :background ,yellow :foreground ,yellow)))
|
||||
`(term-underline ((,class :underline t)))
|
||||
;;;;; textsec
|
||||
`(textsec-suspicious ((,class :inherit modus-themes-refine-red)))
|
||||
`(textsec-suspicious (()))
|
||||
;;;;; tomatinho
|
||||
`(tomatinho-ok-face ((,class :foreground ,blue-intense)))
|
||||
`(tomatinho-pause-face ((,class :foreground ,yellow-intense)))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; modus-vivendi-theme.el --- Elegant, highly legible and customizable light theme -*- lexical-binding:t -*-
|
||||
;;; modus-vivendi-theme.el --- Elegant, highly legible and customizable dark theme -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2019-2022 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
|||
;; Maintainer: Modus-Themes Development <~protesilaos/modus-themes@lists.sr.ht>
|
||||
;; URL: https://git.sr.ht/~protesilaos/modus-themes
|
||||
;; Mailing-List: https://lists.sr.ht/~protesilaos/modus-themes
|
||||
;; Version: 2.7.1
|
||||
;; Version: 3.0.0
|
||||
;; Package-Requires: ((emacs "27.1"))
|
||||
;; Keywords: faces, theme, accessibility
|
||||
|
||||
|
@ -71,6 +71,7 @@ which corresponds to a minimum contrast in relative luminance of
|
|||
|
||||
(provide-theme 'modus-vivendi))
|
||||
|
||||
;;;###theme-autoload (put 'modus-vivendi 'theme-properties '(:background-mode dark :kind color-scheme :family modus))
|
||||
;;;###theme-autoload
|
||||
(put 'modus-vivendi 'theme-properties '(:background-mode dark :kind color-scheme :family modus))
|
||||
|
||||
;;; modus-vivendi-theme.el ends here
|
||||
|
|
|
@ -1221,7 +1221,7 @@ SORTFUN is passed to `sort' to change the default ordering."
|
|||
|
||||
(defface abbrev-table-name
|
||||
'((t :inherit font-lock-function-name-face))
|
||||
"Face used for displaying the abbrev table name in `edit-abbrev-mode'."
|
||||
"Face used for displaying the abbrev table name in `edit-abbrevs-mode'."
|
||||
:version "29.1")
|
||||
|
||||
(defvar edit-abbrevs-mode-font-lock-keywords
|
||||
|
|
|
@ -2177,7 +2177,7 @@ Operation is inhibited by `allout-inhibit-body-modification-handler'."
|
|||
;; ?? Escapes removal (before changes) is not done when edits span multiple
|
||||
;; items, recognizing that item structure is being preserved, including
|
||||
;; escaping of item-prefix-like text within bodies. See
|
||||
;; `allout-before-modification-handler' and
|
||||
;; `allout-body-modification-handler' and
|
||||
;; `allout-inhibit-body-modification-handler'.
|
||||
;;
|
||||
;; Adds the overlay to the `allout-unresolved-body-mod-workroster' during
|
||||
|
|
|
@ -418,7 +418,7 @@ and it should apply face FACE to the text between BEG and END.")
|
|||
(setq ansi-color-for-comint-mode 'filter))
|
||||
|
||||
;;;###autoload
|
||||
(defun ansi-color-process-output (ignored)
|
||||
(defun ansi-color-process-output (_ignored)
|
||||
"Maybe translate SGR control sequences of comint output into text properties.
|
||||
|
||||
Depending on variable `ansi-color-for-comint-mode' the comint output is
|
||||
|
|
|
@ -135,7 +135,7 @@ If this contains a %s, that will be replaced by the matching rule."
|
|||
(if (eq major-mode (default-value 'major-mode))
|
||||
(sh-mode))))
|
||||
|
||||
(ada-mode . ada-header)
|
||||
(ada-mode . ada-skel-initial-string)
|
||||
|
||||
(("\\.[1-9]\\'" . "Man page skeleton")
|
||||
"Short description: "
|
||||
|
|
|
@ -297,9 +297,10 @@ You should set this variable through Custom."
|
|||
(defcustom auto-revert-notify-exclude-dir-regexp
|
||||
(concat
|
||||
;; No mounted file systems.
|
||||
"^" (regexp-opt '("/afs/" "/media/" "/mnt" "/net/" "/tmp_mnt/"))
|
||||
mounted-file-systems
|
||||
;; No remote files.
|
||||
(unless auto-revert-remote-files "\\|^/[^/|:][^/|]+:"))
|
||||
(unless auto-revert-remote-files
|
||||
(rx (| "" (: bol "/" (not (any "/:|")) (1+ (not (any "/|"))) ":")))))
|
||||
"Regular expression of directories to be excluded from file notifications."
|
||||
:group 'auto-revert
|
||||
:type 'regexp
|
||||
|
|
|
@ -1029,6 +1029,14 @@ if `inhibit-field-text-motion' is non-nil."
|
|||
(define-key global-map [XF86Back] 'previous-buffer)
|
||||
(put 'previous-buffer :advertised-binding [?\C-x left])
|
||||
|
||||
(defvar-keymap buffer-navigation-repeat-map
|
||||
:doc "Keymap to repeat `next-buffer' and `previous-buffer'. Used in `repeat-mode'."
|
||||
"<right>" #'next-buffer
|
||||
"<left>" #'previous-buffer)
|
||||
|
||||
(put 'next-buffer 'repeat-map 'buffer-navigation-repeat-map)
|
||||
(put 'previous-buffer 'repeat-map 'buffer-navigation-repeat-map)
|
||||
|
||||
(let ((map minibuffer-local-map))
|
||||
(define-key map "\en" 'next-history-element)
|
||||
(define-key map [next] 'next-history-element)
|
||||
|
|
|
@ -172,7 +172,7 @@ You cannot create projects for the baseclass."
|
|||
(defclass ede-locate-locate (ede-locate-base)
|
||||
()
|
||||
"EDE Locator using the locate command.
|
||||
Configure the Emacs `locate-program' variable to also
|
||||
Configure the Emacs `locate-command' variable to also
|
||||
configure the use of EDE locate.")
|
||||
|
||||
(cl-defmethod ede-locate-ok-in-project ((_loc (subclass ede-locate-locate))
|
||||
|
@ -315,7 +315,7 @@ that created this EDE locate object."
|
|||
()
|
||||
"EDE Locator using Cscope.
|
||||
Configure EDE's use of Cscope through the cedet-cscope.el
|
||||
file name searching variable `cedet-cscope-file-command'.")
|
||||
file name searching variable `cedet-cscope-command'.")
|
||||
|
||||
(cl-defmethod initialize-instance ((loc ede-locate-cscope)
|
||||
&rest _slots)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
(defvar wisent-lex-lookahead nil
|
||||
"Extra lookahead token.
|
||||
When non-nil it is directly returned by `wisent-lex-function'.")
|
||||
When non-nil it is directly returned by `wisent-lexer-function'.")
|
||||
|
||||
(defmacro wisent-lex-eoi ()
|
||||
"Return an End-Of-Input lexical token.
|
||||
|
|
|
@ -1546,7 +1546,7 @@ If TYPE is `groups', include only groups."
|
|||
"*Customize Apropos*")))
|
||||
|
||||
;;;###autoload
|
||||
(defun customize-apropos-options (regexp &optional ignored)
|
||||
(defun customize-apropos-options (regexp &optional _ignored)
|
||||
"Customize all loaded customizable options matching REGEXP."
|
||||
(interactive (list (apropos-read-pattern "options")))
|
||||
(customize-apropos regexp 'options))
|
||||
|
|
|
@ -142,7 +142,7 @@ remove them from your saved Custom file.\n\n")
|
|||
(widget-create 'push-button
|
||||
:tag " Revert "
|
||||
:help-echo "Revert this buffer to its original state."
|
||||
:action (lambda (&rest ignored) (revert-buffer)))
|
||||
:action (lambda (&rest _ignored) (revert-buffer)))
|
||||
|
||||
(widget-insert "\n\nTheme name : ")
|
||||
(setq custom-theme-name
|
||||
|
|
|
@ -3478,7 +3478,7 @@ Use \\[dired-hide-all] to (un)hide all directories."
|
|||
(dired-next-subdir 1 t))))
|
||||
|
||||
;;;###autoload
|
||||
(defun dired-hide-all (&optional ignored)
|
||||
(defun dired-hide-all (&optional _ignored)
|
||||
"Hide all subdirectories, leaving only their header lines.
|
||||
If there is already something hidden, make everything visible again.
|
||||
Use \\[dired-hide-subdir] to (un)hide a particular subdirectory."
|
||||
|
|
|
@ -1457,9 +1457,9 @@ wildcards, erases the buffer, and builds the subdir-alist anew
|
|||
(if (eq (car attributes) t)
|
||||
(set-visited-file-modtime (file-attribute-modification-time
|
||||
attributes))))
|
||||
(set-buffer-modified-p nil)
|
||||
(when dired-make-directory-clickable
|
||||
(dired--make-directory-clickable))
|
||||
(set-buffer-modified-p nil)
|
||||
;; No need to narrow since the whole buffer contains just
|
||||
;; dired-readin's output, nothing else. The hook can
|
||||
;; successfully use dired functions (e.g. dired-get-filename)
|
||||
|
@ -1911,11 +1911,15 @@ mouse-2: visit this file in other window"
|
|||
(defun dired--make-directory-clickable ()
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^ /" nil t 1)
|
||||
(while (re-search-forward
|
||||
(if (memq system-type '(windows-nt ms-dos))
|
||||
"^ \\([a-zA-Z]:/\\|//\\)"
|
||||
"^ /")
|
||||
nil t 1)
|
||||
(let ((bound (line-end-position))
|
||||
(segment-start (point))
|
||||
(inhibit-read-only t)
|
||||
(dir "/"))
|
||||
(dir (substring (match-string 0) 2)))
|
||||
(while (search-forward "/" bound t 1)
|
||||
(setq dir (concat dir (buffer-substring segment-start (point))))
|
||||
(add-text-properties
|
||||
|
|
68
lisp/dom.el
68
lisp/dom.el
|
@ -30,23 +30,17 @@
|
|||
(defsubst dom-tag (node)
|
||||
"Return the NODE tag."
|
||||
;; Called on a list of nodes. Use the first.
|
||||
(if (consp (car node))
|
||||
(caar node)
|
||||
(car node)))
|
||||
(car (if (consp (car node)) (car node) node)))
|
||||
|
||||
(defsubst dom-attributes (node)
|
||||
"Return the NODE attributes."
|
||||
;; Called on a list of nodes. Use the first.
|
||||
(if (consp (car node))
|
||||
(cadr (car node))
|
||||
(cadr node)))
|
||||
(cadr (if (consp (car node)) (car node) node)))
|
||||
|
||||
(defsubst dom-children (node)
|
||||
"Return the NODE children."
|
||||
;; Called on a list of nodes. Use the first.
|
||||
(if (consp (car node))
|
||||
(cddr (car node))
|
||||
(cddr node)))
|
||||
(cddr (if (consp (car node)) (car node) node)))
|
||||
|
||||
(defun dom-non-text-children (node)
|
||||
"Return all non-text-node children of NODE."
|
||||
|
@ -62,10 +56,11 @@
|
|||
(defun dom-set-attribute (node attribute value)
|
||||
"Set ATTRIBUTE in NODE to VALUE."
|
||||
(setq node (dom-ensure-node node))
|
||||
(let ((old (assoc attribute (cadr node))))
|
||||
(let* ((attributes (cadr node))
|
||||
(old (assoc attribute attributes)))
|
||||
(if old
|
||||
(setcdr old value)
|
||||
(setcar (cdr node) (nconc (cadr node) (list (cons attribute value)))))))
|
||||
(setcar (cdr node) (cons (cons attribute value) attributes)))))
|
||||
|
||||
(defun dom-remove-attribute (node attribute)
|
||||
"Remove ATTRIBUTE from NODE."
|
||||
|
@ -80,7 +75,7 @@ A typical attribute is `href'."
|
|||
|
||||
(defun dom-text (node)
|
||||
"Return all the text bits in the current node concatenated."
|
||||
(mapconcat 'identity (cl-remove-if-not 'stringp (dom-children node)) " "))
|
||||
(mapconcat #'identity (cl-remove-if-not #'stringp (dom-children node)) " "))
|
||||
|
||||
(defun dom-texts (node &optional separator)
|
||||
"Return all textual data under NODE concatenated with SEPARATOR in-between."
|
||||
|
@ -195,9 +190,7 @@ ATTRIBUTE would typically be `class', `id' or the like."
|
|||
|
||||
(defun dom-node (tag &optional attributes &rest children)
|
||||
"Return a DOM node with TAG and ATTRIBUTES."
|
||||
(if children
|
||||
`(,tag ,attributes ,@children)
|
||||
(list tag attributes)))
|
||||
`(,tag ,attributes ,@children))
|
||||
|
||||
(defun dom-append-child (node child)
|
||||
"Append CHILD to the end of NODE's children."
|
||||
|
@ -215,11 +208,7 @@ If BEFORE is nil, make CHILD NODE's first child."
|
|||
(let ((pos (if before
|
||||
(cl-position before children)
|
||||
0)))
|
||||
(if (zerop pos)
|
||||
;; First child.
|
||||
(setcdr (cdr node) (cons child (cddr node)))
|
||||
(setcdr (nthcdr (1- pos) children)
|
||||
(cons child (nthcdr pos children))))))
|
||||
(push child (nthcdr (+ 2 pos) node))))
|
||||
node)
|
||||
|
||||
(defun dom-ensure-node (node)
|
||||
|
@ -247,7 +236,7 @@ white-space."
|
|||
(insert (format "(%S . %S)" (car elem) (cdr elem)))
|
||||
(if (zerop (cl-decf times))
|
||||
(insert ")")
|
||||
(insert "\n" (make-string column ? ))))))
|
||||
(insert "\n" (make-string column ?\s))))))
|
||||
(let* ((children (if remove-empty
|
||||
(cl-remove-if
|
||||
(lambda (child)
|
||||
|
@ -258,16 +247,16 @@ white-space."
|
|||
(times (length children)))
|
||||
(if (null children)
|
||||
(insert ")")
|
||||
(insert "\n" (make-string (1+ column) ? ))
|
||||
(insert "\n" (make-string (1+ column) ?\s))
|
||||
(dolist (child children)
|
||||
(if (stringp child)
|
||||
(if (or (not remove-empty)
|
||||
(not (string-match "\\`[\n\r\t ]*\\'" child)))
|
||||
(if (not (and remove-empty
|
||||
(string-match "\\`[\n\r\t ]*\\'" child)))
|
||||
(insert (format "%S" child)))
|
||||
(dom-pp child remove-empty))
|
||||
(if (zerop (cl-decf times))
|
||||
(insert ")")
|
||||
(insert "\n" (make-string (1+ column) ? ))))))))
|
||||
(insert "\n" (make-string (1+ column) ?\s))))))))
|
||||
|
||||
(defun dom-print (dom &optional pretty xml)
|
||||
"Print DOM at point as HTML/XML.
|
||||
|
@ -279,18 +268,19 @@ If XML, generate XML instead of HTML."
|
|||
(dolist (elem attr)
|
||||
;; In HTML, these are boolean attributes that should not have
|
||||
;; an = value.
|
||||
(if (and (memq (car elem)
|
||||
'(async autofocus autoplay checked
|
||||
contenteditable controls default
|
||||
defer disabled formNoValidate frameborder
|
||||
hidden ismap itemscope loop
|
||||
multiple muted nomodule novalidate open
|
||||
readonly required reversed
|
||||
scoped selected typemustmatch))
|
||||
(cdr elem)
|
||||
(not xml))
|
||||
(insert (format " %s" (car elem)))
|
||||
(insert (format " %s=%S" (car elem) (cdr elem))))))
|
||||
(insert (if (and (memq (car elem)
|
||||
'(async autofocus autoplay checked
|
||||
contenteditable controls default
|
||||
defer disabled formNoValidate frameborder
|
||||
hidden ismap itemscope loop
|
||||
multiple muted nomodule novalidate open
|
||||
readonly required reversed
|
||||
scoped selected typemustmatch))
|
||||
(cdr elem)
|
||||
(not xml))
|
||||
(format " %s" (car elem))
|
||||
(format " %s=\"%s\"" (car elem)
|
||||
(url-insert-entities-in-string (cdr elem)))))))
|
||||
(let* ((children (dom-children dom))
|
||||
(non-text nil))
|
||||
(if (null children)
|
||||
|
@ -301,7 +291,7 @@ If XML, generate XML instead of HTML."
|
|||
(insert child)
|
||||
(setq non-text t)
|
||||
(when pretty
|
||||
(insert "\n" (make-string (+ column 2) ? )))
|
||||
(insert "\n" (make-string (+ column 2) ?\s)))
|
||||
(dom-print child pretty xml)))
|
||||
;; If we inserted non-text child nodes, or a text node that
|
||||
;; ends with a newline, then we indent the end tag.
|
||||
|
@ -310,7 +300,7 @@ If XML, generate XML instead of HTML."
|
|||
non-text))
|
||||
(unless (bolp)
|
||||
(insert "\n"))
|
||||
(insert (make-string column ? )))
|
||||
(insert (make-string column ?\s)))
|
||||
(insert (format "</%s>" (dom-tag dom)))))))
|
||||
|
||||
(provide 'dom)
|
||||
|
|
|
@ -88,7 +88,8 @@ string that was matched."
|
|||
|
||||
(defcustom ecomplete-filter-regexp nil
|
||||
"Regular expression of addresses that should not be stored by ecomplete."
|
||||
:type 'regexp
|
||||
:type '(choice (const :tag "None" nil)
|
||||
(regexp :tag "Regexp"))
|
||||
:version "29.1")
|
||||
|
||||
;;; Internal variables.
|
||||
|
@ -189,7 +190,7 @@ FORCE is non-nil, use TEXT exactly as is."
|
|||
If CHOOSE, allow the user to choose interactively between the
|
||||
matches.
|
||||
|
||||
Auto-select when `ecomplete-message-display-abbrev-auto-select' is
|
||||
Auto-select when `ecomplete-auto-select' is
|
||||
non-nil and there is only a single completion option available."
|
||||
(let* ((matches (ecomplete-get-matches type word))
|
||||
(match-list (and matches (split-string matches "\n")))
|
||||
|
|
|
@ -53,8 +53,8 @@
|
|||
`(;; GNU GPL
|
||||
("is free software[:;] you can redistribute it" .
|
||||
,(rx (or (seq "If not, see " (? "<")
|
||||
"http" (? "s") "://www.gnu.org/licenses/"
|
||||
(? ">") (? " "))
|
||||
"http" (? "s") "://www.gnu.org/licenses"
|
||||
(? "/") (? ">") (? " "))
|
||||
(seq "Boston, MA " (? " ")
|
||||
"0211" (or "1-1307" "0-1301")
|
||||
(or " " ", ") "USA")
|
||||
|
|
|
@ -753,7 +753,7 @@ property for use by navigation."
|
|||
|
||||
(defun backtrace--line-length-or-nil ()
|
||||
"Return `backtrace-line-length' if valid, nil else."
|
||||
;; mirror the logic in `cl-print-to-string-with-limits'
|
||||
;; mirror the logic in `cl-print-to-string-with-limit'
|
||||
(and (natnump backtrace-line-length)
|
||||
(not (zerop backtrace-line-length))
|
||||
backtrace-line-length))
|
||||
|
|
|
@ -163,7 +163,9 @@
|
|||
(let ((s (substring bindat-raw bindat-idx (+ bindat-idx len))))
|
||||
(setq bindat-idx (+ bindat-idx len))
|
||||
(if (stringp s) s
|
||||
(apply #'unibyte-string s))))
|
||||
;; FIXME: There should be a more efficient way to do this.
|
||||
;; Should `apply' accept vectors in addition to lists?
|
||||
(apply #'unibyte-string (append s nil)))))
|
||||
|
||||
(defun bindat--unpack-strz (&optional len)
|
||||
(let ((i 0) s)
|
||||
|
@ -172,7 +174,7 @@
|
|||
(setq s (substring bindat-raw bindat-idx (+ bindat-idx i)))
|
||||
(setq bindat-idx (+ bindat-idx (or len (1+ i))))
|
||||
(if (stringp s) s
|
||||
(apply #'unibyte-string s))))
|
||||
(apply #'unibyte-string (append s nil)))))
|
||||
|
||||
(defun bindat--unpack-bits (len)
|
||||
(let ((bits nil) (bnum (1- (* 8 len))) j m)
|
||||
|
|
|
@ -178,7 +178,7 @@ Earlier variables shadow later ones with the same name.")
|
|||
;; be displayed when the function's source file will be
|
||||
;; compiled anyway, but more importantly we would otherwise
|
||||
;; emit spurious warnings here because we don't have the full
|
||||
;; context, such as `declare-functions' placed earlier in the
|
||||
;; context, such as `declare-function's placed earlier in the
|
||||
;; source file's code or `with-suppressed-warnings' that
|
||||
;; surrounded the `defsubst'.
|
||||
(byte-compile-warnings nil))
|
||||
|
|
|
@ -2577,7 +2577,7 @@ list that represents a doc string reference.
|
|||
;; macroexpand-all.
|
||||
;; (if (memq byte-optimize '(t source))
|
||||
;; (setq form (byte-optimize-form form for-effect)))
|
||||
(cconv-closure-convert form))
|
||||
(cconv-closure-convert form byte-compile-bound-variables))
|
||||
|
||||
;; byte-hunk-handlers cannot call this!
|
||||
(defun byte-compile-toplevel-file-form (top-level-form)
|
||||
|
@ -4675,13 +4675,6 @@ Return the offset in the form (VAR . OFFSET)."
|
|||
(byte-compile-form (cadr clause))
|
||||
(byte-compile-push-constant nil)))))
|
||||
|
||||
(defun byte-compile-not-lexical-var-p (var)
|
||||
(or (not (symbolp var))
|
||||
(special-variable-p var)
|
||||
(memq var byte-compile-bound-variables)
|
||||
(memq var '(nil t))
|
||||
(keywordp var)))
|
||||
|
||||
(defun byte-compile-bind (var init-lexenv)
|
||||
"Emit byte-codes to bind VAR and update `byte-compile--lexical-environment'.
|
||||
INIT-LEXENV should be a lexical-environment alist describing the
|
||||
|
@ -4690,7 +4683,7 @@ Return non-nil if the TOS value was popped."
|
|||
;; The mix of lexical and dynamic bindings mean that we may have to
|
||||
;; juggle things on the stack, to move them to TOS for
|
||||
;; dynamic binding.
|
||||
(if (and lexical-binding (not (byte-compile-not-lexical-var-p var)))
|
||||
(if (not (cconv--not-lexical-var-p var byte-compile-bound-variables))
|
||||
;; VAR is a simple stack-allocated lexical variable.
|
||||
(progn (push (assq var init-lexenv)
|
||||
byte-compile--lexical-environment)
|
||||
|
|
|
@ -64,20 +64,12 @@
|
|||
;;
|
||||
;;; Code:
|
||||
|
||||
;; PROBLEM cases found during conversion to lexical binding.
|
||||
;; We should try and detect and warn about those cases, even
|
||||
;; for lexical-binding==nil to help prepare the migration.
|
||||
;; - Uses of run-hooks, and friends.
|
||||
;; - Cases where we want to apply the same code to different vars depending on
|
||||
;; some test. These sometimes use a (let ((foo (if bar 'a 'b)))
|
||||
;; ... (symbol-value foo) ... (set foo ...)).
|
||||
|
||||
;; TODO: (not just for cconv but also for the lexbind changes in general)
|
||||
;; - let (e)debug find the value of lexical variables from the stack.
|
||||
;; - make eval-region do the eval-sexp-add-defvars dance.
|
||||
;; - byte-optimize-form should be applied before cconv.
|
||||
;; OTOH, the warnings emitted by cconv-analyze need to come before optimize
|
||||
;; since afterwards they can because obnoxious (warnings about an "unused
|
||||
;; since afterwards they can become obnoxious (warnings about an "unused
|
||||
;; variable" should not be emitted when the variable use has simply been
|
||||
;; optimized away).
|
||||
;; - let macros specify that some let-bindings come from the same source,
|
||||
|
@ -87,33 +79,9 @@
|
|||
;; - canonize code in macro-expand so we don't have to handle (let (var) body)
|
||||
;; and other oddities.
|
||||
;; - new byte codes for unwind-protect so that closures aren't needed at all.
|
||||
;; - a reference to a var that is known statically to always hold a constant
|
||||
;; should be turned into a byte-constant rather than a byte-stack-ref.
|
||||
;; Hmm... right, that's called constant propagation and could be done here,
|
||||
;; but when that constant is a function, we have to be careful to make sure
|
||||
;; the bytecomp only compiles it once.
|
||||
;; - Since we know here when a variable is not mutated, we could pass that
|
||||
;; info to the byte-compiler, e.g. by using a new `immutable-let'.
|
||||
;; - call known non-escaping functions with `goto' rather than `call'.
|
||||
;; - optimize mapc to a dolist loop.
|
||||
|
||||
;; (defmacro dlet (binders &rest body)
|
||||
;; ;; Works in both lexical and non-lexical mode.
|
||||
;; (declare (indent 1) (debug let))
|
||||
;; `(progn
|
||||
;; ,@(mapcar (lambda (binder)
|
||||
;; `(defvar ,(if (consp binder) (car binder) binder)))
|
||||
;; binders)
|
||||
;; (let ,binders ,@body)))
|
||||
|
||||
;; (defmacro llet (binders &rest body)
|
||||
;; ;; Only works in lexical-binding mode.
|
||||
;; `(funcall
|
||||
;; (lambda ,(mapcar (lambda (binder) (if (consp binder) (car binder) binder))
|
||||
;; binders)
|
||||
;; ,@body)
|
||||
;; ,@(mapcar (lambda (binder) (if (consp binder) (cadr binder)))
|
||||
;; binders)))
|
||||
|
||||
(eval-when-compile (require 'cl-lib))
|
||||
|
||||
|
@ -142,13 +110,19 @@ is less than this number.")
|
|||
;; interactive forms.
|
||||
(make-hash-table :test #'eq :weakness 'key))
|
||||
|
||||
(defvar cconv--dynbound-variables nil
|
||||
"List of variables known to be dynamically bound.")
|
||||
|
||||
;;;###autoload
|
||||
(defun cconv-closure-convert (form)
|
||||
(defun cconv-closure-convert (form &optional dynbound-vars)
|
||||
"Main entry point for closure conversion.
|
||||
FORM is a piece of Elisp code after macroexpansion.
|
||||
DYNBOUND-VARS is a list of symbols that should be considered as
|
||||
using dynamic scoping.
|
||||
|
||||
Returns a form where all lambdas don't have any free variables."
|
||||
(let ((cconv-freevars-alist '())
|
||||
(let ((cconv--dynbound-variables dynbound-vars)
|
||||
(cconv-freevars-alist '())
|
||||
(cconv-var-classification '()))
|
||||
;; Analyze form - fill these variables with new information.
|
||||
(cconv-analyze-form form '())
|
||||
|
@ -156,8 +130,6 @@ Returns a form where all lambdas don't have any free variables."
|
|||
(prog1 (cconv-convert form nil nil) ; Env initially empty.
|
||||
(cl-assert (null cconv-freevars-alist)))))
|
||||
|
||||
(defconst cconv--dummy-var (make-symbol "ignored"))
|
||||
|
||||
(defun cconv--set-diff (s1 s2)
|
||||
"Return elements of set S1 that are not in set S2."
|
||||
(let ((res '()))
|
||||
|
@ -262,9 +234,7 @@ Returns a form where all lambdas don't have any free variables."
|
|||
;; it is often non-trivial for the programmer to avoid such
|
||||
;; unused vars.
|
||||
(not (intern-soft var))
|
||||
(eq ?_ (aref (symbol-name var) 0))
|
||||
;; As a special exception, ignore "ignored".
|
||||
(eq var 'ignored))
|
||||
(eq ?_ (aref (symbol-name var) 0)))
|
||||
(let ((suggestions (help-uni-confusable-suggestions (symbol-name var))))
|
||||
(format "Unused lexical %s `%S'%s"
|
||||
varkind (bare-symbol var)
|
||||
|
@ -342,7 +312,7 @@ EXTEND is a list of variables which might need to be accessed even from places
|
|||
where they are shadowed, because some part of ENV causes them to be used at
|
||||
places where they originally did not directly appear."
|
||||
(cl-assert (not (delq nil (mapcar (lambda (mapping)
|
||||
(if (eq (cadr mapping) 'apply-partially)
|
||||
(if (eq (cadr mapping) #'apply-partially)
|
||||
(cconv--set-diff (cdr (cddr mapping))
|
||||
extend)))
|
||||
env))))
|
||||
|
@ -634,6 +604,12 @@ places where they originally did not directly appear."
|
|||
|
||||
(defvar byte-compile-lexical-variables)
|
||||
|
||||
(defun cconv--not-lexical-var-p (var dynbounds)
|
||||
(or (not lexical-binding)
|
||||
(not (symbolp var))
|
||||
(special-variable-p var)
|
||||
(memq var dynbounds)))
|
||||
|
||||
(defun cconv--analyze-use (vardata form varkind)
|
||||
"Analyze the use of a variable.
|
||||
VARDATA should be (BINDER READ MUTATED CAPTURED CALLED).
|
||||
|
@ -677,7 +653,7 @@ FORM is the parent form that binds this var."
|
|||
;; outside of it.
|
||||
(envcopy
|
||||
(mapcar (lambda (vdata) (list (car vdata) nil nil nil nil)) env))
|
||||
(byte-compile-bound-variables byte-compile-bound-variables)
|
||||
(cconv--dynbound-variables cconv--dynbound-variables)
|
||||
(newenv envcopy))
|
||||
;; Push it before recursing, so cconv-freevars-alist contains entries in
|
||||
;; the order they'll be used by closure-convert-rec.
|
||||
|
@ -685,7 +661,7 @@ FORM is the parent form that binds this var."
|
|||
(when lexical-binding
|
||||
(dolist (arg args)
|
||||
(cond
|
||||
((byte-compile-not-lexical-var-p arg)
|
||||
((cconv--not-lexical-var-p arg cconv--dynbound-variables)
|
||||
(byte-compile-warn-x
|
||||
arg
|
||||
"Lexical argument shadows the dynamic variable %S"
|
||||
|
@ -715,6 +691,8 @@ FORM is the parent form that binds this var."
|
|||
(setf (nth 3 (car env)) t))
|
||||
(setq env (cdr env) envcopy (cdr envcopy))))))
|
||||
|
||||
(defvar cconv--dynbindings)
|
||||
|
||||
(defun cconv-analyze-form (form env)
|
||||
"Find mutated variables and variables captured by closure.
|
||||
Analyze lambdas if they are suitable for lambda lifting.
|
||||
|
@ -730,7 +708,7 @@ This function does not return anything but instead fills the
|
|||
(let ((orig-env env)
|
||||
(newvars nil)
|
||||
(var nil)
|
||||
(byte-compile-bound-variables byte-compile-bound-variables)
|
||||
(cconv--dynbound-variables cconv--dynbound-variables)
|
||||
(value nil))
|
||||
(dolist (binder binders)
|
||||
(if (not (consp binder))
|
||||
|
@ -743,7 +721,9 @@ This function does not return anything but instead fills the
|
|||
|
||||
(cconv-analyze-form value (if (eq letsym 'let*) env orig-env)))
|
||||
|
||||
(unless (or (byte-compile-not-lexical-var-p var) (not lexical-binding))
|
||||
(if (cconv--not-lexical-var-p var cconv--dynbound-variables)
|
||||
(when (boundp 'cconv--dynbindings)
|
||||
(push var cconv--dynbindings))
|
||||
(cl-pushnew var byte-compile-lexical-variables)
|
||||
(let ((varstruct (list var nil nil nil nil)))
|
||||
(push (cons binder (cdr varstruct)) newvars)
|
||||
|
@ -797,7 +777,8 @@ This function does not return anything but instead fills the
|
|||
(cconv-analyze-form protected-form env)
|
||||
(unless lexical-binding
|
||||
(setq var nil))
|
||||
(when (and var (symbolp var) (byte-compile-not-lexical-var-p var))
|
||||
(when (and var (symbolp var)
|
||||
(cconv--not-lexical-var-p var cconv--dynbound-variables))
|
||||
(byte-compile-warn-x
|
||||
var "Lexical variable shadows the dynamic variable %S" var))
|
||||
(let* ((varstruct (list var nil nil nil nil)))
|
||||
|
@ -813,9 +794,9 @@ This function does not return anything but instead fills the
|
|||
(cconv-analyze-form form env)
|
||||
(cconv--analyze-function () body env form))
|
||||
|
||||
(`(defvar ,var) (push var byte-compile-bound-variables))
|
||||
(`(defvar ,var) (push var cconv--dynbound-variables))
|
||||
(`(,(or 'defconst 'defvar) ,var ,value . ,_)
|
||||
(push var byte-compile-bound-variables)
|
||||
(push var cconv--dynbound-variables)
|
||||
(cconv-analyze-form value env))
|
||||
|
||||
(`(,(or 'funcall 'apply) ,fun . ,args)
|
||||
|
@ -847,5 +828,78 @@ This function does not return anything but instead fills the
|
|||
(setf (nth 1 dv) t))))))
|
||||
(define-obsolete-function-alias 'cconv-analyse-form #'cconv-analyze-form "25.1")
|
||||
|
||||
(defun cconv-fv (form lexvars dynvars)
|
||||
"Return the list of free variables in FORM.
|
||||
LEXVARS is the list of statically scoped vars in the context
|
||||
and DYNVARS is the list of dynamically scoped vars in the context.
|
||||
Returns a pair (LEXV . DYNV) of those vars actually used by FORM."
|
||||
(let* ((fun
|
||||
;; Wrap FORM into a function because the analysis code we
|
||||
;; have only computes freevars for functions.
|
||||
;; In practice FORM is always already of the form
|
||||
;; #'(lambda ...), so optimize for this case.
|
||||
(if (and (eq 'function (car-safe form))
|
||||
(eq 'lambda (car-safe (cadr form)))
|
||||
;; To get correct results, FUN needs to be a "simple lambda"
|
||||
;; without nested forms that aren't part of the body. :-(
|
||||
(not (assq 'interactive (cadr form)))
|
||||
(not (assq ':documentation (cadr form))))
|
||||
form
|
||||
`#'(lambda () ,form)))
|
||||
(analysis-env (mapcar (lambda (v) (list v nil nil nil nil)) lexvars))
|
||||
(cconv--dynbound-variables dynvars)
|
||||
(byte-compile-lexical-variables nil)
|
||||
(cconv--dynbindings nil)
|
||||
(cconv-freevars-alist '())
|
||||
(cconv-var-classification '()))
|
||||
(let* ((body (cddr (cadr fun))))
|
||||
;; Analyze form - fill these variables with new information.
|
||||
(cconv-analyze-form fun analysis-env)
|
||||
(setq cconv-freevars-alist (nreverse cconv-freevars-alist))
|
||||
(unless (equal (if (eq :documentation (car-safe (car body)))
|
||||
(cdr body) body)
|
||||
(caar cconv-freevars-alist))
|
||||
(message "BOOH!\n%S\n%S"
|
||||
body (caar cconv-freevars-alist)))
|
||||
(cl-assert (equal (if (eq :documentation (car-safe (car body)))
|
||||
(cdr body) body)
|
||||
(caar cconv-freevars-alist)))
|
||||
(let ((fvs (nreverse (cdar cconv-freevars-alist)))
|
||||
(dyns (delq nil (mapcar (lambda (var) (car (memq var dynvars)))
|
||||
(delete-dups cconv--dynbindings)))))
|
||||
(cons fvs dyns)))))
|
||||
|
||||
(defun cconv-make-interpreted-closure (fun env)
|
||||
(cl-assert (eq (car-safe fun) 'lambda))
|
||||
(let ((lexvars (delq nil (mapcar #'car-safe env))))
|
||||
(if (null lexvars)
|
||||
;; The lexical environment is empty, so there's no need to
|
||||
;; look for free variables.
|
||||
`(closure ,env . ,(cdr fun))
|
||||
;; We could try and cache the result of the macroexpansion and
|
||||
;; `cconv-fv' analysis. Not sure it's worth the trouble.
|
||||
(let* ((form `#',fun)
|
||||
(expanded-form
|
||||
(let ((lexical-binding t) ;; Tell macros which dialect is in use.
|
||||
;; Make the macro aware of any defvar declarations in scope.
|
||||
(macroexp--dynvars
|
||||
(if macroexp--dynvars
|
||||
(append env macroexp--dynvars) env)))
|
||||
(macroexpand-all form macroexpand-all-environment)))
|
||||
;; Since we macroexpanded the body, we may as well use that.
|
||||
(expanded-fun-cdr
|
||||
(pcase expanded-form
|
||||
(`#'(lambda . ,cdr) cdr)
|
||||
(_ (cdr fun))))
|
||||
|
||||
(dynvars (delq nil (mapcar (lambda (b) (if (symbolp b) b)) env)))
|
||||
(fvs (cconv-fv expanded-form lexvars dynvars))
|
||||
(newenv (nconc (mapcar (lambda (fv) (assq fv env)) (car fvs))
|
||||
(cdr fvs))))
|
||||
;; Never return a nil env, since nil means to use the dynbind
|
||||
;; dialect of ELisp.
|
||||
`(closure ,(or newenv '(t)) . ,expanded-fun-cdr)))))
|
||||
|
||||
|
||||
(provide 'cconv)
|
||||
;;; cconv.el ends here
|
||||
|
|
|
@ -615,12 +615,12 @@ PROPLIST is a list of the sort returned by `symbol-plist'.
|
|||
,(funcall setter
|
||||
`(cl--set-getf ,getter ,k ,val))
|
||||
,val)))))))))
|
||||
(let ((val-tail (cdr-safe (plist-member plist tag))))
|
||||
(let ((val-tail (cdr (plist-member plist tag))))
|
||||
(if val-tail (car val-tail) def)))
|
||||
|
||||
;;;###autoload
|
||||
(defun cl--set-getf (plist tag val)
|
||||
(let ((val-tail (cdr-safe (plist-member plist tag))))
|
||||
(let ((val-tail (cdr (plist-member plist tag))))
|
||||
(if val-tail (progn (setcar val-tail val) plist)
|
||||
(cl-list* tag val plist))))
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ Integer values are handled in the `range' slot.")
|
|||
`comp-common-supertype'.")
|
||||
(subtype-p-mem (make-hash-table :test #'equal) :type hash-table
|
||||
:documentation "Serve memoization for
|
||||
`comp-subtype-p-mem'.")
|
||||
`comp-cstr-ctxt-subtype-p-mem'.")
|
||||
(union-1-mem-no-range (make-hash-table :test #'equal) :type hash-table
|
||||
:documentation "Serve memoization for
|
||||
`comp-cstr-union-1'.")
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
:safe #'integerp
|
||||
:version "28.1")
|
||||
|
||||
(defcustom native-comp-debug (if (eq 'windows-nt system-type) 1 0)
|
||||
(defcustom native-comp-debug 0
|
||||
"Debug level for native compilation, a number between 0 and 3.
|
||||
This is intended for debugging the compiler itself.
|
||||
0 no debug output.
|
||||
|
@ -67,7 +67,7 @@ This is intended for debugging the compiler itself.
|
|||
passes and libgccjit log file."
|
||||
:type 'natnum
|
||||
:safe #'natnump
|
||||
:version "28.1")
|
||||
:version "29.1")
|
||||
|
||||
(defcustom native-comp-verbose 0
|
||||
"Compiler verbosity for native compilation, a number between 0 and 3.
|
||||
|
@ -2057,9 +2057,10 @@ and the annotation emission."
|
|||
"Lexically-scoped FUNCTION."
|
||||
(let ((args (comp-func-l-args function)))
|
||||
(cons (make-comp-mvar :constant (comp-args-base-min args))
|
||||
(make-comp-mvar :constant (if (comp-args-p args)
|
||||
(comp-args-max args)
|
||||
'many)))))
|
||||
(make-comp-mvar :constant (cond
|
||||
((comp-args-p args) (comp-args-max args))
|
||||
((comp-nargs-rest args) 'many)
|
||||
(t (comp-nargs-nonrest args)))))))
|
||||
|
||||
(cl-defmethod comp-prepare-args-for-top-level ((function comp-func-d))
|
||||
"Dynamically scoped FUNCTION."
|
||||
|
@ -3689,8 +3690,7 @@ Prepare every function for final compilation and drive the C back-end."
|
|||
(print-circle t)
|
||||
(print-escape-multibyte t)
|
||||
(expr `((require 'comp)
|
||||
(setf comp-no-spawn t
|
||||
native-comp-verbose ,native-comp-verbose
|
||||
(setf native-comp-verbose ,native-comp-verbose
|
||||
comp-libgccjit-reproducer ,comp-libgccjit-reproducer
|
||||
comp-ctxt ,comp-ctxt
|
||||
native-comp-eln-load-path ',native-comp-eln-load-path
|
||||
|
@ -3716,7 +3716,8 @@ Prepare every function for final compilation and drive the C back-end."
|
|||
(if (zerop
|
||||
(call-process (expand-file-name invocation-name
|
||||
invocation-directory)
|
||||
nil t t "--batch" "-l" temp-file))
|
||||
nil t t "-no-comp-spawn" "--batch" "-l"
|
||||
temp-file))
|
||||
(progn
|
||||
(delete-file temp-file)
|
||||
output)
|
||||
|
@ -3948,7 +3949,6 @@ display a message."
|
|||
source-file (comp-el-to-eln-filename source-file))))
|
||||
do (let* ((expr `((require 'comp)
|
||||
(setq comp-async-compilation t
|
||||
comp-no-spawn t
|
||||
warning-fill-column most-positive-fixnum)
|
||||
,(let ((set (list 'setq)))
|
||||
(dolist (var '(comp-file-preloaded-p
|
||||
|
@ -4005,7 +4005,8 @@ display a message."
|
|||
:command (list
|
||||
(expand-file-name invocation-name
|
||||
invocation-directory)
|
||||
"--batch" "-l" temp-file)
|
||||
"-no-comp-spawn" "--batch" "-l"
|
||||
temp-file)
|
||||
:sentinel
|
||||
(lambda (process _event)
|
||||
(run-hook-with-args
|
||||
|
|
|
@ -201,7 +201,7 @@ This function is modeled after `minibuffer-complete-and-exit'."
|
|||
(if doexit (exit-minibuffer))))
|
||||
|
||||
(defun crm--choose-completion-string (choice buffer base-position
|
||||
&rest ignored)
|
||||
&rest _ignored)
|
||||
"Completion string chooser for `completing-read-multiple'.
|
||||
This is called from `choose-completion-string-functions'.
|
||||
It replaces the string that is currently being completed, without
|
||||
|
|
|
@ -55,21 +55,24 @@
|
|||
:group 'extensions)
|
||||
|
||||
(defcustom eldoc-idle-delay 0.50
|
||||
"Number of seconds of idle time to wait before printing.
|
||||
"Number of seconds of idle time to wait before displaying documentation.
|
||||
If user input arrives before this interval of time has elapsed after the
|
||||
last input, no documentation will be printed.
|
||||
last input event, no documentation will be displayed.
|
||||
|
||||
If this variable is set to 0, no idle time is required."
|
||||
If this variable is set to 0, display the documentation without any delay."
|
||||
:type 'number)
|
||||
|
||||
(defcustom eldoc-print-after-edit nil
|
||||
"If non-nil, eldoc info is only shown when editing.
|
||||
"If non-nil, eldoc info is only shown after editing commands.
|
||||
Changing the value requires toggling `eldoc-mode'."
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom eldoc-echo-area-display-truncation-message t
|
||||
"If non-nil, provide verbose help when a message has been truncated.
|
||||
If nil, truncated messages will just have \"...\" appended."
|
||||
When this is non-nil, and the documentation string was truncated to
|
||||
fit in the echo-area, the documentation will be followed by an
|
||||
explanation of how to display the full documentation text.
|
||||
If nil, truncated messages will just have \"...\" to indicate truncation."
|
||||
:type 'boolean
|
||||
:version "28.1")
|
||||
|
||||
|
@ -93,22 +96,24 @@ Note that this variable has no effect, unless
|
|||
|
||||
(defcustom eldoc-echo-area-use-multiline-p 'truncate-sym-name-if-fit
|
||||
"Allow long ElDoc doc strings to resize echo area display.
|
||||
If value is t, never attempt to truncate messages, even if the
|
||||
echo area must be resized to fit.
|
||||
If the value is t, never attempt to truncate messages, even if the
|
||||
echo area must be resized to fit. In that case, Emacs will resize
|
||||
the mini-window up to the limit set by `max-mini-window-height'.
|
||||
|
||||
If the value is a positive number, it is used to calculate a
|
||||
number of logical lines of documentation that ElDoc is allowed to
|
||||
put in the echo area. If a positive integer, the number is used
|
||||
directly, while a float specifies the number of lines as a
|
||||
proportion of the echo area frame's height.
|
||||
number of screen lines of documentation that ElDoc is allowed to
|
||||
put in the echo area. A positive integer specifies the maximum
|
||||
number of lines directly, while a floating-point number specifies
|
||||
the number of screen lines as a fraction of the echo area frame's
|
||||
height.
|
||||
|
||||
If value is the symbol `truncate-sym-name-if-fit', the part of
|
||||
If the value is the symbol `truncate-sym-name-if-fit', the part of
|
||||
the doc string that represents a symbol's name may be truncated
|
||||
if it will enable the rest of the doc string to fit on a single
|
||||
line, without resizing the echo area.
|
||||
|
||||
If value is nil, a doc string is always truncated to fit in a
|
||||
single line of display in the echo area.
|
||||
If the value is nil, a doc string is always truncated to fit in a
|
||||
single screen line of echo-area display.
|
||||
|
||||
Any resizing of the echo area additionally respects
|
||||
`max-mini-window-height'."
|
||||
|
@ -121,12 +126,12 @@ Any resizing of the echo area additionally respects
|
|||
line" truncate-sym-name-if-fit)))
|
||||
|
||||
(defcustom eldoc-echo-area-prefer-doc-buffer nil
|
||||
"Prefer ElDoc's documentation buffer if it is showing in some frame.
|
||||
"Prefer ElDoc's documentation buffer if it is displayed in some window.
|
||||
If this variable's value is t, ElDoc will skip showing
|
||||
documentation in the echo area if the dedicated documentation
|
||||
buffer (given by `eldoc-doc-buffer') is being displayed in some
|
||||
window. If the value is the symbol `maybe', then the echo area
|
||||
is only skipped if the documentation doesn't fit there."
|
||||
buffer (displayed by `eldoc-doc-buffer') is already displayed in
|
||||
some window. If the value is the symbol `maybe', then the echo area
|
||||
is only skipped if the documentation needs to be truncated there."
|
||||
:type 'boolean)
|
||||
|
||||
(defface eldoc-highlight-function-argument
|
||||
|
@ -287,8 +292,10 @@ reflect the change."
|
|||
(put 'eldoc-mode-line-string 'risky-local-variable t)
|
||||
|
||||
(defun eldoc-minibuffer-message (format-string &rest args)
|
||||
"Display messages in the mode-line when in the minibuffer.
|
||||
Otherwise work like `message'."
|
||||
"Display message specified by FORMAT-STRING and ARGS on the mode-line as needed.
|
||||
This function displays the message produced by formatting ARGS
|
||||
with FORMAT-STRING on the mode line when the current buffer is a minibuffer.
|
||||
Otherwise, it displays the message like `message' would."
|
||||
(if (minibufferp)
|
||||
(progn
|
||||
(add-hook 'minibuffer-exit-hook
|
||||
|
@ -632,8 +639,8 @@ If INTERACTIVE is t, also display the buffer."
|
|||
(when interactive (eldoc-doc-buffer t)))
|
||||
|
||||
(defun eldoc-documentation-default ()
|
||||
"Show first doc string for item at point.
|
||||
Default value for `eldoc-documentation-strategy'."
|
||||
"Show the first non-nil documentation string for item at point.
|
||||
This is the default value for `eldoc-documentation-strategy'."
|
||||
(run-hook-with-args-until-success 'eldoc-documentation-functions
|
||||
(eldoc--make-callback :patient)))
|
||||
|
||||
|
@ -651,18 +658,18 @@ else wait for all doc strings."
|
|||
t)
|
||||
|
||||
(defun eldoc-documentation-compose ()
|
||||
"Show multiple doc strings at once after waiting for all.
|
||||
Meant as a value for `eldoc-documentation-strategy'."
|
||||
"Show multiple documentation strings together after waiting for all of them.
|
||||
This is meant to be used as a value for `eldoc-documentation-strategy'."
|
||||
(eldoc--documentation-compose-1 nil))
|
||||
|
||||
(defun eldoc-documentation-compose-eagerly ()
|
||||
"Show multiple doc strings at once as soon as possible.
|
||||
Meant as a value for `eldoc-documentation-strategy'."
|
||||
"Show multiple documentation strings one by one as soon as possible.
|
||||
This is meant to be used as a value for `eldoc-documentation-strategy'."
|
||||
(eldoc--documentation-compose-1 t))
|
||||
|
||||
(defun eldoc-documentation-enthusiast ()
|
||||
"Show most important doc string produced so far.
|
||||
Meant as a value for `eldoc-documentation-strategy'."
|
||||
"Show most important documentation string produced so far.
|
||||
This is meant to be used as a value for `eldoc-documentation-strategy'."
|
||||
(run-hook-wrapped 'eldoc-documentation-functions
|
||||
(lambda (f)
|
||||
(let* ((callback (eldoc--make-callback :enthusiast))
|
||||
|
@ -692,40 +699,42 @@ Meant as a value for `eldoc-documentation-strategy'."
|
|||
(eldoc--documentation-strategy-defcustom eldoc-documentation-strategy
|
||||
eldoc-documentation-function
|
||||
#'eldoc-documentation-default
|
||||
"How to collect and organize results of `eldoc-documentation-functions'.
|
||||
"How to collect and display results of `eldoc-documentation-functions'.
|
||||
|
||||
This variable controls how `eldoc-documentation-functions', which
|
||||
specifies the sources of documentation, is queried and how its
|
||||
results are organized before being displayed to the user. The
|
||||
following values are allowed:
|
||||
This variable controls how to call the functions in the special hook
|
||||
`eldoc-documentation-functions', and how to organize their results
|
||||
for display to the user. The functions in `eldoc-documentation-functions'
|
||||
are the source of documentation, and act as back-end for ElDoc.
|
||||
|
||||
- `eldoc-documentation-default': calls functions in the special
|
||||
hook in order until one is found that produces a doc string
|
||||
value. Display only that value;
|
||||
The following values are supported:
|
||||
|
||||
- `eldoc-documentation-compose': calls all functions in the
|
||||
special hook and displays all of the resulting doc strings
|
||||
together. Wait for all strings to be ready, and preserve their
|
||||
relative order as specified by the order of functions in the hook;
|
||||
- `eldoc-documentation-default': Call functions in the special
|
||||
hook in order, until one of them returns a non-nil string
|
||||
value. Display only that string.
|
||||
|
||||
- `eldoc-documentation-compose-eagerly': calls all functions in
|
||||
the special hook and displays as many of the resulting doc
|
||||
strings as possible, as soon as possible. Preserves the
|
||||
relative order of doc strings;
|
||||
- `eldoc-documentation-compose': Call all the functions in the
|
||||
special hook and display all of the resulting strings together,
|
||||
after all of the functions were called, and in the order of the
|
||||
functions in the hook.
|
||||
|
||||
- `eldoc-documentation-enthusiast': calls all functions in the
|
||||
special hook and displays only the most important resulting
|
||||
docstring one at any given time. A function appearing first in
|
||||
the special hook is considered more important.
|
||||
- `eldoc-documentation-compose-eagerly': Call all the functions in
|
||||
the special hook, and display each non-nil string as soon as it
|
||||
is returned by a function, before calling the next function.
|
||||
|
||||
This variable can also be set to a function of no args that
|
||||
returns something other than a string or nil and allows for some
|
||||
- `eldoc-documentation-enthusiast': Call all the functions in the
|
||||
special hook, and display only the most important resulting
|
||||
string at any given time. A function appearing first in
|
||||
the special hook is considered more important than those which
|
||||
appear after it.
|
||||
|
||||
This variable can also be set to a function of no arguments that
|
||||
returns something other than a string or nil, and allows for some
|
||||
or all of the special hook `eldoc-documentation-functions' to be
|
||||
run. In that case, the strategy function should follow that
|
||||
other variable's protocol closely and endeavor to display the
|
||||
resulting doc strings itself.
|
||||
other variable's protocol closely and display the resulting doc
|
||||
strings itself.
|
||||
|
||||
For backward compatibility to the \"old\" protocol, this variable
|
||||
For backward compatibility with the \"old\" protocol, this variable
|
||||
can also be set to a function that returns nil or a doc string,
|
||||
depending whether or not there is documentation to display at
|
||||
all."
|
||||
|
|
|
@ -445,16 +445,17 @@ The return value is the last VAL in the list.
|
|||
,v))))))))))
|
||||
|
||||
(gv-define-expander plist-get
|
||||
(lambda (do plist prop)
|
||||
(lambda (do plist prop &optional predicate)
|
||||
(macroexp-let2 macroexp-copyable-p key prop
|
||||
(gv-letplace (getter setter) plist
|
||||
(macroexp-let2 nil p `(cdr (plist-member ,getter ,key))
|
||||
(macroexp-let2 nil p `(cdr (plist-member ,getter ,key ,predicate))
|
||||
(funcall do
|
||||
`(car ,p)
|
||||
(lambda (val)
|
||||
`(if ,p
|
||||
(setcar ,p ,val)
|
||||
,(funcall setter `(cons ,key (cons ,val ,getter)))))))))))
|
||||
,(funcall setter
|
||||
`(cons ,key (cons ,val ,getter)))))))))))
|
||||
|
||||
;;; Some occasionally handy extensions.
|
||||
|
||||
|
|
|
@ -71,7 +71,8 @@
|
|||
(:conc-name hierarchy--))
|
||||
(roots (list)) ; list of the hierarchy roots (no parent)
|
||||
(parents (make-hash-table :test 'equal)) ; map an item to its parent
|
||||
(children (make-hash-table :test 'equal)) ; map an item to its childre
|
||||
(children (make-hash-table :test 'equal)) ; map an item to its children
|
||||
(delaying-parents (make-hash-table :test 'equal)) ; map an item to its childrenfn
|
||||
;; cache containing the set of all items in the hierarchy
|
||||
(seen-items (make-hash-table :test 'equal))) ; map an item to t
|
||||
|
||||
|
@ -133,7 +134,8 @@ keys are :key and :test."
|
|||
"Create a hierarchy and return it."
|
||||
(hierarchy--make))
|
||||
|
||||
(defun hierarchy-add-tree (hierarchy item parentfn &optional childrenfn acceptfn)
|
||||
(defun hierarchy-add-tree (hierarchy item parentfn
|
||||
&optional childrenfn acceptfn delay-children-p)
|
||||
"In HIERARCHY, add ITEM.
|
||||
|
||||
PARENTFN is either nil or a function defining the child-to-parent
|
||||
|
@ -151,27 +153,39 @@ CHILDRENFN are expected to be coherent with each other.
|
|||
|
||||
ACCEPTFN is a function returning non-nil if its parameter (any object)
|
||||
should be an item of the hierarchy. By default, ACCEPTFN returns non-nil
|
||||
if its parameter is non-nil."
|
||||
if its parameter is non-nil.
|
||||
|
||||
DELAY-CHILDREN-P is a predicate determining whether the children that would
|
||||
normally be processed by CHILDRENFN should, instead, have their processing be
|
||||
delayed and stored to be processed by CHILDRENFN when the child is selected
|
||||
during use of the hierarchy."
|
||||
(unless (hierarchy-has-item hierarchy item)
|
||||
(let ((acceptfn (or acceptfn #'identity)))
|
||||
(hierarchy--seen-items-add hierarchy item)
|
||||
(let ((parent (and parentfn (funcall parentfn item))))
|
||||
(when (funcall acceptfn parent)
|
||||
(hierarchy--add-relation hierarchy item parent acceptfn)
|
||||
(hierarchy-add-tree hierarchy parent parentfn childrenfn)))
|
||||
(let ((children (and childrenfn (funcall childrenfn item))))
|
||||
(mapc (lambda (child)
|
||||
(when (funcall acceptfn child)
|
||||
(hierarchy--add-relation hierarchy child item acceptfn)
|
||||
(hierarchy-add-tree hierarchy child parentfn childrenfn)))
|
||||
children)))))
|
||||
(hierarchy-add-tree hierarchy parent
|
||||
parentfn (if delay-children-p nil childrenfn))))
|
||||
(if (and childrenfn delay-children-p)
|
||||
(map-put! (hierarchy--delaying-parents hierarchy) item childrenfn)
|
||||
(let ((children (and childrenfn (funcall childrenfn item))))
|
||||
(map-put! (hierarchy--delaying-parents hierarchy) item nil)
|
||||
(mapc (lambda (child)
|
||||
(when (funcall acceptfn child)
|
||||
(hierarchy--add-relation hierarchy child item acceptfn)
|
||||
(hierarchy-add-tree hierarchy child parentfn childrenfn)))
|
||||
children))))))
|
||||
|
||||
(defun hierarchy-add-trees (hierarchy items parentfn &optional childrenfn acceptfn)
|
||||
(defun hierarchy-add-trees (hierarchy items parentfn
|
||||
&optional childrenfn acceptfn delay-children-p)
|
||||
"Call `hierarchy-add-tree' on HIERARCHY and each element of ITEMS.
|
||||
|
||||
PARENTFN, CHILDRENFN and ACCEPTFN have the same meaning as in `hierarchy-add'."
|
||||
PARENTFN, CHILDRENFN, ACCEPTFN, and DELAY-CHILDREN-P have the same meaning as in
|
||||
`hierarchy-add'."
|
||||
(seq-map (lambda (item)
|
||||
(hierarchy-add-tree hierarchy item parentfn childrenfn acceptfn))
|
||||
(hierarchy-add-tree hierarchy item parentfn
|
||||
childrenfn acceptfn delay-children-p))
|
||||
items))
|
||||
|
||||
(defun hierarchy-add-list (hierarchy list &optional wrap childrenfn)
|
||||
|
@ -541,6 +555,30 @@ nil. The buffer is returned."
|
|||
buffer))
|
||||
|
||||
(declare-function widget-convert "wid-edit")
|
||||
(defun hierarchy--create-delayed-tree-widget (elem labelfn indent childrenfn)
|
||||
"Return a list of tree-widgets for the children generated.
|
||||
|
||||
ELEM is the element of the hierarchy passed from
|
||||
`hierarchy-convert-to-tree-widget'; it and the CHILDRENFN are used to generate
|
||||
the children of the element dynamically.
|
||||
|
||||
LABELFN is the same function passed to `hierarchy-convert-to-tree-widget'.
|
||||
|
||||
INDENT is the same function passed to `hierarchy-convert-to-tree-widget'.
|
||||
|
||||
CHILDRENFN is the function used to discover the children of ELEM."
|
||||
(lambda (_widget)
|
||||
(mapcar
|
||||
(lambda (item)
|
||||
(widget-convert
|
||||
'tree-widget
|
||||
:tag (hierarchy-labelfn-to-string labelfn item indent)
|
||||
:expander (hierarchy--create-delayed-tree-widget
|
||||
item
|
||||
labelfn
|
||||
(1+ indent)
|
||||
childrenfn)))
|
||||
(funcall childrenfn elem))))
|
||||
(defun hierarchy-convert-to-tree-widget (hierarchy labelfn)
|
||||
"Return a tree-widget for HIERARCHY.
|
||||
|
||||
|
@ -550,10 +588,21 @@ node label."
|
|||
(require 'wid-edit)
|
||||
(require 'tree-widget)
|
||||
(hierarchy-map-tree (lambda (item indent children)
|
||||
(widget-convert
|
||||
'tree-widget
|
||||
:tag (hierarchy-labelfn-to-string labelfn item indent)
|
||||
:args children))
|
||||
(let ((childrenfn (map-elt
|
||||
(hierarchy--delaying-parents hierarchy)
|
||||
item)))
|
||||
(apply
|
||||
#'widget-convert
|
||||
(list 'tree-widget
|
||||
:tag (hierarchy-labelfn-to-string labelfn item indent)
|
||||
(if childrenfn :expander :args)
|
||||
(if childrenfn
|
||||
(hierarchy--create-delayed-tree-widget
|
||||
item
|
||||
labelfn
|
||||
(1+ indent)
|
||||
childrenfn)
|
||||
children)))))
|
||||
hierarchy))
|
||||
|
||||
(defun hierarchy-tree-display (hierarchy labelfn &optional buffer)
|
||||
|
|
|
@ -196,18 +196,21 @@ present if the icon is represented by an image."
|
|||
(image-supported-file-p file)
|
||||
(propertize
|
||||
" " 'display
|
||||
(if-let ((height (plist-get keywords :height)))
|
||||
(create-image file
|
||||
nil nil
|
||||
:height (if (eq height 'line)
|
||||
(let ((props
|
||||
(append
|
||||
(if-let ((height (plist-get keywords :height)))
|
||||
(list :height (if (eq height 'line)
|
||||
(window-default-line-height)
|
||||
height)
|
||||
:scale 1
|
||||
:rotation (or (plist-get keywords :rotation) 0)
|
||||
:ascent (if (plist-member keywords :ascent)
|
||||
(plist-get keywords :ascent)
|
||||
'center))
|
||||
(create-image file))))))
|
||||
height)))
|
||||
'(:scale 1)
|
||||
(if-let ((rotation (plist-get keywords :rotation)))
|
||||
(list :rotation rotation))
|
||||
(if-let ((margin (plist-get keywords :margin)))
|
||||
(list :margin margin))
|
||||
(list :ascent (if (plist-member keywords :ascent)
|
||||
(plist-get keywords :ascent)
|
||||
'center)))))
|
||||
(apply 'create-image file nil nil props))))))
|
||||
|
||||
(cl-defmethod icons--create ((_type (eql 'emoji)) icon _keywords)
|
||||
(when-let ((font (and (display-multi-font-p)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Nicolas Petton <nicolas@petton.fr>
|
||||
;; Maintainer: emacs-devel@gnu.org
|
||||
;; Keywords: extensions, lisp
|
||||
;; Version: 3.2.1
|
||||
;; Version: 3.3.1
|
||||
;; Package-Requires: ((emacs "26"))
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
@ -80,48 +80,82 @@ MAP can be an alist, plist, hash-table, or array."
|
|||
`(pcase-let ((,(map--make-pcase-patterns keys) ,map))
|
||||
,@body))
|
||||
|
||||
(eval-when-compile
|
||||
(defmacro map--dispatch (map-var &rest args)
|
||||
"Evaluate one of the forms specified by ARGS based on the type of MAP-VAR.
|
||||
|
||||
The following keyword types are meaningful: `:list',
|
||||
`:hash-table' and `:array'.
|
||||
|
||||
An error is thrown if MAP-VAR is neither a list, hash-table nor array.
|
||||
|
||||
Returns the result of evaluating the form associated with MAP-VAR's type."
|
||||
(declare (debug t) (indent 1))
|
||||
`(cond ((listp ,map-var) ,(plist-get args :list))
|
||||
((hash-table-p ,map-var) ,(plist-get args :hash-table))
|
||||
((arrayp ,map-var) ,(plist-get args :array))
|
||||
(t (error "Unsupported map type `%S': %S"
|
||||
(type-of ,map-var) ,map-var)))))
|
||||
|
||||
(define-error 'map-not-inplace "Cannot modify map in-place")
|
||||
|
||||
(defsubst map--plist-p (list)
|
||||
"Return non-nil if LIST is the start of a nonempty plist map."
|
||||
(and (consp list) (atom (car list))))
|
||||
|
||||
(defconst map--plist-has-predicate
|
||||
(condition-case nil
|
||||
(with-no-warnings (plist-get () nil #'eq) t)
|
||||
(wrong-number-of-arguments))
|
||||
"Non-nil means `plist-get' & co. accept a predicate in Emacs 29+.
|
||||
Note that support for this predicate in map.el is patchy and
|
||||
deprecated.")
|
||||
|
||||
(defun map--plist-member-1 (plist prop &optional predicate)
|
||||
"Compatibility shim for the PREDICATE argument of `plist-member'.
|
||||
Assumes non-nil PLIST satisfies `map--plist-p'."
|
||||
(if (or (memq predicate '(nil eq)) (null plist))
|
||||
(plist-member plist prop)
|
||||
(let ((tail plist) found)
|
||||
(while (and (not (setq found (funcall predicate (car tail) prop)))
|
||||
(consp (setq tail (cdr tail)))
|
||||
(consp (setq tail (cdr tail)))))
|
||||
(and tail (not found)
|
||||
(signal 'wrong-type-argument `(plistp ,plist)))
|
||||
tail)))
|
||||
|
||||
(defalias 'map--plist-member
|
||||
(if map--plist-has-predicate #'plist-member #'map--plist-member-1)
|
||||
"Compatibility shim for `plist-member' in Emacs 29+.
|
||||
\n(fn PLIST PROP &optional PREDICATE)")
|
||||
|
||||
(defun map--plist-put-1 (plist prop val &optional predicate)
|
||||
"Compatibility shim for the PREDICATE argument of `plist-put'.
|
||||
Assumes non-nil PLIST satisfies `map--plist-p'."
|
||||
(if (or (memq predicate '(nil eq)) (null plist))
|
||||
(plist-put plist prop val)
|
||||
(let ((tail plist) prev found)
|
||||
(while (and (consp (cdr tail))
|
||||
(not (setq found (funcall predicate (car tail) prop)))
|
||||
(consp (setq prev tail tail (cddr tail)))))
|
||||
(cond (found (setcar (cdr tail) val))
|
||||
(tail (signal 'wrong-type-argument `(plistp ,plist)))
|
||||
(prev (setcdr (cdr prev) (cons prop (cons val (cddr prev)))))
|
||||
((setq plist (cons prop (cons val plist)))))
|
||||
plist)))
|
||||
|
||||
(defalias 'map--plist-put
|
||||
(if map--plist-has-predicate #'plist-put #'map--plist-put-1)
|
||||
"Compatibility shim for `plist-put' in Emacs 29+.
|
||||
\n(fn PLIST PROP VAL &optional PREDICATE)")
|
||||
|
||||
(cl-defgeneric map-elt (map key &optional default testfn)
|
||||
"Look up KEY in MAP and return its associated value.
|
||||
If KEY is not found, return DEFAULT which defaults to nil.
|
||||
|
||||
TESTFN is the function to use for comparing keys. It is
|
||||
deprecated because its default and valid values depend on the MAP
|
||||
argument. Generally, alist keys are compared with `equal', plist
|
||||
keys with `eq', and hash-table keys with the hash-table's test
|
||||
argument, and it was never consistently supported by the map.el
|
||||
API. Generally, alist keys are compared with `equal', plist keys
|
||||
with `eq', and hash-table keys with the hash-table's test
|
||||
function.
|
||||
|
||||
In the base definition, MAP can be an alist, plist, hash-table,
|
||||
or array."
|
||||
(declare
|
||||
;; `testfn' is deprecated.
|
||||
(advertised-calling-convention (map key &optional default) "27.1")
|
||||
(gv-expander
|
||||
(lambda (do)
|
||||
(gv-letplace (mgetter msetter) `(gv-delay-error ,map)
|
||||
(macroexp-let2* nil
|
||||
;; Eval them once and for all in the right order.
|
||||
((key key) (default default) (testfn testfn))
|
||||
(funcall do `(map-elt ,mgetter ,key ,default)
|
||||
(funcall do
|
||||
`(map-elt ,mgetter ,key ,default ,@(and testfn `(,testfn)))
|
||||
(lambda (v)
|
||||
(macroexp-let2 nil v v
|
||||
`(condition-case nil
|
||||
|
@ -132,19 +166,21 @@ or array."
|
|||
,(funcall msetter
|
||||
`(map-insert ,mgetter ,key ,v))
|
||||
;; Always return the value.
|
||||
,v)))))))))
|
||||
;; `testfn' is deprecated.
|
||||
(advertised-calling-convention (map key &optional default) "27.1"))
|
||||
;; Can't use `cl-defmethod' with `advertised-calling-convention'.
|
||||
(map--dispatch map
|
||||
:list (if (map--plist-p map)
|
||||
(let ((res (plist-member map key)))
|
||||
(if res (cadr res) default))
|
||||
(alist-get key map default nil (or testfn #'equal)))
|
||||
:hash-table (gethash key map default)
|
||||
:array (if (map-contains-key map key)
|
||||
(aref map key)
|
||||
default)))
|
||||
,v)))))))))))
|
||||
|
||||
(cl-defmethod map-elt ((map list) key &optional default testfn)
|
||||
(if (map--plist-p map)
|
||||
(let ((res (map--plist-member map key testfn)))
|
||||
(if res (cadr res) default))
|
||||
(alist-get key map default nil (or testfn #'equal))))
|
||||
|
||||
(cl-defmethod map-elt ((map hash-table) key &optional default _testfn)
|
||||
(gethash key map default))
|
||||
|
||||
(cl-defmethod map-elt ((map array) key &optional default _testfn)
|
||||
(if (map-contains-key map key)
|
||||
(aref map key)
|
||||
default))
|
||||
|
||||
(defmacro map-put (map key value &optional testfn)
|
||||
"Associate KEY with VALUE in MAP and return VALUE.
|
||||
|
@ -154,8 +190,12 @@ When MAP is an alist, test equality with TESTFN if non-nil,
|
|||
otherwise use `equal'.
|
||||
|
||||
MAP can be an alist, plist, hash-table, or array."
|
||||
(declare (obsolete "use map-put! or (setf (map-elt ...) ...) instead" "27.1"))
|
||||
`(setf (map-elt ,map ,key nil ,testfn) ,value))
|
||||
(declare
|
||||
(obsolete "use `map-put!' or `(setf (map-elt ...) ...)' instead." "27.1"))
|
||||
(if testfn
|
||||
`(with-no-warnings
|
||||
(setf (map-elt ,map ,key nil ,testfn) ,value))
|
||||
`(setf (map-elt ,map ,key) ,value)))
|
||||
|
||||
(defun map--plist-delete (map key)
|
||||
(let ((tail map) last)
|
||||
|
@ -338,15 +378,16 @@ The default implementation delegates to `map-length'."
|
|||
"Return non-nil if and only if MAP contains KEY.
|
||||
TESTFN is deprecated. Its default depends on MAP.
|
||||
The default implementation delegates to `map-some'."
|
||||
(declare (advertised-calling-convention (map key) "27.1"))
|
||||
(unless testfn (setq testfn #'equal))
|
||||
(map-some (lambda (k _v) (funcall testfn key k)) map))
|
||||
|
||||
(cl-defmethod map-contains-key ((map list) key &optional testfn)
|
||||
"Return non-nil if MAP contains KEY.
|
||||
If MAP is an alist, TESTFN defaults to `equal'.
|
||||
If MAP is a plist, `plist-member' is used instead."
|
||||
If MAP is a plist, TESTFN defaults to `eq'."
|
||||
(if (map--plist-p map)
|
||||
(plist-member map key)
|
||||
(map--plist-member map key testfn)
|
||||
(let ((v '(nil)))
|
||||
(not (eq v (alist-get key map v nil (or testfn #'equal)))))))
|
||||
|
||||
|
@ -459,24 +500,30 @@ This operates by modifying MAP in place.
|
|||
If it cannot do that, it signals a `map-not-inplace' error.
|
||||
To insert an element without modifying MAP, use `map-insert'."
|
||||
;; `testfn' only exists for backward compatibility with `map-put'!
|
||||
(declare (advertised-calling-convention (map key value) "27.1"))
|
||||
;; Can't use `cl-defmethod' with `advertised-calling-convention'.
|
||||
(map--dispatch
|
||||
map
|
||||
:list
|
||||
(progn
|
||||
(if (map--plist-p map)
|
||||
(plist-put map key value)
|
||||
(let ((oldmap map))
|
||||
(setf (alist-get key map key nil (or testfn #'equal)) value)
|
||||
(unless (eq oldmap map)
|
||||
(signal 'map-not-inplace (list oldmap)))))
|
||||
;; Always return the value.
|
||||
value)
|
||||
:hash-table (puthash key value map)
|
||||
;; FIXME: If `key' is too large, should we signal `map-not-inplace'
|
||||
;; and let `map-insert' grow the array?
|
||||
:array (aset map key value)))
|
||||
(declare (advertised-calling-convention (map key value) "27.1")))
|
||||
|
||||
(cl-defmethod map-put! ((map list) key value &optional testfn)
|
||||
(if (map--plist-p map)
|
||||
(map--plist-put map key value testfn)
|
||||
(let ((oldmap map))
|
||||
(setf (alist-get key map key nil (or testfn #'equal)) value)
|
||||
(unless (eq oldmap map)
|
||||
(signal 'map-not-inplace (list oldmap)))))
|
||||
;; Always return the value.
|
||||
value)
|
||||
|
||||
(cl-defmethod map-put! ((map hash-table) key value &optional _testfn)
|
||||
(puthash key value map))
|
||||
|
||||
(cl-defmethod map-put! ((map array) key value &optional _testfn)
|
||||
;; FIXME: If `key' is too large, should we signal `map-not-inplace'
|
||||
;; and let `map-insert' grow the array?
|
||||
(aset map key value))
|
||||
|
||||
;; There shouldn't be old source code referring to `map--put', yet we do
|
||||
;; need to keep it for backward compatibility with .elc files where the
|
||||
;; expansion of `setf' may call this function.
|
||||
(define-obsolete-function-alias 'map--put #'map-put! "27.1")
|
||||
|
||||
(cl-defgeneric map-insert (map key value)
|
||||
"Return a new map like MAP except that it associates KEY with VALUE.
|
||||
|
@ -493,11 +540,6 @@ The default implementation defaults to `map-copy' and `map-put!'."
|
|||
(cons key (cons value map))
|
||||
(cons (cons key value) map)))
|
||||
|
||||
;; There shouldn't be old source code referring to `map--put', yet we do
|
||||
;; need to keep it for backward compatibility with .elc files where the
|
||||
;; expansion of `setf' may call this function.
|
||||
(define-obsolete-function-alias 'map--put #'map-put! "27.1")
|
||||
|
||||
(cl-defmethod map-apply (function (map list))
|
||||
(if (map--plist-p map)
|
||||
(cl-call-next-method)
|
||||
|
|
|
@ -872,8 +872,7 @@ byte-compilation of the new package to fail."
|
|||
If DEPS is non-nil, also activate its dependencies (unless they
|
||||
are already activated).
|
||||
If RELOAD is non-nil, also `load' any files inside the package which
|
||||
correspond to previously loaded files (those returned by
|
||||
`package--list-loaded-files')."
|
||||
correspond to previously loaded files."
|
||||
(let* ((name (package-desc-name pkg-desc))
|
||||
(pkg-dir (package-desc-dir pkg-desc)))
|
||||
(unless pkg-dir
|
||||
|
|
|
@ -211,6 +211,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
|
|||
|
||||
(defvar reb-valid-string ""
|
||||
"String in mode line showing validity of RE.")
|
||||
(put 'reb-valid-string 'risky-local-variable t)
|
||||
|
||||
(defconst reb-buffer "*RE-Builder*"
|
||||
"Buffer to use for the RE Builder.")
|
||||
|
@ -308,13 +309,13 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
|
|||
"Return t if display is capable of displaying colors."
|
||||
(eq 'color (frame-parameter nil 'display-type)))
|
||||
|
||||
(defsubst reb-lisp-syntax-p ()
|
||||
(defun reb-lisp-syntax-p ()
|
||||
"Return non-nil if RE Builder uses `rx' syntax."
|
||||
(eq reb-re-syntax 'rx))
|
||||
|
||||
(defmacro reb-target-binding (symbol)
|
||||
(defun reb-target-value (symbol)
|
||||
"Return binding for SYMBOL in the RE Builder target buffer."
|
||||
`(with-current-buffer reb-target-buffer ,symbol))
|
||||
(buffer-local-value symbol reb-target-buffer))
|
||||
|
||||
(defun reb-initialize-buffer ()
|
||||
"Initialize the current buffer as a RE Builder buffer."
|
||||
|
@ -440,7 +441,7 @@ provided in the Commentary section of this library."
|
|||
(interactive)
|
||||
(reb-update-regexp)
|
||||
(let ((re (with-output-to-string
|
||||
(print (reb-target-binding reb-regexp)))))
|
||||
(print (reb-target-value 'reb-regexp)))))
|
||||
(setq re (substring re 1 (1- (length re))))
|
||||
(setq re (string-replace "\n" "\\n" re))
|
||||
(kill-new re)
|
||||
|
@ -518,12 +519,17 @@ An actual update is only done if the regexp has changed or if the
|
|||
optional fourth argument FORCE is non-nil."
|
||||
(let ((prev-valid reb-valid-string)
|
||||
(new-valid
|
||||
(condition-case nil
|
||||
(condition-case err
|
||||
(progn
|
||||
(when (or (reb-update-regexp) force)
|
||||
(reb-do-update))
|
||||
"")
|
||||
(error " *invalid*"))))
|
||||
(error (propertize
|
||||
(format " %s"
|
||||
(if (and (consp (cdr err)) (stringp (cadr err)))
|
||||
(format "%s: %s" (car err) (cadr err))
|
||||
(car err)))
|
||||
'face 'font-lock-warning-face)))))
|
||||
(setq reb-valid-string new-valid)
|
||||
(force-mode-line-update)
|
||||
|
||||
|
@ -554,7 +560,7 @@ optional fourth argument FORCE is non-nil."
|
|||
(if reb-subexp-mode
|
||||
(format " (subexp %s)" (or reb-subexp-displayed "-"))
|
||||
"")
|
||||
(if (not (reb-target-binding case-fold-search))
|
||||
(if (not (reb-target-value 'case-fold-search))
|
||||
" Case"
|
||||
"")))
|
||||
(force-mode-line-update))
|
||||
|
@ -600,7 +606,7 @@ optional fourth argument FORCE is non-nil."
|
|||
|
||||
(defun reb-insert-regexp ()
|
||||
"Insert current RE."
|
||||
(let ((re (or (reb-target-binding reb-regexp)
|
||||
(let ((re (or (reb-target-value 'reb-regexp)
|
||||
(reb-empty-regexp))))
|
||||
(cond ((eq reb-re-syntax 'read)
|
||||
(print re (current-buffer)))
|
||||
|
@ -608,7 +614,7 @@ optional fourth argument FORCE is non-nil."
|
|||
(insert "\n\"" re "\""))
|
||||
;; For the Lisp syntax we need the "source" of the regexp
|
||||
((reb-lisp-syntax-p)
|
||||
(insert (or (reb-target-binding reb-regexp-src)
|
||||
(insert (or (reb-target-value 'reb-regexp-src)
|
||||
(reb-empty-regexp)))))))
|
||||
|
||||
(defun reb-cook-regexp (re)
|
||||
|
@ -627,9 +633,8 @@ Return t if the (cooked) expression changed."
|
|||
(prog1
|
||||
(not (string= oldre re))
|
||||
(setq reb-regexp re)
|
||||
;; Only update the source re for the lisp formats
|
||||
(when (reb-lisp-syntax-p)
|
||||
(setq reb-regexp-src re-src)))))))
|
||||
;; Update the source re for the Lisp formats.
|
||||
(setq reb-regexp-src re-src))))))
|
||||
|
||||
|
||||
;; And now the real core of the whole thing
|
||||
|
@ -644,7 +649,7 @@ Return t if the (cooked) expression changed."
|
|||
(defun reb-update-overlays (&optional subexp)
|
||||
"Switch to `reb-target-buffer' and mark all matches of `reb-regexp'.
|
||||
If SUBEXP is non-nil mark only the corresponding sub-expressions."
|
||||
(let* ((re (reb-target-binding reb-regexp))
|
||||
(let* ((re (reb-target-value 'reb-regexp))
|
||||
(subexps (reb-count-subexps re))
|
||||
(matches 0)
|
||||
(submatches 0)
|
||||
|
|
|
@ -374,7 +374,7 @@ Optional arg POS is a buffer position where to look for a fake header;
|
|||
defaults to `point-min'."
|
||||
(overlays-at (or pos (point-min))))
|
||||
|
||||
(defun tabulated-list-revert (&rest ignored)
|
||||
(defun tabulated-list-revert (&rest _ignored)
|
||||
"The `revert-buffer-function' for `tabulated-list-mode'.
|
||||
It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'."
|
||||
(interactive)
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
;; You can customize the prefix and the face used to display it,
|
||||
;; `erc-capab-identify-unidentified'. If the value of
|
||||
;; `erc-capab-identify-prefix' is nil or you disable this module (see
|
||||
;; `erc-capab-identify-disable'), no prefix will be inserted, but the
|
||||
;; `erc-capab-identify-activated'), no prefix will be inserted, but the
|
||||
;; flag sent by the server will still be stripped.
|
||||
|
||||
;;; Code:
|
||||
|
|
|
@ -1256,7 +1256,7 @@ Signal an error when the network cannot be determined."
|
|||
;; but aren't being proxied through to a real network. The
|
||||
;; service may send a 422 but no NETWORK param (or *any* 005s).
|
||||
(let ((m (concat "Failed to determine network. Please set entry for "
|
||||
erc-server-announced-name " in `erc-network-alist'.")))
|
||||
erc-server-announced-name " in `erc-networks-alist'.")))
|
||||
(erc-display-error-notice parsed m)
|
||||
(erc-error "Failed to determine network"))) ; beep
|
||||
(setq erc-network name))
|
||||
|
|
|
@ -635,13 +635,10 @@ of `with-connection-local-variables'.")
|
|||
(defsubst connection-local-normalize-criteria (criteria)
|
||||
"Normalize plist CRITERIA according to properties.
|
||||
Return a reordered plist."
|
||||
(apply
|
||||
#'append
|
||||
(mapcar
|
||||
(lambda (property)
|
||||
(when (and (plist-member criteria property) (plist-get criteria property))
|
||||
(list property (plist-get criteria property))))
|
||||
'(:application :protocol :user :machine))))
|
||||
(mapcan (lambda (property)
|
||||
(let ((value (plist-get criteria property)))
|
||||
(and value (list property value))))
|
||||
'(:application :protocol :user :machine)))
|
||||
|
||||
(defsubst connection-local-get-profiles (criteria)
|
||||
"Return the connection profiles list for CRITERIA.
|
||||
|
|
|
@ -3863,7 +3863,7 @@ If these settings come from directory-local variables, then
|
|||
DIR-NAME is the name of the associated directory. Otherwise it is nil."
|
||||
;; Find those variables that we may want to save to
|
||||
;; `safe-local-variable-values'.
|
||||
(let (all-vars risky-vars unsafe-vars ignored)
|
||||
(let (all-vars risky-vars unsafe-vars)
|
||||
(dolist (elt variables)
|
||||
(let ((var (car elt))
|
||||
(val (cdr elt)))
|
||||
|
|
|
@ -1301,7 +1301,7 @@ non-first windows in Follow mode."
|
|||
"The buffer current at the last call to `follow-adjust-window' or nil.
|
||||
`follow-mode' is not necessarily enabled in this buffer.")
|
||||
|
||||
;; This function is added to `pre-display-function' and is thus called
|
||||
;; This function is added to `pre-redisplay-function' and is thus called
|
||||
;; before each redisplay operation. It supersedes (2018-09) the
|
||||
;; former use of the post command hook, and now does the right thing
|
||||
;; when a program calls `redisplay' or `sit-for'.
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
(eval-when-compile (require 'cl-lib))
|
||||
(defvar tool-bar-map)
|
||||
(defvar w3m-minor-mode-map)
|
||||
|
||||
(require 'gnus)
|
||||
(require 'gnus-sum)
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
;; http://thread.gmane.org/v9fxx9fkm4.fsf@marauder.physik.uni-ulm.de
|
||||
|
||||
;; FIXME: Check if `gnus-bookmark.el' should use
|
||||
;; `bookmark-make-cell-function'.
|
||||
;; `bookmark-make-record-function'.
|
||||
;; Cf. http://article.gmane.org/gmane.emacs.gnus.general/66076
|
||||
|
||||
(defgroup gnus-bookmark nil
|
||||
|
|
|
@ -41,10 +41,7 @@ The following commands are available:\\<widget-keymap>
|
|||
\\[widget-forward] Move to next button or editable field.
|
||||
\\[widget-backward] Move to previous button or editable field.
|
||||
\\[widget-button-click] Activate button under the mouse pointer.
|
||||
\\[widget-button-press] Activate button under point.
|
||||
|
||||
Entry to this mode calls the value of `gnus-custom-mode-hook'
|
||||
if that value is non-nil."
|
||||
\\[widget-button-press] Activate button under point."
|
||||
(use-local-map widget-keymap)
|
||||
;; Emacs stuff:
|
||||
(when (and (facep 'custom-button-face)
|
||||
|
|
|
@ -1810,7 +1810,7 @@ where unread is an integer count of calculated unread
|
|||
messages (or nil), and info is a regular gnus info entry.
|
||||
|
||||
The info element is shared with the same element of
|
||||
`gnus-newrc-alist', so as to conserve space."
|
||||
`gnus-newsrc-alist', so as to conserve space."
|
||||
(let ((alist gnus-newsrc-alist)
|
||||
(ohashtb gnus-newsrc-hashtb)
|
||||
info method gname rest methods)
|
||||
|
|
|
@ -4385,7 +4385,7 @@ it is left unchanged."
|
|||
(setq method (or (cdr server) res))
|
||||
(throw 'exit nil))))
|
||||
((and (stringp (car server))
|
||||
(string= (car server) from))
|
||||
(string-equal-ignore-case (car server) from))
|
||||
(setq method (cdr server))
|
||||
(throw 'exit nil)))))
|
||||
(when method
|
||||
|
|
|
@ -189,24 +189,8 @@ If TYPE is `text/plain' CRLF->LF translation may occur."
|
|||
(quoted-printable-decode-region (point-min) (point-max))
|
||||
t)
|
||||
((eq encoding 'base64)
|
||||
(base64-decode-region
|
||||
(point-min)
|
||||
(save-excursion
|
||||
;; Some mailers insert whitespace junk at the end which
|
||||
;; base64-decode-region dislikes.
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^[\t ]*\r?\n" nil t)
|
||||
(delete-region (match-beginning 0) (match-end 0)))
|
||||
;; Also ignore junk which could have been added by
|
||||
;; mailing list software by finding the final line with
|
||||
;; base64 text.
|
||||
(goto-char (point-max))
|
||||
(beginning-of-line)
|
||||
(while (and (not (mm-base64-line-p))
|
||||
(not (bobp)))
|
||||
(forward-line -1))
|
||||
(forward-line 1)
|
||||
(point))))
|
||||
;; MIME says to ignore any non-base64 junk
|
||||
(base64-decode-region (point-min) (point-max) nil t))
|
||||
((memq encoding '(nil 7bit 8bit binary))
|
||||
;; Do nothing.
|
||||
t)
|
||||
|
|
|
@ -152,7 +152,7 @@ certificate."
|
|||
(defcustom smime-CA-file (car (gnutls-trustfiles))
|
||||
"File containing certificates for CAs you trust.
|
||||
The file should contain certificates in PEM format. By default,
|
||||
this is initialized from the `gnutls-trusfiles' variable."
|
||||
this is initialized from the `gnutls-trustfiles' variable."
|
||||
:version "29.1"
|
||||
:type '(choice (const :tag "none" nil)
|
||||
file))
|
||||
|
|
112
lisp/help.el
112
lisp/help.el
|
@ -55,66 +55,68 @@
|
|||
This variable is bound to t during the preparation of a *Help*
|
||||
buffer.")
|
||||
|
||||
(defvar help-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (char-to-string help-char) 'help-for-help)
|
||||
(define-key map [help] 'help-for-help)
|
||||
(define-key map [f1] 'help-for-help)
|
||||
(define-key map "." 'display-local-help)
|
||||
(define-key map "?" 'help-for-help)
|
||||
(defun help-key ()
|
||||
"Return `help-char' in a format suitable for the `keymap-set' KEY argument."
|
||||
(key-description (char-to-string help-char)))
|
||||
|
||||
(define-key map "\C-a" 'about-emacs)
|
||||
(define-key map "\C-c" 'describe-copying)
|
||||
(define-key map "\C-d" 'view-emacs-debugging)
|
||||
(define-key map "\C-e" 'view-external-packages)
|
||||
(define-key map "\C-f" 'view-emacs-FAQ)
|
||||
(define-key map "\C-m" 'view-order-manuals)
|
||||
(define-key map "\C-n" 'view-emacs-news)
|
||||
(define-key map "\C-o" 'describe-distribution)
|
||||
(define-key map "\C-p" 'view-emacs-problems)
|
||||
(define-key map "\C-s" 'search-forward-help-for-help)
|
||||
(define-key map "\C-t" 'view-emacs-todo)
|
||||
(define-key map "\C-w" 'describe-no-warranty)
|
||||
(defvar-keymap help-map
|
||||
:doc "Keymap for characters following the Help key."
|
||||
(help-key) #'help-for-help
|
||||
"<help>" #'help-for-help
|
||||
"<f1>" #'help-for-help
|
||||
"." #'display-local-help
|
||||
"?" #'help-for-help
|
||||
|
||||
;; This does not fit the pattern, but it is natural given the C-\ command.
|
||||
(define-key map "\C-\\" 'describe-input-method)
|
||||
"C-a" #'about-emacs
|
||||
"C-c" #'describe-copying
|
||||
"C-d" #'view-emacs-debugging
|
||||
"C-e" #'view-external-packages
|
||||
"C-f" #'view-emacs-FAQ
|
||||
"RET" #'view-order-manuals
|
||||
"C-n" #'view-emacs-news
|
||||
"C-o" #'describe-distribution
|
||||
"C-p" #'view-emacs-problems
|
||||
"C-s" #'search-forward-help-for-help
|
||||
"C-t" #'view-emacs-todo
|
||||
"C-w" #'describe-no-warranty
|
||||
|
||||
(define-key map "C" 'describe-coding-system)
|
||||
(define-key map "F" 'Info-goto-emacs-command-node)
|
||||
(define-key map "I" 'describe-input-method)
|
||||
(define-key map "K" 'Info-goto-emacs-key-command-node)
|
||||
(define-key map "L" 'describe-language-environment)
|
||||
(define-key map "S" 'info-lookup-symbol)
|
||||
;; This does not fit the pattern, but it is natural given the C-\ command.
|
||||
"C-\\" #'describe-input-method
|
||||
|
||||
(define-key map "a" 'apropos-command)
|
||||
(define-key map "b" 'describe-bindings)
|
||||
(define-key map "c" 'describe-key-briefly)
|
||||
(define-key map "d" 'apropos-documentation)
|
||||
(define-key map "e" 'view-echo-area-messages)
|
||||
(define-key map "f" 'describe-function)
|
||||
(define-key map "g" 'describe-gnu-project)
|
||||
(define-key map "h" 'view-hello-file)
|
||||
"C" #'describe-coding-system
|
||||
"F" #'Info-goto-emacs-command-node
|
||||
"I" #'describe-input-method
|
||||
"K" #'Info-goto-emacs-key-command-node
|
||||
"L" #'describe-language-environment
|
||||
"S" #'info-lookup-symbol
|
||||
|
||||
(define-key map "i" 'info)
|
||||
(define-key map "4i" 'info-other-window)
|
||||
"a" #'apropos-command
|
||||
"b" #'describe-bindings
|
||||
"c" #'describe-key-briefly
|
||||
"d" #'apropos-documentation
|
||||
"e" #'view-echo-area-messages
|
||||
"f" #'describe-function
|
||||
"g" #'describe-gnu-project
|
||||
"h" #'view-hello-file
|
||||
|
||||
(define-key map "k" 'describe-key)
|
||||
(define-key map "l" 'view-lossage)
|
||||
(define-key map "m" 'describe-mode)
|
||||
(define-key map "o" 'describe-symbol)
|
||||
(define-key map "n" 'view-emacs-news)
|
||||
(define-key map "p" 'finder-by-keyword)
|
||||
(define-key map "P" 'describe-package)
|
||||
(define-key map "r" 'info-emacs-manual)
|
||||
(define-key map "R" 'info-display-manual)
|
||||
(define-key map "s" 'describe-syntax)
|
||||
(define-key map "t" 'help-with-tutorial)
|
||||
(define-key map "v" 'describe-variable)
|
||||
(define-key map "w" 'where-is)
|
||||
(define-key map "x" 'describe-command)
|
||||
(define-key map "q" 'help-quit-or-quick)
|
||||
map)
|
||||
"Keymap for characters following the Help key.")
|
||||
"i" #'info
|
||||
"4 i" #'info-other-window
|
||||
|
||||
"k" #'describe-key
|
||||
"l" #'view-lossage
|
||||
"m" #'describe-mode
|
||||
"o" #'describe-symbol
|
||||
"n" #'view-emacs-news
|
||||
"p" #'finder-by-keyword
|
||||
"P" #'describe-package
|
||||
"r" #'info-emacs-manual
|
||||
"R" #'info-display-manual
|
||||
"s" #'describe-syntax
|
||||
"t" #'help-with-tutorial
|
||||
"v" #'describe-variable
|
||||
"w" #'where-is
|
||||
"x" #'describe-command
|
||||
"q" #'help-quit-or-quick)
|
||||
|
||||
(define-key global-map (char-to-string help-char) 'help-command)
|
||||
(define-key global-map [help] 'help-command)
|
||||
|
@ -745,7 +747,7 @@ or a buffer name."
|
|||
(setq-local outline-level (lambda () 1))
|
||||
(setq-local outline-minor-mode-cycle t
|
||||
outline-minor-mode-highlight t
|
||||
outline-minor-mode-insert-buttons t)
|
||||
outline-minor-mode-use-buttons 'insert)
|
||||
(outline-minor-mode 1)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
|
|
|
@ -139,7 +139,7 @@ See `icomplete-delay-completions-threshold'."
|
|||
|
||||
(defvar icomplete-in-buffer nil
|
||||
"If non-nil, also use Icomplete when completing in non-mini buffers.
|
||||
This affects commands like `complete-in-region', but not commands
|
||||
This affects commands like `completion-in-region', but not commands
|
||||
that use their own completions setup.")
|
||||
|
||||
(defcustom icomplete-minibuffer-setup-hook nil
|
||||
|
|
|
@ -3915,7 +3915,7 @@ If `ido-change-word-sub' cannot be found in WORD, return nil."
|
|||
"Return dotted pair (RES . 1)."
|
||||
(cons res 1))
|
||||
|
||||
(defun ido-choose-completion-string (choice &rest ignored)
|
||||
(defun ido-choose-completion-string (choice &rest _ignored)
|
||||
(when (ido-active)
|
||||
;; Insert the completion into the buffer where completion was requested.
|
||||
(and ido-completion-buffer
|
||||
|
|
|
@ -216,7 +216,7 @@ Each item has the form (ORIGINAL-FILE TARGET-FILE).")
|
|||
"Maximum number of concurrent jobs permitted for generating images.
|
||||
Increase at own risk. If you want to experiment with this,
|
||||
consider setting `image-dired-debug' to a non-nil value to see
|
||||
the time spent on generating thumbnails. Run `image-clear-cache'
|
||||
the time spent on generating thumbnails. Run `clear-image-cache'
|
||||
and remove the cached thumbnail files between each trial run.")
|
||||
|
||||
(defun image-dired-pngnq-thumb (spec)
|
||||
|
|
|
@ -1883,6 +1883,9 @@ See `completing-read' for a description of arguments and usage."
|
|||
(t (complete-with-action
|
||||
code Info-read-node-completion-table string predicate))))
|
||||
|
||||
(defvar Info-minibuf-history nil
|
||||
"History for `Info-read-node-name'.")
|
||||
|
||||
;; Arrange to highlight the proper letters in the completion list buffer.
|
||||
(defun Info-read-node-name (prompt &optional default)
|
||||
"Read an Info node name with completion, prompting with PROMPT.
|
||||
|
@ -2481,7 +2484,6 @@ Table of contents is created from the tree structure of menus."
|
|||
(sections '(("Top" "Top")))
|
||||
nodes subfiles)
|
||||
(while (or main-file subfiles)
|
||||
;; (or main-file (message "Searching subfile %s..." (car subfiles)))
|
||||
(erase-buffer)
|
||||
(info-insert-file-contents (or main-file (car subfiles)))
|
||||
(goto-char (point-min))
|
||||
|
@ -2540,7 +2542,6 @@ Table of contents is created from the tree structure of menus."
|
|||
(setq subfiles (nreverse subfiles)
|
||||
main-file nil))
|
||||
(setq subfiles (cdr subfiles))))
|
||||
(message "")
|
||||
(nreverse nodes))))
|
||||
|
||||
(defun Info-toc-nodes (filename)
|
||||
|
|
|
@ -1208,6 +1208,16 @@ Arguments are the same as `set-language-info'."
|
|||
(list 'const lang))
|
||||
(sort (mapcar 'car language-info-alist) 'string<))))))
|
||||
|
||||
(defun set-language-info-setup-keymap (lang-env alist describe-map setup-map)
|
||||
"Setup menu items for LANG-ENV.
|
||||
See `set-language-info-alist' for details of other arguments."
|
||||
(let ((doc (assq 'documentation alist)))
|
||||
(when doc
|
||||
(define-key-after describe-map (vector (intern lang-env))
|
||||
(cons lang-env 'describe-specified-language-support))))
|
||||
(define-key-after setup-map (vector (intern lang-env))
|
||||
(cons lang-env 'setup-specified-language-environment)))
|
||||
|
||||
(defun set-language-info-alist (lang-env alist &optional parents)
|
||||
"Store ALIST as the definition of language environment LANG-ENV.
|
||||
ALIST is an alist of KEY and INFO values. See the documentation of
|
||||
|
@ -1222,51 +1232,44 @@ in the European submenu in each of those two menus."
|
|||
(setq lang-env (symbol-name lang-env)))
|
||||
((stringp lang-env)
|
||||
(setq lang-env (purecopy lang-env))))
|
||||
(let ((describe-map describe-language-environment-map)
|
||||
(setup-map setup-language-environment-map))
|
||||
(if parents
|
||||
(let ((l parents)
|
||||
map parent-symbol parent prompt)
|
||||
(while l
|
||||
(if (symbolp (setq parent-symbol (car l)))
|
||||
(setq parent (symbol-name parent))
|
||||
(setq parent parent-symbol parent-symbol (intern parent)))
|
||||
(setq map (lookup-key describe-map (vector parent-symbol)))
|
||||
;; This prompt string is for define-prefix-command, so
|
||||
;; that the map it creates will be suitable for a menu.
|
||||
(or map (setq prompt (format "%s Environment" parent)))
|
||||
(if (not map)
|
||||
(progn
|
||||
(setq map (intern (format "describe-%s-environment-map"
|
||||
(downcase parent))))
|
||||
(define-prefix-command map nil prompt)
|
||||
(define-key-after describe-map (vector parent-symbol)
|
||||
(cons parent map))))
|
||||
(setq describe-map (symbol-value map))
|
||||
(setq map (lookup-key setup-map (vector parent-symbol)))
|
||||
(if (not map)
|
||||
(progn
|
||||
(setq map (intern (format "setup-%s-environment-map"
|
||||
(downcase parent))))
|
||||
(define-prefix-command map nil prompt)
|
||||
(define-key-after setup-map (vector parent-symbol)
|
||||
(cons parent map))))
|
||||
(setq setup-map (symbol-value map))
|
||||
(setq l (cdr l)))))
|
||||
|
||||
;; Set up menu items for this language env.
|
||||
(let ((doc (assq 'documentation alist)))
|
||||
(when doc
|
||||
(define-key-after describe-map (vector (intern lang-env))
|
||||
(cons lang-env 'describe-specified-language-support))))
|
||||
(define-key-after setup-map (vector (intern lang-env))
|
||||
(cons lang-env 'setup-specified-language-environment))
|
||||
|
||||
(dolist (elt alist)
|
||||
(set-language-info-internal lang-env (car elt) (cdr elt)))
|
||||
|
||||
(if (equal lang-env current-language-environment)
|
||||
(set-language-environment lang-env))))
|
||||
(if parents
|
||||
(while parents
|
||||
(let (describe-map setup-map parent-symbol parent prompt)
|
||||
(if (symbolp (setq parent-symbol (car parents)))
|
||||
(setq parent (symbol-name parent))
|
||||
(setq parent parent-symbol parent-symbol (intern parent)))
|
||||
(setq describe-map (lookup-key describe-language-environment-map
|
||||
(vector parent-symbol)))
|
||||
;; This prompt string is for define-prefix-command, so
|
||||
;; that the map it creates will be suitable for a menu.
|
||||
(or describe-map (setq prompt (format "%s Environment" parent)))
|
||||
(unless describe-map
|
||||
(setq describe-map (intern (format "describe-%s-environment-map"
|
||||
(downcase parent))))
|
||||
(define-prefix-command describe-map nil prompt)
|
||||
(define-key-after
|
||||
describe-language-environment-map
|
||||
(vector parent-symbol) (cons parent describe-map)))
|
||||
(setq setup-map (lookup-key setup-language-environment-map
|
||||
(vector parent-symbol)))
|
||||
(unless setup-map
|
||||
(setq setup-map (intern (format "setup-%s-environment-map"
|
||||
(downcase parent))))
|
||||
(define-prefix-command setup-map nil prompt)
|
||||
(define-key-after
|
||||
setup-language-environment-map
|
||||
(vector parent-symbol) (cons parent setup-map)))
|
||||
(setq parents (cdr parents))
|
||||
(set-language-info-setup-keymap
|
||||
lang-env alist
|
||||
(symbol-value describe-map) (symbol-value setup-map))))
|
||||
(set-language-info-setup-keymap
|
||||
lang-env alist
|
||||
describe-language-environment-map setup-language-environment-map))
|
||||
(dolist (elt alist)
|
||||
(set-language-info-internal lang-env (car elt) (cdr elt)))
|
||||
(if (equal lang-env current-language-environment)
|
||||
(set-language-environment lang-env)))
|
||||
|
||||
(defun read-language-name (key prompt &optional default)
|
||||
"Read a language environment name which has information for KEY.
|
||||
|
|
|
@ -812,7 +812,7 @@ but still contains full information about each coding system."
|
|||
|
||||
(declare-function font-info "font.c" (name &optional frame))
|
||||
|
||||
(defun describe-font-internal (font-info &optional ignored)
|
||||
(defun describe-font-internal (font-info &optional _ignored)
|
||||
"Print information about a font in FONT-INFO.
|
||||
The IGNORED argument is ignored."
|
||||
(print-list "name (opened by):" (aref font-info 0))
|
||||
|
|
|
@ -156,7 +156,7 @@ Levels are (in decreasing order of restrictiveness) `ascii-only',
|
|||
tibetan)))
|
||||
;; The string is covered by Latin and any one other Recommended
|
||||
;; script, except Cyrillic, Greek.
|
||||
'moderately-retrictive)
|
||||
'moderately-restrictive)
|
||||
;; Fixme `minimally-restrictive' -- needs well-formedness criteria
|
||||
;; and Identifier Profile.
|
||||
(t
|
||||
|
|
|
@ -253,7 +253,7 @@ in this language environment."))
|
|||
(documentation . "\
|
||||
Language environment for Gāndhārī, Sanskrit, and other languages
|
||||
using the Kharoṣṭhī script."))
|
||||
'("Misc"))
|
||||
'("Indian"))
|
||||
|
||||
(let ((consonant "[\U00010A00\U00010A10-\U00010A35]")
|
||||
(vowel "[\U00010A01-\U00010A06]")
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue