mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Merge branch 'master' into feature/igc
This commit is contained in:
commit
7f925475a2
325 changed files with 13259 additions and 10164 deletions
|
|
@ -48,10 +48,10 @@ GNULIB_MODULES='
|
|||
qcopy-acl readlink readlinkat realloc-posix regex
|
||||
sig2str sigdescr_np socklen stat-time std-gnu11
|
||||
stdc_bit_width stdc_count_ones stdc_trailing_zeros
|
||||
stdckdint-h stddef-h stdio-h
|
||||
stpcpy strnlen strnlen strtoimax symlink sys_stat-h sys_time-h
|
||||
stdckdint-h stddef-h stdio-h stdio-windows
|
||||
stpcpy stringeq strnlen strtoimax symlink sys_stat-h sys_time-h
|
||||
tempname time-h time_r time_rz timegm timer-time timespec-add timespec-sub
|
||||
update-copyright unlocked-io utimensat
|
||||
unlocked-io update-copyright utimensat
|
||||
vla warnings year2038
|
||||
'
|
||||
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ queries that has problems with latest grammar."
|
|||
(all-queries-valid t))
|
||||
(dolist (setting settings)
|
||||
(let* ((query (treesit-font-lock-setting-query setting))
|
||||
(language (treesit-query-language query))
|
||||
(language (treesit-font-lock-setting-language setting))
|
||||
(feature (treesit-font-lock-setting-feature setting)))
|
||||
;; Record that MODE uses LANGUAGE.
|
||||
(unless (memq language (alist-get mode mode-language-alist))
|
||||
|
|
@ -299,7 +299,7 @@ Return non-nil if all queries are valid, nil otherwise."
|
|||
(dolist (setting settings)
|
||||
;; `treesit-font-lock-setting-query' isn't available in Emacs 30.
|
||||
(let* ((query (car setting))
|
||||
(language (treesit-query-language query)))
|
||||
(language (treesit-font-lock-setting-language setting)))
|
||||
;; Validate query.
|
||||
(when (and (eq lang language)
|
||||
(not (treesit-query-valid-p language query)))
|
||||
|
|
@ -322,9 +322,7 @@ Return non-nil if all queries are valid, nil otherwise."
|
|||
treesit-font-lock-settings)))
|
||||
(all-queries-valid t))
|
||||
(cl-remove-duplicates
|
||||
(mapcar #'treesit-query-language
|
||||
(mapcar #'treesit-font-lock-setting-query
|
||||
settings)))))
|
||||
(mapcar #'treesit-font-lock-setting-language settings))))
|
||||
|
||||
(defun treesit-admin--find-latest-compatible-revision
|
||||
(mode language source-alist grammar-dir revision-type
|
||||
|
|
|
|||
|
|
@ -49,11 +49,6 @@ if test "$XCONFIGURE" = "android"; then
|
|||
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=32"
|
||||
enable_largefile=no
|
||||
enable_year2038=no])
|
||||
# Gnulib should not attempt not to reimplement tzalloc, as strftime
|
||||
# attempts to link with symbols that are only present in the Gnulib
|
||||
# replacement.
|
||||
AS_IF([test "$ANDROID_SDK" -ge "35"],
|
||||
[gl_cv_onwards_func_tzalloc="future OS version"])
|
||||
fi
|
||||
|
||||
dnl Set emacs_config_options to the options of 'configure', quoted for the shell,
|
||||
|
|
|
|||
|
|
@ -136,15 +136,57 @@ options (that is, single characters) requiring no arguments, and long
|
|||
options (starting with @samp{--}) whose arguments are specified with
|
||||
@samp{=}.
|
||||
|
||||
Dired does not handle files that have names with embedded newline
|
||||
characters well. If you have many such files, you may consider adding
|
||||
@samp{-b} to @code{dired-listing-switches}. This will quote all
|
||||
special characters and allow Dired to handle them better. (You can
|
||||
also use the @kbd{C-u C-x d} command to add @samp{-b} temporarily.)
|
||||
You can declare @code{dired-listing-switches} as a connection-local
|
||||
variable in order to adjust its value to match what a remote system
|
||||
expects (@pxref{Connection Variables}).
|
||||
|
||||
@code{dired-listing-switches} can be declared as connection-local
|
||||
variable to adjust it to match what a remote system expects
|
||||
(@pxref{Connection Variables}).
|
||||
@cindex file names with newline character in Dired
|
||||
@cindex newline character in file names in Dired
|
||||
@anchor{File names with newline}
|
||||
When a file name contains a newline character, Dired displays it by
|
||||
default as a literal newline, so the display of this file name occupies
|
||||
more than one line in the Dired buffer. If you invoke a Dired operation
|
||||
on such a file listing, in many cases it will fail and signal an error.
|
||||
For this reason, when Dired displays a file name containing a literal
|
||||
newline, Emacs recognizes this and automatically pops up a buffer with
|
||||
an informative warning. For such file names, Dired offers an
|
||||
alternative display, using the @command{ls} switch @samp{-b}, in which
|
||||
newline characters are represented by @samp{\n} and the Dired listing of
|
||||
the file occupies one line as usual, so you can execute all applicable
|
||||
Dired operations on it.@footnote{Note that with the @samp{-b} switch
|
||||
Dired displays tab characters in file names as @samp{\t} and escapes
|
||||
other control characters and also spaces in file names with @samp{\}.}
|
||||
|
||||
Emacs provides two different ways to make Dired use the @samp{-b}
|
||||
switch:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
You can add @samp{-b} to @code{dired-listing-switches} before invoking
|
||||
@code{dired}. Since this variable is a user option, you can alter its
|
||||
value persistently either by using the Customization interface
|
||||
(@pxref{Saving Customizations}) or by using the @code{setopt} macro in
|
||||
your initialization file (@pxref{Examining}).@footnote{If
|
||||
@code{dired-listing-switches} contains @samp{-b} when you invoke dired
|
||||
on a directory containing a file name with a newline, the newline is
|
||||
displayed as @samp{\n}, so Emacs will not pop up a warning.} You can
|
||||
also add @samp{-b} just for the next @code{dired} invocation by typing
|
||||
@kbd{C-u C-x d}.
|
||||
|
||||
@item
|
||||
@vindex dired-auto-toggle-b-switch
|
||||
If you enable the user option @code{dired-auto-toggle-b-switch}, then
|
||||
when you visit a directory containing a file whose name has a newline,
|
||||
Emacs will automatically add the @samp{-b} switch and redisplay the
|
||||
directory in Dired to show @samp{\n} in the file name. If you edit the
|
||||
file name and remove the @samp{\n} character, then on completing the
|
||||
edit Emacs automatically removes the @samp{-b} switch and redisplays the
|
||||
Dired buffer, so that file names with tab or space characters now show
|
||||
literal spaces without a backslash. If you enable or disable
|
||||
@code{dired-auto-toggle-b-switch} after visiting a directory containing
|
||||
a file name with a newline, Emacs will add or remove the @samp{-b}
|
||||
switch as appropriate and automatically redisplay the Dired buffer.
|
||||
@end itemize
|
||||
|
||||
@vindex dired-switches-in-mode-line
|
||||
Dired displays in the mode line an indication of what were the
|
||||
|
|
|
|||
|
|
@ -528,51 +528,55 @@ frames by specifying @dfn{frame parameters}. @xref{Frame Parameters}.
|
|||
The following commands are used to delete and operate on frames:
|
||||
|
||||
@table @kbd
|
||||
@item C-x 5 0
|
||||
@kindex C-x 5 0
|
||||
@findex delete-frame
|
||||
@item C-x 5 0
|
||||
Delete the selected frame (@code{delete-frame}). This signals an
|
||||
error if there is only one frame.
|
||||
|
||||
@item C-x 5 u
|
||||
@kindex C-x 5 u
|
||||
@findex undelete-frame
|
||||
@findex undelete-frame-mode
|
||||
@item C-x 5 u
|
||||
When @code{undelete-frame-mode} is enabled, undelete one of the 16
|
||||
most recently deleted frames. Without a prefix argument, undelete the
|
||||
most recently deleted frame. With a numerical prefix argument between
|
||||
1 and 16, where 1 is the most recently deleted frame, undelete the
|
||||
corresponding deleted frame.
|
||||
|
||||
@item C-z
|
||||
@kindex C-z @r{(X windows)}
|
||||
@item C-z
|
||||
Minimize (or iconify) the selected Emacs frame
|
||||
(@code{suspend-frame}). @xref{Exiting}.
|
||||
|
||||
@item C-x 5 o
|
||||
@kindex C-x 5 o
|
||||
@findex other-frame
|
||||
@item C-x 5 o
|
||||
Select another frame, and raise it. If you repeat this command, it
|
||||
cycles through all the frames on your terminal.
|
||||
|
||||
@item C-x 5 1
|
||||
@kindex C-x 5 1
|
||||
@findex delete-other-frames
|
||||
@item C-x 5 1
|
||||
Delete all frames on the current terminal, except the selected one.
|
||||
|
||||
@item M-@key{F10}
|
||||
@kindex M-F10
|
||||
@findex toggle-frame-maximized
|
||||
@item M-@key{F10}
|
||||
Toggle the maximization state of the current frame. When a frame is
|
||||
maximized, it fills the screen.
|
||||
|
||||
@item @key{F11}
|
||||
@kindex F11
|
||||
@findex toggle-frame-fullscreen
|
||||
@vindex alter-fullscreen-frames
|
||||
@cindex resizing full-screen frames
|
||||
@item @key{F11}
|
||||
Toggle full-screen mode for the current frame. (The difference
|
||||
between full-screen and maximized is normally that the former
|
||||
hides window manager decorations, giving slightly more screen space to
|
||||
Emacs itself.)
|
||||
Emacs itself.) Note that whether resizing of full-screen frames is
|
||||
allowed and how Emacs handles that is controlled by the user option
|
||||
@code{alter-fullscreen-frames}.
|
||||
@end table
|
||||
|
||||
@vindex frame-resize-pixelwise
|
||||
|
|
|
|||
|
|
@ -716,8 +716,17 @@ use @kbd{C-h l} (@code{view-lossage}). @kbd{C-h l} displays your last
|
|||
input keystrokes and the commands they invoked. By default, Emacs
|
||||
stores the last 300 keystrokes; if you wish, you can change this number with
|
||||
the command @code{lossage-size}.
|
||||
If you see commands that you are not familiar with, you can use @kbd{C-h k} or
|
||||
@kbd{C-h f} to find out what they do.
|
||||
If you see commands that you are not familiar with, use
|
||||
@kbd{C-h k}, or press @kbd{RET} or click on them to find out what they do.
|
||||
|
||||
@vindex view-lossage-auto-refresh
|
||||
By default, once the lossage buffer is displayed, it will not show the
|
||||
keystroke and commands you will type after displaying it. But if you
|
||||
set the variable @code{view-lossage-auto-refresh} to the value @code{t},
|
||||
the lossage buffer will be continuously refreshed as you type further
|
||||
commands. Alternatively, you can invoke @code{view-lossage} with a
|
||||
prefix argument, as in @kbd{C-u C-h l}, to display the lossage buffer
|
||||
and have it auto-refresh thereafter.
|
||||
|
||||
@kindex C-h e
|
||||
@findex view-echo-area-messages
|
||||
|
|
|
|||
|
|
@ -2024,8 +2024,8 @@ server file, as the default @code{server-auth-dir} is hard-coded in
|
|||
relative filenames.
|
||||
|
||||
@node Invoking emacsclient
|
||||
@subsection Invoking @code{emacsclient}
|
||||
@cindex @code{emacsclient} invocation
|
||||
@subsection Invoking @command{emacsclient}
|
||||
@cindex @command{emacsclient} invocation
|
||||
|
||||
The simplest way to use the @command{emacsclient} program is to run
|
||||
the shell command @samp{emacsclient @var{file}}, where @var{file} is a
|
||||
|
|
@ -2193,8 +2193,9 @@ option sometimes requires elaborate escaping of characters special to
|
|||
the shell. To avoid this, you can pass arguments to Lisp functions in
|
||||
your expression as additional separate arguments to
|
||||
@command{emacsclient}, and use @var{server-eval-args-left} in the
|
||||
expression to access those arguments. Be careful to have your
|
||||
expression remove the processed arguments from
|
||||
expression to access those arguments. If empty string arguments are
|
||||
passed to @command{emacsclient}, those are included as well. Be careful
|
||||
to have your expression remove the processed arguments from
|
||||
@var{server-eval-args-left} regardless of whether your code succeeds,
|
||||
for example by using @code{pop}, otherwise Emacs will attempt to
|
||||
evaluate those arguments as separate Lisp expressions.
|
||||
|
|
|
|||
|
|
@ -1688,8 +1688,9 @@ row). Just what constitutes a block depends on the major mode. In C
|
|||
mode and related modes, blocks are delimited by braces, while in Lisp
|
||||
mode they are delimited by parentheses. Multi-line comments also
|
||||
count as blocks.
|
||||
@vindex hs-prefix-map
|
||||
|
||||
Hideshow mode provides the following commands:
|
||||
Hideshow mode provides the following commands (defined in @code{hs-prefix-map}):
|
||||
|
||||
@findex hs-hide-all
|
||||
@findex hs-hide-block
|
||||
|
|
@ -1734,7 +1735,7 @@ Hide all blocks @var{n} levels below this block
|
|||
@vindex hs-indicator-type
|
||||
@vindex hs-indicator-maximum-buffer-size
|
||||
@vindex hs-isearch-open
|
||||
@vindex hs-special-modes-alist
|
||||
@vindex hs-hide-block-behavior
|
||||
These variables can be used to customize Hideshow mode:
|
||||
|
||||
@table @code
|
||||
|
|
@ -1742,6 +1743,12 @@ Hide all blocks @var{n} levels below this block
|
|||
If non-@code{nil}, @kbd{C-c @@ C-M-h} (@code{hs-hide-all}) hides
|
||||
comments too.
|
||||
|
||||
@item hs-hide-block-behavior
|
||||
This variable controls how @code{hs-hide-block} and
|
||||
@code{hs-toggle-hiding} should hide a block. The possible values can be
|
||||
'after-bol', hide the innermost block to which the current line belongs;
|
||||
or 'after-cursor', hide the block after cursor position.
|
||||
|
||||
@item hs-display-lines-hidden
|
||||
If non-@code{nil}, display the number of hidden lines next to the
|
||||
ellipsis.
|
||||
|
|
|
|||
|
|
@ -1125,6 +1125,18 @@ ends of the range in upper case, or both in lower case, or both should
|
|||
be non-letters. The behavior of a mixed-case range such as @samp{A-z}
|
||||
is somewhat ill-defined, and it may change in future Emacs versions.
|
||||
|
||||
To search for raw bytes (@pxref{International Chars}) using regular
|
||||
expressions, specify their codepoints in the bracket expression, as in
|
||||
@w{@kbd{C-M-s [ C-x 8 @key{RET} 3fff80 @key{RET} - C-x 8 @key{RET}
|
||||
3fffff @key{RET} ]}}. Emacs will show the equivalent
|
||||
|
||||
@example
|
||||
Regexp I-search: [\200-\377]
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
in the echo area.
|
||||
|
||||
@item @kbd{[^ @dots{} ]}
|
||||
@samp{[^} begins a @dfn{complemented character set}, which matches any
|
||||
character except the ones specified. Thus, @samp{[^a-z0-9A-Z]} matches
|
||||
|
|
|
|||
|
|
@ -387,7 +387,6 @@ revisions or branches (@pxref{Branches}) checked out simultaneously, in
|
|||
different working trees, but with all revision history, branches, tags
|
||||
and other metadata shared.
|
||||
|
||||
@indentedblock
|
||||
Suppose your project has a trunk where you're developing the new version
|
||||
3 of your software, and a stable release branch from which you make
|
||||
point releases of version 2. Someone sends you a patch fixing a bug
|
||||
|
|
@ -406,7 +405,6 @@ use @kbd{C-x v m} (@pxref{Merging}) to merge the branch you have checked
|
|||
out in the other working tree. Now your version of the trunk has all of
|
||||
version 2's fixes merged into it, but you haven't pushed it yet because
|
||||
you're still refactoring. You'll use @kbd{C-x v P} later.
|
||||
@end indentedblock
|
||||
|
||||
Ordinary VC commands like @kbd{C-x v v} (@pxref{Basic VC Editing}) and
|
||||
@kbd{C-x v d} (@pxref{VC Directory Mode}) don't work any differently
|
||||
|
|
|
|||
|
|
@ -3668,15 +3668,18 @@ character, or for keyboard-quit.
|
|||
@end defun
|
||||
|
||||
@defun read-multiple-choice prompt choices &optional help-string show-help long-form
|
||||
Ask user a multiple choice question. @var{prompt} should be a string
|
||||
that will be displayed as the prompt.
|
||||
Ask user a multiple-choice question and return user's choice.
|
||||
@var{prompt} should be a string to display as the prompt.
|
||||
|
||||
@var{choices} is an alist where the first element in each entry is a
|
||||
character to be entered, the second element is a short name for the
|
||||
character the user can type, the second element is a short name for the
|
||||
entry to be displayed while prompting (if there's room, it might be
|
||||
shortened), and the third, optional entry is a longer explanation that
|
||||
will be displayed in a help buffer if the user requests more help.
|
||||
|
||||
The return value is the entry from @var{choices} that matches the
|
||||
character the user types.
|
||||
|
||||
If optional argument @var{help-string} is non-@code{nil}, it should be
|
||||
a string with a more detailed description of all choices. It will be
|
||||
displayed in a help buffer instead of the default auto-generated
|
||||
|
|
@ -3691,7 +3694,10 @@ will have to type in long-form answers (using @code{completing-read})
|
|||
instead of hitting a single key. The answers must be among the second
|
||||
elements of the values in the @var{choices} list.
|
||||
|
||||
The return value is the matching value from @var{choices}.
|
||||
By default, this function uses @code{read-from-minibuffer} (@pxref{Text
|
||||
from Minibuffer}) to read user input, but if the variable
|
||||
@code{read-char-choice-use-read-key} is non-@code{nil}, it uses
|
||||
@code{read-key} instead.
|
||||
|
||||
@lisp
|
||||
(read-multiple-choice
|
||||
|
|
|
|||
|
|
@ -317,8 +317,8 @@ following way instead:
|
|||
(do-something result2))
|
||||
@end example
|
||||
|
||||
There's a number of variations on this theme, and they're briefly
|
||||
described below.
|
||||
There's a number of variations on this theme, and they're described
|
||||
below.
|
||||
|
||||
@defmac if-let* varlist then-form else-forms...
|
||||
Evaluate each binding in @var{varlist}, stopping if a binding value is
|
||||
|
|
@ -376,6 +376,22 @@ Some Lisp programmers follow the convention that @code{and} and
|
|||
@code{when} and @code{when-let*} are for forms evaluated for side-effect
|
||||
with returned values ignored.
|
||||
|
||||
There is no @code{cond-let*} macro because extending the structure
|
||||
shared by @code{if-let*}, @code{when-let*} and @code{and-let*} to the
|
||||
case of @code{cond} is not simple.@footnote{The problem is that there
|
||||
are multiple ways to do it that are all useful but not compatible. In
|
||||
addition, the resulting macro is complicated, and so tricky to learn how
|
||||
to read and write.} However, you can use the @code{cond*} macro's
|
||||
@code{bind-and*} clauses (@pxref{cond* Macro}) to achieve something
|
||||
similar:
|
||||
|
||||
@example
|
||||
(cond* ((bind-and* (result1 (do-computation))
|
||||
(result2 (do-more result1)))
|
||||
(do-something result2))
|
||||
...)
|
||||
@end example
|
||||
|
||||
A similar macro exists to run a loop until one binding evaluates to
|
||||
@code{nil}:
|
||||
|
||||
|
|
@ -1503,6 +1519,14 @@ the bindings list in @code{let*}, @pxref{Local Variables}) for the body
|
|||
of the clause, and all subsequent clauses. As a condition, it counts as
|
||||
true if the first binding's value is non-@code{nil}.
|
||||
|
||||
@findex bind-and*
|
||||
@code{(bind-and* @var{bindings}@dots{})} means to bind @var{bindings}
|
||||
(like the bindings list in @code{if-let*}, @pxref{Conditionals}) for
|
||||
only the body of the clause. As a condition, it counts as true if none
|
||||
of the bindings evaluate to @code{nil}. In addition, if any binding
|
||||
evaluates to @code{nil}, the expressions for the values of subsequent
|
||||
bindings are not evaluated.
|
||||
|
||||
@findex match*
|
||||
@findex pcase*
|
||||
@code{(match* @var{pattern} @var{datum})} means to match @var{datum}
|
||||
|
|
|
|||
|
|
@ -354,8 +354,8 @@ values are legitimate, and how to display the value
|
|||
(@pxref{Customization Types}). Every @code{defcustom} should specify
|
||||
a value for this keyword.
|
||||
|
||||
@item :options @var{value-list}
|
||||
@kindex options@r{, @code{defcustom} keyword}
|
||||
@item :options @var{value-list}
|
||||
Specify the list of reasonable values for use in this
|
||||
option. The user is not restricted to using only these values, but they
|
||||
are offered as convenient alternatives.
|
||||
|
|
@ -368,8 +368,8 @@ Re-evaluating a @code{defcustom} form with a different @code{:options}
|
|||
value does not clear the values added by previous evaluations, or
|
||||
added by calls to @code{custom-add-frequent-value} (see below).
|
||||
|
||||
@item :set @var{setfunction}
|
||||
@kindex set@r{, @code{defcustom} keyword}
|
||||
@item :set @var{setfunction}
|
||||
Specify @var{setfunction} as the way to change the value of this
|
||||
option when using the Customize interface. The function
|
||||
@var{setfunction} should take two arguments, a symbol (the option
|
||||
|
|
@ -389,8 +389,8 @@ should describe how to do the same job in hand-written Lisp code,
|
|||
either by invoking @var{setfunction} directly or by using
|
||||
@code{setopt}.
|
||||
|
||||
@item :get @var{getfunction}
|
||||
@kindex get@r{, @code{defcustom} keyword}
|
||||
@item :get @var{getfunction}
|
||||
Specify @var{getfunction} as the way to extract the value of this
|
||||
option. The function @var{getfunction} should take one argument, a
|
||||
symbol, and should return whatever customize should use as the
|
||||
|
|
@ -403,8 +403,8 @@ Custom as variables but are not actually stored in Lisp variables. It
|
|||
is almost surely a mistake to specify @var{getfunction} for a value
|
||||
that really is stored in a Lisp variable.
|
||||
|
||||
@item :initialize @var{function}
|
||||
@kindex initialize@r{, @code{defcustom} keyword}
|
||||
@item :initialize @var{function}
|
||||
@var{function} should be a function used to initialize the variable
|
||||
when the @code{defcustom} is evaluated. It should take two arguments,
|
||||
the option name (a symbol) and the value. Here are some predefined
|
||||
|
|
@ -434,18 +434,24 @@ Use the @code{:set} function to initialize the variable, if it is
|
|||
already set or has been customized; otherwise, just use
|
||||
@code{set-default-toplevel-value}.
|
||||
|
||||
@item custom-initialize-delay
|
||||
@item custom-initialize-after-file-load
|
||||
This function behaves like @code{custom-initialize-set}, but it
|
||||
delays the actual initialization to the next Emacs start. This should
|
||||
be used in files that are preloaded (or for autoloaded variables), so
|
||||
that the initialization is done in the run-time context rather than
|
||||
the build-time context. This also has the side-effect that the
|
||||
(delayed) initialization is performed with the @code{:set} function.
|
||||
@xref{Building Emacs}.
|
||||
delays the actual initialization until after the containing file is loaded.
|
||||
This can be useful to break the common dependency where the setter
|
||||
is (or uses) a function which needs to be defined after the variable,
|
||||
such as when a global minor mode has a non-@code{nil} @code{:init-value}.
|
||||
|
||||
@item custom-initialize-delay
|
||||
This function behaves like @code{custom-initialize-set}, but it delays
|
||||
the actual initialization to the next Emacs start. This should be used
|
||||
in Lisp files that are preloaded (loaded when Emacs is built), when it
|
||||
is important to ensure that the initialization is performed in the
|
||||
run-time context (which could be on a different system or programming
|
||||
environment). @xref{Building Emacs, custom-initialize-delay}.
|
||||
@end table
|
||||
|
||||
@item :local @var{value}
|
||||
@kindex local@r{, @code{defcustom} keyword}
|
||||
@item :local @var{value}
|
||||
If the @var{value} is @code{t}, mark @var{option} as automatically
|
||||
buffer-local; if the value is @code{permanent}, also set @var{option}s
|
||||
@code{permanent-local} property to @code{t}. Finally, if the value is
|
||||
|
|
@ -453,18 +459,18 @@ buffer-local; if the value is @code{permanent}, also set @var{option}s
|
|||
to @code{t} without marking it as automatically buffer-local.
|
||||
@xref{Creating Buffer-Local}.
|
||||
|
||||
@item :risky @var{value}
|
||||
@kindex risky@r{, @code{defcustom} keyword}
|
||||
@item :risky @var{value}
|
||||
Set the variable's @code{risky-local-variable} property to
|
||||
@var{value} (@pxref{File Local Variables}).
|
||||
|
||||
@item :safe @var{function}
|
||||
@kindex safe@r{, @code{defcustom} keyword}
|
||||
@item :safe @var{function}
|
||||
Set the variable's @code{safe-local-variable} property to
|
||||
@var{function} (@pxref{File Local Variables}).
|
||||
|
||||
@item :set-after @var{variables}
|
||||
@kindex set-after@r{, @code{defcustom} keyword}
|
||||
@item :set-after @var{variables}
|
||||
When setting variables according to saved customizations, make sure to
|
||||
set the variables @var{variables} before this one; i.e., delay
|
||||
setting this variable until after those others have been handled. Use
|
||||
|
|
|
|||
|
|
@ -5816,8 +5816,7 @@ something changed since the last display cycle.
|
|||
A buffer can have blank areas called @dfn{display margins} on the
|
||||
left and on the right. Ordinary text never appears in these areas,
|
||||
but you can put things into the display margins using the
|
||||
@code{display} property. There is currently no way to make text or
|
||||
images in the margin mouse-sensitive.
|
||||
@code{display} property.
|
||||
|
||||
The way to display something in the margins is to specify it in a
|
||||
margin display specification in the @code{display} property of some
|
||||
|
|
|
|||
|
|
@ -1234,6 +1234,37 @@ bottom corner of the frame. The parameters @code{min-width} and
|
|||
@code{min-height} (@pxref{Size Parameters}) can be used to obtain a
|
||||
similar behavior when changing the frame size from within Emacs.
|
||||
|
||||
When a frame is in a fullscreen state (@pxref{Size Parameters}),
|
||||
requests to change the frame size via one of these functions may be
|
||||
supported or refused either by Emacs itself or by the window manager.
|
||||
The following variable provides more control of the resulting behavior.
|
||||
|
||||
@cindex altering the size of fullscreen frames
|
||||
@cindex resizing fullscreen frames
|
||||
@defopt alter-fullscreen-frames
|
||||
This options controls how to handle requests to alter fullscreen frames.
|
||||
Emacs consults it when asked to resize a fullscreen frame via functions
|
||||
like @code{set-frame-size} or when setting the @code{width} or
|
||||
@code{height} parameter of a frame. The following values are provided:
|
||||
|
||||
@table @code
|
||||
@item nil
|
||||
This will forward the resize request to the window manager and leave it
|
||||
to the latter how to proceed.
|
||||
|
||||
@item t
|
||||
This will first reset the fullscreen status and then forward the resize
|
||||
request on to the window manager.
|
||||
|
||||
@item inhibit
|
||||
This will reject the resize request and leave the fullscreen status
|
||||
unchanged.
|
||||
@end table
|
||||
|
||||
The default is @code{inhibit} on NS builds and @code{nil} everywhere
|
||||
else.
|
||||
@end defopt
|
||||
|
||||
@cindex tracking frame size changes
|
||||
The abnormal hook @code{window-size-change-functions} (@pxref{Window
|
||||
Hooks}) tracks all changes of the inner size of a frame including those
|
||||
|
|
|
|||
|
|
@ -2609,7 +2609,9 @@ as a compiler macro. The function will accept the argument list
|
|||
If present, @var{doc} should be the function's documentation string
|
||||
(@pxref{Function Documentation}); @var{declare}, if present, should be
|
||||
a @code{declare} form (@pxref{Declare Form}) specifying the function's
|
||||
metadata.
|
||||
metadata. In addition to the usual declarations, @var{declare}
|
||||
can include @code{(noinline @var{NOINLINE})} when a non-@code{nil}
|
||||
@var{NOINLINE} prevents Emacs from inlining the defined function.
|
||||
@end defmac
|
||||
|
||||
Functions defined via @code{define-inline} have several advantages
|
||||
|
|
|
|||
|
|
@ -387,6 +387,61 @@ not just rely on the truncation effect unless @var{n} is known to be
|
|||
positive.
|
||||
@end defun
|
||||
|
||||
@defun drop-while pred list
|
||||
This function skips leading list elements for which the predicate @var{pred}
|
||||
returns non-@code{nil}, and returns the rest.
|
||||
|
||||
@example
|
||||
@group
|
||||
(drop-while #'numberp '(1 2 a b 3 4))
|
||||
@result{} (a b 3 4)
|
||||
@end group
|
||||
@end example
|
||||
@end defun
|
||||
|
||||
@defun take-while pred list
|
||||
This function returns the leading list elements for which the predicate
|
||||
@var{pred} returns non-@code{nil}, and ignores the rest.
|
||||
|
||||
In general,
|
||||
@code{(append (take-while @var{p} @var{list}) (drop-while @var{p} @var{list}))}
|
||||
will return a list equal to @var{list}.
|
||||
|
||||
@example
|
||||
@group
|
||||
(take-while #'numberp '(1 2 a b 3 4))
|
||||
@result{} (1 2)
|
||||
@end group
|
||||
@end example
|
||||
@end defun
|
||||
|
||||
@defun all pred list
|
||||
This function returns @code{t} if @var{pred} is true for all elements in
|
||||
@var{list}.
|
||||
|
||||
@example
|
||||
@group
|
||||
(all #'numberp '(1 2 3 4)) @result{} t
|
||||
(all #'numberp '(1 2 a b 3 4)) @result{} nil
|
||||
(all #'numberp '()) @result{} t
|
||||
@end group
|
||||
@end example
|
||||
@end defun
|
||||
|
||||
@defun any pred list
|
||||
This function returns non-@code{nil} if @var{pred} is true for at least
|
||||
one element in @var{list}. The returned value is the longest @var{list}
|
||||
suffix whose first element satisfies @var{pred}.
|
||||
|
||||
@example
|
||||
@group
|
||||
(any #'symbolp '(1 2 3 4)) @result{} nil
|
||||
(any #'symbolp '(1 2 a b 3 4)) @result{} (a b 3 4)
|
||||
(any #'symbolp '()) @result{} nil
|
||||
@end group
|
||||
@end example
|
||||
@end defun
|
||||
|
||||
@defun last list &optional n
|
||||
This function returns the last link of @var{list}. The @code{car} of
|
||||
this link is the list's last element. If @var{list} is null,
|
||||
|
|
|
|||
|
|
@ -1320,6 +1320,11 @@ This macro arranges to evaluate @var{body} at the end of loading
|
|||
the file @var{library}, each time @var{library} is loaded. If
|
||||
@var{library} is already loaded, it evaluates @var{body} right away.
|
||||
|
||||
Usually @var{library} is a feature (i.e., a symbol), in which case
|
||||
@var{body} is evaluated at the end of any file where
|
||||
@code{(provide @var{library})} is called.
|
||||
|
||||
@var{library} can be also a file name (i.e., a string).
|
||||
You don't need to give a directory or extension in the file name
|
||||
@var{library}. Normally, you just give a bare file name, like this:
|
||||
|
||||
|
|
@ -1329,8 +1334,8 @@ You don't need to give a directory or extension in the file name
|
|||
|
||||
To restrict which files can trigger the evaluation, include a
|
||||
directory or an extension or both in @var{library}. Only a file whose
|
||||
absolute true name (i.e., the name with all symbolic links chased out)
|
||||
matches all the given name components will match. In the following
|
||||
absolute name matches all the given name components will match.
|
||||
In the following
|
||||
example, @file{my_inst.elc} or @file{my_inst.elc.gz} in some directory
|
||||
@code{..../foo/bar} will trigger the evaluation, but not
|
||||
@file{my_inst.el}:
|
||||
|
|
@ -1339,10 +1344,6 @@ example, @file{my_inst.elc} or @file{my_inst.elc.gz} in some directory
|
|||
(with-eval-after-load "foo/bar/my_inst.elc" @dots{})
|
||||
@end example
|
||||
|
||||
@var{library} can also be a feature (i.e., a symbol), in which case
|
||||
@var{body} is evaluated at the end of any file where
|
||||
@code{(provide @var{library})} is called.
|
||||
|
||||
An error in @var{body} does not undo the load, but does prevent
|
||||
execution of the rest of @var{body}.
|
||||
@end defmac
|
||||
|
|
|
|||
|
|
@ -1868,18 +1868,19 @@ marking the @code{define-minor-mode} form as autoloaded.
|
|||
@item :init-value @var{init-value}
|
||||
This is the value to which the @var{mode} variable is initialized.
|
||||
Except in unusual circumstances (see below), this value must be
|
||||
@code{nil}. If the mode is global (see below) and preloaded, and the
|
||||
initial value is @code{t}, i.e., the mode is turned on by default, you
|
||||
should consider forcing Emacs to run the mode function at startup, like
|
||||
this:
|
||||
@code{nil}. Note that @code{define-minor-mode} does not automatically
|
||||
run the body of the minor mode to ensure the mode is really enabled
|
||||
according to this value, so if the mode is global (see above) and the
|
||||
initial value is non-@code{nil}, you should consider forcing Emacs to
|
||||
run the mode function when loading the mode, like this:
|
||||
|
||||
@lisp
|
||||
:initialize #'custom-initialize-delay
|
||||
:initialize #'custom-initialize-after-file-load
|
||||
@end lisp
|
||||
|
||||
@noindent
|
||||
otherwise, the minor mode might not appear in the @file{*Help*} buffer
|
||||
generated by @kbd{C-h m} (@pxref{Mode Help}).
|
||||
otherwise, the minor mode might say it's enabled even though it has not
|
||||
been properly set up.
|
||||
|
||||
@item :lighter @var{lighter}
|
||||
The string @var{lighter} says what to display in the mode line
|
||||
|
|
@ -4117,16 +4118,17 @@ table in special cases. @xref{Syntax Properties}.
|
|||
@defvar font-lock-keywords-only
|
||||
If the value of this variable is non-@code{nil}, Font Lock does not do
|
||||
syntactic fontification, only search-based fontification based on
|
||||
@code{font-lock-keywords}. It is normally set by Font Lock mode based
|
||||
on the @var{keywords-only} element in @code{font-lock-defaults}. If
|
||||
the value is @code{nil}, Font Lock will call @code{jit-lock-register}
|
||||
(@pxref{Other Font Lock Variables}) to set up for automatic
|
||||
refontification of buffer text following a modified line to reflect
|
||||
the new syntactic context due to the change.
|
||||
@code{font-lock-keywords}; this will usually have the effect of not
|
||||
fontifying comments and strings. This variable is normally set by Font
|
||||
Lock mode based on the @var{keywords-only} element in
|
||||
@code{font-lock-defaults}. If the value is @code{nil}, Font Lock will
|
||||
call @code{jit-lock-register} (@pxref{Other Font Lock Variables}) to set
|
||||
up for automatic refontification of buffer text following a modified
|
||||
line to reflect the new syntactic context due to the change.
|
||||
|
||||
To use only syntactic fontification, this variable should
|
||||
be non-@code{nil}, while @code{font-lock-keywords} should be set to
|
||||
@code{nil} (@pxref{Font Lock Basics}).
|
||||
To use only syntactic fontification, both this variable and
|
||||
@code{font-lock-keywords} should be set to @code{nil} (@pxref{Font Lock
|
||||
Basics}).
|
||||
@end defvar
|
||||
|
||||
@defvar font-lock-syntax-table
|
||||
|
|
|
|||
|
|
@ -2370,54 +2370,49 @@ non-@code{nil} (@pxref{Symbols with Position}).
|
|||
|
||||
@example
|
||||
@group
|
||||
(eq 'foo 'foo)
|
||||
@result{} t
|
||||
(eq 'abc 'abc) @result{} t
|
||||
(eq 'abc 'ABC) @result{} nil
|
||||
(eq ?A ?A) @result{} t
|
||||
(eq 3 3) @result{} t
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Equal non-fixnum numbers may or may not be the same object:
|
||||
|
||||
@example
|
||||
@group
|
||||
(eq ?A ?A)
|
||||
@result{} t
|
||||
(eq 3.0 3.0) @result{} t @r{or} nil
|
||||
(eq (expt 10 50) (expt 10 50)) @result{} t @r{or} nil
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Newly created mutable objects are distinct:
|
||||
|
||||
@example
|
||||
@group
|
||||
(eq 3.0 3.0)
|
||||
@result{} t @r{or} nil
|
||||
;; @r{Equal floats may or may not be the same object.}
|
||||
(eq (list 1 2 3) (list 1 2 3)) @result{} nil
|
||||
(eq (point-marker) (point-marker)) @result{} nil
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Equal constants of other types may or may not be the same object:
|
||||
|
||||
@example
|
||||
@group
|
||||
(eq (make-string 3 ?A) (make-string 3 ?A))
|
||||
@result{} nil
|
||||
(eq "abc" "abc") @result{} t @r{or} nil
|
||||
(eq '(1 2 3) '(1 2 3)) @result{} t @r{or} nil
|
||||
(eq [1 2 3] [1 2 3]) @result{} t @r{or} nil
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@group
|
||||
(eq "asdf" "asdf")
|
||||
@result{} t @r{or} nil
|
||||
;; @r{Equal string constants or may not be the same object.}
|
||||
@end group
|
||||
@noindent
|
||||
unless they are the same literal constant:
|
||||
|
||||
@example
|
||||
@group
|
||||
(eq '(1 (2 (3))) '(1 (2 (3))))
|
||||
@result{} nil
|
||||
@end group
|
||||
|
||||
@group
|
||||
(setq foo '(1 (2 (3))))
|
||||
@result{} (1 (2 (3)))
|
||||
(eq foo foo)
|
||||
@result{} t
|
||||
(eq foo '(1 (2 (3))))
|
||||
@result{} nil
|
||||
@end group
|
||||
|
||||
@group
|
||||
(eq [(1 2) 3] [(1 2) 3])
|
||||
@result{} nil
|
||||
@end group
|
||||
|
||||
@group
|
||||
(eq (point-marker) (point-marker))
|
||||
@result{} nil
|
||||
(let ((x "abc")) (eq x x)) @result{} t
|
||||
(let ((x '(1 2 3))) (eq x x)) @result{} t
|
||||
(let ((x [1 2 3])) (eq x x)) @result{} t
|
||||
@end group
|
||||
@end example
|
||||
|
||||
|
|
@ -2473,38 +2468,21 @@ the converse is not always true.
|
|||
(equal "asdf" "asdf")
|
||||
@result{} t
|
||||
@end group
|
||||
@group
|
||||
(eq "asdf" "asdf")
|
||||
@result{} nil
|
||||
@end group
|
||||
|
||||
@group
|
||||
(equal '(1 (2 (3))) '(1 (2 (3))))
|
||||
@result{} t
|
||||
@end group
|
||||
@group
|
||||
(eq '(1 (2 (3))) '(1 (2 (3))))
|
||||
@result{} nil
|
||||
@end group
|
||||
|
||||
@group
|
||||
(equal [(1 2) 3] [(1 2) 3])
|
||||
@result{} t
|
||||
@end group
|
||||
@group
|
||||
(eq [(1 2) 3] [(1 2) 3])
|
||||
@result{} nil
|
||||
@end group
|
||||
|
||||
@group
|
||||
(equal (point-marker) (point-marker))
|
||||
@result{} t
|
||||
@end group
|
||||
|
||||
@group
|
||||
(eq (point-marker) (point-marker))
|
||||
@result{} nil
|
||||
@end group
|
||||
@end example
|
||||
|
||||
The @code{equal} function compares strings and bool-vectors by value.
|
||||
|
|
@ -2546,8 +2524,10 @@ returns @code{t} if and only if both the expressions below return
|
|||
@code{t}:
|
||||
|
||||
@example
|
||||
@group
|
||||
(equal (car @var{x}) (car @var{y}))
|
||||
(equal (cdr @var{x}) (cdr @var{y}))
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Comparing circular lists may therefore cause deep recursion that leads
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ the tool bar even if the current frame is not a graphical one, since a
|
|||
graphical frame may be created later on.
|
||||
|
||||
@item
|
||||
It use @code{custom-reevaluate-setting} to re-initialize the members
|
||||
It uses @code{custom-reevaluate-setting} to re-initialize the members
|
||||
of the list @code{custom-delayed-init-variables}. These are any
|
||||
pre-loaded user options whose default value depends on the run-time,
|
||||
rather than build-time, context.
|
||||
|
|
|
|||
|
|
@ -1473,7 +1473,7 @@ example, with the following pattern:
|
|||
@group
|
||||
(
|
||||
(array :anchor (_) @@first (_) @@last :anchor)
|
||||
(:equal @@first @@last)
|
||||
(:eq? @@first @@last)
|
||||
)
|
||||
@end group
|
||||
@end example
|
||||
|
|
@ -1482,24 +1482,32 @@ example, with the following pattern:
|
|||
tree-sitter only matches arrays where the first element is equal to
|
||||
the last element. To attach a predicate to a pattern, we need to
|
||||
group them together. Currently there are three predicates:
|
||||
@code{:equal}, @code{:match}, and @code{:pred}.
|
||||
@code{:eq?}, @code{:match?}, and @code{:pred?}.
|
||||
|
||||
@deffn Predicate :equal arg1 arg2
|
||||
@deffn Predicate :eq? arg1 arg2
|
||||
Matches if @var{arg1} is equal to @var{arg2}. Arguments can be either
|
||||
strings or capture names. Capture names represent the text that the
|
||||
captured node spans in the buffer.
|
||||
captured node spans in the buffer. Note that this is more like
|
||||
@code{equal} in Elisp, but @code{eq?} is the convention used by
|
||||
tree-sitter. Previously we supported the @code{:equal} predicate but
|
||||
it's now considered deprecated.
|
||||
@end deffn
|
||||
|
||||
@deffn Predicate :match regexp capture-name
|
||||
@deffn Predicate :match? capture-name regexp
|
||||
Matches if the text that @var{capture-name}'s node spans in the buffer
|
||||
matches regular expression @var{regexp}, given as a string literal.
|
||||
Matching is case-sensitive.
|
||||
Matching is case-sensitive. The ordering of the arguments doesn't
|
||||
matter. Previously we supported the @code{:match} predicate but it's
|
||||
now considered deprecated.
|
||||
@end deffn
|
||||
|
||||
@deffn Predicate :pred fn &rest nodes
|
||||
@deffn Predicate :pred? fn &rest nodes
|
||||
Matches if function @var{fn} returns non-@code{nil} when passed each
|
||||
node in @var{nodes} as arguments. The function runs with the current
|
||||
buffer set to the buffer of node being queried.
|
||||
buffer set to the buffer of node being queried. Be very careful when
|
||||
using this predicate, since it can be expensive when used in a tight
|
||||
loop. Previously we supported the @code{:pred} predicate but it's now
|
||||
considered deprecated.
|
||||
@end deffn
|
||||
|
||||
Note that a predicate can only refer to capture names that appear in
|
||||
|
|
@ -1554,9 +1562,9 @@ Anchor @code{:anchor} is written as @samp{.}.
|
|||
@item
|
||||
@samp{:+} is written as @samp{+}.
|
||||
@item
|
||||
@code{:equal}, @code{:match} and @code{:pred} are written as
|
||||
@code{#equal}, @code{#match} and @code{#pred}, respectively.
|
||||
In general, predicates change their @samp{:} to @samp{#}.
|
||||
@code{:eq?}, @code{:match?} and @code{:pred?} are written as
|
||||
@code{#eq?}, @code{#match?} and @code{#pred?}, respectively. In
|
||||
general, predicates change the @samp{:} to @samp{#}.
|
||||
@end itemize
|
||||
|
||||
For example,
|
||||
|
|
@ -1565,7 +1573,7 @@ For example,
|
|||
@group
|
||||
'((
|
||||
(compound_expression :anchor (_) @@first (_) :* @@rest)
|
||||
(:match "love" @@first)
|
||||
(:match? "love" @@first)
|
||||
))
|
||||
@end group
|
||||
@end example
|
||||
|
|
@ -1577,7 +1585,7 @@ is written in string form as
|
|||
@group
|
||||
"(
|
||||
(compound_expression . (_) @@first (_)* @@rest)
|
||||
(#match \"love\" @@first)
|
||||
(#match? \"love\" @@first)
|
||||
)"
|
||||
@end group
|
||||
@end example
|
||||
|
|
|
|||
|
|
@ -444,6 +444,12 @@ Representations}), or if the range start is ASCII and the end is a raw
|
|||
byte (as in @samp{[a-\377]}), the range will match only ASCII
|
||||
characters and raw 8-bit bytes, but not non-ASCII characters. This
|
||||
feature is intended for searching text in unibyte buffers and strings.
|
||||
|
||||
@cindex raw bytes, regexps for searching
|
||||
@item
|
||||
To search for @dfn{raw bytes}, which are characters belonging to the
|
||||
@code{eight-bit} character set (@pxref{Character Sets}), you can use
|
||||
@samp{[\200-\377]} or @samp{[\x3fff80-\x3fffff]}
|
||||
@end enumerate
|
||||
|
||||
Some kinds of bracket expressions are not the best style even
|
||||
|
|
|
|||
|
|
@ -796,6 +796,7 @@ facts are true or false.
|
|||
|
||||
@menu
|
||||
* Type Predicates:: @code{cl-typep}, @code{cl-deftype}, and @code{cl-coerce}.
|
||||
* Derived Types:: @code{cl-deftype}.
|
||||
* Equality Predicates:: @code{cl-equalp}.
|
||||
@end menu
|
||||
|
||||
|
|
@ -888,8 +889,8 @@ floats. In all other circumstances, @code{cl-coerce} signals an
|
|||
error.
|
||||
@end defun
|
||||
|
||||
@node Derived types
|
||||
@subsection Derived types
|
||||
@node Derived Types
|
||||
@section Derived Types
|
||||
|
||||
@defmac cl-deftype name arglist [docstring] [decls] forms@dots{}
|
||||
This macro defines a new type called @var{name}.
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ in the Emacs source distribution.
|
|||
If you need to build or run Emacs on MS Windows before Windows 7, you
|
||||
have to use the MinGW port of GCC and the MSYS suite of tools. The
|
||||
file @file{nt/INSTALL} in Emacs source distribution contains the
|
||||
details.
|
||||
details. @xref{MinGW}.
|
||||
|
||||
Support for displaying images, as well as XML/HTML rendering and TLS
|
||||
networking requires external libraries, the headers and import
|
||||
|
|
@ -2245,21 +2245,27 @@ software. This includes all the optional libraries used by Emacs
|
|||
Hunspell, Gawk, GNU Make, Groff, GDB.
|
||||
|
||||
@node MinGW
|
||||
@section MinGW and MSYS
|
||||
@section mingw.org's MinGW and MSYS
|
||||
@cindex mingw tools
|
||||
@cindex msys environment
|
||||
@cindex subprocesses, mingw and msys
|
||||
|
||||
@uref{https://osdn.net/projects/mingw/}
|
||||
|
||||
MinGW is another set of development tools that produce native Windows
|
||||
executables, not dependent on Cygwin's POSIX emulation DLLs.
|
||||
MinGW from @code{mingw.org} is another set of development tools that
|
||||
produce native Windows executables, not dependent on Cygwin's POSIX
|
||||
emulation DLLs. This is the original MinGW project, nowadays no longer
|
||||
actively developed. Its files can currently be found only via the WWW
|
||||
archive site known as the @dfn{Wayback Machine}. The latest MinGW
|
||||
release files can be found here:
|
||||
@uref{https://web.archive.org/web/20210410172202/https://osdn.net/projects/mingw/releases/}.
|
||||
|
||||
MSYS is a POSIX shell and minimal set of tools that are commonly used in
|
||||
configure scripts. Like Cygwin, this environment uses a non-native
|
||||
filesystem mapping to appear more POSIX like to the scripts that it
|
||||
runs. This is intended to complement the MinGW tools to make it easier
|
||||
to port software to Windows.
|
||||
MSYS, which is part of @code{mingw.org}s MinGW, is a POSIX shell and
|
||||
minimal set of tools that are commonly used in configure scripts. Like
|
||||
Cygwin, this environment uses a non-native filesystem mapping to appear
|
||||
more POSIX like to the scripts that it runs. This is intended to
|
||||
complement the MinGW tools to make it easier to port software to
|
||||
Windows.
|
||||
|
||||
@node GnuWin32
|
||||
@section GnuWin32
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@ command (@pxref{Eglot Commands}).
|
|||
On-the-fly succinct informative annotations, so-called @dfn{inlay
|
||||
hints}. Eglot adds special intangible text nearby certain identifiers,
|
||||
be it the type of a variable, or the name of a formal parameter in a
|
||||
function call. @xref{Eglot Commands} and the
|
||||
function call. @xref{Eglot Commands}, and the
|
||||
@code{eglot-inlay-hints-mode} minor mode.
|
||||
|
||||
@item
|
||||
|
|
@ -1287,14 +1287,24 @@ To apply this to Eglot, and assuming you chose the
|
|||
@end lisp
|
||||
|
||||
@noindent
|
||||
This sets the value of @code{eglot-workspace-configuration} in all the
|
||||
buffers inside the project; each server will use only the section of the
|
||||
parameters intended for that server, and ignore the rest. Note how
|
||||
alists are used for associating Emacs mode names with alists associating
|
||||
variable names with variable values. Then notice how plists are used
|
||||
inside the value of @code{eglot-workspace-configuration}.
|
||||
Note how alists are used for associating Emacs mode names with other
|
||||
alists, associating variable names with variable values. Then, pay
|
||||
special attention to how the value of
|
||||
@code{eglot-workspace-configuration} is a plist and @emph{not} an alist.
|
||||
|
||||
This following form may also be used:
|
||||
The above form sets the value of @code{eglot-workspace-configuration} in
|
||||
all the buffers inside the project; each language server will then use
|
||||
only the section of the parameters intended for it, and ignore the rest.
|
||||
In our example, @command{pylsp} and @command{gopls} are solely
|
||||
interested in the @code{:pylsp} and @code{:gopls} parameter section
|
||||
names, respectively. However, section names don't have to match the
|
||||
server name and some servers may be even interested in multiple
|
||||
sections: the @command{typescript-language-server} server is known to be
|
||||
interested in the @code{:javascript} and @code{:typescript} section
|
||||
names.
|
||||
|
||||
To avoid sending whole configuration sections to servers who are
|
||||
decidedly not interested in them, the following form may also be used:
|
||||
|
||||
@lisp
|
||||
((python-base-mode
|
||||
|
|
@ -1316,11 +1326,11 @@ buffers. @code{python-base-mode} buffers will have the variable set to
|
|||
@code{(:pylsp (:plugins ...))}. @code{go-mode} buffers will have the
|
||||
variable set to @code{(:gopls (:usePlaceholders t))}.
|
||||
|
||||
Some servers will issue workspace configuration for specific files
|
||||
inside your project. For example, if you know @code{gopls} is asking
|
||||
about specific files in the @code{src/imported} subdirectory and you
|
||||
want to set a different option for @code{gopls.usePlaceholders} , you
|
||||
may use something like:
|
||||
Some servers will issue workspace configuration for specific source
|
||||
files inside your project. For example, if you know @code{gopls} is
|
||||
asking about specific files in the @code{src/imported} subdirectory and
|
||||
you want to set a different option for @code{gopls.usePlaceholders} ,
|
||||
you may use something like:
|
||||
|
||||
@lisp
|
||||
((python-base-mode
|
||||
|
|
@ -1340,10 +1350,10 @@ may use something like:
|
|||
|
||||
Finally, if one needs to determine the workspace configuration based on
|
||||
some dynamic context, @code{eglot-workspace-configuration} can be set to
|
||||
a function. The function is called with the @code{eglot-lsp-server}
|
||||
instance of the connected server (if any) and with
|
||||
@code{default-directory} set to the root of the project. The function
|
||||
should return a plist suitable for use as the variable's value.
|
||||
a function instead of a plist. The function is called with the
|
||||
@code{eglot-lsp-server} instance of the connected server (if any) and
|
||||
with @code{default-directory} set to the root of the project. The
|
||||
function should return a plist suitable for use as the variable's value.
|
||||
|
||||
@node User-specific configuration
|
||||
@section User-specific configuration
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
@c %**start of header
|
||||
@setfilename ../../info/erc.info
|
||||
@settitle ERC Manual
|
||||
@set ERCVER 5.6.1
|
||||
@set ERCVER 5.6.2
|
||||
@set ERCDIST as distributed with Emacs @value{EMACSVER}
|
||||
@include docstyle.texi
|
||||
@syncodeindex fn cp
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
#+language: en
|
||||
#+options: ':t toc:nil author:t email:t num:t
|
||||
#+startup: content
|
||||
#+macro: stable-version 4.8.0
|
||||
#+macro: release-date 2025-06-11
|
||||
#+macro: development-version 4.9.0-dev
|
||||
#+macro: stable-version 5.1.0
|
||||
#+macro: release-date 2025-11-07
|
||||
#+macro: development-version 5.2.0-dev
|
||||
#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
|
||||
#+macro: space @@texinfo:@: @@
|
||||
#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@
|
||||
|
|
@ -143,10 +143,10 @@ and covers everything that goes into every tagged release of the themes.
|
|||
:custom_id: h:1af85373-7f81-4c35-af25-afcef490c111
|
||||
:end:
|
||||
|
||||
The Modus themes are distributed with Emacs starting with version 28.1.
|
||||
On older versions of Emacs, they can be installed using Emacs' package
|
||||
manager or manually from their code repository. There also exist
|
||||
packages for distributions of GNU/Linux.
|
||||
The Modus themes are distributed with Emacs starting with version
|
||||
28.1. On Emacs 27, they can be installed using Emacs' package manager
|
||||
or manually from their code repository. There also exist packages for
|
||||
distributions of GNU/Linux.
|
||||
|
||||
Emacs 28 ships with ~modus-themes~ version =1.6.0=. Emacs 29 includes
|
||||
version =3.0.0=. Emacs 30 provides a newer, refactored version that
|
||||
|
|
@ -365,7 +365,11 @@ customizations ([[#h:f4651d55-8c07-46aa-b52b-bed1e53463bb][Advanced customizatio
|
|||
|
||||
#+findex: modus-themes-toggle
|
||||
#+findex: modus-themes-select
|
||||
The commands ~modus-themes-toggle~ and ~modus-themes-select~ use
|
||||
#+findex: modus-themes-rotate
|
||||
#+findex: modus-themes-load-random
|
||||
#+findex: modus-themes-select
|
||||
The commands ~modus-themes-toggle~, ~modus-themes-rotate~,
|
||||
~modus-themes-load-random~, and ~modus-themes-select~ use
|
||||
~modus-themes-load-theme~ internally ([[#h:4fbfed66-5a89-447a-a07d-a03f6819c5bd][Option for which themes to toggle]]).
|
||||
The aforementioned hold true for them as well.
|
||||
|
||||
|
|
@ -386,10 +390,6 @@ function must be used in this case as a replacement. For example:
|
|||
(setq modus-themes-bold-constructs t
|
||||
modus-themes-italic-constructs t)
|
||||
|
||||
;; Maybe define some palette overrides, such as by using our presets
|
||||
(setq modus-themes-common-palette-overrides
|
||||
modus-themes-preset-overrides-intense)
|
||||
|
||||
;; Load the theme of choice (built-in themes are always "safe" so they
|
||||
;; do not need the `no-require' argument of `load-theme').
|
||||
(load-theme 'modus-operandi)
|
||||
|
|
@ -397,7 +397,7 @@ function must be used in this case as a replacement. For example:
|
|||
(define-key global-map (kbd "<f5>") #'modus-themes-toggle)
|
||||
#+end_src
|
||||
|
||||
** Sample configuration with and without use-package
|
||||
** Sample configuration
|
||||
:properties:
|
||||
:custom_id: h:e979734c-a9e1-4373-9365-0f2cd36107b8
|
||||
:end:
|
||||
|
|
@ -413,19 +413,15 @@ package configurations in their setup. We use this as an example:
|
|||
#+begin_src emacs-lisp
|
||||
;;; For the built-in themes which cannot use `require'.
|
||||
(use-package emacs
|
||||
:config
|
||||
:init
|
||||
(require-theme 'modus-themes) ; `require-theme' is ONLY for the built-in Modus themes
|
||||
|
||||
:config
|
||||
;; Add all your customizations prior to loading the themes
|
||||
(setq modus-themes-italic-constructs t
|
||||
modus-themes-bold-constructs nil)
|
||||
|
||||
;; Maybe define some palette overrides, such as by using our presets
|
||||
(setq modus-themes-common-palette-overrides
|
||||
modus-themes-preset-overrides-intense)
|
||||
|
||||
;; Load the theme of your choice.
|
||||
(load-theme 'modus-operandi)
|
||||
(modus-themes-load-theme 'modus-operandi)
|
||||
|
||||
(define-key global-map (kbd "<f5>") #'modus-themes-toggle))
|
||||
|
||||
|
|
@ -439,12 +435,8 @@ package configurations in their setup. We use this as an example:
|
|||
(setq modus-themes-italic-constructs t
|
||||
modus-themes-bold-constructs nil)
|
||||
|
||||
;; Maybe define some palette overrides, such as by using our presets
|
||||
(setq modus-themes-common-palette-overrides
|
||||
modus-themes-preset-overrides-intense)
|
||||
|
||||
;; Load the theme of your choice.
|
||||
(load-theme 'modus-operandi)
|
||||
(modus-themes-load-theme 'modus-operandi)
|
||||
|
||||
(define-key global-map (kbd "<f5>") #'modus-themes-toggle))
|
||||
#+end_src
|
||||
|
|
@ -458,12 +450,8 @@ The same without ~use-package~:
|
|||
(setq modus-themes-italic-constructs t
|
||||
modus-themes-bold-constructs nil)
|
||||
|
||||
;; Maybe define some palette overrides, such as by using our presets
|
||||
(setq modus-themes-common-palette-overrides
|
||||
modus-themes-preset-overrides-intense)
|
||||
|
||||
;; Load the theme of your choice:
|
||||
(load-theme 'modus-operandi :no-confirm)
|
||||
(modus-themes-load-theme 'modus-operandi :no-confirm)
|
||||
|
||||
(define-key global-map (kbd "<f5>") #'modus-themes-toggle)
|
||||
#+end_src
|
||||
|
|
@ -516,7 +504,7 @@ session, are better off using something like this:
|
|||
|
||||
[[#h:b40aca50-a3b2-4c43-be58-2c26fcd14237][Toggle themes without reloading them]].
|
||||
|
||||
[[#h:e979734c-a9e1-4373-9365-0f2cd36107b8][Sample configuration with and without use-package]].
|
||||
[[#h:e979734c-a9e1-4373-9365-0f2cd36107b8][Sample configuration]].
|
||||
|
||||
With the above granted, other sections of the manual discuss how to
|
||||
configure custom faces, where ~load-theme~ is expected, though
|
||||
|
|
@ -548,7 +536,6 @@ reloaded for changes to take effect.
|
|||
modus-themes-bold-constructs nil
|
||||
modus-themes-mixed-fonts t
|
||||
modus-themes-variable-pitch-ui nil
|
||||
modus-themes-custom-auto-reload t
|
||||
modus-themes-disable-other-themes t
|
||||
|
||||
;; Options for `modus-themes-prompts' are either nil (the
|
||||
|
|
@ -585,34 +572,6 @@ reloaded for changes to take effect.
|
|||
;; document extensively in this manual.
|
||||
#+end_src
|
||||
|
||||
** Option for reloading the theme on custom change
|
||||
:properties:
|
||||
:alt_title: Custom reload theme
|
||||
:description: Toggle auto-reload of the theme when setting custom variables
|
||||
:custom_id: h:9001527a-4e2c-43e0-98e8-3ef72d770639
|
||||
:end:
|
||||
#+vindex: modus-themes-custom-auto-reload
|
||||
|
||||
Brief: Toggle reloading of the active theme when an option is changed
|
||||
through the Custom UI.
|
||||
|
||||
Symbol: ~modus-themes-custom-auto-reload~ (=boolean= type)
|
||||
|
||||
Possible values:
|
||||
|
||||
1. ~nil~
|
||||
2. ~t~ (default)
|
||||
|
||||
All theme user options take effect when a theme is loaded. Any
|
||||
subsequent changes require the theme to be reloaded.
|
||||
|
||||
When this variable has a non-~nil~ value, any change made via the Custom
|
||||
UI or related functions such as ~customize-set-variable~ and ~setopt~
|
||||
(Emacs 29), will trigger a reload automatically.
|
||||
|
||||
With a ~nil~ value, changes to user options have no further consequences:
|
||||
the user must manually reload the theme ([[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]]).
|
||||
|
||||
** Option for disabling other themes while loading Modus
|
||||
:properties:
|
||||
:alt_title: Disable other themes
|
||||
|
|
@ -630,10 +589,16 @@ Possible values:
|
|||
1. ~nil~
|
||||
2. ~t~ (default)
|
||||
|
||||
When the value is non-~nil~, the commands ~modus-themes-toggle~ and
|
||||
#+findex: modus-themes-toggle
|
||||
#+findex: modus-themes-rotate
|
||||
#+findex: modus-themes-load-random
|
||||
#+findex: modus-themes-select
|
||||
#+findex: modus-themes-load-theme
|
||||
When the value is non-~nil~, the commands ~modus-themes-toggle~,
|
||||
~modus-themes-rotate~, ~modus-themes-load-random~, and
|
||||
~modus-themes-select~, as well as the ~modus-themes-load-theme~
|
||||
function, will disable all other themes while loading the specified
|
||||
Modus theme ([[#h:4fbfed66-5a89-447a-a07d-a03f6819c5bd][Option for which themes to toggle]]). This is done to
|
||||
Modus theme ([[#h:4fbfed66-5a89-447a-a07d-a03f6819c5bd][Option for which themes to toggle]]). This is done to
|
||||
ensure that Emacs does not blend two or more themes: such blends lead
|
||||
to awkward results that undermine the work of the designer.
|
||||
|
||||
|
|
@ -734,24 +699,27 @@ Possible values:
|
|||
:END:
|
||||
|
||||
#+findex: modus-themes-rotate
|
||||
Brief: Specify which themes to rotate among when using the command
|
||||
Brief: Specify which themes to rotate through when using the command
|
||||
~modus-themes-rotate~.
|
||||
|
||||
#+vindex: modus-themes-to-rotate
|
||||
Symbol: ~modus-themes-to-rotate~ (=list= type)
|
||||
|
||||
Default value: =modus-themes-items= (which includes all the Modus themes)
|
||||
Default value: nil
|
||||
|
||||
Possible values:
|
||||
|
||||
- ~modus-operandi~
|
||||
- ~modus-operandi-tinted~
|
||||
- ~modus-operandi-deuteranopia~
|
||||
- ~modus-operandi-tritanopia~
|
||||
- ~modus-vivendi~
|
||||
- ~modus-vivendi-tinted~
|
||||
- ~modus-vivendi-deuteranopia~
|
||||
- ~modus-vivendi-tritanopia~
|
||||
#+vindex: modus-themes-items
|
||||
- Any of the themes listed in the value of the variable ~modus-themes-items~.
|
||||
#+findex: modus-themes-get-themes
|
||||
- Any of the themes returned by the function ~modus-themes-get-themes~
|
||||
([[#h:86eb375b-9be4-43ce-879a-0686a524a63b][Build on top of the Modus themes]]).
|
||||
|
||||
When the value is a list of themes, ~modus-themes-rotate~ will go
|
||||
through them from left to right. With an optional prefix argument
|
||||
({{{kbd(C-u)}}} by default), it will move in reverse. If the value is
|
||||
~nil~, the command will perform the same action for all the themes
|
||||
returned by the function ~modus-themes-get-themes~.
|
||||
|
||||
** Option for font mixing
|
||||
:properties:
|
||||
|
|
@ -1195,8 +1163,8 @@ a cyan hue to keywords:
|
|||
(keyword cyan-cooler)))
|
||||
#+end_src
|
||||
|
||||
Changes take effect upon theme reload ([[#h:9001527a-4e2c-43e0-98e8-3ef72d770639][Custom reload theme]]).
|
||||
Overrides are removed by setting their variable to a ~nil~ value.
|
||||
Changes take effect upon theme reload. Overrides are removed by
|
||||
setting their variable to a ~nil~ value.
|
||||
|
||||
The common accented foregrounds in each palette follow a predictable
|
||||
naming scheme: =HUE{,-warmer,-cooler,-faint,-intense}=. =HUE= is one
|
||||
|
|
@ -1309,13 +1277,13 @@ Examples demonstrating how to use the aforementioned:
|
|||
#+findex: modus-themes-list-colors
|
||||
The command ~modus-themes-list-colors~ uses minibuffer completion to
|
||||
select an item from the Modus themes and then produces a buffer with
|
||||
previews of all of its color palette entries.
|
||||
previews of all of its color palette entries ([[#h:4952cd81-8a9a-4a4e-9867-3e63b9ef2f7e][Commands for the preview palette buffer]]).
|
||||
|
||||
#+findex: modus-themes-list-colors-current
|
||||
The command ~modus-themes-list-colors-current~ skips the minibuffer
|
||||
selection process to produce a preview for the current Modus theme.
|
||||
|
||||
When called with a prefix argument (=C-u= with the default key
|
||||
When called with a prefix argument {{{kbd(C-u)}}} with the default key
|
||||
bindings), these commands will show a preview of the palette's
|
||||
semantic color mappings instead of the full palette ([[#h:34c7a691-19bb-4037-8d2f-67a07edab150][Option for palette overrides]]).
|
||||
|
||||
|
|
@ -1336,6 +1304,51 @@ contents are, such as =*modus-operandi-list-all*= for the entirety of
|
|||
the palette (named colors as well as semantic color mappings) and
|
||||
==*modus-operandi-list-mappings*= for the mappings only.
|
||||
|
||||
** Commands for the preview palette buffer
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:4952cd81-8a9a-4a4e-9867-3e63b9ef2f7e
|
||||
:END:
|
||||
|
||||
#+findex: modus-themes-preview-mode
|
||||
#+vindex: modus-themes-preview-mode-map
|
||||
The palette preview buffer uses the major mode ~modus-themes-preview-mode~,
|
||||
which provides the ~modus-themes-preview-mode-map~ ([[#h:f4d4b71b-2ca5-4c3d-b0b4-9bfd7aa7fb4d][Preview theme colors]]).
|
||||
The following key bindings are available by default:
|
||||
|
||||
| Default key binding | Name of the command |
|
||||
|---------------------+----------------------------------------|
|
||||
| =w= | ~modus-themes-preview-mode-copy-color~ |
|
||||
| =W= | ~modus-themes-preview-mode-copy-entry~ |
|
||||
| =m= | ~modus-themes-preview-mode-mark~ |
|
||||
| =M= | ~modus-themes-preview-mode-mark-all~ |
|
||||
| =u= | ~modus-themes-preview-mode-unmark~ |
|
||||
| =U= | ~modus-themes-preview-mode-unmark-all~ |
|
||||
|
||||
#+findex: modus-themes-preview-mode-copy-color
|
||||
The command ~modus-themes-preview-mode-copy-color~ copies the resolved
|
||||
color value of the entry at point or of all the marked entries. This
|
||||
means that it always returns a string with the value of the color, not
|
||||
a symbolic representation of it. For example, if =cursor= is mapped to
|
||||
=red-warmer=, this command will return ="#972500"= while previewing
|
||||
the palette of the ~modus-operandi~ theme.
|
||||
|
||||
#+findex: modus-themes-preview-mode-copy-entry
|
||||
The command ~modus-themes-preview-mode-copy-entry~ copies the palette
|
||||
entry as such. This is how the entry is in the underlying palette
|
||||
definition. For example, it will return =(magenta-cooler "#531ab6")=
|
||||
or =(keybind blue-warmer)=. Copying those is useful as a starting
|
||||
point for writing palette overrides ([[#h:34c7a691-19bb-4037-8d2f-67a07edab150][Option for palette overrides]]).
|
||||
|
||||
#+findex: modus-themes-preview-mode-mark
|
||||
#+findex: modus-themes-preview-mode-mark-all
|
||||
#+findex: modus-themes-preview-mode-unmark
|
||||
#+findex: modus-themes-preview-mode-unmark-all
|
||||
The commands ~modus-themes-preview-mode-mark~, ~modus-themes-preview-mode-mark-all~,
|
||||
~modus-themes-preview-mode-unmark~, and ~modus-themes-preview-mode-unmark-all~,
|
||||
will add or remove a marker from the current or affected lines. These
|
||||
marks influence the result of the aforementioned commands for copying
|
||||
colors and palette entries.
|
||||
|
||||
* Use colors from the Modus themes palette
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:33460ae8-984b-40fd-8baa-383cc5fc2698
|
||||
|
|
@ -4141,6 +4154,246 @@ In this document, we cover ~modus-themes-after-load-theme-hook~ though
|
|||
the user can replace it with ~after-enable-theme-hook~ should they
|
||||
need to (provided they understand the implications).
|
||||
|
||||
* Build on top of the Modus themes
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:86eb375b-9be4-43ce-879a-0686a524a63b
|
||||
:END:
|
||||
|
||||
This section concerns package developers or advanced users.
|
||||
|
||||
The Modus themes can be used as the basis for another theme. The
|
||||
~ef-themes~ and ~standard-themes~ packages (also by Protesilaos), are
|
||||
two such case. Developers may do so to benefit from the extensive
|
||||
customization of the Modus themes and the fact that they are part of
|
||||
core Emacs.
|
||||
|
||||
#+findex: modus-themes-theme
|
||||
#+vindex: modus-themes-registered-items
|
||||
A new theme exists in a file whose directory is in the ~custom-theme-load-path~.
|
||||
The theme file is named =NAME-theme.el=. For example, the ~modus-operandi~
|
||||
theme is in the file =modus-operandi-theme.el=. A theme object can be
|
||||
instantiated with the function ~modus-themes-theme~. This function takes care to
|
||||
(i) declare the theme, (ii) add to it relevant ~theme-properties~, (iii) register
|
||||
it in the ~modus-themes-registered-items~, (iv) make it work with all the faces
|
||||
and customizations documented in this manual, and (v) ~provide-theme~ the theme.
|
||||
|
||||
Concretely, ~modus-themes-theme~ expects the following mandatory arguments:
|
||||
|
||||
- =NAME= :: The name of the new theme as a symbol, like ~modus-operandi~.
|
||||
- =FAMILY= :: The collection this theme is a member of as a symbol,
|
||||
like ~modus-themes~.
|
||||
- =DESCRIPTION= :: A string describing the theme.
|
||||
- =BACKGROUND-MODE= :: The symbol =dark= or =light=, in reference to
|
||||
the theme's background color.
|
||||
- =CORE-PALETTE= :: The symbol of a variable containing a palette with
|
||||
named colors and semantic mappings, like ~modus-operandi-palette~. A
|
||||
palette that does not have at least all the entries of a default
|
||||
Modus palette will eventually not work properly because some face
|
||||
definition will expect a given color. Though the macro does not
|
||||
impose any check in this regard.
|
||||
- =USER-PALETTE= :: The symbol of a user-defined extension to the
|
||||
=CORE-PALETTE=, commensurate with it, though with arbitrary entries.
|
||||
This can be nil, a fully fledged palette, or a short list of
|
||||
entries. Any colors defined therein are treated the same as the
|
||||
=CORE-PALETTE= and can, in practice, be used to apply distinct
|
||||
styles to the =CUSTOM-FACES= and =CUSTOM-VARIABLES= (more below).
|
||||
- =OVERRIDES-PALETTE= :: The symbol of a palette that contains
|
||||
overrides for the above two palettes. It is functionally equivalent
|
||||
to the =USER-PALETTE=, except it is meant to be customized by the
|
||||
end user. Its value can also be nil.
|
||||
#+vindex: modus-themes-faces
|
||||
- Optional =CUSTOM-FACES= :: The symbol of a variable with list of
|
||||
face definitions like those in ~modus-themes-faces~, to extend or
|
||||
modify what core Modus defines. If provided, they override whatever
|
||||
definition is present in ~modus-themes-faces~ in case of a conflict.
|
||||
Derivative themes can thus deviate from the style of core Modus,
|
||||
wherever necessary.
|
||||
#+vindex: modus-themes-custom-variables
|
||||
- Optional =CUSTOM-VARIABLES= :: The symbol of a variable with a list
|
||||
of custom variables (typically user options) like those defined in
|
||||
~modus-themes-custom-variables~. They also override the core Modus
|
||||
definitions in case of a conflict.
|
||||
|
||||
This is an example of a theme that builds on top of ~modus-operandi~,
|
||||
passing all the mandatory arguments, but not the optional ones:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(modus-themes-theme
|
||||
'ef-summer
|
||||
'ef-themes
|
||||
"Legible light warm pink theme with magenta, purple, gold, cyan colors."
|
||||
'light
|
||||
'modus-operandi-palette
|
||||
'ef-summer-palette
|
||||
'ef-summer-palette-overrides)
|
||||
#+end_src
|
||||
|
||||
Here we notice how ~ef-summer~ has ~modus-operandi-palette~ as its
|
||||
=CORE-PALETTE=. This means that if the ~ef-summer-palette~ lacks some
|
||||
entry, the theme will still work and it will inherit the style of
|
||||
~modus-operandi~ for that specific element.
|
||||
|
||||
The ~modus-themes-theme~ macro does not try to be smart about the
|
||||
arguments it is given. It will thus not make any attempt to test if
|
||||
the variables are bound, nor will it declare any customization
|
||||
options. In the above example, the ~ef-summer-palette-overrides~ is a
|
||||
user option that is declared in that theme's file.
|
||||
|
||||
In addition to defining their own colors, themes can provide an
|
||||
entirely custom list of face definitions and customization options.
|
||||
This mirrors the style of ~modus-themes-faces~ and
|
||||
~modus-themes-custom-variables~, as already noted. For example, the
|
||||
~standard-themes~ have a pseudo-3D style for their active mode line.
|
||||
They are declared in this way:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(modus-themes-theme
|
||||
'standard-dark
|
||||
'standard-themes
|
||||
"Like the unthemed dark Emacs, but more consistent."
|
||||
'dark
|
||||
'modus-vivendi-palette
|
||||
'standard-dark-palette
|
||||
'standard-dard-palette-overrides
|
||||
'standard-themes-custom-faces) ; NOTE the additional optional argument
|
||||
#+end_src
|
||||
|
||||
The ~standard-themes-custom-faces~ in this example specifies a list of
|
||||
face definitions like this:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;; Simplified example for illustration purposes
|
||||
(defconst standard-themes-custom-faces
|
||||
'(
|
||||
`(mode-line ((,c :box (:style released-button :color ,border-mode-line-active))))))
|
||||
#+end_src
|
||||
|
||||
Custom faces passed in this way can still define their semantic
|
||||
palette mappings, as illustrated herein where ~border-mode-line-active~
|
||||
corresponds to some named color in the palette of the active theme.
|
||||
|
||||
** Determine what counts as a Modus theme
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:412e3017-81fe-4a95-97a6-225de1867757
|
||||
:END:
|
||||
|
||||
#+findex: modus-themes-get-all-known-themes
|
||||
Once the theme is instantiated, it will be listed in the return value
|
||||
of the function ~modus-themes-get-all-known-themes~. This function
|
||||
accepts an optional argument to filter themes by their given family,
|
||||
as specified at the time of the theme's reification ([[#h:86eb375b-9be4-43ce-879a-0686a524a63b][Build on top of the Modus themes]]).
|
||||
|
||||
#+findex: modus-themes-get-themes
|
||||
The generic function ~modus-themes-get-themes~ is how developers/users
|
||||
can affect what counts as a "Modus" theme. By default,
|
||||
~modus-themes-get-themes~ essentially calls the following, to only
|
||||
return the themes whose family is =modus-themes=:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(modus-themes-get-all-known-themes 'modus-themes)
|
||||
#+end_src
|
||||
|
||||
A new method can be declared with ~cl-defmethod~ to do something else
|
||||
instead. When exactly should that method come into effect is up to the
|
||||
developer/user. In the ~ef-themes~, this is done via a minor mode,
|
||||
that users must opt in to. Here is the complete example:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(define-minor-mode ef-themes-take-over-modus-themes-mode
|
||||
"When enabled, all Modus themes commands consider only Ef themes."
|
||||
:global t
|
||||
:init-value nil)
|
||||
|
||||
(cl-defmethod modus-themes-get-themes (&context (ef-themes-take-over-modus-themes-mode (eql t)))
|
||||
(if-let* ((themes (modus-themes-get-all-known-themes 'ef-themes))
|
||||
(sorted-themes (modus-themes-sort themes 'light)))
|
||||
sorted-themes
|
||||
ef-themes-items))
|
||||
#+end_src
|
||||
|
||||
The ~define-minor-mode~ does not need to do anything else here. Its
|
||||
corresponding function simply takes care to toggle the variable of the
|
||||
same name (i.e. ~ef-themes-take-over-modus-themes-mode~) between ~nil~
|
||||
and non-~nil~. The method will take effect when the minor mode is
|
||||
enabled. In this scenario, "Modus" themes are only those whose family
|
||||
is =ef-themes=. All the Modus commands that switch between themes will
|
||||
thus only work with those Ef themes.
|
||||
|
||||
#+findex: modus-themes-include-derivatives-mode
|
||||
For our part, we define the ~modus-themes-include-derivatives-mode~.
|
||||
It is how users can opt in to the all-inclusive conception of "Modus".
|
||||
In this scenario, every theme that is declared with the aforementioned
|
||||
~modus-themes-theme~ will count as "Modus" and be available to all the
|
||||
relevant commands for switching themes, previewing their palette, and
|
||||
so on.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(define-minor-mode modus-themes-include-derivatives-mode
|
||||
"When enabled, all Modus themes commands cover derivatives as well.
|
||||
Otherwise, they only consider the `modus-themes-items'.
|
||||
|
||||
Derivative theme projects can implement the equivalent of this minor
|
||||
mode plus a method for `modus-themes-get-themes' to filter themes
|
||||
accordingly."
|
||||
:global t
|
||||
:init-value nil)
|
||||
|
||||
(cl-defmethod modus-themes-get-themes (&context (modus-themes-include-derivatives-mode (eql t)))
|
||||
(if-let* ((themes (modus-themes-get-all-known-themes nil))
|
||||
(sorted-themes (modus-themes-sort themes 'light)))
|
||||
sorted-themes
|
||||
modus-themes-items))
|
||||
#+end_src
|
||||
|
||||
** Create convenience commands to load a derivative theme
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:6bfbb4d6-2f23-4d06-827a-8b9a91507a02
|
||||
:END:
|
||||
|
||||
#+findex: modus-themes-define-derivative-command
|
||||
In the previous section, we explored the mechanics of the
|
||||
~modus-themes-get-themes~ ([[#h:412e3017-81fe-4a95-97a6-225de1867757][Determine what counts as a Modus theme]]).
|
||||
Independent of that method, developers can use the macro
|
||||
~modus-themes-define-derivative-command~ to define small wrappers for
|
||||
Modus commands that load a theme only for a specific family of Modus
|
||||
derivatives ([[#h:86eb375b-9be4-43ce-879a-0686a524a63b][Build on top of the Modus themes]]).
|
||||
|
||||
The ~modus-themes-define-derivative-command~ takes two mandatory
|
||||
arguments:
|
||||
|
||||
- =FAMILY= :: the family of the Modus themes derivatives, such as ~ef-themes~.
|
||||
|
||||
#+vindex: ~modus-themes-define-derivative-command-known-suffixes~
|
||||
- =SUFFIX= :: the suffix of the command-to-be-defined. It is one among
|
||||
the symbols listed in ~modus-themes-define-derivative-command-known-suffixes~.
|
||||
|
||||
The suffix is appended to =FAMILY= to derive the symbol of the
|
||||
command. For example, if =SUFFIX= is =rotate= and =FAMILY= is
|
||||
~ef-themes~, then the symbol is ~ef-themes-rotate~.
|
||||
|
||||
Here is how it actually looks in the source code of the Ef themes:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;;;###autoload (autoload 'ef-themes-rotate "ef-themes")
|
||||
(modus-themes-define-derivative-command ef-themes rotate)
|
||||
#+end_src
|
||||
|
||||
This is what the macroexpanded form looks like:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun ef-themes-rotate ()
|
||||
"Like `modus-themes-rotate' but only consider members of the `ef-themes'"
|
||||
(interactive)
|
||||
(cl-letf (((symbol-function 'modus-themes-get-themes)
|
||||
(lambda () (modus-themes-get-all-known-themes 'ef-themes))))
|
||||
(call-interactively 'modus-themes-rotate)))
|
||||
#+end_src
|
||||
|
||||
Sometimes, it makes no sense to re-use an existing Modus command (e.g.
|
||||
because the developer wants to introduce a user option to affect what
|
||||
the command is doing), though this approach with the ~cl-letf~ can
|
||||
still prove useful.
|
||||
|
||||
* Face coverage
|
||||
:properties:
|
||||
:custom_id: h:a9c8f29d-7f72-4b54-b74b-ddefe15d6a19
|
||||
|
|
@ -4165,7 +4418,6 @@ have lots of extensions, so the "full support" may not be 100% true…
|
|||
|
||||
+ abbrev
|
||||
+ ace-window
|
||||
+ agda2-mode
|
||||
+ all-the-icons
|
||||
+ all-the-icons-dired
|
||||
+ all-the-icons-ibuffer
|
||||
|
|
@ -4230,11 +4482,11 @@ have lots of extensions, so the "full support" may not be 100% true…
|
|||
+ eldoc-box
|
||||
+ elfeed
|
||||
+ elfeed-score
|
||||
+ elisp (Emacs Lisp semantic highlighting)
|
||||
+ elpher
|
||||
+ embark
|
||||
+ ement
|
||||
+ emms
|
||||
+ enh-ruby-mode (enhanced-ruby-mode)
|
||||
+ epa
|
||||
+ erc
|
||||
+ ert
|
||||
|
|
@ -4265,6 +4517,7 @@ have lots of extensions, so the "full support" may not be 100% true…
|
|||
+ golden-ratio-scroll-screen
|
||||
+ helpful
|
||||
+ hexl-mode
|
||||
+ hideshow
|
||||
+ highlight-numbers
|
||||
+ highlight-parentheses ([[#h:24bab397-dcb2-421d-aa6e-ec5bd622b913][Note on highlight-parentheses.el]])
|
||||
+ highlight-thing
|
||||
|
|
@ -4280,7 +4533,6 @@ have lots of extensions, so the "full support" may not be 100% true…
|
|||
+ iflipb
|
||||
+ image-dired
|
||||
+ imenu-list
|
||||
+ indium
|
||||
+ info
|
||||
+ info+ (info-plus)
|
||||
+ info-colors
|
||||
|
|
@ -5696,55 +5948,57 @@ The Modus themes are a collective effort. Every bit of work matters.
|
|||
+ Contributions to code or documentation :: Aleksei Gusev, Alex
|
||||
Griffin, Anders Johansson, Antonio Ruiz, Basil L.{{{space()}}}
|
||||
Contovounesios, Björn Lindström, Carlo Zancanaro, Christian Tietze,
|
||||
Daniel Mendler, David Edmondson, Eli Zaretskii, Fritz Grabo, Gautier
|
||||
Ponsinet, Illia Ostapyshyn, Jacob S.{{{space()}}} Gordon, Jared
|
||||
Finder, Kévin Le Gouguec, Koen van Greevenbroek, Kostadin Ninev,
|
||||
Leilei332, Madhavan Krishnan, Manuel Giraud, Markus Beppler, Matthew
|
||||
Stevenson, Mauro Aranda, Nacho Barrientos, Niall Dooley, Nicolas De
|
||||
Jaeghere, Paul David, Pavel Novichkov, Philip Kaludercic, Pierre
|
||||
Téchoueyres, Rahul M.{{{space()}}} Juliato, Rudolf Adamkovič,
|
||||
Sergey Nichiporchik, Shreyas Ragavan, Stefan Kangas, Stephen Berman,
|
||||
Stephen Gildea, Steve Downey, Thanos Apollo, Tomasz Hołubowicz,
|
||||
Utkarsh Singh, Vincent Murphy, Xinglu Chen, Yuanchen Xie, fluentpwn,
|
||||
okamsn.
|
||||
Daniel Mendler, David Edmondson, Eli Zaretskii, Eric Ottosson,
|
||||
Frédéric Giquel, Fritz Grabo, Gautier Ponsinet, Illia Ostapyshyn,
|
||||
Jacob S.{{{space()}}} Gordon, Jared Finder, Jimmy Yuen Ho Wong,
|
||||
Kevin Fleming, Kévin Le Gouguec, Koen van Greevenbroek, Kostadin
|
||||
Ninev, Leilei332, Madhavan Krishnan, Manuel Giraud, Markus Beppler,
|
||||
Matthew Stevenson, Mauro Aranda, Nacho Barrientos, Niall Dooley,
|
||||
Nicolas De Jaeghere, Paul David, Pavel Novichkov, Philip Kaludercic,
|
||||
Pierre Téchoueyres, Rahul M.{{{space()}}} Juliato, Rudolf Adamkovič,
|
||||
Sergey Nichiporchik, Shreyas Ragavan, Stefan x Kangas, Stephen
|
||||
Berman, Stephen Gildea, Steve Downey, Suleyman Boyar, Thanos Apollo,
|
||||
Tomasz Hołubowicz, Utkarsh Singh, Vincent Murphy, Xinglu Chen,
|
||||
Yuanchen Xie, fluentpwn, okamsn.
|
||||
|
||||
+ Ideas and user feedback :: Aaron Jensen, Adam Porter, Adam Spiers,
|
||||
Adrian Manea, Aleksei Pirogov, Alex Griffin, Alex Koen, Alex
|
||||
Peitsinis, Alexandr Semenov, Alexey Shmalko, Alok Singh, Anders
|
||||
Johansson, André Alexandre Gomes, Andrew Tropin, Antonio Hernández
|
||||
Blas, Arif Rezai, Augusto Stoffel, Basil L.{{{space()}}}
|
||||
Contovounesios, Bernd Rellermeyer, Burgess Chang, Charlotte Van
|
||||
Petegem, Christian Tietze, Christopher Dimech, Christopher League,
|
||||
Damien Cassou, Daniel Mendler, Dario Gjorgjevski, David Edmondson,
|
||||
Davor Rotim, Divan Santana, Eliraz Kedmi, Emanuele Michele Alberto
|
||||
Monterosso, Farasha Euker, Feng Shu, Filippo Argiolas, Gautier
|
||||
Ponsinet, Gerry Agbobada, Gianluca Recchia, Gonçalo Marrafa,
|
||||
Guilherme Semente, Gustavo Barros, Hörmetjan Yiltiz, Ilja Kocken,
|
||||
Imran Khan, Iris Garcia, Ivan Popovych, Jabir Ali Ouassou, James
|
||||
Ferguson, Jeremy Friesen, Jerry Zhang, Johannes Grødem, John Haman,
|
||||
John Wick, Jonas Collberg, Jorge Morais, Joshua O'Connor, Julio C.
|
||||
Villasante, Kenta Usami, Kevin Fleming, Kévin Le Gouguec, Kevin
|
||||
Kainan Li, Kostadin Ninev, Laith Bahodi, Lasse Lindner, Len Trigg,
|
||||
Lennart C.{{{space()}}} Karssen, Luis Miguel Castañeda, Magne Hov,
|
||||
Manuel Giraud, Manuel Uberti, Mark Bestley, Mark Burton, Mark
|
||||
Simpson, Marko Kocic, Markus Beppler, Matt Armstrong, Matthias
|
||||
Fuchs, Mattias Engdegård, Mauro Aranda, Maxime Tréca, Michael
|
||||
Goldenberg, Morgan Smith, Morgan Willcock, Murilo Pereira, Nicky van
|
||||
Foreest, Nicolas De Jaeghere, Nicolas Semrau, Olaf Meeuwissen,
|
||||
Oliver Epper, Pablo Stafforini, Paul Poloskov, Pengji Zhang, Pete
|
||||
Kazmier, Peter Wu, Philip Kaludercic, Pierre Téchoueyres, Przemysław
|
||||
Kryger, Robert Hepple, Roman Rudakov, Russell Sim, Ryan Phillips,
|
||||
Rytis Paškauskas, Rudolf Adamkovič, Sam Kleinman, Samuel Culpepper,
|
||||
Saša Janiška, Shreyas Ragavan, Simon Pugnet, Steve Downey, Tassilo
|
||||
Blas, Arif Rezai, Ashton Wiersdorf, Augusto Stoffel, Basil
|
||||
L.{{{space()}}} Contovounesios, Bernd Rellermeyer, Burgess Chang,
|
||||
Charlotte Van Petegem, Christian Tietze, Christopher Dimech,
|
||||
Christopher League, Damien Cassou, Daniel Mendler, Dario
|
||||
Gjorgjevski, David Edmondson, Davor Rotim, Divan Santana, Eliraz
|
||||
Kedmi, Emanuele Michele Alberto Monterosso, Eshel Yaron, Farasha
|
||||
Euker, Feng Shu, Filippo Argiolas, Gautier Ponsinet, Gerry Agbobada,
|
||||
Gianluca Recchia, Gonçalo Marrafa, Guilherme Semente, Gustavo
|
||||
Barros, Hörmetjan Yiltiz, Ilja Kocken, Imran Khan, Iris Garcia, Ivan
|
||||
Popovych, Jabir Ali Ouassou, James Ferguson, Jeremy Friesen, Jerry
|
||||
Zhang, Johannes Grødem, John Haman, John Sullivan, John Wick, Jonas
|
||||
Collberg, Jorge Morais, Joshua O'Connor, Julio C. Villasante, Kenta
|
||||
Usami, Kevin Fleming, Kévin Le Gouguec, Kevin Kainan Li, Kostadin
|
||||
Ninev, Laith Bahodi, Lasse Lindner, Len Trigg, Lennart
|
||||
C.{{{space()}}} Karssen, Luis Miguel Castañeda, Magne Hov, Manuel
|
||||
Giraud, Manuel Uberti, Mark Bestley, Mark Burton, Mark Simpson,
|
||||
Marko Kocic, Markus Beppler, Matt Armstrong, Matthias Fuchs, Mattias
|
||||
Engdegård, Mauro Aranda, Maxime Tréca, Michael Goldenberg, Morgan
|
||||
Smith, Morgan Willcock, Murilo Pereira, Nicky van Foreest, Nicolas
|
||||
De Jaeghere, Nicolas Semrau, Olaf Meeuwissen, Oliver Epper, Pablo
|
||||
Stafforini, Paul Poloskov, Pengji Zhang, Pete Kazmier, Peter Wu,
|
||||
Philip Kaludercic, Pierre Téchoueyres, Przemysław Kryger, Robert
|
||||
Hepple, Roman Rudakov, Russell Sim, Ryan Phillips, Rytis Paškauskas,
|
||||
Rudolf Adamkovič, Sam Kleinman, Samuel Culpepper, Saša Janiška,
|
||||
Shreyas Ragavan, Simon Pugnet, Stéphane Marks, Steve Downey, Tassilo
|
||||
Horn, Thanos Apollo, Thibaut Verron, Thomas Heartman, Togan
|
||||
Muftuoglu, Tony Zorman, Trey Merkley, Tomasz Hołubowicz, Toon Claes,
|
||||
Uri Sharf, Utkarsh Singh, Vincent Foley, Zoltan Kiraly. As well as
|
||||
users: Ben, CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux,
|
||||
Fredrik, Moesasji, Nick, Summer Emacs, TheBlob42, TitusMu, Trey,
|
||||
ZharMeny, bepolymathe, bit9tream, bangedorrunt, derek-upham, doolio,
|
||||
fleimgruber, gitrj95, iSeeU, jixiuf, ltmsyvag, okamsn,
|
||||
pedro-nonfree, pRot0ta1p, shipmints, soaringbird, tumashu,
|
||||
wakamenod.
|
||||
bepolymathe, bit9tream, bangedorrunt, case-lambda, chainedghost,
|
||||
derek-upham, doolio, fleimgruber, gitrj95, iSeeU, jixiuf, ltmsyvag,
|
||||
okamsn, pedro-nonfree, pRot0ta1p, shimeike, shipmints, soaringbird,
|
||||
tumashu, wakamenod.
|
||||
|
||||
+ Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii,
|
||||
Glenn Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
% Load plain if necessary, i.e., if running under initex.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
%
|
||||
\def\texinfoversion{2025-07-31.19}
|
||||
\def\texinfoversion{2025-10-25.20}
|
||||
%
|
||||
% Copyright 1985, 1986, 1988, 1990-2025 Free Software Foundation, Inc.
|
||||
%
|
||||
|
|
@ -9952,7 +9952,7 @@
|
|||
% node and anchor labels. And \xrdef uses it to construct the
|
||||
% lists of floats.
|
||||
%
|
||||
\edef\tmp{\noexpand\setref{\floatlabel}{Yfloat}%
|
||||
\edef\tmp{\noexpand\setref{\noexpand\floatlabel}{Yfloat}%
|
||||
{\floatmagic=\safefloattype}}%
|
||||
\tmp
|
||||
}%
|
||||
|
|
|
|||
|
|
@ -678,7 +678,10 @@ not auto loaded by Emacs. All examples require @value{tramp} to be
|
|||
installed and loaded:
|
||||
|
||||
@lisp
|
||||
@group
|
||||
(require 'tramp)
|
||||
(customize-set-variable 'tramp-verbose 6 "Enable remote command traces")
|
||||
@end group
|
||||
@end lisp
|
||||
|
||||
For functions used to configure @value{tramp}, the following clause
|
||||
|
|
@ -5363,7 +5366,7 @@ The package works successfully on @w{Emacs 28}, @w{Emacs 29}, @w{Emacs
|
|||
|
||||
While Unix and Unix-like systems are the primary remote targets,
|
||||
@value{tramp} has equal success connecting to other platforms, such as
|
||||
MS Windows 7/8/10.
|
||||
MS Windows 10/11.
|
||||
|
||||
|
||||
@item
|
||||
|
|
@ -5378,7 +5381,8 @@ responsiveness slows down. Some suggestions within the scope of
|
|||
@itemize @minus
|
||||
@item
|
||||
Use an external method, such as @option{scp}, which are faster than
|
||||
internal methods for large files.
|
||||
internal methods for large files. Set
|
||||
@code{tramp-use-scp-direct-remote-copying} to non-@code{nil}.
|
||||
|
||||
@item
|
||||
Keep the file @code{tramp-persistency-file-name}, which is where
|
||||
|
|
@ -6844,6 +6848,11 @@ they are kept. Example:
|
|||
@end lisp
|
||||
@end defun
|
||||
|
||||
@findex tramp-expand-script
|
||||
Shell scripts intended for the @code{tramp-sh} backend are used as a
|
||||
format string. They must observe the restrictions for format
|
||||
specifiers, as documented in @code{tramp-expand-script}.
|
||||
|
||||
|
||||
@node Traces and Profiles
|
||||
@chapter How to Customize Traces
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ to look up issue github#1234, go to
|
|||
https://github.com/joaotavora/eglot/issues/1234.
|
||||
|
||||
|
||||
* Changes in upcoming Eglot
|
||||
* Changes in Eglot 1.19 (23/10/2025)
|
||||
|
||||
** Support for call and type hierarchies
|
||||
|
||||
|
|
@ -36,9 +36,9 @@ performance.
|
|||
** Suggests code actions at point
|
||||
|
||||
A commonly requested feature, Eglot will use ElDoc to ask the server for
|
||||
code actions available at point, indicating to the user, who may use
|
||||
execute them quickly via the usual 'eglot-code-actions' command.
|
||||
Customize with 'eglot-code-action-indications' and
|
||||
code actions available at point. This is indicated to the user, who may
|
||||
quickly execute via the usual 'eglot-code-actions' command or with the
|
||||
mouse. Customize with 'eglot-code-action-indications' and
|
||||
'eglot-code-action-indicator'.
|
||||
|
||||
** Mode line is customizable
|
||||
|
|
@ -49,10 +49,10 @@ or removing symbols and strings from the customizable variable
|
|||
|
||||
** Improved diagnostic-reporting performance and bugfixes (bug#77588)
|
||||
|
||||
Eglot remembers the LSP document version to which diagonstics reported
|
||||
by the LSP server pertain. This helps in skipping useless or harmful
|
||||
updates, avoiding flakiness with code actions and flickering overlays
|
||||
when the buffer is changed.
|
||||
Eglot remembers the LSP document version pertaining to the diagnostics
|
||||
reported by the LSP server. This helps in skipping useless or confusing
|
||||
diagnostic updates, avoids flakiness with code actions and prevents
|
||||
flickering overlays when the buffer is changed.
|
||||
|
||||
** Markdown links migrating to *eldoc* buffer now clickable (bug#79552)
|
||||
|
||||
|
|
@ -60,6 +60,12 @@ Eglot now preserves crucial properties in the Markdown documentation
|
|||
provided by the LSP server, fixing a longstanding bug with clickable
|
||||
hyperlinks. See also github#1238.
|
||||
|
||||
** Compliant shutdown requests (bug#79653, bug#66144, github#1540)
|
||||
|
||||
Eglot now complies with the latest LSP spec, which mandates that the
|
||||
shutdown request mustn't have any parameters. This should fix problems
|
||||
with some servers.
|
||||
|
||||
|
||||
* Changes in Eglot 1.18 (20/1/2025)
|
||||
|
||||
|
|
|
|||
14
etc/ERC-NEWS
14
etc/ERC-NEWS
|
|
@ -11,6 +11,20 @@ This file is about changes in ERC, the powerful, modular, and
|
|||
extensible IRC (Internet Relay Chat) client distributed with
|
||||
GNU Emacs since Emacs version 22.1.
|
||||
|
||||
|
||||
* Changes in ERC 5.6.2
|
||||
|
||||
** Changes in the library API.
|
||||
|
||||
*** Accessors like 'erc-channel-user-voice' may ignore assignments.
|
||||
ERC now silently ignores attempts to enable certain status flags on
|
||||
'erc-channel-user' objects if the connection's "PREFIX" parameter omits
|
||||
them. In the future, ERC will likely signal an error if such an attempt
|
||||
is made. Users can preview this potentially disruptive behavior by
|
||||
setting the new variable 'erc-channel-user-signal-if-status-unknown' to
|
||||
t. This change stems from a bug fix for a regression affecting ERC 5.6
|
||||
and 5.6.1 in which these accessors mishandled unsupported flags.
|
||||
|
||||
|
||||
* Changes in ERC 5.6.1
|
||||
|
||||
|
|
|
|||
235
etc/NEWS
235
etc/NEWS
|
|
@ -277,6 +277,15 @@ minibuffer window using the 'minibuffer-nonselected' face in case
|
|||
when the minibuffer window is no longer selected, but the minibuffer
|
||||
is still waiting for input.
|
||||
|
||||
+++
|
||||
*** 'read-multiple-choice' now uses the minibuffer to read a character.
|
||||
It still can use 'read-key' when the variable
|
||||
'read-char-choice-use-read-key' is non-nil.
|
||||
|
||||
*** 'map-y-or-n-p' now uses the minibuffer to read a character.
|
||||
It still can use 'read-key' when the variable
|
||||
'y-or-n-p-use-read-key' is non-nil.
|
||||
|
||||
** Mouse
|
||||
|
||||
*** New mode 'mouse-shift-adjust-mode' extends selection with 'S-<mouse-1>'.
|
||||
|
|
@ -435,6 +444,21 @@ This will inhibit implied resizing while a new frame is made and can be
|
|||
useful on tiling window managers where the initial frame size should be
|
||||
specified by external means.
|
||||
|
||||
+++
|
||||
*** New option 'alter-fullscreen-frames'.
|
||||
This option is useful to maintain a consistent state when attempting to
|
||||
resize fullscreen frames. It defaults to 'inhibit' on NS builds which
|
||||
means that a fullscreen frame would not change size. It defaults to nil
|
||||
everywhere else which means that the window manager is supposed to
|
||||
either resize the frame and change the fullscreen status accordingly or
|
||||
keep the frame size unchanged. The value t means to first reset the
|
||||
fullscreen status and then resize the frame.
|
||||
|
||||
---
|
||||
*** Frames can now be renamed to F<number> on text terminals.
|
||||
Unlike with other frame names, an attempt to rename to F<number> throws
|
||||
an error when a frame of that name already exists.
|
||||
|
||||
** Mode Line
|
||||
|
||||
+++
|
||||
|
|
@ -666,6 +690,12 @@ or strings. If set to 'on-mismatch', mismatched parens inside comments
|
|||
and strings will not be highlighted. If set to nil (the default),
|
||||
highlight the parens wherever they are.
|
||||
|
||||
+++
|
||||
** New user option 'view-lossage-auto-refresh'.
|
||||
If this option is non-nil, the lossage buffer in 'view-lossage' will be
|
||||
refreshed automatically for each new input keystroke and command
|
||||
performed.
|
||||
|
||||
** Change in SVG foreground color handling.
|
||||
SVG images no longer have the 'fill' attribute set to the value of
|
||||
':foreground' or the current text foreground color. The 'currentcolor'
|
||||
|
|
@ -685,6 +715,12 @@ debugger and show the backtrace. If 'debug-on-error' is nil, these
|
|||
errors will be sent to 'emacsclient', as before, and will be displayed
|
||||
on the terminal from which 'emacsclient' was invoked.
|
||||
|
||||
+++
|
||||
** Empty string arguments to emacsclient are no longer ignored.
|
||||
Emacs previously discarded arguments to emacsclient of zero length, such
|
||||
as in 'emacsclient --eval "(length (pop server-eval-args-left))" ""'.
|
||||
These are no longer discarded.
|
||||
|
||||
|
||||
* Editing Changes in Emacs 31.1
|
||||
|
||||
|
|
@ -1025,6 +1061,18 @@ Now 'treesit-explore-mode' (or 'treesit-explore') prompts for a parser
|
|||
rather than a language, and it is now possible to select a local parser
|
||||
at point to explore.
|
||||
|
||||
+++
|
||||
*** Tree-sitter query predicate :equal, :match, and :pred are deprecated
|
||||
Use :eq?, :match?, :pred? instead. The change is because newer
|
||||
tree-sitter library mandates query predicates to end with question mark.
|
||||
Emacs will transparently converts :equal, :match and :pred to :eq?,
|
||||
:match? and :pred?, respectively, so existing queries still work fine
|
||||
with latest tree-sitter library. Predicate :equal is changed to :eq? to
|
||||
better follow tree-sitter’s convention. Also, the :match? predicates
|
||||
can now take the regexp as either the first or second argument, so it
|
||||
works with both tree-sitter convention (regexp arg second) and Emacs
|
||||
convention (regexp arg first).
|
||||
|
||||
** Hideshow
|
||||
|
||||
+++
|
||||
|
|
@ -1057,6 +1105,21 @@ The new icons 'hs-indicator-show' and 'hs-indicator-hide' can be used
|
|||
to customize the indicators appearance only if 'hs-indicator-type' is
|
||||
set to 'margin' or nil.
|
||||
|
||||
+++
|
||||
*** New user option 'hs-hide-block-behavior'.
|
||||
This user option controls how 'hs-hide-block' and 'hs-toggle-hiding'
|
||||
should hide a block. If set to 'after-bol', hide the innermost block to
|
||||
which the current line belongs. If set to 'after-cursor', hide the block
|
||||
after cursor position. By default this is set to 'after-bol'.
|
||||
|
||||
+++
|
||||
*** The variable 'hs-special-modes-alist' is now obsolete.
|
||||
Instead of customizing Hideshow for a mode by setting the elements of
|
||||
'hs-special-modes-alist', such as START, COMMENT-START,
|
||||
FORWARD-SEXP-FUNC, etc., major mode authors should set the corresponding
|
||||
buffer-local variables 'hs-block-start-regexp', 'hs-c-start-regexp',
|
||||
'hs-forward-sexp-function', etc.
|
||||
|
||||
** C-ts mode
|
||||
|
||||
+++
|
||||
|
|
@ -1928,6 +1991,10 @@ the Tramp manual.
|
|||
|
||||
** Diff
|
||||
|
||||
---
|
||||
*** 'diff-mode' now refrains from automatically refining big hunks.
|
||||
What is big is defined by the new 'diff-refine-threshold' variable.
|
||||
|
||||
---
|
||||
*** New command 'diff-kill-ring-save'.
|
||||
This command copies to the 'kill-ring' a region of text modified
|
||||
|
|
@ -1963,6 +2030,13 @@ They suggest the previous revision as the default for REV1, not the last
|
|||
one as before. This makes them different from 'vc-diff' and
|
||||
'vc-root-diff' when those are called without a prefix argument.
|
||||
|
||||
+++
|
||||
*** 'diff-apply-buffer' now considers the region and can reverse-apply.
|
||||
If the region is active, this command now applies all hunks that the
|
||||
region overlaps; otherwise, it applies all hunks.
|
||||
With a prefix argument, it now reverse-applies the hunks.
|
||||
This matches the existing prefix argument to 'diff-apply-hunk'.
|
||||
|
||||
** Ediff
|
||||
|
||||
+++
|
||||
|
|
@ -2035,6 +2109,24 @@ name of the directory now reverts the Dired buffer.
|
|||
With a new value of the prefix argument (1), this command copies file
|
||||
names relative to the root directory of the current project.
|
||||
|
||||
+++
|
||||
*** Warning when Dired displays a file name with a literal newline.
|
||||
On visiting a directory that contains a file whose name has a newline,
|
||||
and Dired displays that character as a literal newline, Emacs now
|
||||
automatically pops up a buffer warning that such a display can be
|
||||
problematic for Dired and showing a way to change the display to use the
|
||||
unproblematic character '\n'.
|
||||
|
||||
+++
|
||||
*** New user option 'dired-auto-toggle-b-switch'.
|
||||
When this user option is non-nil and 'dired-listing-switches' does not
|
||||
include the '-b' switch, then on visiting a directory containing a file
|
||||
whose name has a newline, Emacs automatically adds the '-b' switch and
|
||||
redisplays the directory in Dired to show '\n' in the file name instead
|
||||
of a literal newline. This prevents executing many Dired operations on
|
||||
such a file from failing and signaling an error. The default value of
|
||||
this user option is nil.
|
||||
|
||||
** Grep
|
||||
|
||||
+++
|
||||
|
|
@ -2445,15 +2537,6 @@ View mode, copies to the kill ring the ID of the revision at point in
|
|||
the log entry. If there are marked revisions, it copies the IDs of
|
||||
those, instead.
|
||||
|
||||
** Diff mode
|
||||
|
||||
+++
|
||||
*** 'diff-apply-buffer' now considers the region and can reverse-apply.
|
||||
If the region is active, this command now applies all hunks that the
|
||||
region overlaps; otherwise, it applies all hunks.
|
||||
With a prefix argument, it now reverse-applies the hunks.
|
||||
This matches the existing prefix argument to 'diff-apply-hunk'.
|
||||
|
||||
** Package
|
||||
|
||||
+++
|
||||
|
|
@ -2610,7 +2693,7 @@ Meant to be given a global binding convenient to the user. Example:
|
|||
|
||||
- 'speedbar-prefer-window' tells 'speedbar' to open a side window
|
||||
instead of a frame.
|
||||
- 'speedbar-dedicated-window' defines whether the 'speedbar' is
|
||||
- 'speedbar-window-dedicated-window' defines whether 'speedbar' is
|
||||
displayed in a dedicated window.
|
||||
- 'speedbar-window-default-width' defines the initial width of the
|
||||
'speedbar-window'.
|
||||
|
|
@ -2644,6 +2727,13 @@ New faces have been added to 'icomplete-vertical-mode':
|
|||
|
||||
** Customize
|
||||
|
||||
+++
|
||||
*** New function 'custom-initialize-after-file-load'.
|
||||
Useful to delay initialization to the end of the file, so it can use
|
||||
functions defined later than the variable, as is common for minor modes.
|
||||
'define-globalized-minor-mode' now automatically uses it if the
|
||||
init-value is non-nil.
|
||||
|
||||
---
|
||||
*** New major mode 'Customize-dirlocals-mode'.
|
||||
This is intended for customizing directory-local variables in the
|
||||
|
|
@ -2792,6 +2882,10 @@ The tabulated listings produced by 'flymake-show-buffer-diagnostics' and
|
|||
'flymake-show-project-diagnostics' now automatically adjust their column
|
||||
widths based on content, optimizing display space and readability.
|
||||
|
||||
*** New value 'auto' of user option 'flymake-indicator-type'.
|
||||
This value set by default tries to use fringes if possible,
|
||||
otherwise falls back to margins.
|
||||
|
||||
*** New user option 'elisp-flymake-byte-compile-executable'.
|
||||
This allows customizing the Emacs executable used for Flymake byte
|
||||
compilation in 'emacs-lisp-mode'. This option should be set when editing
|
||||
|
|
@ -2913,6 +3007,92 @@ CPerl mode creates imenu entries for ":writer" generated accessors and
|
|||
recognizes the new functions "all" and "any".
|
||||
See https://perldoc.perl.org/5.42.0/perldelta for details.
|
||||
|
||||
** Zone
|
||||
Zone can scramble multiple windows across multiple frames; it may also
|
||||
reorganize frames to be a single window. As before, when a key or mouse
|
||||
event occurs, all of the frames and windows are restored to their
|
||||
original state. This is controlled by three new customization flags
|
||||
which control the use of frames and windows beyond the currently active
|
||||
ones. It is identifies suitable buffers for zoning out so that
|
||||
potentially important buffer contents are not exposed.
|
||||
|
||||
When a zone program encounters an error, it will apologize for a minute
|
||||
and then start a new round of zoning. Previously, it just kept
|
||||
apologizing. Finally, zone does not pollute the *Messages* buffer with
|
||||
extraneous messages.
|
||||
|
||||
**** New function 'zone-add-program'
|
||||
This function accepts a symbol, whose name starts with "zone-pgm-", that
|
||||
runs a zone program when 'zone' is invoked. It adds the program to the
|
||||
'zone-programs' vector if it is not already present.''
|
||||
|
||||
**** New functipon 'zone-remove-program'
|
||||
This function removes a program from the 'zone-programs' vector. If the
|
||||
parameter is a symbol, and the symbol is present in the vector, it is
|
||||
removed. If the parameter is a string, it is a regular expression that
|
||||
will remove any programs whose name matches the parameter pattern.
|
||||
|
||||
*** Multi-window and -frame customization options
|
||||
Prior to this update, zone would only (safely) scramble the contents of
|
||||
the current window on the current frame. Now, with the use of these
|
||||
three options, it is possible to scramble to contents of all windows
|
||||
across all frames. It is also possible to make frames single window
|
||||
displays while zoning. But when zoning is interrupted by a key- or
|
||||
mouse-press, the original window layout across all frames is restored.
|
||||
|
||||
**** New user option 'zone-delete-other-windows'
|
||||
When non-nil, the frame is made into a single full frame window to hold
|
||||
the zoned buffer. If all frames were to be used (`zone-all-frames' set
|
||||
to non-nil), then all frames are converted to single window frames.
|
||||
|
||||
**** New user option 'zone-all-frames'
|
||||
When non-nil, zone will appear on all visible frames. While the buffer
|
||||
scrambling will appear on each frame, it will be the same buffer so they
|
||||
will all behave the same way.
|
||||
|
||||
**** New user option 'zone-all-windows-in-frame'
|
||||
When non-nil, the zoned buffer will be mapped to all of the windows
|
||||
present on the frame. If the option is nil, then only the selected
|
||||
window will show the zoned buffer. Note, however, that each window
|
||||
holding the zoned buffer is showing the same zoned buffer.
|
||||
|
||||
*** Selecting source buffers suitable for zoning
|
||||
When the idle timer, or the user, invokes `zone', the current buffer may
|
||||
not be appropriate as the source of the zone buffer. For example,
|
||||
encrypted buffers, empty buffers, or specialized buffers like
|
||||
`*Messages*' probably shouldn't have their content splashed across zoned
|
||||
windows. So the selection of a suitable buffer for zoning can be controlled with a variable that identifies buffers with concerns.
|
||||
|
||||
**** New variable 'zone-ignored-buffers'
|
||||
The variable is a list of criteria for excluding a buffer from
|
||||
consideration as the source of zoning. The list has entries that are
|
||||
tested against each buffer until a suitable one is found. The criteria
|
||||
can be a symbol that ends in `-mode' which excludes buffers that are in
|
||||
a mode derived from the specified mode. It may also be a function-bound
|
||||
symbol or lambda expression that is called with a buffer that returns a
|
||||
non-nil value if it should not be the zone source. Finally, an entry
|
||||
can also be a regular expression string that must not match the buffer's
|
||||
name.
|
||||
|
||||
Initially, the list excludes buffers in a special-mode, in an
|
||||
image-mode, contains an encrypted file, is an empty buffer, is a hidden
|
||||
buffer, or is the `*scratch*' buffer. If it cannot locate any
|
||||
acceptable buffers, it will begrudgingly use the scratch buffer.
|
||||
|
||||
*** Zone hooks
|
||||
Hooks have been added to notify programs of the start and end of zone activity. For example, you may want to credit time spent zoning as a Pomodoro break.
|
||||
|
||||
**** New hook 'zone-start-hook'
|
||||
This hook contains functions that are invoked when zoning is about to begin.
|
||||
|
||||
**** New hook 'zone-finish-hook'
|
||||
This hook contains functions that are invoked when zoning has finished.
|
||||
|
||||
**** New variable 'zone-time-elapsed-while-zoning'
|
||||
This is the elapsed time between the start and finish hooks. So this
|
||||
represents how long Emacs was zoning. Zone calculates this so that the
|
||||
finish hook can communicate this to other modes if necessary.
|
||||
|
||||
|
||||
* New Modes and Packages in Emacs 31.1
|
||||
|
||||
|
|
@ -2965,6 +3145,16 @@ Other functions that use 'aset' to modify string data, such as
|
|||
'subst-char-in-string' with a non-nil INPLACE argument, will signal an
|
||||
error if called with arguments that would violate these rules.
|
||||
|
||||
+++
|
||||
** More program constants are combined by the compiler.
|
||||
The compiler now unifies more constants that are 'equal' for better code
|
||||
generation. This does not affect correct programs but may expose some
|
||||
coding mistakes. For example,
|
||||
|
||||
(eq (cdr '(1 2 3)) '(2 3)))
|
||||
|
||||
may return either nil or t.
|
||||
|
||||
** Nested backquotes are not supported any more in Pcase patterns.
|
||||
|
||||
---
|
||||
|
|
@ -3071,6 +3261,16 @@ See the new argument in 'make-thread'. The default value allows the
|
|||
thread's current buffer to be killed by another thread. This does not
|
||||
apply to the main thread's buffer.
|
||||
|
||||
---
|
||||
** Defining or modifying a face so that it inherits from itself signals error.
|
||||
Calling any function that defines or modifies a face in a way that
|
||||
causes cyclical inheritance (i.e., the face inherits from itself, either
|
||||
directly or indirectly) now signals an error. Previously, Lisp programs
|
||||
could get away with this, and the problem would either be detected at
|
||||
display time or even cause Emacs to hang trying to display such a face.
|
||||
Affected APIs include 'defface', 'set-face-attribute', their callers,
|
||||
and other similar functions.
|
||||
|
||||
|
||||
* Lisp Changes in Emacs 31.1
|
||||
|
||||
|
|
@ -3134,6 +3334,15 @@ and signal an error if they are given a non-number.
|
|||
They return non-nil if an integer is odd or even, respectively, and
|
||||
signal an error if they are given a non-integer.
|
||||
|
||||
+++
|
||||
** New functions 'drop-while' and 'take-while'.
|
||||
These work like 'drop' and 'take' but use a predicate instead of counting.
|
||||
|
||||
+++
|
||||
** New functions 'any' and 'all'.
|
||||
These return non-nil for lists where any and all elements, respectively,
|
||||
satisfy a given predicate.
|
||||
|
||||
+++
|
||||
** The 'defvar-local' macro second argument is now optional.
|
||||
This means that you can now call it with just one argument, like
|
||||
|
|
@ -3340,6 +3549,12 @@ This is an abbreviation for using the name of the keymap as the prefix
|
|||
command name. E.g., '(defvar-keymap foo-map :prefix t)' is equivalent
|
||||
to '(defvar-keymap foo-map :prefix 'foo-map)'.
|
||||
|
||||
---
|
||||
** Emacs PGTK toolkit respects dark and light modes.
|
||||
Emacs when built with the pure GTK toolkit now respects desktop
|
||||
dark and light modes for drawing a GTK toolbar and widgets,
|
||||
automatically toggling between them.
|
||||
|
||||
|
||||
* Changes in Emacs 31.1 on Non-Free Operating Systems
|
||||
|
||||
|
|
|
|||
|
|
@ -1304,7 +1304,7 @@ Emacs will select some other font instead.
|
|||
The only workaround is not to choose such font variants as the default
|
||||
font when running Emacs on MS-Windows.
|
||||
|
||||
** On OpenBSD, color Emoji are not supported by default.
|
||||
** On OpenBSD before version 7.8, color Emoji are not supported by default.
|
||||
|
||||
The system's FreeType library is not built with libpng support, so it
|
||||
can't display color emoji. This is due to the fact that, on OpenBSD,
|
||||
|
|
@ -1324,6 +1324,7 @@ following those steps:
|
|||
5. Build and install Xenocara (also, see release(8)).
|
||||
|
||||
Note that this support will be gone after each OpenBSD's system upgrade.
|
||||
Also note that upgrading to OpenBSD 7.8 solves this whole issue.
|
||||
|
||||
* Internationalization problems
|
||||
|
||||
|
|
|
|||
28
etc/TODO
28
etc/TODO
|
|
@ -547,6 +547,34 @@ One way of doing this is to start with fx's dynamic loading, and use it
|
|||
to implement things like auto-loaded buffer parsers and database
|
||||
access in cases which need more than Lisp.
|
||||
|
||||
** In Info, support image files generated from @math expressions
|
||||
See this discussion on the Texinfo mailing list for the details:
|
||||
|
||||
https://lists.gnu.org/archive/html/bug-texinfo/2024-12/msg00061.html
|
||||
https://lists.gnu.org/archive/html/bug-texinfo/2025-01/msg00004.html
|
||||
https://lists.gnu.org/archive/html/bug-texinfo/2025-11/msg00002.html
|
||||
|
||||
The job here is to figure out the image attributes that will produce
|
||||
good-looking display of math formulas in images created by LaTeX from
|
||||
Texinfo @math elements. The above discussion concluded that just
|
||||
showing these images as any other image sometimes produces misaligned
|
||||
display and sometimes the size of the image needs tweaking to make it
|
||||
similar to the default face's font used for showing the text in Info
|
||||
buffers. The assumption is that using some non-default attributes of
|
||||
image specs, like :ascent, :margin, and :height, and perhaps also using
|
||||
:scale with the value 'auto', should be able to improve the display.
|
||||
The conclusions should be communicated to the Texinfo developers, so
|
||||
that 'makeinfo' could embed the necessary image attributes in the Info
|
||||
output it produces from @math.
|
||||
|
||||
The function in info.el which handles image display is
|
||||
'Info-display-images-node'.
|
||||
|
||||
The message below in Texinfo mailing list archives includes files that
|
||||
could be used to work in this feature:
|
||||
|
||||
https://lists.gnu.org/archive/html/bug-texinfo/2025-11/msg00012.html
|
||||
|
||||
** Imenu could be extended into a file-structure browsing mechanism
|
||||
This could use code like that of customize-groups.
|
||||
|
||||
|
|
|
|||
|
|
@ -26,490 +26,35 @@
|
|||
;;
|
||||
;; The Modus themes conform with the highest standard for
|
||||
;; color-contrast accessibility between background and foreground
|
||||
;; values (WCAG AAA). Please refer to the official Info manual for
|
||||
;; further documentation (distributed with the themes, or available
|
||||
;; at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
;; values (WCAG AAA). They are also highly customizable and can even
|
||||
;; be used as the basis for other themes. Please refer to the official
|
||||
;; Info manual for further documentation (distributed with the themes,
|
||||
;; or available at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
|
||||
(eval-and-compile
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
;;;###theme-autoload
|
||||
(deftheme modus-operandi-deuteranopia
|
||||
"Deuteranopia-optimized theme with a white background.
|
||||
This variant is optimized for users with red-green color
|
||||
deficiency (deuteranopia). It conforms with the highest
|
||||
legibility standard for color contrast between background and
|
||||
foreground in any given piece of text, which corresponds to a
|
||||
minimum contrast in relative luminance of 7:1 (WCAG AAA
|
||||
standard)."
|
||||
:background-mode 'light
|
||||
:kind 'color-scheme
|
||||
:family 'modus)
|
||||
|
||||
(defconst modus-operandi-deuteranopia-palette
|
||||
'(
|
||||
;;; Basic values
|
||||
|
||||
(bg-main "#ffffff")
|
||||
(bg-dim "#f2f2f2")
|
||||
(fg-main "#000000")
|
||||
(fg-dim "#595959")
|
||||
(fg-alt "#193668")
|
||||
(bg-active "#c4c4c4")
|
||||
(bg-inactive "#e0e0e0")
|
||||
(border "#9f9f9f")
|
||||
|
||||
;;; Common accent foregrounds
|
||||
|
||||
(red "#a60000")
|
||||
(red-warmer "#972500")
|
||||
(red-cooler "#a0132f")
|
||||
(red-faint "#7f0000")
|
||||
(red-intense "#d00000")
|
||||
(green "#006800")
|
||||
(green-warmer "#316500")
|
||||
(green-cooler "#00663f")
|
||||
(green-faint "#2a5045")
|
||||
(green-intense "#008900")
|
||||
(yellow "#695500")
|
||||
(yellow-warmer "#973300")
|
||||
(yellow-cooler "#77492f")
|
||||
(yellow-faint "#624416")
|
||||
(yellow-intense "#808000")
|
||||
(blue "#0031a9")
|
||||
(blue-warmer "#3548cf")
|
||||
(blue-cooler "#0000b0")
|
||||
(blue-faint "#003497")
|
||||
(blue-intense "#0000ff")
|
||||
(magenta "#721045")
|
||||
(magenta-warmer "#8f0075")
|
||||
(magenta-cooler "#531ab6")
|
||||
(magenta-faint "#7c318f")
|
||||
(magenta-intense "#dd22dd")
|
||||
(cyan "#005e8b")
|
||||
(cyan-warmer "#3f578f")
|
||||
(cyan-cooler "#005f5f")
|
||||
(cyan-faint "#005077")
|
||||
(cyan-intense "#008899")
|
||||
|
||||
;;; Uncommon accent foregrounds
|
||||
|
||||
(rust "#8a290f")
|
||||
(gold "#80601f")
|
||||
(olive "#56692d")
|
||||
(slate "#2f3f83")
|
||||
(indigo "#4a3a8a")
|
||||
(maroon "#731c52")
|
||||
(pink "#7b435c")
|
||||
|
||||
;;; Common accent backgrounds
|
||||
|
||||
(bg-red-intense "#ff8f88")
|
||||
(bg-green-intense "#8adf80")
|
||||
(bg-yellow-intense "#f3d000")
|
||||
(bg-blue-intense "#bfc9ff")
|
||||
(bg-magenta-intense "#dfa0f0")
|
||||
(bg-cyan-intense "#a4d5f9")
|
||||
|
||||
(bg-red-subtle "#ffcfbf")
|
||||
(bg-green-subtle "#b3fabf")
|
||||
(bg-yellow-subtle "#fff576")
|
||||
(bg-blue-subtle "#ccdfff")
|
||||
(bg-magenta-subtle "#ffddff")
|
||||
(bg-cyan-subtle "#bfefff")
|
||||
|
||||
(bg-red-nuanced "#ffe8e8")
|
||||
(bg-green-nuanced "#e0f6e0")
|
||||
(bg-yellow-nuanced "#f8f0d0")
|
||||
(bg-blue-nuanced "#ecedff")
|
||||
(bg-magenta-nuanced "#f8e6f5")
|
||||
(bg-cyan-nuanced "#e0f2fa")
|
||||
|
||||
;;; Uncommon accent background and foreground pairs
|
||||
|
||||
(bg-clay "#f1c8b5")
|
||||
(fg-clay "#63192a")
|
||||
|
||||
(bg-ochre "#f0e3c0")
|
||||
(fg-ochre "#573a30")
|
||||
|
||||
(bg-lavender "#dfcdfa")
|
||||
(fg-lavender "#443379")
|
||||
|
||||
(bg-sage "#c0e7d4")
|
||||
(fg-sage "#124b41")
|
||||
|
||||
;;; Graphs
|
||||
|
||||
(bg-graph-red-0 "#d0b029")
|
||||
(bg-graph-red-1 "#e0cab4")
|
||||
(bg-graph-green-0 "#8ac050")
|
||||
(bg-graph-green-1 "#afdfa5")
|
||||
(bg-graph-yellow-0 "#ffcf00")
|
||||
(bg-graph-yellow-1 "#f9ff00")
|
||||
(bg-graph-blue-0 "#7f9fff")
|
||||
(bg-graph-blue-1 "#afd0ff")
|
||||
(bg-graph-magenta-0 "#b0b0d0")
|
||||
(bg-graph-magenta-1 "#d0dfdf")
|
||||
(bg-graph-cyan-0 "#6faad9")
|
||||
(bg-graph-cyan-1 "#bfe0ff")
|
||||
|
||||
;;; Special purpose
|
||||
|
||||
(bg-completion "#c0deff")
|
||||
(bg-hover "#b2e4dc")
|
||||
(bg-hover-secondary "#e5d7a0")
|
||||
(bg-hl-line "#dae5ec")
|
||||
(bg-region "#bdbdbd")
|
||||
(fg-region "#000000")
|
||||
|
||||
(bg-mode-line-active "#d0d6ff")
|
||||
(fg-mode-line-active "#0f0f0f")
|
||||
(border-mode-line-active "#4f4f74")
|
||||
(bg-mode-line-inactive "#e6e6e6")
|
||||
(fg-mode-line-inactive "#585858")
|
||||
(border-mode-line-inactive "#a3a3a3")
|
||||
|
||||
(modeline-err "#603a00")
|
||||
(modeline-warning "#454500")
|
||||
(modeline-info "#023d92")
|
||||
|
||||
(bg-tab-bar "#dfdfdf")
|
||||
(bg-tab-current "#ffffff")
|
||||
(bg-tab-other "#c2c2c2")
|
||||
|
||||
;;; Diffs
|
||||
|
||||
(bg-added "#d5d7ff")
|
||||
(bg-added-faint "#e6e6ff")
|
||||
(bg-added-refine "#babcef")
|
||||
(bg-added-fringe "#275acc")
|
||||
(fg-added "#303099")
|
||||
(fg-added-intense "#0303cc")
|
||||
|
||||
(bg-changed "#eecfdf")
|
||||
(bg-changed-faint "#f0dde5")
|
||||
(bg-changed-refine "#e0b0d0")
|
||||
(bg-changed-fringe "#9f6ab0")
|
||||
(fg-changed "#6f1343")
|
||||
(fg-changed-intense "#7f0f9f")
|
||||
|
||||
(bg-removed "#f4f099")
|
||||
(bg-removed-faint "#f6f6b7")
|
||||
(bg-removed-refine "#ede06f")
|
||||
(bg-removed-fringe "#c0b200")
|
||||
(fg-removed "#553d00")
|
||||
(fg-removed-intense "#7f6f00")
|
||||
|
||||
(bg-diff-context "#f3f3f3")
|
||||
|
||||
;;; Paren match
|
||||
|
||||
(bg-paren-match "#5fcfff")
|
||||
(fg-paren-match fg-main)
|
||||
(bg-paren-expression "#efd3f5")
|
||||
(underline-paren-match unspecified)
|
||||
|
||||
;;; Mappings
|
||||
|
||||
;;;; General mappings
|
||||
|
||||
(fringe bg-dim)
|
||||
(cursor blue-intense)
|
||||
|
||||
(keybind blue-cooler)
|
||||
(name blue-cooler)
|
||||
(identifier yellow-faint)
|
||||
|
||||
(err yellow-warmer)
|
||||
(warning yellow)
|
||||
(info blue)
|
||||
|
||||
(underline-err yellow-intense)
|
||||
(underline-warning magenta-faint)
|
||||
(underline-note cyan)
|
||||
|
||||
(bg-prominent-err bg-yellow-intense)
|
||||
(fg-prominent-err fg-main)
|
||||
(bg-prominent-warning bg-magenta-intense)
|
||||
(fg-prominent-warning fg-main)
|
||||
(bg-prominent-note bg-cyan-intense)
|
||||
(fg-prominent-note fg-main)
|
||||
|
||||
(bg-active-argument bg-yellow-nuanced)
|
||||
(fg-active-argument yellow-warmer)
|
||||
(bg-active-value bg-blue-nuanced)
|
||||
(fg-active-value blue-warmer)
|
||||
|
||||
;;;; Code mappings
|
||||
|
||||
(bracket fg-main)
|
||||
(builtin yellow)
|
||||
(comment yellow-cooler)
|
||||
(constant blue-faint)
|
||||
(delimiter fg-main)
|
||||
(docmarkup magenta-faint)
|
||||
(docstring green-faint)
|
||||
(fnname yellow-warmer)
|
||||
(keyword blue-cooler)
|
||||
(number fg-main)
|
||||
(operator fg-main)
|
||||
(preprocessor magenta-cooler)
|
||||
(property cyan)
|
||||
(punctuation fg-main)
|
||||
(rx-backslash blue-cooler)
|
||||
(rx-construct yellow-cooler)
|
||||
(string blue-warmer)
|
||||
(type cyan-cooler)
|
||||
(variable cyan)
|
||||
|
||||
;;;; Accent mappings
|
||||
|
||||
(accent-0 blue-warmer)
|
||||
(accent-1 yellow-warmer)
|
||||
(accent-2 cyan)
|
||||
(accent-3 yellow-cooler)
|
||||
|
||||
;;;; Button mappings
|
||||
|
||||
(fg-button-active fg-main)
|
||||
(fg-button-inactive fg-dim)
|
||||
(bg-button-active bg-active)
|
||||
(bg-button-inactive bg-dim)
|
||||
|
||||
;;;; Completion mappings
|
||||
|
||||
(fg-completion-match-0 blue-warmer)
|
||||
(fg-completion-match-1 yellow-warmer)
|
||||
(fg-completion-match-2 cyan)
|
||||
(fg-completion-match-3 yellow-cooler)
|
||||
(bg-completion-match-0 unspecified)
|
||||
(bg-completion-match-1 unspecified)
|
||||
(bg-completion-match-2 unspecified)
|
||||
(bg-completion-match-3 unspecified)
|
||||
|
||||
;;;; Date mappings
|
||||
|
||||
(date-common cyan)
|
||||
(date-deadline yellow-warmer)
|
||||
(date-deadline-subtle red-faint)
|
||||
(date-event fg-alt)
|
||||
(date-holiday yellow-warmer)
|
||||
(date-holiday-other blue)
|
||||
(date-now fg-main)
|
||||
(date-range fg-alt)
|
||||
(date-scheduled yellow-cooler)
|
||||
(date-scheduled-subtle yellow-faint)
|
||||
(date-weekday cyan)
|
||||
(date-weekend blue-cooler)
|
||||
|
||||
;;;; Line number mappings
|
||||
|
||||
(fg-line-number-inactive fg-dim)
|
||||
(fg-line-number-active fg-main)
|
||||
(bg-line-number-inactive bg-dim)
|
||||
(bg-line-number-active bg-active)
|
||||
|
||||
;;;; Link mappings
|
||||
|
||||
(fg-link blue-warmer)
|
||||
(bg-link unspecified)
|
||||
(underline-link blue-warmer)
|
||||
|
||||
(fg-link-symbolic cyan)
|
||||
(bg-link-symbolic unspecified)
|
||||
(underline-link-symbolic cyan)
|
||||
|
||||
(fg-link-visited yellow-faint)
|
||||
(bg-link-visited unspecified)
|
||||
(underline-link-visited yellow-faint)
|
||||
|
||||
;;;; Mail mappings
|
||||
|
||||
(mail-cite-0 blue-warmer)
|
||||
(mail-cite-1 yellow)
|
||||
(mail-cite-2 cyan-faint)
|
||||
(mail-cite-3 yellow-faint)
|
||||
(mail-part blue)
|
||||
(mail-recipient blue)
|
||||
(mail-subject yellow-cooler)
|
||||
(mail-other cyan-faint)
|
||||
|
||||
;;;; Mark mappings
|
||||
|
||||
(bg-mark-delete bg-yellow-subtle)
|
||||
(fg-mark-delete yellow)
|
||||
(bg-mark-select bg-cyan-subtle)
|
||||
(fg-mark-select cyan)
|
||||
(bg-mark-other bg-magenta-subtle)
|
||||
(fg-mark-other magenta)
|
||||
|
||||
;;;; Prompt mappings
|
||||
|
||||
(fg-prompt blue)
|
||||
(bg-prompt unspecified)
|
||||
|
||||
;;;; Prose mappings
|
||||
|
||||
(bg-prose-block-delimiter bg-dim)
|
||||
(fg-prose-block-delimiter fg-dim)
|
||||
(bg-prose-block-contents bg-dim)
|
||||
|
||||
(bg-prose-code unspecified)
|
||||
(fg-prose-code cyan-cooler)
|
||||
|
||||
(bg-prose-macro unspecified)
|
||||
(fg-prose-macro magenta-cooler)
|
||||
|
||||
(bg-prose-verbatim unspecified)
|
||||
(fg-prose-verbatim yellow)
|
||||
|
||||
(prose-done blue)
|
||||
(prose-todo yellow-warmer)
|
||||
|
||||
(prose-metadata fg-dim)
|
||||
(prose-metadata-value fg-alt)
|
||||
|
||||
(prose-table fg-alt)
|
||||
(prose-table-formula yellow-warmer)
|
||||
|
||||
(prose-tag fg-alt)
|
||||
|
||||
;;;; Rainbow mappings
|
||||
|
||||
(rainbow-0 blue)
|
||||
(rainbow-1 yellow)
|
||||
(rainbow-2 blue-warmer)
|
||||
(rainbow-3 yellow-cooler)
|
||||
(rainbow-4 blue-cooler)
|
||||
(rainbow-5 yellow-warmer)
|
||||
(rainbow-6 blue-faint)
|
||||
(rainbow-7 yellow-faint)
|
||||
(rainbow-8 cyan)
|
||||
|
||||
;;;; Search mappings
|
||||
|
||||
(bg-search-current bg-yellow-intense)
|
||||
(bg-search-lazy bg-blue-intense)
|
||||
(bg-search-replace bg-yellow-intense)
|
||||
|
||||
(bg-search-rx-group-0 bg-cyan-intense)
|
||||
(bg-search-rx-group-1 bg-magenta-intense)
|
||||
(bg-search-rx-group-2 bg-blue-subtle)
|
||||
(bg-search-rx-group-3 bg-yellow-subtle)
|
||||
|
||||
;;;; Space mappings
|
||||
|
||||
(bg-space unspecified)
|
||||
(fg-space border)
|
||||
(bg-space-err bg-yellow-intense)
|
||||
|
||||
;;;; Terminal mappings
|
||||
|
||||
(bg-term-black "#000000")
|
||||
(fg-term-black "#000000")
|
||||
(bg-term-black-bright "#595959")
|
||||
(fg-term-black-bright "#595959")
|
||||
|
||||
(bg-term-red red)
|
||||
(fg-term-red red)
|
||||
(bg-term-red-bright red-warmer)
|
||||
(fg-term-red-bright red-warmer)
|
||||
|
||||
(bg-term-green green)
|
||||
(fg-term-green green)
|
||||
(bg-term-green-bright green-cooler)
|
||||
(fg-term-green-bright green-cooler)
|
||||
|
||||
(bg-term-yellow yellow)
|
||||
(fg-term-yellow yellow)
|
||||
(bg-term-yellow-bright yellow-warmer)
|
||||
(fg-term-yellow-bright yellow-warmer)
|
||||
|
||||
(bg-term-blue blue)
|
||||
(fg-term-blue blue)
|
||||
(bg-term-blue-bright blue-warmer)
|
||||
(fg-term-blue-bright blue-warmer)
|
||||
|
||||
(bg-term-magenta magenta)
|
||||
(fg-term-magenta magenta)
|
||||
(bg-term-magenta-bright magenta-cooler)
|
||||
(fg-term-magenta-bright magenta-cooler)
|
||||
|
||||
(bg-term-cyan cyan)
|
||||
(fg-term-cyan cyan)
|
||||
(bg-term-cyan-bright cyan-cooler)
|
||||
(fg-term-cyan-bright cyan-cooler)
|
||||
|
||||
(bg-term-white "#a6a6a6")
|
||||
(fg-term-white "#a6a6a6")
|
||||
(bg-term-white-bright "#ffffff")
|
||||
(fg-term-white-bright "#ffffff")
|
||||
|
||||
;;;; Heading mappings
|
||||
|
||||
(fg-heading-0 cyan-cooler)
|
||||
(fg-heading-1 fg-main)
|
||||
(fg-heading-2 yellow-faint)
|
||||
(fg-heading-3 blue-faint)
|
||||
(fg-heading-4 green-faint)
|
||||
(fg-heading-5 magenta-cooler)
|
||||
(fg-heading-6 yellow-cooler)
|
||||
(fg-heading-7 cyan)
|
||||
(fg-heading-8 fg-dim)
|
||||
|
||||
(bg-heading-0 unspecified)
|
||||
(bg-heading-1 unspecified)
|
||||
(bg-heading-2 unspecified)
|
||||
(bg-heading-3 unspecified)
|
||||
(bg-heading-4 unspecified)
|
||||
(bg-heading-5 unspecified)
|
||||
(bg-heading-6 unspecified)
|
||||
(bg-heading-7 unspecified)
|
||||
(bg-heading-8 unspecified)
|
||||
|
||||
(overline-heading-0 unspecified)
|
||||
(overline-heading-1 unspecified)
|
||||
(overline-heading-2 unspecified)
|
||||
(overline-heading-3 unspecified)
|
||||
(overline-heading-4 unspecified)
|
||||
(overline-heading-5 unspecified)
|
||||
(overline-heading-6 unspecified)
|
||||
(overline-heading-7 unspecified)
|
||||
(overline-heading-8 unspecified))
|
||||
"The entire palette of the `modus-operandi-deuteranopia' theme.
|
||||
|
||||
Named colors have the form (COLOR-NAME HEX-VALUE) with the former
|
||||
as a symbol and the latter as a string.
|
||||
|
||||
Semantic color mappings have the form (MAPPING-NAME COLOR-NAME)
|
||||
with both as symbols. The latter is a named color that already
|
||||
exists in the palette and is associated with a HEX-VALUE.")
|
||||
|
||||
(defcustom modus-operandi-deuteranopia-palette-user nil
|
||||
"Like the `modus-operandi-deuteranopia-palette' for user-defined entries.
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
(defcustom modus-operandi-deuteranopia-palette-user nil
|
||||
"Like the `modus-operandi-deuteranopia-palette' for user-defined entries.
|
||||
This is meant to extend the palette with custom named colors and/or
|
||||
semantic palette mappings. Those may then be used in combination with
|
||||
palette overrides (also see `modus-themes-common-palette-overrides' and
|
||||
`modus-operandi-deuteranopia-palette-overrides')."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
|
||||
(defcustom modus-operandi-deuteranopia-palette-overrides nil
|
||||
"Overrides for `modus-operandi-deuteranopia-palette'.
|
||||
(defcustom modus-operandi-deuteranopia-palette-overrides nil
|
||||
"Overrides for `modus-operandi-deuteranopia-palette'.
|
||||
|
||||
Mirror the elements of the aforementioned palette, overriding
|
||||
their value.
|
||||
|
|
@ -523,18 +68,25 @@ mappings, such as to make the cursor red. Wherea theme-specific
|
|||
overrides can also be used to change the value of a named color,
|
||||
such as what hexadecimal RGB value the red-warmer symbol
|
||||
represents."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
|
||||
(modus-themes-theme modus-operandi-deuteranopia
|
||||
modus-operandi-deuteranopia-palette
|
||||
modus-operandi-deuteranopia-palette-overrides)
|
||||
|
||||
(provide-theme 'modus-operandi-deuteranopia))
|
||||
(modus-themes-theme
|
||||
'modus-operandi-deuteranopia
|
||||
'modus-themes
|
||||
"Deuteranopia-optimized theme with a white background.
|
||||
This variant is optimized for users with red-green color
|
||||
deficiency (deuteranopia). It conforms with the highest
|
||||
legibility standard for color contrast between background and
|
||||
foreground in any given piece of text, which corresponds to a
|
||||
minimum contrast in relative luminance of 7:1 (WCAG AAA
|
||||
standard)."
|
||||
'light
|
||||
'modus-themes-operandi-deuteranopia-palette
|
||||
'modus-operandi-deuteranopia-palette-user
|
||||
'modus-operandi-deuteranopia-palette-overrides)
|
||||
|
||||
;;; modus-operandi-deuteranopia-theme.el ends here
|
||||
|
|
|
|||
|
|
@ -26,488 +26,35 @@
|
|||
;;
|
||||
;; The Modus themes conform with the highest standard for
|
||||
;; color-contrast accessibility between background and foreground
|
||||
;; values (WCAG AAA). Please refer to the official Info manual for
|
||||
;; further documentation (distributed with the themes, or available
|
||||
;; at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
;; values (WCAG AAA). They are also highly customizable and can even
|
||||
;; be used as the basis for other themes. Please refer to the official
|
||||
;; Info manual for further documentation (distributed with the themes,
|
||||
;; or available at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
|
||||
(eval-and-compile
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
;;;###theme-autoload
|
||||
(deftheme modus-operandi
|
||||
"Elegant, highly legible theme with a white background.
|
||||
Conforms with the highest legibility standard for color contrast
|
||||
between background and foreground in any given piece of text,
|
||||
which corresponds to a minimum contrast in relative luminance of
|
||||
7:1 (WCAG AAA standard)."
|
||||
:background-mode 'light
|
||||
:kind 'color-scheme
|
||||
:family 'modus)
|
||||
|
||||
(defconst modus-operandi-palette
|
||||
'(
|
||||
;;; Basic values
|
||||
|
||||
(bg-main "#ffffff")
|
||||
(bg-dim "#f2f2f2")
|
||||
(fg-main "#000000")
|
||||
(fg-dim "#595959")
|
||||
(fg-alt "#193668")
|
||||
(bg-active "#c4c4c4")
|
||||
(bg-inactive "#e0e0e0")
|
||||
(border "#9f9f9f")
|
||||
|
||||
;;; Common accent foregrounds
|
||||
|
||||
(red "#a60000")
|
||||
(red-warmer "#972500")
|
||||
(red-cooler "#a0132f")
|
||||
(red-faint "#7f0000")
|
||||
(red-intense "#d00000")
|
||||
(green "#006800")
|
||||
(green-warmer "#316500")
|
||||
(green-cooler "#00663f")
|
||||
(green-faint "#2a5045")
|
||||
(green-intense "#008900")
|
||||
(yellow "#6f5500")
|
||||
(yellow-warmer "#884900")
|
||||
(yellow-cooler "#7a4f2f")
|
||||
(yellow-faint "#624416")
|
||||
(yellow-intense "#808000")
|
||||
(blue "#0031a9")
|
||||
(blue-warmer "#3548cf")
|
||||
(blue-cooler "#0000b0")
|
||||
(blue-faint "#003497")
|
||||
(blue-intense "#0000ff")
|
||||
(magenta "#721045")
|
||||
(magenta-warmer "#8f0075")
|
||||
(magenta-cooler "#531ab6")
|
||||
(magenta-faint "#7c318f")
|
||||
(magenta-intense "#dd22dd")
|
||||
(cyan "#005e8b")
|
||||
(cyan-warmer "#3f578f")
|
||||
(cyan-cooler "#005f5f")
|
||||
(cyan-faint "#005077")
|
||||
(cyan-intense "#008899")
|
||||
|
||||
;;; Uncommon accent foregrounds
|
||||
|
||||
(rust "#8a290f")
|
||||
(gold "#80601f")
|
||||
(olive "#56692d")
|
||||
(slate "#2f3f83")
|
||||
(indigo "#4a3a8a")
|
||||
(maroon "#731c52")
|
||||
(pink "#7b435c")
|
||||
|
||||
;;; Common accent backgrounds
|
||||
|
||||
(bg-red-intense "#ff8f88")
|
||||
(bg-green-intense "#8adf80")
|
||||
(bg-yellow-intense "#f3d000")
|
||||
(bg-blue-intense "#bfc9ff")
|
||||
(bg-magenta-intense "#dfa0f0")
|
||||
(bg-cyan-intense "#a4d5f9")
|
||||
|
||||
(bg-red-subtle "#ffcfbf")
|
||||
(bg-green-subtle "#b3fabf")
|
||||
(bg-yellow-subtle "#fff576")
|
||||
(bg-blue-subtle "#ccdfff")
|
||||
(bg-magenta-subtle "#ffddff")
|
||||
(bg-cyan-subtle "#bfefff")
|
||||
|
||||
(bg-red-nuanced "#ffe8e8")
|
||||
(bg-green-nuanced "#e0f6e0")
|
||||
(bg-yellow-nuanced "#f8f0d0")
|
||||
(bg-blue-nuanced "#ecedff")
|
||||
(bg-magenta-nuanced "#f8e6f5")
|
||||
(bg-cyan-nuanced "#e0f2fa")
|
||||
|
||||
;;; Uncommon accent background and foreground pairs
|
||||
|
||||
(bg-clay "#f1c8b5")
|
||||
(fg-clay "#63192a")
|
||||
|
||||
(bg-ochre "#f0e3c0")
|
||||
(fg-ochre "#573a30")
|
||||
|
||||
(bg-lavender "#dfcdfa")
|
||||
(fg-lavender "#443379")
|
||||
|
||||
(bg-sage "#c0e7d4")
|
||||
(fg-sage "#124b41")
|
||||
|
||||
;;; Graphs
|
||||
|
||||
(bg-graph-red-0 "#ef7969")
|
||||
(bg-graph-red-1 "#ffaab4")
|
||||
(bg-graph-green-0 "#45c050")
|
||||
(bg-graph-green-1 "#75ef30")
|
||||
(bg-graph-yellow-0 "#ffcf00")
|
||||
(bg-graph-yellow-1 "#f9ff00")
|
||||
(bg-graph-blue-0 "#7f90ff")
|
||||
(bg-graph-blue-1 "#a6c0ff")
|
||||
(bg-graph-magenta-0 "#e07fff")
|
||||
(bg-graph-magenta-1 "#fad0ff")
|
||||
(bg-graph-cyan-0 "#70d3f0")
|
||||
(bg-graph-cyan-1 "#afefff")
|
||||
|
||||
;;; Special purpose
|
||||
|
||||
(bg-completion "#c0deff")
|
||||
(bg-hover "#b2e4dc")
|
||||
(bg-hover-secondary "#f5d0a0")
|
||||
(bg-hl-line "#dae5ec")
|
||||
(bg-region "#bdbdbd")
|
||||
(fg-region "#000000")
|
||||
|
||||
(bg-mode-line-active "#c8c8c8")
|
||||
(fg-mode-line-active "#000000")
|
||||
(border-mode-line-active "#5a5a5a")
|
||||
(bg-mode-line-inactive "#e6e6e6")
|
||||
(fg-mode-line-inactive "#585858")
|
||||
(border-mode-line-inactive "#a3a3a3")
|
||||
|
||||
(modeline-err "#7f0000")
|
||||
(modeline-warning "#5f0070")
|
||||
(modeline-info "#002580")
|
||||
|
||||
(bg-tab-bar "#dfdfdf")
|
||||
(bg-tab-current "#ffffff")
|
||||
(bg-tab-other "#c2c2c2")
|
||||
|
||||
;;; Diffs
|
||||
|
||||
(bg-added "#c1f2d1")
|
||||
(bg-added-faint "#d8f8e1")
|
||||
(bg-added-refine "#aee5be")
|
||||
(bg-added-fringe "#6cc06c")
|
||||
(fg-added "#005000")
|
||||
(fg-added-intense "#006700")
|
||||
|
||||
(bg-changed "#ffdfa9")
|
||||
(bg-changed-faint "#ffefbf")
|
||||
(bg-changed-refine "#fac090")
|
||||
(bg-changed-fringe "#d7c20a")
|
||||
(fg-changed "#553d00")
|
||||
(fg-changed-intense "#655000")
|
||||
|
||||
(bg-removed "#ffd8d5")
|
||||
(bg-removed-faint "#ffe9e9")
|
||||
(bg-removed-refine "#f3b5af")
|
||||
(bg-removed-fringe "#d84a4f")
|
||||
(fg-removed "#8f1313")
|
||||
(fg-removed-intense "#aa2222")
|
||||
|
||||
(bg-diff-context "#f3f3f3")
|
||||
|
||||
;;; Paren match
|
||||
|
||||
(bg-paren-match "#5fcfff")
|
||||
(fg-paren-match fg-main)
|
||||
(bg-paren-expression "#efd3f5")
|
||||
(underline-paren-match unspecified)
|
||||
|
||||
;;; Mappings
|
||||
|
||||
;;;; General mappings
|
||||
|
||||
(fringe bg-dim)
|
||||
(cursor fg-main)
|
||||
|
||||
(keybind blue-cooler)
|
||||
(name magenta)
|
||||
(identifier yellow-cooler)
|
||||
|
||||
(err red)
|
||||
(warning yellow-warmer)
|
||||
(info cyan-cooler)
|
||||
|
||||
(underline-err red-intense)
|
||||
(underline-warning yellow-intense)
|
||||
(underline-note cyan-intense)
|
||||
|
||||
(bg-prominent-err bg-red-intense)
|
||||
(fg-prominent-err fg-main)
|
||||
(bg-prominent-warning bg-yellow-intense)
|
||||
(fg-prominent-warning fg-main)
|
||||
(bg-prominent-note bg-cyan-intense)
|
||||
(fg-prominent-note fg-main)
|
||||
|
||||
(bg-active-argument bg-yellow-nuanced)
|
||||
(fg-active-argument yellow-warmer)
|
||||
(bg-active-value bg-cyan-nuanced)
|
||||
(fg-active-value cyan-warmer)
|
||||
|
||||
;;;; Code mappings
|
||||
|
||||
(bracket fg-main)
|
||||
(builtin magenta-warmer)
|
||||
(comment fg-dim)
|
||||
(constant blue-cooler)
|
||||
(delimiter fg-main)
|
||||
(docmarkup magenta-faint)
|
||||
(docstring green-faint)
|
||||
(fnname magenta)
|
||||
(keyword magenta-cooler)
|
||||
(number fg-main)
|
||||
(operator fg-main)
|
||||
(preprocessor red-cooler)
|
||||
(property cyan)
|
||||
(punctuation fg-main)
|
||||
(rx-backslash magenta)
|
||||
(rx-construct green-cooler)
|
||||
(string blue-warmer)
|
||||
(type cyan-cooler)
|
||||
(variable cyan)
|
||||
|
||||
;;;; Accent mappings
|
||||
|
||||
(accent-0 blue)
|
||||
(accent-1 magenta-warmer)
|
||||
(accent-2 cyan)
|
||||
(accent-3 red)
|
||||
|
||||
;;;; Button mappings
|
||||
|
||||
(fg-button-active fg-main)
|
||||
(fg-button-inactive fg-dim)
|
||||
(bg-button-active bg-active)
|
||||
(bg-button-inactive bg-dim)
|
||||
|
||||
;;;; Completion mappings
|
||||
|
||||
(fg-completion-match-0 blue)
|
||||
(fg-completion-match-1 magenta-warmer)
|
||||
(fg-completion-match-2 cyan)
|
||||
(fg-completion-match-3 red)
|
||||
(bg-completion-match-0 unspecified)
|
||||
(bg-completion-match-1 unspecified)
|
||||
(bg-completion-match-2 unspecified)
|
||||
(bg-completion-match-3 unspecified)
|
||||
|
||||
;;;; Date mappings
|
||||
|
||||
(date-common cyan)
|
||||
(date-deadline red-cooler)
|
||||
(date-deadline-subtle red-faint)
|
||||
(date-event fg-alt)
|
||||
(date-holiday red)
|
||||
(date-holiday-other blue)
|
||||
(date-now fg-main)
|
||||
(date-range fg-alt)
|
||||
(date-scheduled yellow)
|
||||
(date-scheduled-subtle yellow-faint)
|
||||
(date-weekday cyan)
|
||||
(date-weekend magenta)
|
||||
|
||||
;;;; Line number mappings
|
||||
|
||||
(fg-line-number-inactive fg-dim)
|
||||
(fg-line-number-active fg-main)
|
||||
(bg-line-number-inactive bg-dim)
|
||||
(bg-line-number-active bg-active)
|
||||
|
||||
;;;; Link mappings
|
||||
|
||||
(fg-link blue-warmer)
|
||||
(bg-link unspecified)
|
||||
(underline-link blue-warmer)
|
||||
|
||||
(fg-link-symbolic cyan)
|
||||
(bg-link-symbolic unspecified)
|
||||
(underline-link-symbolic cyan)
|
||||
|
||||
(fg-link-visited magenta)
|
||||
(bg-link-visited unspecified)
|
||||
(underline-link-visited magenta)
|
||||
|
||||
;;;; Mail mappings
|
||||
|
||||
(mail-cite-0 blue-faint)
|
||||
(mail-cite-1 yellow-warmer)
|
||||
(mail-cite-2 cyan-cooler)
|
||||
(mail-cite-3 red-cooler)
|
||||
(mail-part cyan)
|
||||
(mail-recipient magenta-cooler)
|
||||
(mail-subject magenta-warmer)
|
||||
(mail-other magenta-faint)
|
||||
|
||||
;;;; Mark mappings
|
||||
|
||||
(bg-mark-delete bg-red-subtle)
|
||||
(fg-mark-delete red)
|
||||
(bg-mark-select bg-cyan-subtle)
|
||||
(fg-mark-select cyan)
|
||||
(bg-mark-other bg-yellow-subtle)
|
||||
(fg-mark-other yellow)
|
||||
|
||||
;;;; Prompt mappings
|
||||
|
||||
(fg-prompt cyan-cooler)
|
||||
(bg-prompt unspecified)
|
||||
|
||||
;;;; Prose mappings
|
||||
|
||||
(bg-prose-block-delimiter bg-dim)
|
||||
(fg-prose-block-delimiter fg-dim)
|
||||
(bg-prose-block-contents bg-dim)
|
||||
|
||||
(bg-prose-code unspecified)
|
||||
(fg-prose-code cyan-cooler)
|
||||
|
||||
(bg-prose-macro unspecified)
|
||||
(fg-prose-macro magenta-cooler)
|
||||
|
||||
(bg-prose-verbatim unspecified)
|
||||
(fg-prose-verbatim magenta-warmer)
|
||||
|
||||
(prose-done green)
|
||||
(prose-todo red)
|
||||
|
||||
(prose-metadata fg-dim)
|
||||
(prose-metadata-value fg-alt)
|
||||
|
||||
(prose-table fg-alt)
|
||||
(prose-table-formula magenta-warmer)
|
||||
|
||||
(prose-tag magenta-faint)
|
||||
|
||||
;;;; Rainbow mappings
|
||||
|
||||
(rainbow-0 fg-main)
|
||||
(rainbow-1 magenta-intense)
|
||||
(rainbow-2 cyan-intense)
|
||||
(rainbow-3 red-warmer)
|
||||
(rainbow-4 yellow-intense)
|
||||
(rainbow-5 magenta-cooler)
|
||||
(rainbow-6 green-intense)
|
||||
(rainbow-7 blue-warmer)
|
||||
(rainbow-8 magenta-warmer)
|
||||
|
||||
;;;; Search mappings
|
||||
|
||||
(bg-search-current bg-yellow-intense)
|
||||
(bg-search-lazy bg-cyan-intense)
|
||||
(bg-search-replace bg-red-intense)
|
||||
|
||||
(bg-search-rx-group-0 bg-blue-intense)
|
||||
(bg-search-rx-group-1 bg-green-intense)
|
||||
(bg-search-rx-group-2 bg-red-subtle)
|
||||
(bg-search-rx-group-3 bg-magenta-subtle)
|
||||
|
||||
;;;; Space mappings
|
||||
|
||||
(bg-space unspecified)
|
||||
(fg-space border)
|
||||
(bg-space-err bg-red-intense)
|
||||
|
||||
;;;; Terminal mappings
|
||||
|
||||
(bg-term-black "#000000")
|
||||
(fg-term-black "#000000")
|
||||
(bg-term-black-bright "#595959")
|
||||
(fg-term-black-bright "#595959")
|
||||
|
||||
(bg-term-red red)
|
||||
(fg-term-red red)
|
||||
(bg-term-red-bright red-warmer)
|
||||
(fg-term-red-bright red-warmer)
|
||||
|
||||
(bg-term-green green)
|
||||
(fg-term-green green)
|
||||
(bg-term-green-bright green-cooler)
|
||||
(fg-term-green-bright green-cooler)
|
||||
|
||||
(bg-term-yellow yellow)
|
||||
(fg-term-yellow yellow)
|
||||
(bg-term-yellow-bright yellow-warmer)
|
||||
(fg-term-yellow-bright yellow-warmer)
|
||||
|
||||
(bg-term-blue blue)
|
||||
(fg-term-blue blue)
|
||||
(bg-term-blue-bright blue-warmer)
|
||||
(fg-term-blue-bright blue-warmer)
|
||||
|
||||
(bg-term-magenta magenta)
|
||||
(fg-term-magenta magenta)
|
||||
(bg-term-magenta-bright magenta-cooler)
|
||||
(fg-term-magenta-bright magenta-cooler)
|
||||
|
||||
(bg-term-cyan cyan)
|
||||
(fg-term-cyan cyan)
|
||||
(bg-term-cyan-bright cyan-cooler)
|
||||
(fg-term-cyan-bright cyan-cooler)
|
||||
|
||||
(bg-term-white "#a6a6a6")
|
||||
(fg-term-white "#a6a6a6")
|
||||
(bg-term-white-bright "#ffffff")
|
||||
(fg-term-white-bright "#ffffff")
|
||||
|
||||
;;;; Heading mappings
|
||||
|
||||
(fg-heading-0 cyan-cooler)
|
||||
(fg-heading-1 fg-main)
|
||||
(fg-heading-2 yellow-faint)
|
||||
(fg-heading-3 fg-alt)
|
||||
(fg-heading-4 magenta)
|
||||
(fg-heading-5 green-faint)
|
||||
(fg-heading-6 red-faint)
|
||||
(fg-heading-7 cyan-warmer)
|
||||
(fg-heading-8 fg-dim)
|
||||
|
||||
(bg-heading-0 unspecified)
|
||||
(bg-heading-1 unspecified)
|
||||
(bg-heading-2 unspecified)
|
||||
(bg-heading-3 unspecified)
|
||||
(bg-heading-4 unspecified)
|
||||
(bg-heading-5 unspecified)
|
||||
(bg-heading-6 unspecified)
|
||||
(bg-heading-7 unspecified)
|
||||
(bg-heading-8 unspecified)
|
||||
|
||||
(overline-heading-0 unspecified)
|
||||
(overline-heading-1 unspecified)
|
||||
(overline-heading-2 unspecified)
|
||||
(overline-heading-3 unspecified)
|
||||
(overline-heading-4 unspecified)
|
||||
(overline-heading-5 unspecified)
|
||||
(overline-heading-6 unspecified)
|
||||
(overline-heading-7 unspecified)
|
||||
(overline-heading-8 unspecified))
|
||||
"The entire palette of the `modus-operandi' theme.
|
||||
|
||||
Named colors have the form (COLOR-NAME HEX-VALUE) with the former
|
||||
as a symbol and the latter as a string.
|
||||
|
||||
Semantic color mappings have the form (MAPPING-NAME COLOR-NAME)
|
||||
with both as symbols. The latter is a named color that already
|
||||
exists in the palette and is associated with a HEX-VALUE.")
|
||||
|
||||
(defcustom modus-operandi-palette-user nil
|
||||
"Like the `modus-operandi-palette' for user-defined entries.
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
(defcustom modus-operandi-palette-user nil
|
||||
"Like the `modus-operandi-palette' for user-defined entries.
|
||||
This is meant to extend the palette with custom named colors and/or
|
||||
semantic palette mappings. Those may then be used in combination with
|
||||
palette overrides (also see `modus-themes-common-palette-overrides' and
|
||||
`modus-operandi-palette-overrides')."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
|
||||
(defcustom modus-operandi-palette-overrides nil
|
||||
"Overrides for `modus-operandi-palette'.
|
||||
(defcustom modus-operandi-palette-overrides nil
|
||||
"Overrides for `modus-operandi-palette'.
|
||||
|
||||
Mirror the elements of the aforementioned palette, overriding
|
||||
their value.
|
||||
|
|
@ -521,18 +68,23 @@ mappings, such as to make the cursor red. Wherea theme-specific
|
|||
overrides can also be used to change the value of a named color,
|
||||
such as what hexadecimal RGB value the red-warmer symbol
|
||||
represents."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
|
||||
(modus-themes-theme modus-operandi
|
||||
modus-operandi-palette
|
||||
modus-operandi-palette-overrides)
|
||||
|
||||
(provide-theme 'modus-operandi))
|
||||
(modus-themes-theme
|
||||
'modus-operandi
|
||||
'modus-themes
|
||||
"Elegant, highly legible theme with a white background.
|
||||
Conforms with the highest legibility standard for color contrast
|
||||
between background and foreground in any given piece of text,
|
||||
which corresponds to a minimum contrast in relative luminance of
|
||||
7:1 (WCAG AAA standard)."
|
||||
'light
|
||||
'modus-themes-operandi-palette
|
||||
'modus-operandi-palette-user
|
||||
'modus-operandi-palette-overrides)
|
||||
|
||||
;;; modus-operandi-theme.el ends here
|
||||
|
|
|
|||
|
|
@ -26,488 +26,35 @@
|
|||
;;
|
||||
;; The Modus themes conform with the highest standard for
|
||||
;; color-contrast accessibility between background and foreground
|
||||
;; values (WCAG AAA). Please refer to the official Info manual for
|
||||
;; further documentation (distributed with the themes, or available
|
||||
;; at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
;; values (WCAG AAA). They are also highly customizable and can even
|
||||
;; be used as the basis for other themes. Please refer to the official
|
||||
;; Info manual for further documentation (distributed with the themes,
|
||||
;; or available at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
|
||||
(eval-and-compile
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
;;;###theme-autoload
|
||||
(deftheme modus-operandi-tinted
|
||||
"Elegant, highly legible theme with a light ochre background.
|
||||
Conforms with the highest legibility standard for color contrast
|
||||
between background and foreground in any given piece of text,
|
||||
which corresponds to a minimum contrast in relative luminance of
|
||||
7:1 (WCAG AAA standard)."
|
||||
:background-mode 'light
|
||||
:kind 'color-scheme
|
||||
:family 'modus)
|
||||
|
||||
(defconst modus-operandi-tinted-palette
|
||||
'(
|
||||
;;; Basic values
|
||||
|
||||
(bg-main "#fbf7f0")
|
||||
(bg-dim "#efe9dd")
|
||||
(fg-main "#000000")
|
||||
(fg-dim "#595959")
|
||||
(fg-alt "#193668")
|
||||
(bg-active "#c9b9b0")
|
||||
(bg-inactive "#dfd5cf")
|
||||
(border "#9f9690")
|
||||
|
||||
;;; Common accent foregrounds
|
||||
|
||||
(red "#a60000")
|
||||
(red-warmer "#972500")
|
||||
(red-cooler "#a0132f")
|
||||
(red-faint "#7f0000")
|
||||
(red-intense "#d00000")
|
||||
(green "#006300")
|
||||
(green-warmer "#306010")
|
||||
(green-cooler "#00603f")
|
||||
(green-faint "#2a5045")
|
||||
(green-intense "#008900")
|
||||
(yellow "#6d5000")
|
||||
(yellow-warmer "#894000")
|
||||
(yellow-cooler "#602938")
|
||||
(yellow-faint "#574316")
|
||||
(yellow-intense "#808000")
|
||||
(blue "#0031a9")
|
||||
(blue-warmer "#3546c2")
|
||||
(blue-cooler "#0000b0")
|
||||
(blue-faint "#003497")
|
||||
(blue-intense "#0000ff")
|
||||
(magenta "#721045")
|
||||
(magenta-warmer "#8f0075")
|
||||
(magenta-cooler "#531ab6")
|
||||
(magenta-faint "#7c318f")
|
||||
(magenta-intense "#dd22dd")
|
||||
(cyan "#00598b")
|
||||
(cyan-warmer "#32548f")
|
||||
(cyan-cooler "#005f5f")
|
||||
(cyan-faint "#304463")
|
||||
(cyan-intense "#008899")
|
||||
|
||||
;;; Uncommon accent foregrounds
|
||||
|
||||
(rust "#8a290f")
|
||||
(gold "#80601f")
|
||||
(olive "#56692d")
|
||||
(slate "#2f3f83")
|
||||
(indigo "#4a3a8a")
|
||||
(maroon "#731c52")
|
||||
(pink "#7b435c")
|
||||
|
||||
;;; Common accent backgrounds
|
||||
|
||||
(bg-red-intense "#ff8f88")
|
||||
(bg-green-intense "#8adf80")
|
||||
(bg-yellow-intense "#f3d000")
|
||||
(bg-blue-intense "#bfc9ff")
|
||||
(bg-magenta-intense "#dfa0f0")
|
||||
(bg-cyan-intense "#a4d5f9")
|
||||
|
||||
(bg-red-subtle "#ffcfbf")
|
||||
(bg-green-subtle "#b3fabf")
|
||||
(bg-yellow-subtle "#fff576")
|
||||
(bg-blue-subtle "#ccdfff")
|
||||
(bg-magenta-subtle "#ffddff")
|
||||
(bg-cyan-subtle "#bfefff")
|
||||
|
||||
(bg-red-nuanced "#ffe8e8")
|
||||
(bg-green-nuanced "#e0f6e0")
|
||||
(bg-yellow-nuanced "#f8f0d0")
|
||||
(bg-blue-nuanced "#ecedff")
|
||||
(bg-magenta-nuanced "#f8e6f5")
|
||||
(bg-cyan-nuanced "#e0f2fa")
|
||||
|
||||
;;; Uncommon accent background and foreground pairs
|
||||
|
||||
(bg-clay "#f1c8b5")
|
||||
(fg-clay "#63192a")
|
||||
|
||||
(bg-ochre "#f0e3c0")
|
||||
(fg-ochre "#573a30")
|
||||
|
||||
(bg-lavender "#dfcdfa")
|
||||
(fg-lavender "#443379")
|
||||
|
||||
(bg-sage "#c0e7d4")
|
||||
(fg-sage "#124b41")
|
||||
|
||||
;;; Graphs
|
||||
|
||||
(bg-graph-red-0 "#ef7969")
|
||||
(bg-graph-red-1 "#ffaab4")
|
||||
(bg-graph-green-0 "#45c050")
|
||||
(bg-graph-green-1 "#75ef30")
|
||||
(bg-graph-yellow-0 "#ffcf00")
|
||||
(bg-graph-yellow-1 "#f9ff00")
|
||||
(bg-graph-blue-0 "#7f90ff")
|
||||
(bg-graph-blue-1 "#a6c0ff")
|
||||
(bg-graph-magenta-0 "#e07fff")
|
||||
(bg-graph-magenta-1 "#fad0ff")
|
||||
(bg-graph-cyan-0 "#70d3f0")
|
||||
(bg-graph-cyan-1 "#afefff")
|
||||
|
||||
;;; Special purpose
|
||||
|
||||
(bg-completion "#f0c1cf")
|
||||
(bg-hover "#b2e4dc")
|
||||
(bg-hover-secondary "#dfe09f")
|
||||
(bg-hl-line "#f1d5d0")
|
||||
(bg-region "#c2bcb5")
|
||||
(fg-region "#000000")
|
||||
|
||||
(bg-mode-line-active "#cab9b2")
|
||||
(fg-mode-line-active "#000000")
|
||||
(border-mode-line-active "#545454")
|
||||
(bg-mode-line-inactive "#dfd9cf")
|
||||
(fg-mode-line-inactive "#585858")
|
||||
(border-mode-line-inactive "#a59a94")
|
||||
|
||||
(modeline-err "#7f0000")
|
||||
(modeline-warning "#5f0070")
|
||||
(modeline-info "#002580")
|
||||
|
||||
(bg-tab-bar "#e0d4ce")
|
||||
(bg-tab-current "#fbf7f0")
|
||||
(bg-tab-other "#c8b8b2")
|
||||
|
||||
;;; Diffs
|
||||
|
||||
(bg-added "#c3ebc1")
|
||||
(bg-added-faint "#dcf8d1")
|
||||
(bg-added-refine "#acd6a5")
|
||||
(bg-added-fringe "#6cc06c")
|
||||
(fg-added "#005000")
|
||||
(fg-added-intense "#006700")
|
||||
|
||||
(bg-changed "#ffdfa9")
|
||||
(bg-changed-faint "#ffefbf")
|
||||
(bg-changed-refine "#fac090")
|
||||
(bg-changed-fringe "#c0b200")
|
||||
(fg-changed "#553d00")
|
||||
(fg-changed-intense "#655000")
|
||||
|
||||
(bg-removed "#f4d0cf")
|
||||
(bg-removed-faint "#ffe9e5")
|
||||
(bg-removed-refine "#f3b5a7")
|
||||
(bg-removed-fringe "#d84a4f")
|
||||
(fg-removed "#8f1313")
|
||||
(fg-removed-intense "#aa2222")
|
||||
|
||||
(bg-diff-context "#efe9df")
|
||||
|
||||
;;; Paren match
|
||||
|
||||
(bg-paren-match "#7fdfcf")
|
||||
(fg-paren-match fg-main)
|
||||
(bg-paren-expression "#efd3f5")
|
||||
(underline-paren-match unspecified)
|
||||
|
||||
;;; Mappings
|
||||
|
||||
;;;; General mappings
|
||||
|
||||
(fringe bg-dim)
|
||||
(cursor red-intense)
|
||||
|
||||
(keybind red)
|
||||
(name magenta)
|
||||
(identifier yellow-faint)
|
||||
|
||||
(err red)
|
||||
(warning yellow)
|
||||
(info green)
|
||||
|
||||
(underline-err red-intense)
|
||||
(underline-warning yellow-intense)
|
||||
(underline-note cyan-intense)
|
||||
|
||||
(bg-prominent-err bg-red-intense)
|
||||
(fg-prominent-err fg-main)
|
||||
(bg-prominent-warning bg-yellow-intense)
|
||||
(fg-prominent-warning fg-main)
|
||||
(bg-prominent-note bg-cyan-intense)
|
||||
(fg-prominent-note fg-main)
|
||||
|
||||
(bg-active-argument bg-yellow-nuanced)
|
||||
(fg-active-argument yellow-warmer)
|
||||
(bg-active-value bg-cyan-nuanced)
|
||||
(fg-active-value cyan-warmer)
|
||||
|
||||
;;;; Code mappings
|
||||
|
||||
(bracket fg-main)
|
||||
(builtin magenta)
|
||||
(comment red-faint)
|
||||
(constant magenta-cooler)
|
||||
(delimiter fg-main)
|
||||
(docmarkup magenta-faint)
|
||||
(docstring cyan-faint)
|
||||
(fnname yellow-cooler)
|
||||
(keyword blue)
|
||||
(number fg-main)
|
||||
(operator fg-main)
|
||||
(preprocessor yellow-warmer)
|
||||
(property green-cooler)
|
||||
(punctuation fg-main)
|
||||
(rx-backslash magenta-warmer)
|
||||
(rx-construct magenta-cooler)
|
||||
(string cyan)
|
||||
(type green-warmer)
|
||||
(variable green-cooler)
|
||||
|
||||
;;;; Accent mappings
|
||||
|
||||
(accent-0 red-cooler)
|
||||
(accent-1 cyan)
|
||||
(accent-2 magenta-cooler)
|
||||
(accent-3 yellow-warmer)
|
||||
|
||||
;;;; Button mappings
|
||||
|
||||
(fg-button-active fg-main)
|
||||
(fg-button-inactive fg-dim)
|
||||
(bg-button-active bg-active)
|
||||
(bg-button-inactive bg-dim)
|
||||
|
||||
;;;; Completion mappings
|
||||
|
||||
(fg-completion-match-0 blue)
|
||||
(fg-completion-match-1 magenta-warmer)
|
||||
(fg-completion-match-2 cyan)
|
||||
(fg-completion-match-3 red)
|
||||
(bg-completion-match-0 unspecified)
|
||||
(bg-completion-match-1 unspecified)
|
||||
(bg-completion-match-2 unspecified)
|
||||
(bg-completion-match-3 unspecified)
|
||||
|
||||
;;;; Date mappings
|
||||
|
||||
(date-common cyan)
|
||||
(date-deadline red-cooler)
|
||||
(date-deadline-subtle red-faint)
|
||||
(date-event fg-alt)
|
||||
(date-holiday red)
|
||||
(date-holiday-other blue)
|
||||
(date-now fg-main)
|
||||
(date-range fg-alt)
|
||||
(date-scheduled yellow)
|
||||
(date-scheduled-subtle yellow-faint)
|
||||
(date-weekday cyan)
|
||||
(date-weekend magenta)
|
||||
|
||||
;;;; Line number mappings
|
||||
|
||||
(fg-line-number-inactive fg-dim)
|
||||
(fg-line-number-active fg-main)
|
||||
(bg-line-number-inactive bg-dim)
|
||||
(bg-line-number-active bg-active)
|
||||
|
||||
;;;; Link mappings
|
||||
|
||||
(fg-link blue-warmer)
|
||||
(bg-link unspecified)
|
||||
(underline-link blue-warmer)
|
||||
|
||||
(fg-link-symbolic cyan)
|
||||
(bg-link-symbolic unspecified)
|
||||
(underline-link-symbolic cyan)
|
||||
|
||||
(fg-link-visited magenta)
|
||||
(bg-link-visited unspecified)
|
||||
(underline-link-visited magenta)
|
||||
|
||||
;;;; Mail mappings
|
||||
|
||||
(mail-cite-0 cyan)
|
||||
(mail-cite-1 yellow)
|
||||
(mail-cite-2 green-warmer)
|
||||
(mail-cite-3 red-cooler)
|
||||
(mail-part green-cooler)
|
||||
(mail-recipient blue-warmer)
|
||||
(mail-subject magenta-warmer)
|
||||
(mail-other magenta)
|
||||
|
||||
;;;; Mark mappings
|
||||
|
||||
(bg-mark-delete bg-red-subtle)
|
||||
(fg-mark-delete red)
|
||||
(bg-mark-select bg-cyan-subtle)
|
||||
(fg-mark-select cyan)
|
||||
(bg-mark-other bg-yellow-subtle)
|
||||
(fg-mark-other yellow)
|
||||
|
||||
;;;; Prompt mappings
|
||||
|
||||
(fg-prompt green-cooler)
|
||||
(bg-prompt unspecified)
|
||||
|
||||
;;;; Prose mappings
|
||||
|
||||
(bg-prose-block-delimiter bg-dim)
|
||||
(fg-prose-block-delimiter fg-dim)
|
||||
(bg-prose-block-contents bg-dim)
|
||||
|
||||
(bg-prose-code unspecified)
|
||||
(fg-prose-code green-cooler)
|
||||
|
||||
(bg-prose-macro unspecified)
|
||||
(fg-prose-macro blue-cooler)
|
||||
|
||||
(bg-prose-verbatim unspecified)
|
||||
(fg-prose-verbatim yellow-warmer)
|
||||
|
||||
(prose-done green)
|
||||
(prose-todo red)
|
||||
|
||||
(prose-metadata fg-dim)
|
||||
(prose-metadata-value fg-alt)
|
||||
|
||||
(prose-table fg-alt)
|
||||
(prose-table-formula magenta-warmer)
|
||||
|
||||
(prose-tag magenta-faint)
|
||||
|
||||
;;;; Rainbow mappings
|
||||
|
||||
(rainbow-0 fg-main)
|
||||
(rainbow-1 magenta-intense)
|
||||
(rainbow-2 cyan-intense)
|
||||
(rainbow-3 red-warmer)
|
||||
(rainbow-4 yellow-intense)
|
||||
(rainbow-5 magenta-cooler)
|
||||
(rainbow-6 green-intense)
|
||||
(rainbow-7 blue-warmer)
|
||||
(rainbow-8 magenta-warmer)
|
||||
|
||||
;;;; Search mappings
|
||||
|
||||
(bg-search-current bg-yellow-intense)
|
||||
(bg-search-lazy bg-cyan-intense)
|
||||
(bg-search-replace bg-red-intense)
|
||||
|
||||
(bg-search-rx-group-0 bg-blue-intense)
|
||||
(bg-search-rx-group-1 bg-green-intense)
|
||||
(bg-search-rx-group-2 bg-red-subtle)
|
||||
(bg-search-rx-group-3 bg-magenta-subtle)
|
||||
|
||||
;;;; Space mappings
|
||||
|
||||
(bg-space unspecified)
|
||||
(fg-space border)
|
||||
(bg-space-err bg-red-intense)
|
||||
|
||||
;;;; Terminal mappings
|
||||
|
||||
(bg-term-black "#000000")
|
||||
(fg-term-black "#000000")
|
||||
(bg-term-black-bright "#595959")
|
||||
(fg-term-black-bright "#595959")
|
||||
|
||||
(bg-term-red red)
|
||||
(fg-term-red red)
|
||||
(bg-term-red-bright red-warmer)
|
||||
(fg-term-red-bright red-warmer)
|
||||
|
||||
(bg-term-green green)
|
||||
(fg-term-green green)
|
||||
(bg-term-green-bright green-cooler)
|
||||
(fg-term-green-bright green-cooler)
|
||||
|
||||
(bg-term-yellow yellow)
|
||||
(fg-term-yellow yellow)
|
||||
(bg-term-yellow-bright yellow-warmer)
|
||||
(fg-term-yellow-bright yellow-warmer)
|
||||
|
||||
(bg-term-blue blue)
|
||||
(fg-term-blue blue)
|
||||
(bg-term-blue-bright blue-warmer)
|
||||
(fg-term-blue-bright blue-warmer)
|
||||
|
||||
(bg-term-magenta magenta)
|
||||
(fg-term-magenta magenta)
|
||||
(bg-term-magenta-bright magenta-cooler)
|
||||
(fg-term-magenta-bright magenta-cooler)
|
||||
|
||||
(bg-term-cyan cyan)
|
||||
(fg-term-cyan cyan)
|
||||
(bg-term-cyan-bright cyan-cooler)
|
||||
(fg-term-cyan-bright cyan-cooler)
|
||||
|
||||
(bg-term-white "#a6a6a6")
|
||||
(fg-term-white "#a6a6a6")
|
||||
(bg-term-white-bright "#ffffff")
|
||||
(fg-term-white-bright "#ffffff")
|
||||
|
||||
;;;; Heading mappings
|
||||
|
||||
(fg-heading-0 green-cooler)
|
||||
(fg-heading-1 fg-main)
|
||||
(fg-heading-2 yellow-faint)
|
||||
(fg-heading-3 fg-alt)
|
||||
(fg-heading-4 magenta)
|
||||
(fg-heading-5 green-faint)
|
||||
(fg-heading-6 red-faint)
|
||||
(fg-heading-7 cyan-warmer)
|
||||
(fg-heading-8 fg-dim)
|
||||
|
||||
(bg-heading-0 unspecified)
|
||||
(bg-heading-1 unspecified)
|
||||
(bg-heading-2 unspecified)
|
||||
(bg-heading-3 unspecified)
|
||||
(bg-heading-4 unspecified)
|
||||
(bg-heading-5 unspecified)
|
||||
(bg-heading-6 unspecified)
|
||||
(bg-heading-7 unspecified)
|
||||
(bg-heading-8 unspecified)
|
||||
|
||||
(overline-heading-0 unspecified)
|
||||
(overline-heading-1 unspecified)
|
||||
(overline-heading-2 unspecified)
|
||||
(overline-heading-3 unspecified)
|
||||
(overline-heading-4 unspecified)
|
||||
(overline-heading-5 unspecified)
|
||||
(overline-heading-6 unspecified)
|
||||
(overline-heading-7 unspecified)
|
||||
(overline-heading-8 unspecified))
|
||||
"The entire palette of the `modus-operandi-tinted' theme.
|
||||
|
||||
Named colors have the form (COLOR-NAME HEX-VALUE) with the former
|
||||
as a symbol and the latter as a string.
|
||||
|
||||
Semantic color mappings have the form (MAPPING-NAME COLOR-NAME)
|
||||
with both as symbols. The latter is a named color that already
|
||||
exists in the palette and is associated with a HEX-VALUE.")
|
||||
|
||||
(defcustom modus-operandi-tinted-palette-user nil
|
||||
"Like the `modus-operandi-tinted-palette' for user-defined entries.
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
(defcustom modus-operandi-tinted-palette-user nil
|
||||
"Like the `modus-operandi-tinted-palette' for user-defined entries.
|
||||
This is meant to extend the palette with custom named colors and/or
|
||||
semantic palette mappings. Those may then be used in combination with
|
||||
palette overrides (also see `modus-themes-common-palette-overrides' and
|
||||
`modus-operandi-tinted-palette-overrides')."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
|
||||
(defcustom modus-operandi-tinted-palette-overrides nil
|
||||
"Overrides for `modus-operandi-tinted-palette'.
|
||||
(defcustom modus-operandi-tinted-palette-overrides nil
|
||||
"Overrides for `modus-operandi-tinted-palette'.
|
||||
|
||||
Mirror the elements of the aforementioned palette, overriding
|
||||
their value.
|
||||
|
|
@ -521,18 +68,23 @@ mappings, such as to make the cursor red. Wherea theme-specific
|
|||
overrides can also be used to change the value of a named color,
|
||||
such as what hexadecimal RGB value the red-warmer symbol
|
||||
represents."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
|
||||
(modus-themes-theme modus-operandi-tinted
|
||||
modus-operandi-tinted-palette
|
||||
modus-operandi-tinted-palette-overrides)
|
||||
|
||||
(provide-theme 'modus-operandi-tinted))
|
||||
(modus-themes-theme
|
||||
'modus-operandi-tinted
|
||||
'modus-themes
|
||||
"Elegant, highly legible theme with a light ochre background.
|
||||
Conforms with the highest legibility standard for color contrast
|
||||
between background and foreground in any given piece of text,
|
||||
which corresponds to a minimum contrast in relative luminance of
|
||||
7:1 (WCAG AAA standard)."
|
||||
'light
|
||||
'modus-themes-operandi-tinted-palette
|
||||
'modus-operandi-tinted-palette-user
|
||||
'modus-operandi-tinted-palette-overrides)
|
||||
|
||||
;;; modus-operandi-tinted-theme.el ends here
|
||||
|
|
|
|||
|
|
@ -26,490 +26,35 @@
|
|||
;;
|
||||
;; The Modus themes conform with the highest standard for
|
||||
;; color-contrast accessibility between background and foreground
|
||||
;; values (WCAG AAA). Please refer to the official Info manual for
|
||||
;; further documentation (distributed with the themes, or available
|
||||
;; at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
;; values (WCAG AAA). They are also highly customizable and can even
|
||||
;; be used as the basis for other themes. Please refer to the official
|
||||
;; Info manual for further documentation (distributed with the themes,
|
||||
;; or available at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
|
||||
(eval-and-compile
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
;;;###theme-autoload
|
||||
(deftheme modus-operandi-tritanopia
|
||||
"Tritanopia-optimized theme with a white background.
|
||||
This variant is optimized for users with blue-yellow color
|
||||
deficiency (tritanopia). It conforms with the highest
|
||||
legibility standard for color contrast between background and
|
||||
foreground in any given piece of text, which corresponds to a
|
||||
minimum contrast in relative luminance of 7:1 (WCAG AAA
|
||||
standard)."
|
||||
:background-mode 'light
|
||||
:kind 'color-scheme
|
||||
:family 'modus)
|
||||
|
||||
(defconst modus-operandi-tritanopia-palette
|
||||
'(
|
||||
;;; Basic values
|
||||
|
||||
(bg-main "#ffffff")
|
||||
(bg-dim "#f2f2f2")
|
||||
(fg-main "#000000")
|
||||
(fg-dim "#595959")
|
||||
(fg-alt "#024960")
|
||||
(bg-active "#c4c4c4")
|
||||
(bg-inactive "#e0e0e0")
|
||||
(border "#9f9f9f")
|
||||
|
||||
;;; Common accent foregrounds
|
||||
|
||||
(red "#a60000")
|
||||
(red-warmer "#b21100")
|
||||
(red-cooler "#a0132f")
|
||||
(red-faint "#702000")
|
||||
(red-intense "#d00000")
|
||||
(green "#006800")
|
||||
(green-warmer "#316500")
|
||||
(green-cooler "#00663f")
|
||||
(green-faint "#2a5045")
|
||||
(green-intense "#008900")
|
||||
(yellow "#695500")
|
||||
(yellow-warmer "#973300")
|
||||
(yellow-cooler "#77492f")
|
||||
(yellow-faint "#624416")
|
||||
(yellow-intense "#808000")
|
||||
(blue "#0031a9")
|
||||
(blue-warmer "#3548cf")
|
||||
(blue-cooler "#0000b0")
|
||||
(blue-faint "#003497")
|
||||
(blue-intense "#0000ff")
|
||||
(magenta "#721045")
|
||||
(magenta-warmer "#8f0075")
|
||||
(magenta-cooler "#531ab6")
|
||||
(magenta-faint "#7c318f")
|
||||
(magenta-intense "#cd22bd")
|
||||
(cyan "#005e8b")
|
||||
(cyan-warmer "#3f578f")
|
||||
(cyan-cooler "#005f5f")
|
||||
(cyan-faint "#004f5f")
|
||||
(cyan-intense "#008899")
|
||||
|
||||
;;; Uncommon accent foregrounds
|
||||
|
||||
(rust "#8a290f")
|
||||
(gold "#80601f")
|
||||
(olive "#56692d")
|
||||
(slate "#2f3f83")
|
||||
(indigo "#4a3a8a")
|
||||
(maroon "#731c52")
|
||||
(pink "#7b435c")
|
||||
|
||||
;;; Common accent backgrounds
|
||||
|
||||
(bg-red-intense "#ff8f88")
|
||||
(bg-green-intense "#8adf80")
|
||||
(bg-yellow-intense "#f3d000")
|
||||
(bg-blue-intense "#bfc9ff")
|
||||
(bg-magenta-intense "#dfa0f0")
|
||||
(bg-cyan-intense "#a4d5f9")
|
||||
|
||||
(bg-red-subtle "#ffcfbf")
|
||||
(bg-green-subtle "#b3fabf")
|
||||
(bg-yellow-subtle "#fff576")
|
||||
(bg-blue-subtle "#ccdfff")
|
||||
(bg-magenta-subtle "#ffddff")
|
||||
(bg-cyan-subtle "#bfefff")
|
||||
|
||||
(bg-red-nuanced "#ffe8e8")
|
||||
(bg-green-nuanced "#e0f6e0")
|
||||
(bg-yellow-nuanced "#f8f0d0")
|
||||
(bg-blue-nuanced "#ecedff")
|
||||
(bg-magenta-nuanced "#f8e6f5")
|
||||
(bg-cyan-nuanced "#e0f2fa")
|
||||
|
||||
;;; Uncommon accent background and foreground pairs
|
||||
|
||||
(bg-clay "#f1c8b5")
|
||||
(fg-clay "#63192a")
|
||||
|
||||
(bg-ochre "#f0e3c0")
|
||||
(fg-ochre "#573a30")
|
||||
|
||||
(bg-lavender "#dfcdfa")
|
||||
(fg-lavender "#443379")
|
||||
|
||||
(bg-sage "#c0e7d4")
|
||||
(fg-sage "#124b41")
|
||||
|
||||
;;; Graphs
|
||||
|
||||
(bg-graph-red-0 "#ef7969")
|
||||
(bg-graph-red-1 "#ffaab4")
|
||||
(bg-graph-green-0 "#68c0a0")
|
||||
(bg-graph-green-1 "#a5dfd0")
|
||||
(bg-graph-yellow-0 "#d99f9f")
|
||||
(bg-graph-yellow-1 "#ffb58f")
|
||||
(bg-graph-blue-0 "#80a0df")
|
||||
(bg-graph-blue-1 "#a8cfff")
|
||||
(bg-graph-magenta-0 "#efafcf")
|
||||
(bg-graph-magenta-1 "#ffdaef")
|
||||
(bg-graph-cyan-0 "#7fd3ed")
|
||||
(bg-graph-cyan-1 "#afefff")
|
||||
|
||||
;;; Special purpose
|
||||
|
||||
(bg-completion "#afdfef")
|
||||
(bg-hover "#ffafbc")
|
||||
(bg-hover-secondary "#abdfdd")
|
||||
(bg-hl-line "#dfeaec")
|
||||
(bg-region "#bdbdbd")
|
||||
(fg-region "#000000")
|
||||
|
||||
(bg-mode-line-active "#afe0f2")
|
||||
(fg-mode-line-active "#0f0f0f")
|
||||
(border-mode-line-active "#2f4f44")
|
||||
(bg-mode-line-inactive "#e6e6e6")
|
||||
(fg-mode-line-inactive "#585858")
|
||||
(border-mode-line-inactive "#a3a3a3")
|
||||
|
||||
(modeline-err "#8f0000")
|
||||
(modeline-warning "#6f306f")
|
||||
(modeline-info "#00445f")
|
||||
|
||||
(bg-tab-bar "#dfdfdf")
|
||||
(bg-tab-current "#ffffff")
|
||||
(bg-tab-other "#c2c2c2")
|
||||
|
||||
;;; Diffs
|
||||
|
||||
(bg-added "#b5e7ff")
|
||||
(bg-added-faint "#c6f6ff")
|
||||
(bg-added-refine "#9adcef")
|
||||
(bg-added-fringe "#1782cc")
|
||||
(fg-added "#005079")
|
||||
(fg-added-intense "#0043aa")
|
||||
|
||||
(bg-changed "#eecfdf")
|
||||
(bg-changed-faint "#f0dde5")
|
||||
(bg-changed-refine "#e0b0d0")
|
||||
(bg-changed-fringe "#9f6ab0")
|
||||
(fg-changed "#6f1343")
|
||||
(fg-changed-intense "#7f0f9f")
|
||||
|
||||
(bg-removed "#ffd8d5")
|
||||
(bg-removed-faint "#ffe9e9")
|
||||
(bg-removed-refine "#f3b5af")
|
||||
(bg-removed-fringe "#d84a4f")
|
||||
(fg-removed "#8f1313")
|
||||
(fg-removed-intense "#aa2222")
|
||||
|
||||
(bg-diff-context "#f3f3f3")
|
||||
|
||||
;;; Paren match
|
||||
|
||||
(bg-paren-match "#5fcfff")
|
||||
(fg-paren-match fg-main)
|
||||
(bg-paren-expression "#efd3f5")
|
||||
(underline-paren-match unspecified)
|
||||
|
||||
;;; Mappings
|
||||
|
||||
;;;; General mappings
|
||||
|
||||
(fringe bg-dim)
|
||||
(cursor red-intense)
|
||||
|
||||
(keybind red)
|
||||
(name red-cooler)
|
||||
(identifier red-faint)
|
||||
|
||||
(err red-warmer)
|
||||
(warning magenta)
|
||||
(info cyan)
|
||||
|
||||
(underline-err red-intense)
|
||||
(underline-warning magenta-intense)
|
||||
(underline-note cyan-intense)
|
||||
|
||||
(bg-prominent-err bg-red-intense)
|
||||
(fg-prominent-err fg-main)
|
||||
(bg-prominent-warning bg-magenta-intense)
|
||||
(fg-prominent-warning fg-main)
|
||||
(bg-prominent-note bg-cyan-intense)
|
||||
(fg-prominent-note fg-main)
|
||||
|
||||
(bg-active-argument bg-red-nuanced)
|
||||
(fg-active-argument red-warmer)
|
||||
(bg-active-value bg-cyan-nuanced)
|
||||
(fg-active-value cyan)
|
||||
|
||||
;;;; Code mappings
|
||||
|
||||
(bracket fg-main)
|
||||
(builtin magenta)
|
||||
(comment red-faint)
|
||||
(constant green-cooler)
|
||||
(delimiter fg-main)
|
||||
(docmarkup magenta-faint)
|
||||
(docstring fg-alt)
|
||||
(fnname cyan-warmer)
|
||||
(keyword red-cooler)
|
||||
(number fg-main)
|
||||
(operator fg-main)
|
||||
(preprocessor red-warmer)
|
||||
(property cyan-cooler)
|
||||
(punctuation fg-main)
|
||||
(rx-backslash magenta)
|
||||
(rx-construct red)
|
||||
(string cyan)
|
||||
(type blue-warmer)
|
||||
(variable cyan-cooler)
|
||||
|
||||
;;;; Accent mappings
|
||||
|
||||
(accent-0 cyan)
|
||||
(accent-1 red-warmer)
|
||||
(accent-2 cyan-cooler)
|
||||
(accent-3 magenta)
|
||||
|
||||
;;;; Button mappings
|
||||
|
||||
(fg-button-active fg-main)
|
||||
(fg-button-inactive fg-dim)
|
||||
(bg-button-active bg-active)
|
||||
(bg-button-inactive bg-dim)
|
||||
|
||||
;;;; Completion mappings
|
||||
|
||||
(fg-completion-match-0 cyan)
|
||||
(fg-completion-match-1 red-warmer)
|
||||
(fg-completion-match-2 magenta)
|
||||
(fg-completion-match-3 cyan-cooler)
|
||||
(bg-completion-match-0 unspecified)
|
||||
(bg-completion-match-1 unspecified)
|
||||
(bg-completion-match-2 unspecified)
|
||||
(bg-completion-match-3 unspecified)
|
||||
|
||||
;;;; Date mappings
|
||||
|
||||
(date-common cyan-cooler)
|
||||
(date-deadline red)
|
||||
(date-deadline-subtle red-faint)
|
||||
(date-event fg-alt)
|
||||
(date-holiday red)
|
||||
(date-holiday-other cyan)
|
||||
(date-now fg-main)
|
||||
(date-range fg-alt)
|
||||
(date-scheduled magenta)
|
||||
(date-scheduled-subtle magenta-faint)
|
||||
(date-weekday cyan)
|
||||
(date-weekend magenta-warmer)
|
||||
|
||||
;;;; Line number mappings
|
||||
|
||||
(fg-line-number-inactive fg-dim)
|
||||
(fg-line-number-active fg-main)
|
||||
(bg-line-number-inactive bg-dim)
|
||||
(bg-line-number-active bg-active)
|
||||
|
||||
;;;; Link mappings
|
||||
|
||||
(fg-link cyan)
|
||||
(bg-link unspecified)
|
||||
(underline-link cyan)
|
||||
|
||||
(fg-link-symbolic cyan-cooler)
|
||||
(bg-link-symbolic unspecified)
|
||||
(underline-link-symbolic cyan-cooler)
|
||||
|
||||
(fg-link-visited magenta)
|
||||
(bg-link-visited unspecified)
|
||||
(underline-link-visited magenta)
|
||||
|
||||
;;;; Mail mappings
|
||||
|
||||
(mail-cite-0 cyan-faint)
|
||||
(mail-cite-1 red-faint)
|
||||
(mail-cite-2 magenta-warmer)
|
||||
(mail-cite-3 cyan-warmer)
|
||||
(mail-part cyan-cooler)
|
||||
(mail-recipient cyan)
|
||||
(mail-subject red-cooler)
|
||||
(mail-other cyan)
|
||||
|
||||
;;;; Mark mappings
|
||||
|
||||
(bg-mark-delete bg-red-subtle)
|
||||
(fg-mark-delete red)
|
||||
(bg-mark-select bg-cyan-subtle)
|
||||
(fg-mark-select cyan)
|
||||
(bg-mark-other bg-magenta-subtle)
|
||||
(fg-mark-other magenta)
|
||||
|
||||
;;;; Prompt mappings
|
||||
|
||||
(fg-prompt cyan-cooler)
|
||||
(bg-prompt unspecified)
|
||||
|
||||
;;;; Prose mappings
|
||||
|
||||
(bg-prose-block-delimiter bg-dim)
|
||||
(fg-prose-block-delimiter fg-dim)
|
||||
(bg-prose-block-contents bg-dim)
|
||||
|
||||
(bg-prose-code unspecified)
|
||||
(fg-prose-code cyan)
|
||||
|
||||
(bg-prose-macro unspecified)
|
||||
(fg-prose-macro red-warmer)
|
||||
|
||||
(bg-prose-verbatim unspecified)
|
||||
(fg-prose-verbatim magenta-warmer)
|
||||
|
||||
(prose-done cyan)
|
||||
(prose-todo red)
|
||||
|
||||
(prose-metadata fg-dim)
|
||||
(prose-metadata-value fg-alt)
|
||||
|
||||
(prose-table fg-alt)
|
||||
(prose-table-formula red-cooler)
|
||||
|
||||
(prose-tag fg-alt)
|
||||
|
||||
;;;; Rainbow mappings
|
||||
|
||||
(rainbow-0 cyan)
|
||||
(rainbow-1 red)
|
||||
(rainbow-2 cyan-warmer)
|
||||
(rainbow-3 red-cooler)
|
||||
(rainbow-4 cyan-cooler)
|
||||
(rainbow-5 magenta)
|
||||
(rainbow-6 cyan-faint)
|
||||
(rainbow-7 magenta-faint)
|
||||
(rainbow-8 red-faint)
|
||||
|
||||
;;;; Search mappings
|
||||
|
||||
(bg-search-current bg-red-intense)
|
||||
(bg-search-lazy bg-cyan-intense)
|
||||
(bg-search-replace bg-magenta-intense)
|
||||
|
||||
(bg-search-rx-group-0 bg-blue-intense)
|
||||
(bg-search-rx-group-1 bg-magenta-intense)
|
||||
(bg-search-rx-group-2 bg-cyan-subtle)
|
||||
(bg-search-rx-group-3 bg-red-subtle)
|
||||
|
||||
;;;; Space mappings
|
||||
|
||||
(bg-space unspecified)
|
||||
(fg-space border)
|
||||
(bg-space-err bg-red-intense)
|
||||
|
||||
;;;; Terminal mappings
|
||||
|
||||
(bg-term-black "#000000")
|
||||
(fg-term-black "#000000")
|
||||
(bg-term-black-bright "#595959")
|
||||
(fg-term-black-bright "#595959")
|
||||
|
||||
(bg-term-red red)
|
||||
(fg-term-red red)
|
||||
(bg-term-red-bright red-warmer)
|
||||
(fg-term-red-bright red-warmer)
|
||||
|
||||
(bg-term-green green)
|
||||
(fg-term-green green)
|
||||
(bg-term-green-bright green-cooler)
|
||||
(fg-term-green-bright green-cooler)
|
||||
|
||||
(bg-term-yellow yellow)
|
||||
(fg-term-yellow yellow)
|
||||
(bg-term-yellow-bright yellow-warmer)
|
||||
(fg-term-yellow-bright yellow-warmer)
|
||||
|
||||
(bg-term-blue blue)
|
||||
(fg-term-blue blue)
|
||||
(bg-term-blue-bright blue-warmer)
|
||||
(fg-term-blue-bright blue-warmer)
|
||||
|
||||
(bg-term-magenta magenta)
|
||||
(fg-term-magenta magenta)
|
||||
(bg-term-magenta-bright magenta-cooler)
|
||||
(fg-term-magenta-bright magenta-cooler)
|
||||
|
||||
(bg-term-cyan cyan)
|
||||
(fg-term-cyan cyan)
|
||||
(bg-term-cyan-bright cyan-cooler)
|
||||
(fg-term-cyan-bright cyan-cooler)
|
||||
|
||||
(bg-term-white "#a6a6a6")
|
||||
(fg-term-white "#a6a6a6")
|
||||
(bg-term-white-bright "#ffffff")
|
||||
(fg-term-white-bright "#ffffff")
|
||||
|
||||
;;;; Heading mappings
|
||||
|
||||
(fg-heading-0 cyan-cooler)
|
||||
(fg-heading-1 fg-main)
|
||||
(fg-heading-2 red-faint)
|
||||
(fg-heading-3 cyan-faint)
|
||||
(fg-heading-4 magenta)
|
||||
(fg-heading-5 green-faint)
|
||||
(fg-heading-6 magenta-faint)
|
||||
(fg-heading-7 cyan-warmer)
|
||||
(fg-heading-8 fg-dim)
|
||||
|
||||
(bg-heading-0 unspecified)
|
||||
(bg-heading-1 unspecified)
|
||||
(bg-heading-2 unspecified)
|
||||
(bg-heading-3 unspecified)
|
||||
(bg-heading-4 unspecified)
|
||||
(bg-heading-5 unspecified)
|
||||
(bg-heading-6 unspecified)
|
||||
(bg-heading-7 unspecified)
|
||||
(bg-heading-8 unspecified)
|
||||
|
||||
(overline-heading-0 unspecified)
|
||||
(overline-heading-1 unspecified)
|
||||
(overline-heading-2 unspecified)
|
||||
(overline-heading-3 unspecified)
|
||||
(overline-heading-4 unspecified)
|
||||
(overline-heading-5 unspecified)
|
||||
(overline-heading-6 unspecified)
|
||||
(overline-heading-7 unspecified)
|
||||
(overline-heading-8 unspecified))
|
||||
"The entire palette of the `modus-operandi-tritanopia' theme.
|
||||
|
||||
Named colors have the form (COLOR-NAME HEX-VALUE) with the former
|
||||
as a symbol and the latter as a string.
|
||||
|
||||
Semantic color mappings have the form (MAPPING-NAME COLOR-NAME)
|
||||
with both as symbols. The latter is a named color that already
|
||||
exists in the palette and is associated with a HEX-VALUE.")
|
||||
|
||||
(defcustom modus-operandi-tritanopia-palette-user nil
|
||||
"Like the `modus-operandi-tritanopia-palette' for user-defined entries.
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
(defcustom modus-operandi-tritanopia-palette-user nil
|
||||
"Like the `modus-operandi-tritanopia-palette' for user-defined entries.
|
||||
This is meant to extend the palette with custom named colors and/or
|
||||
semantic palette mappings. Those may then be used in combination with
|
||||
palette overrides (also see `modus-themes-common-palette-overrides' and
|
||||
`modus-operandi-tritanopia-palette-overrides')."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
|
||||
(defcustom modus-operandi-tritanopia-palette-overrides nil
|
||||
"Overrides for `modus-operandi-tritanopia-palette'.
|
||||
(defcustom modus-operandi-tritanopia-palette-overrides nil
|
||||
"Overrides for `modus-operandi-tritanopia-palette'.
|
||||
|
||||
Mirror the elements of the aforementioned palette, overriding
|
||||
their value.
|
||||
|
|
@ -523,18 +68,25 @@ mappings, such as to make the cursor red. Wherea theme-specific
|
|||
overrides can also be used to change the value of a named color,
|
||||
such as what hexadecimal RGB value the red-warmer symbol
|
||||
represents."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
|
||||
(modus-themes-theme modus-operandi-tritanopia
|
||||
modus-operandi-tritanopia-palette
|
||||
modus-operandi-tritanopia-palette-overrides)
|
||||
|
||||
(provide-theme 'modus-operandi-tritanopia))
|
||||
(modus-themes-theme
|
||||
'modus-operandi-tritanopia
|
||||
'modus-themes
|
||||
"Tritanopia-optimized theme with a white background.
|
||||
This variant is optimized for users with blue-yellow color
|
||||
deficiency (tritanopia). It conforms with the highest
|
||||
legibility standard for color contrast between background and
|
||||
foreground in any given piece of text, which corresponds to a
|
||||
minimum contrast in relative luminance of 7:1 (WCAG AAA
|
||||
standard)."
|
||||
'light
|
||||
'modus-themes-operandi-tritanopia-palette
|
||||
'modus-operandi-tritanopia-palette-user
|
||||
'modus-operandi-tritanopia-palette-overrides)
|
||||
|
||||
;;; modus-operandi-tritanopia-theme.el ends here
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -26,490 +26,35 @@
|
|||
;;
|
||||
;; The Modus themes conform with the highest standard for
|
||||
;; color-contrast accessibility between background and foreground
|
||||
;; values (WCAG AAA). Please refer to the official Info manual for
|
||||
;; further documentation (distributed with the themes, or available
|
||||
;; at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
;; values (WCAG AAA). They are also highly customizable and can even
|
||||
;; be used as the basis for other themes. Please refer to the official
|
||||
;; Info manual for further documentation (distributed with the themes,
|
||||
;; or available at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
|
||||
(eval-and-compile
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
;;;###theme-autoload
|
||||
(deftheme modus-vivendi-deuteranopia
|
||||
"Deuteranopia-optimized theme with a black background.
|
||||
This variant is optimized for users with red-green color
|
||||
deficiency (deuteranopia). It conforms with the highest
|
||||
legibility standard for color contrast between background and
|
||||
foreground in any given piece of text, which corresponds to a
|
||||
minimum contrast in relative luminance of 7:1 (WCAG AAA
|
||||
standard)."
|
||||
:background-mode 'dark
|
||||
:kind 'color-scheme
|
||||
:family 'modus)
|
||||
|
||||
(defconst modus-vivendi-deuteranopia-palette
|
||||
'(
|
||||
;;; Basic values
|
||||
|
||||
(bg-main "#000000")
|
||||
(bg-dim "#1e1e1e")
|
||||
(fg-main "#ffffff")
|
||||
(fg-dim "#989898")
|
||||
(fg-alt "#c6daff")
|
||||
(bg-active "#535353")
|
||||
(bg-inactive "#303030")
|
||||
(border "#646464")
|
||||
|
||||
;;; Common accent foregrounds
|
||||
|
||||
(red "#ff5f59")
|
||||
(red-warmer "#ff6b55")
|
||||
(red-cooler "#ff7f86")
|
||||
(red-faint "#ff9580")
|
||||
(red-intense "#ff5f5f")
|
||||
(green "#44bc44")
|
||||
(green-warmer "#70b900")
|
||||
(green-cooler "#00c06f")
|
||||
(green-faint "#88ca9f")
|
||||
(green-intense "#44df44")
|
||||
(yellow "#cabf00")
|
||||
(yellow-warmer "#ffa00f")
|
||||
(yellow-cooler "#d8af7a")
|
||||
(yellow-faint "#d2b580")
|
||||
(yellow-intense "#efef00")
|
||||
(blue "#2fafff")
|
||||
(blue-warmer "#79a8ff")
|
||||
(blue-cooler "#00bcff")
|
||||
(blue-faint "#82b0ec")
|
||||
(blue-intense "#338fff")
|
||||
(magenta "#feacd0")
|
||||
(magenta-warmer "#f78fe7")
|
||||
(magenta-cooler "#b6a0ff")
|
||||
(magenta-faint "#caa6df")
|
||||
(magenta-intense "#ff66ff")
|
||||
(cyan "#00d3d0")
|
||||
(cyan-warmer "#4ae2f0")
|
||||
(cyan-cooler "#6ae4b9")
|
||||
(cyan-faint "#9ac8e0")
|
||||
(cyan-intense "#00eff0")
|
||||
|
||||
;;; Uncommon accent foregrounds
|
||||
|
||||
(rust "#db7b5f")
|
||||
(gold "#c0965b")
|
||||
(olive "#9cbd6f")
|
||||
(slate "#76afbf")
|
||||
(indigo "#9099d9")
|
||||
(maroon "#cf7fa7")
|
||||
(pink "#d09dc0")
|
||||
|
||||
;;; Common accent backgrounds
|
||||
|
||||
(bg-red-intense "#9d1f1f")
|
||||
(bg-green-intense "#2f822f")
|
||||
(bg-yellow-intense "#7a6100")
|
||||
(bg-blue-intense "#1640b0")
|
||||
(bg-magenta-intense "#7030af")
|
||||
(bg-cyan-intense "#2266ae")
|
||||
|
||||
(bg-red-subtle "#620f2a")
|
||||
(bg-green-subtle "#00422a")
|
||||
(bg-yellow-subtle "#4a4000")
|
||||
(bg-blue-subtle "#242679")
|
||||
(bg-magenta-subtle "#552f5f")
|
||||
(bg-cyan-subtle "#004065")
|
||||
|
||||
(bg-red-nuanced "#3a0c14")
|
||||
(bg-green-nuanced "#092f1f")
|
||||
(bg-yellow-nuanced "#381d0f")
|
||||
(bg-blue-nuanced "#12154a")
|
||||
(bg-magenta-nuanced "#2f0c3f")
|
||||
(bg-cyan-nuanced "#042837")
|
||||
|
||||
;;; Uncommon accent background and foreground pairs
|
||||
|
||||
(bg-clay "#49191a")
|
||||
(fg-clay "#f1b090")
|
||||
|
||||
(bg-ochre "#462f20")
|
||||
(fg-ochre "#e0d09c")
|
||||
|
||||
(bg-lavender "#38325c")
|
||||
(fg-lavender "#dfc0f0")
|
||||
|
||||
(bg-sage "#143e32")
|
||||
(fg-sage "#c3e7d4")
|
||||
|
||||
;;; Graphs
|
||||
|
||||
(bg-graph-red-0 "#bf6000")
|
||||
(bg-graph-red-1 "#733500")
|
||||
(bg-graph-green-0 "#6fbf8f")
|
||||
(bg-graph-green-1 "#2f5f4f")
|
||||
(bg-graph-yellow-0 "#c1c00a")
|
||||
(bg-graph-yellow-1 "#7f6640")
|
||||
(bg-graph-blue-0 "#0f90ef")
|
||||
(bg-graph-blue-1 "#1f2f8f")
|
||||
(bg-graph-magenta-0 "#7f7f8e")
|
||||
(bg-graph-magenta-1 "#4f4f5f")
|
||||
(bg-graph-cyan-0 "#376f9a")
|
||||
(bg-graph-cyan-1 "#00404f")
|
||||
|
||||
;;; Special purpose
|
||||
|
||||
(bg-completion "#2f447f")
|
||||
(bg-hover "#45605e")
|
||||
(bg-hover-secondary "#604c30")
|
||||
(bg-hl-line "#2f3849")
|
||||
(bg-region "#5a5a5a")
|
||||
(fg-region "#ffffff")
|
||||
|
||||
(bg-mode-line-active "#2a2a6a")
|
||||
(fg-mode-line-active "#f0f0f0")
|
||||
(border-mode-line-active "#8080a7")
|
||||
(bg-mode-line-inactive "#2d2d2d")
|
||||
(fg-mode-line-inactive "#969696")
|
||||
(border-mode-line-inactive "#606060")
|
||||
|
||||
(modeline-err "#e5bf00")
|
||||
(modeline-warning "#c0cf35")
|
||||
(modeline-info "#abeadf")
|
||||
|
||||
(bg-tab-bar "#313131")
|
||||
(bg-tab-current "#000000")
|
||||
(bg-tab-other "#545454")
|
||||
|
||||
;;; Diffs
|
||||
|
||||
(bg-added "#003066")
|
||||
(bg-added-faint "#001a4f")
|
||||
(bg-added-refine "#0f4a77")
|
||||
(bg-added-fringe "#006fff")
|
||||
(fg-added "#c4d5ff")
|
||||
(fg-added-intense "#8080ff")
|
||||
|
||||
(bg-changed "#2f123f")
|
||||
(bg-changed-faint "#1f022f")
|
||||
(bg-changed-refine "#3f325f")
|
||||
(bg-changed-fringe "#7f55a0")
|
||||
(fg-changed "#e3cfff")
|
||||
(fg-changed-intense "#cf9fe2")
|
||||
|
||||
(bg-removed "#3d3d00")
|
||||
(bg-removed-faint "#281f00")
|
||||
(bg-removed-refine "#555500")
|
||||
(bg-removed-fringe "#d0c03f")
|
||||
(fg-removed "#d4d48f")
|
||||
(fg-removed-intense "#d0b05f")
|
||||
|
||||
(bg-diff-context "#1a1a1a")
|
||||
|
||||
;;; Paren match
|
||||
|
||||
(bg-paren-match "#2f7f9f")
|
||||
(fg-paren-match fg-main)
|
||||
(bg-paren-expression "#453040")
|
||||
(underline-paren-match unspecified)
|
||||
|
||||
;;; Mappings
|
||||
|
||||
;;;; General mappings
|
||||
|
||||
(fringe bg-dim)
|
||||
(cursor yellow-intense)
|
||||
|
||||
(keybind blue-cooler)
|
||||
(name blue-cooler)
|
||||
(identifier yellow-faint)
|
||||
|
||||
(err yellow-warmer)
|
||||
(warning yellow)
|
||||
(info blue)
|
||||
|
||||
(underline-err yellow-intense)
|
||||
(underline-warning magenta-faint)
|
||||
(underline-note cyan)
|
||||
|
||||
(bg-prominent-err bg-yellow-intense)
|
||||
(fg-prominent-err fg-main)
|
||||
(bg-prominent-warning bg-magenta-intense)
|
||||
(fg-prominent-warning fg-main)
|
||||
(bg-prominent-note bg-cyan-intense)
|
||||
(fg-prominent-note fg-main)
|
||||
|
||||
(bg-active-argument bg-yellow-nuanced)
|
||||
(fg-active-argument yellow-warmer)
|
||||
(bg-active-value bg-blue-nuanced)
|
||||
(fg-active-value blue-warmer)
|
||||
|
||||
;;;; Code mappings
|
||||
|
||||
(bracket fg-main)
|
||||
(builtin yellow)
|
||||
(comment yellow-cooler)
|
||||
(constant blue-faint)
|
||||
(delimiter fg-main)
|
||||
(docmarkup magenta-faint)
|
||||
(docstring cyan-faint)
|
||||
(fnname yellow-warmer)
|
||||
(keyword blue-cooler)
|
||||
(number fg-main)
|
||||
(operator fg-main)
|
||||
(preprocessor magenta-cooler)
|
||||
(property cyan)
|
||||
(punctuation fg-main)
|
||||
(rx-backslash blue-cooler)
|
||||
(rx-construct yellow-cooler)
|
||||
(string blue-warmer)
|
||||
(type cyan-cooler)
|
||||
(variable cyan)
|
||||
|
||||
;;;; Accent mappings
|
||||
|
||||
(accent-0 blue-warmer)
|
||||
(accent-1 yellow)
|
||||
(accent-2 cyan-cooler)
|
||||
(accent-3 yellow-cooler)
|
||||
|
||||
;;;; Button mappings
|
||||
|
||||
(fg-button-active fg-main)
|
||||
(fg-button-inactive fg-dim)
|
||||
(bg-button-active bg-active)
|
||||
(bg-button-inactive bg-dim)
|
||||
|
||||
;;;; Completion mappings
|
||||
|
||||
(fg-completion-match-0 blue-cooler)
|
||||
(fg-completion-match-1 yellow)
|
||||
(fg-completion-match-2 cyan-cooler)
|
||||
(fg-completion-match-3 yellow-cooler)
|
||||
(bg-completion-match-0 unspecified)
|
||||
(bg-completion-match-1 unspecified)
|
||||
(bg-completion-match-2 unspecified)
|
||||
(bg-completion-match-3 unspecified)
|
||||
|
||||
;;;; Date mappings
|
||||
|
||||
(date-common cyan)
|
||||
(date-deadline yellow-warmer)
|
||||
(date-deadline-subtle red-faint)
|
||||
(date-event fg-alt)
|
||||
(date-holiday yellow-warmer)
|
||||
(date-holiday-other blue)
|
||||
(date-now fg-main)
|
||||
(date-range fg-alt)
|
||||
(date-scheduled yellow-cooler)
|
||||
(date-scheduled-subtle yellow-faint)
|
||||
(date-weekday cyan)
|
||||
(date-weekend magenta-cooler)
|
||||
|
||||
;;;; Line number mappings
|
||||
|
||||
(fg-line-number-inactive fg-dim)
|
||||
(fg-line-number-active fg-main)
|
||||
(bg-line-number-inactive bg-dim)
|
||||
(bg-line-number-active bg-active)
|
||||
|
||||
;;;; Link mappings
|
||||
|
||||
(fg-link blue-warmer)
|
||||
(bg-link unspecified)
|
||||
(underline-link blue-warmer)
|
||||
|
||||
(fg-link-symbolic cyan)
|
||||
(bg-link-symbolic unspecified)
|
||||
(underline-link-symbolic cyan)
|
||||
|
||||
(fg-link-visited yellow-faint)
|
||||
(bg-link-visited unspecified)
|
||||
(underline-link-visited yellow-faint)
|
||||
|
||||
;;;; Mail mappings
|
||||
|
||||
(mail-cite-0 blue-warmer)
|
||||
(mail-cite-1 yellow-cooler)
|
||||
(mail-cite-2 cyan-faint)
|
||||
(mail-cite-3 yellow)
|
||||
(mail-part blue)
|
||||
(mail-recipient blue)
|
||||
(mail-subject yellow-warmer)
|
||||
(mail-other cyan-faint)
|
||||
|
||||
;;;; Mark mappings
|
||||
|
||||
(bg-mark-delete bg-yellow-subtle)
|
||||
(fg-mark-delete yellow)
|
||||
(bg-mark-select bg-cyan-subtle)
|
||||
(fg-mark-select cyan)
|
||||
(bg-mark-other bg-magenta-subtle)
|
||||
(fg-mark-other magenta-warmer)
|
||||
|
||||
;;;; Prompt mappings
|
||||
|
||||
(fg-prompt blue)
|
||||
(bg-prompt unspecified)
|
||||
|
||||
;;;; Prose mappings
|
||||
|
||||
(bg-prose-block-delimiter bg-dim)
|
||||
(fg-prose-block-delimiter fg-dim)
|
||||
(bg-prose-block-contents bg-dim)
|
||||
|
||||
(bg-prose-code unspecified)
|
||||
(fg-prose-code cyan-cooler)
|
||||
|
||||
(bg-prose-macro unspecified)
|
||||
(fg-prose-macro magenta-cooler)
|
||||
|
||||
(bg-prose-verbatim unspecified)
|
||||
(fg-prose-verbatim yellow)
|
||||
|
||||
(prose-done blue)
|
||||
(prose-todo yellow-warmer)
|
||||
|
||||
(prose-metadata fg-dim)
|
||||
(prose-metadata-value fg-alt)
|
||||
|
||||
(prose-table fg-alt)
|
||||
(prose-table-formula yellow-warmer)
|
||||
|
||||
(prose-tag fg-alt)
|
||||
|
||||
;;;; Rainbow mappings
|
||||
|
||||
(rainbow-0 yellow-warmer)
|
||||
(rainbow-1 blue)
|
||||
(rainbow-2 yellow-cooler)
|
||||
(rainbow-3 blue-warmer)
|
||||
(rainbow-4 yellow)
|
||||
(rainbow-5 cyan-warmer)
|
||||
(rainbow-6 yellow-faint)
|
||||
(rainbow-7 blue-faint)
|
||||
(rainbow-8 magenta-faint)
|
||||
|
||||
;;;; Search mappings
|
||||
|
||||
(bg-search-current bg-yellow-intense)
|
||||
(bg-search-lazy bg-blue-intense)
|
||||
(bg-search-replace bg-yellow-intense)
|
||||
|
||||
(bg-search-rx-group-0 bg-cyan-intense)
|
||||
(bg-search-rx-group-1 bg-magenta-intense)
|
||||
(bg-search-rx-group-2 bg-blue-subtle)
|
||||
(bg-search-rx-group-3 bg-yellow-subtle)
|
||||
|
||||
;;;; Space mappings
|
||||
|
||||
(bg-space unspecified)
|
||||
(fg-space border)
|
||||
(bg-space-err bg-yellow-intense)
|
||||
|
||||
;;;; Terminal mappings
|
||||
|
||||
(bg-term-black "#000000")
|
||||
(fg-term-black "#000000")
|
||||
(bg-term-black-bright "#595959")
|
||||
(fg-term-black-bright "#595959")
|
||||
|
||||
(bg-term-red red)
|
||||
(fg-term-red red)
|
||||
(bg-term-red-bright red-warmer)
|
||||
(fg-term-red-bright red-warmer)
|
||||
|
||||
(bg-term-green green)
|
||||
(fg-term-green green)
|
||||
(bg-term-green-bright green-cooler)
|
||||
(fg-term-green-bright green-cooler)
|
||||
|
||||
(bg-term-yellow yellow)
|
||||
(fg-term-yellow yellow)
|
||||
(bg-term-yellow-bright yellow-warmer)
|
||||
(fg-term-yellow-bright yellow-warmer)
|
||||
|
||||
(bg-term-blue blue)
|
||||
(fg-term-blue blue)
|
||||
(bg-term-blue-bright blue-warmer)
|
||||
(fg-term-blue-bright blue-warmer)
|
||||
|
||||
(bg-term-magenta magenta)
|
||||
(fg-term-magenta magenta)
|
||||
(bg-term-magenta-bright magenta-cooler)
|
||||
(fg-term-magenta-bright magenta-cooler)
|
||||
|
||||
(bg-term-cyan cyan)
|
||||
(fg-term-cyan cyan)
|
||||
(bg-term-cyan-bright cyan-cooler)
|
||||
(fg-term-cyan-bright cyan-cooler)
|
||||
|
||||
(bg-term-white "#a6a6a6")
|
||||
(fg-term-white "#a6a6a6")
|
||||
(bg-term-white-bright "#ffffff")
|
||||
(fg-term-white-bright "#ffffff")
|
||||
|
||||
;;;; Heading mappings
|
||||
|
||||
(fg-heading-0 cyan-cooler)
|
||||
(fg-heading-1 fg-main)
|
||||
(fg-heading-2 yellow-faint)
|
||||
(fg-heading-3 blue-faint)
|
||||
(fg-heading-4 green-faint)
|
||||
(fg-heading-5 magenta-cooler)
|
||||
(fg-heading-6 yellow-cooler)
|
||||
(fg-heading-7 cyan)
|
||||
(fg-heading-8 fg-dim)
|
||||
|
||||
(bg-heading-0 unspecified)
|
||||
(bg-heading-1 unspecified)
|
||||
(bg-heading-2 unspecified)
|
||||
(bg-heading-3 unspecified)
|
||||
(bg-heading-4 unspecified)
|
||||
(bg-heading-5 unspecified)
|
||||
(bg-heading-6 unspecified)
|
||||
(bg-heading-7 unspecified)
|
||||
(bg-heading-8 unspecified)
|
||||
|
||||
(overline-heading-0 unspecified)
|
||||
(overline-heading-1 unspecified)
|
||||
(overline-heading-2 unspecified)
|
||||
(overline-heading-3 unspecified)
|
||||
(overline-heading-4 unspecified)
|
||||
(overline-heading-5 unspecified)
|
||||
(overline-heading-6 unspecified)
|
||||
(overline-heading-7 unspecified)
|
||||
(overline-heading-8 unspecified))
|
||||
"The entire palette of the `modus-vivendi-deuteranopia' theme.
|
||||
|
||||
Named colors have the form (COLOR-NAME HEX-VALUE) with the former
|
||||
as a symbol and the latter as a string.
|
||||
|
||||
Semantic color mappings have the form (MAPPING-NAME COLOR-NAME)
|
||||
with both as symbols. The latter is a named color that already
|
||||
exists in the palette and is associated with a HEX-VALUE.")
|
||||
|
||||
(defcustom modus-vivendi-deuteranopia-palette-user nil
|
||||
"Like the `modus-vivendi-deuteranopia-palette' for user-defined entries.
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
(defcustom modus-vivendi-deuteranopia-palette-user nil
|
||||
"Like the `modus-vivendi-deuteranopia-palette' for user-defined entries.
|
||||
This is meant to extend the palette with custom named colors and/or
|
||||
semantic palette mappings. Those may then be used in combination with
|
||||
palette overrides (also see `modus-themes-common-palette-overrides' and
|
||||
`modus-vivendi-deuteranopia-palette-overrides')."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
|
||||
(defcustom modus-vivendi-deuteranopia-palette-overrides nil
|
||||
"Overrides for `modus-vivendi-deuteranopia-palette'.
|
||||
(defcustom modus-vivendi-deuteranopia-palette-overrides nil
|
||||
"Overrides for `modus-vivendi-deuteranopia-palette'.
|
||||
|
||||
Mirror the elements of the aforementioned palette, overriding
|
||||
their value.
|
||||
|
|
@ -523,18 +68,25 @@ mappings, such as to make the cursor red. Wherea theme-specific
|
|||
overrides can also be used to change the value of a named color,
|
||||
such as what hexadecimal RGB value the red-warmer symbol
|
||||
represents."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
|
||||
(modus-themes-theme modus-vivendi-deuteranopia
|
||||
modus-vivendi-deuteranopia-palette
|
||||
modus-vivendi-deuteranopia-palette-overrides)
|
||||
|
||||
(provide-theme 'modus-vivendi-deuteranopia))
|
||||
(modus-themes-theme
|
||||
'modus-vivendi-deuteranopia
|
||||
'modus-themes
|
||||
"Deuteranopia-optimized theme with a black background.
|
||||
This variant is optimized for users with red-green color
|
||||
deficiency (deuteranopia). It conforms with the highest
|
||||
legibility standard for color contrast between background and
|
||||
foreground in any given piece of text, which corresponds to a
|
||||
minimum contrast in relative luminance of 7:1 (WCAG AAA
|
||||
standard)."
|
||||
'dark
|
||||
'modus-themes-vivendi-deuteranopia-palette
|
||||
'modus-vivendi-deuteranopia-palette-user
|
||||
'modus-vivendi-deuteranopia-palette-overrides)
|
||||
|
||||
;;; modus-vivendi-deuteranopia-theme.el ends here
|
||||
|
|
|
|||
|
|
@ -26,488 +26,35 @@
|
|||
;;
|
||||
;; The Modus themes conform with the highest standard for
|
||||
;; color-contrast accessibility between background and foreground
|
||||
;; values (WCAG AAA). Please refer to the official Info manual for
|
||||
;; further documentation (distributed with the themes, or available
|
||||
;; at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
;; values (WCAG AAA). They are also highly customizable and can even
|
||||
;; be used as the basis for other themes. Please refer to the official
|
||||
;; Info manual for further documentation (distributed with the themes,
|
||||
;; or available at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
|
||||
(eval-and-compile
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
;;;###theme-autoload
|
||||
(deftheme modus-vivendi
|
||||
"Elegant, highly legible theme with a black background.
|
||||
Conforms with the highest legibility standard for color contrast
|
||||
between background and foreground in any given piece of text,
|
||||
which corresponds to a minimum contrast in relative luminance of
|
||||
7:1 (WCAG AAA standard)."
|
||||
:background-mode 'dark
|
||||
:kind 'color-scheme
|
||||
:family 'modus)
|
||||
|
||||
(defconst modus-vivendi-palette
|
||||
'(
|
||||
;;; Basic values
|
||||
|
||||
(bg-main "#000000")
|
||||
(bg-dim "#1e1e1e")
|
||||
(fg-main "#ffffff")
|
||||
(fg-dim "#989898")
|
||||
(fg-alt "#c6daff")
|
||||
(bg-active "#535353")
|
||||
(bg-inactive "#303030")
|
||||
(border "#646464")
|
||||
|
||||
;;; Common accent foregrounds
|
||||
|
||||
(red "#ff5f59")
|
||||
(red-warmer "#ff6b55")
|
||||
(red-cooler "#ff7f86")
|
||||
(red-faint "#ff9580")
|
||||
(red-intense "#ff5f5f")
|
||||
(green "#44bc44")
|
||||
(green-warmer "#70b900")
|
||||
(green-cooler "#00c06f")
|
||||
(green-faint "#88ca9f")
|
||||
(green-intense "#44df44")
|
||||
(yellow "#d0bc00")
|
||||
(yellow-warmer "#fec43f")
|
||||
(yellow-cooler "#dfaf7a")
|
||||
(yellow-faint "#d2b580")
|
||||
(yellow-intense "#efef00")
|
||||
(blue "#2fafff")
|
||||
(blue-warmer "#79a8ff")
|
||||
(blue-cooler "#00bcff")
|
||||
(blue-faint "#82b0ec")
|
||||
(blue-intense "#338fff")
|
||||
(magenta "#feacd0")
|
||||
(magenta-warmer "#f78fe7")
|
||||
(magenta-cooler "#b6a0ff")
|
||||
(magenta-faint "#caa6df")
|
||||
(magenta-intense "#ff66ff")
|
||||
(cyan "#00d3d0")
|
||||
(cyan-warmer "#4ae2f0")
|
||||
(cyan-cooler "#6ae4b9")
|
||||
(cyan-faint "#9ac8e0")
|
||||
(cyan-intense "#00eff0")
|
||||
|
||||
;;; Uncommon accent foregrounds
|
||||
|
||||
(rust "#db7b5f")
|
||||
(gold "#c0965b")
|
||||
(olive "#9cbd6f")
|
||||
(slate "#76afbf")
|
||||
(indigo "#9099d9")
|
||||
(maroon "#cf7fa7")
|
||||
(pink "#d09dc0")
|
||||
|
||||
;;; Common accent backgrounds
|
||||
|
||||
(bg-red-intense "#9d1f1f")
|
||||
(bg-green-intense "#2f822f")
|
||||
(bg-yellow-intense "#7a6100")
|
||||
(bg-blue-intense "#1640b0")
|
||||
(bg-magenta-intense "#7030af")
|
||||
(bg-cyan-intense "#2266ae")
|
||||
|
||||
(bg-red-subtle "#620f2a")
|
||||
(bg-green-subtle "#00422a")
|
||||
(bg-yellow-subtle "#4a4000")
|
||||
(bg-blue-subtle "#242679")
|
||||
(bg-magenta-subtle "#552f5f")
|
||||
(bg-cyan-subtle "#004065")
|
||||
|
||||
(bg-red-nuanced "#3a0c14")
|
||||
(bg-green-nuanced "#092f1f")
|
||||
(bg-yellow-nuanced "#381d0f")
|
||||
(bg-blue-nuanced "#12154a")
|
||||
(bg-magenta-nuanced "#2f0c3f")
|
||||
(bg-cyan-nuanced "#042837")
|
||||
|
||||
;;; Uncommon accent background and foreground pairs
|
||||
|
||||
(bg-clay "#49191a")
|
||||
(fg-clay "#f1b090")
|
||||
|
||||
(bg-ochre "#462f20")
|
||||
(fg-ochre "#e0d09c")
|
||||
|
||||
(bg-lavender "#38325c")
|
||||
(fg-lavender "#dfc0f0")
|
||||
|
||||
(bg-sage "#143e32")
|
||||
(fg-sage "#c3e7d4")
|
||||
|
||||
;;; Graphs
|
||||
|
||||
(bg-graph-red-0 "#b52c2c")
|
||||
(bg-graph-red-1 "#702020")
|
||||
(bg-graph-green-0 "#0fed00")
|
||||
(bg-graph-green-1 "#007800")
|
||||
(bg-graph-yellow-0 "#f1e00a")
|
||||
(bg-graph-yellow-1 "#b08940")
|
||||
(bg-graph-blue-0 "#2fafef")
|
||||
(bg-graph-blue-1 "#1f2f8f")
|
||||
(bg-graph-magenta-0 "#bf94fe")
|
||||
(bg-graph-magenta-1 "#5f509f")
|
||||
(bg-graph-cyan-0 "#47dfea")
|
||||
(bg-graph-cyan-1 "#00808f")
|
||||
|
||||
;;; Special purpose
|
||||
|
||||
(bg-completion "#2f447f")
|
||||
(bg-hover "#45605e")
|
||||
(bg-hover-secondary "#654a39")
|
||||
(bg-hl-line "#2f3849")
|
||||
(bg-region "#5a5a5a")
|
||||
(fg-region "#ffffff")
|
||||
|
||||
(bg-mode-line-active "#505050")
|
||||
(fg-mode-line-active "#ffffff")
|
||||
(border-mode-line-active "#959595")
|
||||
(bg-mode-line-inactive "#2d2d2d")
|
||||
(fg-mode-line-inactive "#969696")
|
||||
(border-mode-line-inactive "#606060")
|
||||
|
||||
(modeline-err "#ffa9bf")
|
||||
(modeline-warning "#dfcf43")
|
||||
(modeline-info "#9fefff")
|
||||
|
||||
(bg-tab-bar "#313131")
|
||||
(bg-tab-current "#000000")
|
||||
(bg-tab-other "#545454")
|
||||
|
||||
;;; Diffs
|
||||
|
||||
(bg-added "#00381f")
|
||||
(bg-added-faint "#002910")
|
||||
(bg-added-refine "#034f2f")
|
||||
(bg-added-fringe "#237f3f")
|
||||
(fg-added "#a0e0a0")
|
||||
(fg-added-intense "#80e080")
|
||||
|
||||
(bg-changed "#363300")
|
||||
(bg-changed-faint "#2a1f00")
|
||||
(bg-changed-refine "#4a4a00")
|
||||
(bg-changed-fringe "#8a7a00")
|
||||
(fg-changed "#efef80")
|
||||
(fg-changed-intense "#c0b05f")
|
||||
|
||||
(bg-removed "#4f1119")
|
||||
(bg-removed-faint "#380a0f")
|
||||
(bg-removed-refine "#781a1f")
|
||||
(bg-removed-fringe "#b81a1f")
|
||||
(fg-removed "#ffbfbf")
|
||||
(fg-removed-intense "#ff9095")
|
||||
|
||||
(bg-diff-context "#1a1a1a")
|
||||
|
||||
;;; Paren match
|
||||
|
||||
(bg-paren-match "#2f7f9f")
|
||||
(fg-paren-match fg-main)
|
||||
(bg-paren-expression "#453040")
|
||||
(underline-paren-match unspecified)
|
||||
|
||||
;;; Mappings
|
||||
|
||||
;;;; General mappings
|
||||
|
||||
(fringe bg-dim)
|
||||
(cursor fg-main)
|
||||
|
||||
(keybind blue-cooler)
|
||||
(name magenta)
|
||||
(identifier yellow-faint)
|
||||
|
||||
(err red)
|
||||
(warning yellow-warmer)
|
||||
(info cyan-cooler)
|
||||
|
||||
(underline-err red-intense)
|
||||
(underline-warning yellow)
|
||||
(underline-note cyan)
|
||||
|
||||
(bg-prominent-err bg-red-intense)
|
||||
(fg-prominent-err fg-main)
|
||||
(bg-prominent-warning bg-yellow-intense)
|
||||
(fg-prominent-warning fg-main)
|
||||
(bg-prominent-note bg-cyan-intense)
|
||||
(fg-prominent-note fg-main)
|
||||
|
||||
(bg-active-argument bg-yellow-nuanced)
|
||||
(fg-active-argument yellow-cooler)
|
||||
(bg-active-value bg-cyan-nuanced)
|
||||
(fg-active-value cyan-cooler)
|
||||
|
||||
;;;; Code mappings
|
||||
|
||||
(bracket fg-main)
|
||||
(builtin magenta-warmer)
|
||||
(comment fg-dim)
|
||||
(constant blue-cooler)
|
||||
(delimiter fg-main)
|
||||
(docmarkup magenta-faint)
|
||||
(docstring cyan-faint)
|
||||
(fnname magenta)
|
||||
(keyword magenta-cooler)
|
||||
(number fg-main)
|
||||
(operator fg-main)
|
||||
(preprocessor red-cooler)
|
||||
(property cyan)
|
||||
(punctuation fg-main)
|
||||
(rx-backslash magenta)
|
||||
(rx-construct green-cooler)
|
||||
(string blue-warmer)
|
||||
(type cyan-cooler)
|
||||
(variable cyan)
|
||||
|
||||
;;;; Accent mappings
|
||||
|
||||
(accent-0 blue-cooler)
|
||||
(accent-1 magenta-warmer)
|
||||
(accent-2 cyan-cooler)
|
||||
(accent-3 yellow)
|
||||
|
||||
;;;; Button mappings
|
||||
|
||||
(fg-button-active fg-main)
|
||||
(fg-button-inactive fg-dim)
|
||||
(bg-button-active bg-active)
|
||||
(bg-button-inactive bg-dim)
|
||||
|
||||
;;;; Completion mappings
|
||||
|
||||
(fg-completion-match-0 blue-cooler)
|
||||
(fg-completion-match-1 magenta-warmer)
|
||||
(fg-completion-match-2 cyan-cooler)
|
||||
(fg-completion-match-3 yellow)
|
||||
(bg-completion-match-0 unspecified)
|
||||
(bg-completion-match-1 unspecified)
|
||||
(bg-completion-match-2 unspecified)
|
||||
(bg-completion-match-3 unspecified)
|
||||
|
||||
;;;; Date mappings
|
||||
|
||||
(date-common cyan)
|
||||
(date-deadline red-cooler)
|
||||
(date-deadline-subtle red-faint)
|
||||
(date-event fg-alt)
|
||||
(date-holiday magenta-warmer)
|
||||
(date-holiday-other blue)
|
||||
(date-now fg-main)
|
||||
(date-range fg-alt)
|
||||
(date-scheduled yellow-cooler)
|
||||
(date-scheduled-subtle yellow-faint)
|
||||
(date-weekday cyan)
|
||||
(date-weekend magenta)
|
||||
|
||||
;;;; Line number mappings
|
||||
|
||||
(fg-line-number-inactive fg-dim)
|
||||
(fg-line-number-active fg-main)
|
||||
(bg-line-number-inactive bg-dim)
|
||||
(bg-line-number-active bg-active)
|
||||
|
||||
;;;; Link mappings
|
||||
|
||||
(fg-link blue-warmer)
|
||||
(bg-link unspecified)
|
||||
(underline-link blue-warmer)
|
||||
|
||||
(fg-link-symbolic cyan)
|
||||
(bg-link-symbolic unspecified)
|
||||
(underline-link-symbolic cyan)
|
||||
|
||||
(fg-link-visited magenta)
|
||||
(bg-link-visited unspecified)
|
||||
(underline-link-visited magenta)
|
||||
|
||||
;;;; Mail mappings
|
||||
|
||||
(mail-cite-0 blue-warmer)
|
||||
(mail-cite-1 yellow-cooler)
|
||||
(mail-cite-2 cyan-cooler)
|
||||
(mail-cite-3 red-cooler)
|
||||
(mail-part blue)
|
||||
(mail-recipient magenta-cooler)
|
||||
(mail-subject magenta-warmer)
|
||||
(mail-other magenta-faint)
|
||||
|
||||
;;;; Mark mappings
|
||||
|
||||
(bg-mark-delete bg-red-subtle)
|
||||
(fg-mark-delete red-cooler)
|
||||
(bg-mark-select bg-cyan-subtle)
|
||||
(fg-mark-select cyan)
|
||||
(bg-mark-other bg-yellow-subtle)
|
||||
(fg-mark-other yellow)
|
||||
|
||||
;;;; Prompt mappings
|
||||
|
||||
(fg-prompt cyan-cooler)
|
||||
(bg-prompt unspecified)
|
||||
|
||||
;;;; Prose mappings
|
||||
|
||||
(bg-prose-block-delimiter bg-dim)
|
||||
(fg-prose-block-delimiter fg-dim)
|
||||
(bg-prose-block-contents bg-dim)
|
||||
|
||||
(bg-prose-code unspecified)
|
||||
(fg-prose-code cyan-cooler)
|
||||
|
||||
(bg-prose-macro unspecified)
|
||||
(fg-prose-macro magenta-cooler)
|
||||
|
||||
(bg-prose-verbatim unspecified)
|
||||
(fg-prose-verbatim magenta-warmer)
|
||||
|
||||
(prose-done green)
|
||||
(prose-todo red)
|
||||
|
||||
(prose-metadata fg-dim)
|
||||
(prose-metadata-value fg-alt)
|
||||
|
||||
(prose-table fg-alt)
|
||||
(prose-table-formula magenta-warmer)
|
||||
|
||||
(prose-tag magenta-faint)
|
||||
|
||||
;;;; Rainbow mappings
|
||||
|
||||
(rainbow-0 fg-main)
|
||||
(rainbow-1 magenta-intense)
|
||||
(rainbow-2 cyan-intense)
|
||||
(rainbow-3 red-warmer)
|
||||
(rainbow-4 yellow-intense)
|
||||
(rainbow-5 magenta-cooler)
|
||||
(rainbow-6 green-intense)
|
||||
(rainbow-7 blue-warmer)
|
||||
(rainbow-8 magenta-warmer)
|
||||
|
||||
;;;; Search mappings
|
||||
|
||||
(bg-search-current bg-yellow-intense)
|
||||
(bg-search-lazy bg-cyan-intense)
|
||||
(bg-search-replace bg-red-intense)
|
||||
|
||||
(bg-search-rx-group-0 bg-blue-intense)
|
||||
(bg-search-rx-group-1 bg-green-intense)
|
||||
(bg-search-rx-group-2 bg-red-subtle)
|
||||
(bg-search-rx-group-3 bg-magenta-subtle)
|
||||
|
||||
;;;; Space mappings
|
||||
|
||||
(bg-space unspecified)
|
||||
(fg-space border)
|
||||
(bg-space-err bg-red-intense)
|
||||
|
||||
;;;; Terminal mappings
|
||||
|
||||
(bg-term-black "#000000")
|
||||
(fg-term-black "#000000")
|
||||
(bg-term-black-bright "#595959")
|
||||
(fg-term-black-bright "#595959")
|
||||
|
||||
(bg-term-red red)
|
||||
(fg-term-red red)
|
||||
(bg-term-red-bright red-warmer)
|
||||
(fg-term-red-bright red-warmer)
|
||||
|
||||
(bg-term-green green)
|
||||
(fg-term-green green)
|
||||
(bg-term-green-bright green-cooler)
|
||||
(fg-term-green-bright green-cooler)
|
||||
|
||||
(bg-term-yellow yellow)
|
||||
(fg-term-yellow yellow)
|
||||
(bg-term-yellow-bright yellow-warmer)
|
||||
(fg-term-yellow-bright yellow-warmer)
|
||||
|
||||
(bg-term-blue blue)
|
||||
(fg-term-blue blue)
|
||||
(bg-term-blue-bright blue-warmer)
|
||||
(fg-term-blue-bright blue-warmer)
|
||||
|
||||
(bg-term-magenta magenta)
|
||||
(fg-term-magenta magenta)
|
||||
(bg-term-magenta-bright magenta-cooler)
|
||||
(fg-term-magenta-bright magenta-cooler)
|
||||
|
||||
(bg-term-cyan cyan)
|
||||
(fg-term-cyan cyan)
|
||||
(bg-term-cyan-bright cyan-cooler)
|
||||
(fg-term-cyan-bright cyan-cooler)
|
||||
|
||||
(bg-term-white "#a6a6a6")
|
||||
(fg-term-white "#a6a6a6")
|
||||
(bg-term-white-bright "#ffffff")
|
||||
(fg-term-white-bright "#ffffff")
|
||||
|
||||
;;;; Heading mappings
|
||||
|
||||
(fg-heading-0 cyan-cooler)
|
||||
(fg-heading-1 fg-main)
|
||||
(fg-heading-2 yellow-faint)
|
||||
(fg-heading-3 blue-faint)
|
||||
(fg-heading-4 magenta)
|
||||
(fg-heading-5 green-faint)
|
||||
(fg-heading-6 red-faint)
|
||||
(fg-heading-7 cyan-faint)
|
||||
(fg-heading-8 fg-dim)
|
||||
|
||||
(bg-heading-0 unspecified)
|
||||
(bg-heading-1 unspecified)
|
||||
(bg-heading-2 unspecified)
|
||||
(bg-heading-3 unspecified)
|
||||
(bg-heading-4 unspecified)
|
||||
(bg-heading-5 unspecified)
|
||||
(bg-heading-6 unspecified)
|
||||
(bg-heading-7 unspecified)
|
||||
(bg-heading-8 unspecified)
|
||||
|
||||
(overline-heading-0 unspecified)
|
||||
(overline-heading-1 unspecified)
|
||||
(overline-heading-2 unspecified)
|
||||
(overline-heading-3 unspecified)
|
||||
(overline-heading-4 unspecified)
|
||||
(overline-heading-5 unspecified)
|
||||
(overline-heading-6 unspecified)
|
||||
(overline-heading-7 unspecified)
|
||||
(overline-heading-8 unspecified))
|
||||
"The entire palette of the `modus-vivendi' theme.
|
||||
|
||||
Named colors have the form (COLOR-NAME HEX-VALUE) with the former
|
||||
as a symbol and the latter as a string.
|
||||
|
||||
Semantic color mappings have the form (MAPPING-NAME COLOR-NAME)
|
||||
with both as symbols. The latter is a named color that already
|
||||
exists in the palette and is associated with a HEX-VALUE.")
|
||||
|
||||
(defcustom modus-vivendi-palette-user nil
|
||||
"Like the `modus-vivendi--palette' for user-defined entries.
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
(defcustom modus-vivendi-palette-user nil
|
||||
"Like the `modus-vivendi--palette' for user-defined entries.
|
||||
This is meant to extend the palette with custom named colors and/or
|
||||
semantic palette mappings. Those may then be used in combination with
|
||||
palette overrides (also see `modus-themes-common-palette-overrides' and
|
||||
`modus-vivendi--palette-overrides')."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
|
||||
(defcustom modus-vivendi-palette-overrides nil
|
||||
"Overrides for `modus-vivendi-palette'.
|
||||
(defcustom modus-vivendi-palette-overrides nil
|
||||
"Overrides for `modus-vivendi-palette'.
|
||||
|
||||
Mirror the elements of the aforementioned palette, overriding
|
||||
their value.
|
||||
|
|
@ -521,18 +68,23 @@ mappings, such as to make the cursor red. Wherea theme-specific
|
|||
overrides can also be used to change the value of a named color,
|
||||
such as what hexadecimal RGB value the red-warmer symbol
|
||||
represents."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
|
||||
(modus-themes-theme modus-vivendi
|
||||
modus-vivendi-palette
|
||||
modus-vivendi-palette-overrides)
|
||||
|
||||
(provide-theme 'modus-vivendi))
|
||||
(modus-themes-theme
|
||||
'modus-vivendi
|
||||
'modus-themes
|
||||
"Elegant, highly legible theme with a black background.
|
||||
Conforms with the highest legibility standard for color contrast
|
||||
between background and foreground in any given piece of text,
|
||||
which corresponds to a minimum contrast in relative luminance of
|
||||
7:1 (WCAG AAA standard)."
|
||||
'dark
|
||||
'modus-themes-vivendi-palette
|
||||
'modus-vivendi-palette-user
|
||||
'modus-vivendi-palette-overrides)
|
||||
|
||||
;;; modus-vivendi-theme.el ends here
|
||||
|
|
|
|||
|
|
@ -26,488 +26,35 @@
|
|||
;;
|
||||
;; The Modus themes conform with the highest standard for
|
||||
;; color-contrast accessibility between background and foreground
|
||||
;; values (WCAG AAA). Please refer to the official Info manual for
|
||||
;; further documentation (distributed with the themes, or available
|
||||
;; at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
;; values (WCAG AAA). They are also highly customizable and can even
|
||||
;; be used as the basis for other themes. Please refer to the official
|
||||
;; Info manual for further documentation (distributed with the themes,
|
||||
;; or available at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
|
||||
(eval-and-compile
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
;;;###theme-autoload
|
||||
(deftheme modus-vivendi-tinted
|
||||
"Elegant, highly legible theme with a night sky background.
|
||||
Conforms with the highest legibility standard for color contrast
|
||||
between background and foreground in any given piece of text,
|
||||
which corresponds to a minimum contrast in relative luminance of
|
||||
7:1 (WCAG AAA standard)."
|
||||
:background-mode 'dark
|
||||
:kind 'color-scheme
|
||||
:family 'modus)
|
||||
|
||||
(defconst modus-vivendi-tinted-palette
|
||||
'(
|
||||
;;; Basic values
|
||||
|
||||
(bg-main "#0d0e1c")
|
||||
(bg-dim "#1d2235")
|
||||
(fg-main "#ffffff")
|
||||
(fg-dim "#989898")
|
||||
(fg-alt "#c6daff")
|
||||
(bg-active "#4a4f69")
|
||||
(bg-inactive "#2b3045")
|
||||
(border "#61647a")
|
||||
|
||||
;;; Common accent foregrounds
|
||||
|
||||
(red "#ff5f59")
|
||||
(red-warmer "#ff6b55")
|
||||
(red-cooler "#ff7f86")
|
||||
(red-faint "#ef8386")
|
||||
(red-intense "#ff5f5f")
|
||||
(green "#44bc44")
|
||||
(green-warmer "#75c13e")
|
||||
(green-cooler "#11c777")
|
||||
(green-faint "#88ca9f")
|
||||
(green-intense "#44df44")
|
||||
(yellow "#d0bc00")
|
||||
(yellow-warmer "#fec43f")
|
||||
(yellow-cooler "#dfaf7a")
|
||||
(yellow-faint "#d2b580")
|
||||
(yellow-intense "#efef00")
|
||||
(blue "#2fafff")
|
||||
(blue-warmer "#79a8ff")
|
||||
(blue-cooler "#00bcff")
|
||||
(blue-faint "#82b0ec")
|
||||
(blue-intense "#338fff")
|
||||
(magenta "#feacd0")
|
||||
(magenta-warmer "#f78fe7")
|
||||
(magenta-cooler "#b6a0ff")
|
||||
(magenta-faint "#caa6df")
|
||||
(magenta-intense "#ff66ff")
|
||||
(cyan "#00d3d0")
|
||||
(cyan-warmer "#4ae2f0")
|
||||
(cyan-cooler "#6ae4b9")
|
||||
(cyan-faint "#9ac8e0")
|
||||
(cyan-intense "#00eff0")
|
||||
|
||||
;;; Uncommon accent foregrounds
|
||||
|
||||
(rust "#db7b5f")
|
||||
(gold "#c0965b")
|
||||
(olive "#9cbd6f")
|
||||
(slate "#76afbf")
|
||||
(indigo "#9099d9")
|
||||
(maroon "#cf7fa7")
|
||||
(pink "#d09dc0")
|
||||
|
||||
;;; Common accent backgrounds
|
||||
|
||||
(bg-red-intense "#9d1f1f")
|
||||
(bg-green-intense "#2f822f")
|
||||
(bg-yellow-intense "#7a6100")
|
||||
(bg-blue-intense "#1640b0")
|
||||
(bg-magenta-intense "#7030af")
|
||||
(bg-cyan-intense "#2266ae")
|
||||
|
||||
(bg-red-subtle "#620f2a")
|
||||
(bg-green-subtle "#00422a")
|
||||
(bg-yellow-subtle "#4a4000")
|
||||
(bg-blue-subtle "#242679")
|
||||
(bg-magenta-subtle "#552f5f")
|
||||
(bg-cyan-subtle "#004065")
|
||||
|
||||
(bg-red-nuanced "#3a0c14")
|
||||
(bg-green-nuanced "#092f1f")
|
||||
(bg-yellow-nuanced "#381d0f")
|
||||
(bg-blue-nuanced "#12154a")
|
||||
(bg-magenta-nuanced "#2f0c3f")
|
||||
(bg-cyan-nuanced "#042837")
|
||||
|
||||
;;; Uncommon accent background and foreground pairs
|
||||
|
||||
(bg-clay "#49191a")
|
||||
(fg-clay "#f1b090")
|
||||
|
||||
(bg-ochre "#462f20")
|
||||
(fg-ochre "#e0d09c")
|
||||
|
||||
(bg-lavender "#38325c")
|
||||
(fg-lavender "#dfc0f0")
|
||||
|
||||
(bg-sage "#143e32")
|
||||
(fg-sage "#c3e7d4")
|
||||
|
||||
;;; Graphs
|
||||
|
||||
(bg-graph-red-0 "#b52c2c")
|
||||
(bg-graph-red-1 "#702020")
|
||||
(bg-graph-green-0 "#0fed00")
|
||||
(bg-graph-green-1 "#007800")
|
||||
(bg-graph-yellow-0 "#f1e00a")
|
||||
(bg-graph-yellow-1 "#b08940")
|
||||
(bg-graph-blue-0 "#2fafef")
|
||||
(bg-graph-blue-1 "#1f2f8f")
|
||||
(bg-graph-magenta-0 "#bf94fe")
|
||||
(bg-graph-magenta-1 "#5f509f")
|
||||
(bg-graph-cyan-0 "#47dfea")
|
||||
(bg-graph-cyan-1 "#00808f")
|
||||
|
||||
;;; Special purpose
|
||||
|
||||
(bg-completion "#483d8a")
|
||||
(bg-hover "#45605e")
|
||||
(bg-hover-secondary "#64404f")
|
||||
(bg-hl-line "#303a6f")
|
||||
(bg-region "#555a66")
|
||||
(fg-region "#ffffff")
|
||||
|
||||
(bg-mode-line-active "#484d67")
|
||||
(fg-mode-line-active "#ffffff")
|
||||
(border-mode-line-active "#979797")
|
||||
(bg-mode-line-inactive "#292d48")
|
||||
(fg-mode-line-inactive "#969696")
|
||||
(border-mode-line-inactive "#606270")
|
||||
|
||||
(modeline-err "#ffa9bf")
|
||||
(modeline-warning "#dfcf43")
|
||||
(modeline-info "#9fefff")
|
||||
|
||||
(bg-tab-bar "#2c3045")
|
||||
(bg-tab-current "#0d0e1c")
|
||||
(bg-tab-other "#4a4f6a")
|
||||
|
||||
;;; Diffs
|
||||
|
||||
(bg-added "#003a2f")
|
||||
(bg-added-faint "#002922")
|
||||
(bg-added-refine "#035542")
|
||||
(bg-added-fringe "#23884f")
|
||||
(fg-added "#a0e0a0")
|
||||
(fg-added-intense "#80e080")
|
||||
|
||||
(bg-changed "#363300")
|
||||
(bg-changed-faint "#2a1f00")
|
||||
(bg-changed-refine "#4a4a00")
|
||||
(bg-changed-fringe "#8f7a30")
|
||||
(fg-changed "#efef80")
|
||||
(fg-changed-intense "#c0b05f")
|
||||
|
||||
(bg-removed "#4f1127")
|
||||
(bg-removed-faint "#380a19")
|
||||
(bg-removed-refine "#781a3a")
|
||||
(bg-removed-fringe "#b81a26")
|
||||
(fg-removed "#ffbfbf")
|
||||
(fg-removed-intense "#ff9095")
|
||||
|
||||
(bg-diff-context "#1a1f30")
|
||||
|
||||
;;; Paren match
|
||||
|
||||
(bg-paren-match "#4f7f9f")
|
||||
(fg-paren-match fg-main)
|
||||
(bg-paren-expression "#453040")
|
||||
(underline-paren-match unspecified)
|
||||
|
||||
;;; Mappings
|
||||
|
||||
;;;; General mappings
|
||||
|
||||
(fringe bg-dim)
|
||||
(cursor magenta-intense)
|
||||
|
||||
(keybind magenta-cooler)
|
||||
(name magenta)
|
||||
(identifier yellow-faint)
|
||||
|
||||
(err red)
|
||||
(warning yellow)
|
||||
(info green-cooler)
|
||||
|
||||
(underline-err red-intense)
|
||||
(underline-warning yellow)
|
||||
(underline-note cyan)
|
||||
|
||||
(bg-prominent-err bg-red-intense)
|
||||
(fg-prominent-err fg-main)
|
||||
(bg-prominent-warning bg-yellow-intense)
|
||||
(fg-prominent-warning fg-main)
|
||||
(bg-prominent-note bg-cyan-intense)
|
||||
(fg-prominent-note fg-main)
|
||||
|
||||
(bg-active-argument bg-yellow-nuanced)
|
||||
(fg-active-argument yellow-cooler)
|
||||
(bg-active-value bg-cyan-nuanced)
|
||||
(fg-active-value cyan-cooler)
|
||||
|
||||
;;;; Code mappings
|
||||
|
||||
(bracket fg-main)
|
||||
(builtin magenta)
|
||||
(comment red-faint)
|
||||
(constant magenta-cooler)
|
||||
(delimiter fg-main)
|
||||
(docmarkup magenta-faint)
|
||||
(docstring cyan-faint)
|
||||
(fnname magenta-warmer)
|
||||
(keyword blue-warmer)
|
||||
(number fg-main)
|
||||
(operator fg-main)
|
||||
(preprocessor red-cooler)
|
||||
(property cyan-warmer)
|
||||
(punctuation fg-main)
|
||||
(rx-backslash magenta-warmer)
|
||||
(rx-construct magenta-cooler)
|
||||
(string blue)
|
||||
(type green-cooler)
|
||||
(variable cyan-warmer)
|
||||
|
||||
;;;; Accent mappings
|
||||
|
||||
(accent-0 magenta-cooler)
|
||||
(accent-1 cyan)
|
||||
(accent-2 magenta-warmer)
|
||||
(accent-3 yellow-warmer)
|
||||
|
||||
;;;; Button mappings
|
||||
|
||||
(fg-button-active fg-main)
|
||||
(fg-button-inactive fg-dim)
|
||||
(bg-button-active bg-active)
|
||||
(bg-button-inactive bg-dim)
|
||||
|
||||
;;;; Completion mappings
|
||||
|
||||
(fg-completion-match-0 blue-cooler)
|
||||
(fg-completion-match-1 magenta-warmer)
|
||||
(fg-completion-match-2 cyan-cooler)
|
||||
(fg-completion-match-3 yellow)
|
||||
(bg-completion-match-0 unspecified)
|
||||
(bg-completion-match-1 unspecified)
|
||||
(bg-completion-match-2 unspecified)
|
||||
(bg-completion-match-3 unspecified)
|
||||
|
||||
;;;; Date mappings
|
||||
|
||||
(date-common cyan)
|
||||
(date-deadline red-cooler)
|
||||
(date-deadline-subtle red-faint)
|
||||
(date-event fg-alt)
|
||||
(date-holiday magenta-warmer)
|
||||
(date-holiday-other blue)
|
||||
(date-now fg-main)
|
||||
(date-range fg-alt)
|
||||
(date-scheduled yellow-cooler)
|
||||
(date-scheduled-subtle yellow-faint)
|
||||
(date-weekday cyan)
|
||||
(date-weekend magenta)
|
||||
|
||||
;;;; Line number mappings
|
||||
|
||||
(fg-line-number-inactive fg-dim)
|
||||
(fg-line-number-active fg-main)
|
||||
(bg-line-number-inactive bg-dim)
|
||||
(bg-line-number-active bg-active)
|
||||
|
||||
;;;; Link mappings
|
||||
|
||||
(fg-link blue-warmer)
|
||||
(bg-link unspecified)
|
||||
(underline-link blue-warmer)
|
||||
|
||||
(fg-link-symbolic cyan)
|
||||
(bg-link-symbolic unspecified)
|
||||
(underline-link-symbolic cyan)
|
||||
|
||||
(fg-link-visited magenta)
|
||||
(bg-link-visited unspecified)
|
||||
(underline-link-visited magenta)
|
||||
|
||||
;;;; Mail mappings
|
||||
|
||||
(mail-cite-0 blue-faint)
|
||||
(mail-cite-1 yellow-cooler)
|
||||
(mail-cite-2 cyan-cooler)
|
||||
(mail-cite-3 red-cooler)
|
||||
(mail-part blue)
|
||||
(mail-recipient blue-warmer)
|
||||
(mail-subject magenta-warmer)
|
||||
(mail-other magenta)
|
||||
|
||||
;;;; Mark mappings
|
||||
|
||||
(bg-mark-delete bg-red-subtle)
|
||||
(fg-mark-delete red-cooler)
|
||||
(bg-mark-select bg-cyan-subtle)
|
||||
(fg-mark-select cyan)
|
||||
(bg-mark-other bg-yellow-subtle)
|
||||
(fg-mark-other yellow)
|
||||
|
||||
;;;; Prompt mappings
|
||||
|
||||
(fg-prompt cyan-warmer)
|
||||
(bg-prompt unspecified)
|
||||
|
||||
;;;; Prose mappings
|
||||
|
||||
(bg-prose-block-delimiter bg-dim)
|
||||
(fg-prose-block-delimiter fg-dim)
|
||||
(bg-prose-block-contents bg-dim)
|
||||
|
||||
(bg-prose-code unspecified)
|
||||
(fg-prose-code cyan-cooler)
|
||||
|
||||
(bg-prose-macro unspecified)
|
||||
(fg-prose-macro magenta-cooler)
|
||||
|
||||
(bg-prose-verbatim unspecified)
|
||||
(fg-prose-verbatim magenta-warmer)
|
||||
|
||||
(prose-done green)
|
||||
(prose-todo red)
|
||||
|
||||
(prose-metadata fg-dim)
|
||||
(prose-metadata-value fg-alt)
|
||||
|
||||
(prose-table fg-alt)
|
||||
(prose-table-formula magenta-warmer)
|
||||
|
||||
(prose-tag magenta-faint)
|
||||
|
||||
;;;; Rainbow mappings
|
||||
|
||||
(rainbow-0 fg-main)
|
||||
(rainbow-1 magenta-intense)
|
||||
(rainbow-2 cyan-intense)
|
||||
(rainbow-3 red-warmer)
|
||||
(rainbow-4 yellow-intense)
|
||||
(rainbow-5 magenta-cooler)
|
||||
(rainbow-6 green-intense)
|
||||
(rainbow-7 blue-warmer)
|
||||
(rainbow-8 magenta-warmer)
|
||||
|
||||
;;;; Search mappings
|
||||
|
||||
(bg-search-current bg-yellow-intense)
|
||||
(bg-search-lazy bg-cyan-intense)
|
||||
(bg-search-replace bg-red-intense)
|
||||
|
||||
(bg-search-rx-group-0 bg-blue-intense)
|
||||
(bg-search-rx-group-1 bg-green-intense)
|
||||
(bg-search-rx-group-2 bg-red-subtle)
|
||||
(bg-search-rx-group-3 bg-magenta-subtle)
|
||||
|
||||
;;;; Space mappings
|
||||
|
||||
(bg-space unspecified)
|
||||
(fg-space border)
|
||||
(bg-space-err bg-red-intense)
|
||||
|
||||
;;;; Terminal mappings
|
||||
|
||||
(bg-term-black "#000000")
|
||||
(fg-term-black "#000000")
|
||||
(bg-term-black-bright "#595959")
|
||||
(fg-term-black-bright "#595959")
|
||||
|
||||
(bg-term-red red)
|
||||
(fg-term-red red)
|
||||
(bg-term-red-bright red-warmer)
|
||||
(fg-term-red-bright red-warmer)
|
||||
|
||||
(bg-term-green green)
|
||||
(fg-term-green green)
|
||||
(bg-term-green-bright green-cooler)
|
||||
(fg-term-green-bright green-cooler)
|
||||
|
||||
(bg-term-yellow yellow)
|
||||
(fg-term-yellow yellow)
|
||||
(bg-term-yellow-bright yellow-warmer)
|
||||
(fg-term-yellow-bright yellow-warmer)
|
||||
|
||||
(bg-term-blue blue)
|
||||
(fg-term-blue blue)
|
||||
(bg-term-blue-bright blue-warmer)
|
||||
(fg-term-blue-bright blue-warmer)
|
||||
|
||||
(bg-term-magenta magenta)
|
||||
(fg-term-magenta magenta)
|
||||
(bg-term-magenta-bright magenta-cooler)
|
||||
(fg-term-magenta-bright magenta-cooler)
|
||||
|
||||
(bg-term-cyan cyan)
|
||||
(fg-term-cyan cyan)
|
||||
(bg-term-cyan-bright cyan-cooler)
|
||||
(fg-term-cyan-bright cyan-cooler)
|
||||
|
||||
(bg-term-white "#a6a6a6")
|
||||
(fg-term-white "#a6a6a6")
|
||||
(bg-term-white-bright "#ffffff")
|
||||
(fg-term-white-bright "#ffffff")
|
||||
|
||||
;;;; Heading mappings
|
||||
|
||||
(fg-heading-0 cyan-cooler)
|
||||
(fg-heading-1 fg-main)
|
||||
(fg-heading-2 yellow-faint)
|
||||
(fg-heading-3 blue-faint)
|
||||
(fg-heading-4 magenta)
|
||||
(fg-heading-5 green-faint)
|
||||
(fg-heading-6 red-faint)
|
||||
(fg-heading-7 cyan-faint)
|
||||
(fg-heading-8 fg-dim)
|
||||
|
||||
(bg-heading-0 unspecified)
|
||||
(bg-heading-1 unspecified)
|
||||
(bg-heading-2 unspecified)
|
||||
(bg-heading-3 unspecified)
|
||||
(bg-heading-4 unspecified)
|
||||
(bg-heading-5 unspecified)
|
||||
(bg-heading-6 unspecified)
|
||||
(bg-heading-7 unspecified)
|
||||
(bg-heading-8 unspecified)
|
||||
|
||||
(overline-heading-0 unspecified)
|
||||
(overline-heading-1 unspecified)
|
||||
(overline-heading-2 unspecified)
|
||||
(overline-heading-3 unspecified)
|
||||
(overline-heading-4 unspecified)
|
||||
(overline-heading-5 unspecified)
|
||||
(overline-heading-6 unspecified)
|
||||
(overline-heading-7 unspecified)
|
||||
(overline-heading-8 unspecified))
|
||||
"The entire palette of the `modus-vivendi-tinted' theme.
|
||||
|
||||
Named colors have the form (COLOR-NAME HEX-VALUE) with the former
|
||||
as a symbol and the latter as a string.
|
||||
|
||||
Semantic color mappings have the form (MAPPING-NAME COLOR-NAME)
|
||||
with both as symbols. The latter is a named color that already
|
||||
exists in the palette and is associated with a HEX-VALUE.")
|
||||
|
||||
(defcustom modus-vivendi-tinted-palette-user nil
|
||||
"Like the `modus-vivendi-tinted-palette' for user-defined entries.
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
(defcustom modus-vivendi-tinted-palette-user nil
|
||||
"Like the `modus-vivendi-tinted-palette' for user-defined entries.
|
||||
This is meant to extend the palette with custom named colors and/or
|
||||
semantic palette mappings. Those may then be used in combination with
|
||||
palette overrides (also see `modus-themes-common-palette-overrides' and
|
||||
`modus-vivendi-tinted-palette-overrides')."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
|
||||
(defcustom modus-vivendi-tinted-palette-overrides nil
|
||||
"Overrides for `modus-vivendi-tinted-palette'.
|
||||
(defcustom modus-vivendi-tinted-palette-overrides nil
|
||||
"Overrides for `modus-vivendi-tinted-palette'.
|
||||
|
||||
Mirror the elements of the aforementioned palette, overriding
|
||||
their value.
|
||||
|
|
@ -521,18 +68,23 @@ mappings, such as to make the cursor red. Wherea theme-specific
|
|||
overrides can also be used to change the value of a named color,
|
||||
such as what hexadecimal RGB value the red-warmer symbol
|
||||
represents."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
|
||||
(modus-themes-theme modus-vivendi-tinted
|
||||
modus-vivendi-tinted-palette
|
||||
modus-vivendi-tinted-palette-overrides)
|
||||
|
||||
(provide-theme 'modus-vivendi-tinted))
|
||||
(modus-themes-theme
|
||||
'modus-vivendi-tinted
|
||||
'modus-themes
|
||||
"Elegant, highly legible theme with a night sky background.
|
||||
Conforms with the highest legibility standard for color contrast
|
||||
between background and foreground in any given piece of text,
|
||||
which corresponds to a minimum contrast in relative luminance of
|
||||
7:1 (WCAG AAA standard)."
|
||||
'dark
|
||||
'modus-themes-vivendi-tinted-palette
|
||||
'modus-vivendi-tinted-palette-user
|
||||
'modus-vivendi-tinted-palette-overrides)
|
||||
|
||||
;;; modus-vivendi-tinted-theme.el ends here
|
||||
|
|
|
|||
|
|
@ -26,490 +26,35 @@
|
|||
;;
|
||||
;; The Modus themes conform with the highest standard for
|
||||
;; color-contrast accessibility between background and foreground
|
||||
;; values (WCAG AAA). Please refer to the official Info manual for
|
||||
;; further documentation (distributed with the themes, or available
|
||||
;; at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
;; values (WCAG AAA). They are also highly customizable and can even
|
||||
;; be used as the basis for other themes. Please refer to the official
|
||||
;; Info manual for further documentation (distributed with the themes,
|
||||
;; or available at: <https://protesilaos.com/emacs/modus-themes>).
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
|
||||
(eval-and-compile
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
;;;###theme-autoload
|
||||
(deftheme modus-vivendi-tritanopia
|
||||
"Tritanopia-optimized theme with a black background.
|
||||
This variant is optimized for users with blue-yellow color
|
||||
deficiency (tritanopia). It conforms with the highest
|
||||
legibility standard for color contrast between background and
|
||||
foreground in any given piece of text, which corresponds to a
|
||||
minimum contrast in relative luminance of 7:1 (WCAG AAA
|
||||
standard)."
|
||||
:background-mode 'dark
|
||||
:kind 'color-scheme
|
||||
:family 'modus)
|
||||
|
||||
(defconst modus-vivendi-tritanopia-palette
|
||||
'(
|
||||
;;; Basic values
|
||||
|
||||
(bg-main "#000000")
|
||||
(bg-dim "#1e1e1e")
|
||||
(fg-main "#ffffff")
|
||||
(fg-dim "#989898")
|
||||
(fg-alt "#a0d7f2")
|
||||
(bg-active "#535353")
|
||||
(bg-inactive "#303030")
|
||||
(border "#646464")
|
||||
|
||||
;;; Common accent foregrounds
|
||||
|
||||
(red "#ff5f59")
|
||||
(red-warmer "#ff6740")
|
||||
(red-cooler "#ff7f86")
|
||||
(red-faint "#ff9070")
|
||||
(red-intense "#ff5f5f")
|
||||
(green "#44bc44")
|
||||
(green-warmer "#70b900")
|
||||
(green-cooler "#00c06f")
|
||||
(green-faint "#88ca9f")
|
||||
(green-intense "#44df44")
|
||||
(yellow "#cabf00")
|
||||
(yellow-warmer "#ffa00f")
|
||||
(yellow-cooler "#d8af7a")
|
||||
(yellow-faint "#d2b580")
|
||||
(yellow-intense "#efef00")
|
||||
(blue "#2fafff")
|
||||
(blue-warmer "#79a8ff")
|
||||
(blue-cooler "#00bcff")
|
||||
(blue-faint "#82b0ec")
|
||||
(blue-intense "#338fff")
|
||||
(magenta "#feacd0")
|
||||
(magenta-warmer "#f78fe7")
|
||||
(magenta-cooler "#b6a0ff")
|
||||
(magenta-faint "#caa6df")
|
||||
(magenta-intense "#ef7fff")
|
||||
(cyan "#00d3d0")
|
||||
(cyan-warmer "#4ae2ff")
|
||||
(cyan-cooler "#6ae4b9")
|
||||
(cyan-faint "#7fdbdf")
|
||||
(cyan-intense "#00eff0")
|
||||
|
||||
;;; Uncommon accent foregrounds
|
||||
|
||||
(rust "#db7b5f")
|
||||
(gold "#c0965b")
|
||||
(olive "#9cbd6f")
|
||||
(slate "#76afbf")
|
||||
(indigo "#9099d9")
|
||||
(maroon "#cf7fa7")
|
||||
(pink "#d09dc0")
|
||||
|
||||
;;; Common accent backgrounds
|
||||
|
||||
(bg-red-intense "#9d1f1f")
|
||||
(bg-green-intense "#2f822f")
|
||||
(bg-yellow-intense "#7a6100")
|
||||
(bg-blue-intense "#1640b0")
|
||||
(bg-magenta-intense "#7030af")
|
||||
(bg-cyan-intense "#2266ae")
|
||||
|
||||
(bg-red-subtle "#620f2a")
|
||||
(bg-green-subtle "#00422a")
|
||||
(bg-yellow-subtle "#4a4000")
|
||||
(bg-blue-subtle "#242679")
|
||||
(bg-magenta-subtle "#552f5f")
|
||||
(bg-cyan-subtle "#004065")
|
||||
|
||||
(bg-red-nuanced "#3a0c14")
|
||||
(bg-green-nuanced "#092f1f")
|
||||
(bg-yellow-nuanced "#381d0f")
|
||||
(bg-blue-nuanced "#12154a")
|
||||
(bg-magenta-nuanced "#2f0c3f")
|
||||
(bg-cyan-nuanced "#042837")
|
||||
|
||||
;;; Uncommon accent background and foreground pairs
|
||||
|
||||
(bg-clay "#49191a")
|
||||
(fg-clay "#f1b090")
|
||||
|
||||
(bg-ochre "#462f20")
|
||||
(fg-ochre "#e0d09c")
|
||||
|
||||
(bg-lavender "#38325c")
|
||||
(fg-lavender "#dfc0f0")
|
||||
|
||||
(bg-sage "#143e32")
|
||||
(fg-sage "#c3e7d4")
|
||||
|
||||
;;; Graphs
|
||||
|
||||
(bg-graph-red-0 "#b52c2c")
|
||||
(bg-graph-red-1 "#702020")
|
||||
(bg-graph-green-0 "#afd1c0")
|
||||
(bg-graph-green-1 "#607a8f")
|
||||
(bg-graph-yellow-0 "#facfd6")
|
||||
(bg-graph-yellow-1 "#b57b85")
|
||||
(bg-graph-blue-0 "#4f9fdf")
|
||||
(bg-graph-blue-1 "#004559")
|
||||
(bg-graph-magenta-0 "#b6427f")
|
||||
(bg-graph-magenta-1 "#7f506f")
|
||||
(bg-graph-cyan-0 "#57dfea")
|
||||
(bg-graph-cyan-1 "#00808f")
|
||||
|
||||
;;; Special purpose
|
||||
|
||||
(bg-completion "#004253")
|
||||
(bg-hover "#8e3e3b")
|
||||
(bg-hover-secondary "#204853")
|
||||
(bg-hl-line "#2f3849")
|
||||
(bg-region "#5a5a5a")
|
||||
(fg-region "#ffffff")
|
||||
|
||||
(bg-mode-line-active "#003c52")
|
||||
(fg-mode-line-active "#f0f0f0")
|
||||
(border-mode-line-active "#5f8fb4")
|
||||
(bg-mode-line-inactive "#2d2d2d")
|
||||
(fg-mode-line-inactive "#969696")
|
||||
(border-mode-line-inactive "#606060")
|
||||
|
||||
(modeline-err "#ff7fbf")
|
||||
(modeline-warning "#df9f93")
|
||||
(modeline-info "#4fcfef")
|
||||
|
||||
(bg-tab-bar "#313131")
|
||||
(bg-tab-current "#000000")
|
||||
(bg-tab-other "#545454")
|
||||
|
||||
;;; Diffs
|
||||
|
||||
(bg-added "#004254")
|
||||
(bg-added-faint "#003042")
|
||||
(bg-added-refine "#004f7f")
|
||||
(bg-added-fringe "#008fcf")
|
||||
(fg-added "#9fdfdf")
|
||||
(fg-added-intense "#50c0ef")
|
||||
|
||||
(bg-changed "#2f123f")
|
||||
(bg-changed-faint "#1f022f")
|
||||
(bg-changed-refine "#3f325f")
|
||||
(bg-changed-fringe "#7f55a0")
|
||||
(fg-changed "#e3cfff")
|
||||
(fg-changed-intense "#cf9fe2")
|
||||
|
||||
(bg-removed "#4f1119")
|
||||
(bg-removed-faint "#380a0f")
|
||||
(bg-removed-refine "#781a1f")
|
||||
(bg-removed-fringe "#b81a1f")
|
||||
(fg-removed "#ffbfbf")
|
||||
(fg-removed-intense "#ff9095")
|
||||
|
||||
(bg-diff-context "#1a1a1a")
|
||||
|
||||
;;; Paren match
|
||||
|
||||
(bg-paren-match "#2f7f9f")
|
||||
(fg-paren-match fg-main)
|
||||
(bg-paren-expression "#453040")
|
||||
(underline-paren-match unspecified)
|
||||
|
||||
;;; Mappings
|
||||
|
||||
;;;; General mappings
|
||||
|
||||
(fringe bg-dim)
|
||||
(cursor red-intense)
|
||||
|
||||
(keybind red)
|
||||
(name red-cooler)
|
||||
(identifier red-faint)
|
||||
|
||||
(err red-warmer)
|
||||
(warning magenta)
|
||||
(info cyan)
|
||||
|
||||
(underline-err red-intense)
|
||||
(underline-warning magenta-intense)
|
||||
(underline-note cyan-intense)
|
||||
|
||||
(bg-prominent-err bg-red-intense)
|
||||
(fg-prominent-err fg-main)
|
||||
(bg-prominent-warning bg-magenta-intense)
|
||||
(fg-prominent-warning fg-main)
|
||||
(bg-prominent-note bg-cyan-intense)
|
||||
(fg-prominent-note fg-main)
|
||||
|
||||
(bg-active-argument bg-red-nuanced)
|
||||
(fg-active-argument red-warmer)
|
||||
(bg-active-value bg-cyan-nuanced)
|
||||
(fg-active-value cyan)
|
||||
|
||||
;;;; Code mappings
|
||||
|
||||
(bracket fg-main)
|
||||
(builtin magenta)
|
||||
(comment red-faint)
|
||||
(constant green-faint)
|
||||
(delimiter fg-main)
|
||||
(docmarkup magenta-faint)
|
||||
(docstring fg-alt)
|
||||
(fnname cyan-warmer)
|
||||
(keyword red-cooler)
|
||||
(number fg-main)
|
||||
(operator fg-main)
|
||||
(preprocessor red-warmer)
|
||||
(property cyan-cooler)
|
||||
(punctuation fg-main)
|
||||
(rx-backslash magenta)
|
||||
(rx-construct red)
|
||||
(string cyan)
|
||||
(type blue-warmer)
|
||||
(variable cyan-cooler)
|
||||
|
||||
;;;; Accent mappings
|
||||
|
||||
(accent-0 cyan)
|
||||
(accent-1 red-warmer)
|
||||
(accent-2 cyan-cooler)
|
||||
(accent-3 magenta)
|
||||
|
||||
;;;; Button mappings
|
||||
|
||||
(fg-button-active fg-main)
|
||||
(fg-button-inactive fg-dim)
|
||||
(bg-button-active bg-active)
|
||||
(bg-button-inactive bg-dim)
|
||||
|
||||
;;;; Completion mappings
|
||||
|
||||
(fg-completion-match-0 cyan)
|
||||
(fg-completion-match-1 red-warmer)
|
||||
(fg-completion-match-2 magenta)
|
||||
(fg-completion-match-3 cyan-cooler)
|
||||
(bg-completion-match-0 unspecified)
|
||||
(bg-completion-match-1 unspecified)
|
||||
(bg-completion-match-2 unspecified)
|
||||
(bg-completion-match-3 unspecified)
|
||||
|
||||
;;;; Date mappings
|
||||
|
||||
(date-common cyan-cooler)
|
||||
(date-deadline red)
|
||||
(date-deadline-subtle red-faint)
|
||||
(date-event fg-alt)
|
||||
(date-holiday red-intense)
|
||||
(date-holiday-other cyan-warmer)
|
||||
(date-now fg-main)
|
||||
(date-range fg-alt)
|
||||
(date-scheduled magenta)
|
||||
(date-scheduled-subtle magenta-faint)
|
||||
(date-weekday cyan)
|
||||
(date-weekend magenta-warmer)
|
||||
|
||||
;;;; Line number mappings
|
||||
|
||||
(fg-line-number-inactive fg-dim)
|
||||
(fg-line-number-active fg-main)
|
||||
(bg-line-number-inactive bg-dim)
|
||||
(bg-line-number-active bg-active)
|
||||
|
||||
;;;; Link mappings
|
||||
|
||||
(fg-link cyan)
|
||||
(bg-link unspecified)
|
||||
(underline-link cyan)
|
||||
|
||||
(fg-link-symbolic cyan-cooler)
|
||||
(bg-link-symbolic unspecified)
|
||||
(underline-link-symbolic cyan-cooler)
|
||||
|
||||
(fg-link-visited magenta)
|
||||
(bg-link-visited unspecified)
|
||||
(underline-link-visited magenta)
|
||||
|
||||
;;;; Mail mappings
|
||||
|
||||
(mail-cite-0 cyan-faint)
|
||||
(mail-cite-1 red-faint)
|
||||
(mail-cite-2 magenta-warmer)
|
||||
(mail-cite-3 cyan-warmer)
|
||||
(mail-part cyan-cooler)
|
||||
(mail-recipient cyan)
|
||||
(mail-subject red-cooler)
|
||||
(mail-other cyan)
|
||||
|
||||
;;;; Mark mappings
|
||||
|
||||
(bg-mark-delete bg-red-subtle)
|
||||
(fg-mark-delete red)
|
||||
(bg-mark-select bg-cyan-subtle)
|
||||
(fg-mark-select cyan)
|
||||
(bg-mark-other bg-magenta-subtle)
|
||||
(fg-mark-other magenta-warmer)
|
||||
|
||||
;;;; Prompt mappings
|
||||
|
||||
(fg-prompt cyan-cooler)
|
||||
(bg-prompt unspecified)
|
||||
|
||||
;;;; Prose mappings
|
||||
|
||||
(bg-prose-block-delimiter bg-dim)
|
||||
(fg-prose-block-delimiter fg-dim)
|
||||
(bg-prose-block-contents bg-dim)
|
||||
|
||||
(bg-prose-code unspecified)
|
||||
(fg-prose-code cyan)
|
||||
|
||||
(bg-prose-macro unspecified)
|
||||
(fg-prose-macro red-warmer)
|
||||
|
||||
(bg-prose-verbatim unspecified)
|
||||
(fg-prose-verbatim magenta-warmer)
|
||||
|
||||
(prose-done cyan)
|
||||
(prose-todo red)
|
||||
|
||||
(prose-metadata fg-dim)
|
||||
(prose-metadata-value fg-alt)
|
||||
|
||||
(prose-table fg-alt)
|
||||
(prose-table-formula red-cooler)
|
||||
|
||||
(prose-tag fg-alt)
|
||||
|
||||
;;;; Rainbow mappings
|
||||
|
||||
(rainbow-0 cyan)
|
||||
(rainbow-1 red)
|
||||
(rainbow-2 cyan-warmer)
|
||||
(rainbow-3 red-cooler)
|
||||
(rainbow-4 cyan-cooler)
|
||||
(rainbow-5 magenta)
|
||||
(rainbow-6 cyan-faint)
|
||||
(rainbow-7 magenta-faint)
|
||||
(rainbow-8 red-faint)
|
||||
|
||||
;;;; Search mappings
|
||||
|
||||
(bg-search-current bg-red-intense)
|
||||
(bg-search-lazy bg-cyan-intense)
|
||||
(bg-search-replace bg-magenta-intense)
|
||||
|
||||
(bg-search-rx-group-0 bg-blue-intense)
|
||||
(bg-search-rx-group-1 bg-magenta-intense)
|
||||
(bg-search-rx-group-2 bg-cyan-subtle)
|
||||
(bg-search-rx-group-3 bg-red-subtle)
|
||||
|
||||
;;;; Space mappings
|
||||
|
||||
(bg-space unspecified)
|
||||
(fg-space border)
|
||||
(bg-space-err bg-red-intense)
|
||||
|
||||
;;;; Terminal mappings
|
||||
|
||||
(bg-term-black "#000000")
|
||||
(fg-term-black "#000000")
|
||||
(bg-term-black-bright "#595959")
|
||||
(fg-term-black-bright "#595959")
|
||||
|
||||
(bg-term-red red)
|
||||
(fg-term-red red)
|
||||
(bg-term-red-bright red-warmer)
|
||||
(fg-term-red-bright red-warmer)
|
||||
|
||||
(bg-term-green green)
|
||||
(fg-term-green green)
|
||||
(bg-term-green-bright green-cooler)
|
||||
(fg-term-green-bright green-cooler)
|
||||
|
||||
(bg-term-yellow yellow)
|
||||
(fg-term-yellow yellow)
|
||||
(bg-term-yellow-bright yellow-warmer)
|
||||
(fg-term-yellow-bright yellow-warmer)
|
||||
|
||||
(bg-term-blue blue)
|
||||
(fg-term-blue blue)
|
||||
(bg-term-blue-bright blue-warmer)
|
||||
(fg-term-blue-bright blue-warmer)
|
||||
|
||||
(bg-term-magenta magenta)
|
||||
(fg-term-magenta magenta)
|
||||
(bg-term-magenta-bright magenta-cooler)
|
||||
(fg-term-magenta-bright magenta-cooler)
|
||||
|
||||
(bg-term-cyan cyan)
|
||||
(fg-term-cyan cyan)
|
||||
(bg-term-cyan-bright cyan-cooler)
|
||||
(fg-term-cyan-bright cyan-cooler)
|
||||
|
||||
(bg-term-white "#a6a6a6")
|
||||
(fg-term-white "#a6a6a6")
|
||||
(bg-term-white-bright "#ffffff")
|
||||
(fg-term-white-bright "#ffffff")
|
||||
|
||||
;;;; Heading mappings
|
||||
|
||||
(fg-heading-0 cyan-cooler)
|
||||
(fg-heading-1 fg-main)
|
||||
(fg-heading-2 red-faint)
|
||||
(fg-heading-3 cyan-faint)
|
||||
(fg-heading-4 magenta)
|
||||
(fg-heading-5 green-faint)
|
||||
(fg-heading-6 magenta-faint)
|
||||
(fg-heading-7 cyan-faint)
|
||||
(fg-heading-8 fg-dim)
|
||||
|
||||
(bg-heading-0 unspecified)
|
||||
(bg-heading-1 unspecified)
|
||||
(bg-heading-2 unspecified)
|
||||
(bg-heading-3 unspecified)
|
||||
(bg-heading-4 unspecified)
|
||||
(bg-heading-5 unspecified)
|
||||
(bg-heading-6 unspecified)
|
||||
(bg-heading-7 unspecified)
|
||||
(bg-heading-8 unspecified)
|
||||
|
||||
(overline-heading-0 unspecified)
|
||||
(overline-heading-1 unspecified)
|
||||
(overline-heading-2 unspecified)
|
||||
(overline-heading-3 unspecified)
|
||||
(overline-heading-4 unspecified)
|
||||
(overline-heading-5 unspecified)
|
||||
(overline-heading-6 unspecified)
|
||||
(overline-heading-7 unspecified)
|
||||
(overline-heading-8 unspecified))
|
||||
"The entire palette of the `modus-vivendi-tritanopia' theme.
|
||||
|
||||
Named colors have the form (COLOR-NAME HEX-VALUE) with the former
|
||||
as a symbol and the latter as a string.
|
||||
|
||||
Semantic color mappings have the form (MAPPING-NAME COLOR-NAME)
|
||||
with both as symbols. The latter is a named color that already
|
||||
exists in the palette and is associated with a HEX-VALUE.")
|
||||
|
||||
(defcustom modus-vivendi-tritanopia-palette-user nil
|
||||
"Like the `modus-vivendi-tritanopia-palette' for user-defined entries.
|
||||
(unless (and (fboundp 'require-theme)
|
||||
load-file-name
|
||||
(equal (file-name-directory load-file-name)
|
||||
(expand-file-name "themes/" data-directory))
|
||||
(require-theme 'modus-themes t))
|
||||
(require 'modus-themes))
|
||||
|
||||
(defcustom modus-vivendi-tritanopia-palette-user nil
|
||||
"Like the `modus-vivendi-tritanopia-palette' for user-defined entries.
|
||||
This is meant to extend the palette with custom named colors and/or
|
||||
semantic palette mappings. Those may then be used in combination with
|
||||
palette overrides (also see `modus-themes-common-palette-overrides' and
|
||||
`modus-vivendi-tritanopia-palette-overrides')."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.5.0")
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Option to extend the palette for use with overrides"))
|
||||
|
||||
(defcustom modus-vivendi-tritanopia-palette-overrides nil
|
||||
"Overrides for `modus-vivendi-tritanopia-palette'.
|
||||
(defcustom modus-vivendi-tritanopia-palette-overrides nil
|
||||
"Overrides for `modus-vivendi-tritanopia-palette'.
|
||||
|
||||
Mirror the elements of the aforementioned palette, overriding
|
||||
their value.
|
||||
|
|
@ -523,18 +68,25 @@ mappings, such as to make the cursor red. Wherea theme-specific
|
|||
overrides can also be used to change the value of a named color,
|
||||
such as what hexadecimal RGB value the red-warmer symbol
|
||||
represents."
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:set #'modus-themes--set-option
|
||||
:initialize #'custom-initialize-default
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
:group 'modus-themes
|
||||
:package-version '(modus-themes . "4.0.0")
|
||||
:version "30.1"
|
||||
:type '(repeat (list symbol (choice symbol string)))
|
||||
:link '(info-link "(modus-themes) Palette overrides"))
|
||||
|
||||
(modus-themes-theme modus-vivendi-tritanopia
|
||||
modus-vivendi-tritanopia-palette
|
||||
modus-vivendi-tritanopia-palette-overrides)
|
||||
|
||||
(provide-theme 'modus-vivendi-tritanopia))
|
||||
(modus-themes-theme
|
||||
'modus-vivendi-tritanopia
|
||||
'modus-themes
|
||||
"Tritanopia-optimized theme with a black background.
|
||||
This variant is optimized for users with blue-yellow color
|
||||
deficiency (tritanopia). It conforms with the highest
|
||||
legibility standard for color contrast between background and
|
||||
foreground in any given piece of text, which corresponds to a
|
||||
minimum contrast in relative luminance of 7:1 (WCAG AAA
|
||||
standard)."
|
||||
'dark
|
||||
'modus-themes-vivendi-tritanopia-palette
|
||||
'modus-vivendi-tritanopia-palette-user
|
||||
'modus-vivendi-tritanopia-palette-overrides)
|
||||
|
||||
;;; modus-vivendi-tritanopia-theme.el ends here
|
||||
|
|
|
|||
|
|
@ -35,14 +35,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
|
|||
|
||||
enum { READ_CHUNK_SIZE = 100 * 1024 };
|
||||
|
||||
/* Value is true if strings X and Y compare equal. */
|
||||
|
||||
static bool
|
||||
streq (char const *x, char const *y)
|
||||
{
|
||||
return strcmp (x, y) == 0;
|
||||
}
|
||||
|
||||
static bool
|
||||
filename_eq (char const *x, char const *y)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -147,12 +147,6 @@ memcpyz (void *dest, void const *src, ptrdiff_t len)
|
|||
*e = '\0';
|
||||
}
|
||||
|
||||
static bool
|
||||
streq (char const *s, char const *t)
|
||||
{
|
||||
return strcmp (s, t) == 0;
|
||||
}
|
||||
|
||||
static bool
|
||||
strcaseeq (char const *s, char const *t)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#if USE_ACL && HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
|
||||
#if USE_ACL && HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5 */
|
||||
|
||||
# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ acl_extended_nontrivial (acl_t acl)
|
|||
return (acl_entries (acl) > 0);
|
||||
}
|
||||
|
||||
# else /* Linux, FreeBSD, NetBSD >= 10, IRIX, Tru64, Cygwin >= 2.5 */
|
||||
# else /* Linux, FreeBSD, NetBSD >= 10, Cygwin >= 2.5 */
|
||||
|
||||
/* ACL is an ACL, from a file, stored as type ACL_TYPE_ACCESS.
|
||||
Return 1 if the given ACL is non-trivial.
|
||||
|
|
@ -118,9 +118,9 @@ acl_access_nontrivial (acl_t acl)
|
|||
- S-1-5-32-545 (group "Users")
|
||||
Cf. <https://learn.microsoft.com/en-us/windows/win32/secauthz/well-known-sids>
|
||||
and look at the output of the 'mkgroup' command. */
|
||||
ignorable = (strcmp (group_sid, "S-1-5-18") == 0
|
||||
|| strcmp (group_sid, "S-1-5-32-544") == 0
|
||||
|| strcmp (group_sid, "S-1-5-32-545") == 0);
|
||||
ignorable = (streq (group_sid, "S-1-5-18")
|
||||
|| streq (group_sid, "S-1-5-32-544")
|
||||
|| streq (group_sid, "S-1-5-32-545"));
|
||||
}
|
||||
}
|
||||
if (!ignorable)
|
||||
|
|
@ -137,46 +137,6 @@ acl_access_nontrivial (acl_t acl)
|
|||
}
|
||||
return got_one;
|
||||
|
||||
# elif HAVE_ACL_TO_SHORT_TEXT /* IRIX */
|
||||
/* Don't use acl_get_entry: it is undocumented. */
|
||||
|
||||
int count = acl->acl_cnt;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
acl_entry_t ace = &acl->acl_entry[i];
|
||||
acl_tag_t tag = ace->ae_tag;
|
||||
|
||||
if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ
|
||||
|| tag == ACL_OTHER_OBJ))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
# elif HAVE_ACL_FREE_TEXT /* Tru64 */
|
||||
/* Don't use acl_get_entry: it takes only one argument and does not work. */
|
||||
|
||||
int count = acl->acl_num;
|
||||
acl_entry_t ace;
|
||||
|
||||
for (ace = acl->acl_first; count > 0; ace = ace->next, count--)
|
||||
{
|
||||
acl_tag_t tag;
|
||||
acl_perm_t perm;
|
||||
|
||||
tag = ace->entry->acl_type;
|
||||
if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ || tag == ACL_OTHER))
|
||||
return 1;
|
||||
|
||||
perm = ace->entry->acl_perm;
|
||||
/* On Tru64, perm can also contain non-standard bits such as
|
||||
PERM_INSERT, PERM_DELETE, PERM_MODIFY, PERM_LOOKUP, ... */
|
||||
if ((perm & ~(ACL_READ | ACL_WRITE | ACL_EXECUTE)) != 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
# else
|
||||
|
||||
errno = ENOSYS;
|
||||
|
|
@ -548,7 +508,7 @@ void
|
|||
free_permission_context (struct permission_context *ctx)
|
||||
{
|
||||
#if USE_ACL
|
||||
# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
|
||||
# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5 */
|
||||
if (ctx->acl)
|
||||
acl_free (ctx->acl);
|
||||
# if !HAVE_ACL_TYPE_EXTENDED
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ _GL_INLINE_HEADER_BEGIN
|
|||
|
||||
# if HAVE_ACL_GET_FILE
|
||||
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
|
||||
/* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
|
||||
/* Linux, FreeBSD, Mac OS X, Cygwin >= 2.5 */
|
||||
|
||||
# ifndef MIN_ACL_ENTRIES
|
||||
# define MIN_ACL_ENTRIES 4
|
||||
|
|
@ -76,17 +76,7 @@ _GL_INLINE_HEADER_BEGIN
|
|||
|
||||
/* POSIX 1003.1e (draft 17) */
|
||||
# ifdef HAVE_ACL_GET_FD
|
||||
/* Most platforms have a 1-argument acl_get_fd, only OSF/1 has a 2-argument
|
||||
macro(!). */
|
||||
# if HAVE_ACL_FREE_TEXT /* OSF/1 */
|
||||
ACL_INTERNAL_INLINE acl_t
|
||||
rpl_acl_get_fd (int fd)
|
||||
{
|
||||
return acl_get_fd (fd, ACL_TYPE_ACCESS);
|
||||
}
|
||||
# undef acl_get_fd
|
||||
# define acl_get_fd rpl_acl_get_fd
|
||||
# endif
|
||||
/* acl_get_fd takes one argument. */
|
||||
# else
|
||||
# define HAVE_ACL_GET_FD false
|
||||
# undef acl_get_fd
|
||||
|
|
@ -95,17 +85,7 @@ rpl_acl_get_fd (int fd)
|
|||
|
||||
/* POSIX 1003.1e (draft 17) */
|
||||
# ifdef HAVE_ACL_SET_FD
|
||||
/* Most platforms have a 2-argument acl_set_fd, only OSF/1 has a 3-argument
|
||||
macro(!). */
|
||||
# if HAVE_ACL_FREE_TEXT /* OSF/1 */
|
||||
ACL_INTERNAL_INLINE int
|
||||
rpl_acl_set_fd (int fd, acl_t acl)
|
||||
{
|
||||
return acl_set_fd (fd, ACL_TYPE_ACCESS, acl);
|
||||
}
|
||||
# undef acl_set_fd
|
||||
# define acl_set_fd rpl_acl_set_fd
|
||||
# endif
|
||||
/* acl_set_fd takes two arguments. */
|
||||
# else
|
||||
# define HAVE_ACL_SET_FD false
|
||||
# undef acl_set_fd
|
||||
|
|
@ -136,7 +116,7 @@ rpl_acl_set_fd (int fd, acl_t acl)
|
|||
# endif
|
||||
|
||||
/* Set to 0 if a file's mode is stored independently from the ACL. */
|
||||
# if (HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP) || defined __sgi /* Mac OS X, IRIX */
|
||||
# if HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP /* Mac OS X */
|
||||
# define MODE_INSIDE_ACL 0
|
||||
# endif
|
||||
|
||||
|
|
@ -260,7 +240,7 @@ extern int acl_nontrivial (int count, struct acl *entries);
|
|||
struct permission_context {
|
||||
mode_t mode;
|
||||
#if USE_ACL
|
||||
# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
|
||||
# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, Cygwin >= 2.5 */
|
||||
acl_t acl;
|
||||
# if !HAVE_ACL_TYPE_EXTENDED
|
||||
acl_t default_acl;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,10 @@
|
|||
#include "acl-internal.h"
|
||||
|
||||
/* This file assumes POSIX-draft like ACLs
|
||||
(Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5). */
|
||||
(Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5).
|
||||
|
||||
It is compiled only on systems that do not have the acl_entries() function
|
||||
(in libc or libacl). */
|
||||
|
||||
/* Return the number of entries in ACL.
|
||||
Return -1 and set errno upon failure to determine it. */
|
||||
|
|
@ -58,16 +61,6 @@ acl_entries (acl_t acl)
|
|||
if (got_one < 0)
|
||||
return -1;
|
||||
# endif
|
||||
#else /* IRIX, Tru64 */
|
||||
# if HAVE_ACL_TO_SHORT_TEXT /* IRIX */
|
||||
/* Don't use acl_get_entry: it is undocumented. */
|
||||
count = acl->acl_cnt;
|
||||
# endif
|
||||
# if HAVE_ACL_FREE_TEXT /* Tru64 */
|
||||
/* Don't use acl_get_entry: it takes only one argument and does not
|
||||
work. */
|
||||
count = acl->acl_num;
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ get_boot_time_uncached (struct timespec *p_boot_time)
|
|||
|
||||
/* Try to find the boot time in the /var/run/utmp file. */
|
||||
|
||||
# if defined UTMP_NAME_FUNCTION /* glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, IRIX, Solaris, Cygwin, Android */
|
||||
# if defined UTMP_NAME_FUNCTION /* glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, Solaris, Cygwin, Android */
|
||||
|
||||
/* Ignore the return value for now.
|
||||
Solaris' utmpname returns 1 upon success -- which is contrary
|
||||
|
|
@ -120,13 +120,13 @@ get_boot_time_uncached (struct timespec *p_boot_time)
|
|||
found_boot_time = ts;
|
||||
|
||||
# if defined __linux__ && !defined __ANDROID__
|
||||
if (memcmp (UT_USER (ut), "runlevel", strlen ("runlevel") + 1) == 0
|
||||
&& memcmp (ut->ut_line, "~", strlen ("~") + 1) == 0)
|
||||
if (memeq (UT_USER (ut), "runlevel", strlen ("runlevel") + 1)
|
||||
&& memeq (ut->ut_line, "~", strlen ("~") + 1))
|
||||
runlevel_ts = ts;
|
||||
# endif
|
||||
# if defined __minix
|
||||
if (UT_USER (ut)[0] == '\0'
|
||||
&& memcmp (ut->ut_line, "run-level ", strlen ("run-level ")) == 0)
|
||||
&& memeq (ut->ut_line, "run-level ", strlen ("run-level ")))
|
||||
runlevel_ts = ts;
|
||||
# endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,13 +23,16 @@
|
|||
#error "Please include config.h first."
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
_GL_INLINE_HEADER_BEGIN
|
||||
/* Define this now, rather than after including stdint.h, in case
|
||||
stdint.h recursively includes us. This is for Gnulib endian.h. */
|
||||
#ifndef _GL_BYTESWAP_INLINE
|
||||
# define _GL_BYTESWAP_INLINE _GL_INLINE
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
_GL_INLINE_HEADER_BEGIN
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@
|
|||
_GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
|
||||
# define _GL_CXXALIASWARN_1(func,namespace) \
|
||||
_GL_CXXALIASWARN_2 (func, namespace)
|
||||
/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
|
||||
/* To work around GCC bug <https://gcc.gnu.org/PR43881>,
|
||||
we enable the warning only when not optimizing. */
|
||||
# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
|
||||
# define _GL_CXXALIASWARN_2(func,namespace) \
|
||||
|
|
@ -338,7 +338,7 @@
|
|||
GNULIB_NAMESPACE)
|
||||
# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
|
||||
_GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
|
||||
/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
|
||||
/* To work around GCC bug <https://gcc.gnu.org/PR43881>,
|
||||
we enable the warning only when not optimizing. */
|
||||
# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
|
||||
# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ enum { STACK_BUF_SIZE = 1024 };
|
|||
If GCC_LINT is defined, do not inline this function with GCC 10.1
|
||||
and later, to avoid creating a pointer to the stack that GCC
|
||||
-Wreturn-local-addr incorrectly complains about. See:
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644
|
||||
https://gcc.gnu.org/PR93644
|
||||
Although the noinline attribute can hurt performance a bit, no better way
|
||||
to pacify GCC is known; even an explicit #pragma does not pacify GCC.
|
||||
When the GCC bug is fixed this workaround should be limited to the
|
||||
|
|
@ -174,7 +174,7 @@ careadlinkat (int fd, char const *filename,
|
|||
shrinking realloc. */
|
||||
#ifdef GCC_BOGUS_WRETURN_LOCAL_ADDR
|
||||
#warning "GCC might issue a bogus -Wreturn-local-addr warning here."
|
||||
#warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>."
|
||||
#warning "See <https://gcc.gnu.org/PR93644>."
|
||||
#endif
|
||||
char stack_buf[STACK_BUF_SIZE];
|
||||
return readlink_stk (fd, filename, buffer, buffer_size, alloc,
|
||||
|
|
|
|||
|
|
@ -277,10 +277,10 @@
|
|||
*/
|
||||
#endif
|
||||
|
||||
/* GCC and clang have various useful declarations that can be made with
|
||||
the '__attribute__' syntax. All of the ways we use this do fine if
|
||||
they are omitted for compilers that don't understand it. */
|
||||
#if !(defined __GNUC__ || defined __clang__)
|
||||
/* GCC, clang, and compatible compilers have various useful declarations
|
||||
that can be made with the '__attribute__' syntax. All of the ways we use
|
||||
this do fine if they are omitted for compilers that don't understand it. */
|
||||
#if !(defined __GNUC__ || defined __clang__ || defined __TINYC__)
|
||||
# define __attribute__(xyz) /* Ignore */
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ copy_file_range (int infd, off_t *pinoff,
|
|||
|
||||
if (ok)
|
||||
{
|
||||
# if defined __GLIBC__ && ! (2 < __GLIBC__ + (43 <= __GLIBC_MINOR__))
|
||||
# if defined __GLIBC__ && ! (2 < __GLIBC__ + (43 <= __GLIBC_MINOR__))
|
||||
/* Work around glibc bug 33245
|
||||
<https://sourceware.org/bugzilla/show_bug.cgi?id=33245>.
|
||||
<https://sourceware.org/PR33245>.
|
||||
This bug is present in glibc 2.42 (2025) and fixed in 2.43,
|
||||
so this workaround, and the configure-time check for glibc,
|
||||
can be removed once glibc 2.42 and earlier is no longer a
|
||||
|
|
|
|||
|
|
@ -101,40 +101,6 @@ static_assert (DT_UNKNOWN != DT_FIFO && DT_UNKNOWN != DT_CHR
|
|||
/* Other optional information about a directory entry. */
|
||||
#define _GL_DT_NOTDIR 0x100 /* Not a directory */
|
||||
|
||||
/* Conversion between S_IF* and DT_* file types. */
|
||||
#if ! (defined IFTODT && defined DTTOIF)
|
||||
# include <sys/stat.h>
|
||||
# ifdef S_ISWHT
|
||||
# define _GL_DIRENT_S_ISWHT(mode) S_ISWHT(mode)
|
||||
# else
|
||||
# define _GL_DIRENT_S_ISWHT(mode) 0
|
||||
# endif
|
||||
# ifdef S_IFWHT
|
||||
# define _GL_DIRENT_S_IFWHT S_IFWHT
|
||||
# else
|
||||
# define _GL_DIRENT_S_IFWHT (DT_WHT << 12) /* just a guess */
|
||||
# endif
|
||||
#endif
|
||||
/* Conversion from a 'stat' mode to a DT_* value. */
|
||||
#ifndef IFTODT
|
||||
# define IFTODT(mode) \
|
||||
(S_ISREG (mode) ? DT_REG : S_ISDIR (mode) ? DT_DIR \
|
||||
: S_ISLNK (mode) ? DT_LNK : S_ISBLK (mode) ? DT_BLK \
|
||||
: S_ISCHR (mode) ? DT_CHR : S_ISFIFO (mode) ? DT_FIFO \
|
||||
: S_ISSOCK (mode) ? DT_SOCK \
|
||||
: _GL_DIRENT_S_ISWHT (mode) ? DT_WHT : DT_UNKNOWN)
|
||||
#endif
|
||||
/* Conversion from a DT_* value to a 'stat' mode. */
|
||||
#ifndef DTTOIF
|
||||
# define DTTOIF(dirtype) \
|
||||
((dirtype) == DT_REG ? S_IFREG : (dirtype) == DT_DIR ? S_IFDIR \
|
||||
: (dirtype) == DT_LNK ? S_IFLNK : (dirtype) == DT_BLK ? S_IFBLK \
|
||||
: (dirtype) == DT_CHR ? S_IFCHR : dirtype == DT_FIFO ? S_IFIFO \
|
||||
: (dirtype) == DT_SOCK ? S_IFSOCK \
|
||||
: (dirtype) == DT_WHT ? _GL_DIRENT_S_IFWHT \
|
||||
: (dirtype) << 12 /* just a guess */)
|
||||
#endif
|
||||
|
||||
#if !@DIR_HAS_FD_MEMBER@
|
||||
# if !GNULIB_defined_DIR
|
||||
/* struct gl_directory is a type with a field 'int fd_to_close'.
|
||||
|
|
@ -426,5 +392,44 @@ _GL_WARN_ON_USE (alphasort, "alphasort is unportable - "
|
|||
#endif
|
||||
|
||||
|
||||
/* Includes that provide only macros that don't need to be overridden.
|
||||
(Includes that are needed for type definitions and function declarations
|
||||
have their place above, before the function overrides.) */
|
||||
|
||||
/* Conversion between S_IF* and DT_* file types. */
|
||||
#if ! (defined IFTODT && defined DTTOIF)
|
||||
# include <sys/stat.h>
|
||||
# ifdef S_ISWHT
|
||||
# define _GL_DIRENT_S_ISWHT(mode) S_ISWHT(mode)
|
||||
# else
|
||||
# define _GL_DIRENT_S_ISWHT(mode) 0
|
||||
# endif
|
||||
# ifdef S_IFWHT
|
||||
# define _GL_DIRENT_S_IFWHT S_IFWHT
|
||||
# else
|
||||
# define _GL_DIRENT_S_IFWHT (DT_WHT << 12) /* just a guess */
|
||||
# endif
|
||||
#endif
|
||||
/* Conversion from a 'stat' mode to a DT_* value. */
|
||||
#ifndef IFTODT
|
||||
# define IFTODT(mode) \
|
||||
(S_ISREG (mode) ? DT_REG : S_ISDIR (mode) ? DT_DIR \
|
||||
: S_ISLNK (mode) ? DT_LNK : S_ISBLK (mode) ? DT_BLK \
|
||||
: S_ISCHR (mode) ? DT_CHR : S_ISFIFO (mode) ? DT_FIFO \
|
||||
: S_ISSOCK (mode) ? DT_SOCK \
|
||||
: _GL_DIRENT_S_ISWHT (mode) ? DT_WHT : DT_UNKNOWN)
|
||||
#endif
|
||||
/* Conversion from a DT_* value to a 'stat' mode. */
|
||||
#ifndef DTTOIF
|
||||
# define DTTOIF(dirtype) \
|
||||
((dirtype) == DT_REG ? S_IFREG : (dirtype) == DT_DIR ? S_IFDIR \
|
||||
: (dirtype) == DT_LNK ? S_IFLNK : (dirtype) == DT_BLK ? S_IFBLK \
|
||||
: (dirtype) == DT_CHR ? S_IFCHR : dirtype == DT_FIFO ? S_IFIFO \
|
||||
: (dirtype) == DT_SOCK ? S_IFSOCK \
|
||||
: (dirtype) == DT_WHT ? _GL_DIRENT_S_IFWHT \
|
||||
: (dirtype) << 12 /* just a guess */)
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _@GUARD_PREFIX@_DIRENT_H */
|
||||
#endif /* _@GUARD_PREFIX@_DIRENT_H */
|
||||
|
|
|
|||
|
|
@ -109,6 +109,15 @@ _GL_INLINE_HEADER_BEGIN
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* These declarations are needed if Gnulib byteswap.h -> stdint.h ->
|
||||
sys/types.h -> endian.h -> Gnulib byteswap.h, the last of which is blocked
|
||||
by its include guard so the functions are not yet declared. */
|
||||
#ifdef _GL_BYTESWAP_INLINE
|
||||
_GL_BYTESWAP_INLINE uint_least16_t bswap_16 (uint_least16_t);
|
||||
_GL_BYTESWAP_INLINE uint_least32_t bswap_32 (uint_least32_t);
|
||||
_GL_BYTESWAP_INLINE uint_least64_t bswap_64 (uint_least64_t);
|
||||
#endif
|
||||
|
||||
/* Big endian to host. */
|
||||
|
||||
_GL_ENDIAN_INLINE uint16_t
|
||||
|
|
|
|||
|
|
@ -148,27 +148,11 @@
|
|||
# endif
|
||||
|
||||
|
||||
/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
|
||||
EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */
|
||||
# if @EMULTIHOP_HIDDEN@
|
||||
# define EMULTIHOP @EMULTIHOP_VALUE@
|
||||
# define GNULIB_defined_EMULTIHOP 1
|
||||
# endif
|
||||
# if @ENOLINK_HIDDEN@
|
||||
# define ENOLINK @ENOLINK_VALUE@
|
||||
# define GNULIB_defined_ENOLINK 1
|
||||
# endif
|
||||
# if @EOVERFLOW_HIDDEN@
|
||||
# define EOVERFLOW @EOVERFLOW_VALUE@
|
||||
# define GNULIB_defined_EOVERFLOW 1
|
||||
# endif
|
||||
|
||||
|
||||
/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
|
||||
EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
|
||||
Likewise, on NonStop Kernel, EDQUOT is not defined.
|
||||
Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
|
||||
HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
|
||||
HP-UX EWOULDBLOCK = 246.
|
||||
|
||||
Note: When one of these systems defines some of these macros some day,
|
||||
binaries will have to be recompiled so that they recognizes the new
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ euidaccess (const char *file, int mode)
|
|||
{
|
||||
#if HAVE_FACCESSAT /* glibc, AIX 7, Solaris 11, Cygwin 1.7 */
|
||||
return faccessat (AT_FDCWD, file, mode, AT_EACCESS);
|
||||
#elif defined EFF_ONLY_OK /* IRIX, OSF/1, Interix */
|
||||
#elif defined EFF_ONLY_OK /* Interix */
|
||||
return access (file, mode | EFF_ONLY_OK);
|
||||
#elif defined ACC_SELF /* AIX */
|
||||
return accessx (file, mode, ACC_SELF);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#define _GL_INCLUDING_UNISTD_H
|
||||
#include <config.h>
|
||||
|
||||
/* Specification. */
|
||||
/* Get the original definition of faccessat. */
|
||||
#include <unistd.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
|
@ -40,14 +40,8 @@ orig_faccessat (int fd, char const *name, int mode, int flag)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef __osf__
|
||||
/* Write "unistd.h" here, not <unistd.h>, otherwise OSF/1 5.1 DTK cc
|
||||
eliminates this include because of the preliminary #include <unistd.h>
|
||||
above. */
|
||||
# include "unistd.h"
|
||||
#else
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
/* Specification. */
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef HAVE_ACCESS
|
||||
/* Mingw lacks access, but it also lacks real vs. effective ids, so
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#define __need_system_sys_stat_h
|
||||
#include <config.h>
|
||||
|
||||
/* Specification. */
|
||||
/* Get the original definition of fchmodat. */
|
||||
#include <sys/stat.h>
|
||||
#undef __need_system_sys_stat_h
|
||||
|
||||
|
|
@ -41,17 +41,13 @@ orig_fchmodat (int dir, char const *file, mode_t mode, int flags)
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __osf__
|
||||
/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
|
||||
eliminates this include because of the preliminary #include <sys/stat.h>
|
||||
above. */
|
||||
# include "sys/stat.h"
|
||||
#else
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
/* Specification. */
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <intprops.h>
|
||||
|
||||
#include "issymlink.h"
|
||||
|
||||
/* Invoke chmod or lchmod on FILE, using mode MODE, in the directory
|
||||
open on descriptor FD. If possible, do it without changing the
|
||||
working directory. Otherwise, resort to using save_cwd/fchdir,
|
||||
|
|
@ -84,29 +80,30 @@ fchmodat (int dir, char const *file, mode_t mode, int flags)
|
|||
if (flags == AT_SYMLINK_NOFOLLOW)
|
||||
{
|
||||
# if HAVE_READLINKAT
|
||||
char readlink_buf[1];
|
||||
|
||||
# ifdef O_PATH
|
||||
/* Open a file descriptor with O_NOFOLLOW, to make sure we don't
|
||||
follow symbolic links, if /proc is mounted. O_PATH is used to
|
||||
avoid a failure if the file is not readable.
|
||||
Cf. <https://sourceware.org/bugzilla/show_bug.cgi?id=14578> */
|
||||
Cf. <https://sourceware.org/PR14578> */
|
||||
int fd = openat (dir, file, O_PATH | O_NOFOLLOW | O_CLOEXEC);
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
int err;
|
||||
if (0 <= readlinkat (fd, "", readlink_buf, sizeof readlink_buf))
|
||||
err = EOPNOTSUPP;
|
||||
else if (errno == EINVAL)
|
||||
{
|
||||
static char const fmt[] = "/proc/self/fd/%d";
|
||||
char buf[sizeof fmt - sizeof "%d" + INT_BUFSIZE_BOUND (int)];
|
||||
sprintf (buf, fmt, fd);
|
||||
err = chmod (buf, mode) == 0 ? 0 : errno == ENOENT ? -1 : errno;
|
||||
}
|
||||
else
|
||||
err = errno == ENOENT ? -1 : errno;
|
||||
{
|
||||
int ret = issymlinkat (fd, "");
|
||||
if (ret > 0)
|
||||
err = EOPNOTSUPP;
|
||||
else if (ret == 0)
|
||||
{
|
||||
static char const fmt[] = "/proc/self/fd/%d";
|
||||
char buf[sizeof fmt - sizeof "%d" + INT_BUFSIZE_BOUND (int)];
|
||||
sprintf (buf, fmt, fd);
|
||||
err = chmod (buf, mode) == 0 ? 0 : errno == ENOENT ? -1 : errno;
|
||||
}
|
||||
else
|
||||
err = errno == ENOENT ? -1 : errno;
|
||||
}
|
||||
|
||||
close (fd);
|
||||
|
||||
|
|
@ -117,7 +114,7 @@ fchmodat (int dir, char const *file, mode_t mode, int flags)
|
|||
|
||||
/* O_PATH + /proc is not supported. */
|
||||
|
||||
if (0 <= readlinkat (dir, file, readlink_buf, sizeof readlink_buf))
|
||||
if (issymlinkat (dir, file) > 0)
|
||||
{
|
||||
errno = EOPNOTSUPP;
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -376,12 +376,6 @@ fcntl (int fd, int action, /* arg */...)
|
|||
#ifdef F_NOTIFY /* Linux */
|
||||
case F_NOTIFY:
|
||||
#endif
|
||||
#ifdef F_OPLKACK /* IRIX */
|
||||
case F_OPLKACK:
|
||||
#endif
|
||||
#ifdef F_OPLKREG /* IRIX */
|
||||
case F_OPLKREG:
|
||||
#endif
|
||||
#ifdef F_RDAHEAD /* macOS */
|
||||
case F_RDAHEAD:
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -249,6 +249,46 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_OPENAT2@
|
||||
# if !defined RESOLVE_NO_XDEV && defined __has_include
|
||||
# if __has_include (<linux/openat2.h>)
|
||||
# include <linux/openat2.h>
|
||||
# endif
|
||||
# endif
|
||||
# ifndef RESOLVE_NO_XDEV
|
||||
struct open_how
|
||||
{
|
||||
# ifdef __UINT64_TYPE__
|
||||
__UINT64_TYPE__ flags, mode, resolve;
|
||||
# else
|
||||
unsigned long long int flags, mode, resolve;
|
||||
# endif
|
||||
};
|
||||
# define RESOLVE_NO_XDEV 0x01
|
||||
# define RESOLVE_NO_MAGICLINKS 0x02
|
||||
# define RESOLVE_NO_SYMLINKS 0x04
|
||||
# define RESOLVE_BENEATH 0x08
|
||||
# define RESOLVE_IN_ROOT 0x10
|
||||
# define RESOLVE_CACHED 0x20
|
||||
# endif
|
||||
|
||||
# if !@HAVE_OPENAT2@
|
||||
_GL_FUNCDECL_SYS (openat2, int,
|
||||
(int fd, char const *file, struct open_how const *how,
|
||||
size_t size),
|
||||
_GL_ARG_NONNULL ((2, 3)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (openat2, int,
|
||||
(int fd, char const *file, struct open_how const *how,
|
||||
size_t size));
|
||||
_GL_CXXALIASWARN (openat2);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef openat2
|
||||
# if HAVE_RAW_DECL_OPENAT2
|
||||
_GL_WARN_ON_USE (openat2, "openat2 is not portable - "
|
||||
"use gnulib module openat2 for portability");
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Fix up the FD_* macros, only known to be missing on mingw. */
|
||||
|
||||
|
|
@ -293,11 +333,6 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined O_DIRECT && defined O_DIRECTIO
|
||||
/* Tru64 spells it 'O_DIRECTIO'. */
|
||||
# define O_DIRECT O_DIRECTIO
|
||||
#endif
|
||||
|
||||
#if !defined O_CLOEXEC && defined O_NOINHERIT
|
||||
/* Mingw spells it 'O_NOINHERIT'. */
|
||||
# define O_CLOEXEC O_NOINHERIT
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ get_aclinfo (int fd, char const *name, struct aclinfo *ai, int flags)
|
|||
first case, and ENODATA in the latter. */
|
||||
if (r == 0)
|
||||
scontext_err = ENOTSUP;
|
||||
if (r == 10 && memcmp (ai->scontext, "unlabeled", 10) == 0)
|
||||
if (r == 10 && memeq (ai->scontext, "unlabeled", 10))
|
||||
{
|
||||
freecon (ai->scontext);
|
||||
scontext_err = ENODATA;
|
||||
|
|
@ -364,9 +364,9 @@ acl_nfs4_nontrivial (uint32_t *xattr, ssize_t nbytes)
|
|||
/* For a trivial ACL, max 6 (typically 3) ACEs, 3 allow, 3 deny.
|
||||
Check that there is at most one ACE of each TYPE and WHO. */
|
||||
int who2
|
||||
= (wholen == 6 && memcmp (xattr, "OWNER@", 6) == 0 ? 0
|
||||
: wholen == 6 && memcmp (xattr, "GROUP@", 6) == 0 ? 2
|
||||
: wholen == 9 && memcmp (xattr, "EVERYONE@", 9) == 0 ? 4
|
||||
= (wholen == 6 && memeq (xattr, "OWNER@", 6) ? 0
|
||||
: wholen == 6 && memeq (xattr, "GROUP@", 6) ? 2
|
||||
: wholen == 9 && memeq (xattr, "EVERYONE@", 9) ? 4
|
||||
: -1);
|
||||
if (who2 < 0)
|
||||
return 1;
|
||||
|
|
@ -384,9 +384,9 @@ acl_nfs4_nontrivial (uint32_t *xattr, ssize_t nbytes)
|
|||
|
||||
#if (!USE_LINUX_XATTR && USE_ACL && HAVE_ACL_GET_FILE \
|
||||
&& !HAVE_ACL_EXTENDED_FILE && !HAVE_ACL_TYPE_EXTENDED)
|
||||
/* FreeBSD, NetBSD >= 10, IRIX, Tru64, Cygwin >= 2.5 */
|
||||
/* FreeBSD, NetBSD >= 10, Cygwin >= 2.5 */
|
||||
|
||||
# if HAVE_ACL_GET_FD && !HAVE_ACL_GET_LINK_NP /* IRIX, Tru64, Cygwin >= 2.5 */
|
||||
# if HAVE_ACL_GET_FD && !HAVE_ACL_GET_LINK_NP /* Cygwin >= 2.5 */
|
||||
# include <fcntl.h>
|
||||
# ifdef O_PATH
|
||||
# define acl_get_fd_np(fd, type) acl_get_fd (fd)
|
||||
|
|
@ -522,7 +522,7 @@ fdfile_has_aclinfo (MAYBE_UNUSED int fd,
|
|||
|
||||
{
|
||||
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
|
||||
/* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
|
||||
/* Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5 */
|
||||
int ret;
|
||||
|
||||
# if HAVE_ACL_EXTENDED_FILE /* Linux */
|
||||
|
|
@ -553,7 +553,7 @@ fdfile_has_aclinfo (MAYBE_UNUSED int fd,
|
|||
}
|
||||
else
|
||||
ret = -1;
|
||||
# else /* FreeBSD, NetBSD >= 10, IRIX, Tru64, Cygwin >= 2.5 */
|
||||
# else /* FreeBSD, NetBSD >= 10, Cygwin >= 2.5 */
|
||||
|
||||
acl_t acl = acl_get_fdfile (fd, name, ACL_TYPE_ACCESS, flags);
|
||||
if (acl)
|
||||
|
|
@ -562,12 +562,7 @@ fdfile_has_aclinfo (MAYBE_UNUSED int fd,
|
|||
int saved_errno = errno;
|
||||
acl_free (acl);
|
||||
errno = saved_errno;
|
||||
# if HAVE_ACL_FREE_TEXT /* Tru64 */
|
||||
/* On OSF/1, acl_get_file (name, ACL_TYPE_DEFAULT) always
|
||||
returns NULL with errno not set. There is no point in
|
||||
making this call. */
|
||||
# else /* FreeBSD, NetBSD >= 10, IRIX, Cygwin >= 2.5 */
|
||||
/* On Linux, FreeBSD, NetBSD, IRIX,
|
||||
/* On Linux, FreeBSD, NetBSD,
|
||||
acl_get_file (name, ACL_TYPE_ACCESS)
|
||||
and acl_get_file (name, ACL_TYPE_DEFAULT) on a directory
|
||||
either both succeed or both fail; it depends on the
|
||||
|
|
@ -580,26 +575,25 @@ fdfile_has_aclinfo (MAYBE_UNUSED int fd,
|
|||
acl = acl_get_fdfile (fd, name, ACL_TYPE_DEFAULT, flags);
|
||||
if (acl)
|
||||
{
|
||||
# ifdef __CYGWIN__ /* Cygwin >= 2.5 */
|
||||
# ifdef __CYGWIN__ /* Cygwin >= 2.5 */
|
||||
ret = acl_access_nontrivial (acl);
|
||||
saved_errno = errno;
|
||||
acl_free (acl);
|
||||
errno = saved_errno;
|
||||
# else
|
||||
# else
|
||||
ret = (0 < acl_entries (acl));
|
||||
acl_free (acl);
|
||||
# endif
|
||||
# endif
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = -1;
|
||||
# ifdef __CYGWIN__ /* Cygwin >= 2.5 */
|
||||
# ifdef __CYGWIN__ /* Cygwin >= 2.5 */
|
||||
if (d_type == DT_UNKNOWN)
|
||||
ret = 0;
|
||||
# endif
|
||||
# endif
|
||||
}
|
||||
}
|
||||
# endif
|
||||
}
|
||||
else
|
||||
ret = -1;
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@
|
|||
#include "stdio-impl.h"
|
||||
|
||||
/* This file is not used on systems that already have the __fpending function,
|
||||
namely glibc >= 2.2, Solaris >= 7, UnixWare >= 7.1.4.MP4, Cygwin >= 1.7.34,
|
||||
Android API >= 23, musl libc, Haiku >= hrev58760. */
|
||||
namely glibc >= 2.2, OpenBSD >= 7.6, Solaris >= 7, UnixWare >= 7.1.4.MP4,
|
||||
Cygwin >= 1.7.34, Android API >= 23, musl libc, Haiku >= hrev58760. */
|
||||
|
||||
/* Return the number of pending (aka buffered, unflushed)
|
||||
bytes on the stream, FP, that is open for writing. */
|
||||
|
|
@ -39,14 +39,14 @@ __fpending (FILE *fp)
|
|||
#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
|
||||
/* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
return fp->_IO_write_ptr - fp->_IO_write_base;
|
||||
#elif defined __sferror || defined __OpenBSD__ || defined __DragonFly__ || defined __ANDROID__
|
||||
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin < 1.7.34, Minix 3, Android */
|
||||
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
|
||||
/* FreeBSD, NetBSD, OpenBSD < 7.6, DragonFly, Mac OS X, Cygwin < 1.7.34, Minix 3, Android */
|
||||
return fp_->_p - fp_->_bf._base;
|
||||
#elif defined __EMX__ /* emx+gcc */
|
||||
return fp->_ptr - fp->_buffer;
|
||||
#elif defined __minix /* Minix */
|
||||
return fp_->_ptr - fp_->_buf;
|
||||
#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
|
||||
#elif defined _IOERR /* AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
|
||||
return (fp_->_ptr ? fp_->_ptr - fp_->_base : 0);
|
||||
#elif defined __UCLIBC__ /* uClibc */
|
||||
return (fp->__modeflags & __FLAG_WRITING ? fp->__bufpos - fp->__bufstart : 0);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ rpl_free (void *p)
|
|||
{
|
||||
# if defined __GNUC__ && !defined __clang__
|
||||
/* An invalid GCC optimization
|
||||
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98396>
|
||||
<https://gcc.gnu.org/PR98396>
|
||||
would optimize away the assignments in the code below, when link-time
|
||||
optimization (LTO) is enabled. Make the code more complicated, so that
|
||||
GCC does not grok how to optimize it. */
|
||||
|
|
|
|||
84
lib/fseterr.c
Normal file
84
lib/fseterr.c
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
/* Set the error indicator of a stream.
|
||||
Copyright (C) 2007-2025 Free Software Foundation, Inc.
|
||||
|
||||
This file is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation; either version 2.1 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This file is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Specification. */
|
||||
#include "fseterr.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "stdio-impl.h"
|
||||
|
||||
/* This file is not used on systems that have the __fseterr function,
|
||||
namely OpenBSD >= 7.6, musl libc, Haiku >= hrev58760. */
|
||||
|
||||
void
|
||||
fseterr (FILE *fp)
|
||||
{
|
||||
/* Most systems provide FILE as a struct and the necessary bitmask in
|
||||
<stdio.h>, because they need it for implementing getc() and putc() as
|
||||
fast macros. */
|
||||
#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
|
||||
/* GNU libc, BeOS, Haiku, Linux libc5 */
|
||||
fp->_flags |= _IO_ERR_SEEN;
|
||||
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
|
||||
/* FreeBSD, NetBSD, OpenBSD < 7.6, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
|
||||
fp_->_flags |= __SERR;
|
||||
#elif defined __EMX__ /* emx+gcc */
|
||||
fp->_flags |= _IOERR;
|
||||
#elif defined __minix /* Minix */
|
||||
fp->_flags |= _IOERR;
|
||||
#elif defined _IOERR /* AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
|
||||
fp_->_flag |= _IOERR;
|
||||
#elif defined __UCLIBC__ /* uClibc */
|
||||
fp->__modeflags |= __FLAG_ERROR;
|
||||
#elif defined __QNX__ /* QNX */
|
||||
fp->_Mode |= 0x200 /* _MERR */;
|
||||
#elif defined __MINT__ /* Atari FreeMiNT */
|
||||
fp->__error = 1;
|
||||
#elif defined EPLAN9 /* Plan9 */
|
||||
if (fp->state != 0 /* CLOSED */)
|
||||
fp->state = 5 /* ERR */;
|
||||
#elif 0 /* unknown */
|
||||
/* Portable fallback, based on an idea by Rich Felker.
|
||||
Wow! 6 system calls for something that is just a bit operation!
|
||||
Not activated on any system, because there is no way to repair FP when
|
||||
the sequence of system calls fails, and library code should not call
|
||||
abort(). */
|
||||
int saved_errno;
|
||||
int fd;
|
||||
int fd2;
|
||||
|
||||
saved_errno = errno;
|
||||
fflush (fp);
|
||||
fd = fileno (fp);
|
||||
fd2 = dup (fd);
|
||||
if (fd2 >= 0)
|
||||
{
|
||||
close (fd);
|
||||
fputc ('\0', fp); /* This should set the error indicator. */
|
||||
fflush (fp); /* Or this. */
|
||||
if (dup2 (fd2, fd) < 0)
|
||||
/* Whee... we botched the stream and now cannot restore it! */
|
||||
abort ();
|
||||
close (fd2);
|
||||
}
|
||||
errno = saved_errno;
|
||||
#else
|
||||
#error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
|
||||
#endif
|
||||
}
|
||||
55
lib/fseterr.h
Normal file
55
lib/fseterr.h
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/* Set the error indicator of a stream.
|
||||
Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
|
||||
|
||||
This file is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation; either version 2.1 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This file is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _FSETERR_H
|
||||
#define _FSETERR_H
|
||||
|
||||
/* This file uses HAVE___FSETERR. */
|
||||
#if !_GL_CONFIG_H_INCLUDED
|
||||
#error "Please include config.h first."
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Set the error indicator of the stream FP.
|
||||
The "error indicator" is set when an I/O operation on the stream fails, and
|
||||
is cleared (together with the "end-of-file" indicator) by clearerr (FP). */
|
||||
|
||||
#if HAVE___FSETERR /* musl libc */
|
||||
|
||||
/* Haiku has __fseterr but does not declare it. */
|
||||
# if defined __HAIKU__
|
||||
extern void __fseterr (FILE *fp);
|
||||
# endif
|
||||
|
||||
# include <stdio_ext.h>
|
||||
# define fseterr(fp) __fseterr (fp)
|
||||
|
||||
#else
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
extern void fseterr (FILE *fp);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _FSETERR_H */
|
||||
|
|
@ -36,14 +36,8 @@ orig_fstatat (int fd, char const *filename, struct stat *buf, int flags)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef __osf__
|
||||
/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
|
||||
eliminates this include because of the preliminary #include <sys/stat.h>
|
||||
above. */
|
||||
# include "sys/stat.h"
|
||||
#else
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
/* Specification. */
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "stat-time.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -148,15 +148,6 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
|
|||
? PROPAGATE_ALL_ONES (fsd.f_frsize)
|
||||
: PROPAGATE_ALL_ONES (fsd.f_bsize));
|
||||
|
||||
#elif defined STAT_STATFS3_OSF1 /* OSF/1 */
|
||||
|
||||
struct statfs fsd;
|
||||
|
||||
if (statfs (file, &fsd, sizeof (struct statfs)) != 0)
|
||||
return -1;
|
||||
|
||||
fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize);
|
||||
|
||||
#elif defined STAT_STATFS2_FRSIZE /* 2.6 < glibc/Linux < 2.6.36 */
|
||||
|
||||
struct statfs fsd;
|
||||
|
|
@ -201,7 +192,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
|
|||
|
||||
fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize);
|
||||
|
||||
#elif defined STAT_STATFS4 /* SVR3, old Irix */
|
||||
#elif defined STAT_STATFS4 /* SVR3 */
|
||||
|
||||
struct statfs fsd;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ get_permissions (const char *name, int desc, mode_t mode,
|
|||
|
||||
#if USE_ACL && HAVE_ACL_GET_FILE
|
||||
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
|
||||
/* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
|
||||
/* Linux, FreeBSD, Mac OS X, Cygwin >= 2.5 */
|
||||
# if !HAVE_ACL_TYPE_EXTENDED
|
||||
/* Linux, FreeBSD, IRIX, Tru64, Cygwin >= 2.5 */
|
||||
/* Linux, FreeBSD, Cygwin >= 2.5 */
|
||||
|
||||
if (HAVE_ACL_GET_FD && desc != -1)
|
||||
ctx->acl = acl_get_fd (desc);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,13 @@ getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
|
|||
ssize_t result;
|
||||
size_t cur_len = 0;
|
||||
|
||||
if (lineptr == NULL || n == NULL || fp == NULL)
|
||||
if (lineptr == NULL || n == NULL
|
||||
/* glibc already declares this function as __nonnull ((4)).
|
||||
Avoid a gcc warning "‘nonnull’ argument ‘fp’ compared to NULL". */
|
||||
#if !(__GLIBC__ >= 2)
|
||||
|| fp == NULL
|
||||
#endif
|
||||
)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -140,21 +140,6 @@
|
|||
# define SUNOS_5
|
||||
# endif
|
||||
|
||||
# if defined (__osf__) && defined (__alpha)
|
||||
# define OSF_ALPHA
|
||||
# include <sys/mbuf.h>
|
||||
# include <sys/socket.h>
|
||||
# include <net/route.h>
|
||||
# include <sys/table.h>
|
||||
/* Tru64 4.0D's table.h redefines sys */
|
||||
# undef sys
|
||||
# endif
|
||||
|
||||
# if defined (__osf__) && (defined (mips) || defined (__mips__))
|
||||
# define OSF_MIPS
|
||||
# include <sys/table.h>
|
||||
# endif
|
||||
|
||||
|
||||
/* VAX C can't handle multi-line #ifs, or lines longer than 256 chars. */
|
||||
# ifndef LOAD_AVE_TYPE
|
||||
|
|
@ -167,31 +152,16 @@
|
|||
# define LOAD_AVE_TYPE long
|
||||
# endif
|
||||
|
||||
# ifdef sgi
|
||||
# define LOAD_AVE_TYPE long
|
||||
# endif
|
||||
|
||||
# ifdef SVR4
|
||||
# define LOAD_AVE_TYPE long
|
||||
# endif
|
||||
|
||||
# ifdef OSF_ALPHA
|
||||
# define LOAD_AVE_TYPE long
|
||||
# endif
|
||||
|
||||
# if defined _AIX && ! defined HAVE_LIBPERFSTAT
|
||||
# define LOAD_AVE_TYPE long
|
||||
# endif
|
||||
|
||||
# endif /* No LOAD_AVE_TYPE. */
|
||||
|
||||
# ifdef OSF_ALPHA
|
||||
/* <sys/param.h> defines an incorrect value for FSCALE on Alpha OSF/1,
|
||||
according to ghazi@noc.rutgers.edu. */
|
||||
# undef FSCALE
|
||||
# define FSCALE 1024.0
|
||||
# endif
|
||||
|
||||
|
||||
# ifndef FSCALE
|
||||
|
||||
|
|
@ -324,10 +294,6 @@
|
|||
# endif
|
||||
# endif /* NeXT */
|
||||
|
||||
# ifdef sgi
|
||||
# include <sys/sysmp.h>
|
||||
# endif /* sgi */
|
||||
|
||||
# ifdef UMAX
|
||||
# include <signal.h>
|
||||
# include <sys/time.h>
|
||||
|
|
@ -389,7 +355,7 @@ static bool getloadavg_initialized;
|
|||
/* Offset in kmem to seek to read load average, or 0 means invalid. */
|
||||
static long offset;
|
||||
|
||||
# if ! defined __VMS && ! defined sgi && ! (defined __linux__ || defined __ANDROID__)
|
||||
# if ! defined __VMS && ! (defined __linux__ || defined __ANDROID__)
|
||||
static struct nlist name_list[2];
|
||||
# endif
|
||||
|
||||
|
|
@ -781,18 +747,6 @@ getloadavg (double loadavg[], int nelem)
|
|||
}
|
||||
# endif /* __MSDOS__ || WINDOWS32 */
|
||||
|
||||
# if !defined (LDAV_DONE) && defined (OSF_ALPHA) /* OSF/1 */
|
||||
# define LDAV_DONE
|
||||
|
||||
struct tbl_loadavg load_ave;
|
||||
table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave));
|
||||
for (elem = 0; elem < nelem; elem++)
|
||||
loadavg[elem]
|
||||
= (load_ave.tl_lscale == 0
|
||||
? load_ave.tl_avenrun.d[elem]
|
||||
: (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale));
|
||||
# endif /* OSF_ALPHA */
|
||||
|
||||
# if ! defined LDAV_DONE && defined __VMS /* VMS */
|
||||
/* VMS specific code -- read from the Load Ave driver. */
|
||||
|
||||
|
|
@ -837,7 +791,7 @@ getloadavg (double loadavg[], int nelem)
|
|||
# endif /* ! defined LDAV_DONE && defined __VMS */
|
||||
|
||||
# if ! defined LDAV_DONE && defined LOAD_AVE_TYPE && ! defined __VMS
|
||||
/* IRIX, other old systems */
|
||||
/* other old systems */
|
||||
|
||||
/* UNIX-specific code -- read the average from /dev/kmem. */
|
||||
|
||||
|
|
@ -848,41 +802,35 @@ getloadavg (double loadavg[], int nelem)
|
|||
/* Get the address of LDAV_SYMBOL. */
|
||||
if (offset == 0)
|
||||
{
|
||||
# ifndef sgi
|
||||
# if ! defined NLIST_STRUCT || ! defined N_NAME_POINTER
|
||||
# if ! defined NLIST_STRUCT || ! defined N_NAME_POINTER
|
||||
strcpy (name_list[0].n_name, LDAV_SYMBOL);
|
||||
strcpy (name_list[1].n_name, "");
|
||||
# else /* NLIST_STRUCT */
|
||||
# ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
|
||||
# else /* NLIST_STRUCT */
|
||||
# ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
|
||||
name_list[0].n_un.n_name = LDAV_SYMBOL;
|
||||
name_list[1].n_un.n_name = 0;
|
||||
# else /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||
# else /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||
name_list[0].n_name = LDAV_SYMBOL;
|
||||
name_list[1].n_name = 0;
|
||||
# endif /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||
# endif /* NLIST_STRUCT */
|
||||
# endif /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||
# endif /* NLIST_STRUCT */
|
||||
|
||||
# ifndef SUNOS_5
|
||||
# ifndef SUNOS_5
|
||||
if (
|
||||
# if !defined (_AIX)
|
||||
# if !defined (_AIX)
|
||||
nlist (KERNEL_FILE, name_list)
|
||||
# else /* _AIX */
|
||||
# else /* _AIX */
|
||||
knlist (name_list, 1, sizeof (name_list[0]))
|
||||
# endif
|
||||
# endif
|
||||
>= 0)
|
||||
/* Omit "&& name_list[0].n_type != 0 " -- it breaks on Sun386i. */
|
||||
{
|
||||
# ifdef FIXUP_KERNEL_SYMBOL_ADDR
|
||||
# ifdef FIXUP_KERNEL_SYMBOL_ADDR
|
||||
FIXUP_KERNEL_SYMBOL_ADDR (name_list);
|
||||
# endif
|
||||
# endif
|
||||
offset = name_list[0].n_value;
|
||||
}
|
||||
# endif /* !SUNOS_5 */
|
||||
# else /* sgi */
|
||||
ptrdiff_t ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN);
|
||||
if (ldav_off != -1)
|
||||
offset = (long int) ldav_off & 0x7fffffff;
|
||||
# endif /* sgi */
|
||||
# endif /* !SUNOS_5 */
|
||||
}
|
||||
|
||||
/* Make sure we have /dev/kmem open. */
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
# define funlockfile(fp) _IO_funlockfile (fp)
|
||||
#else
|
||||
# include "gettext.h"
|
||||
# define _(msgid) dgettext ("gnulib", msgid)
|
||||
# define _(msgid) dgettext (GNULIB_TEXT_DOMAIN, msgid)
|
||||
/* When used standalone, flockfile and funlockfile might not be
|
||||
available. */
|
||||
# if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \
|
||||
|
|
|
|||
|
|
@ -70,7 +70,12 @@
|
|||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wbuiltin-declaration-mismatch"
|
||||
# endif
|
||||
__attribute__ ((__always_inline__, __gnu_inline__)) extern inline
|
||||
# if __GNUC__ + (__GNUC_MINOR__ >= 2) > 4
|
||||
__attribute__ ((__always_inline__, __gnu_inline__))
|
||||
# else
|
||||
__attribute__ ((__always_inline__))
|
||||
# endif
|
||||
extern inline
|
||||
# if !defined(__sun)
|
||||
const
|
||||
# endif
|
||||
|
|
@ -79,7 +84,12 @@ gettext (const char *msgid)
|
|||
{
|
||||
return msgid;
|
||||
}
|
||||
__attribute__ ((__always_inline__, __gnu_inline__)) extern inline
|
||||
# if __GNUC__ + (__GNUC_MINOR__ >= 2) > 4
|
||||
__attribute__ ((__always_inline__, __gnu_inline__))
|
||||
# else
|
||||
__attribute__ ((__always_inline__))
|
||||
# endif
|
||||
extern inline
|
||||
# if !defined(__sun)
|
||||
const
|
||||
# endif
|
||||
|
|
@ -89,7 +99,12 @@ dgettext (const char *domain, const char *msgid)
|
|||
(void) domain;
|
||||
return msgid;
|
||||
}
|
||||
__attribute__ ((__always_inline__, __gnu_inline__)) extern inline
|
||||
# if __GNUC__ + (__GNUC_MINOR__ >= 2) > 4
|
||||
__attribute__ ((__always_inline__, __gnu_inline__))
|
||||
# else
|
||||
__attribute__ ((__always_inline__))
|
||||
# endif
|
||||
extern inline
|
||||
# if !defined(__sun)
|
||||
const
|
||||
# endif
|
||||
|
|
|
|||
|
|
@ -166,7 +166,9 @@
|
|||
# stdckdint-h \
|
||||
# stddef-h \
|
||||
# stdio-h \
|
||||
# stdio-windows \
|
||||
# stpcpy \
|
||||
# stringeq \
|
||||
# strnlen \
|
||||
# strtoimax \
|
||||
# symlink \
|
||||
|
|
@ -269,14 +271,8 @@ ECHO_N = @ECHO_N@
|
|||
ECHO_T = @ECHO_T@
|
||||
EMACSRES = @EMACSRES@
|
||||
EMACS_MANIFEST = @EMACS_MANIFEST@
|
||||
EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
|
||||
EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
|
||||
ENDIAN_H = @ENDIAN_H@
|
||||
ENDIAN_H_JUST_MISSING_STDINT = @ENDIAN_H_JUST_MISSING_STDINT@
|
||||
ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
|
||||
ENOLINK_VALUE = @ENOLINK_VALUE@
|
||||
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
||||
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
||||
ERRNO_H = @ERRNO_H@
|
||||
EUIDACCESS_LIBGEN = @EUIDACCESS_LIBGEN@
|
||||
EXECINFO_H = @EXECINFO_H@
|
||||
|
|
@ -301,6 +297,7 @@ GIF_CFLAGS = @GIF_CFLAGS@
|
|||
GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@
|
||||
GL_CFLAG_GNULIB_WARNINGS = @GL_CFLAG_GNULIB_WARNINGS@
|
||||
GL_COND_LIBTOOL_CONDITION = @GL_COND_LIBTOOL_CONDITION@
|
||||
GL_COND_OBJ_ACL_ENTRIES_CONDITION = @GL_COND_OBJ_ACL_ENTRIES_CONDITION@
|
||||
GL_COND_OBJ_CANONICALIZE_LGPL_CONDITION = @GL_COND_OBJ_CANONICALIZE_LGPL_CONDITION@
|
||||
GL_COND_OBJ_COPY_FILE_RANGE_CONDITION = @GL_COND_OBJ_COPY_FILE_RANGE_CONDITION@
|
||||
GL_COND_OBJ_DIRFD_CONDITION = @GL_COND_OBJ_DIRFD_CONDITION@
|
||||
|
|
@ -313,6 +310,7 @@ GL_COND_OBJ_FCNTL_CONDITION = @GL_COND_OBJ_FCNTL_CONDITION@
|
|||
GL_COND_OBJ_FDOPENDIR_CONDITION = @GL_COND_OBJ_FDOPENDIR_CONDITION@
|
||||
GL_COND_OBJ_FPENDING_CONDITION = @GL_COND_OBJ_FPENDING_CONDITION@
|
||||
GL_COND_OBJ_FREE_CONDITION = @GL_COND_OBJ_FREE_CONDITION@
|
||||
GL_COND_OBJ_FSETERR_CONDITION = @GL_COND_OBJ_FSETERR_CONDITION@
|
||||
GL_COND_OBJ_FSTATAT_CONDITION = @GL_COND_OBJ_FSTATAT_CONDITION@
|
||||
GL_COND_OBJ_FSUSAGE_CONDITION = @GL_COND_OBJ_FSUSAGE_CONDITION@
|
||||
GL_COND_OBJ_FSYNC_CONDITION = @GL_COND_OBJ_FSYNC_CONDITION@
|
||||
|
|
@ -344,6 +342,7 @@ GL_COND_OBJ_REALLOC_POSIX_CONDITION = @GL_COND_OBJ_REALLOC_POSIX_CONDITION@
|
|||
GL_COND_OBJ_REGEX_CONDITION = @GL_COND_OBJ_REGEX_CONDITION@
|
||||
GL_COND_OBJ_SIG2STR_CONDITION = @GL_COND_OBJ_SIG2STR_CONDITION@
|
||||
GL_COND_OBJ_SIGDESCR_NP_CONDITION = @GL_COND_OBJ_SIGDESCR_NP_CONDITION@
|
||||
GL_COND_OBJ_STDIO_CONSOLESAFE_CONDITION = @GL_COND_OBJ_STDIO_CONSOLESAFE_CONDITION@
|
||||
GL_COND_OBJ_STDIO_READ_CONDITION = @GL_COND_OBJ_STDIO_READ_CONDITION@
|
||||
GL_COND_OBJ_STDIO_WRITE_CONDITION = @GL_COND_OBJ_STDIO_WRITE_CONDITION@
|
||||
GL_COND_OBJ_STPCPY_CONDITION = @GL_COND_OBJ_STPCPY_CONDITION@
|
||||
|
|
@ -352,7 +351,6 @@ GL_COND_OBJ_STRTOIMAX_CONDITION = @GL_COND_OBJ_STRTOIMAX_CONDITION@
|
|||
GL_COND_OBJ_STRTOLL_CONDITION = @GL_COND_OBJ_STRTOLL_CONDITION@
|
||||
GL_COND_OBJ_SYMLINK_CONDITION = @GL_COND_OBJ_SYMLINK_CONDITION@
|
||||
GL_COND_OBJ_TIMEGM_CONDITION = @GL_COND_OBJ_TIMEGM_CONDITION@
|
||||
GL_COND_OBJ_TIME_RZ_CONDITION = @GL_COND_OBJ_TIME_RZ_CONDITION@
|
||||
GL_COND_OBJ_TIME_R_CONDITION = @GL_COND_OBJ_TIME_R_CONDITION@
|
||||
GL_COND_OBJ_UTIMENSAT_CONDITION = @GL_COND_OBJ_UTIMENSAT_CONDITION@
|
||||
GL_GENERATE_ALLOCA_H_CONDITION = @GL_GENERATE_ALLOCA_H_CONDITION@
|
||||
|
|
@ -559,6 +557,7 @@ GL_GNULIB_OBSTACK_PRINTF_POSIX = @GL_GNULIB_OBSTACK_PRINTF_POSIX@
|
|||
GL_GNULIB_OBSTACK_ZPRINTF = @GL_GNULIB_OBSTACK_ZPRINTF@
|
||||
GL_GNULIB_OPEN = @GL_GNULIB_OPEN@
|
||||
GL_GNULIB_OPENAT = @GL_GNULIB_OPENAT@
|
||||
GL_GNULIB_OPENAT2 = @GL_GNULIB_OPENAT2@
|
||||
GL_GNULIB_OPENDIR = @GL_GNULIB_OPENDIR@
|
||||
GL_GNULIB_OVERRIDES_STRUCT_STAT = @GL_GNULIB_OVERRIDES_STRUCT_STAT@
|
||||
GL_GNULIB_PCLOSE = @GL_GNULIB_PCLOSE@
|
||||
|
|
@ -629,6 +628,7 @@ GL_GNULIB_STRERRORNAME_NP = @GL_GNULIB_STRERRORNAME_NP@
|
|||
GL_GNULIB_STRERROR_L = @GL_GNULIB_STRERROR_L@
|
||||
GL_GNULIB_STRERROR_R = @GL_GNULIB_STRERROR_R@
|
||||
GL_GNULIB_STRFTIME = @GL_GNULIB_STRFTIME@
|
||||
GL_GNULIB_STRINGEQ = @GL_GNULIB_STRINGEQ@
|
||||
GL_GNULIB_STRNCAT = @GL_GNULIB_STRNCAT@
|
||||
GL_GNULIB_STRNDUP = @GL_GNULIB_STRNDUP@
|
||||
GL_GNULIB_STRNLEN = @GL_GNULIB_STRNLEN@
|
||||
|
|
@ -769,6 +769,7 @@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
|
|||
HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
|
||||
HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
|
||||
HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
|
||||
HAVE_DECL_MEMEQ = @HAVE_DECL_MEMEQ@
|
||||
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
|
||||
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
|
||||
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
|
||||
|
|
@ -780,6 +781,7 @@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
|
|||
HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
|
||||
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
|
||||
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
|
||||
HAVE_DECL_STREQ = @HAVE_DECL_STREQ@
|
||||
HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
|
||||
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
|
||||
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
|
||||
|
|
@ -862,6 +864,7 @@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
|
|||
HAVE_NATIVE_COMP = @HAVE_NATIVE_COMP@
|
||||
HAVE_OFF64_T = @HAVE_OFF64_T@
|
||||
HAVE_OPENAT = @HAVE_OPENAT@
|
||||
HAVE_OPENAT2 = @HAVE_OPENAT2@
|
||||
HAVE_OPENDIR = @HAVE_OPENDIR@
|
||||
HAVE_OS_H = @HAVE_OS_H@
|
||||
HAVE_PCLOSE = @HAVE_PCLOSE@
|
||||
|
|
@ -886,7 +889,6 @@ HAVE_PWRITE = @HAVE_PWRITE@
|
|||
HAVE_QSORT_R = @HAVE_QSORT_R@
|
||||
HAVE_RAISE = @HAVE_RAISE@
|
||||
HAVE_RANDOM = @HAVE_RANDOM@
|
||||
HAVE_RANDOM_H = @HAVE_RANDOM_H@
|
||||
HAVE_RANDOM_R = @HAVE_RANDOM_R@
|
||||
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
|
||||
HAVE_READDIR = @HAVE_READDIR@
|
||||
|
|
@ -1500,6 +1502,8 @@ gl_GNULIB_ENABLED_fd38c7e463b54744b77b98aeafb4fa7c_CONDITION = @gl_GNULIB_ENABLE
|
|||
gl_GNULIB_ENABLED_getdelim_CONDITION = @gl_GNULIB_ENABLED_getdelim_CONDITION@
|
||||
gl_GNULIB_ENABLED_getdtablesize_CONDITION = @gl_GNULIB_ENABLED_getdtablesize_CONDITION@
|
||||
gl_GNULIB_ENABLED_getgroups_CONDITION = @gl_GNULIB_ENABLED_getgroups_CONDITION@
|
||||
gl_GNULIB_ENABLED_issymlink_CONDITION = @gl_GNULIB_ENABLED_issymlink_CONDITION@
|
||||
gl_GNULIB_ENABLED_issymlinkat_CONDITION = @gl_GNULIB_ENABLED_issymlinkat_CONDITION@
|
||||
gl_GNULIB_ENABLED_lchmod_CONDITION = @gl_GNULIB_ENABLED_lchmod_CONDITION@
|
||||
gl_GNULIB_ENABLED_open_CONDITION = @gl_GNULIB_ENABLED_open_CONDITION@
|
||||
gl_GNULIB_ENABLED_rawmemchr_CONDITION = @gl_GNULIB_ENABLED_rawmemchr_CONDITION@
|
||||
|
|
@ -1587,10 +1591,11 @@ endif
|
|||
ifeq (,$(OMIT_GNULIB_MODULE_acl-permissions))
|
||||
|
||||
libgnu_a_SOURCES += acl-errno-valid.c acl-internal.c get-permissions.c set-permissions.c
|
||||
ifneq (,$(GL_COND_OBJ_ACL_ENTRIES_CONDITION))
|
||||
libgnu_a_SOURCES += acl_entries.c
|
||||
endif
|
||||
|
||||
EXTRA_DIST += acl-internal.h acl.h acl_entries.c
|
||||
|
||||
EXTRA_libgnu_a_SOURCES += acl_entries.c
|
||||
EXTRA_DIST += acl-internal.h acl.h
|
||||
|
||||
endif
|
||||
## end gnulib module acl-permissions
|
||||
|
|
@ -2015,12 +2020,6 @@ errno.h: errno.in.h $(top_builddir)/config.status
|
|||
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
|
||||
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
|
||||
-e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
|
||||
-e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
|
||||
-e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
|
||||
-e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
|
||||
-e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
|
||||
-e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
|
||||
-e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
|
||||
$(srcdir)/errno.in.h > $@-t
|
||||
$(AM_V_at)mv $@-t $@
|
||||
else
|
||||
|
|
@ -2129,10 +2128,12 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
|
|||
-e 's/@''GNULIB_NONBLOCKING''@/$(GL_GNULIB_NONBLOCKING)/g' \
|
||||
-e 's/@''GNULIB_OPEN''@/$(GL_GNULIB_OPEN)/g' \
|
||||
-e 's/@''GNULIB_OPENAT''@/$(GL_GNULIB_OPENAT)/g' \
|
||||
-e 's/@''GNULIB_OPENAT2''@/$(GL_GNULIB_OPENAT2)/g' \
|
||||
-e 's/@''GNULIB_MDA_CREAT''@/$(GL_GNULIB_MDA_CREAT)/g' \
|
||||
-e 's/@''GNULIB_MDA_OPEN''@/$(GL_GNULIB_MDA_OPEN)/g' \
|
||||
-e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
|
||||
-e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
|
||||
-e 's|@''HAVE_OPENAT2''@|$(HAVE_OPENAT2)|g' \
|
||||
-e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \
|
||||
-e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
|
||||
-e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
|
||||
|
|
@ -2231,6 +2232,18 @@ endif
|
|||
endif
|
||||
## end gnulib module free-posix
|
||||
|
||||
## begin gnulib module fseterr
|
||||
ifeq (,$(OMIT_GNULIB_MODULE_fseterr))
|
||||
|
||||
ifneq (,$(GL_COND_OBJ_FSETERR_CONDITION))
|
||||
libgnu_a_SOURCES += fseterr.c
|
||||
endif
|
||||
|
||||
EXTRA_DIST += fseterr.h stdio-impl.h
|
||||
|
||||
endif
|
||||
## end gnulib module fseterr
|
||||
|
||||
## begin gnulib module fstatat
|
||||
ifeq (,$(OMIT_GNULIB_MODULE_fstatat))
|
||||
|
||||
|
|
@ -2617,6 +2630,30 @@ EXTRA_DIST += inttypes.in.h
|
|||
endif
|
||||
## end gnulib module inttypes-h-incomplete
|
||||
|
||||
## begin gnulib module issymlink
|
||||
ifeq (,$(OMIT_GNULIB_MODULE_issymlink))
|
||||
|
||||
ifneq (,$(gl_GNULIB_ENABLED_issymlink_CONDITION))
|
||||
libgnu_a_SOURCES += issymlink.c
|
||||
|
||||
endif
|
||||
EXTRA_DIST += issymlink.h
|
||||
|
||||
endif
|
||||
## end gnulib module issymlink
|
||||
|
||||
## begin gnulib module issymlinkat
|
||||
ifeq (,$(OMIT_GNULIB_MODULE_issymlinkat))
|
||||
|
||||
ifneq (,$(gl_GNULIB_ENABLED_issymlinkat_CONDITION))
|
||||
libgnu_a_SOURCES += issymlinkat.c
|
||||
|
||||
endif
|
||||
EXTRA_DIST += issymlink.h
|
||||
|
||||
endif
|
||||
## end gnulib module issymlinkat
|
||||
|
||||
## begin gnulib module lchmod
|
||||
ifeq (,$(OMIT_GNULIB_MODULE_lchmod))
|
||||
|
||||
|
|
@ -3481,6 +3518,16 @@ EXTRA_DIST += stdio.in.h
|
|||
endif
|
||||
## end gnulib module stdio-h
|
||||
|
||||
## begin gnulib module stdio-windows
|
||||
ifeq (,$(OMIT_GNULIB_MODULE_stdio-windows))
|
||||
|
||||
ifneq (,$(GL_COND_OBJ_STDIO_CONSOLESAFE_CONDITION))
|
||||
libgnu_a_SOURCES += stdio-consolesafe.c
|
||||
endif
|
||||
|
||||
endif
|
||||
## end gnulib module stdio-windows
|
||||
|
||||
## begin gnulib module stdlib-h
|
||||
ifeq (,$(OMIT_GNULIB_MODULE_stdlib-h))
|
||||
|
||||
|
|
@ -3576,7 +3623,6 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
|
|||
-e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
|
||||
-e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
|
||||
-e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
|
||||
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
|
||||
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
|
||||
-e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \
|
||||
-e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
|
||||
|
|
@ -3708,6 +3754,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
|
|||
-e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \
|
||||
-e 's/@''GNULIB_STRCHRNUL''@/$(GL_GNULIB_STRCHRNUL)/g' \
|
||||
-e 's/@''GNULIB_STRDUP''@/$(GL_GNULIB_STRDUP)/g' \
|
||||
-e 's/@''GNULIB_STRINGEQ''@/$(GL_GNULIB_STRINGEQ)/g' \
|
||||
-e 's/@''GNULIB_STRNCAT''@/$(GL_GNULIB_STRNCAT)/g' \
|
||||
-e 's/@''GNULIB_STRNDUP''@/$(GL_GNULIB_STRNDUP)/g' \
|
||||
-e 's/@''GNULIB_STRNLEN''@/$(GL_GNULIB_STRNLEN)/g' \
|
||||
|
|
@ -3735,6 +3782,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
|
|||
-e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
|
||||
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
|
||||
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
|
||||
-e 's|@''HAVE_DECL_MEMEQ''@|$(HAVE_DECL_MEMEQ)|g' \
|
||||
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
|
||||
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
|
||||
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
|
||||
|
|
@ -3744,6 +3792,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
|
|||
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
|
||||
-e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
|
||||
-e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
|
||||
-e 's|@''HAVE_DECL_STREQ''@|$(HAVE_DECL_STREQ)|g' \
|
||||
-e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
|
||||
-e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
|
||||
-e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
|
||||
|
|
@ -3793,6 +3842,14 @@ EXTRA_DIST += string.in.h
|
|||
endif
|
||||
## end gnulib module string-h
|
||||
|
||||
## begin gnulib module stringeq
|
||||
ifeq (,$(OMIT_GNULIB_MODULE_stringeq))
|
||||
|
||||
libgnu_a_SOURCES += string.c
|
||||
|
||||
endif
|
||||
## end gnulib module stringeq
|
||||
|
||||
## begin gnulib module strnlen
|
||||
ifeq (,$(OMIT_GNULIB_MODULE_strnlen))
|
||||
|
||||
|
|
@ -4136,9 +4193,7 @@ endif
|
|||
## begin gnulib module time_rz
|
||||
ifeq (,$(OMIT_GNULIB_MODULE_time_rz))
|
||||
|
||||
ifneq (,$(GL_COND_OBJ_TIME_RZ_CONDITION))
|
||||
libgnu_a_SOURCES += time_rz.c
|
||||
endif
|
||||
|
||||
EXTRA_DIST += time-internal.h
|
||||
|
||||
|
|
|
|||
|
|
@ -29,10 +29,6 @@
|
|||
Do not evaluate E. */
|
||||
#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
|
||||
|
||||
/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
|
||||
<https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */
|
||||
#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v))
|
||||
|
||||
/* The extra casts in the following macros work around compiler bugs,
|
||||
e.g., in Cray C 5.0.3.0. */
|
||||
|
||||
|
|
@ -41,7 +37,7 @@
|
|||
|
||||
/* Return 1 if the real expression E, after promotion, has a
|
||||
signed or floating type. Do not evaluate E. */
|
||||
#define _GL_EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
|
||||
#define _GL_EXPR_SIGNED(e) (_GL_INT_CONVERT (e, -1) < 0)
|
||||
|
||||
|
||||
/* Minimum and maximum values for integer types and expressions. */
|
||||
|
|
@ -60,7 +56,7 @@
|
|||
#define _GL_INT_MAXIMUM(e) \
|
||||
(_GL_EXPR_SIGNED (e) \
|
||||
? _GL_SIGNED_INT_MAXIMUM (e) \
|
||||
: _GL_INT_NEGATE_CONVERT (e, 1))
|
||||
: _GL_INT_CONVERT (e, -1))
|
||||
#define _GL_SIGNED_INT_MAXIMUM(e) \
|
||||
(((_GL_INT_CONVERT (e, 1) << (_GL_TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1)
|
||||
|
||||
|
|
@ -112,7 +108,7 @@
|
|||
#elif defined __has_builtin
|
||||
# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
|
||||
/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
|
||||
see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>. */
|
||||
see <https://gcc.gnu.org/PR98269>. */
|
||||
#elif 7 <= __GNUC__
|
||||
# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
|
||||
#else
|
||||
|
|
@ -184,7 +180,7 @@
|
|||
#endif
|
||||
|
||||
/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
|
||||
https://gcc.gnu.org/PR68193
|
||||
https://llvm.org/bugs/show_bug.cgi?id=25390
|
||||
For now, assume GCC < 14 and all Clang versions generate bogus
|
||||
warnings for _Generic. This matters only for compilers that
|
||||
|
|
|
|||
|
|
@ -205,11 +205,11 @@
|
|||
|| INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
|
||||
#endif
|
||||
#define _GL_DIVIDE_OVERFLOW(a, b, min, max) \
|
||||
((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
|
||||
((min) < 0 ? (b) == _GL_INT_CONVERT (min, -1) && (a) < - (max) \
|
||||
: (a) < 0 ? (b) <= (a) + (b) - 1 \
|
||||
: (b) < 0 && (a) + (b) <= (a))
|
||||
#define _GL_REMAINDER_OVERFLOW(a, b, min, max) \
|
||||
((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
|
||||
((min) < 0 ? (b) == _GL_INT_CONVERT (min, -1) && (a) < - (max) \
|
||||
: (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \
|
||||
: (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max))
|
||||
|
||||
|
|
|
|||
20
lib/issymlink.c
Normal file
20
lib/issymlink.c
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* Test whether a file is a symbolic link.
|
||||
Copyright (C) 2025 Free Software Foundation, Inc.
|
||||
|
||||
This file is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation; either version 2.1 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This file is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#define _GL_ISSYMLINK_INLINE _GL_EXTERN_INLINE
|
||||
#include "issymlink.h"
|
||||
103
lib/issymlink.h
Normal file
103
lib/issymlink.h
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
/* Test whether a file is a symbolic link.
|
||||
Copyright (C) 2025 Free Software Foundation, Inc.
|
||||
|
||||
This file is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation; either version 2.1 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This file is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _ISSYMLINK_H
|
||||
#define _ISSYMLINK_H
|
||||
|
||||
/* This file uses _GL_ARG_NONNULL, _GL_INLINE. */
|
||||
#if !_GL_CONFIG_H_INCLUDED
|
||||
#error "Please include config.h first."
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h> /* for readlink, readlinkat */
|
||||
|
||||
|
||||
_GL_INLINE_HEADER_BEGIN
|
||||
|
||||
#ifndef _GL_ISSYMLINK_INLINE
|
||||
# define _GL_ISSYMLINK_INLINE _GL_INLINE
|
||||
#endif
|
||||
#ifndef _GL_ISSYMLINKAT_INLINE
|
||||
# define _GL_ISSYMLINKAT_INLINE _GL_INLINE
|
||||
#endif
|
||||
|
||||
#if GNULIB_ISSYMLINK
|
||||
/* Tests whether FILENAME represents a symbolic link.
|
||||
This function is more reliable than lstat() / fstatat() followed by S_ISLNK,
|
||||
because it avoids possible EOVERFLOW errors.
|
||||
Returns
|
||||
1 if FILENAME is a symbolic link,
|
||||
0 if FILENAME exists and is not a symbolic link,
|
||||
-1 with errno set if determination failed, in particular
|
||||
-1 with errno = ENOENT or ENOTDIR if FILENAME does not exist. */
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
_GL_ISSYMLINK_INLINE int issymlink (const char *filename)
|
||||
_GL_ARG_NONNULL ((1));
|
||||
_GL_ISSYMLINK_INLINE int
|
||||
issymlink (const char *filename)
|
||||
{
|
||||
char linkbuf[1];
|
||||
if (readlink (filename, linkbuf, sizeof (linkbuf)) >= 0)
|
||||
return 1;
|
||||
if (errno == EINVAL)
|
||||
return 0;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if GNULIB_ISSYMLINKAT
|
||||
/* Tests whether FILENAME represents a symbolic link.
|
||||
This function is more reliable than lstat() / fstatat() followed by S_ISLNK,
|
||||
because it avoids possible EOVERFLOW errors.
|
||||
If FILENAME is a relative file name, it is interpreted as relative to the
|
||||
directory referred to by FD (where FD = AT_FDCWD denotes the current
|
||||
directory).
|
||||
Returns
|
||||
1 if FILENAME is a symbolic link,
|
||||
0 if FILENAME exists and is not a symbolic link,
|
||||
-1 with errno set if determination failed, in particular
|
||||
-1 with errno = ENOENT or ENOTDIR if FILENAME does not exist. */
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
_GL_ISSYMLINKAT_INLINE int issymlinkat (int fd, const char *filename)
|
||||
_GL_ARG_NONNULL ((2));
|
||||
_GL_ISSYMLINKAT_INLINE int
|
||||
issymlinkat (int fd, const char *filename)
|
||||
{
|
||||
char linkbuf[1];
|
||||
if (readlinkat (fd, filename, linkbuf, sizeof (linkbuf)) >= 0)
|
||||
return 1;
|
||||
if (errno == EINVAL)
|
||||
return 0;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
_GL_INLINE_HEADER_END
|
||||
|
||||
#endif /* _ISSYMLINK_H */
|
||||
20
lib/issymlinkat.c
Normal file
20
lib/issymlinkat.c
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* Test whether a file is a symbolic link.
|
||||
Copyright (C) 2025 Free Software Foundation, Inc.
|
||||
|
||||
This file is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
This file is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#define _GL_ISSYMLINKAT_INLINE _GL_EXTERN_INLINE
|
||||
#include "issymlink.h"
|
||||
32
lib/lchmod.c
32
lib/lchmod.c
|
|
@ -29,6 +29,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include <intprops.h>
|
||||
#include "issymlink.h"
|
||||
|
||||
/* Work like chmod, except when FILE is a symbolic link.
|
||||
In that case, on systems where permissions on symbolic links are unsupported
|
||||
|
|
@ -37,29 +38,30 @@
|
|||
int
|
||||
lchmod (char const *file, mode_t mode)
|
||||
{
|
||||
char readlink_buf[1];
|
||||
|
||||
#ifdef O_PATH
|
||||
/* Open a file descriptor with O_NOFOLLOW, to make sure we don't
|
||||
follow symbolic links, if /proc is mounted. O_PATH is used to
|
||||
avoid a failure if the file is not readable.
|
||||
Cf. <https://sourceware.org/bugzilla/show_bug.cgi?id=14578> */
|
||||
Cf. <https://sourceware.org/PR14578> */
|
||||
int fd = open (file, O_PATH | O_NOFOLLOW | O_CLOEXEC);
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
int err;
|
||||
if (0 <= readlinkat (fd, "", readlink_buf, sizeof readlink_buf))
|
||||
err = EOPNOTSUPP;
|
||||
else if (errno == EINVAL)
|
||||
{
|
||||
static char const fmt[] = "/proc/self/fd/%d";
|
||||
char buf[sizeof fmt - sizeof "%d" + INT_BUFSIZE_BOUND (int)];
|
||||
sprintf (buf, fmt, fd);
|
||||
err = chmod (buf, mode) == 0 ? 0 : errno == ENOENT ? -1 : errno;
|
||||
}
|
||||
else
|
||||
err = errno == ENOENT ? -1 : errno;
|
||||
{
|
||||
int ret = issymlinkat (fd, "");
|
||||
if (ret > 0)
|
||||
err = EOPNOTSUPP;
|
||||
else if (ret == 0)
|
||||
{
|
||||
static char const fmt[] = "/proc/self/fd/%d";
|
||||
char buf[sizeof fmt - sizeof "%d" + INT_BUFSIZE_BOUND (int)];
|
||||
sprintf (buf, fmt, fd);
|
||||
err = chmod (buf, mode) == 0 ? 0 : errno == ENOENT ? -1 : errno;
|
||||
}
|
||||
else
|
||||
err = errno == ENOENT ? -1 : errno;
|
||||
}
|
||||
|
||||
close (fd);
|
||||
|
||||
|
|
@ -83,7 +85,7 @@ lchmod (char const *file, mode_t mode)
|
|||
|
||||
/* O_PATH + /proc is not supported. */
|
||||
|
||||
if (0 <= readlink (file, readlink_buf, sizeof readlink_buf))
|
||||
if (issymlink (file) > 0)
|
||||
{
|
||||
errno = EOPNOTSUPP;
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
#ifndef LLONG_MIN
|
||||
# if defined LONG_LONG_MIN /* HP-UX 11.31 */
|
||||
# define LLONG_MIN LONG_LONG_MIN
|
||||
# elif defined LONGLONG_MIN /* IRIX 6.5 */
|
||||
# elif defined LONGLONG_MIN /* AIX, BeOS */
|
||||
# define LLONG_MIN LONGLONG_MIN
|
||||
# elif defined __GNUC__
|
||||
# define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL)
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
#ifndef LLONG_MAX
|
||||
# if defined LONG_LONG_MAX /* HP-UX 11.31 */
|
||||
# define LLONG_MAX LONG_LONG_MAX
|
||||
# elif defined LONGLONG_MAX /* IRIX 6.5 */
|
||||
# elif defined LONGLONG_MAX /* AIX, BeOS */
|
||||
# define LLONG_MAX LONGLONG_MAX
|
||||
# elif defined __GNUC__
|
||||
# define LLONG_MAX __LONG_LONG_MAX__
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
#ifndef ULLONG_MAX
|
||||
# if defined ULONG_LONG_MAX /* HP-UX 11.31 */
|
||||
# define ULLONG_MAX ULONG_LONG_MAX
|
||||
# elif defined ULONGLONG_MAX /* IRIX 6.5 */
|
||||
# elif defined ULONGLONG_MAX /* AIX, BeOS */
|
||||
# define ULLONG_MAX ULONGLONG_MAX
|
||||
# elif defined __GNUC__
|
||||
# define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL)
|
||||
|
|
|
|||
|
|
@ -42,14 +42,7 @@ orig_lstat (const char *filename, struct stat *buf)
|
|||
}
|
||||
|
||||
/* Specification. */
|
||||
# ifdef __osf__
|
||||
/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
|
||||
eliminates this include because of the preliminary #include <sys/stat.h>
|
||||
above. */
|
||||
# include "sys/stat.h"
|
||||
# else
|
||||
# include <sys/stat.h>
|
||||
# endif
|
||||
# include <sys/stat.h>
|
||||
|
||||
# include "stat-time.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ md5_stream (FILE *stream, void *resblock)
|
|||
or the fread() in afalg_stream may have gotten EOF.
|
||||
We need to avoid a subsequent fread() as EOF may
|
||||
not be sticky. For details of such systems, see:
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=1190 */
|
||||
https://sourceware.org/PR1190 */
|
||||
if (feof (stream))
|
||||
goto process_partial_block;
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,11 @@ see https://www.gnu.org/licenses/. */
|
|||
|
||||
#include "mini-gmp.h"
|
||||
|
||||
#if !defined(MINI_GMP_DONT_USE_FLOAT_H)
|
||||
#ifndef MINI_GMP_ENABLE_FLOAT
|
||||
#define MINI_GMP_ENABLE_FLOAT 1
|
||||
#endif
|
||||
|
||||
#if MINI_GMP_ENABLE_FLOAT
|
||||
#include <float.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -1705,6 +1709,7 @@ mpz_roinit_n (mpz_t x, mp_srcptr xp, mp_size_t xs)
|
|||
}
|
||||
|
||||
|
||||
#if MINI_GMP_ENABLE_FLOAT
|
||||
/* Conversions and comparison to double. */
|
||||
void
|
||||
mpz_set_d (mpz_t r, double x)
|
||||
|
|
@ -1861,6 +1866,7 @@ mpz_cmp_d (const mpz_t x, double d)
|
|||
return mpz_cmpabs_d (x, d);
|
||||
}
|
||||
}
|
||||
#endif /* MINI_GMP_ENABLE_FLOAT */
|
||||
|
||||
|
||||
/* MPZ comparisons and the like. */
|
||||
|
|
@ -4515,6 +4521,11 @@ mpz_import (mpz_t r, size_t count, int order, size_t size, int endian,
|
|||
assert (order == 1 || order == -1);
|
||||
assert (endian >= -1 && endian <= 1);
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
r->_mp_size = 0;
|
||||
return;
|
||||
}
|
||||
if (endian == 0)
|
||||
endian = gmp_detect_endian ();
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@
|
|||
#define _MINMAX_H
|
||||
|
||||
/* Note: MIN, MAX are also defined in <sys/param.h> on some systems
|
||||
(glibc, IRIX, HP-UX, OSF/1). Therefore you might get warnings about
|
||||
MIN, MAX macro redefinitions on some systems; the workaround is to
|
||||
(glibc, HP-UX). Therefore you might get warnings about MIN, MAX
|
||||
macro redefinitions on some systems; the workaround is to
|
||||
#include this file as the last one among the #include list. */
|
||||
|
||||
/* This file uses HAVE_MINMAX_IN_LIMITS_H, HAVE_MINMAX_IN_SYS_PARAM_H. */
|
||||
|
|
|
|||
223
lib/nproc.c
223
lib/nproc.c
|
|
@ -22,7 +22,12 @@
|
|||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#if HAVE_SETMNTENT
|
||||
# include <mntent.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if HAVE_PTHREAD_GETAFFINITY_NP && 0
|
||||
|
|
@ -39,10 +44,6 @@
|
|||
# include <sys/pstat.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_SYSMP_H
|
||||
# include <sys/sysmp.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
|
@ -62,6 +63,8 @@
|
|||
|
||||
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
|
||||
|
||||
#define NPROC_MINIMUM 1
|
||||
|
||||
/* Return the number of processors available to the current process, based
|
||||
on a modern system call that returns the "affinity" between the current
|
||||
process and each CPU. Return 0 if unknown or if such a system call does
|
||||
|
|
@ -244,7 +247,7 @@ num_processors_via_affinity_mask (void)
|
|||
/* Return the total number of processors. Here QUERY must be one of
|
||||
NPROC_ALL, NPROC_CURRENT. The result is guaranteed to be at least 1. */
|
||||
static unsigned long int
|
||||
num_processors_ignoring_omp (enum nproc_query query)
|
||||
num_processors_available (enum nproc_query query)
|
||||
{
|
||||
/* On systems with a modern affinity mask system call, we have
|
||||
sysconf (_SC_NPROCESSORS_CONF)
|
||||
|
|
@ -258,7 +261,7 @@ num_processors_ignoring_omp (enum nproc_query query)
|
|||
the /sys and /proc file systems (see
|
||||
glibc/sysdeps/unix/sysv/linux/getsysstats.c).
|
||||
In some situations these file systems are not mounted, and the sysconf call
|
||||
returns 1 or 2 (<https://sourceware.org/bugzilla/show_bug.cgi?id=21542>),
|
||||
returns 1 or 2 (<https://sourceware.org/PR21542>),
|
||||
which does not reflect the reality. */
|
||||
|
||||
if (query == NPROC_CURRENT)
|
||||
|
|
@ -272,8 +275,8 @@ num_processors_ignoring_omp (enum nproc_query query)
|
|||
}
|
||||
|
||||
#if defined _SC_NPROCESSORS_ONLN
|
||||
{ /* This works on glibc, Mac OS X 10.5, FreeBSD, AIX, OSF/1, Solaris,
|
||||
Cygwin, Haiku. */
|
||||
{ /* This works on glibc, Mac OS X 10.5, FreeBSD, AIX, Solaris, Cygwin,
|
||||
Haiku. */
|
||||
long int nprocs = sysconf (_SC_NPROCESSORS_ONLN);
|
||||
if (nprocs > 0)
|
||||
return nprocs;
|
||||
|
|
@ -283,8 +286,8 @@ num_processors_ignoring_omp (enum nproc_query query)
|
|||
else /* query == NPROC_ALL */
|
||||
{
|
||||
#if defined _SC_NPROCESSORS_CONF
|
||||
{ /* This works on glibc, Mac OS X 10.5, FreeBSD, AIX, OSF/1, Solaris,
|
||||
Cygwin, Haiku. */
|
||||
{ /* This works on glibc, Mac OS X 10.5, FreeBSD, AIX, Solaris, Cygwin,
|
||||
Haiku. */
|
||||
long int nprocs = sysconf (_SC_NPROCESSORS_CONF);
|
||||
|
||||
# if __GLIBC__ >= 2 && defined __linux__
|
||||
|
|
@ -330,20 +333,6 @@ num_processors_ignoring_omp (enum nproc_query query)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_SYSMP && defined MP_NAPROCS && defined MP_NPROCS
|
||||
{ /* This works on IRIX. */
|
||||
/* MP_NPROCS yields the number of installed processors.
|
||||
MP_NAPROCS yields the number of processors available to unprivileged
|
||||
processes. */
|
||||
int nprocs =
|
||||
sysmp (query == NPROC_CURRENT && getuid () != 0
|
||||
? MP_NAPROCS
|
||||
: MP_NPROCS);
|
||||
if (nprocs > 0)
|
||||
return nprocs;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Finally, as fallback, use the APIs that don't distinguish between
|
||||
NPROC_CURRENT and NPROC_ALL. */
|
||||
|
||||
|
|
@ -377,7 +366,159 @@ num_processors_ignoring_omp (enum nproc_query query)
|
|||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
return NPROC_MINIMUM;
|
||||
}
|
||||
|
||||
#if defined __linux__ || defined __ANDROID__
|
||||
/* Identify the cgroup2 mount point,
|
||||
initially at the usual location for efficiency,
|
||||
resorting to searching mount points otherwise.
|
||||
Return NULL if the mount point is not found.
|
||||
The returned string can be freed. */
|
||||
static char *
|
||||
cgroup2_mount (void)
|
||||
{
|
||||
FILE *fp;
|
||||
char *ret = NULL;
|
||||
|
||||
/* Check the usual location first. */
|
||||
if (access ("/sys/fs/cgroup/cgroup.controllers", F_OK) == 0)
|
||||
return strdup ("/sys/fs/cgroup");
|
||||
|
||||
#if HAVE_SETMNTENT
|
||||
/* Otherwise look for the mount point. */
|
||||
struct mntent *mnt;
|
||||
if (! (fp = setmntent ("/proc/mounts", "r")))
|
||||
return NULL;
|
||||
while ((mnt = getmntent (fp)) != NULL)
|
||||
{
|
||||
if (streq (mnt->mnt_type, "cgroup2"))
|
||||
{
|
||||
ret = strdup (mnt->mnt_dir);
|
||||
break;
|
||||
}
|
||||
}
|
||||
endmntent (fp);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Return the minimum configured cgroupv2 CPU quota for the current process.
|
||||
Return ULONG_MAX if quota can't be read.
|
||||
Returned value will be >= 1. */
|
||||
static unsigned long int
|
||||
get_cgroup2_cpu_quota (void)
|
||||
{
|
||||
unsigned long int cpu_quota = ULONG_MAX;
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen ("/proc/self/cgroup", "r");
|
||||
if (! fp)
|
||||
return cpu_quota;
|
||||
|
||||
/* Get our cgroupv2 (unififed) hierarchy. */
|
||||
char *cgroup = NULL;
|
||||
char *cgroup_str = NULL;
|
||||
size_t cgroup_size = 0;
|
||||
ssize_t read;
|
||||
while ((read = getline (&cgroup_str, &cgroup_size, fp)) != -1)
|
||||
{
|
||||
if (strncmp (cgroup_str, "0::/", 4) == 0)
|
||||
{
|
||||
char *end = cgroup_str + read - 1;
|
||||
if (*end == '\n')
|
||||
*end = '\0';
|
||||
cgroup = cgroup_str + 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
fclose (fp);
|
||||
|
||||
char *mount = NULL;
|
||||
if (cgroup && ! (mount = cgroup2_mount ()))
|
||||
cgroup = NULL;
|
||||
|
||||
/* Find the lowest quota in the hierarchy. */
|
||||
char *quota_str = NULL;
|
||||
size_t quota_size = 0;
|
||||
while (cgroup && *cgroup)
|
||||
{
|
||||
/* Walk back up the nested cgroup hierarchy
|
||||
to find the lowest cpu quota as defined in a cpu.max file.
|
||||
Note this file may not be present if the cpu controller
|
||||
is not enabled for that part of the hierarchy. */
|
||||
|
||||
char cpu_max_file[PATH_MAX];
|
||||
snprintf (cpu_max_file, sizeof (cpu_max_file),
|
||||
"%s%s/cpu.max", mount, cgroup);
|
||||
|
||||
if ((fp = fopen (cpu_max_file, "r"))
|
||||
&& getline ("a_str, "a_size, fp) != -1
|
||||
&& strncmp (quota_str, "max", 3) != 0)
|
||||
{
|
||||
long quota, period;
|
||||
if (sscanf (quota_str, "%ld %ld", "a, &period) == 2 && period)
|
||||
{
|
||||
double ncpus = (double)quota / period;
|
||||
if (cpu_quota == ULONG_MAX || ncpus < cpu_quota)
|
||||
{
|
||||
cpu_quota = MAX (1, (long)(ncpus + 0.5));
|
||||
/* nproc will return 1 minimum, so no point going lower */
|
||||
if (cpu_quota == 1)
|
||||
*cgroup = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fp)
|
||||
fclose (fp);
|
||||
|
||||
char *last_sep = strrchr (cgroup, '/');
|
||||
if (! last_sep)
|
||||
break;
|
||||
if (last_sep == cgroup && *(cgroup + 1))
|
||||
*(cgroup + 1) = '\0'; /* Iterate on "/" also. */
|
||||
else
|
||||
*last_sep = '\0';
|
||||
}
|
||||
|
||||
free (quota_str);
|
||||
free (mount);
|
||||
free (cgroup_str);
|
||||
|
||||
return cpu_quota;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Return the cgroupv2 CPU quota if the current scheduler honors it.
|
||||
Otherwise return ULONG_MAX.
|
||||
Returned value will be >= 1. */
|
||||
static unsigned long int
|
||||
cpu_quota (void)
|
||||
{
|
||||
unsigned long int quota = ULONG_MAX;
|
||||
|
||||
#if defined __linux__ || defined __ANDROID__
|
||||
# if HAVE_SCHED_GETAFFINITY_LIKE_GLIBC && defined SCHED_DEADLINE
|
||||
/* We've a new enough sched.h */
|
||||
switch (sched_getscheduler (0))
|
||||
{
|
||||
case -1:
|
||||
case SCHED_FIFO:
|
||||
case SCHED_RR:
|
||||
case SCHED_DEADLINE:
|
||||
quota = ULONG_MAX;
|
||||
break;
|
||||
default:
|
||||
quota = get_cgroup2_cpu_quota ();
|
||||
break;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
return quota;
|
||||
}
|
||||
|
||||
/* Parse OMP environment variables without dependence on OMP.
|
||||
|
|
@ -416,13 +557,13 @@ parse_omp_threads (char const* threads)
|
|||
unsigned long int
|
||||
num_processors (enum nproc_query query)
|
||||
{
|
||||
unsigned long int omp_env_limit = ULONG_MAX;
|
||||
unsigned long int nproc_limit = ULONG_MAX;
|
||||
|
||||
/* Honor the OpenMP environment variables, recognized also by all
|
||||
programs that are based on OpenMP. */
|
||||
if (query == NPROC_CURRENT_OVERRIDABLE)
|
||||
{
|
||||
unsigned long int omp_env_threads;
|
||||
/* Honor the OpenMP environment variables, recognized also by all
|
||||
programs that are based on OpenMP. */
|
||||
unsigned long int omp_env_threads, omp_env_limit;
|
||||
omp_env_threads = parse_omp_threads (getenv ("OMP_NUM_THREADS"));
|
||||
omp_env_limit = parse_omp_threads (getenv ("OMP_THREAD_LIMIT"));
|
||||
if (! omp_env_limit)
|
||||
|
|
@ -431,14 +572,22 @@ num_processors (enum nproc_query query)
|
|||
if (omp_env_threads)
|
||||
return MIN (omp_env_threads, omp_env_limit);
|
||||
|
||||
nproc_limit = omp_env_limit;
|
||||
query = NPROC_CURRENT;
|
||||
}
|
||||
/* Here query is one of NPROC_ALL, NPROC_CURRENT. */
|
||||
if (omp_env_limit == 1)
|
||||
/* No need to even call num_processors_ignoring_omp (query). */
|
||||
return 1;
|
||||
{
|
||||
unsigned long nprocs = num_processors_ignoring_omp (query);
|
||||
return MIN (nprocs, omp_env_limit);
|
||||
}
|
||||
|
||||
/* Honor any CPU quotas. */
|
||||
if (query == NPROC_CURRENT && nproc_limit > NPROC_MINIMUM)
|
||||
{
|
||||
unsigned long int quota = cpu_quota ();
|
||||
nproc_limit = MIN (quota, nproc_limit);
|
||||
}
|
||||
|
||||
if (nproc_limit > NPROC_MINIMUM)
|
||||
{
|
||||
unsigned long nprocs = num_processors_available (query);
|
||||
nproc_limit = MIN (nprocs, nproc_limit);
|
||||
}
|
||||
|
||||
return nproc_limit;
|
||||
}
|
||||
|
|
|
|||
10
lib/open.c
10
lib/open.c
|
|
@ -38,13 +38,7 @@ orig_open (const char *filename, int flags, mode_t mode)
|
|||
}
|
||||
|
||||
/* Specification. */
|
||||
#ifdef __osf__
|
||||
/* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc eliminates
|
||||
this include because of the preliminary #include <fcntl.h> above. */
|
||||
# include "fcntl.h"
|
||||
#else
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "cloexec.h"
|
||||
|
||||
|
|
@ -100,7 +94,7 @@ open (const char *filename, int flags, ...)
|
|||
#endif
|
||||
|
||||
#if defined _WIN32 && ! defined __CYGWIN__
|
||||
if (strcmp (filename, "/dev/null") == 0)
|
||||
if (streq (filename, "/dev/null"))
|
||||
filename = "NUL";
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -26,10 +26,6 @@
|
|||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#if PTHREAD_SIGMASK_UNBLOCK_BUG
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
int
|
||||
pthread_sigmask (int how, const sigset_t *new_mask, sigset_t *old_mask)
|
||||
#undef pthread_sigmask
|
||||
|
|
@ -58,7 +54,7 @@ pthread_sigmask (int how, const sigset_t *new_mask, sigset_t *old_mask)
|
|||
Don't cache the information: libpthread.so could be dynamically
|
||||
loaded after the program started and after pthread_sigmask was
|
||||
called for the first time. */
|
||||
if (memcmp (&omask_copy, &omask, sizeof omask) == 0
|
||||
if (memeq (&omask_copy, &omask, sizeof omask)
|
||||
&& pthread_sigmask (1729, &omask_copy, NULL) == 0)
|
||||
{
|
||||
/* pthread_sigmask is currently ineffective. The program is not
|
||||
|
|
@ -73,16 +69,6 @@ pthread_sigmask (int how, const sigset_t *new_mask, sigset_t *old_mask)
|
|||
# if PTHREAD_SIGMASK_FAILS_WITH_ERRNO
|
||||
if (ret == -1)
|
||||
return errno;
|
||||
# endif
|
||||
# if PTHREAD_SIGMASK_UNBLOCK_BUG
|
||||
if (ret == 0
|
||||
&& new_mask != NULL
|
||||
&& (how == SIG_UNBLOCK || how == SIG_SETMASK))
|
||||
{
|
||||
/* Give the OS the opportunity to raise signals that were pending before
|
||||
the pthread_sigmask call and have now been unblocked. */
|
||||
usleep (1);
|
||||
}
|
||||
# endif
|
||||
return ret;
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ is_attr_permissions (const char *name, struct error_context *ctx)
|
|||
{
|
||||
/* We need to explicitly test for the known extended attribute names,
|
||||
because at least on CentOS 7, attr_copy_action does not do it. */
|
||||
return strcmp (name, XATTR_NAME_POSIX_ACL_ACCESS) == 0
|
||||
|| strcmp (name, XATTR_NAME_POSIX_ACL_DEFAULT) == 0
|
||||
|| strcmp (name, XATTR_NAME_NFSV4_ACL) == 0
|
||||
return streq (name, XATTR_NAME_POSIX_ACL_ACCESS)
|
||||
|| streq (name, XATTR_NAME_POSIX_ACL_DEFAULT)
|
||||
|| streq (name, XATTR_NAME_NFSV4_ACL)
|
||||
|| attr_copy_action (name, ctx) == ATTR_ACTION_PERMISSIONS;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -115,19 +115,19 @@ enum { UT_HOST_SIZE = -1 };
|
|||
|
||||
Field Type Platforms
|
||||
---------- ------ ---------
|
||||
⎡ ut_user char[] glibc, musl, macOS, FreeBSD, AIX, HP-UX, IRIX, Solaris, Cygwin, Android
|
||||
⎡ ut_user char[] glibc, musl, macOS, FreeBSD, AIX, HP-UX, Solaris, Cygwin, Android
|
||||
⎣ ut_name char[] NetBSD, Minix
|
||||
ut_id char[] glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, HP-UX, IRIX, Solaris, Cygwin, Android
|
||||
ut_line char[] glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, HP-UX, IRIX, Solaris, Cygwin, Android
|
||||
ut_pid pid_t glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, HP-UX, IRIX, Solaris, Cygwin, Android
|
||||
ut_type short glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, HP-UX, IRIX, Solaris, Cygwin, Android
|
||||
⎡ ut_tv struct glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, HP-UX, IRIX, Solaris, Cygwin, Android
|
||||
ut_id char[] glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, HP-UX, Solaris, Cygwin, Android
|
||||
ut_line char[] glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, HP-UX, Solaris, Cygwin, Android
|
||||
ut_pid pid_t glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, HP-UX, Solaris, Cygwin, Android
|
||||
ut_type short glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, HP-UX, Solaris, Cygwin, Android
|
||||
⎡ ut_tv struct glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, HP-UX, Solaris, Cygwin, Android
|
||||
⎢ { tv_sec; tv_usec; }
|
||||
⎣ ut_time time_t Cygwin
|
||||
ut_host char[] glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, HP-UX, IRIX, Solaris, Cygwin, Android
|
||||
ut_exit struct glibc, musl, NetBSD, Minix, HP-UX, IRIX, Solaris, Android
|
||||
ut_host char[] glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, HP-UX, Solaris, Cygwin, Android
|
||||
ut_exit struct glibc, musl, NetBSD, Minix, HP-UX, Solaris, Android
|
||||
{ e_termination; e_exit; }
|
||||
ut_session [long] int glibc, musl, NetBSD, Minix, IRIX, Solaris, Android
|
||||
ut_session [long] int glibc, musl, NetBSD, Minix, Solaris, Android
|
||||
⎡ ut_addr [long] int HP-UX, Cygwin
|
||||
⎢ ut_addr_v6 [u]int[4] glibc, musl, Android
|
||||
⎣ ut_ss struct sockaddr_storage NetBSD, Minix
|
||||
|
|
@ -174,7 +174,7 @@ struct utmpx32
|
|||
# define SET_UTMP_ENT setutxent
|
||||
# define GET_UTMP_ENT getutxent
|
||||
# define END_UTMP_ENT endutxent
|
||||
# ifdef HAVE_UTMPXNAME /* glibc, musl, macOS, NetBSD, Minix, IRIX, Solaris, Cygwin */
|
||||
# ifdef HAVE_UTMPXNAME /* glibc, musl, macOS, NetBSD, Minix, Solaris, Cygwin */
|
||||
# define UTMP_NAME_FUNCTION utmpxname
|
||||
# elif defined UTXDB_ACTIVE /* FreeBSD */
|
||||
# define UTMP_NAME_FUNCTION(x) setutxdb (UTXDB_ACTIVE, x)
|
||||
|
|
@ -190,17 +190,17 @@ struct utmpx32
|
|||
|
||||
Field Type Platforms
|
||||
---------- ------ ---------
|
||||
⎡ ut_user char[] glibc, musl, AIX, HP-UX, IRIX, Solaris, Cygwin, Android
|
||||
⎡ ut_user char[] glibc, musl, AIX, HP-UX, Solaris, Cygwin, Android
|
||||
⎣ ut_name char[] macOS, old FreeBSD, NetBSD, OpenBSD, Minix
|
||||
ut_id char[] glibc, musl, AIX, HP-UX, IRIX, Solaris, Cygwin, Android
|
||||
ut_line char[] glibc, musl, macOS, old FreeBSD, NetBSD, OpenBSD, Minix, AIX, HP-UX, IRIX, Solaris, Cygwin, Android
|
||||
ut_pid pid_t glibc, musl, AIX, HP-UX, IRIX, Solaris, Cygwin, Android
|
||||
ut_type short glibc, musl, AIX, HP-UX, IRIX, Solaris, Cygwin, Android
|
||||
ut_id char[] glibc, musl, AIX, HP-UX, Solaris, Cygwin, Android
|
||||
ut_line char[] glibc, musl, macOS, old FreeBSD, NetBSD, OpenBSD, Minix, AIX, HP-UX, Solaris, Cygwin, Android
|
||||
ut_pid pid_t glibc, musl, AIX, HP-UX, Solaris, Cygwin, Android
|
||||
ut_type short glibc, musl, AIX, HP-UX, Solaris, Cygwin, Android
|
||||
⎡ ut_tv struct glibc, musl, Android
|
||||
⎢ { tv_sec; tv_usec; }
|
||||
⎣ ut_time time_t macOS, old FreeBSD, NetBSD, OpenBSD, Minix, AIX, HP-UX, IRIX, Solaris, Cygwin
|
||||
⎣ ut_time time_t macOS, old FreeBSD, NetBSD, OpenBSD, Minix, AIX, HP-UX, Solaris, Cygwin
|
||||
ut_host char[] glibc, musl, macOS, old FreeBSD, NetBSD, OpenBSD, Minix, AIX, HP-UX, Cygwin, Android
|
||||
ut_exit struct glibc, musl, AIX, HP-UX, IRIX, Solaris, Android
|
||||
ut_exit struct glibc, musl, AIX, HP-UX, Solaris, Android
|
||||
{ e_termination; e_exit; }
|
||||
ut_session [long] int glibc, musl, Android
|
||||
⎡ ut_addr [long] int HP-UX, Cygwin
|
||||
|
|
@ -211,7 +211,7 @@ struct utmpx32
|
|||
# define SET_UTMP_ENT setutent
|
||||
# define GET_UTMP_ENT getutent
|
||||
# define END_UTMP_ENT endutent
|
||||
# ifdef HAVE_UTMPNAME /* glibc, musl, NetBSD, Minix, AIX, HP-UX, IRIX, Solaris, Cygwin, Android */
|
||||
# ifdef HAVE_UTMPNAME /* glibc, musl, NetBSD, Minix, AIX, HP-UX, Solaris, Cygwin, Android */
|
||||
# define UTMP_NAME_FUNCTION utmpname
|
||||
# endif
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ rpl_realloc (void *p, size_t n)
|
|||
undefined behavior even though C17 and earlier partially defined
|
||||
the behavior. Let the programmer know.
|
||||
When the undefined-behaviour sanitizers report this case, i.e. when
|
||||
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117233> and
|
||||
<https://gcc.gnu.org/PR117233> and
|
||||
<https://github.com/llvm/llvm-project/issues/113065>
|
||||
have been closed and new releases of GCC and clang have been made,
|
||||
we can revisit this code. */
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
# if __GNUC_PREREQ (4, 6)
|
||||
# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
|
||||
# pragma GCC diagnostic ignored "-Wswitch-enum"
|
||||
# pragma GCC diagnostic ignored "-Wvla"
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -98,24 +98,14 @@
|
|||
#endif
|
||||
|
||||
/* This is for other GNU distributions with internationalized messages. */
|
||||
#if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
|
||||
#ifdef _LIBC
|
||||
# include <libintl.h>
|
||||
# undef gettext
|
||||
# ifdef _LIBC
|
||||
# define gettext(msgid) \
|
||||
# define gettext(msgid) \
|
||||
__dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
|
||||
# else
|
||||
# define gettext(msgid) dgettext ("gnulib", msgid)
|
||||
# endif
|
||||
#else
|
||||
# undef gettext
|
||||
# define gettext(msgid) (msgid)
|
||||
#endif
|
||||
|
||||
#ifndef gettext_noop
|
||||
/* This define is so xgettext can find the internationalizable
|
||||
strings. */
|
||||
# define gettext_noop(String) String
|
||||
#else
|
||||
# include "gettext.h"
|
||||
#endif
|
||||
|
||||
/* Number of ASCII characters. */
|
||||
|
|
|
|||
|
|
@ -25,17 +25,13 @@
|
|||
#include "minmax.h"
|
||||
|
||||
#if USE_ACL
|
||||
# if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, IRIX, Tru64, Cygwin >= 2.5 */
|
||||
# if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, Cygwin >= 2.5 */
|
||||
# if HAVE_ACL_GET_FILE && !HAVE_ACL_TYPE_EXTENDED
|
||||
|
||||
static acl_t
|
||||
acl_from_mode (mode_t mode)
|
||||
{
|
||||
# if HAVE_ACL_FREE_TEXT /* Tru64 */
|
||||
char acl_text[] = "u::---,g::---,o::---,";
|
||||
# else /* FreeBSD, IRIX, Cygwin >= 2.5 */
|
||||
char acl_text[] = "u::---,g::---,o::---";
|
||||
# endif
|
||||
|
||||
if (mode & S_IRUSR) acl_text[ 3] = 'r';
|
||||
if (mode & S_IWUSR) acl_text[ 4] = 'w';
|
||||
|
|
@ -490,9 +486,9 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
|
|||
|
||||
# if HAVE_ACL_GET_FILE
|
||||
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
|
||||
/* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
|
||||
/* Linux, FreeBSD, Mac OS X, Cygwin >= 2.5 */
|
||||
# if !HAVE_ACL_TYPE_EXTENDED
|
||||
/* Linux, FreeBSD, IRIX, Tru64, Cygwin >= 2.5 */
|
||||
/* Linux, FreeBSD, Cygwin >= 2.5 */
|
||||
|
||||
# ifndef HAVE_ACL_FROM_TEXT
|
||||
# error Must have acl_from_text (see POSIX 1003.1e draft 17).
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ str2signum (char const *signame)
|
|||
{
|
||||
unsigned int i;
|
||||
for (i = 0; i < NUMNAME_ENTRIES; i++)
|
||||
if (strcmp (numname_table[i].name, signame) == 0)
|
||||
if (streq (numname_table[i].name, signame))
|
||||
return numname_table[i].num;
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
const char *
|
||||
sigdescr_np (int sig)
|
||||
{
|
||||
/* Note: Some platforms (glibc, FreeBSD, NetBSD, OpenBSD, AIX, IRIX, Haiku,
|
||||
/* Note: Some platforms (glibc, FreeBSD, NetBSD, OpenBSD, AIX, Haiku,
|
||||
Android) have an array 'sys_siglist'. (On AIX, you need to declare it
|
||||
yourself, and it has fewer than NSIG elements.) Its contents varies
|
||||
depending on the OS.
|
||||
|
|
@ -160,12 +160,7 @@ sigdescr_np (int sig)
|
|||
case SIGBREAK:
|
||||
return "Ctrl-Break";
|
||||
#endif
|
||||
/* IRIX */
|
||||
#if defined SIGCKPT
|
||||
case SIGCKPT:
|
||||
return "Checkpoint"; /* See man 1 cpr, man 3C atcheckpoint */
|
||||
#endif
|
||||
/* Linux, IRIX, Cygwin */
|
||||
/* Linux, Cygwin */
|
||||
#if defined SIGCLD && SIGCLD != SIGCHLD
|
||||
case SIGCLD:
|
||||
return "Child stopped or exited";
|
||||
|
|
@ -182,7 +177,7 @@ sigdescr_np (int sig)
|
|||
/* AIX: "Paging space low". */
|
||||
return "Swap space nearly exhausted";
|
||||
#endif
|
||||
/* Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, AIX, IRIX, Cygwin, mingw */
|
||||
/* Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, AIX, Cygwin, mingw */
|
||||
#if defined SIGEMT
|
||||
case SIGEMT:
|
||||
/* glibc/Hurd, *BSD: "EMT trap". Solaris: "Emulation trap". */
|
||||
|
|
@ -193,12 +188,12 @@ sigdescr_np (int sig)
|
|||
case SIGINFO:
|
||||
return "Information request";
|
||||
#endif
|
||||
/* Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, AIX, IRIX, Cygwin */
|
||||
/* Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, AIX, Cygwin */
|
||||
#if defined SIGIO && SIGIO != SIGPOLL
|
||||
case SIGIO:
|
||||
return "I/O possible";
|
||||
#endif
|
||||
/* Linux, IRIX, Cygwin, mingw */
|
||||
/* Linux, Cygwin, mingw */
|
||||
#if defined SIGIOT && SIGIOT != SIGABRT
|
||||
case SIGIOT:
|
||||
return "IOT instruction"; /* a PDP-11 instruction */
|
||||
|
|
@ -267,17 +262,7 @@ sigdescr_np (int sig)
|
|||
case SIGPRE:
|
||||
return "Programmed exception";
|
||||
#endif
|
||||
/* IRIX */
|
||||
#if defined SIGPTINTR
|
||||
case SIGPTINTR:
|
||||
return "Pthread interrupt";
|
||||
#endif
|
||||
/* IRIX */
|
||||
#if defined SIGPTRESCHED
|
||||
case SIGPTRESCHED:
|
||||
return "Pthread rescheduling";
|
||||
#endif
|
||||
/* Linux, NetBSD, Minix, AIX, IRIX, Cygwin */
|
||||
/* Linux, NetBSD, Minix, AIX, Cygwin */
|
||||
#if defined SIGPWR
|
||||
case SIGPWR:
|
||||
/* glibc: "Power failure". NetBSD: "Power fail/restart". */
|
||||
|
|
@ -293,11 +278,6 @@ sigdescr_np (int sig)
|
|||
case SIGRECOVERY:
|
||||
return "Kernel recovery";
|
||||
#endif
|
||||
/* IRIX */
|
||||
#if defined SIGRESTART
|
||||
case SIGRESTART:
|
||||
return "Checkpoint restart"; /* See man 1 cpr, man 3C atrestart */
|
||||
#endif
|
||||
/* AIX */
|
||||
#if defined SIGRETRACT
|
||||
case SIGRETRACT:
|
||||
|
|
@ -347,11 +327,6 @@ sigdescr_np (int sig)
|
|||
/* OpenBSD: "Thread AST". */
|
||||
return "Thread library interrupt";
|
||||
#endif
|
||||
/* IRIX */
|
||||
#if defined SIGUME
|
||||
case SIGUME:
|
||||
return "Uncorrectable memory error";
|
||||
#endif
|
||||
/* AIX */
|
||||
#if defined SIGVIRT
|
||||
case SIGVIRT:
|
||||
|
|
@ -363,7 +338,7 @@ sigdescr_np (int sig)
|
|||
/* AIX: "No runnable lwp". */
|
||||
return "Thread waiting";
|
||||
#endif
|
||||
/* Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, AIX, IRIX, Cygwin, Haiku */
|
||||
/* Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, AIX, Cygwin, Haiku */
|
||||
#if defined SIGWINCH
|
||||
case SIGWINCH:
|
||||
/* glibc: "Window changed". *BSD: "Window size changed" or "Window size changes". */
|
||||
|
|
|
|||
|
|
@ -66,14 +66,14 @@
|
|||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
/* Mac OS X 10.3, FreeBSD < 8.0, OpenBSD < 5.1, OSF/1 4.0, Solaris 2.6, Android,
|
||||
/* Mac OS X 10.3, FreeBSD < 8.0, OpenBSD < 5.1, Solaris 2.6, Android,
|
||||
OS/2 kLIBC declare pthread_sigmask in <pthread.h>, not in <signal.h>.
|
||||
But avoid namespace pollution on glibc systems.*/
|
||||
#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
|
||||
&& ((defined __APPLE__ && defined __MACH__) \
|
||||
|| (defined __FreeBSD__ && __FreeBSD__ < 8) \
|
||||
|| (defined __OpenBSD__ && OpenBSD < 201205) \
|
||||
|| defined __osf__ || defined __sun || defined __ANDROID__ \
|
||||
|| defined __sun || defined __ANDROID__ \
|
||||
|| defined __KLIBC__) \
|
||||
&& ! defined __GLIBC__
|
||||
# include <pthread.h>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
|| defined __need_wint_t) \
|
||||
/* Avoid warning triggered by "gcc -std=gnu23 -Wsystem-headers" \
|
||||
in GCC 13.3 and 14.2 \
|
||||
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114870>. */ \
|
||||
<https://gcc.gnu.org/PR114870>. */ \
|
||||
&& !@STDDEF_NOT_IDEMPOTENT@
|
||||
/* Special invocation convention inside gcc header files. In
|
||||
particular, <stddef.h> in some ancient versions of GCC blindly
|
||||
|
|
@ -91,7 +91,7 @@ typedef long max_align_t;
|
|||
|
||||
# if !defined _GCC_NULLPTR_T && !@NULLPTR_T_NEEDS_STDDEF@
|
||||
/* Suppress unwanted nullptr_t typedef. See
|
||||
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114869>. */
|
||||
<https://gcc.gnu.org/PR114869>. */
|
||||
# define _GCC_NULLPTR_T
|
||||
# endif
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue