Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
This commit is contained in:
commit
b302a551ab
193 changed files with 6675 additions and 1827 deletions
19
Makefile.in
19
Makefile.in
|
@ -841,12 +841,11 @@ mostlyclean: $(mostlyclean_dirs:=_mostlyclean)
|
|||
### with them.
|
||||
###
|
||||
### Delete '.dvi' files here if they are not part of the distribution.
|
||||
clean_dirs = $(mostlyclean_dirs) nextstep
|
||||
clean_dirs = $(mostlyclean_dirs) nextstep admin/charsets admin/unidata
|
||||
|
||||
$(foreach dir,$(clean_dirs),$(eval $(call submake_template,$(dir),clean)))
|
||||
|
||||
clean: $(clean_dirs:=_clean) clean-gsettings-schemas
|
||||
$(MAKE) -C admin/charsets $@
|
||||
[ ! -d test ] || $(MAKE) -C test $@
|
||||
-rm -f ./*.tmp etc/*.tmp*
|
||||
-rm -rf info-dir.*
|
||||
|
@ -867,16 +866,11 @@ top_distclean=\
|
|||
rm -f config.status config.log~ \
|
||||
Makefile makefile lib/gnulib.mk ${SUBDIR_MAKEFILES}
|
||||
|
||||
distclean_dirs = $(clean_dirs) leim lisp
|
||||
distclean_dirs = $(clean_dirs) leim lisp admin/grammars
|
||||
|
||||
$(foreach dir,$(distclean_dirs),$(eval $(call submake_template,$(dir),distclean)))
|
||||
|
||||
maybeclean_dirs = test admin/grammars admin/unidata admin/charsets
|
||||
|
||||
distclean: $(distclean_dirs:=_distclean)
|
||||
for dir in $(filter-out test,$(maybeclean_dirs)); do \
|
||||
$(MAKE) -C $$dir $@ || exit; \
|
||||
done
|
||||
[ ! -d test ] || $(MAKE) -C test $@
|
||||
${top_distclean}
|
||||
|
||||
|
@ -886,9 +880,6 @@ distclean: $(distclean_dirs:=_distclean)
|
|||
$(foreach dir,$(distclean_dirs),$(eval $(call submake_template,$(dir),bootstrap-clean)))
|
||||
|
||||
bootstrap-clean: $(distclean_dirs:=_bootstrap-clean)
|
||||
for dir in $(filter-out test,$(maybeclean_dirs)); do \
|
||||
$(MAKE) -C $$dir $@ || exit; \
|
||||
done
|
||||
[ ! -d test ] || $(MAKE) -C test $@
|
||||
[ ! -f config.log ] || mv -f config.log config.log~
|
||||
rm -rf ${srcdir}/info
|
||||
|
@ -910,14 +901,12 @@ top_maintainer_clean=\
|
|||
${top_distclean}; \
|
||||
rm -fr autom4te.cache
|
||||
|
||||
maintainer_clean_dirs = src leim lisp
|
||||
maintainer_clean_dirs = src leim lisp admin/charsets admin/grammars \
|
||||
admin/unidata
|
||||
|
||||
$(foreach dir,$(maintainer_clean_dirs),$(eval $(call submake_template,$(dir),maintainer-clean)))
|
||||
|
||||
maintainer-clean: bootstrap-clean $(maintainer_clean_dirs:=_maintainer-clean)
|
||||
for dir in $(filter-out test,$(maybeclean_dirs)); do \
|
||||
$(MAKE) -C $$dir $@ || exit; \
|
||||
done
|
||||
[ ! -d test ] || $(MAKE) -C test $@
|
||||
${top_maintainer_clean}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ BEGIN {
|
|||
JISX0208_FROM2 = "/xf5/xa1";
|
||||
JISX0212_FROM = "/x8f/xf3/xf3";
|
||||
|
||||
print ";;; eucjp-ms.el -- translation table for eucJP-ms -*- lexical-binding:t -*-";
|
||||
print ";;; eucjp-ms.el --- translation table for eucJP-ms -*- lexical-binding:t -*-";
|
||||
print ";;; Automatically generated from /usr/share/i18n/charmaps/EUC-JP-MS.gz";
|
||||
print "(let ((map";
|
||||
print " '(;JISEXT<->UNICODE";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; mule-charsets.el -- Generate Mule-original charset maps. -*- lexical-binding: t -*-
|
||||
;;; mule-charsets.el --- Generate Mule-original charset maps. -*- lexical-binding: t -*-
|
||||
;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
|
||||
;; National Institute of Advanced Industrial Science and Technology (AIST)
|
||||
;; Registration Number H13PRO009
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; unidata-gen.el -- Create files containing character property data -*- lexical-binding:t -*-
|
||||
;;; unidata-gen.el --- Create files containing character property data -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1446,7 +1446,7 @@ Property value is a symbol `o' (Open), `c' (Close), or `n' (None)."
|
|||
";; no-byte-compile: t\n"
|
||||
";; no-update-autoloads: t\n"
|
||||
";; End:\n\n"
|
||||
(format ";; %s ends here\n" basename)))))
|
||||
(format ";;; %s ends here\n" basename)))))
|
||||
(or noninteractive (message "Generating %s...done" file)))
|
||||
|
||||
(defun unidata-gen-charprop (&optional charprop-file)
|
||||
|
@ -1470,7 +1470,7 @@ Property value is a symbol `o' (Open), `c' (Close), or `n' (None)."
|
|||
";; no-byte-compile: t\n"
|
||||
";; no-update-autoloads: t\n"
|
||||
";; End:\n\n"
|
||||
(format ";; %s ends here\n"
|
||||
(format ";;; %s ends here\n"
|
||||
(file-name-nondirectory charprop-file)))))
|
||||
|
||||
|
||||
|
|
|
@ -5639,6 +5639,13 @@ case "$opsys" in
|
|||
x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x400000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
|
||||
*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
|
||||
esac
|
||||
## If they want unexec, disable Windows ASLR for the Emacs binary
|
||||
if test "$with_dumping" = "unexec"; then
|
||||
case "$canonical" in
|
||||
x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -Wl,-disable-dynamicbase -Wl,-disable-high-entropy-va -Wl,-default-image-base-low" ;;
|
||||
*) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -Wl,-disable-dynamicbase" ;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
|
||||
*) LD_SWITCH_SYSTEM_TEMACS= ;;
|
||||
|
|
|
@ -2213,7 +2213,8 @@ the special XREF mode:
|
|||
@table @kbd
|
||||
@item @key{RET}
|
||||
@itemx mouse-2
|
||||
Display the reference on the current line.
|
||||
Display the reference on the current line (@code{xref-goto-xref}).
|
||||
With prefix argument, also bury the @file{*xref*} buffer.
|
||||
|
||||
@item n
|
||||
@itemx .
|
||||
|
@ -2242,11 +2243,6 @@ display it in the other window (@code{xref-prev-group}).
|
|||
Display the reference on the current line in the other window
|
||||
(@code{xref-show-location-at-point}).
|
||||
|
||||
@item @key{TAB}
|
||||
@findex xref-quit-and-goto-xref
|
||||
Display the reference on the current line and bury the @file{*xref*}
|
||||
buffer (@code{xref-quit-and-goto-xref}).
|
||||
|
||||
@item r @var{pattern} @key{RET} @var{replacement} @key{RET}
|
||||
Perform interactive query-replace on references that match
|
||||
@var{pattern} (@code{xref-query-replace-in-results}), replacing
|
||||
|
|
|
@ -247,6 +247,9 @@ You might need also to enable @code{minibuffer-depth-indicate-mode}
|
|||
to show the current recursion depth in the minibuffer prompt
|
||||
on recursive use of the minibuffer.
|
||||
|
||||
When active, the minibuffer is usually in @code{minibuffer-mode}.
|
||||
This is an internal Emacs mode without any special features.
|
||||
|
||||
@findex minibuffer-inactive-mode
|
||||
When not active, the minibuffer is in @code{minibuffer-inactive-mode},
|
||||
and clicking @kbd{mouse-1} there shows the @file{*Messages*} buffer.
|
||||
|
|
|
@ -480,13 +480,15 @@ in expressions ordinarily.
|
|||
|
||||
Another problem can happen if the macro definition itself
|
||||
evaluates any of the macro argument expressions, such as by calling
|
||||
@code{eval} (@pxref{Eval}). If the argument is supposed to refer to the
|
||||
user's variables, you may have trouble if the user happens to use a
|
||||
@code{eval} (@pxref{Eval}). You have to take into account that the
|
||||
context of the caller is not accessible at that time since the macro expansion
|
||||
may take place long before the code is executed. Also if your macro definition
|
||||
does not use @code{lexical-binding} its own variables may hide the
|
||||
user's variables, if the user happens to use a
|
||||
variable with the same name as one of the macro arguments. Inside the
|
||||
macro body, the macro argument binding is the most local binding of this
|
||||
variable, so any references inside the form being evaluated do refer to
|
||||
it. Here is an example:
|
||||
|
||||
@example
|
||||
@group
|
||||
(defmacro foo (a)
|
||||
|
@ -508,12 +510,10 @@ it. Here is an example:
|
|||
@code{x}, because @code{a} conflicts with the macro argument variable
|
||||
@code{a}.
|
||||
|
||||
Another problem with calling @code{eval} in a macro definition is that
|
||||
it probably won't do what you intend in a compiled program. The
|
||||
byte compiler runs macro definitions while compiling the program, when
|
||||
the program's own computations (which you might have wished to access
|
||||
with @code{eval}) don't occur and its local variable bindings don't
|
||||
exist.
|
||||
Also the expansion of @code{(foo x)} above will return something
|
||||
different or signal an error when the code is compiled since in that case
|
||||
@code{(foo x)} is expanded during compilation whereas the execution of
|
||||
@code{(setq x 'b)} will only take place later when the code is executed.
|
||||
|
||||
To avoid these problems, @strong{don't evaluate an argument expression
|
||||
while computing the macro expansion}. Instead, substitute the
|
||||
|
|
|
@ -97,6 +97,14 @@ to be done. @xref{Text from Minibuffer}, for the non-completion
|
|||
minibuffer local maps. @xref{Completion Commands}, for the minibuffer
|
||||
local maps for completion.
|
||||
|
||||
@cindex active minibuffer
|
||||
An active minibuffer usually has major mode @code{minibuffer-mode}.
|
||||
This is an Emacs internal mode without any special features. To
|
||||
customize the setup of minibuffers, we suggest you use
|
||||
@code{minibuffer-setup-hook} (@pxref{Minibuffer Misc}) rather than
|
||||
@code{minibuffer-mode-hook}, since the former is run later, after the
|
||||
minibuffer has been fully initialized.
|
||||
|
||||
@cindex inactive minibuffer
|
||||
When a minibuffer is inactive, its major mode is
|
||||
@code{minibuffer-inactive-mode}, with keymap
|
||||
|
@ -167,8 +175,10 @@ various applications such as completion.
|
|||
|
||||
The argument @var{history} specifies a history list variable to use
|
||||
for saving the input and for history commands used in the minibuffer.
|
||||
It defaults to @code{minibuffer-history}. You can optionally specify
|
||||
a starting position in the history list as well. @xref{Minibuffer History}.
|
||||
It defaults to @code{minibuffer-history}. If @var{history} is the
|
||||
symbol @code{t}, history is not recorded. You can optionally specify
|
||||
a starting position in the history list as well. @xref{Minibuffer
|
||||
History}.
|
||||
|
||||
If the variable @code{minibuffer-allow-text-properties} is
|
||||
non-@code{nil}, then the string that is returned includes whatever text
|
||||
|
@ -970,16 +980,19 @@ and @var{suffix} holds the text after point.
|
|||
|
||||
Normally completion operates on the whole string, so for all normal
|
||||
collections, this will always return @code{(0 . (length
|
||||
@var{suffix}))}. But more complex completion such as completion on
|
||||
files is done one field at a time. For example, completion of
|
||||
@var{suffix}))}. But more complex completion, such as completion on
|
||||
files, is done one field at a time. For example, completion of
|
||||
@code{"/usr/sh"} will include @code{"/usr/share/"} but not
|
||||
@code{"/usr/share/doc"} even if @code{"/usr/share/doc"} exists.
|
||||
Also @code{all-completions} on @code{"/usr/sh"} will not include
|
||||
@code{"/usr/share/"} but only @code{"share/"}. So if @var{string} is
|
||||
@code{"/usr/sh"} and @var{suffix} is @code{"e/doc"},
|
||||
@code{completion-boundaries} will return @code{(5 . 1)} which tells us
|
||||
@code{completion-boundaries} will return @w{@code{(5 . 1)}} which tells us
|
||||
that the @var{collection} will only return completion information that
|
||||
pertains to the area after @code{"/usr/"} and before @code{"/doc"}.
|
||||
@code{try-completion} is not affected by nontrivial boundaries; e.g.,
|
||||
@code{try-completion} on @code{"/usr/sh"} might still return
|
||||
@code{"/usr/share/"}, not @code{"share/"}.
|
||||
@end defun
|
||||
|
||||
If you store a completion alist in a variable, you should mark the
|
||||
|
@ -1107,9 +1120,10 @@ The function @code{completing-read} uses
|
|||
@code{minibuffer-local-must-match-map} if @var{require-match} is
|
||||
non-@code{nil}. @xref{Completion Commands}.
|
||||
|
||||
The argument @var{history} specifies which history list variable to use for
|
||||
saving the input and for minibuffer history commands. It defaults to
|
||||
@code{minibuffer-history}. @xref{Minibuffer History}.
|
||||
The argument @var{history} specifies which history list variable to
|
||||
use for saving the input and for minibuffer history commands. It
|
||||
defaults to @code{minibuffer-history}. If @var{history} is the symbol
|
||||
@code{t}, history is not recorded. @xref{Minibuffer History}.
|
||||
|
||||
The argument @var{initial} is mostly deprecated; we recommend using a
|
||||
non-@code{nil} value only in conjunction with specifying a cons cell
|
||||
|
@ -1883,6 +1897,13 @@ should return @code{(boundaries @var{start} . @var{end})}, where
|
|||
string, and @var{end} is the position of the end boundary in
|
||||
@var{suffix}.
|
||||
|
||||
If a Lisp program returns nontrivial boundaries, it should make sure that the
|
||||
@code{all-completions} operation is consistent with them. The
|
||||
completions returned by @code{all-completions} should only pertain to
|
||||
the piece of the prefix and suffix covered by the completion
|
||||
boundaries. @xref{Basic Completion}, for the precise expected semantics
|
||||
of completion boundaries.
|
||||
|
||||
@item metadata
|
||||
This specifies a request for information about the state of the
|
||||
current completion. The return value should have the form
|
||||
|
@ -1961,7 +1982,7 @@ was entered.
|
|||
The return value of @code{completion-table-dynamic} is a function that
|
||||
can be used as the 2nd argument to @code{try-completion} and
|
||||
@code{all-completions}. Note that this function will always return
|
||||
empty metadata and trivial boundaries (@pxref{Programmed Completion}).
|
||||
empty metadata and trivial boundaries.
|
||||
@end defun
|
||||
|
||||
@defun completion-table-with-cache function &optional ignore-case
|
||||
|
|
|
@ -301,7 +301,7 @@ character, and returns that character. If @var{char} is neither
|
|||
@end defun
|
||||
|
||||
@defun unibyte-char-to-multibyte char
|
||||
This convert the unibyte character @var{char} to a multibyte
|
||||
This converts the unibyte character @var{char} to a multibyte
|
||||
character, assuming @var{char} is either @acronym{ASCII} or raw 8-bit
|
||||
byte.
|
||||
@end defun
|
||||
|
@ -676,7 +676,7 @@ This function returns the value of @var{char}'s @var{propname} property.
|
|||
@end group
|
||||
@group
|
||||
(get-char-code-property ?\( 'paired-bracket)
|
||||
@result{} 41 ;; closing parenthesis
|
||||
@result{} 41 ; closing parenthesis
|
||||
@end group
|
||||
@group
|
||||
(get-char-code-property ?\) 'bracket-type)
|
||||
|
@ -955,13 +955,13 @@ translating the result.
|
|||
|
||||
@defvar standard-translation-table-for-decode
|
||||
This is the default translation table for decoding. If a coding
|
||||
systems specifies its own translation tables, the table that is the
|
||||
system specifies its own translation tables, the table that is the
|
||||
value of this variable, if non-@code{nil}, is applied after them.
|
||||
@end defvar
|
||||
|
||||
@defvar standard-translation-table-for-encode
|
||||
This is the default translation table for encoding. If a coding
|
||||
systems specifies its own translation tables, the table that is the
|
||||
system specifies its own translation tables, the table that is the
|
||||
value of this variable, if non-@code{nil}, is applied after them.
|
||||
@end defvar
|
||||
|
||||
|
@ -1258,7 +1258,7 @@ name or @code{nil}.
|
|||
@defun check-coding-system coding-system
|
||||
This function checks the validity of @var{coding-system}. If that is
|
||||
valid, it returns @var{coding-system}. If @var{coding-system} is
|
||||
@code{nil}, the function return @code{nil}. For any other values, it
|
||||
@code{nil}, the function returns @code{nil}. For any other values, it
|
||||
signals an error whose @code{error-symbol} is @code{coding-system-error}
|
||||
(@pxref{Signaling Errors, signal}).
|
||||
@end defun
|
||||
|
|
|
@ -5877,7 +5877,7 @@ which window parameters (if any) are saved by this function.
|
|||
@xref{Window Parameters}.
|
||||
@end defun
|
||||
|
||||
@defun set-window-configuration configuration &optional dont-set-frame
|
||||
@defun set-window-configuration configuration &optional dont-set-frame dont-set-miniwindow
|
||||
This function restores the configuration of windows and buffers as
|
||||
specified by @var{configuration}, for the frame that
|
||||
@var{configuration} was created for, regardless of whether that frame
|
||||
|
@ -5885,8 +5885,12 @@ is selected or not. The argument @var{configuration} must be a value
|
|||
that was previously returned by @code{current-window-configuration}
|
||||
for that frame. Normally the function also selects the frame which is
|
||||
recorded in the configuration, but if @var{dont-set-frame} is
|
||||
non-@code{nil}, it leaves selected the frame which was current at the
|
||||
start of the function.
|
||||
non-@code{nil}, it leaves selected the frame which was already
|
||||
selected at the start of the function.
|
||||
|
||||
Normally the function restores the saved minibuffer (if any), but if
|
||||
@var{dont-set-miniwindow} is non-@code{nil}, the minibuffer current
|
||||
at the start of the function (if any) remains in the mini-window.
|
||||
|
||||
If the frame from which @var{configuration} was saved is dead, all
|
||||
this function does is to restore the value of the variable
|
||||
|
|
|
@ -514,15 +514,82 @@ Non-interactively, it takes the following keyword arguments.
|
|||
|
||||
That is, if called with the following arguments, @var{server} and
|
||||
@var{full-name} will be set to those values, whereas
|
||||
@code{erc-compute-port}, @code{erc-compute-nick} and
|
||||
@code{erc-compute-full-name} will be invoked for the values of the other
|
||||
parameters.
|
||||
@code{erc-compute-port} and @code{erc-compute-nick} will be invoked
|
||||
for the values of the other parameters.
|
||||
|
||||
@example
|
||||
(erc :server "chat.freenode.net" :full-name "Harry S Truman")
|
||||
@end example
|
||||
@end defun
|
||||
|
||||
To connect securely over an encrypted TLS connection, use @kbd{M-x
|
||||
erc-tls}.
|
||||
|
||||
@defun erc-tls
|
||||
Select connection parameters and run ERC over TLS@.
|
||||
Non-interactively, it takes the following keyword arguments.
|
||||
|
||||
@itemize @bullet
|
||||
@item @var{server}
|
||||
@item @var{port}
|
||||
@item @var{nick}
|
||||
@item @var{password}
|
||||
@item @var{full-name}
|
||||
@item @var{client-certificate}
|
||||
@end itemize
|
||||
|
||||
That is, if called with the following arguments, @var{server} and
|
||||
@var{full-name} will be set to those values, whereas
|
||||
@code{erc-compute-port} and @code{erc-compute-nick} will be invoked
|
||||
for the values of the other parameters, and @code{client-certificate}
|
||||
will be @code{nil}.
|
||||
|
||||
@example
|
||||
(erc-tls :server "chat.freenode.net" :full-name "Harry S Truman")
|
||||
@end example
|
||||
|
||||
To use a certificate with @code{erc-tls}, specify the optional
|
||||
@var{client-certificate} keyword argument, whose value should be as
|
||||
described in the documentation of @code{open-network-stream}: if
|
||||
non-@code{nil}, it should either be a list where the first element is
|
||||
the file name of the private key corresponding to a client certificate
|
||||
and the second element is the file name of the client certificate
|
||||
itself to use when connecting over TLS, or @code{t}, which means that
|
||||
@code{auth-source} will be queried for the private key and the
|
||||
certificate. Authenticating using a TLS client certificate is also
|
||||
refered to as ``CertFP'' (Certificate Fingerprint) authentication by
|
||||
various IRC networks.
|
||||
|
||||
Examples of use:
|
||||
|
||||
@example
|
||||
(erc-tls :server "chat.freenode.net" :port 6697
|
||||
:client-certificate
|
||||
'("/home/bandali/my-cert.key"
|
||||
"/home/bandali/my-cert.crt"))
|
||||
@end example
|
||||
|
||||
@example
|
||||
(erc-tls :server "chat.freenode.net" :port 6697
|
||||
:client-certificate
|
||||
`(,(expand-file-name "~/cert-freenode.key")
|
||||
,(expand-file-name "~/cert-freenode.crt")))
|
||||
@end example
|
||||
|
||||
@example
|
||||
(erc-tls :server "chat.freenode.net" :port 6697
|
||||
:client-certificate t)
|
||||
@end example
|
||||
|
||||
In the case of @code{:client-certificate t}, you will need to add a
|
||||
line like the following to your authinfo file
|
||||
(e.g. @file{~/.authinfo.gpg}):
|
||||
|
||||
@example
|
||||
machine chat.freenode.net key /home/bandali/my-cert.key cert /home/bandali/my-cert.crt
|
||||
@end example
|
||||
@end defun
|
||||
|
||||
@subheading Server
|
||||
|
||||
@defun erc-compute-server &optional server
|
||||
|
|
|
@ -17966,7 +17966,7 @@ This creates a group including all flagged messages from all groups on
|
|||
two IMAP servers, "home" and "work".
|
||||
|
||||
And one last example. Here is a function that runs a search query to
|
||||
find all message that have been received recently from certain groups:
|
||||
find all messages that have been received recently from certain groups:
|
||||
|
||||
@lisp
|
||||
(defun my-recent-email (args)
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
#+language: en
|
||||
#+options: ':t toc:nil author:t email:t
|
||||
|
||||
#+macro: stable-version 1.2.3
|
||||
#+macro: release-date 2021-03-05
|
||||
#+macro: development-version 1.3.0-dev
|
||||
#+macro: stable-version 1.3.2
|
||||
#+macro: release-date 2021-04-18
|
||||
#+macro: development-version 1.4.0-dev
|
||||
#+macro: export-date (eval (format-time-string "%F %R %z" (current-time)))
|
||||
#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
|
||||
#+macro: space @@texinfo:@: @@
|
||||
|
@ -46,11 +46,15 @@ built on {{{export-date}}}.
|
|||
Copyright (C) 2020-2021 Free Software Foundation, Inc.
|
||||
|
||||
#+begin_quote
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU Free Documentation License,
|
||||
Version 1.3 or any later version published by the Free Software
|
||||
Foundation; with no Invariant Sections, with no Front-Cover Texts,
|
||||
and with no Back-Cover Texts.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and
|
||||
with the Back-Cover Texts as in (a) below. A copy of the license is
|
||||
included in the section entitled “GNU Free Documentation License.”
|
||||
|
||||
(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and
|
||||
modify this GNU manual.”
|
||||
#+end_quote
|
||||
|
||||
* Overview
|
||||
|
@ -141,7 +145,7 @@ The themes are now ready to be used: [[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][
|
|||
:custom_id: h:c4b10085-149f-43e2-bd4d-347f33aee054
|
||||
:end:
|
||||
|
||||
The =modus-themes= package is available from the GNU ELPA archive, which
|
||||
The ~modus-themes~ package is available from the GNU ELPA archive, which
|
||||
is configured by default.
|
||||
|
||||
Prior to querying any package archive, make sure to have updated the
|
||||
|
@ -287,7 +291,8 @@ package configurations in their setup. We use this as an example:
|
|||
:init
|
||||
;; Add all your customizations prior to loading the themes
|
||||
(setq modus-themes-slanted-constructs t
|
||||
modus-themes-bold-constructs nil)
|
||||
modus-themes-bold-constructs nil
|
||||
modus-themes-region 'no-extend)
|
||||
|
||||
;; Load the theme files before enabling a theme (else you get an error).
|
||||
(modus-themes-load-themes)
|
||||
|
@ -374,13 +379,13 @@ Symbol: ~modus-themes-bold-constructs~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
2. =t=
|
||||
1. ~nil~ (default)
|
||||
2. ~t~
|
||||
|
||||
The default is to use a bold typographic weight only when it is
|
||||
required.
|
||||
|
||||
With a non-nil value (=t=) display several syntactic constructs in bold
|
||||
With a non-nil value (~t~) display several syntactic constructs in bold
|
||||
weight. This concerns keywords and other important aspects of code
|
||||
syntax. It also affects certain mode line indicators and command-line
|
||||
prompts.
|
||||
|
@ -397,13 +402,13 @@ Symbol: ~modus-themes-slanted-constructs~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
2. =t=
|
||||
1. ~nil~ (default)
|
||||
2. ~t~
|
||||
|
||||
The default is to not use slanted text (italics) unless it is absolutely
|
||||
necessary.
|
||||
|
||||
With a non-nil value (=t=) choose to render more faces in slanted text.
|
||||
With a non-nil value (~t~) choose to render more faces in slanted text.
|
||||
This typically affects documentation strings and code comments.
|
||||
|
||||
** Option for syntax highlighting
|
||||
|
@ -418,7 +423,7 @@ Symbol: ~modus-themes-syntax~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
1. ~nil~ (default)
|
||||
2. ~faint~
|
||||
3. ~yellow-comments~
|
||||
4. ~green-strings~
|
||||
|
@ -467,8 +472,8 @@ Symbol: ~modus-themes-no-mixed-fonts~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
2. =t=
|
||||
1. ~nil~ (default)
|
||||
2. ~t~
|
||||
|
||||
By default, the themes configure some spacing-sensitive faces like Org
|
||||
tables and code blocks to always inherit from the ~fixed-pitch~ face.
|
||||
|
@ -476,14 +481,14 @@ This is to ensure that those constructs remain monospaced even when
|
|||
users opt for a mode that remaps typeface families, such as the built-in
|
||||
{{{kbd(M-x variable-pitch-mode)}}}. Otherwise the layout would appear
|
||||
broken, due to how spacing is done. To disable this behaviour, set the
|
||||
option to =t=.
|
||||
option to ~t~.
|
||||
|
||||
Users may prefer to use another package for handling mixed typeface
|
||||
configurations, rather than letting the theme do it, perhaps because a
|
||||
purpose-specific package has extra functionality. Two possible options
|
||||
are ~org-variable-pitch~ and ~mixed-pitch~.
|
||||
|
||||
[[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org (and others)]].
|
||||
[[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org and others]].
|
||||
|
||||
** Option for links
|
||||
:properties:
|
||||
|
@ -497,7 +502,7 @@ Symbol: ~modus-themes-links~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
1. ~nil~ (default)
|
||||
2. ~faint~
|
||||
3. ~neutral-underline~
|
||||
4. ~faint-neutral-underline~
|
||||
|
@ -545,7 +550,7 @@ Symbol: ~modus-themes-prompts~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
1. ~nil~ (default)
|
||||
2. ~subtle-accented~ (~subtle~ exists for backward compatibility)
|
||||
3. ~intense-accented~ (~intense~ exists for backward compatibility)
|
||||
4. ~subtle-gray~
|
||||
|
@ -577,12 +582,15 @@ Symbol: ~modus-themes-mode-line~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
1. ~nil~ (default)
|
||||
2. ~3d~
|
||||
3. ~moody~
|
||||
4. ~borderless~
|
||||
5. ~borderless-3d~
|
||||
6. ~borderless-moody~
|
||||
7. ~accented~
|
||||
8. ~accented-3d~
|
||||
9. ~accented-moody~
|
||||
|
||||
The default produces a two-dimensional effect both for the active and
|
||||
inactive modelines. The differences between the two are limited to
|
||||
|
@ -612,6 +620,11 @@ that the inactive modelines remain visible, they apply a slightly more
|
|||
prominent background to them than what their counterparts do (same
|
||||
inactive background as with the default).
|
||||
|
||||
Similarly, ~accented~, ~accented-3d~, and ~accented-moody~ correspond to the
|
||||
default (~nil~), ~3d~, and ~moody~ styles respectively, except that the active
|
||||
mode line uses a colored background instead of the standard shade of
|
||||
gray.
|
||||
|
||||
Note that Moody does not expose any faces that the themes could style
|
||||
directly. Instead it re-purposes existing ones to render its tabs and
|
||||
ribbons. As such, there may be cases where the contrast ratio falls
|
||||
|
@ -624,10 +637,11 @@ is activated when Emacs determines that the background and foreground of
|
|||
the given construct are too close to each other in terms of color
|
||||
distance. In effect, users would need to experiment with the variable
|
||||
~face-near-same-color-threshold~ to trigger the effect. We find that a
|
||||
value of =45000= will suffice, contrary to the default =30000=. Do not set
|
||||
the value too high, because that would have the adverse effect of always
|
||||
overriding the default color (which has been carefully designed to be
|
||||
highly accessible).
|
||||
value of =45000= will suffice, contrary to the default =30000=. Though for
|
||||
the ~accented-moody~ value mentioned above, that should be raised up to
|
||||
=70000=. Do not set it too high, because it has the adverse effect of
|
||||
always overriding the default colors (which have been carefully designed
|
||||
to be highly accessible).
|
||||
|
||||
Furthermore, because Moody expects an underline and overline instead of
|
||||
a box style, it is advised you include this in your setup:
|
||||
|
@ -648,7 +662,7 @@ Symbol: ~modus-themes-completions~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
1. ~nil~ (default)
|
||||
2. ~moderate~
|
||||
3. ~opinionated~
|
||||
|
||||
|
@ -661,7 +675,7 @@ The former category encompasses Icomplete, Ido, Selectrum as well as
|
|||
pattern matching styles like Orderless and Flx. The latter covers Helm,
|
||||
Ivy, and similar.
|
||||
|
||||
A value of =nil= will respect the metaphors of each completion framework.
|
||||
A value of ~nil~ will respect the metaphors of each completion framework.
|
||||
|
||||
Option ~moderate~ applies a combination of background and foreground that
|
||||
is fairly subtle. For Icomplete and friends this constitutes a
|
||||
|
@ -677,7 +691,7 @@ packages will revert to an even more nuanced aesthetic with some
|
|||
additional changes to the choice of hues.
|
||||
|
||||
To appreciate the scope of this customization option, you should spend
|
||||
some time with every one of the =nil= (default), ~moderate~, and ~opinionated~
|
||||
some time with every one of the ~nil~ (default), ~moderate~, and ~opinionated~
|
||||
possibilities.
|
||||
|
||||
** Option for fringe visibility
|
||||
|
@ -692,7 +706,7 @@ Symbol: ~modus-themes-fringes~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
1. ~nil~ (default)
|
||||
2. ~subtle~
|
||||
3. ~intense~
|
||||
|
||||
|
@ -716,7 +730,7 @@ Symbol: ~modus-themes-lang-checkers~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
1. ~nil~ (default)
|
||||
2. ~subtle-foreground~
|
||||
3. ~intense-foreground~
|
||||
4. ~straight-underline~
|
||||
|
@ -755,25 +769,50 @@ refer to their documentation strings.
|
|||
** Option for line highlighting (hl-line-mode)
|
||||
:properties:
|
||||
:alt_title: Line highlighting
|
||||
:description: Toggle intense style for current line highlighting
|
||||
:description: Choose style of current line (hl-line-mode)
|
||||
:custom_id: h:1dba1cfe-d079-4c13-a810-f768e8789177
|
||||
:end:
|
||||
#+vindex: modus-themes-intense-hl-line
|
||||
#+vindex: modus-themes-hl-line
|
||||
|
||||
Symbol: ~modus-themes-intense-hl-line~
|
||||
Symbol: ~modus-themes-hl-line~
|
||||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
2. =t=
|
||||
1. ~nil~ (default)
|
||||
2. ~intense-background~
|
||||
3. ~accented-background~
|
||||
4. ~underline-neutral~
|
||||
5. ~underline-accented~
|
||||
6. ~underline-only-neutral~
|
||||
7. ~underline-only-accented~
|
||||
|
||||
The default is to use a subtle gray background for ~hl-line-mode~ and its
|
||||
global equivalent.
|
||||
The default is to use a subtle gray background for the current line when
|
||||
~hl-line-mode~ is enabled.
|
||||
|
||||
With a non-nil value (=t=) use a more prominent background color instead.
|
||||
The ~intense-background~ applies a more prominent gray to the background
|
||||
of the current line.
|
||||
|
||||
This affects several packages that enable ~hl-line-mode~, such as =elfeed=
|
||||
and =mu4e=.
|
||||
With ~accented-background~ the default's subtle aesthetic is retained, but
|
||||
the background has a more colored hint.
|
||||
|
||||
The ~underline-neutral~ combines the default subtle neutral background
|
||||
with a gray underline.
|
||||
|
||||
Similarly, the ~underline-accented~ renders the background of the current
|
||||
line in a subtle colored background, while it also draws an accented
|
||||
underline.
|
||||
|
||||
Option ~underline-only-neutral~ produces a neutral underline, but does not
|
||||
use any background.
|
||||
|
||||
While ~underline-only-accented~ also uses just an underline, only this one
|
||||
is colored.
|
||||
|
||||
Consider setting the variable ~x-underline-at-descent-line~ to a non-nil
|
||||
value for better results with underlines.
|
||||
|
||||
This style affects several packages that enable ~hl-line-mode~, such as
|
||||
=elfeed= and =mu4e=.
|
||||
|
||||
** Option for line numbers (display-line-numbers-mode)
|
||||
:properties:
|
||||
|
@ -787,8 +826,8 @@ Symbol: ~modus-themes-subtle-line-numbers~
|
|||
|
||||
Possible value:
|
||||
|
||||
1. =nil= (default)
|
||||
2. =t=
|
||||
1. ~nil~ (default)
|
||||
2. ~t~
|
||||
|
||||
The default style for ~display-line-numbers-mode~ and its global variant
|
||||
is to apply a subtle gray background to the line numbers. The current
|
||||
|
@ -799,7 +838,7 @@ Similarly, the faces for ~display-line-numbers-major-tick~ and its
|
|||
counterpart ~display-line-numbers-minor-tick~ use appropriate styles that
|
||||
involve a bespoke background and foreground combination.
|
||||
|
||||
With a non-nil value (=t=), line numbers have no background of their own.
|
||||
With a non-nil value (~t~), line numbers have no background of their own.
|
||||
Instead they retain the primary background of the theme, blending with
|
||||
the rest of the buffer. Foreground values for all relevant faces are
|
||||
updated to accommodate this aesthetic.
|
||||
|
@ -816,7 +855,7 @@ Symbol: ~modus-themes-paren-match~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
1. ~nil~ (default)
|
||||
2. ~subtle-bold~
|
||||
3. ~intense~
|
||||
4. ~intense-bold~
|
||||
|
@ -847,10 +886,12 @@ Symbol: ~modus-themes-region~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
1. ~nil~ (default)
|
||||
2. ~no-extend~
|
||||
3. ~bg-only~
|
||||
4. ~bg-only-no-extend~
|
||||
5. ~accent~
|
||||
6. ~accent-no-extend~
|
||||
|
||||
Nil means to only use a prominent gray background with a neutral
|
||||
foreground. The foreground overrides all syntax highlighting. The
|
||||
|
@ -866,6 +907,11 @@ colors. It extends to the edge of the window.
|
|||
Option ~bg-only-no-extend~ is a combination of the ~bg-only~ and ~no-extend~
|
||||
options.
|
||||
|
||||
Option ~accent~ is like the default, though it uses a more colorful
|
||||
background, while ~accent-no-extend~ is the same except it draws the
|
||||
region only up to the end of each line instead of extending to the edge
|
||||
of the window.
|
||||
|
||||
** Option for diff buffer looks
|
||||
:properties:
|
||||
:alt_title: Diffs
|
||||
|
@ -878,7 +924,7 @@ Symbol: ~modus-themes-diffs~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
1. ~nil~ (default)
|
||||
2. ~desaturated~
|
||||
3. ~fg-only~
|
||||
4. ~bg-only~
|
||||
|
@ -935,7 +981,7 @@ Symbol: ~modus-themes-org-blocks~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
1. ~nil~ (default)
|
||||
2. ~grayscale~
|
||||
3. ~rainbow~
|
||||
|
||||
|
@ -960,6 +1006,9 @@ major-mode so that the colors are applied consistently throughout: use
|
|||
Or start typing in each code block (inefficient at scale, but it still
|
||||
works).
|
||||
|
||||
The extent of Org block delimiter lines is controlled by the variable
|
||||
~org-fontify-whole-block-delimiter-line~.
|
||||
|
||||
** Option for org-habit graph styles
|
||||
:properties:
|
||||
:alt_title: Org agenda habits
|
||||
|
@ -972,7 +1021,7 @@ Symbol: ~modus-themes-org-habit~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
1. ~nil~ (default)
|
||||
2. ~simplified~
|
||||
3. ~traffic-light~
|
||||
|
||||
|
@ -1014,11 +1063,10 @@ than other customization options documented in this manual.
|
|||
|
||||
Symbol: ~modus-themes-headings~
|
||||
|
||||
Possible values, which can be specified for each heading level (examples
|
||||
further below):
|
||||
Possible values, which can be specified for each heading level N
|
||||
(examples further below):
|
||||
|
||||
+ nil (default fallback option---covers all heading levels)
|
||||
+ =t= (default style for a single heading, when the fallback differs)
|
||||
+ ~nil~ (~t~ is also available for backward compatibility)
|
||||
+ ~no-bold~
|
||||
+ ~line~
|
||||
+ ~line-no-bold~
|
||||
|
@ -1058,19 +1106,19 @@ To set a uniform value for all heading levels, use this pattern:
|
|||
'((t . section)))
|
||||
|
||||
;; Default aesthetic for every heading
|
||||
(setq modus-themes-headings
|
||||
'())
|
||||
(setq modus-themes-headings nil)
|
||||
#+end_src
|
||||
|
||||
The default style for headings uses a fairly desaturated foreground
|
||||
value in combination with bold typographic weight. To specify this
|
||||
color in combination with bold typographic weight. To specify this
|
||||
style for a given level N, assuming you wish to have another fallback
|
||||
option, just specify the value =t= like this:
|
||||
option, just assign the value ~nil~ like this:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq modus-themes-headings
|
||||
'((1 . t)
|
||||
'((1 . nil)
|
||||
(2 . line)
|
||||
(3) ; same as nil
|
||||
(t . rainbow-line-no-bold)))
|
||||
#+end_src
|
||||
|
||||
|
@ -1122,6 +1170,9 @@ A description of all other possible styles beyond the default:
|
|||
|
||||
+ ~no-color-no-bold~ is like ~no-color~ but without the bold weight.
|
||||
|
||||
Remember to also inspect relevant variables that Org provides, such as:
|
||||
~org-fontify-whole-heading-line~ and ~org-fontify-done-headline~.
|
||||
|
||||
** Option for scaled headings
|
||||
:properties:
|
||||
:alt_title: Scaled headings
|
||||
|
@ -1134,12 +1185,12 @@ Symbol: ~modus-themes-scale-headings~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
2. =t=
|
||||
1. ~nil~ (default)
|
||||
2. ~t~
|
||||
|
||||
The default is to use the same size for headings and paragraph text.
|
||||
|
||||
With a non-nil value (=t=) make headings larger in height relative to the
|
||||
With a non-nil value (~t~) make headings larger in height relative to the
|
||||
main text. This is noticeable in modes like Org, Markdown, and Info.
|
||||
|
||||
*** Control the scale of headings
|
||||
|
@ -1217,8 +1268,8 @@ Symbol: ~modus-themes-variable-pitch-ui~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
2. =t=
|
||||
1. ~nil~ (default)
|
||||
2. ~t~
|
||||
|
||||
This option concerns User Interface elements that are under the direct
|
||||
control of Emacs. In particular: the mode line, header line, tab bar,
|
||||
|
@ -1227,7 +1278,7 @@ and tab line.
|
|||
The default is to use the same font as the rest of Emacs, which usually
|
||||
is a monospaced family.
|
||||
|
||||
With a non-nil value (=t=) apply a proportionately spaced typeface. This
|
||||
With a non-nil value (~t~) apply a proportionately spaced typeface. This
|
||||
is done by assigning the ~variable-pitch~ face to the relevant items.
|
||||
|
||||
[[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org and others]].
|
||||
|
@ -1244,13 +1295,13 @@ Symbol: ~modus-themes-variable-pitch-headings~
|
|||
|
||||
Possible values:
|
||||
|
||||
1. =nil= (default)
|
||||
2. =t=
|
||||
1. ~nil~ (default)
|
||||
2. ~t~
|
||||
|
||||
The default is to use the main font family, which typically is
|
||||
monospaced.
|
||||
|
||||
With a non-nil value (=t=) apply a proportionately spaced typeface, else
|
||||
With a non-nil value (~t~) apply a proportionately spaced typeface, else
|
||||
"variable-pitch", to headings (such as in Org mode).
|
||||
|
||||
[[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org and others]].
|
||||
|
@ -1357,7 +1408,7 @@ With that granted, let us expand the example to actually change the
|
|||
|
||||
If you evaluate this form, your cursor will become blue. But if you
|
||||
change themes, such as with ~modus-themes-toggle~, your edits will be
|
||||
lost, because the newly loaded theme will override the =:background=
|
||||
lost, because the newly loaded theme will override the ~:background~
|
||||
attribute you had assigned to that face.
|
||||
|
||||
For such changes to persist, we need to make them after loading the
|
||||
|
@ -1458,7 +1509,7 @@ Getting a list of colors may have its applications, though what you are
|
|||
most likely interested in is how to use those variables to configure
|
||||
several faces at once. To do so we can rely on the built-in
|
||||
~custom-set-faces~ function, which sets face specifications for the
|
||||
special =user= theme. That "theme" gets applied on top of regular themes
|
||||
special ~user~ theme. That "theme" gets applied on top of regular themes
|
||||
like ~modus-operandi~ and ~modus-vivendi~.
|
||||
|
||||
This is how it works:
|
||||
|
@ -1502,7 +1553,7 @@ Thus:
|
|||
[[#h:86f6906b-f090-46cc-9816-1fe8aeb38776][A theme-agnostic hook for theme loading]].
|
||||
|
||||
To discover the faces defined by all loaded libraries, you may do
|
||||
{{{kbd(M-x list-faces-display)}}}. Be warned that when you =:inherit= a face
|
||||
{{{kbd(M-x list-faces-display)}}}. Be warned that when you ~:inherit~ a face
|
||||
you are introducing an implicit dependency, so try to avoid doing so for
|
||||
libraries other than the built-in {{{file(faces.el)}}} (or at least understand
|
||||
that things may break if you inherit from a yet-to-be-loaded face).
|
||||
|
@ -1524,6 +1575,68 @@ the previous section. Adapt the above example like this:
|
|||
...))
|
||||
#+end_src
|
||||
|
||||
** Remap face with local value (DIY)
|
||||
:properties:
|
||||
:custom_id: h:7a93cb6f-4eca-4d56-a85c-9dcd813d6b0f
|
||||
:end:
|
||||
#+cindex: Remapping faces
|
||||
|
||||
There are cases where we need to change the buffer-local attributes of a
|
||||
face. This might be because we have our own minor mode that re-uses a
|
||||
face for a particular purpose, such as a line selection tool that
|
||||
activates ~hl-line-mode~, but we wish to keep it distinct from other
|
||||
buffers. This is where ~face-remap-add-relative~ can be applied and may
|
||||
be combined with ~modus-themes-with-colors~ to deliver consistent results.
|
||||
|
||||
[[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette (DIY)]].
|
||||
|
||||
In this example we will write a simple interactive function that adjusts
|
||||
the background color of the ~region~ face. This is the sample code:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defvar my-rainbow-region-colors
|
||||
(modus-themes-with-colors
|
||||
`((red . ,red-subtle-bg)
|
||||
(green . ,green-subtle-bg)
|
||||
(yellow . ,yellow-subtle-bg)
|
||||
(blue . ,blue-subtle-bg)
|
||||
(magenta . ,magenta-subtle-bg)
|
||||
(cyan . ,cyan-subtle-bg)))
|
||||
"Sample list of color values for `my-rainbow-region'.")
|
||||
|
||||
(defun my-rainbow-region (color)
|
||||
"Remap buffer-local attribute of `region' using COLOR."
|
||||
(interactive
|
||||
(list
|
||||
(completing-read "Pick a color: " my-rainbow-region-colors)))
|
||||
(face-remap-add-relative
|
||||
'region
|
||||
`( :background ,(alist-get (intern color) my-rainbow-region-colors)
|
||||
:foreground ,(face-attribute 'default :foreground))))
|
||||
#+end_src
|
||||
|
||||
When ~my-rainbow-region~ is called interactively, it prompts for a color
|
||||
to use. The list of candidates is drawn from the car of each
|
||||
association in ~my-rainbow-region-colors~ (so "red", "green", etc.).
|
||||
|
||||
To extend this principle, we may write wrapper functions that pass a
|
||||
color directly. Those can be useful in tandem with hooks. Consider
|
||||
this example:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun my-rainbow-region-magenta ()
|
||||
(my-rainbow-region 'magenta))
|
||||
|
||||
(add-hook 'diff-mode-hook #'my-rainbow-region-magenta)
|
||||
#+end_src
|
||||
|
||||
Whenever we enter a ~diff-mode~ buffer, we now get a magenta-colored
|
||||
region.
|
||||
|
||||
Perhaps you may wish to generalise those findings in to a set of
|
||||
functions that also accept an arbitrary face. We shall leave the
|
||||
experimentation up to you.
|
||||
|
||||
** Override colors (DIY)
|
||||
:properties:
|
||||
:custom_id: h:307d95dd-8dbd-4ece-a543-10ae86f155a6
|
||||
|
@ -1627,16 +1740,89 @@ with {{{kbd(M-x modus-themes-toggle)}}} will also use the overrides.
|
|||
Given that this is a user-level customisation, one is free to implement
|
||||
whatever color values they desire, even if the possible combinations
|
||||
fall below the minimum 7:1 contrast ratio that governs the design of the
|
||||
themes (the WCAG AAA legibility standard). Preferences aside, it is
|
||||
advised to inspect the source code of ~modus-themes-operandi-colors~ and
|
||||
~modus-themes-vivendi-colors~ to read the inline commentary: it explains
|
||||
what the intended use of each palette subset is.
|
||||
themes (the WCAG AAA legibility standard). Alternatively, this can also
|
||||
be done programmatically ([[#h:4589acdc-2505-41fc-9f5e-699cfc45ab00][Override color saturation]]).
|
||||
|
||||
For manual interventions it is advised to inspect the source code of
|
||||
~modus-themes-operandi-colors~ and ~modus-themes-vivendi-colors~ for the
|
||||
inline commentary: it explains what the intended use of each palette
|
||||
subset is.
|
||||
|
||||
Furthermore, users may benefit from the ~modus-themes-contrast~ function
|
||||
that we provide: [[#h:02e25930-e71a-493d-828a-8907fc80f874][test color combinations]]. It measures the contrast
|
||||
ratio between two color values, so it can help in overriding the palette
|
||||
(or a subset thereof) without making the end result inaccessible.
|
||||
|
||||
** Override color saturation (DIY)
|
||||
:properties:
|
||||
:custom_id: h:4589acdc-2505-41fc-9f5e-699cfc45ab00
|
||||
:end:
|
||||
#+cindex: Change a theme's color saturation
|
||||
|
||||
In the previous section we documented how one can override color values
|
||||
manually ([[#h:307d95dd-8dbd-4ece-a543-10ae86f155a6][Override colors]]). Here we use a programmatic approach which
|
||||
leverages the built-in ~color-saturate-name~ function to adjust the
|
||||
saturation of all color values used by the active Modus theme. Our goal
|
||||
is to prepare a counterpart of the active theme's palette that holds
|
||||
modified color values, adjusted for a percent change in saturation. A
|
||||
positive number amplifies the effect, while a negative one will move
|
||||
towards a grayscale spectrum.
|
||||
|
||||
We start with a function that can be either called from Lisp or invoked
|
||||
interactively. In the former scenario, we pass to it the rate of change
|
||||
we want. While in the latter, a minibuffer prompt asks for a number to
|
||||
apply the desired effect. In either case, we intend to assign anew the
|
||||
value of ~modus-themes-operandi-color-overrides~ (light theme) and the
|
||||
same for ~modus-themes-vivendi-color-overrides~ (dark theme).
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun my-modus-themes-saturate (percent)
|
||||
"Saturate current Modus theme palette overrides by PERCENT."
|
||||
(interactive
|
||||
(list (read-number "Saturation by percent: ")))
|
||||
(let* ((theme (modus-themes--current-theme))
|
||||
(palette (pcase theme
|
||||
('modus-operandi modus-themes-operandi-colors)
|
||||
('modus-vivendi modus-themes-vivendi-colors)
|
||||
(_ (error "No Modus theme is active"))))
|
||||
(overrides (pcase theme
|
||||
('modus-operandi 'modus-themes-operandi-color-overrides)
|
||||
('modus-vivendi 'modus-themes-vivendi-color-overrides)
|
||||
(_ (error "No Modus theme is active")))))
|
||||
(let (name cons colors)
|
||||
(dolist (cons palette)
|
||||
(setq name (color-saturate-name (cdr cons) percent))
|
||||
(setq name (format "%s" name))
|
||||
(setq cons `(,(car cons) . ,name))
|
||||
(push cons colors))
|
||||
(set overrides colors))
|
||||
(pcase theme
|
||||
('modus-operandi (modus-themes-load-operandi))
|
||||
('modus-vivendi (modus-themes-load-vivendi)))))
|
||||
|
||||
;; sample Elisp calls (or call `my-modus-themes-saturate' interactively)
|
||||
(my-modus-themes-saturate 50)
|
||||
(my-modus-themes-saturate -75)
|
||||
#+end_src
|
||||
|
||||
Using the above has an immediate effect, as it reloads the active Modus
|
||||
theme.
|
||||
|
||||
To disable the effect, one must reset the aforementioned variables to
|
||||
~nil~. Or specify a command for it, such as by taking inspiration from
|
||||
the ~modus-themes-toggle~ we already provide:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun my-modus-themes-revert-overrides ()
|
||||
"Reset palette overrides and reload active Modus theme."
|
||||
(interactive)
|
||||
(setq modus-themes-operandi-color-overrides nil
|
||||
modus-themes-vivendi-color-overrides nil)
|
||||
(pcase (modus-themes--current-theme)
|
||||
('modus-operandi (modus-themes-load-operandi))
|
||||
('modus-vivendi (modus-themes-load-vivendi))))
|
||||
#+end_src
|
||||
|
||||
** Font configurations for Org and others (DIY)
|
||||
:properties:
|
||||
:custom_id: h:defcf4fc-8fa8-4c29-b12e-7119582cc929
|
||||
|
@ -1677,9 +1863,9 @@ reading the doc string of ~set-face-attribute~):
|
|||
(set-face-attribute 'fixed-pitch nil :family "DejaVu Sans Mono" :height 1.0)
|
||||
#+end_src
|
||||
|
||||
Note the differences in the =:height= property. The =default= face must
|
||||
Note the differences in the ~:height~ property. The ~default~ face must
|
||||
specify an absolute value, which is the point size × 10. So if you want
|
||||
to use a font at point size =11=, you set the height to =110=.[fn:: =:height=
|
||||
to use a font at point size =11=, you set the height to =110=.[fn:: ~:height~
|
||||
values do not need to be rounded to multiples of ten: the likes of =115=
|
||||
are perfectly valid—some typefaces will change to account for those
|
||||
finer increments.] Whereas every other face must have a value that is
|
||||
|
@ -1689,6 +1875,8 @@ importance: it ensures that all fonts can scale gracefully when using
|
|||
something like the ~text-scale-adjust~ command which only operates on the
|
||||
base font size (i.e. the ~default~ face's absolute height).
|
||||
|
||||
[[#h:e6c5451f-6763-4be7-8fdb-b4706a422a4c][Note for EWW and Elfeed fonts (SHR fonts)]].
|
||||
|
||||
** Custom Org user faces (DIY)
|
||||
:properties:
|
||||
:custom_id: h:89f0678d-c5c3-4a57-a526-668b2bb2d7ad
|
||||
|
@ -1871,6 +2059,68 @@ package:
|
|||
(circadian-setup))
|
||||
#+end_src
|
||||
|
||||
** Backdrop for pdf-tools (DIY)
|
||||
:properties:
|
||||
:custom_id: h:ff69dfe1-29c0-447a-915c-b5ff7c5509cd
|
||||
:end:
|
||||
#+cindex: Remapping pdf-tools backdrop
|
||||
|
||||
Most PDF files use a white background for their page, making it
|
||||
impossible to discern the file's boundaries in the buffer while using
|
||||
the Modus Operandi theme. To introduce a distinction between the
|
||||
buffer's backdrop and the PDF page's background, the former must be
|
||||
rendered as some shade of gray. Ideally, ~pdf-tools~ would provide a face
|
||||
that the themes could support directly, though this does not seem to be
|
||||
the case for the time being. We must thus employ the face remapping
|
||||
technique that is documented elsewhere in this document to change the
|
||||
buffer-local value of the ~default~ face.
|
||||
|
||||
[[#h:7a93cb6f-4eca-4d56-a85c-9dcd813d6b0f][Remap face with local value (DIY)]].
|
||||
|
||||
To remap the buffer's backdrop, we start with a function like this one:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun my-pdf-tools-backdrop ()
|
||||
(face-remap-add-relative
|
||||
'default
|
||||
`(:background ,(modus-themes-color 'bg-alt))))
|
||||
|
||||
(add-hook 'pdf-tools-enabled-hook #'my-pdf-tools-backdrop)
|
||||
#+end_src
|
||||
|
||||
The idea is to assign that function to a hook that gets called when
|
||||
~pdf-tools~ renders the document: ~pdf-tools-enabled-hook~. This is enough
|
||||
when you only use one theme. However it has the downside of setting the
|
||||
background color value only at render time. In other words, the face
|
||||
remapping function does not get evaluated anew whenever the theme
|
||||
changes, such as upon invoking {{{kbd(M-x modus-themes-toggle)}}}.
|
||||
|
||||
To have our face remapping adapt gracefully while switching between the
|
||||
Modus themes, we need to also account for the current theme and control
|
||||
the activation of ~pdf-view-midnight-minor-mode~. To which end we arrive
|
||||
at something like the following, which builds on the above example:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun my-pdf-tools-backdrop ()
|
||||
(face-remap-add-relative
|
||||
'default
|
||||
`(:background ,(modus-themes-color 'bg-alt))))
|
||||
|
||||
(defun my-pdf-tools-midnight-mode-toggle ()
|
||||
(when (derived-mode-p 'pdf-view-mode)
|
||||
(if (eq (car custom-enabled-themes) 'modus-vivendi)
|
||||
(pdf-view-midnight-minor-mode 1)
|
||||
(pdf-view-midnight-minor-mode -1))
|
||||
(my-pdf-tools-backdrop)))
|
||||
|
||||
(add-hook 'pdf-tools-enabled-hook #'my-pdf-tools-midnight-mode-toggle)
|
||||
(add-hook 'modus-themes-after-load-theme-hook #'my-pdf-tools-midnight-mode-toggle)
|
||||
#+end_src
|
||||
|
||||
With those in place, PDFs have a distinct backdrop for their page, while
|
||||
they automatically switch to their dark mode when ~modus-themes-toggle~ is
|
||||
called from inside a buffer whose major-mode is ~pdf-view-mode~.
|
||||
|
||||
** A theme-agnostic hook for theme loading (DIY)
|
||||
:properties:
|
||||
:custom_id: h:86f6906b-f090-46cc-9816-1fe8aeb38776
|
||||
|
@ -1976,6 +2226,7 @@ have lots of extensions, so the "full support" may not be 100% true…
|
|||
+ compilation-mode
|
||||
+ completions
|
||||
+ consult
|
||||
+ corfu
|
||||
+ counsel*
|
||||
+ counsel-css
|
||||
+ counsel-notmuch
|
||||
|
@ -2018,8 +2269,9 @@ have lots of extensions, so the "full support" may not be 100% true…
|
|||
+ eldoc-box
|
||||
+ elfeed
|
||||
+ elfeed-score
|
||||
+ embark
|
||||
+ emms
|
||||
+ enhanced-ruby-mode
|
||||
+ enh-ruby-mode (enhanced-ruby-mode)
|
||||
+ epa
|
||||
+ equake
|
||||
+ erc
|
||||
|
@ -2149,6 +2401,7 @@ have lots of extensions, so the "full support" may not be 100% true…
|
|||
+ outline-minor-faces
|
||||
+ package (what you get with {{{kbd(M-x list-packages)}}})
|
||||
+ page-break-lines
|
||||
+ pandoc-mode
|
||||
+ paradox
|
||||
+ paren-face
|
||||
+ parrot
|
||||
|
@ -2206,7 +2459,11 @@ have lots of extensions, so the "full support" may not be 100% true…
|
|||
+ sx
|
||||
+ symbol-overlay
|
||||
+ syslog-mode
|
||||
+ tab-bar-groups
|
||||
+ tab-bar-mode
|
||||
+ tab-line-mode
|
||||
+ table (built-in table.el)
|
||||
+ telega
|
||||
+ telephone-line
|
||||
+ terraform-mode
|
||||
+ term
|
||||
|
@ -2221,6 +2478,7 @@ have lots of extensions, so the "full support" may not be 100% true…
|
|||
+ vc (built-in mode line status for version control)
|
||||
+ vc-annotate (the out put of {{{kbd(C-x v g)}}})
|
||||
+ vdiff
|
||||
+ vertico
|
||||
+ vimish-fold
|
||||
+ visible-mark
|
||||
+ visual-regexp
|
||||
|
@ -2274,6 +2532,42 @@ inherit from some basic faces. Please confirm.
|
|||
This section covers information that may be of interest to users of
|
||||
individual packages.
|
||||
|
||||
** Note for dimmer.el
|
||||
:properties:
|
||||
:custom_id: h:8eb4b758-d318-4480-9ead-357a571beb93
|
||||
:end:
|
||||
|
||||
The {{{file(dimmer.el)}}} library by Neil Okamoto can be configured to
|
||||
automatically dim the colors of inactive Emacs windows. To guarantee
|
||||
consistent results with the Modus themes, we suggest some tweaks to the
|
||||
default styles, such as in this minimal setup:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package dimmer
|
||||
:config
|
||||
(setq dimmer-fraction 0.3)
|
||||
(setq dimmer-adjustment-mode :foreground)
|
||||
(setq dimmer-use-colorspace :rgb)
|
||||
|
||||
(dimmer-mode 1))
|
||||
#+end_src
|
||||
|
||||
Of the above, we strongly recommend the RGB color space because it is
|
||||
the one that remains faithful to the hueness of the colors used by the
|
||||
themes. Whereas the default CIELAB space has a tendency to distort
|
||||
colors in addition to applying the dim effect, which can be somewhat
|
||||
disorienting.
|
||||
|
||||
The value of the ~dimmer-fraction~ has been selected empirically. Users
|
||||
might prefer to tweak it further (increasing it makes the dim effect
|
||||
more pronounced).
|
||||
|
||||
Changing the ~dimmer-adjustment-mode~ is a matter of preference. Though
|
||||
because the Modus themes use black and white as their base colors, any
|
||||
other value for that variable will turn the main background gray. This
|
||||
inadvertently leads to the opposite of the intended utility of this
|
||||
package: it draws too much attention to unfocused windows.
|
||||
|
||||
** Note for display-fill-column-indicator-mode
|
||||
:properties:
|
||||
:custom_id: h:2a602816-bc1b-45bf-9675-4cbbd7bf6cab
|
||||
|
@ -2521,6 +2815,21 @@ specifications the webpage provides.
|
|||
|
||||
Consult {{{kbd(C-h v shr-use-colors)}}}.
|
||||
|
||||
|
||||
** Note for EWW and Elfeed fonts (SHR fonts)
|
||||
:properties:
|
||||
:custom_id: h:e6c5451f-6763-4be7-8fdb-b4706a422a4c
|
||||
:end:
|
||||
|
||||
EWW and Elfeed rely on the Simple HTML Renderer to display their
|
||||
content. The {{{file(shr.el)}}} library contains the variable ~shr-use-fonts~
|
||||
that controls whether the text in the buffer is set to a ~variable-pitch~
|
||||
typeface (proportionately spaced) or if just retains whatever the
|
||||
default font family is. Its default value is non-nil, which means that
|
||||
~variable-pitch~ is applied.
|
||||
|
||||
[[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org and others]].
|
||||
|
||||
** Note for Helm grep
|
||||
:properties:
|
||||
:custom_id: h:d28879a2-8e4b-4525-986e-14c0f873d229
|
||||
|
@ -2748,26 +3057,28 @@ The Modus themes are a collective effort. Every bit of work matters.
|
|||
|
||||
+ Contributions to code or documentation :: Anders Johansson, Basil
|
||||
L.{{{space()}}} Contovounesios, Carlo Zancanaro, Eli Zaretskii, Kostadin
|
||||
Ninev, Madhavan Krishnan, Markus Beppler, Matthew Stevenson, Nicolas
|
||||
De Jaeghere, Shreyas Ragavan, Stefan Kangas, Vincent Murphy, Xinglu
|
||||
Chen.
|
||||
Ninev, Madhavan Krishnan, Markus Beppler, Matthew Stevenson, Mauro
|
||||
Aranda, Nicolas De Jaeghere, Shreyas Ragavan, Stefan Kangas, Vincent
|
||||
Murphy, Xinglu Chen.
|
||||
|
||||
+ Ideas and user feedback :: Aaron Jensen, Adam Spiers, Adrian Manea,
|
||||
Alex Griffin, Alex Peitsinis, Alexey Shmalko, Alok Singh, Anders
|
||||
Johansson, André Alexandre Gomes, Arif Rezai, Basil L.{{{space()}}}
|
||||
Contovounesios, Burgess Chang, Christian Tietze, Christopher Dimech,
|
||||
Damien Cassou, Daniel Mendler, Dario Gjorgjevski, David Edmondson,
|
||||
Davor Rotim, Divan Santana, Gerry Agbobada, Gianluca Recchia, Gustavo
|
||||
Barros, Hörmetjan Yiltiz, Ilja Kocken, Iris Garcia, Jeremy Friesen,
|
||||
John Haman, Joshua O'Connor, Kevin Fleming, Kostadin Ninev, Len Trigg,
|
||||
Manuel Uberti, Mark Burton, Markus Beppler, Michael Goldenberg, Morgan
|
||||
Smith, Murilo Pereira, Nicolas De Jaeghere, Paul Poloskov, Pete
|
||||
Kazmier, Peter Wu, Philip K., Pierre Téchoueyres, Roman Rudakov, Ryan
|
||||
Phillips, Sam Kleinman, Shreyas Ragavan, Simon Pugnet, Tassilo Horn,
|
||||
Thibaut Verron, Trey Merkley, Togan Muftuoglu, Toon Claes, Uri Sharf,
|
||||
Utkarsh Singh, Vincent Foley. As well as users: Ben, CsBigDataHub1,
|
||||
Emacs Contrib, Eugene, Fourchaux, Fredrik, Moesasji, Nick, TheBlob42,
|
||||
bepolymathe, doolio, fleimgruber, iSeeU, jixiuf, okamsn.
|
||||
Davor Rotim, Divan Santana, Emanuele Michele Alberto Monterosso,
|
||||
Farasha Euker, Gerry Agbobada, Gianluca Recchia, Gustavo Barros,
|
||||
Hörmetjan Yiltiz, Ilja Kocken, Iris Garcia, Jeremy Friesen, John
|
||||
Haman, Joshua O'Connor, Kevin Fleming, Kévin Le Gouguec, Kostadin
|
||||
Ninev, Len Trigg, Manuel Uberti, Mark Burton, Markus Beppler, Mauro
|
||||
Aranda, Michael Goldenberg, Morgan Smith, Murilo Pereira, Nicky van
|
||||
Foreest, Nicolas De Jaeghere, Paul Poloskov, Pete Kazmier, Peter Wu,
|
||||
Philip K., Pierre Téchoueyres, Roman Rudakov, Ryan Phillips, Sam
|
||||
Kleinman, Shreyas Ragavan, Simon Pugnet, Tassilo Horn, Thibaut Verron,
|
||||
Trey Merkley, Togan Muftuoglu, Toon Claes, Uri Sharf, Utkarsh Singh,
|
||||
Vincent Foley. As well as users: Ben, CsBigDataHub1, Emacs Contrib,
|
||||
Eugene, Fourchaux, Fredrik, Moesasji, Nick, TheBlob42, Trey,
|
||||
bepolymathe, doolio, fleimgruber, iSeeU, jixiuf, okamsn, pRot0ta1p.
|
||||
|
||||
+ Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii, Glenn
|
||||
Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core Emacs),
|
||||
|
@ -2819,6 +3130,7 @@ And here are the canonical sources of this project's documentation:
|
|||
#+texinfo: @include doclicense.texi
|
||||
|
||||
#+begin_export html
|
||||
<pre>
|
||||
|
||||
GNU Free Documentation License
|
||||
Version 1.3, 3 November 2008
|
||||
|
@ -3270,6 +3582,7 @@ If your document contains nontrivial examples of program code, we
|
|||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License,
|
||||
to permit their use in free software.
|
||||
</pre>
|
||||
#+end_export
|
||||
|
||||
#+html: <!--
|
||||
|
|
|
@ -142,7 +142,7 @@ Move point ``up'' one reference (@code{senator-go-to-up-reference}).
|
|||
The meaning of ``up'' is language-dependent; in C++, for instance,
|
||||
this means moving to the parent of the current tag.
|
||||
|
||||
@item C-c, @key{SPC}
|
||||
@item C-c , @key{SPC}
|
||||
Display a list of possible completions for the symbol at point
|
||||
(@code{semantic-complete-analyze-inline}). This also activates a
|
||||
special set of keybindings for choosing a completion: @key{RET}
|
||||
|
|
|
@ -5095,32 +5095,18 @@ two forms in your @file{~/.emacs} after loading the @code{tramp} and
|
|||
|
||||
@item
|
||||
I get a warning @samp{Tramp has been compiled with Emacs a.b, this is Emacs c.d}
|
||||
|
||||
@value{tramp} comes with compatibility code for different Emacs
|
||||
versions. When you see this warning, you don't use the Emacs built-in
|
||||
version of @value{tramp}. In case you have installed @value{tramp}
|
||||
from GNU ELPA, you must delete and reinstall it.
|
||||
@ifset installchapter
|
||||
In case you have installed it from its Git repository, @ref{Recompilation}.
|
||||
@end ifset
|
||||
|
||||
|
||||
@item
|
||||
I get an error @samp{tramp-file-name-handler: Invalid function:
|
||||
tramp-compat-with-mutex}
|
||||
|
||||
Likely, you have a running Emacs session with loaded @value{tramp},
|
||||
and you try to upgrade it to another version from GNU ELPA. Since
|
||||
@value{tramp} is not forward compatible, you must unload / reload it.
|
||||
Try the following steps:
|
||||
|
||||
@example
|
||||
@kbd{M-x tramp-unload-tramp @key{RET}}
|
||||
@kbd{M-x load-library @key{RET} tramp @key{RET}}
|
||||
@end example
|
||||
|
||||
If this doesn't work, you must restart Emacs with proper
|
||||
@code{load-path} for the new @value{tramp} version.
|
||||
@value{tramp} comes with compatibility code for different Emacs
|
||||
versions. When you see this warning, you don't use the Emacs built-in
|
||||
version of @value{tramp}. In case you have installed @value{tramp}
|
||||
from GNU ELPA, see the package README file for instructions how to
|
||||
recompile it.
|
||||
@ifset installchapter
|
||||
In case you have installed it from its Git repository, @ref{Recompilation}.
|
||||
@end ifset
|
||||
|
||||
|
||||
@item
|
||||
|
|
76
etc/NEWS
76
etc/NEWS
|
@ -958,6 +958,13 @@ authentication mechanism by setting a value for the key 'smtp-auth'.
|
|||
|
||||
** Search and Replace
|
||||
|
||||
*** New key 'M-s M-.' starts isearch with the thing found at point.
|
||||
This key is bound to the new command 'isearch-forward-thing-at-point'.
|
||||
The new user option 'isearch-forward-thing-at-point' defines
|
||||
a list of symbols to try to get the "thing" at point. By default,
|
||||
the first element of the list is 'region' that tries to yank
|
||||
the currently active region to the search string.
|
||||
|
||||
*** New user option 'isearch-wrap-pause' defines how to wrap the search.
|
||||
There are choices to disable wrapping completely and to wrap immediately.
|
||||
When wrapping immediately, it consistently handles the numeric arguments
|
||||
|
@ -981,6 +988,9 @@ skipped.
|
|||
|
||||
** Help
|
||||
|
||||
---
|
||||
*** The 'help-for-help' ('C-h C-h') screen has been redesigned.
|
||||
|
||||
---
|
||||
*** Keybindings in 'help-mode' use the new 'help-key-binding' face.
|
||||
This face is added by 'substitute-command-keys' to any "\[command]"
|
||||
|
@ -1670,6 +1680,13 @@ choosing the exact definition to go to, and this should do TRT.
|
|||
If chosen, file names in "*xref*" buffers will be displayed relative
|
||||
to the 'project-root' of the current project, when available.
|
||||
|
||||
+++
|
||||
*** The TAB key binding in *xref* buffers is obsolete.
|
||||
Use 'C-u RET' instead. The TAB binding in *xref* buffers is still
|
||||
supported, but we plan on removing it in a future version; at that
|
||||
time, the command 'xref-quit-and-goto-xref' will no longer have a key
|
||||
binding in 'xref--xref-buffer-mode-map'.
|
||||
|
||||
** json.el
|
||||
|
||||
---
|
||||
|
@ -1731,6 +1748,42 @@ type for highlighting the entire message but not the sender's nick.
|
|||
The 'erc-status-sidebar' package which provides a HexChat-like
|
||||
activity overview sidebar for joined IRC channels is now part of ERC.
|
||||
|
||||
+++
|
||||
*** erc-tls now supports specifying a TLS client certificate.
|
||||
The 'erc-tls' function has been updated to allow specifying a TLS
|
||||
client certificate for authentication, as an alternative to NickServ
|
||||
password-based authentication. This is referred to as "CertFP" (short
|
||||
for Certificate Fingerprint) by several IRC networks.
|
||||
|
||||
To use a certificate with 'erc-tls', specify the ':client-certificate'
|
||||
optional parameter, whose value should be as described in the
|
||||
documentation of 'open-network-stream': if non-nil, it should either
|
||||
be a list where the first element is the file name of the private key
|
||||
corresponding to a client certificate and the second element is the
|
||||
file name of the client certificate itself to use when connecting over
|
||||
TLS, or t, which means that 'auth-source' will be queried for the
|
||||
private key and the certificate.
|
||||
|
||||
Examples of use:
|
||||
|
||||
(erc-tls :server "chat.freenode.net" :port 6697
|
||||
:client-certificate
|
||||
'("/home/bandali/my-cert.key"
|
||||
"/home/bandali/my-cert.crt"))
|
||||
|
||||
(erc-tls :server "chat.freenode.net" :port 6697
|
||||
:client-certificate
|
||||
`(,(expand-file-name "~/cert-freenode.key")
|
||||
,(expand-file-name "~/cert-freenode.crt")))
|
||||
|
||||
(erc-tls :server "chat.freenode.net" :port 6697
|
||||
:client-certificate t)
|
||||
|
||||
In the case of ':client-certificate t', you will need to add a line
|
||||
like the following to your authinfo file (e.g. "~/.authinfo.gpg"):
|
||||
|
||||
machine chat.freenode.net key /home/bandali/my-cert.key cert /home/bandali/my-cert.crt
|
||||
|
||||
** Battery
|
||||
|
||||
---
|
||||
|
@ -2227,6 +2280,10 @@ The following user options have been renamed:
|
|||
|
||||
The old names are now obsolete.
|
||||
|
||||
---
|
||||
*** 'world-clock-mode' can no longer be turned on interactively.
|
||||
Use 'world-clock' to turn on that mode.
|
||||
|
||||
** D-Bus
|
||||
|
||||
+++
|
||||
|
@ -2325,6 +2382,13 @@ This is a mode for searching a RFC 2229 dictionary server.
|
|||
the mouse in 'dictionary-tooltip-dictionary' (which must be customized
|
||||
first).
|
||||
|
||||
** transient.el
|
||||
|
||||
This library implements support for powerful keyboard-driven menus.
|
||||
Such menus can be used as simple visual command dispatchers. More
|
||||
complex menus take advantage of infix arguments, which are somewhat
|
||||
similar to prefix arguments, but are more flexible and discoverable.
|
||||
|
||||
|
||||
* Incompatible Editing Changes in Emacs 28.1
|
||||
|
||||
|
@ -2392,6 +2456,10 @@ This affects the suffix specified by completion 'annotation-function'.
|
|||
** 'set-process-buffer' now updates the process mark.
|
||||
The mark will be set to point to the end of the new buffer.
|
||||
|
||||
+++
|
||||
** An active minibuffer now has major mode 'minibuffer-mode', not the
|
||||
erroneous 'minibuffer-inactive-mode' it formerly had.
|
||||
|
||||
+++
|
||||
** Some properties from completion tables are now preserved.
|
||||
If 'minibuffer-allow-text-properties' is non-nil, doing completion
|
||||
|
@ -2656,9 +2724,11 @@ one to another in the init file. The same user option also controls
|
|||
whether the function 'read-answer' accepts short answers.
|
||||
|
||||
+++
|
||||
** 'set-window-configuration' now takes an optional 'dont-set-frame'
|
||||
parameter which, when non-nil, instructs the function not to select
|
||||
the frame recorded in the configuration.
|
||||
** 'set-window-configuration' now takes two optional parameters,
|
||||
'dont-set-frame' and 'dont-set-miniwindow'. The first of these, when
|
||||
non-nil, instructs the function not to select the frame recorded in
|
||||
the configuration. The second prevents the current minibuffer being
|
||||
replaced by the one stored in the configuration.
|
||||
|
||||
+++
|
||||
** 'define-globalized-minor-mode' now takes a ':predicate' parameter.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; manoj-dark.el --- A dark theme from Manoj -*- lexical-binding:t -*-
|
||||
;;; manoj-dark-theme.el --- A dark theme from Manoj -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2011-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; URL: https://gitlab.com/protesilaos/modus-themes
|
||||
;; Version: 1.2.3
|
||||
;; Version: 1.3.2
|
||||
;; Package-Requires: ((emacs "26.1"))
|
||||
;; Keywords: faces, theme, accessibility
|
||||
|
||||
|
@ -52,6 +52,9 @@
|
|||
|
||||
(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)))
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; URL: https://gitlab.com/protesilaos/modus-themes
|
||||
;; Version: 1.2.3
|
||||
;; Version: 1.3.2
|
||||
;; Package-Requires: ((emacs "26.1"))
|
||||
;; Keywords: faces, theme, accessibility
|
||||
|
||||
|
@ -52,6 +52,9 @@
|
|||
|
||||
(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)))
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; leim-ext.el -- extra leim configuration -*- lexical-binding: t; -*-
|
||||
;;; leim-ext.el --- extra leim configuration -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2004-2021 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
|
||||
|
|
|
@ -35,6 +35,7 @@ variants of those files that can be used to sandbox Emacs before
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -60,6 +61,10 @@ variants of those files that can be used to sandbox Emacs before
|
|||
|
||||
#include "verify.h"
|
||||
|
||||
#ifndef ARCH_CET_STATUS
|
||||
#define ARCH_CET_STATUS 0x3001
|
||||
#endif
|
||||
|
||||
static ATTRIBUTE_FORMAT_PRINTF (2, 3) _Noreturn void
|
||||
fail (int error, const char *format, ...)
|
||||
{
|
||||
|
@ -165,7 +170,7 @@ main (int argc, char **argv)
|
|||
verify (sizeof (long) == 8 && LONG_MIN == INT64_MIN
|
||||
&& LONG_MAX == INT64_MAX);
|
||||
verify (sizeof (void *) == 8);
|
||||
verify ((uintptr_t) NULL == 0);
|
||||
assert ((uintptr_t) NULL == 0);
|
||||
|
||||
/* Allow a clean exit. */
|
||||
RULE (SCMP_ACT_ALLOW, SCMP_SYS (exit));
|
||||
|
@ -183,9 +188,9 @@ main (int argc, char **argv)
|
|||
some versions of the dynamic loader still use it. Also
|
||||
allow allocating thread stacks. */
|
||||
SCMP_A3_32 (SCMP_CMP_MASKED_EQ,
|
||||
~(MAP_PRIVATE | MAP_FILE | MAP_ANONYMOUS
|
||||
| MAP_FIXED | MAP_DENYWRITE | MAP_STACK
|
||||
| MAP_NORESERVE),
|
||||
~(MAP_SHARED | MAP_PRIVATE | MAP_FILE
|
||||
| MAP_ANONYMOUS | MAP_FIXED | MAP_DENYWRITE
|
||||
| MAP_STACK | MAP_NORESERVE),
|
||||
0));
|
||||
RULE (SCMP_ACT_ALLOW, SCMP_SYS (mmap),
|
||||
SCMP_A2_32 (SCMP_CMP_MASKED_EQ,
|
||||
|
@ -345,6 +350,8 @@ main (int argc, char **argv)
|
|||
RULE (SCMP_ACT_ALLOW, SCMP_SYS (set_tid_address));
|
||||
RULE (SCMP_ACT_ALLOW, SCMP_SYS (arch_prctl),
|
||||
SCMP_A0_32 (SCMP_CMP_EQ, ARCH_SET_FS));
|
||||
RULE (SCMP_ACT_ERRNO (EINVAL), SCMP_SYS (arch_prctl),
|
||||
SCMP_A0_32 (SCMP_CMP_EQ, ARCH_CET_STATUS));
|
||||
RULE (SCMP_ACT_ALLOW, SCMP_SYS (statfs));
|
||||
|
||||
/* We want to allow starting the Emacs binary itself with the
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; allout-widgets.el --- Visually highlight allout outline structure. -*- lexical-binding: t; -*-
|
||||
;;; allout-widgets.el --- Visually highlight allout outline structure. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2005-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -2296,3 +2296,5 @@ The elements of LIST are not copied, just the list structure itself."
|
|||
;;;_ , Local variables:
|
||||
;;;_ , allout-layout: (-1 : 0)
|
||||
;;;_ , End:
|
||||
|
||||
;;; allout-widgets.el ends here
|
||||
|
|
|
@ -1669,3 +1669,5 @@
|
|||
["Quit" calc-quit]))
|
||||
|
||||
(provide 'calc-menu)
|
||||
|
||||
;;; calc-menu.el ends here
|
||||
|
|
|
@ -819,3 +819,5 @@
|
|||
(calc-record traillist "parm")))))
|
||||
|
||||
(provide 'calc-nlfit)
|
||||
|
||||
;;; calc-nlfit.el ends here
|
||||
|
|
|
@ -3427,7 +3427,7 @@ where:
|
|||
(if (wisent-automaton-p grammar)
|
||||
grammar ;; Grammar already compiled just return it
|
||||
(wisent-with-context compile-grammar
|
||||
(let* ((gc-cons-threshold 1000000))
|
||||
(let* ((gc-cons-threshold (max gc-cons-threshold 1000000)))
|
||||
(garbage-collect)
|
||||
(setq wisent-new-log-flag t)
|
||||
;; Parse input grammar
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; cus-theme.el -- custom theme creation user interface -*- lexical-binding: t -*-
|
||||
;;
|
||||
;;; cus-theme.el --- custom theme creation user interface -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
;;
|
||||
|
||||
;; Author: Alex Schroeder <alex@gnu.org>
|
||||
;; Maintainer: emacs-devel@gnu.org
|
||||
;; Keywords: help, faces
|
||||
|
|
|
@ -117,9 +117,10 @@ For the standard setting, use `set-default'."
|
|||
(set-default symbol (eval exp)))))))
|
||||
|
||||
(defvar custom-delayed-init-variables nil
|
||||
"List of variables whose initialization is pending.")
|
||||
"List of variables whose initialization is pending until startup.
|
||||
Once this list has been processed, this var is set to a non-list value.")
|
||||
|
||||
(defun custom-initialize-delay (symbol _value)
|
||||
(defun custom-initialize-delay (symbol value)
|
||||
"Delay initialization of SYMBOL to the next Emacs start.
|
||||
This is used in files that are preloaded (or for autoloaded
|
||||
variables), so that the initialization is done in the run-time
|
||||
|
@ -133,7 +134,11 @@ the :set function."
|
|||
;; This seemed to be at least as good as setting it to an arbitrary
|
||||
;; value like nil (evaluating `value' is not an option because it
|
||||
;; may have undesirable side-effects).
|
||||
(push symbol custom-delayed-init-variables))
|
||||
(if (listp custom-delayed-init-variables)
|
||||
(push symbol custom-delayed-init-variables)
|
||||
;; In case this is called after startup, there is no "later" to which to
|
||||
;; delay it, so initialize it "normally" (bug#47072).
|
||||
(custom-initialize-reset symbol value)))
|
||||
|
||||
(defun custom-declare-variable (symbol default doc &rest args)
|
||||
"Like `defcustom', but SYMBOL and DEFAULT are evaluated as normal arguments.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; dframe --- dedicate frame support modes -*- lexical-binding:t -*-
|
||||
;;; dframe.el --- dedicate frame support modes -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; dos-w32.el --- Functions shared among MS-DOS and W32 (NT/95) platforms -*- lexical-binding: t; -*-
|
||||
;;; dos-w32.el --- Functions shared among MS-DOS and W32 (NT/95) platforms -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1996, 2001-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1324,7 +1324,7 @@ Same format as `byte-optimize--lexvars', with shared structure and contents.")
|
|||
line-beginning-position line-end-position
|
||||
local-variable-if-set-p local-variable-p locale-info
|
||||
log log10 logand logb logcount logior lognot logxor lsh
|
||||
make-byte-code make-list make-string make-symbol marker-buffer max
|
||||
make-byte-code make-list make-string make-symbol mark marker-buffer max
|
||||
member memq memql min minibuffer-selected-window minibuffer-window
|
||||
mod multibyte-char-to-unibyte next-window nth nthcdr number-to-string
|
||||
parse-colon-path plist-get plist-member
|
||||
|
@ -1374,7 +1374,7 @@ Same format as `byte-optimize--lexvars', with shared structure and contents.")
|
|||
invocation-directory invocation-name
|
||||
keymapp keywordp
|
||||
list listp
|
||||
make-marker mark mark-marker markerp max-char
|
||||
make-marker mark-marker markerp max-char
|
||||
memory-limit
|
||||
mouse-movement-p
|
||||
natnump nlistp not null number-or-marker-p numberp
|
||||
|
|
|
@ -328,4 +328,4 @@ Returns non-nil if any false statements are found."
|
|||
|
||||
(provide 'check-declare)
|
||||
|
||||
;;; check-declare.el ends here.
|
||||
;;; check-declare.el ends here
|
||||
|
|
|
@ -438,7 +438,7 @@ Presumes point is at the end of the `cl-defmethod' symbol."
|
|||
;;;###autoload
|
||||
(defmacro cl-defmethod (name args &rest body)
|
||||
"Define a new method for generic function NAME.
|
||||
This it defines an implementation of NAME to use for invocations
|
||||
This defines an implementation of NAME to use for invocations
|
||||
of specific types of arguments.
|
||||
|
||||
ARGS is a list of dispatch arguments (see `cl-defun'), but where
|
||||
|
|
|
@ -118,7 +118,7 @@ it is disabled.")
|
|||
;;;###autoload
|
||||
(defalias 'easy-mmode-define-minor-mode #'define-minor-mode)
|
||||
;;;###autoload
|
||||
(defmacro define-minor-mode (mode doc &optional init-value lighter keymap &rest body)
|
||||
(defmacro define-minor-mode (mode doc &rest body)
|
||||
"Define a new minor mode MODE.
|
||||
This defines the toggle command MODE and (by default) a control variable
|
||||
MODE (you can override this with the :variable keyword, see below).
|
||||
|
@ -200,6 +200,9 @@ INIT-VALUE LIGHTER KEYMAP.
|
|||
|
||||
(let* ((last-message (make-symbol "last-message"))
|
||||
(mode-name (symbol-name mode))
|
||||
(init-value nil)
|
||||
(keymap nil)
|
||||
(lighter nil)
|
||||
(pretty-name nil)
|
||||
(globalp nil)
|
||||
(set nil)
|
||||
|
@ -216,22 +219,20 @@ INIT-VALUE LIGHTER KEYMAP.
|
|||
(hook-on (intern (concat mode-name "-on-hook")))
|
||||
(hook-off (intern (concat mode-name "-off-hook")))
|
||||
(interactive t)
|
||||
(warnwrap (if (keywordp init-value) #'identity
|
||||
(warnwrap (if (or (null body) (keywordp (car body))) #'identity
|
||||
(lambda (exp)
|
||||
(macroexp-warn-and-return
|
||||
"Use keywords rather than deprecated positional arguments to `define-minor-mode'"
|
||||
exp))))
|
||||
keyw keymap-sym tmp)
|
||||
|
||||
;; Allow skipping the first three args.
|
||||
(cond
|
||||
((keywordp init-value)
|
||||
(setq body (if keymap `(,init-value ,lighter ,keymap ,@body)
|
||||
`(,init-value ,lighter))
|
||||
init-value nil lighter nil keymap nil))
|
||||
((keywordp lighter)
|
||||
(setq body `(,lighter ,keymap ,@body) lighter nil keymap nil))
|
||||
((keywordp keymap) (push keymap body) (setq keymap nil)))
|
||||
;; Allow BODY to start with the old INIT-VALUE LIGHTER KEYMAP triplet.
|
||||
(unless (keywordp (car body))
|
||||
(setq init-value (pop body))
|
||||
(unless (keywordp (car body))
|
||||
(setq lighter (pop body))
|
||||
(unless (keywordp (car body))
|
||||
(setq keymap (pop body)))))
|
||||
|
||||
;; Check keys.
|
||||
(while (keywordp (setq keyw (car body)))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; eieio-custom.el -- eieio object customization -*- lexical-binding:t -*-
|
||||
;;; eieio-custom.el --- eieio object customization -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 1999-2001, 2005, 2007-2021 Free Software Foundation,
|
||||
;; Inc.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; eieio-opt.el -- eieio optional functions (debug, printing, speedbar) -*- lexical-binding: t; -*-
|
||||
;;; eieio-opt.el --- eieio optional functions (debug, printing, speedbar) -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1996, 1998-2003, 2005, 2008-2021 Free Software
|
||||
;; Foundation, Inc.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; eieio-speedbar.el -- Classes for managing speedbar displays. -*- lexical-binding:t -*-
|
||||
;;; eieio-speedbar.el --- Classes for managing speedbar displays. -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 1999-2002, 2005, 2007-2021 Free Software Foundation,
|
||||
;; Inc.
|
||||
|
|
|
@ -981,4 +981,4 @@ of `eq'."
|
|||
|
||||
(provide 'eieio)
|
||||
|
||||
;;; eieio ends here
|
||||
;;; eieio.el ends here
|
||||
|
|
|
@ -63,7 +63,7 @@ If this variable is set to 0, no idle time is required."
|
|||
:type 'number)
|
||||
|
||||
(defcustom eldoc-print-after-edit nil
|
||||
"If non-nil eldoc info is only shown when editing.
|
||||
"If non-nil, eldoc info is only shown when editing.
|
||||
Changing the value requires toggling `eldoc-mode'."
|
||||
:type 'boolean)
|
||||
|
||||
|
@ -391,12 +391,12 @@ name, inside its arg list, or on any object with some associated
|
|||
information.
|
||||
|
||||
Each hook function is called with at least one argument CALLBACK,
|
||||
a function, and decides whether to display a doc short string
|
||||
a function, and decides whether to display a short doc string
|
||||
about the context around point.
|
||||
|
||||
- If that decision can be taken quickly, the hook function may
|
||||
call CALLBACK immediately following the protocol described
|
||||
below. Alternatively it may ignore CALLBACK entirely and
|
||||
call CALLBACK immediately, following the protocol described
|
||||
below. Alternatively, it may ignore CALLBACK entirely and
|
||||
return either the doc string, or nil if there's no doc
|
||||
appropriate for the context.
|
||||
|
||||
|
@ -688,11 +688,11 @@ following values are allowed:
|
|||
- `eldoc-documentation-compose': calls all functions in the
|
||||
special hook and displays all of the resulting doc strings
|
||||
together. Wait for all strings to be ready, and preserve their
|
||||
relative as specified by the order of functions in the hook;
|
||||
relative order as specified by the order of functions in the hook;
|
||||
|
||||
- `eldoc-documentation-compose-eagerly': calls all functions in
|
||||
the special hook and display as many of the resulting doc
|
||||
strings as possible, as soon as possible. Preserving the
|
||||
the special hook and displays as many of the resulting doc
|
||||
strings as possible, as soon as possible. Preserves the
|
||||
relative order of doc strings;
|
||||
|
||||
- `eldoc-documentation-enthusiast': calls all functions in the
|
||||
|
@ -793,7 +793,7 @@ function passes responsibility to the functions in
|
|||
Other third-party values of `eldoc-documentation-strategy' should
|
||||
not use `eldoc--make-callback'. They must find some alternate
|
||||
way to produce callbacks to feed to
|
||||
`eldoc-documentation-function' and should endeavour to display
|
||||
`eldoc-documentation-functions' and should endeavour to display
|
||||
the docstrings eventually produced, using
|
||||
`eldoc-display-functions'."
|
||||
(let* (;; How many callbacks have been created by the strategy
|
||||
|
|
|
@ -73,9 +73,9 @@
|
|||
;; M-x list-packages
|
||||
;; Enters a mode similar to buffer-menu which lets you manage
|
||||
;; packages. You can choose packages for install (mark with "i",
|
||||
;; then "x" to execute) or deletion (not implemented yet), and you
|
||||
;; can see what packages are available. This will automatically
|
||||
;; fetch the latest list of packages from ELPA.
|
||||
;; then "x" to execute) or deletion, and you can see what packages
|
||||
;; are available. This will automatically fetch the latest list of
|
||||
;; packages from ELPA.
|
||||
;;
|
||||
;; M-x package-install-from-buffer
|
||||
;; Install a package consisting of a single .el file that appears
|
||||
|
@ -89,7 +89,7 @@
|
|||
;; Install a package from the indicated file. The package can be
|
||||
;; either a tar file or a .el file. A tar file must contain an
|
||||
;; appropriately-named "-pkg.el" file; a .el file must be properly
|
||||
;; formatted as with package-install-from-buffer.
|
||||
;; formatted as with `package-install-from-buffer'.
|
||||
|
||||
;;; Thanks:
|
||||
;;; (sorted by sort-lines):
|
||||
|
@ -225,7 +225,7 @@ security."
|
|||
:type '(alist :key-type (string :tag "Archive name")
|
||||
:value-type (string :tag "URL or directory name"))
|
||||
:risky t
|
||||
:version "26.1") ; gnutls test
|
||||
:version "28.1")
|
||||
|
||||
(defcustom package-menu-hide-low-priority 'archive
|
||||
"If non-nil, hide low priority packages from the packages menu.
|
||||
|
|
|
@ -1210,7 +1210,7 @@ unmatchable Never match anything at all.
|
|||
CHARCLASS Match a character from a character class. One of:
|
||||
alpha, alphabetic, letter Alphabetic characters (defined by Unicode).
|
||||
alnum, alphanumeric Alphabetic or decimal digit chars (Unicode).
|
||||
digit numeric, num 0-9.
|
||||
digit, numeric, num 0-9.
|
||||
xdigit, hex-digit, hex 0-9, A-F, a-f.
|
||||
cntrl, control ASCII codes 0-31.
|
||||
blank Horizontal whitespace (Unicode).
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;;; testcover-ses.el -- Example use of `testcover' to test "SES" -*- lexical-binding: t; -*-
|
||||
;;; tcover-ses.el --- Example use of `testcover' to test "SES" -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -716,4 +716,4 @@ spreadsheet files with invalid formatting."
|
|||
;;Could do this here: (testcover-end "ses.el")
|
||||
(message "Done"))
|
||||
|
||||
;;; testcover-ses.el ends here.
|
||||
;;; tcover-ses.el ends here
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;;; testcover.el -- Visual code-coverage tool -*- lexical-binding:t -*-
|
||||
;;; testcover.el --- Visual code-coverage tool -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -675,4 +675,4 @@ The list is 1valued if all of its constituent elements are also 1valued."
|
|||
(testcover-analyze-coverage (cadr form)))
|
||||
(t (testcover-analyze-coverage-backquote form))))
|
||||
|
||||
;; testcover.el ends here.
|
||||
;;; testcover.el ends here
|
||||
|
|
|
@ -214,3 +214,5 @@ and if a matching region is found, place point at its end."
|
|||
(funcall predicate value prop-value))
|
||||
|
||||
(provide 'text-property-search)
|
||||
|
||||
;;; text-property-search.el ends here
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;;; unsafep.el -- Determine whether a Lisp form is safe to evaluate -*- lexical-binding: t; -*-
|
||||
;;; unsafep.el --- Determine whether a Lisp form is safe to evaluate -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -138,6 +138,13 @@ Use `erc-current-nick' to access this.")
|
|||
(defvar-local erc-session-port nil
|
||||
"The port used to connect to.")
|
||||
|
||||
(defvar-local erc-session-client-certificate nil
|
||||
"TLS client certificate used when connecting over TLS.
|
||||
If non-nil, should either be a list where the first element is
|
||||
the certificate key file name, and the second element is the
|
||||
certificate file name itself, or t, which means that
|
||||
`auth-source' will be queried for the key and the certificate.")
|
||||
|
||||
(defvar-local erc-server-announced-name nil
|
||||
"The name the server announced to use.")
|
||||
|
||||
|
@ -505,18 +512,23 @@ The current buffer is given by BUFFER."
|
|||
(memq (process-status erc-server-process) '(run open)))))
|
||||
|
||||
;;;; Connecting to a server
|
||||
(defun erc-open-network-stream (name buffer host service)
|
||||
"As `open-network-stream', but does non-blocking IO"
|
||||
(make-network-process :name name :buffer buffer
|
||||
:host host :service service :nowait t))
|
||||
(defun erc-open-network-stream (name buffer host service &rest parameters)
|
||||
"Like `open-network-stream', but does non-blocking IO."
|
||||
(let ((p (plist-put parameters :nowait t)))
|
||||
(apply #'open-network-stream name buffer host service p)))
|
||||
|
||||
(defun erc-server-connect (server port buffer)
|
||||
(defun erc-server-connect (server port buffer &optional client-certificate)
|
||||
"Perform the connection and login using the specified SERVER and PORT.
|
||||
We will store server variables in the buffer given by BUFFER."
|
||||
(let ((msg (erc-format-message 'connect ?S server ?p port)) process)
|
||||
We will store server variables in the buffer given by BUFFER.
|
||||
CLIENT-CERTIFICATE may optionally be used to specify a TLS client
|
||||
certificate to use for authentication when connecting over
|
||||
TLS (see `erc-session-client-certificate' for more details)."
|
||||
(let ((msg (erc-format-message 'connect ?S server ?p port)) process
|
||||
(args `(,(format "erc-%s-%s" server port) nil ,server ,port)))
|
||||
(when client-certificate
|
||||
(setq args `(,@args :client-certificate ,client-certificate)))
|
||||
(message "%s" msg)
|
||||
(setq process (funcall erc-server-connect-function
|
||||
(format "erc-%s-%s" server port) nil server port))
|
||||
(setq process (apply erc-server-connect-function args))
|
||||
(unless (processp process)
|
||||
(error "Connection attempt failed"))
|
||||
;; Misc server variables
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; erc-button.el --- A way of buttonizing certain things in ERC buffers -*- lexical-binding:t -*-
|
||||
;;; erc-button.el --- A way of buttonizing certain things in ERC buffers -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 1996-2004, 2006-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; erc-desktop-notifications.el -- Send notification on PRIVMSG or mentions -*- lexical-binding:t -*-
|
||||
;;; erc-desktop-notifications.el --- Send notification on PRIVMSG or mentions -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; erc-goodies.el --- Collection of ERC modules -*- lexical-binding: t; -*-
|
||||
;;; erc-goodies.el --- Collection of ERC modules -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; erc-imenu.el -- Imenu support for ERC -*- lexical-binding: t; -*-
|
||||
;;; erc-imenu.el --- Imenu support for ERC -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2001-2002, 2004, 2006-2021 Free Software Foundation,
|
||||
;; Inc.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; erc-menu.el -- Menu-bar definitions for ERC -*- lexical-binding: t; -*-
|
||||
;;; erc-menu.el --- Menu-bar definitions for ERC -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2001-2002, 2004-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; erc-page.el - CTCP PAGE support for ERC -*- lexical-binding: t; -*-
|
||||
;;; erc-page.el --- CTCP PAGE support for ERC -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2002, 2004, 2006-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; erc-replace.el -- wash and massage messages inserted into the buffer -*- lexical-binding: t; -*-
|
||||
;;; erc-replace.el --- wash and massage messages inserted into the buffer -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2001-2002, 2004, 2006-2021 Free Software Foundation,
|
||||
;; Inc.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; erc-ring.el -- Command history handling for erc using ring.el -*- lexical-binding: t; -*-
|
||||
;;; erc-ring.el --- Command history handling for erc using ring.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
100
lisp/erc/erc.el
100
lisp/erc/erc.el
|
@ -47,8 +47,12 @@
|
|||
;;
|
||||
;; M-x erc RET
|
||||
;;
|
||||
;; After you are connected to a server, you can use C-h m or have a look at
|
||||
;; the ERC menu.
|
||||
;; or
|
||||
;;
|
||||
;; M-x erc-tls RET
|
||||
;;
|
||||
;; to connect over TLS (encrypted). Once you are connected to a
|
||||
;; server, you can use C-h m or have a look at the ERC menu.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
@ -1967,7 +1971,8 @@ removed from the list will be disabled."
|
|||
(switch-to-buffer buffer)))))
|
||||
|
||||
(defun erc-open (&optional server port nick full-name
|
||||
connect passwd tgt-list channel process)
|
||||
connect passwd tgt-list channel process
|
||||
client-certificate)
|
||||
"Connect to SERVER on PORT as NICK with FULL-NAME.
|
||||
|
||||
If CONNECT is non-nil, connect to the server. Otherwise assume
|
||||
|
@ -1977,6 +1982,13 @@ target CHANNEL.
|
|||
Use PASSWD as user password on the server. If TGT-LIST is
|
||||
non-nil, use it to initialize `erc-default-recipients'.
|
||||
|
||||
CLIENT-CERTIFICATE, if non-nil, should either be a list where the
|
||||
first element is the file name of the private key corresponding
|
||||
to a client certificate and the second element is the file name
|
||||
of the client certificate itself to use when connecting over TLS,
|
||||
or t, which means that `auth-source' will be queried for the
|
||||
private key and the certificate.
|
||||
|
||||
Returns the buffer for the given server or channel."
|
||||
(let ((server-announced-name (when (and (boundp 'erc-session-server)
|
||||
(string= server erc-session-server))
|
||||
|
@ -2059,6 +2071,8 @@ Returns the buffer for the given server or channel."
|
|||
(if (functionp secret)
|
||||
(funcall secret)
|
||||
secret))))
|
||||
;; client certificate (only useful if connecting over TLS)
|
||||
(setq erc-session-client-certificate client-certificate)
|
||||
;; debug output buffer
|
||||
(setq erc-dbuf
|
||||
(when erc-log-p
|
||||
|
@ -2079,7 +2093,10 @@ Returns the buffer for the given server or channel."
|
|||
(run-hook-with-args 'erc-connect-pre-hook buffer)
|
||||
|
||||
(when connect
|
||||
(erc-server-connect erc-session-server erc-session-port buffer))
|
||||
(erc-server-connect erc-session-server
|
||||
erc-session-port
|
||||
buffer
|
||||
erc-session-client-certificate))
|
||||
(erc-update-mode-line)
|
||||
|
||||
;; Now display the buffer in a window as per user wishes.
|
||||
|
@ -2196,22 +2213,22 @@ parameters SERVER and NICK."
|
|||
"ERC is a powerful, modular, and extensible IRC client.
|
||||
This function is the main entry point for ERC.
|
||||
|
||||
It permits you to select connection parameters, and then starts ERC.
|
||||
It allows selecting connection parameters, and then starts ERC.
|
||||
|
||||
Non-interactively, it takes the keyword arguments
|
||||
(server (erc-compute-server))
|
||||
(port (erc-compute-port))
|
||||
(nick (erc-compute-nick))
|
||||
password
|
||||
(full-name (erc-compute-full-name)))
|
||||
(full-name (erc-compute-full-name))
|
||||
|
||||
That is, if called with
|
||||
|
||||
(erc :server \"chat.freenode.net\" :full-name \"Harry S Truman\")
|
||||
|
||||
then the server and full-name will be set to those values, whereas
|
||||
`erc-compute-port', `erc-compute-nick' and `erc-compute-full-name' will
|
||||
be invoked for the values of the other parameters."
|
||||
then the server and full-name will be set to those values,
|
||||
whereas `erc-compute-port' and `erc-compute-nick' will be invoked
|
||||
for the values of the other parameters."
|
||||
(interactive (erc-select-read-args))
|
||||
(erc-open server port nick full-name t password))
|
||||
|
||||
|
@ -2220,21 +2237,66 @@ be invoked for the values of the other parameters."
|
|||
(defalias 'erc-ssl #'erc-tls)
|
||||
|
||||
;;;###autoload
|
||||
(defun erc-tls (&rest r)
|
||||
"Interactively select TLS connection parameters and run ERC.
|
||||
Arguments are the same as for `erc'."
|
||||
(cl-defun erc-tls (&key (server (erc-compute-server))
|
||||
(port (erc-compute-port))
|
||||
(nick (erc-compute-nick))
|
||||
password
|
||||
(full-name (erc-compute-full-name))
|
||||
client-certificate)
|
||||
"ERC is a powerful, modular, and extensible IRC client.
|
||||
This function is the main entry point for ERC over TLS.
|
||||
|
||||
It allows selecting connection parameters, and then starts ERC
|
||||
over TLS.
|
||||
|
||||
Non-interactively, it takes the keyword arguments
|
||||
(server (erc-compute-server))
|
||||
(port (erc-compute-port))
|
||||
(nick (erc-compute-nick))
|
||||
password
|
||||
(full-name (erc-compute-full-name))
|
||||
client-certificate
|
||||
|
||||
That is, if called with
|
||||
|
||||
(erc-tls :server \"chat.freenode.net\" :full-name \"Harry S Truman\")
|
||||
|
||||
then the server and full-name will be set to those values,
|
||||
whereas `erc-compute-port' and `erc-compute-nick' will be invoked
|
||||
for the values of their respective parameters.
|
||||
|
||||
CLIENT-CERTIFICATE, if non-nil, should either be a list where the
|
||||
first element is the certificate key file name, and the second
|
||||
element is the certificate file name itself, or t, which means
|
||||
that `auth-source' will be queried for the key and the
|
||||
certificate. Authenticating using a TLS client certificate is
|
||||
also refered to as \"CertFP\" (Certificate Fingerprint)
|
||||
authentication by various IRC networks.
|
||||
|
||||
Example usage:
|
||||
|
||||
(erc-tls :server \"chat.freenode.net\" :port 6697
|
||||
:client-certificate
|
||||
'(\"/data/bandali/my-cert.key\"
|
||||
\"/data/bandali/my-cert.crt\"))"
|
||||
(interactive (let ((erc-default-port erc-default-port-tls))
|
||||
(erc-select-read-args)))
|
||||
(let ((erc-server-connect-function 'erc-open-tls-stream))
|
||||
(apply #'erc r)))
|
||||
(erc-open server port nick full-name t password
|
||||
nil nil nil client-certificate)))
|
||||
|
||||
(defun erc-open-tls-stream (name buffer host port)
|
||||
(defun erc-open-tls-stream (name buffer host port &rest parameters)
|
||||
"Open an TLS stream to an IRC server.
|
||||
The process will be given the name NAME, its target buffer will be
|
||||
BUFFER. HOST and PORT specify the connection target."
|
||||
(open-network-stream name buffer host port
|
||||
:nowait t
|
||||
:type 'tls))
|
||||
The process will be given the name NAME, its target buffer will
|
||||
be BUFFER. HOST and PORT specify the connection target.
|
||||
PARAMETERS should be a sequence of keywords and values, per
|
||||
`open-network-stream'."
|
||||
(let ((p (plist-put parameters :type 'tls))
|
||||
args)
|
||||
(unless (plist-member p :nowait)
|
||||
(setq p (plist-put p :nowait t)))
|
||||
(setq args `(,name ,buffer ,host ,port ,@p))
|
||||
(apply #'open-network-stream args)))
|
||||
|
||||
;;; Displaying error messages
|
||||
|
||||
|
|
|
@ -1648,13 +1648,14 @@ rather than FUN itself, to `minibuffer-setup-hook'."
|
|||
(when (eq (car-safe fun) :append)
|
||||
(setq append '(t) fun (cadr fun)))
|
||||
`(let ((,funsym ,fun)
|
||||
,hook)
|
||||
(setq ,hook
|
||||
(lambda ()
|
||||
;; Clear out this hook so it does not interfere
|
||||
;; with any recursive minibuffer usage.
|
||||
(remove-hook 'minibuffer-setup-hook ,hook)
|
||||
(funcall ,funsym)))
|
||||
;; Use a symbol to make sure `add-hook' doesn't waste time
|
||||
;; in `equal'ity testing (bug#46326).
|
||||
(,hook (make-symbol "minibuffer-setup")))
|
||||
(fset ,hook (lambda ()
|
||||
;; Clear out this hook so it does not interfere
|
||||
;; with any recursive minibuffer usage.
|
||||
(remove-hook 'minibuffer-setup-hook ,hook)
|
||||
(funcall ,funsym)))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(add-hook 'minibuffer-setup-hook ,hook ,@append)
|
||||
|
|
|
@ -2462,7 +2462,8 @@ the ephemeral group."
|
|||
(with-temp-file tmpfile
|
||||
(mm-disable-multibyte)
|
||||
(dolist (id ids)
|
||||
(let ((file (concat "~/.emacs.d/debbugs-cache/" id)))
|
||||
(let ((file (expand-file-name id (locate-user-emacs-file
|
||||
"debbugs-cache"))))
|
||||
(if (and (not gnus-plugged)
|
||||
(file-exists-p file))
|
||||
(insert-file-contents file)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; gnus-notifications.el -- Send notification on new message in Gnus -*- lexical-binding: t; -*-
|
||||
;;; gnus-notifications.el --- Send notification on new message in Gnus -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -8089,7 +8089,7 @@ Return nil if there are no unseen articles."
|
|||
|
||||
(defun gnus-summary-first-unseen-or-unread-subject ()
|
||||
"Place the point on the subject line of the first unseen and unread article.
|
||||
If all article have been seen, on the subject line of the first unread
|
||||
If all articles have been seen, on the subject line of the first unread
|
||||
article."
|
||||
(interactive nil gnus-summary-mode)
|
||||
(prog1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; gnus-agent.el --- Legacy unplugged support for Gnus -*- lexical-binding: t; -*-
|
||||
;;; legacy-gnus-agent.el --- Legacy unplugged support for Gnus -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2004-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -108,4 +108,4 @@
|
|||
|
||||
(provide 'mm-archive)
|
||||
|
||||
;; mm-archive.el ends here
|
||||
;;; mm-archive.el ends here
|
||||
|
|
|
@ -378,4 +378,4 @@ Process queued spam reports."
|
|||
|
||||
(provide 'spam-report)
|
||||
|
||||
;;; spam-report.el ends here.
|
||||
;;; spam-report.el ends here
|
||||
|
|
|
@ -83,7 +83,8 @@ gives the window that lists the options."
|
|||
:type 'boolean
|
||||
:group 'help)
|
||||
|
||||
(defmacro make-help-screen (fname help-line help-text helped-map)
|
||||
(defmacro make-help-screen (fname help-line help-text helped-map
|
||||
&optional buffer-name)
|
||||
"Construct help-menu function name FNAME.
|
||||
When invoked, FNAME shows HELP-LINE and reads a command using HELPED-MAP.
|
||||
If the command is the help character, FNAME displays HELP-TEXT
|
||||
|
@ -132,7 +133,7 @@ and then returns."
|
|||
(when (or (eq char ??) (eq char help-char)
|
||||
(memq char help-event-list))
|
||||
(setq config (current-window-configuration))
|
||||
(pop-to-buffer " *Metahelp*" nil t)
|
||||
(pop-to-buffer (or ,buffer-name " *Metahelp*") nil t)
|
||||
(and (fboundp 'make-frame)
|
||||
(not (eq (window-frame)
|
||||
prev-frame))
|
||||
|
@ -166,7 +167,12 @@ and then returns."
|
|||
(format "Type one of the options listed%s: "
|
||||
(if (pos-visible-in-window-p
|
||||
(point-max))
|
||||
"" ", or SPACE or DEL to scroll")))
|
||||
""
|
||||
(concat ", or "
|
||||
(help--key-description-fontified "\s") ; SPC
|
||||
" or "
|
||||
(help--key-description-fontified "\d") ; DEL
|
||||
" to scroll"))))
|
||||
char (aref key 0)))
|
||||
|
||||
;; If this is a scroll bar command, just run it.
|
||||
|
|
163
lisp/help.el
163
lisp/help.el
|
@ -187,59 +187,120 @@ Do not call this in the scope of `with-help-window'."
|
|||
;; So keyboard macro definitions are documented correctly
|
||||
(fset 'defining-kbd-macro (symbol-function 'start-kbd-macro))
|
||||
|
||||
|
||||
;;; Help for help. (a.k.a. `C-h C-h')
|
||||
|
||||
(defvar help-for-help-buffer-name " *Metahelp*"
|
||||
"Name of the `help-for-help' buffer.")
|
||||
|
||||
(defface help-for-help-header '((t :height 1.26))
|
||||
"Face used for headers in the `help-for-help' buffer."
|
||||
:group 'help)
|
||||
|
||||
(defun help--for-help-make-commands (commands)
|
||||
"Create commands for `help-for-help' screen from COMMANDS."
|
||||
(mapconcat
|
||||
(lambda (cmd)
|
||||
(if (listp cmd)
|
||||
(let ((name (car cmd)) (desc (cadr cmd)))
|
||||
(concat
|
||||
" "
|
||||
(if (string-match (rx string-start "C-" word string-end) name)
|
||||
;; `help--key-description-fontified' would convert "C-m" to
|
||||
;; "RET" so we can't use it here.
|
||||
(propertize name 'face 'help-key-binding)
|
||||
(concat "\\[" name "]"))
|
||||
(propertize "\t" 'display '(space :align-to 8))
|
||||
desc))
|
||||
""))
|
||||
commands "\n"))
|
||||
|
||||
(defun help--for-help-make-sections (sections)
|
||||
"Create sections for `help-for-help' screen from SECTIONS."
|
||||
(mapconcat
|
||||
(lambda (section)
|
||||
(let ((title (car section)) (commands (cdr section)))
|
||||
(concat
|
||||
"\n\n"
|
||||
(propertize title 'face 'help-for-help-header)
|
||||
"\n\n"
|
||||
(help--for-help-make-commands commands))))
|
||||
sections ""))
|
||||
|
||||
(defalias 'help 'help-for-help)
|
||||
(make-help-screen help-for-help
|
||||
(purecopy "Type a help option: [abcCdefFgiIkKlLmnprstvw.] C-[cdefmnoptw] or ?")
|
||||
"You have typed %THIS-KEY%, the help character. Type a Help option:
|
||||
\(Use SPC or DEL to scroll through this text. Type \\<help-map>\\[help-quit] to exit the Help command.)
|
||||
|
||||
\\[apropos-command] PATTERN Show commands whose name matches the PATTERN (a list of words
|
||||
or a regexp). See also \\[apropos].
|
||||
\\[describe-bindings] Display all key bindings.
|
||||
\\[describe-key-briefly] KEYS Display the command name run by the given key sequence.
|
||||
\\[describe-coding-system] CODING Describe the given coding system, or RET for current ones.
|
||||
\\[apropos-documentation] PATTERN Show a list of functions, variables, and other items whose
|
||||
documentation matches the PATTERN (a list of words or a regexp).
|
||||
\\[view-echo-area-messages] Go to the *Messages* buffer which logs echo-area messages.
|
||||
\\[describe-function] FUNCTION Display documentation for the given function.
|
||||
\\[Info-goto-emacs-command-node] COMMAND Show the Emacs manual's section that describes the command.
|
||||
\\[describe-gnu-project] Display information about the GNU project.
|
||||
\\[view-hello-file] Display the HELLO file which illustrates various scripts.
|
||||
\\[info] Start the Info documentation reader: read included manuals.
|
||||
\\[describe-input-method] METHOD Describe a specific input method, or RET for current.
|
||||
\\[describe-key] KEYS Display the full documentation for the key sequence.
|
||||
\\[Info-goto-emacs-key-command-node] KEYS Show the Emacs manual's section for the command bound to KEYS.
|
||||
\\[view-lossage] Show last 300 input keystrokes (lossage).
|
||||
\\[describe-language-environment] LANG-ENV Describe a specific language environment, or RET for current.
|
||||
\\[describe-mode] Display documentation of current minor modes and current major mode,
|
||||
including their special commands.
|
||||
\\[view-emacs-news] Display news of recent Emacs changes.
|
||||
\\[describe-symbol] SYMBOL Display the given function or variable's documentation and value.
|
||||
\\[finder-by-keyword] TOPIC Find packages matching a given topic keyword.
|
||||
\\[describe-package] PACKAGE Describe the given Emacs Lisp package.
|
||||
\\[info-emacs-manual] Display the Emacs manual in Info mode.
|
||||
\\[info-display-manual] Prompt for a manual and then display it in Info mode.
|
||||
\\[describe-syntax] Display contents of current syntax table, plus explanations.
|
||||
\\[info-lookup-symbol] SYMBOL Show the section for the given symbol in the Info manual
|
||||
for the programming language used in this buffer.
|
||||
\\[help-with-tutorial] Start the Emacs learn-by-doing tutorial.
|
||||
\\[describe-variable] VARIABLE Display the given variable's documentation and value.
|
||||
\\[where-is] COMMAND Display which keystrokes invoke the given command (where-is).
|
||||
\\[display-local-help] Display any available local help at point in the echo area.
|
||||
|
||||
\\[about-emacs] Information about Emacs.
|
||||
\\[describe-copying] Emacs copying permission (GNU General Public License).
|
||||
\\[view-emacs-debugging] Instructions for debugging GNU Emacs.
|
||||
\\[view-external-packages] External packages and information about Emacs.
|
||||
\\[view-emacs-FAQ] Emacs FAQ.
|
||||
C-m How to order printed Emacs manuals.
|
||||
C-n News of recent Emacs changes.
|
||||
\\[describe-distribution] Emacs ordering and distribution information.
|
||||
\\[view-emacs-problems] Info about known Emacs problems.
|
||||
\\[search-forward-help-for-help] Search forward \"help window\".
|
||||
\\[view-emacs-todo] Emacs TODO list.
|
||||
\\[describe-no-warranty] Information on absence of warranty for GNU Emacs."
|
||||
help-map)
|
||||
(concat
|
||||
"\(Type "
|
||||
(help--key-description-fontified "\s") ; SPC
|
||||
" or "
|
||||
(help--key-description-fontified "\d") ; DEL
|
||||
" to scroll, "
|
||||
(help--key-description-fontified "\C-s")
|
||||
" to search, or \\<help-map>\\[help-quit] to exit.)"
|
||||
(help--for-help-make-sections
|
||||
'(("Commands, Keys and Functions"
|
||||
("describe-mode"
|
||||
"Show help for current major and minor modes and their commands")
|
||||
("describe-bindings" "Show all key bindings")
|
||||
("describe-key" "Show help for key")
|
||||
("describe-key-briefly" "Show help for key briefly")
|
||||
("where-is" "Show which key runs a specific command")
|
||||
""
|
||||
("apropos-command"
|
||||
"Search for commands (see also \\[apropos])")
|
||||
("apropos-documentation"
|
||||
"Search documentation of functions, variables, and other items")
|
||||
("describe-function" "Show help for function")
|
||||
("describe-variable" "Show help for variable")
|
||||
("describe-symbol" "Show help for function or variable"))
|
||||
("Manuals"
|
||||
("info-emacs-manual" "Show Emacs manual")
|
||||
("Info-goto-emacs-command-node"
|
||||
"Show Emacs manual section for command")
|
||||
("Info-goto-emacs-key-command-node"
|
||||
"Show Emacs manual section for a key sequence")
|
||||
("info" "Show all installed manuals")
|
||||
("info-display-manual" "Show a specific manual")
|
||||
("info-lookup-symbol" "Show description of symbol in pertinent manual"))
|
||||
("Other Help Commands"
|
||||
("view-external-packages"
|
||||
"Extending Emacs with external packages")
|
||||
("finder-by-keyword"
|
||||
"Search for Emacs packages (see also \\[list-packages])")
|
||||
("describe-package" "Describe a specific Emacs package")
|
||||
""
|
||||
("help-with-tutorial" "Start the Emacs tutorial")
|
||||
("view-echo-area-messages"
|
||||
"Show recent messages (from echo area)")
|
||||
("view-lossage" "Show last 300 input keystrokes (lossage)")
|
||||
("display-local-help" "Show local help at point"))
|
||||
("Miscellaneous"
|
||||
("about-emacs" "About Emacs")
|
||||
("view-emacs-FAQ" "Emacs FAQ")
|
||||
("C-n" "News of recent changes")
|
||||
("view-emacs-problems" "Known problems")
|
||||
("view-emacs-debugging" "Debugging Emacs")
|
||||
""
|
||||
("describe-gnu-project" "About the GNU project")
|
||||
("describe-copying"
|
||||
"Emacs copying permission (GNU General Public License)")
|
||||
("describe-distribution"
|
||||
"Emacs ordering and distribution information")
|
||||
("C-m" "Order printed manuals")
|
||||
("view-emacs-todo" "Emacs TODO")
|
||||
("describe-no-warranty"
|
||||
"Information on absence of warranty"))
|
||||
("Internationalization and Coding Systems"
|
||||
("describe-input-method" "Describe input method")
|
||||
("describe-coding-system" "Describe coding system")
|
||||
("describe-language-environment"
|
||||
"Describe language environment")
|
||||
("describe-syntax" "Show current syntax table")
|
||||
("view-hello-file"
|
||||
"Display the HELLO file illustrating various scripts")))))
|
||||
help-map
|
||||
help-for-help-buffer-name)
|
||||
|
||||
|
||||
|
||||
|
@ -885,7 +946,7 @@ current buffer."
|
|||
"Search forward \"help window\"."
|
||||
(interactive)
|
||||
;; Move cursor to the "help window".
|
||||
(pop-to-buffer " *Metahelp*")
|
||||
(pop-to-buffer help-for-help-buffer-name)
|
||||
;; Do incremental search forward.
|
||||
(isearch-forward nil t))
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; info.el --- Info package for Emacs -*- lexical-binding:t -*-
|
||||
;;; info.el --- Info package for Emacs -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 1985-1986, 1992-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -916,7 +916,8 @@ find a node."
|
|||
(when (and (not no-pop-to-dir)
|
||||
(not Info-current-file))
|
||||
(Info-directory))
|
||||
(user-error "Info file %s does not exist" filename)))
|
||||
(user-error "Info file `%s' does not exist; consider installing it"
|
||||
filename)))
|
||||
filename))))
|
||||
|
||||
(defun Info-find-node (filename nodename &optional no-going-back strict-case)
|
||||
|
|
|
@ -3047,7 +3047,7 @@ on encoding."
|
|||
(#x1D000 . #x1FFFF)
|
||||
;; (#x20000 . #xDFFFF) CJK Ideograph Extension A, B, etc, unused
|
||||
(#xE0000 . #xE01FF)))
|
||||
(gc-cons-threshold 10000000)
|
||||
(gc-cons-threshold (max gc-cons-threshold 10000000))
|
||||
(names (make-hash-table :size 42943 :test #'equal)))
|
||||
(dolist (range ranges)
|
||||
(let ((c (car range))
|
||||
|
|
|
@ -972,12 +972,13 @@ Each element is an `isearch--state' struct where the slots are
|
|||
(defvar-local isearch-mode nil) ;; Name of the minor mode, if non-nil.
|
||||
|
||||
(define-key global-map "\C-s" 'isearch-forward)
|
||||
(define-key esc-map "\C-s" 'isearch-forward-regexp)
|
||||
(define-key esc-map "\C-s" 'isearch-forward-regexp)
|
||||
(define-key global-map "\C-r" 'isearch-backward)
|
||||
(define-key esc-map "\C-r" 'isearch-backward-regexp)
|
||||
(define-key search-map "w" 'isearch-forward-word)
|
||||
(define-key search-map "_" 'isearch-forward-symbol)
|
||||
(define-key search-map "." 'isearch-forward-symbol-at-point)
|
||||
(define-key esc-map "\C-r" 'isearch-backward-regexp)
|
||||
(define-key search-map "w" 'isearch-forward-word)
|
||||
(define-key search-map "_" 'isearch-forward-symbol)
|
||||
(define-key search-map "." 'isearch-forward-symbol-at-point)
|
||||
(define-key search-map "\M-." 'isearch-forward-thing-at-point)
|
||||
|
||||
;; Entry points to isearch-mode.
|
||||
|
||||
|
@ -1157,6 +1158,42 @@ positive, or search for ARGth symbol backward if ARG is negative."
|
|||
(isearch-push-state)
|
||||
(isearch-update)))))
|
||||
|
||||
(defcustom isearch-forward-thing-at-point '(region url symbol sexp)
|
||||
"A list of symbols to try to get the \"thing\" at point.
|
||||
Each element of the list should be one of the symbols supported by
|
||||
`bounds-of-thing-at-point'. This variable is used by the command
|
||||
`isearch-forward-thing-at-point' to yank the initial \"thing\"
|
||||
as text to the search string."
|
||||
:type '(repeat (symbol :tag "Thing symbol"))
|
||||
:version "28.1")
|
||||
|
||||
(defun isearch-forward-thing-at-point ()
|
||||
"Do incremental search forward for the \"thing\" found near point.
|
||||
Like ordinary incremental search except that the \"thing\" found at point
|
||||
is added to the search string initially. The \"thing\" is defined by
|
||||
`bounds-of-thing-at-point'. You can customize the variable
|
||||
`isearch-forward-thing-at-point' to define a list of symbols to try
|
||||
to find a \"thing\" at point. For example, when the list contains
|
||||
the symbol `region' and the region is active, then text from the
|
||||
active region is added to the search string."
|
||||
(interactive)
|
||||
(isearch-forward nil 1)
|
||||
(let ((bounds (seq-some (lambda (thing)
|
||||
(bounds-of-thing-at-point thing))
|
||||
isearch-forward-thing-at-point)))
|
||||
(cond
|
||||
(bounds
|
||||
(when (use-region-p)
|
||||
(deactivate-mark))
|
||||
(when (< (car bounds) (point))
|
||||
(goto-char (car bounds)))
|
||||
(isearch-yank-string
|
||||
(buffer-substring-no-properties (car bounds) (cdr bounds))))
|
||||
(t
|
||||
(setq isearch-error "No thing at point")
|
||||
(isearch-push-state)
|
||||
(isearch-update)))))
|
||||
|
||||
|
||||
;; isearch-mode only sets up incremental search for the minor mode.
|
||||
;; All the work is done by the isearch-mode commands.
|
||||
|
@ -1337,7 +1374,8 @@ The last thing is to trigger a new round of lazy highlighting."
|
|||
;; the X coordinate it returns is 1 pixel beyond
|
||||
;; the last visible one.
|
||||
(>= (car visible-p)
|
||||
(* (window-max-chars-per-line) (frame-char-width))))
|
||||
(* (window-max-chars-per-line) (frame-char-width)))
|
||||
(< (car visible-p) 0))
|
||||
(set-window-hscroll (selected-window) current-scroll))))
|
||||
(if isearch-other-end
|
||||
(if (< isearch-other-end (point)) ; isearch-forward?
|
||||
|
@ -3056,10 +3094,6 @@ See more for options in `search-exit-option'."
|
|||
(goto-char isearch-pre-move-point))
|
||||
(isearch-search-and-update)))
|
||||
(setq isearch-pre-move-point nil))
|
||||
;; Terminate the search if point has moved to another buffer.
|
||||
(unless (eq isearch--current-buffer (current-buffer))
|
||||
(when (buffer-live-p isearch--current-buffer)
|
||||
(with-current-buffer isearch--current-buffer (isearch-exit))))
|
||||
(force-mode-line-update))
|
||||
|
||||
(defun isearch-quote-char (&optional count)
|
||||
|
|
|
@ -55,3 +55,5 @@
|
|||
(vector "." 0 #'font-shape-gstring))))
|
||||
(set-char-table-range composition-function-table '(#x1000 . #x107F) elt)
|
||||
(set-char-table-range composition-function-table '(#xAA60 . #xAA7B) elt))
|
||||
|
||||
;;; burmese.el ends here
|
||||
|
|
|
@ -43,3 +43,5 @@ an Austronesian language spoken by some 245,000 Chams
|
|||
in Vietnam and Cambodia.")))
|
||||
|
||||
(provide 'cham)
|
||||
|
||||
;;; cham.el ends here
|
||||
|
|
|
@ -35,4 +35,4 @@
|
|||
(set-char-table-range composition-function-table '(#x1780 . #x17FF) val)
|
||||
(set-char-table-range composition-function-table '(#x19E0 . #x19FF) val))
|
||||
|
||||
;; khmer.el ends here
|
||||
;;; khmer.el ends here
|
||||
|
|
|
@ -45,4 +45,4 @@
|
|||
"[\u0D80-\u0DFF]")
|
||||
0 #'font-shape-gstring)))
|
||||
|
||||
;; sinhala.el ends here
|
||||
;;; sinhala.el ends here
|
||||
|
|
|
@ -56,3 +56,5 @@ The language name is spelled as \"ꪁꪫꪱꪣ ꪼꪕ\", and the script name is
|
|||
spelled as \"ꪎꪳ ꪼꪕ\".")))
|
||||
|
||||
(provide 'tai-viet)
|
||||
|
||||
;;; tai-viet.el ends here
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; thai-word.el -- find Thai word boundaries -*- lexical-binding: t; -*-
|
||||
;;; thai-word.el --- find Thai word boundaries -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
|
||||
;; National Institute of Advanced Industrial Science and Technology (AIST)
|
||||
|
@ -11074,4 +11074,4 @@ With argument, do this that many times."
|
|||
;; coding: utf-8
|
||||
;; End:
|
||||
|
||||
;; thai-word.el ends here
|
||||
;;; thai-word.el ends here
|
||||
|
|
|
@ -136,5 +136,6 @@
|
|||
(if (looking-at tai-viet-re)
|
||||
(tai-viet-compose-region from (match-end 0)))))
|
||||
|
||||
;;
|
||||
(provide 'tai-viet-util)
|
||||
|
||||
;;; tv-util.el ends here
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; croatian.el -- Quail package for inputting Croatian -*-coding: utf-8; lexical-binding:t -*-
|
||||
;;; croatian.el --- Quail package for inputting Croatian -*-coding: utf-8; lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; hebrew.el --- Quail package for inputting Hebrew characters -*- coding: utf-8; lexical-binding: t -*-
|
||||
;;; hebrew.el --- Quail package for inputting Hebrew characters -*- coding: utf-8; lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
;; 2008, 2009, 2010, 2011
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; persian.el --- Quail package for inputting Persian/Farsi keyboard -*- coding: utf-8; lexical-binding: t -*-
|
||||
;;; persian.el --- Quail package for inputting Persian/Farsi keyboard -*- coding: utf-8; lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2011-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -555,4 +555,4 @@ checks to see if the old format is used, and updates it if necessary."
|
|||
|
||||
(provide 'rmail-spam-filter)
|
||||
|
||||
;;; rmail-spam-filter ends here
|
||||
;;; rmail-spam-filter.el ends here
|
||||
|
|
|
@ -784,9 +784,11 @@ directly."
|
|||
(let ((encoding (rmail-mime-entity-transfer-encoding entity)))
|
||||
(setq size (- (aref body 1) (aref body 0)))
|
||||
(cond ((string= encoding "base64")
|
||||
(setq size (/ (* size 3) 4)))
|
||||
;; https://en.wikipedia.org/wiki/Base64#MIME
|
||||
(setq size (* size 0.73)))
|
||||
((string= encoding "quoted-printable")
|
||||
(setq size (/ (* size 7) 3)))))))
|
||||
;; Assume most of the text is ASCII...
|
||||
(setq size (/ (* size 5) 7)))))))
|
||||
|
||||
(cond
|
||||
((string-match "text/html" content-type)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; uudecode.el -- elisp native uudecode -*- lexical-binding:t -*-
|
||||
;;; uudecode.el --- elisp native uudecode -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; mh-search --- MH-Search mode -*- lexical-binding: t; -*-
|
||||
;;; mh-search.el --- MH-Search mode -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1993, 1995, 2001-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1943,4 +1943,4 @@ folder buffer."
|
|||
;; sentence-end-double-space: nil
|
||||
;; End:
|
||||
|
||||
;;; mh-search ends here
|
||||
;;; mh-search.el ends here
|
||||
|
|
|
@ -271,7 +271,7 @@ the form (concat S2 S)."
|
|||
(let* ((str (if (string-prefix-p s1 string completion-ignore-case)
|
||||
(concat s2 (substring string (length s1)))))
|
||||
(res (if str (complete-with-action action table str pred))))
|
||||
(when res
|
||||
(when (or res (eq (car-safe action) 'boundaries))
|
||||
(cond
|
||||
((eq (car-safe action) 'boundaries)
|
||||
(let ((beg (or (and (eq (car-safe res) 'boundaries) (cadr res)) 0)))
|
||||
|
@ -489,12 +489,12 @@ for use at QPOS."
|
|||
(ufull (if (zerop (length qsuffix)) ustring
|
||||
(funcall unquote (concat string qsuffix))))
|
||||
;; If (not (string-prefix-p ustring ufull)) we have a problem:
|
||||
;; the unquoting the qfull gives something "unrelated" to ustring.
|
||||
;; unquoting the qfull gives something "unrelated" to ustring.
|
||||
;; E.g. "~/" and "/" where "~//" gets unquoted to just "/" (see
|
||||
;; bug#47678).
|
||||
;; In that case we can't even tell if we're right before the
|
||||
;; "/" or right after it (aka if this "/" is from qstring or
|
||||
;; from qsuffix), which which usuffix to use is very unclear.
|
||||
;; from qsuffix), thus which usuffix to use is very unclear.
|
||||
(usuffix (if (string-prefix-p ustring ufull)
|
||||
(substring ufull (length ustring))
|
||||
;; FIXME: Maybe "" is preferable/safer?
|
||||
|
@ -1355,6 +1355,52 @@ scroll the window of possible completions."
|
|||
(if (eq (car bounds) base) md-at-point
|
||||
(completion-metadata (substring string 0 base) table pred))))
|
||||
|
||||
(defun minibuffer--sort-by-key (elems keyfun)
|
||||
"Return ELEMS sorted by increasing value of their KEYFUN.
|
||||
KEYFUN takes an element of ELEMS and should return a numerical value."
|
||||
(mapcar #'cdr
|
||||
(sort (mapcar (lambda (x) (cons (funcall keyfun x) x)) elems)
|
||||
#'car-less-than-car)))
|
||||
|
||||
(defun minibuffer--sort-by-position (hist elems)
|
||||
"Sort ELEMS by their position in HIST."
|
||||
(let ((hash (make-hash-table :test #'equal :size (length hist)))
|
||||
(index 0))
|
||||
;; Record positions in hash
|
||||
(dolist (c hist)
|
||||
(unless (gethash c hash)
|
||||
(puthash c index hash))
|
||||
(cl-incf index))
|
||||
(minibuffer--sort-by-key
|
||||
elems (lambda (x) (gethash x hash most-positive-fixnum)))))
|
||||
|
||||
(defun minibuffer--sort-by-length-alpha (elems)
|
||||
"Sort ELEMS first by length, then alphabetically."
|
||||
(sort elems (lambda (c1 c2)
|
||||
(or (< (length c1) (length c2))
|
||||
(and (= (length c1) (length c2))
|
||||
(string< c1 c2))))))
|
||||
|
||||
(defun minibuffer--sort-preprocess-history (base)
|
||||
"Preprocess history.
|
||||
Remove completion BASE prefix string from history elements."
|
||||
(let* ((def (if (stringp minibuffer-default)
|
||||
minibuffer-default
|
||||
(car-safe minibuffer-default)))
|
||||
(hist (and (not (eq minibuffer-history-variable t))
|
||||
(symbol-value minibuffer-history-variable)))
|
||||
(base-size (length base)))
|
||||
;; Default comes first.
|
||||
(setq hist (if def (cons def hist) hist))
|
||||
;; Drop base string from the history elements.
|
||||
(if (= base-size 0)
|
||||
hist
|
||||
(delq nil (mapcar
|
||||
(lambda (c)
|
||||
(when (string-prefix-p base c)
|
||||
(substring c base-size)))
|
||||
hist)))))
|
||||
|
||||
(defun completion-all-sorted-completions (&optional start end)
|
||||
(or completion-all-sorted-completions
|
||||
(let* ((start (or start (minibuffer-prompt-end)))
|
||||
|
@ -1384,23 +1430,18 @@ scroll the window of possible completions."
|
|||
(setq all (delete-dups all))
|
||||
(setq last (last all))
|
||||
|
||||
(cond
|
||||
(sort-fun
|
||||
(setq all (funcall sort-fun all)))
|
||||
(t
|
||||
;; Prefer shorter completions, by default.
|
||||
(setq all (sort all (lambda (c1 c2) (< (length c1) (length c2)))))
|
||||
(if (minibufferp)
|
||||
;; Prefer recently used completions and put the default, if
|
||||
;; it exists, on top.
|
||||
(let ((hist (symbol-value minibuffer-history-variable)))
|
||||
(setq all
|
||||
(sort all
|
||||
(lambda (c1 c2)
|
||||
(cond ((equal c1 minibuffer-default) t)
|
||||
((equal c2 minibuffer-default) nil)
|
||||
(t (> (length (member c1 hist))
|
||||
(length (member c2 hist))))))))))))
|
||||
(if sort-fun
|
||||
(setq all (funcall sort-fun all))
|
||||
;; Sort first by length and alphabetically.
|
||||
(setq all (minibuffer--sort-by-length-alpha all))
|
||||
;; Sort by history position, put the default, if it
|
||||
;; exists, on top.
|
||||
(when (minibufferp)
|
||||
(setq all (minibuffer--sort-by-position
|
||||
(minibuffer--sort-preprocess-history
|
||||
(substring string 0 base-size))
|
||||
all))))
|
||||
|
||||
;; Cache the result. This is not just for speed, but also so that
|
||||
;; repeated calls to minibuffer-force-complete can cycle through
|
||||
;; all possibilities.
|
||||
|
@ -1423,7 +1464,7 @@ scroll the window of possible completions."
|
|||
;; test-completion, then we shouldn't exit, but that should be rare.
|
||||
(lambda ()
|
||||
(if minibuffer--require-match
|
||||
(minibuffer-message "Incomplete")
|
||||
(completion--message "Incomplete")
|
||||
;; If a match is not required, exit after all.
|
||||
(exit-minibuffer)))))
|
||||
|
||||
|
@ -2008,7 +2049,7 @@ variables.")
|
|||
;; the sole completion, then hide (previous&stale) completions.
|
||||
(minibuffer-hide-completions)
|
||||
(ding)
|
||||
(minibuffer-message
|
||||
(completion--message
|
||||
(if completions "Sole completion" "No completions")))
|
||||
|
||||
(let* ((last (last completions))
|
||||
|
@ -2444,10 +2485,33 @@ with `minibuffer-local-must-match-map'.")
|
|||
(defvar minibuffer-local-filename-must-match-map (make-sparse-keymap))
|
||||
(make-obsolete-variable 'minibuffer-local-filename-must-match-map nil "24.1")
|
||||
|
||||
(let ((map minibuffer-local-ns-map))
|
||||
(define-key map " " 'exit-minibuffer)
|
||||
(define-key map "\t" 'exit-minibuffer)
|
||||
(define-key map "?" 'self-insert-and-exit))
|
||||
(defvar minibuffer-local-ns-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map minibuffer-local-map)
|
||||
(define-key map " " #'exit-minibuffer)
|
||||
(define-key map "\t" #'exit-minibuffer)
|
||||
(define-key map "?" #'self-insert-and-exit)
|
||||
map)
|
||||
"Local keymap for the minibuffer when spaces are not allowed.")
|
||||
|
||||
(defun read-no-blanks-input (prompt &optional initial inherit-input-method)
|
||||
"Read a string from the terminal, not allowing blanks.
|
||||
Prompt with PROMPT. Whitespace terminates the input. If INITIAL is
|
||||
non-nil, it should be a string, which is used as initial input, with
|
||||
point positioned at the end, so that SPACE will accept the input.
|
||||
\(Actually, INITIAL can also be a cons of a string and an integer.
|
||||
Such values are treated as in `read-from-minibuffer', but are normally
|
||||
not useful in this function.)
|
||||
|
||||
Third arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits
|
||||
the current input method and the setting of`enable-multibyte-characters'.
|
||||
|
||||
If `inhibit-interaction' is non-nil, this function will signal an
|
||||
`inhibited-interaction' error."
|
||||
(read-from-minibuffer prompt initial minibuffer-local-ns-map
|
||||
nil minibuffer-history nil inherit-input-method))
|
||||
|
||||
;;; Major modes for the minibuffer
|
||||
|
||||
(defvar minibuffer-inactive-mode-map
|
||||
(let ((map (make-keymap)))
|
||||
|
@ -2474,6 +2538,18 @@ not active.")
|
|||
"Major mode to use in the minibuffer when it is not active.
|
||||
This is only used when the minibuffer area has no active minibuffer.")
|
||||
|
||||
(defvaralias 'minibuffer-mode-map 'minibuffer-local-map)
|
||||
|
||||
(define-derived-mode minibuffer-mode nil "Minibuffer"
|
||||
"Major mode used for active minibuffers.
|
||||
|
||||
For customizing this mode, it is better to use
|
||||
`minibuffer-setup-hook' and `minibuffer-exit-hook' rather than
|
||||
the mode hook of this mode."
|
||||
:syntax-table nil
|
||||
:abbrev-table nil
|
||||
:interactive nil)
|
||||
|
||||
;;; Completion tables.
|
||||
|
||||
(defun minibuffer--double-dollars (str)
|
||||
|
|
|
@ -206,7 +206,7 @@ search status stack."
|
|||
(multi-isearch-pop-state cmd ,(current-buffer))))
|
||||
|
||||
(defun multi-isearch-pop-state (_cmd buffer)
|
||||
"Restore the multiple buffers search state.
|
||||
"Restore the multiple buffers search state in BUFFER.
|
||||
Switch to the buffer restored from the search status stack."
|
||||
(unless (equal buffer (current-buffer))
|
||||
(switch-to-buffer (setq multi-isearch-current-buffer buffer))))
|
||||
|
|
158
lisp/mpc.el
158
lisp/mpc.el
|
@ -183,7 +183,7 @@ numerically rather than lexicographically."
|
|||
(abs res))
|
||||
res))))))))
|
||||
|
||||
(define-obsolete-function-alias 'mpc-string-prefix-p 'string-prefix-p "24.3")
|
||||
(define-obsolete-function-alias 'mpc-string-prefix-p #'string-prefix-p "24.3")
|
||||
|
||||
;; This can speed up mpc--song-search significantly. The table may grow
|
||||
;; very large, tho. It's only bounded by the fact that it gets flushed
|
||||
|
@ -291,11 +291,11 @@ defaults to 6600 and HOST defaults to localhost."
|
|||
(let ((plist (process-plist mpc-proc)))
|
||||
(while plist (process-put proc (pop plist) (pop plist)))))
|
||||
(mpc-proc-buffer proc 'mpd-commands (current-buffer))
|
||||
(process-put proc 'callback 'ignore)
|
||||
(process-put proc 'callback #'ignore)
|
||||
(process-put proc 'ready nil)
|
||||
(clrhash mpc--find-memoize)
|
||||
(set-process-filter proc 'mpc--proc-filter)
|
||||
(set-process-sentinel proc 'ignore)
|
||||
(set-process-filter proc #'mpc--proc-filter)
|
||||
(set-process-sentinel proc #'ignore)
|
||||
(set-process-query-on-exit-flag proc nil)
|
||||
;; This may be called within a process filter ;-(
|
||||
(with-local-quit (mpc-proc-sync proc))
|
||||
|
@ -376,7 +376,7 @@ which will be concatenated with proper quoting before passing them to MPD."
|
|||
(mpc--debug "Send \"%s\"" cmd)
|
||||
(process-send-string
|
||||
proc (concat (if (stringp cmd) cmd
|
||||
(mapconcat 'mpc--proc-quote-string cmd " "))
|
||||
(mapconcat #'mpc--proc-quote-string cmd " "))
|
||||
"\n")))
|
||||
(if callback
|
||||
;; (let ((buf (current-buffer)))
|
||||
|
@ -388,7 +388,7 @@ which will be concatenated with proper quoting before passing them to MPD."
|
|||
;; (set-buffer buf)))))
|
||||
)
|
||||
;; If `callback' is nil, we're executing synchronously.
|
||||
(process-put proc 'callback 'ignore)
|
||||
(process-put proc 'callback #'ignore)
|
||||
;; This returns the process's buffer.
|
||||
(mpc-proc-sync proc)))))
|
||||
|
||||
|
@ -398,7 +398,7 @@ which will be concatenated with proper quoting before passing them to MPD."
|
|||
(concat "command_list_begin\n"
|
||||
(mapconcat (lambda (cmd)
|
||||
(if (stringp cmd) cmd
|
||||
(mapconcat 'mpc--proc-quote-string cmd " ")))
|
||||
(mapconcat #'mpc--proc-quote-string cmd " ")))
|
||||
cmds
|
||||
"\n")
|
||||
"\ncommand_list_end"))
|
||||
|
@ -488,9 +488,9 @@ to call FUN for any change whatsoever.")
|
|||
|
||||
(defvar mpc--status-timer nil)
|
||||
(defun mpc--status-timer-start ()
|
||||
(add-hook 'pre-command-hook 'mpc--status-timer-stop)
|
||||
(add-hook 'pre-command-hook #'mpc--status-timer-stop)
|
||||
(unless mpc--status-timer
|
||||
(setq mpc--status-timer (run-with-timer 1 1 'mpc--status-timer-run))))
|
||||
(setq mpc--status-timer (run-with-timer 1 1 #'mpc--status-timer-run))))
|
||||
(defun mpc--status-timer-stop ()
|
||||
(when mpc--status-timer
|
||||
(cancel-timer mpc--status-timer)
|
||||
|
@ -510,7 +510,7 @@ to call FUN for any change whatsoever.")
|
|||
;; Turn it off even if we'll start it again, in case it changes the delay.
|
||||
(cancel-timer mpc--status-idle-timer))
|
||||
(setq mpc--status-idle-timer
|
||||
(run-with-idle-timer 1 t 'mpc--status-idle-timer-run))
|
||||
(run-with-idle-timer 1 t #'mpc--status-idle-timer-run))
|
||||
;; Typically, the idle timer is started from the mpc--status-callback,
|
||||
;; which is run asynchronously while we're already idle (we typically
|
||||
;; just started idling), so the timer itself will only be run the next
|
||||
|
@ -525,7 +525,7 @@ to call FUN for any change whatsoever.")
|
|||
(unless really
|
||||
;; We don't completely stop the timer, so that if some other MPD
|
||||
;; client starts playback, we may get a chance to notice it.
|
||||
(run-with-idle-timer 10 t 'mpc--status-idle-timer-run))))
|
||||
(run-with-idle-timer 10 t #'mpc--status-idle-timer-run))))
|
||||
(defun mpc--status-idle-timer-run ()
|
||||
(mpc--status-timer-start)
|
||||
(mpc--status-timer-run))
|
||||
|
@ -596,7 +596,7 @@ Any call to `mpc-status-refresh' may cause it to be restarted."
|
|||
;; (dotimes (i (string-to-number pos)) (mpc--queue-pop))
|
||||
;; (mpc-proc-cmd (mpc-proc-cmd-list
|
||||
;; (make-list (string-to-number pos) "delete 0"))
|
||||
;; 'ignore)
|
||||
;; #'ignore)
|
||||
;; (if (not (equal (cdr (assq 'file mpc-status))
|
||||
;; (mpc--queue-head)))
|
||||
;; (message "MPC's queue is out of sync"))))))
|
||||
|
@ -683,7 +683,7 @@ The songs are returned as alists."
|
|||
(let ((plsongs (mpc-cmd-find 'Playlist pl)))
|
||||
(if (not (mpc-cmd-special-tag-p other-tag))
|
||||
(when (member (cons other-tag value)
|
||||
(apply 'append plsongs))
|
||||
(apply #'append plsongs))
|
||||
(push pl pls))
|
||||
;; Problem N°2: we compute the intersection whereas all
|
||||
;; we care about is whether it's empty. So we could
|
||||
|
@ -694,15 +694,15 @@ The songs are returned as alists."
|
|||
;; good enough because this is only used with "search", which
|
||||
;; doesn't pay attention to playlists and URLs anyway.
|
||||
(let* ((osongs (mpc-cmd-find other-tag value))
|
||||
(ofiles (mpc-assq-all 'file (apply 'append osongs)))
|
||||
(plfiles (mpc-assq-all 'file (apply 'append plsongs))))
|
||||
(ofiles (mpc-assq-all 'file (apply #'append osongs)))
|
||||
(plfiles (mpc-assq-all 'file (apply #'append plsongs))))
|
||||
(when (seq-intersection plfiles ofiles)
|
||||
(push pl pls)))))))
|
||||
pls))
|
||||
|
||||
((eq tag 'Directory)
|
||||
(if (null other-tag)
|
||||
(apply 'nconc
|
||||
(apply #'nconc
|
||||
(mpc-assq-all 'directory
|
||||
(mpc-proc-buf-to-alist
|
||||
(mpc-proc-cmd "lsinfo")))
|
||||
|
@ -725,7 +725,7 @@ The songs are returned as alists."
|
|||
;; If there's an other-tag, then just extract the dir info from the
|
||||
;; list of other-tag's songs.
|
||||
(let* ((other-songs (mpc-cmd-find other-tag value))
|
||||
(files (mpc-assq-all 'file (apply 'append other-songs)))
|
||||
(files (mpc-assq-all 'file (apply #'append other-songs)))
|
||||
(dirs '()))
|
||||
(dolist (file files)
|
||||
(let ((dir (file-name-directory file)))
|
||||
|
@ -759,7 +759,7 @@ The songs are returned as alists."
|
|||
|
||||
((null other-tag)
|
||||
(condition-case nil
|
||||
(mapcar 'cdr (mpc-proc-cmd-to-alist (list "list" (symbol-name tag))))
|
||||
(mapcar #'cdr (mpc-proc-cmd-to-alist (list "list" (symbol-name tag))))
|
||||
(mpc-proc-error
|
||||
;; If `tag' is not one of the expected tags, MPD burps about not
|
||||
;; having the relevant table.
|
||||
|
@ -770,7 +770,7 @@ The songs are returned as alists."
|
|||
(condition-case nil
|
||||
(if (mpc-cmd-special-tag-p other-tag)
|
||||
(signal 'mpc-proc-error "Not implemented")
|
||||
(mapcar 'cdr
|
||||
(mapcar #'cdr
|
||||
(mpc-proc-cmd-to-alist
|
||||
(list "list" (symbol-name tag)
|
||||
(symbol-name other-tag) value))))
|
||||
|
@ -781,7 +781,7 @@ The songs are returned as alists."
|
|||
(mpc-assq-all tag
|
||||
;; Don't use `nconc' now that mpc-cmd-find may
|
||||
;; return a memoized result.
|
||||
(apply 'append other-songs))))))))
|
||||
(apply #'append other-songs))))))))
|
||||
|
||||
(defun mpc-cmd-stop (&optional callback)
|
||||
(mpc-proc-cmd "stop" callback))
|
||||
|
@ -847,7 +847,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
|
|||
;; Sort them from last to first, so the renumbering
|
||||
;; caused by the earlier deletions don't affect
|
||||
;; later ones.
|
||||
(sort (copy-sequence song-poss) '>))))
|
||||
(sort (copy-sequence song-poss) #'>))))
|
||||
(if (stringp playlist)
|
||||
(puthash (cons 'Playlist playlist) nil mpc--find-memoize)))
|
||||
|
||||
|
@ -871,7 +871,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
|
|||
;; Sort them from last to first, so the renumbering
|
||||
;; caused by the earlier deletions affect
|
||||
;; later ones a bit less.
|
||||
(sort (copy-sequence song-poss) '>))))
|
||||
(sort (copy-sequence song-poss) #'>))))
|
||||
(if (stringp playlist)
|
||||
(puthash (cons 'Playlist playlist) nil mpc--find-memoize))))
|
||||
|
||||
|
@ -882,7 +882,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
|
|||
(unless callback (mpc-proc-sync))))
|
||||
|
||||
(defun mpc-cmd-tagtypes ()
|
||||
(mapcar 'cdr (mpc-proc-cmd-to-alist "tagtypes")))
|
||||
(mapcar #'cdr (mpc-proc-cmd-to-alist "tagtypes")))
|
||||
|
||||
;; This was never integrated into MPD.
|
||||
;; (defun mpc-cmd-download (file)
|
||||
|
@ -998,7 +998,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
|
|||
(cond
|
||||
((>= col 0) (insert str))
|
||||
(t (insert (substring str (min (length str) (- col))))))))
|
||||
(pred nil))
|
||||
(pred #'always))
|
||||
(while (string-match "%\\(?:%\\|\\(-\\)?\\([0-9]+\\)?{\\([[:alpha:]][[:alnum:]]*\\)\\(?:-\\([^}]+\\)\\)?}\\)" format-spec pos)
|
||||
(let ((pre-text (substring format-spec pos (match-beginning 0))))
|
||||
(funcall insert pre-text)
|
||||
|
@ -1017,7 +1017,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
|
|||
(pcase tag
|
||||
((or 'Time 'Duration)
|
||||
(let ((time (cdr (or (assq 'time info) (assq 'Time info)))))
|
||||
(setq pred (list nil)) ;Just assume it's never eq.
|
||||
(setq pred #'ignore) ;Just assume it's never eq.
|
||||
(when time
|
||||
(mpc-secs-to-time (if (and (eq tag 'Duration)
|
||||
(string-match ":" time))
|
||||
|
@ -1026,7 +1026,11 @@ If PLAYLIST is t or nil or missing, use the main playlist."
|
|||
('Cover
|
||||
(let ((dir (file-name-directory (cdr (assq 'file info)))))
|
||||
;; (debug)
|
||||
(push `(equal ',dir (file-name-directory (cdr (assq 'file info)))) pred)
|
||||
(setq pred
|
||||
(lambda (info)
|
||||
(and (funcall pred info)
|
||||
(equal dir (file-name-directory
|
||||
(cdr (assq 'file info)))))))
|
||||
(if-let* ((covers '(".folder.png" "cover.jpg" "folder.jpg"))
|
||||
(cover (cl-loop for file in (directory-files (mpc-file-local-copy dir))
|
||||
if (member (downcase file) covers)
|
||||
|
@ -1043,7 +1047,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
|
|||
(setq size nil)
|
||||
(propertize dir 'display image))
|
||||
;; Make sure we return something on which we can
|
||||
;; place the `mpc-pred' property, as
|
||||
;; place the `mpc--uptodate-p' property, as
|
||||
;; a negative-cache. We could also use
|
||||
;; a default cover.
|
||||
(progn (setq size nil) " "))))
|
||||
|
@ -1052,7 +1056,10 @@ If PLAYLIST is t or nil or missing, use the main playlist."
|
|||
;; than the URL in `file'. Pretend it's in `Title'.
|
||||
(when (and (null val) (eq tag 'Title))
|
||||
(setq val (cdr (assq 'file info))))
|
||||
(push `(equal ',val (cdr (assq ',tag info))) pred)
|
||||
(setq pred
|
||||
(lambda (info)
|
||||
(and (funcall pred info)
|
||||
(equal val (cdr (assq ',tag info))))))
|
||||
(cond
|
||||
((not (and (eq tag 'Date) (stringp val))) val)
|
||||
;; For "date", only keep the year!
|
||||
|
@ -1080,11 +1087,11 @@ If PLAYLIST is t or nil or missing, use the main playlist."
|
|||
'follow-link t
|
||||
'keymap `(keymap
|
||||
(mouse-2
|
||||
. (lambda ()
|
||||
(interactive)
|
||||
(mpc-constraints-push 'noerror)
|
||||
(mpc-constraints-restore
|
||||
',(list (list tag text)))))))))
|
||||
. ,(lambda ()
|
||||
(interactive)
|
||||
(mpc-constraints-push 'noerror)
|
||||
(mpc-constraints-restore
|
||||
',(list (list tag text)))))))))
|
||||
(funcall insert
|
||||
(concat (when size
|
||||
(propertize " " 'display
|
||||
|
@ -1097,35 +1104,34 @@ If PLAYLIST is t or nil or missing, use the main playlist."
|
|||
(if (null size) (setq col (+ col textwidth postwidth))
|
||||
(insert space)
|
||||
(setq col (+ col size))))))
|
||||
(put-text-property start (point) 'mpc-pred
|
||||
`(lambda (info) (and ,@(nreverse pred))))))
|
||||
(put-text-property start (point) 'mpc--uptodate-p pred)))
|
||||
|
||||
;;; The actual UI code ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defvar mpc-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
;; (define-key map "\e" 'mpc-stop)
|
||||
(define-key map "q" 'mpc-quit)
|
||||
(define-key map "\r" 'mpc-select)
|
||||
(define-key map [(shift return)] 'mpc-select-toggle)
|
||||
(define-key map [mouse-2] 'mpc-select)
|
||||
(define-key map [S-mouse-2] 'mpc-select-extend)
|
||||
(define-key map [C-mouse-2] 'mpc-select-toggle)
|
||||
(define-key map [drag-mouse-2] 'mpc-drag-n-drop)
|
||||
;; (define-key map "\e" #'mpc-stop)
|
||||
(define-key map "q" #'mpc-quit)
|
||||
(define-key map "\r" #'mpc-select)
|
||||
(define-key map [(shift return)] #'mpc-select-toggle)
|
||||
(define-key map [mouse-2] #'mpc-select)
|
||||
(define-key map [S-mouse-2] #'mpc-select-extend)
|
||||
(define-key map [C-mouse-2] #'mpc-select-toggle)
|
||||
(define-key map [drag-mouse-2] #'mpc-drag-n-drop)
|
||||
;; We use `always' because a binding to t is like a binding to nil.
|
||||
(define-key map [follow-link] :always)
|
||||
;; But follow-link doesn't apply blindly to header-line and
|
||||
;; mode-line clicks.
|
||||
(define-key map [header-line follow-link] 'ignore)
|
||||
(define-key map [mode-line follow-link] 'ignore)
|
||||
(define-key map [header-line follow-link] #'ignore)
|
||||
(define-key map [mode-line follow-link] #'ignore)
|
||||
;; Doesn't work because the first click changes the buffer, so the second
|
||||
;; is applied elsewhere :-(
|
||||
;; (define-key map [(double mouse-2)] 'mpc-play-at-point)
|
||||
(define-key map "p" 'mpc-pause)
|
||||
(define-key map "s" 'mpc-toggle-play)
|
||||
(define-key map ">" 'mpc-next)
|
||||
(define-key map "<" 'mpc-prev)
|
||||
(define-key map "g" 'mpc-seek-current)
|
||||
;; (define-key map [(double mouse-2)] #'mpc-play-at-point)
|
||||
(define-key map "p" #'mpc-pause)
|
||||
(define-key map "s" #'mpc-toggle-play)
|
||||
(define-key map ">" #'mpc-next)
|
||||
(define-key map "<" #'mpc-prev)
|
||||
(define-key map "g" #'mpc-seek-current)
|
||||
map))
|
||||
|
||||
(easy-menu-define mpc-mode-menu mpc-mode-map
|
||||
|
@ -1217,7 +1223,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
|
|||
(when (assq 'file mpc-status)
|
||||
(let ((inhibit-read-only t))
|
||||
(dolist (spec mpc-status-buffer-format)
|
||||
(let ((pred (get-text-property (point) 'mpc-pred)))
|
||||
(let ((pred (get-text-property (point) 'mpc--uptodate-p)))
|
||||
(if (and pred (funcall pred mpc-status))
|
||||
(forward-line)
|
||||
(delete-region (point) (line-beginning-position 2))
|
||||
|
@ -1277,7 +1283,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
|
|||
;; Restore the selection. I.e. move the overlays back to their
|
||||
;; corresponding location. Actually which overlay is used for what
|
||||
;; doesn't matter.
|
||||
(mapc 'delete-overlay mpc-select)
|
||||
(mapc #'delete-overlay mpc-select)
|
||||
(setq mpc-select nil)
|
||||
(dolist (elem selection)
|
||||
;; After an update, some elements may have disappeared.
|
||||
|
@ -1302,7 +1308,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
|
|||
(interactive (list last-nonmenu-event))
|
||||
(mpc-event-set-point event)
|
||||
(if (and (bolp) (eobp)) (forward-line -1))
|
||||
(mapc 'delete-overlay mpc-select)
|
||||
(mapc #'delete-overlay mpc-select)
|
||||
(setq mpc-select nil)
|
||||
(if (mpc-tagbrowser-all-p)
|
||||
nil
|
||||
|
@ -1662,7 +1668,7 @@ Return non-nil if a selection was deactivated."
|
|||
;; (unless (equal constraints mpc-constraints)
|
||||
;; (setq-local mpc-constraints constraints)
|
||||
(dolist (cst constraints)
|
||||
(let ((vals (apply 'mpc-union
|
||||
(let ((vals (apply #'mpc-union
|
||||
(mapcar (lambda (val)
|
||||
(mpc-cmd-list mpc-tag (car cst) val))
|
||||
(cdr cst)))))
|
||||
|
@ -1681,7 +1687,7 @@ Return non-nil if a selection was deactivated."
|
|||
(setq mpc--changed-selection t))
|
||||
(unless nodeactivate
|
||||
(setq selection nil)
|
||||
(mapc 'delete-overlay mpc-select)
|
||||
(mapc #'delete-overlay mpc-select)
|
||||
(setq mpc-select nil)
|
||||
(mpc-tagbrowser-all-select))))
|
||||
|
||||
|
@ -1726,7 +1732,7 @@ Return non-nil if a selection was deactivated."
|
|||
(defvar mpc-tagbrowser-dir-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map mpc-tagbrowser-mode-map)
|
||||
(define-key map [?\M-\C-m] 'mpc-tagbrowser-dir-toggle)
|
||||
(define-key map [?\M-\C-m] #'mpc-tagbrowser-dir-toggle)
|
||||
map))
|
||||
|
||||
;; (defvar mpc-tagbrowser-dir-keywords
|
||||
|
@ -1838,12 +1844,12 @@ A value of t means the main playlist.")
|
|||
(let ((map (make-sparse-keymap)))
|
||||
;; Bind the up-events rather than the down-event, so the
|
||||
;; `message' isn't canceled by the subsequent up-event binding.
|
||||
(define-key map [down-mouse-1] 'ignore)
|
||||
(define-key map [mouse-1] 'mpc-volume-mouse-set)
|
||||
(define-key map [header-line mouse-1] 'mpc-volume-mouse-set)
|
||||
(define-key map [header-line down-mouse-1] 'ignore)
|
||||
(define-key map [mode-line mouse-1] 'mpc-volume-mouse-set)
|
||||
(define-key map [mode-line down-mouse-1] 'ignore)
|
||||
(define-key map [down-mouse-1] #'ignore)
|
||||
(define-key map [mouse-1] #'mpc-volume-mouse-set)
|
||||
(define-key map [header-line mouse-1] #'mpc-volume-mouse-set)
|
||||
(define-key map [header-line down-mouse-1] #'ignore)
|
||||
(define-key map [mode-line mouse-1] #'mpc-volume-mouse-set)
|
||||
(define-key map [mode-line down-mouse-1] #'ignore)
|
||||
map))
|
||||
|
||||
(defvar mpc-volume nil) (put 'mpc-volume 'risky-local-variable t)
|
||||
|
@ -1876,7 +1882,7 @@ A value of t means the main playlist.")
|
|||
(progn
|
||||
(message "MPD volume already at %s%%" newvol)
|
||||
(ding))
|
||||
(mpc-proc-cmd (list "setvol" newvol) 'mpc-status-refresh)
|
||||
(mpc-proc-cmd (list "setvol" newvol) #'mpc-status-refresh)
|
||||
(message "Set MPD volume to %s%%" newvol))))
|
||||
|
||||
(defun mpc-volume-widget (vol &optional size)
|
||||
|
@ -1913,7 +1919,7 @@ A value of t means the main playlist.")
|
|||
|
||||
(defvar mpc-songs-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [remap mpc-select] 'mpc-songs-jump-to)
|
||||
(define-key map [remap mpc-select] #'mpc-songs-jump-to)
|
||||
map))
|
||||
|
||||
(defvar mpc-songpointer-set-visible nil)
|
||||
|
@ -1961,7 +1967,7 @@ This is used so that they can be compared with `eq', which is needed for
|
|||
(setq mpc-songs-playlist (cadr cst)))
|
||||
;; We don't do anything really special here for playlists,
|
||||
;; because it's unclear what's a correct "union" of playlists.
|
||||
(let ((vals (apply 'mpc-union
|
||||
(let ((vals (apply #'mpc-union
|
||||
(mapcar (lambda (val)
|
||||
(mpc-cmd-find (car cst) val))
|
||||
(cdr cst)))))
|
||||
|
@ -2335,7 +2341,7 @@ This is used so that they can be compared with `eq', which is needed for
|
|||
"Quit Music Player Daemon."
|
||||
(interactive)
|
||||
(let* ((proc mpc-proc)
|
||||
(bufs (mapcar 'cdr (if proc (process-get proc 'buffers))))
|
||||
(bufs (mapcar #'cdr (if proc (process-get proc 'buffers))))
|
||||
(wins (mapcar (lambda (buf) (get-buffer-window buf 0)) bufs))
|
||||
(song-buf (mpc-songs-buf))
|
||||
frames)
|
||||
|
@ -2356,7 +2362,7 @@ This is used so that they can be compared with `eq', which is needed for
|
|||
(unless (memq (window-buffer win) bufs) (setq delete nil)))
|
||||
(if delete (ignore-errors (delete-frame frame))))))
|
||||
;; Then kill the buffers.
|
||||
(mapc 'kill-buffer bufs)
|
||||
(mapc #'kill-buffer bufs)
|
||||
(mpc-status-stop)
|
||||
(if proc (delete-process proc))))
|
||||
|
||||
|
@ -2519,7 +2525,7 @@ If stopped, start playback."
|
|||
(setq mpc-last-seek-time
|
||||
(cons currenttime (setq time (+ time step))))
|
||||
(mpc-proc-cmd (list "seekid" songid time)
|
||||
'mpc-status-refresh))))
|
||||
#'mpc-status-refresh))))
|
||||
(let ((status (mpc-cmd-status)))
|
||||
(let* ((songid (cdr (assq 'songid status)))
|
||||
(time (if songid (string-to-number
|
||||
|
@ -2529,7 +2535,7 @@ If stopped, start playback."
|
|||
(lambda ()
|
||||
(mpc-proc-cmd (list "seekid" songid
|
||||
(setq time (+ time step)))
|
||||
'mpc-status-refresh)))))
|
||||
#'mpc-status-refresh)))))
|
||||
(while (mouse-movement-p
|
||||
(event-basic-type (setq event (read-event)))))
|
||||
(cancel-timer timer)))))))
|
||||
|
@ -2584,7 +2590,7 @@ If stopped, start playback."
|
|||
((and (>= songtime songduration) mpc--faster-toggle-forward)
|
||||
;; Skip to the beginning of the next song.
|
||||
(if (not (equal (cdr (assq 'state mpc-status)) "play"))
|
||||
(mpc-proc-cmd "next" 'mpc-status-refresh)
|
||||
(mpc-proc-cmd "next" #'mpc-status-refresh)
|
||||
;; If we're playing, this is done automatically, so we
|
||||
;; don't need to do anything, or rather we *shouldn't*
|
||||
;; do anything otherwise there's a race condition where
|
||||
|
@ -2616,7 +2622,7 @@ If stopped, start playback."
|
|||
(condition-case nil
|
||||
(mpc-proc-cmd
|
||||
(list "seekid" songid songtime)
|
||||
'mpc-status-refresh)
|
||||
#'mpc-status-refresh)
|
||||
(mpc-proc-error (mpc-status-refresh)))))))))))
|
||||
(setq mpc--faster-toggle-forward (> step 0))
|
||||
(funcall fun) ;Initialize values.
|
||||
|
@ -2700,7 +2706,7 @@ If stopped, start playback."
|
|||
(error "Not a playlist")
|
||||
(buffer-substring (line-beginning-position)
|
||||
(line-end-position)))))
|
||||
(mpc-cmd-add (mapcar 'car songs) playlist)
|
||||
(mpc-cmd-add (mapcar #'car songs) playlist)
|
||||
(message "Added %d songs to %s" (length songs) playlist)
|
||||
(if (member playlist
|
||||
(cdr (assq 'Playlist (mpc-constraints-get-current))))
|
||||
|
@ -2712,7 +2718,7 @@ If stopped, start playback."
|
|||
((eq start-buf end-buf)
|
||||
;; Moving songs within the shown playlist.
|
||||
(let ((dest-pos (get-text-property (point) 'mpc-file-pos)))
|
||||
(mpc-cmd-move (mapcar 'cdr songs) dest-pos mpc-songs-playlist)
|
||||
(mpc-cmd-move (mapcar #'cdr songs) dest-pos mpc-songs-playlist)
|
||||
(message "Moved %d songs" (length songs))))
|
||||
(t
|
||||
;; Adding songs to the shown playlist.
|
||||
|
@ -2723,10 +2729,10 @@ If stopped, start playback."
|
|||
;; MPD's protocol does not let us add songs at a particular
|
||||
;; position in a playlist, so we first have to add them to the
|
||||
;; end, and then move them to their final destination.
|
||||
(mpc-cmd-add (mapcar 'car songs) mpc-songs-playlist)
|
||||
(mpc-cmd-add (mapcar #'car songs) mpc-songs-playlist)
|
||||
(mpc-cmd-move (let ((poss '()))
|
||||
(dotimes (i (length songs))
|
||||
(push (+ i (length pl)) poss))
|
||||
(push (+ i (length pl)) poss))
|
||||
(nreverse poss))
|
||||
dest-pos mpc-songs-playlist)
|
||||
(message "Added %d songs" (length songs)))))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; newst-ticker.el --- mode line ticker for newsticker. -*- lexical-binding: t; -*-
|
||||
;;; newst-ticker.el --- mode line ticker for newsticker. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1166,9 +1166,10 @@ If ALL is non-nil, update prompts in all IRC buffers."
|
|||
(or (eq (aref target 0) ?#)
|
||||
(eq (aref target 0) ?&))))
|
||||
|
||||
(defcustom rcirc-log-directory "~/.emacs.d/rcirc-log"
|
||||
(defcustom rcirc-log-directory (locate-user-emacs-file "rcirc-log")
|
||||
"Directory to keep IRC logfiles."
|
||||
:type 'directory)
|
||||
:type 'directory
|
||||
:version "28.1")
|
||||
|
||||
(defcustom rcirc-log-flag nil
|
||||
"Non-nil means log IRC activity to disk.
|
||||
|
|
|
@ -957,3 +957,5 @@ to their attributes."
|
|||
;; * Check, whether the dh-ietf1024-aes128-cbc-pkcs7 algorithm can be
|
||||
;; used for the transfer of the secrets. Currently, we use the
|
||||
;; plain algorithm.
|
||||
|
||||
;;; secrets.el ends here
|
||||
|
|
|
@ -580,4 +580,4 @@ to local variable `sieve-manage-capability'."
|
|||
|
||||
(provide 'sieve-manage)
|
||||
|
||||
;; sieve-manage.el ends here
|
||||
;;; sieve-manage.el ends here
|
||||
|
|
|
@ -206,4 +206,4 @@ Turning on Sieve mode runs `sieve-mode-hook'."
|
|||
|
||||
(provide 'sieve-mode)
|
||||
|
||||
;; sieve-mode.el ends here
|
||||
;;; sieve-mode.el ends here
|
||||
|
|
|
@ -379,4 +379,4 @@ Used to bracket operations which move point in the sieve-buffer."
|
|||
|
||||
(provide 'sieve)
|
||||
|
||||
;; sieve.el ends here
|
||||
;;; sieve.el ends here
|
||||
|
|
|
@ -472,6 +472,49 @@ For details, see `tramp-rename-files'."
|
|||
(function-put
|
||||
#'tramp-rename-these-files 'completion-predicate #'tramp-command-completion-p)
|
||||
|
||||
;; This function takes action since Emacs 28.1, when
|
||||
;; `read-extended-command-predicate' is set to
|
||||
;; `command-completion-default-include-p'.
|
||||
;;;###tramp-autoload
|
||||
(defun tramp-recompile-elpa-command-completion-p (_symbol _buffer)
|
||||
"A predicate for `tramp-recompile-elpa'.
|
||||
It is completed by \"M-x TAB\" only if package.el is loaded, and
|
||||
Tramp is an installed ELPA package."
|
||||
;; We cannot apply `package-installed-p', this would also return the
|
||||
;; builtin package.
|
||||
(and (assq 'tramp (bound-and-true-p package-alist))
|
||||
(tramp-compat-funcall 'package--user-installed-p 'tramp)))
|
||||
|
||||
;;;###tramp-autoload
|
||||
(defun tramp-recompile-elpa ()
|
||||
"Recompile the installed Tramp ELPA package.
|
||||
This is needed if there are compatibility problems."
|
||||
;; (declare (completion tramp-recompile-elpa-command-completion-p))
|
||||
(interactive)
|
||||
;; We expect just one Tramp package is installed.
|
||||
(when-let
|
||||
((dir (tramp-compat-funcall
|
||||
'package-desc-dir
|
||||
(car (alist-get 'tramp (bound-and-true-p package-alist))))))
|
||||
(dolist (elc (directory-files dir 'full "\\.elc$"))
|
||||
(delete-file elc))
|
||||
(with-current-buffer (get-buffer-create byte-compile-log-buffer)
|
||||
(let ((inhibit-read-only t))
|
||||
(compilation-mode)
|
||||
(goto-char (point-max))
|
||||
(insert "\f\n")
|
||||
(call-process
|
||||
(expand-file-name invocation-name invocation-directory) nil t t
|
||||
"-Q" "-batch" "-L" dir
|
||||
"--eval" (format "(byte-recompile-directory %S 0 t)" dir))
|
||||
(message "Package `tramp' recompiled.")))))
|
||||
|
||||
;; Starting with Emacs 28.1, this can be replaced by the "(declare ...)" form.
|
||||
;;;###tramp-autoload
|
||||
(function-put
|
||||
#'tramp-recompile-elpa 'completion-predicate
|
||||
#'tramp-recompile-elpa-command-completion-p)
|
||||
|
||||
;; Tramp version is useful in a number of situations.
|
||||
|
||||
;;;###tramp-autoload
|
||||
|
|
|
@ -5488,15 +5488,15 @@ Nonexistent directories are removed from spec."
|
|||
;; Check whether stat(1) returns usable syntax. "%s" does not
|
||||
;; work on older AIX systems. Recent GNU stat versions
|
||||
;; (8.24?) use shell quoted format for "%N", we check the
|
||||
;; boundaries "`" and "'", therefore. See Bug#23422 in
|
||||
;; coreutils. Since GNU stat 8.26, environment variable
|
||||
;; QUOTING_STYLE is supported.
|
||||
;; boundaries "`" and "'" and their localized variants,
|
||||
;; therefore. See Bug#23422 in coreutils. Since GNU stat
|
||||
;; 8.26, environment variable QUOTING_STYLE is supported.
|
||||
(when result
|
||||
(setq result (concat "env QUOTING_STYLE=locale " result)
|
||||
tmp (tramp-send-command-and-read
|
||||
vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror))
|
||||
(unless (and (listp tmp) (stringp (car tmp))
|
||||
(string-match-p "^\\(`/'\\|‘/’\\)$" (car tmp))
|
||||
(string-match-p "^[\"`‘„”«「]/[\"'’“”»」]$" (car tmp))
|
||||
(integerp (cadr tmp)))
|
||||
(setq result nil)))
|
||||
result))))
|
||||
|
|
|
@ -420,3 +420,5 @@ version this library is compliant with."
|
|||
notifications-get-server-information-method)))
|
||||
|
||||
(provide 'notifications)
|
||||
|
||||
;;; notifications.el ends here
|
||||
|
|
|
@ -922,4 +922,4 @@ Current token after parse is token following ]."
|
|||
|
||||
(provide 'rng-cmpct)
|
||||
|
||||
;;; rng-cmpct.el
|
||||
;;; rng-cmpct.el ends here
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; info-edit.el --- Editing info files -*- lexical-binding:t -*-
|
||||
;;; info-edit.el --- Editing info files -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 1985-1986, 1992-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; emacs-lock.el --- prevents you from exiting Emacs if a buffer is locked -*- lexical-binding: t; -*-
|
||||
;;; old-emacs-lock.el --- prevents you from exiting Emacs if a buffer is locked -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1994, 1997, 2001-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -99,4 +99,4 @@ If the buffer is locked, signal error and display its name."
|
|||
|
||||
(provide 'emacs-lock)
|
||||
|
||||
;;; emacs-lock.el ends here
|
||||
;;; old-emacs-lock.el ends here
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; todo-mode.el --- major mode for editing TODO list files -*- lexical-binding: t; -*-
|
||||
;;; otodo-mode.el --- major mode for editing TODO list files -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1997, 1999, 2001-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -963,4 +963,4 @@ If INCLUDE-SEP is non-nil, return point after the separator."
|
|||
|
||||
(provide 'todo-mode)
|
||||
|
||||
;;; todo-mode.el ends here
|
||||
;;; otodo-mode.el ends here
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; sb-image --- Image management for speedbar -*- lexical-binding: t; -*-
|
||||
;;; sb-image.el --- Image management for speedbar -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1999-2003, 2005-2019, 2021 Free Software Foundation,
|
||||
;; Inc.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; ob-hledger.el --- Babel Functions for hledger -*- lexical-binding: t; -*-
|
||||
;;; ob-hledger.el --- Babel Functions for hledger -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue