diff --git a/.gitignore b/.gitignore
index e32425abeab..25ed3bdddd3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -182,6 +182,7 @@ ID
# Executables.
*.exe
a.out
+lib-src/be-resources
lib-src/blessmail
lib-src/ctags
lib-src/ebrowse
@@ -203,6 +204,7 @@ nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist
src/bootstrap-emacs
src/emacs
src/emacs-[0-9]*
+src/Emacs
src/temacs
src/dmpstruct.h
src/*.pdmp
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3138f4184e6..402c17ddb85 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see .
-# GNU Emacs support for the GitLab protocol for CI
+# GNU Emacs support for the GitLab protocol for CI.
# The presence of this file does not imply any FSF/GNU endorsement of
# any particular service that uses that protocol. Also, it is intended for
diff --git a/CONTRIBUTE b/CONTRIBUTE
index 8295a8e6ad4..5740004637b 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -342,7 +342,9 @@ Documentation fixes (in doc strings, in manuals, in NEWS, and in
comments) should always go to the release branch, if the documentation
to be fixed exists and is relevant to the release-branch codebase.
Doc fixes are always considered "safe" -- even when a release branch
-is in feature freeze, it can still receive doc fixes.
+is in feature freeze, it can still receive doc fixes. However, this
+rule is limited to fixing real problems in the documentation; cleanups
+and stylistic changes are excluded.
When you know that the change will be difficult to merge to the
master (e.g., because the code on master has changed a lot), you can
diff --git a/GNUmakefile b/GNUmakefile
index 5155487de28..76fd77ba1b0 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -104,8 +104,13 @@ configure:
Makefile: configure
@echo >&2 'There seems to be no Makefile in this directory.'
+ifeq ($(configure),default)
@echo >&2 'Running ./configure ...'
./configure
+else
+ @echo >&2 'Running ./configure '$(configure)'...'
+ ./configure $(configure)
+endif
@echo >&2 'Makefile built.'
# 'make bootstrap' in a fresh checkout needn't run 'configure' twice.
diff --git a/INSTALL.REPO b/INSTALL.REPO
index da56d7611b2..182c2e95341 100644
--- a/INSTALL.REPO
+++ b/INSTALL.REPO
@@ -8,9 +8,15 @@ directory on your local machine:
To build the repository code, simply run 'make' in the 'emacs'
directory. This should work if your files are freshly checked out
-from the repository, and if you have the proper tools installed. If
-it doesn't work, or if you have special build requirements, the
-following information may be helpful.
+from the repository, and if you have the proper tools installed; the
+default configuration options will be used. Other configuration
+options can be specified by setting a 'configure' variable, for
+example:
+
+ $ make configure="--prefix=/opt/emacs CFLAGS='-O0 -g3'"
+
+If the above doesn't work, or if you have special build requirements,
+the following information may be helpful.
Building Emacs from the source-code repository requires some tools
that are not needed when building from a release. You will need:
@@ -58,7 +64,16 @@ To update loaddefs.el (and similar files), do:
If either of the above partial procedures fails, try 'make bootstrap'.
If CPU time is not an issue, 'make bootstrap' is a more thorough way
-to rebuild, avoiding spurious problems.
+to rebuild, avoiding spurious problems. 'make bootstrap' rebuilds
+Emacs with the same configuration options as the previous build; it
+can also be used to rebuild Emacs with other configuration options by
+setting a 'configure' variable, for example:
+
+ $ make bootstrap configure="CFLAGS='-O0 -g3'"
+
+To rebuild Emacs with the default configuration options, you can use:
+
+ $ make bootstrap configure=default
Occasionally, there are changes that 'make bootstrap' won't be able to
handle. The most thorough cleaning can be achieved by 'git clean -fdx'
diff --git a/Makefile.in b/Makefile.in
index 488b859285d..59b255b9267 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -102,6 +102,8 @@ HAVE_NATIVE_COMP = @HAVE_NATIVE_COMP@
USE_STARTUP_NOTIFICATION = @USE_STARTUP_NOTIFICATION@
+HAVE_BE_APP = @HAVE_BE_APP@
+
# ==================== Where To Install Things ====================
# Location to install Emacs.app under GNUstep / macOS.
@@ -528,7 +530,13 @@ install-arch-dep: src install-arch-indep install-etcdoc install-$(NTDIR)
$(MAKE) -C lib-src install
ifeq (${ns_self_contained},no)
${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} "$(DESTDIR)${bindir}/$(EMACSFULL)"
+ifeq (${HAVE_BE_APP},yes)
+ ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/Emacs "$(DESTDIR)${prefix}/apps/Emacs"
+endif
ifeq (${DUMPING},pdumper)
+ifeq (${HAVE_BE_APP},yes)
+ ${INSTALL_DATA} src/Emacs.pdmp "$(DESTDIR)${libexecdir}/emacs/${version}/${configuration}"/Emacs.pdmp
+endif
${INSTALL_DATA} src/emacs.pdmp "$(DESTDIR)${libexecdir}/emacs/${version}/${configuration}"/emacs-${EMACS_PDMP}
endif
-chmod 755 "$(DESTDIR)${bindir}/$(EMACSFULL)"
@@ -1144,14 +1152,23 @@ check-info: info
.PHONY: bootstrap
-# Bootstrapping does the following:
+# Without a 'configure' variable, bootstrapping does the following:
# * Remove files to start from a bootstrap-clean slate.
# * Run autogen.sh.
# * Rebuild Makefile, to update the build procedure itself.
# * Do the actual build.
-bootstrap: bootstrap-clean
+# With a 'configure' variable, bootstrapping does the following:
+# * Remove files to start from an extraclean slate.
+# * Do the actual build, during which the 'configure' variable is
+# used (see the Makefile goal in GNUmakefile).
+bootstrap:
+ifndef configure
+ $(MAKE) bootstrap-clean
cd $(srcdir) && ./autogen.sh autoconf
$(MAKE) MAKEFILE_NAME=force-Makefile force-Makefile
+else
+ $(MAKE) extraclean
+endif
$(MAKE) all
.PHONY: ChangeLog change-history change-history-commit change-history-nocommit
diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS
index 02b8cf39bd6..33aeb528651 100644
--- a/admin/MAINTAINERS
+++ b/admin/MAINTAINERS
@@ -138,6 +138,9 @@ Andrea Corallo
lisp/emacs-lisp/comp-cstr.el
test/src/comp-*.el
+Stefan Kangas
+ admin/automerge
+
==============================================================================
2. Areas that someone is willing to maintain, although he would not
necessarily mind if someone else was the official maintainer.
@@ -228,6 +231,7 @@ Michael Albinus
lisp/net/ange-ftp.el
lisp/notifications.el
lisp/shadowfile.el
+ test/infra/*
test/lisp/autorevert-tests.el
test/lisp/files-tests.el (file-name-non-special)
test/lisp/shadowfile-tests.el
diff --git a/admin/authors.el b/admin/authors.el
index fd46dabaa3a..1e8bf0364d6 100644
--- a/admin/authors.el
+++ b/admin/authors.el
@@ -323,7 +323,8 @@ Changes to files matching one of the regexps in this list are not listed.")
"NEWS.unicode" "COPYING.DJ" "Makefile.old" "Makefile.am"
"NEWS.1" "OOOOONEWS...OONEWS" "OOOONEWS" "etc/NEWS"
"NEWS.1-17" "NEWS.18" "NEWS.19" "NEWS.20" "NEWS.21" "NEWS.22"
- "MAINTAINERS" "MH-E-NEWS"
+ "NEWS.23" "NEWS.24" "NEWS.25" "NEWS.26" "NEWS.27" "NEWS.28"
+ "MAINTAINERS" "ERC-NEWS" "MH-E-NEWS" "NXML-NEWS"
"install.sh" "install-sh" "missing" "mkinstalldirs"
"termcap.dat" "termcap.src" "termcap.ucb" "termcap"
"ChangeLog.nextstep" "Emacs.clr" "spec.txt"
@@ -359,6 +360,8 @@ Changes to files matching one of the regexps in this list are not listed.")
"autogen/missing" "autogen"
"autogen/copy_autogen" ; not generated, but trivial and now removed
"dir_top"
+ ;; Imported into Emacs but externally maintained.
+ "publicsuffix.txt" "SKK-JISYO.L"
;; Only existed briefly, then renamed:
"images/icons/allout-widgets-dark-bg"
"images/icons/allout-widgets-light-bg"
diff --git a/admin/automerge b/admin/automerge
index 227a404b7a3..81082f7dc68 100755
--- a/admin/automerge
+++ b/admin/automerge
@@ -4,7 +4,7 @@
## Copyright (C) 2018-2021 Free Software Foundation, Inc.
## Author: Glenn Morris
-## Maintainer: emacs-devel@gnu.org
+## Maintainer: Stefan Kangas
## This file is part of GNU Emacs.
diff --git a/admin/gitmerge.el b/admin/gitmerge.el
index 67fca87c119..658ceb77f49 100644
--- a/admin/gitmerge.el
+++ b/admin/gitmerge.el
@@ -68,8 +68,7 @@ bump Emacs version\\|Auto-commit"))
(defvar gitmerge-minimum-missing 10
"Minimum number of missing commits to consider merging in batch mode.")
-(defvar gitmerge-status-file (expand-file-name "gitmerge-status"
- user-emacs-directory)
+(defvar gitmerge-status-file (locate-user-emacs-file "gitmerge-status")
"File where missing commits will be saved between sessions.")
(defvar gitmerge-ignore-branches-regexp
diff --git a/admin/notes/emba b/admin/notes/emba
index 4e500bc92cf..f1b52b2cde0 100644
--- a/admin/notes/emba
+++ b/admin/notes/emba
@@ -28,15 +28,21 @@ The messages contain a URL to the log file of the failed job, like
* Emacs jobset
The Emacs jobset is defined in the Emacs source tree, file
-'.gitlab-ci.yml'. It could be adapted for every Emacs branch, see
+'.gitlab-ci.yml'. All related files are located in directory
+'test/infra'. They could be adapted for every Emacs branch, see
.
A jobset on Gitlab is called pipeline. Emacs pipelines run through
the stages 'build-images', 'platform-images' and 'native-comp-images'
(create an Emacs instance by 'make bootstrap' with different
-configuration parameters) as well as 'normal', 'slow', 'platforms' and
+configuration parameters) as well as 'normal', 'platforms' and
'native-comp' (run respective test jobs based on the produced images).
+The jobs for stage 'normal' are contained in the file
+'test/infra/test-jobs.yml'. This file is generated by calling 'make
+-C test generate-test-jobs' in the Emacs source tree, and the
+resulting file shall be pushed to the Emacs git repository afterwards.
+
Every job runs in a Debian docker container. It uses the local clone
of the Emacs git repository to perform a bootstrap and test of Emacs.
This could happen for several jobs with changed configuration, compile
diff --git a/admin/nt/dist-build/build-dep-zips.py b/admin/nt/dist-build/build-dep-zips.py
index 6bed191cae7..dfff493b640 100755
--- a/admin/nt/dist-build/build-dep-zips.py
+++ b/admin/nt/dist-build/build-dep-zips.py
@@ -123,7 +123,7 @@ def ntldd_munge(out):
## Currently no packages seem to require this!
ARCH_PKGS=[]
-SRC_REPO="https://sourceforge.net/projects/msys2/files/REPOS/MINGW/Sources"
+SRC_REPO="https://repo.msys2.org/mingw/sources"
def immediate_deps(pkgs):
@@ -169,7 +169,7 @@ def download_source(tarball):
if not os.path.exists("../emacs-src-cache/{}".format(tarball)):
print("Downloading {}...".format(tarball))
check_output_maybe(
- "wget -a ../download.log -O ../emacs-src-cache/{} {}/{}/download"
+ "wget -a ../download.log -O ../emacs-src-cache/{} {}/{}"
.format(tarball, SRC_REPO, tarball),
shell=True
)
diff --git a/admin/unidata/emoji-zwj.awk b/admin/unidata/emoji-zwj.awk
index d4e2944ca34..e704cb45263 100644
--- a/admin/unidata/emoji-zwj.awk
+++ b/admin/unidata/emoji-zwj.awk
@@ -114,7 +114,7 @@ END {
print " (nconc (char-table-range composition-function-table (car elt))"
print " (list (vector (cdr elt)"
print " 0"
- print " 'compose-gstring-for-graphic)))))"
+ print " #'compose-gstring-for-graphic)))))"
print ";; The following two blocks are derived by hand from emoji-sequences.txt"
print ";; FIXME: add support for Emoji_Keycap_Sequence once we learn how to respect FE0F/VS-16"
@@ -126,7 +126,7 @@ END {
print " (nconc (char-table-range composition-function-table '(#x1F1E6 . #x1F1FF))"
print " (list (vector \"[\\U0001F1E6-\\U0001F1FF][\\U0001F1E6-\\U0001F1FF]\""
print " 0"
- print " 'compose-gstring-for-graphic))))"
+ print " #'compose-gstring-for-graphic))))"
print ";; UK Flags"
print "(set-char-table-range composition-function-table"
@@ -134,7 +134,7 @@ END {
print " (nconc (char-table-range composition-function-table #x1F3F4)"
print " (list (vector \"\\U0001F3F4\\U000E0067\\U000E0062\\\\(?:\\U000E0065\\U000E006E\\U000E0067\\\\|\\U000E0073\\U000E0063\\U000E0074\\\\|\\U000E0077\\U000E006C\\U000E0073\\\\)\\U000E007F\""
print " 0"
- print " 'compose-gstring-for-graphic))))"
+ print " #'compose-gstring-for-graphic))))"
printf "\n(provide 'emoji-zwj)"
}
diff --git a/configure.ac b/configure.ac
index d68cf42145a..fffac4c2e61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -488,6 +488,7 @@ OPTION_DEFAULT_ON([modules],[don't compile with dynamic modules support])
OPTION_DEFAULT_ON([threads],[don't compile with elisp threading support])
OPTION_DEFAULT_OFF([native-compilation],[compile with Emacs Lisp native compiler support])
OPTION_DEFAULT_OFF([cygwin32-native-compilation],[use native compilation on 32-bit Cygwin])
+OPTION_DEFAULT_OFF([xinput2],[use version 2 of the X Input Extension for input])
AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB],
[use a file notification library (LIB one of: yes, inotify, kqueue, gfile, w32, no)])],
@@ -511,6 +512,12 @@ otherwise for the first of 'inotify', 'kqueue' or 'gfile' that is usable.])
OPTION_DEFAULT_OFF([xwidgets],
[enable use of xwidgets in Emacs buffers (requires gtk3 or macOS Cocoa)])
+OPTION_DEFAULT_OFF([be-app],
+ [enable use of Haiku's Application Kit as a window system])
+
+OPTION_DEFAULT_OFF([be-cairo],
+ [enable use of cairo under Haiku's Application Kit])
+
## Makefile.in needs the cache file name.
AC_SUBST(cache_file)
@@ -787,6 +794,10 @@ case "${canonical}" in
LDFLAGS="-N2M $LDFLAGS"
;;
+ *-haiku )
+ opsys=haiku
+ ;;
+
## Intel 386 machines where we don't care about the manufacturer.
i[3456]86-*-* )
case "${canonical}" in
@@ -908,7 +919,9 @@ if test "$ac_test_CFLAGS" != set; then
if test $emacs_cv_prog_cc_g3 != yes; then
CFLAGS=$emacs_save_CFLAGS
fi
- if test $opsys = mingw32; then
+ # Haiku also needs -gdwarf-2 because its GDB is too old
+ # to understand newer formats.
+ if test $opsys = mingw32 || test $opsys = haiku; then
CFLAGS="$CFLAGS -gdwarf-2"
fi
fi
@@ -1575,6 +1588,8 @@ case "$opsys" in
## Motif needs -lgen.
unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
+
+ haiku) LIBS_SYSTEM="-lnetwork" ;;
esac
AC_SUBST(LIBS_SYSTEM)
@@ -2086,6 +2101,22 @@ if test "${HAVE_NS}" = yes; then
fi
fi
+HAVE_BE_APP=no
+if test "${opsys}" = "haiku" && test "${with_be_app}" = "yes"; then
+ dnl Only GCC is supported. Clang might work, but it's
+ dnl not reliable, so don't check for it here.
+ AC_PROG_CXX([gcc g++])
+ CXXFLAGS="$CXXFLAGS $emacs_g3_CFLAGS"
+ AC_LANG_PUSH([C++])
+ AC_CHECK_HEADER([app/Application.h], [HAVE_BE_APP=yes],
+ [AC_MSG_ERROR([The Application Kit headers required for building
+with the Application Kit were not found or cannot be compiled. Either fix this, or
+re-configure with the option '--without-be-app'.])])
+ AC_LANG_POP([C++])
+fi
+
+AC_SUBST(HAVE_BE_APP)
+
HAVE_W32=no
W32_OBJ=
W32_LIBS=
@@ -2207,6 +2238,39 @@ if test "${HAVE_W32}" = "yes"; then
with_xft=no
fi
+HAIKU_OBJ=
+HAIKU_CXX_OBJ=
+HAIKU_LIBS=
+HAIKU_CFLAGS=
+
+if test "$opsys" = "haiku"; then
+ HAIKU_OBJ="$HAIKU_OBJ haiku.o"
+fi
+
+if test "${HAVE_BE_APP}" = "yes"; then
+ AC_DEFINE([HAVE_HAIKU], 1,
+ [Define if Emacs will be built with Haiku windowing support])
+fi
+
+if test "${HAVE_BE_APP}" = "yes"; then
+ window_system=haiku
+ with_xft=no
+ HAIKU_OBJ="$HAIKU_OBJ haikufns.o haikuterm.o haikumenu.o haikufont.o haikuselect.o haiku_io.o"
+ HAIKU_CXX_OBJ="haiku_support.o haiku_font_support.o haiku_draw_support.o haiku_select.o"
+ HAIKU_LIBS="-lbe -lgame -ltranslation -ltracker" # -lgame is needed for set_mouse_position.
+
+ if test "${with_native_image_api}" = yes; then
+ AC_DEFINE(HAVE_NATIVE_IMAGE_API, 1, [Define to use native OS APIs for images.])
+ NATIVE_IMAGE_API="yes (haiku)"
+ HAIKU_OBJ="$HAIKU_OBJ haikuimage.o"
+ fi
+fi
+
+AC_SUBST(HAIKU_LIBS)
+AC_SUBST(HAIKU_OBJ)
+AC_SUBST(HAIKU_CXX_OBJ)
+AC_SUBST(HAIKU_CFLAGS)
+
## $window_system is now set to the window system we will
## ultimately use.
@@ -2251,6 +2315,9 @@ dnl use the toolkit if we have gtk, or X11R5 or newer.
with_gtk3=yes
USE_X_TOOLKIT=none
;;
+ haiku )
+ term_header=haikuterm.h
+ ;;
esac
if test "$window_system" = none && test "X$with_x" != "Xno"; then
@@ -2582,7 +2649,9 @@ fi
### Use -lrsvg-2 if available, unless '--with-rsvg=no' is specified.
HAVE_RSVG=no
-if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${window_system}" = "pgtk" || test "${opsys}" = "mingw32"; then
+if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" \
+ || test "${opsys}" = "mingw32" || test "${HAVE_BE_APP}" = "yes" \
+ || test "${window_system}" = "pgtk"; then
if test "${with_rsvg}" != "no"; then
RSVG_REQUIRED=2.14.0
RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
@@ -2606,7 +2675,8 @@ fi
HAVE_WEBP=no
if test "${with_webp}" != "no"; then
if test "${HAVE_X11}" = "yes" || test "${opsys}" = "mingw32" \
- || test "${HAVE_W32}" = "yes" || test "${HAVE_NS}" = "yes"; then
+ || test "${HAVE_W32}" = "yes" || test "${HAVE_NS}" = "yes" \
+ || test "${HAVE_BE_APP}" = "yes"; then
WEBP_REQUIRED=0.6.0
WEBP_MODULE="libwebp >= $WEBP_REQUIRED"
@@ -2625,7 +2695,8 @@ if test "${with_webp}" != "no"; then
fi
HAVE_IMAGEMAGICK=no
-if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${window_system}" = "pgtk" || test "${HAVE_W32}" = "yes"; then
+if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes" || \
+ test "${HAVE_BE_APP}" = "yes" || test "${window_system}" = "pgtk"; then
if test "${with_imagemagick}" != "no"; then
if test -n "$BREW"; then
# Homebrew doesn't link ImageMagick 6 by default, so make sure
@@ -3289,6 +3360,9 @@ if test "${with_toolkit_scroll_bars}" != "no"; then
elif test "${HAVE_W32}" = "yes"; then
AC_DEFINE(USE_TOOLKIT_SCROLL_BARS)
USE_TOOLKIT_SCROLL_BARS=yes
+ elif test "${HAVE_BE_APP}" = "yes"; then
+ AC_DEFINE(USE_TOOLKIT_SCROLL_BARS)
+ USE_TOOLKIT_SCROLL_BARS=yes
fi
fi
@@ -3378,6 +3452,22 @@ if test "${HAVE_X11}" = "yes"; then
fi
fi
fi
+if test "${HAVE_BE_APP}" = "yes"; then
+ if test "${with_be_cairo}" != "no"; then
+ CAIRO_REQUIRED=1.8.0
+ CAIRO_MODULE="cairo >= $CAIRO_REQUIRED"
+ EMACS_CHECK_MODULES(CAIRO, $CAIRO_MODULE)
+ if test $HAVE_CAIRO = yes; then
+ AC_DEFINE(USE_BE_CAIRO, 1, [Define to 1 if using cairo on Haiku.])
+ CFLAGS="$CFLAGS $CAIRO_CFLAGS"
+ LIBS="$LIBS $CAIRO_LIBS"
+ AC_SUBST(CAIRO_CFLAGS)
+ AC_SUBST(CAIRO_LIBS)
+ else
+ AC_MSG_WARN([cairo requested but not found.])
+ fi
+ fi
+fi
### Start of font-backend (under any platform) section.
# (nothing here yet -- this is a placeholder)
@@ -3552,6 +3642,58 @@ if test "${HAVE_X11}" = "yes" && test "${HAVE_FREETYPE}" = "yes" \
fi
fi
+### Start of font-backend (under Haiku) selectionn.
+if test "${HAVE_BE_APP}" = "yes"; then
+ if test $HAVE_CAIRO = "yes"; then
+ EMACS_CHECK_MODULES([FREETYPE], [freetype2 >= 2.5.0])
+ test "$HAVE_FREETYPE" = "no" && AC_MSG_ERROR(cairo on Haiku requires libfreetype)
+ EMACS_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.2.0])
+ test "$HAVE_FONTCONFIG" = "no" && AC_MSG_ERROR(cairo on Haiku requires libfontconfig)
+ fi
+
+ HAVE_LIBOTF=no
+
+ if test "${HAVE_FREETYPE}" = "yes"; then
+ AC_DEFINE(HAVE_FREETYPE, 1,
+ [Define to 1 if using the freetype and fontconfig libraries.])
+ OLD_CFLAGS=$CFLAGS
+ OLD_LIBS=$LIBS
+ CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
+ LIBS="$FREETYPE_LIBS $LIBS"
+ AC_CHECK_FUNCS(FT_Face_GetCharVariantIndex)
+ CFLAGS=$OLD_CFLAGS
+ LIBS=$OLD_LIBS
+ if test "${with_libotf}" != "no"; then
+ EMACS_CHECK_MODULES([LIBOTF], [libotf])
+ if test "$HAVE_LIBOTF" = "yes"; then
+ AC_DEFINE(HAVE_LIBOTF, 1, [Define to 1 if using libotf.])
+ AC_CHECK_LIB(otf, OTF_get_variation_glyphs,
+ HAVE_OTF_GET_VARIATION_GLYPHS=yes,
+ HAVE_OTF_GET_VARIATION_GLYPHS=no)
+ if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
+ AC_DEFINE(HAVE_OTF_GET_VARIATION_GLYPHS, 1,
+ [Define to 1 if libotf has OTF_get_variation_glyphs.])
+ fi
+ if ! $PKG_CONFIG --atleast-version=0.9.16 libotf; then
+ AC_DEFINE(HAVE_OTF_KANNADA_BUG, 1,
+[Define to 1 if libotf is affected by https://debbugs.gnu.org/28110.])
+ fi
+ fi
+ fi
+ dnl FIXME should there be an error if HAVE_FREETYPE != yes?
+ dnl Does the new font backend require it, or can it work without it?
+ fi
+fi
+
+if test "${HAVE_BE_APP}" = "yes" && test "${HAVE_FREETYPE}" = "yes"; then
+ if test "${with_harfbuzz}" != "no"; then
+ EMACS_CHECK_MODULES([HARFBUZZ], [harfbuzz >= $harfbuzz_required_ver])
+ if test "$HAVE_HARFBUZZ" = "yes"; then
+ AC_DEFINE(HAVE_HARFBUZZ, 1, [Define to 1 if using HarfBuzz.])
+ fi
+ fi
+fi
+
### End of font-backend section.
AC_SUBST(FREETYPE_CFLAGS)
@@ -3691,8 +3833,9 @@ AC_SUBST(LIBXPM)
### Use -ljpeg if available, unless '--with-jpeg=no'.
HAVE_JPEG=no
LIBJPEG=
-if test "${HAVE_X11}" = "yes" || test "$window_system" = "pgtk" || test "${HAVE_W32}" = "yes" \
- || test "${HAVE_NS}" = "yes"; then
+if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes" \
+ || test "${HAVE_NS}" = "yes" || test "${HAVE_BE_APP}" = "yes" \
+ || test "$window_system" = "pgtk"; then
if test "${with_jpeg}" != "no"; then
AC_CACHE_CHECK([for jpeglib 6b or later],
[emacs_cv_jpeglib],
@@ -4009,8 +4152,9 @@ if test "${with_png}" != no; then
# mingw32 loads the library dynamically.
if test "$opsys" = mingw32; then
AC_CHECK_HEADER([png.h], [HAVE_PNG=yes])
- elif test "${HAVE_X11}" = "yes" || test "$window_system" = "pgtk" || test "${HAVE_W32}" = "yes" \
- || test "${HAVE_NS}" = "yes"; then
+ elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes" \
+ || test "${HAVE_NS}" = "yes" || test "${HAVE_BE_APP}" = "yes" \
+ || test "$window_system" = "pgtk"; then
EMACS_CHECK_MODULES([PNG], [libpng >= 1.0.0])
if test $HAVE_PNG = yes; then
LIBPNG=$PNG_LIBS
@@ -4084,8 +4228,9 @@ if test "${opsys}" = "mingw32"; then
if test "${HAVE_TIFF}" = "yes"; then
AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).])
fi
-elif test "${HAVE_X11}" = "yes" || test "${window_system}" = "pgtk" || test "${HAVE_W32}" = "yes" \
- || test "${HAVE_NS}" = "yes"; then
+elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes" \
+ || test "${HAVE_NS}" = "yes" || test "${HAVE_BE_APP}" = "yes" \
+ || test "$window_system" = "pgtk"; then
if test "${with_tiff}" != "no"; then
AC_CHECK_HEADER(tiffio.h,
[tifflibs="-lz -lm"
@@ -4113,8 +4258,9 @@ if test "${opsys}" = "mingw32"; then
if test "${HAVE_GIF}" = "yes"; then
AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have a gif (or ungif) library.])
fi
-elif test "${HAVE_X11}" = "yes" -o "${window_system}" = "pgtk" && test "${with_gif}" != "no" \
- || test "${HAVE_W32}" = "yes" || test "${HAVE_NS}" = "yes"; then
+elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
+ || test "${HAVE_W32}" = "yes" || test "${HAVE_NS}" = "yes" \
+ || test "${HAVE_BE_APP}" = "yes" || test "$window_system" = "pgtk"; then
AC_CHECK_HEADER(gif_lib.h,
# EGifPutExtensionLast only exists from version libungif-4.1.0b1.
# Earlier versions can crash Emacs, but version 5.0 removes EGifPutExtensionLast.
@@ -4307,6 +4453,26 @@ fi
AC_SUBST(XFIXES_CFLAGS)
AC_SUBST(XFIXES_LIBS)
+## Use XInput 2.0 if available
+HAVE_XINPUT2=no
+if test "${HAVE_X11}" = "yes" && test "${with_xinput2}" != "no"; then
+ EMACS_CHECK_MODULES([XINPUT], [xi])
+ if test $HAVE_XINPUT = yes; then
+ # Now check for XInput2.h
+ AC_CHECK_HEADER(X11/extensions/XInput2.h,
+ [AC_CHECK_LIB(Xi, XIGrabButton, HAVE_XINPUT2=yes)])
+ fi
+ if test $HAVE_XINPUT2 = yes; then
+ AC_DEFINE(HAVE_XINPUT2, 1, [Define to 1 if the X Input Extension version 2.0 or later is present.])
+ if test "$USE_GTK_TOOLKIT" = "GTK2"; then
+ AC_MSG_WARN([You are building Emacs with GTK+ 2 and the X Input Extension version 2.
+This might lead to problems if your version of GTK+ is not built with support for XInput 2.])
+ fi
+ fi
+fi
+AC_SUBST(XINPUT_CFLAGS)
+AC_SUBST(XINPUT_LIBS)
+
### Use Xdbe (-lXdbe) if available
HAVE_XDBE=no
if test "${HAVE_X11}" = "yes"; then
@@ -4531,6 +4697,13 @@ case $with_unexec,$canonical in
[AC_MSG_ERROR([Non-ELF systems are not supported on this platform.])]);;
esac
+if test "$with_unexec" = yes && test "$opsys" = "haiku"; then
+ dnl A serious attempt was actually made to port unexec to Haiku.
+ dnl Something in libstdc++ seems to prevent it from working.
+ AC_MSG_ERROR([Haiku is not supported by the legacy unexec dumper.
+Please use the portable dumper instead.])
+fi
+
# Dump loading
AC_CHECK_FUNCS([posix_madvise])
@@ -4884,7 +5057,7 @@ CFLAGS="$OLDCFLAGS"
LIBS="$OLDLIBS"])
if test "${emacs_cv_links_glib}" = "yes"; then
AC_DEFINE(HAVE_GLIB, 1, [Define to 1 if GLib is linked in.])
- if test "$HAVE_NS" = no;then
+ if test "$HAVE_NS" = no ; then
XGSELOBJ=xgselect.o
fi
fi
@@ -5139,7 +5312,7 @@ dnl It would have Emacs fork off a separate process
dnl to read the input and send it to the true Emacs process
dnl through a pipe.
case $opsys in
- darwin | gnu-linux | gnu-kfreebsd )
+ darwin | gnu-linux | gnu-kfreebsd)
AC_DEFINE(INTERRUPT_INPUT, 1, [Define to read input using SIGIO.])
;;
esac
@@ -5235,6 +5408,14 @@ case $opsys in
AC_DEFINE(PTY_OPEN, [fd = open (pty_name, O_RDWR | O_NONBLOCK)])
AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal("could not grant slave pty"); if (unlockpt(fd) == -1) fatal("could not unlock slave pty"); if (!(ptyname = ptsname(fd))) fatal ("could not enable slave pty"); snprintf (pty_name, PTY_NAME_SIZE, "%s", ptyname); }])
;;
+
+ haiku*)
+ AC_DEFINE(FIRST_PTY_LETTER, ['s'])
+ AC_DEFINE(PTY_NAME_SPRINTF, [])
+ dnl on Haiku pty names aren't distinctive, thus the use of posix_openpt
+ AC_DEFINE(PTY_OPEN, [fd = posix_openpt (O_RDWR | O_NONBLOCK)])
+ AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal("could not grant slave pty"); if (unlockpt(fd) == -1) fatal("could not unlock slave pty"); if (!(ptyname = ptsname(fd))) fatal ("could not enable slave pty"); snprintf (pty_name, PTY_NAME_SIZE, "%s", ptyname); }])
+ ;;
esac
@@ -5456,8 +5637,25 @@ case $opsys in
AC_DEFINE(USG, [])
AC_DEFINE(USG5_4, [])
;;
+
+ haiku)
+ AC_DEFINE(HAIKU, [], [Define if the system is Haiku.])
+ ;;
esac
+AC_SYS_POSIX_TERMIOS
+if test $ac_cv_sys_posix_termios = yes; then
+ AC_CHECK_SIZEOF([speed_t], [], [#include ])
+ dnl on Haiku, and possibly other platforms, speed_t is defined to
+ dnl unsigned char, even when speeds greater than 200 baud are
+ dnl defined.
+
+ if test ${ac_cv_sizeof_speed_t} -lt 2; then
+ AC_DEFINE([HAVE_TINY_SPEED_T], [1],
+ [Define to 1 if speed_t has some sort of nonsensically tiny size.])
+ fi
+fi
+
AC_CACHE_CHECK([for usable FIONREAD], [emacs_cv_usable_FIONREAD],
[case $opsys in
aix4-2 | nacl)
@@ -5500,6 +5698,22 @@ if test $emacs_cv_usable_FIONREAD = yes; then
AC_DEFINE([USABLE_SIGIO], [1], [Define to 1 if SIGIO is usable.])
fi
fi
+
+ if test $emacs_broken_SIGIO = no && test $emacs_cv_usable_SIGIO = no; then
+ AC_CACHE_CHECK([for usable SIGPOLL], [emacs_cv_usable_SIGPOLL],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include
+ #include
+ ]],
+ [[int foo = SIGPOLL | F_SETFL;]])],
+ [emacs_cv_usable_SIGPOLL=yes],
+ [emacs_cv_usable_SIGPOLL=no])],
+ [emacs_cv_usable_SIGPOLL=yes],
+ [emacs_cv_usable_SIGPOLL=no])
+ if test $emacs_cv_usable_SIGPOLL = yes; then
+ AC_DEFINE([USABLE_SIGPOLL], [1], [Define to 1 if SIGPOLL is usable but SIGIO is not.])
+ fi
+ fi
fi
case $opsys in
@@ -5616,6 +5830,17 @@ fi
if test "${window_system}" = "pgtk"; then
FONT_OBJ="ftfont.o ftcrfont.o"
fi
+
+if test "${HAVE_BE_APP}" = "yes" ; then
+ if test "${HAVE_FREETYPE}" = "yes" || \
+ test "${HAVE_CAIRO}" = "yes"; then
+ FONT_OBJ="$FONT_OBJ ftfont.o"
+ fi
+ if test "${HAVE_CAIRO}" = "yes"; then
+ FONT_OBJ="$FONT_OBJ ftcrfont.o"
+ fi
+fi
+
if test "${HAVE_HARFBUZZ}" = "yes" ; then
FONT_OBJ="$FONT_OBJ hbfont.o"
fi
@@ -6004,11 +6229,11 @@ Configured for '${canonical}'.
#### Please respect alphabetical ordering when making additions.
optsep=
emacs_config_features=
-for opt in ACL CAIRO DBUS FREETYPE GCONF GIF GLIB GMP GNUTLS GPM GSETTINGS \
+for opt in ACL BE_APP CAIRO DBUS FREETYPE GCONF GIF GLIB GMP GNUTLS GPM GSETTINGS \
HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 \
M17N_FLT MODULES NATIVE_COMP NOTIFY NS OLDXMENU PDUMPER PGTK PNG RSVG SECCOMP \
SOUND THREADS TIFF TOOLKIT_SCROLL_BARS \
- UNEXEC WEBP X11 XAW3D XDBE XFT XIM XPM XWIDGETS X_TOOLKIT \
+ UNEXEC WEBP X11 XAW3D XDBE XFT XIM XINPUT2 XPM XWIDGETS X_TOOLKIT \
ZLIB; do
case $opt in
@@ -6085,6 +6310,7 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D
Does Emacs support legacy unexec dumping? ${with_unexec}
Which dumping strategy does Emacs use? ${with_dumping}
Does Emacs have native lisp compiler? ${HAVE_NATIVE_COMP}
+ Does Emacs use version 2 of the the X Input Extension? ${HAVE_XINPUT2}
"])
if test -n "${EMACSDATA}"; then
@@ -6161,6 +6387,13 @@ if test -f "$srcdir/$opt_makefile.in"; then
dnl ", [], [opt_makefile='$opt_makefile']" and it should work.
AC_CONFIG_FILES([test/Makefile])
fi
+opt_makefile=test/infra/Makefile
+if test -f "$srcdir/$opt_makefile.in"; then
+ SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
+ dnl Again, it's best not to use a variable. Though you can add
+ dnl ", [], [opt_makefile='$opt_makefile']" and it should work.
+ AC_CONFIG_FILES([test/infra/Makefile])
+fi
dnl The admin/ directory used to be excluded from tarfiles.
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in
index 69d39efa8b9..dde3ae83c16 100644
--- a/doc/emacs/Makefile.in
+++ b/doc/emacs/Makefile.in
@@ -140,6 +140,7 @@ EMACSSOURCES= \
${srcdir}/xresources.texi \
${srcdir}/anti.texi \
${srcdir}/macos.texi \
+ $(srcdir)/haiku.texi \
${srcdir}/msdos.texi \
${srcdir}/gnu.texi \
${srcdir}/glossary.texi \
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index d9d6a680057..917f6f49214 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1584,7 +1584,7 @@ which overrides the global definitions of some keys.
self-inserting because the global keymap binds it to the command
@code{self-insert-command}. The standard Emacs editing characters
such as @kbd{C-a} also get their standard meanings from the global
-keymap. Commands to rebind keys, such as @kbd{M-x global-set-key},
+keymap. Commands to rebind keys, such as @kbd{M-x keymap-global-set},
work by storing the new binding in the proper place in the global map
(@pxref{Rebinding}). To view the current key bindings, use the
@kbd{C-h b} command.
@@ -1736,8 +1736,8 @@ them, it may be convenient to disable completion on those keys by
putting this in your init file:
@lisp
-(define-key minibuffer-local-completion-map " " 'self-insert-command)
-(define-key minibuffer-local-completion-map "?" 'self-insert-command)
+(keymap-set minibuffer-local-completion-map "SPC" 'self-insert-command)
+(keymap-set minibuffer-local-completion-map "?" 'self-insert-command)
@end lisp
@node Rebinding
@@ -1756,19 +1756,19 @@ local keymap, which affects all buffers using the same major mode.
Emacs session. @xref{Init Rebinding}, for a description of how to
make key rebindings affect future Emacs sessions.
-@findex global-set-key
-@findex local-set-key
-@findex global-unset-key
-@findex local-unset-key
+@findex keymap-global-set
+@findex keymap-local-set
+@findex keymap-global-unset
+@findex keymap-local-unset
@table @kbd
-@item M-x global-set-key @key{RET} @var{key} @var{cmd} @key{RET}
+@item M-x keymap-global-set @key{RET} @var{key} @var{cmd} @key{RET}
Define @var{key} globally to run @var{cmd}.
-@item M-x local-set-key @key{RET} @var{key} @var{cmd} @key{RET}
+@item M-x keymap-local-set @key{RET} @var{key} @var{cmd} @key{RET}
Define @var{key} locally (in the major mode now in effect) to run
@var{cmd}.
-@item M-x global-unset-key @key{RET} @var{key}
+@item M-x keymap-global-unset @key{RET} @var{key}
Make @var{key} undefined in the global map.
-@item M-x local-unset-key @key{RET} @var{key}
+@item M-x keymap-local-unset @key{RET} @var{key}
Make @var{key} undefined locally (in the major mode now in effect).
@end table
@@ -1777,11 +1777,11 @@ command (@pxref{Interactive Shell}), replacing the normal global
definition of @kbd{C-z}:
@example
-M-x global-set-key @key{RET} C-z shell @key{RET}
+M-x keymap-global-set @key{RET} C-z shell @key{RET}
@end example
@noindent
-The @code{global-set-key} command reads the command name after the
+The @code{keymap-global-set} command reads the command name after the
key. After you press the key, a message like this appears so that you
can confirm that you are binding the key you want:
@@ -1802,7 +1802,7 @@ reads another character; if that is @kbd{4}, another prefix character,
it reads one more character, and so on. For example,
@example
-M-x global-set-key @key{RET} C-x 4 $ spell-other-window @key{RET}
+M-x keymap-global-set @key{RET} C-x 4 $ spell-other-window @key{RET}
@end example
@noindent
@@ -1810,8 +1810,8 @@ redefines @kbd{C-x 4 $} to run the (fictitious) command
@code{spell-other-window}.
You can remove the global definition of a key with
-@code{global-unset-key}. This makes the key @dfn{undefined}; if you
-type it, Emacs will just beep. Similarly, @code{local-unset-key} makes
+@code{keymap-global-unset}. This makes the key @dfn{undefined}; if you
+type it, Emacs will just beep. Similarly, @code{keymap-local-unset} makes
a key undefined in the current major mode keymap, which makes the global
definition (or lack of one) come back into effect in that major mode.
@@ -1844,11 +1844,11 @@ you can specify them in your initialization file by writing Lisp code.
simplest is to use the @code{kbd} function, which converts a textual
representation of a key sequence---similar to how we have written key
sequences in this manual---into a form that can be passed as an
-argument to @code{global-set-key}. For example, here's how to bind
+argument to @code{keymap-global-set}. For example, here's how to bind
@kbd{C-z} to the @code{shell} command (@pxref{Interactive Shell}):
@example
-(global-set-key (kbd "C-z") 'shell)
+(keymap-global-set "C-z" 'shell)
@end example
@noindent
@@ -1861,69 +1861,24 @@ causes an error; it certainly isn't what you want.
and mouse events:
@example
-(global-set-key (kbd "C-c y") 'clipboard-yank)
-(global-set-key (kbd "C-M-q") 'query-replace)
-(global-set-key (kbd "") 'flyspell-mode)
-(global-set-key (kbd "C-") 'display-line-numbers-mode)
-(global-set-key (kbd "C-") 'forward-sentence)
-(global-set-key (kbd "") 'mouse-save-then-kill)
-@end example
-
- Instead of using @code{kbd}, you can use a Lisp string or vector to
-specify the key sequence. Using a string is simpler, but only works
-for @acronym{ASCII} characters and Meta-modified @acronym{ASCII}
-characters. For example, here's how to bind @kbd{C-x M-l} to
-@code{make-symbolic-link} (@pxref{Copying and Naming}):
-
-@example
-(global-set-key "\C-x\M-l" 'make-symbolic-link)
-@end example
-
- To bind a key sequence including @key{TAB}, @key{RET}, @key{ESC}, or
-@key{DEL}, the string should contain the Emacs Lisp escape sequence
-@samp{\t}, @samp{\r}, @samp{\e}, or @samp{\d} respectively. Here is
-an example which binds @kbd{C-x @key{TAB}} to @code{indent-rigidly}
-(@pxref{Indentation}):
-
-@example
-(global-set-key "\C-x\t" 'indent-rigidly)
-@end example
-
- When the key sequence includes function keys or mouse button events,
-or non-@acronym{ASCII} characters such as @code{C-=} or @code{H-a},
-you can use a vector to specify the key sequence. Each element in the
-vector stands for an input event; the elements are separated by spaces
-and surrounded by a pair of square brackets. If a vector element is a
-character, write it as a Lisp character constant: @samp{?} followed by
-the character as it would appear in a string. Function keys are
-represented by symbols (@pxref{Function Keys}); simply write the
-symbol's name, with no other delimiters or punctuation. Here are some
-examples:
-
-@example
-(global-set-key [?\C-=] 'make-symbolic-link)
-(global-set-key [?\M-\C-=] 'make-symbolic-link)
-(global-set-key [?\H-a] 'make-symbolic-link)
-(global-set-key [f7] 'make-symbolic-link)
-(global-set-key [C-mouse-1] 'make-symbolic-link)
-@end example
-
-@noindent
-You can use a vector for the simple cases too:
-
-@example
-(global-set-key [?\C-z ?\M-l] 'make-symbolic-link)
+(keymap-global-set "C-c y" 'clipboard-yank)
+(keymap-global-set "C-M-q" 'query-replace)
+(keymap-global-set "" 'flyspell-mode)
+(keymap-global-set "C-" 'display-line-numbers-mode)
+(keymap-global-set "C-" 'forward-sentence)
+(keymap-global-set "" 'mouse-save-then-kill)
@end example
Language and coding systems may cause problems with key bindings for
non-@acronym{ASCII} characters. @xref{Init Non-ASCII}.
-@findex define-key
+@findex keymap-set
+@findex keymap-unset
As described in @ref{Local Keymaps}, major modes and minor modes can
define local keymaps. These keymaps are constructed when the mode is
-loaded for the first time in a session. The function @code{define-key}
-can be used to make changes in a specific keymap. This function can
-also unset keys, when passed @code{nil} as the binding.
+loaded for the first time in a session. The function @code{keymap-set}
+can be used to make changes in a specific keymap. To remove a key
+binding, use @code{keymap-unset}.
Since a mode's keymaps are not constructed until it has been loaded,
you must delay running code which modifies them, e.g., by putting it
@@ -1935,11 +1890,11 @@ the one for @kbd{C-c C-x x} in Texinfo mode:
@example
(add-hook 'texinfo-mode-hook
(lambda ()
- (define-key texinfo-mode-map "\C-cp"
+ (keymap-set texinfo-mode-map "C-c p"
'backward-paragraph)
- (define-key texinfo-mode-map "\C-cn"
+ (keymap-set texinfo-mode-map "C-c n"
'forward-paragraph)))
- (define-key texinfo-mode-map "\C-c\C-xx" nil)
+ (keymap-set texinfo-mode-map "C-c C-x x" nil)
@end example
@node Modifier Keys
@@ -1961,7 +1916,7 @@ between those keystrokes. However, you can bind shifted @key{Control}
alphabetical keystrokes in GUI frames:
@lisp
-(global-set-key (kbd "C-S-n") #'previous-line)
+(keymap-global-set "C-S-n" #'previous-line)
@end lisp
For all other modifiers, you can make the modified alphabetical
@@ -2115,7 +2070,7 @@ button, @code{mouse-2} for the next, and so on. Here is how you can
redefine the second mouse button to split the current window:
@example
-(global-set-key [mouse-2] 'split-window-below)
+(keymap-global-set "" 'split-window-below)
@end example
The symbols for drag events are similar, but have the prefix
@@ -2198,7 +2153,7 @@ Thus, here is how to define the command for clicking the first button in
a mode line to run @code{scroll-up-command}:
@example
-(global-set-key [mode-line mouse-1] 'scroll-up-command)
+(keymap-global-set "" 'scroll-up-command)
@end example
Here is the complete list of these dummy prefix keys and their
@@ -2589,13 +2544,13 @@ Rebind the key @kbd{C-x l} to run the function @code{make-symbolic-link}
(@pxref{Init Rebinding}).
@example
-(global-set-key "\C-xl" 'make-symbolic-link)
+(keymap-global-set "C-x l" 'make-symbolic-link)
@end example
or
@example
-(define-key global-map "\C-xl" 'make-symbolic-link)
+(keymap-set global-map "C-x l" 'make-symbolic-link)
@end example
Note once again the single-quote used to refer to the symbol
@@ -2605,7 +2560,7 @@ Note once again the single-quote used to refer to the symbol
Do the same thing for Lisp mode only.
@example
-(define-key lisp-mode-map "\C-xl" 'make-symbolic-link)
+(keymap-set lisp-mode-map "C-x l" 'make-symbolic-link)
@end example
@item
@@ -2622,7 +2577,7 @@ so that they run @code{forward-line} instead.
Make @kbd{C-x C-v} undefined.
@example
-(global-unset-key "\C-x\C-v")
+(keymap-global-unset "C-x C-v")
@end example
One reason to undefine a key is so that you can make it a prefix.
@@ -2798,18 +2753,6 @@ strings incorrectly. You should then avoid adding Emacs Lisp code
that modifies the coding system in other ways, such as calls to
@code{set-language-environment}.
- To bind non-@acronym{ASCII} keys, you must use a vector (@pxref{Init
-Rebinding}). The string syntax cannot be used, since the
-non-@acronym{ASCII} characters will be interpreted as meta keys. For
-instance:
-
-@example
-(global-set-key [?@var{char}] 'some-function)
-@end example
-
-@noindent
-Type @kbd{C-q}, followed by the key you want to bind, to insert @var{char}.
-
@node Early Init File
@subsection The Early Init File
@cindex early init file
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 7ea754612ee..90044b1d4bb 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -716,46 +716,62 @@ frame:
@table @code
@item mode-line
@cindex @code{mode-line} face
-@cindex faces for mode lines
-This face is used for the mode line of the currently selected window,
+This is the base face used for the mode lines, as well as header lines
and for menu bars when toolkit menus are not used. By default, it's
drawn with shadows for a raised effect on graphical displays, and
drawn as the inverse of the default face on non-windowed terminals.
+
+The @code{mode-line-active} and @code{mode-line-inactive} faces (which
+are the ones used on the mode lines) inherit from this face.
+
+@item mode-line-active
+@cindex faces for mode lines
+Like @code{mode-line}, but used for the mode line of the currently
+selected window. This face inherits from @code{mode-line}, so changes
+in that face affect mode lines in all windows.
+
@item mode-line-inactive
@cindex @code{mode-line-inactive} face
Like @code{mode-line}, but used for mode lines of the windows other
than the selected one (if @code{mode-line-in-non-selected-windows} is
non-@code{nil}). This face inherits from @code{mode-line}, so changes
in that face affect mode lines in all windows.
+
@item mode-line-highlight
@cindex @code{mode-line-highlight} face
Like @code{highlight}, but used for mouse-sensitive portions of text
on mode lines. Such portions of text typically pop up tooltips
(@pxref{Tooltips}) when the mouse pointer hovers above them.
+
@item mode-line-buffer-id
@cindex @code{mode-line-buffer-id} face
This face is used for buffer identification parts in the mode line.
+
@item header-line
@cindex @code{header-line} face
Similar to @code{mode-line} for a window's header line, which appears
at the top of a window just as the mode line appears at the bottom.
Most windows do not have a header line---only some special modes, such
Info mode, create one.
+
@item header-line-highlight
@cindex @code{header-line-highlight} face
Similar to @code{highlight} and @code{mode-line-highlight}, but used
for mouse-sensitive portions of text on header lines. This is a
separate face because the @code{header-line} face might be customized
in a way that does not interact well with @code{highlight}.
+
@item tab-line
@cindex @code{tab-line} face
Similar to @code{mode-line} for a window's tab line, which appears
at the top of a window with tabs representing window buffers.
@xref{Tab Line}.
+
@item vertical-border
@cindex @code{vertical-border} face
This face is used for the vertical divider between windows on text
terminals.
+
@item minibuffer-prompt
@cindex @code{minibuffer-prompt} face
@vindex minibuffer-prompt-properties
@@ -765,19 +781,23 @@ By default, Emacs automatically adds this face to the value of
properties (@pxref{Text Properties,,, elisp, the Emacs Lisp Reference
Manual}) used to display the prompt text. (This variable takes effect
when you enter the minibuffer.)
+
@item fringe
@cindex @code{fringe} face
The face for the fringes to the left and right of windows on graphic
displays. (The fringes are the narrow portions of the Emacs frame
between the text area and the window's right and left borders.)
@xref{Fringes}.
+
@item cursor
The @code{:background} attribute of this face specifies the color of
the text cursor. @xref{Cursor Display}.
+
@item tooltip
This face is used for tooltip text. By default, if Emacs is built
with GTK+ support, tooltips are drawn via GTK+ and this face has no
effect. @xref{Tooltips}.
+
@item mouse
This face determines the color of the mouse pointer.
@end table
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 83847fb8f12..ce92435ae70 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -221,6 +221,7 @@ Appendices
* X Resources:: X resources for customizing Emacs.
* Antinews:: Information about Emacs version 27.
* Mac OS / GNUstep:: Using Emacs under macOS and GNUstep.
+* Haiku:: Using Emacs on Haiku.
* Microsoft Windows:: Using Emacs on Microsoft Windows and MS-DOS.
* Manifesto:: What's GNU? Gnu's Not Unix!
@@ -1249,6 +1250,11 @@ Emacs and macOS / GNUstep
* Mac / GNUstep Events:: How window system events are handled.
* GNUstep Support:: Details on status of GNUstep support.
+Emacs and Haiku
+
+* Haiku Basics:: Basic Emacs usage and installation under Haiku.
+* Haiku Fonts:: The various options for displaying fonts on Haiku.
+
Emacs and Microsoft Windows/MS-DOS
* Windows Startup:: How to start Emacs on Windows.
@@ -1618,6 +1624,7 @@ Lisp programming.
@include anti.texi
@include macos.texi
+@include haiku.texi
@c Includes msdos-xtra.
@include msdos.texi
@include gnu.texi
diff --git a/doc/emacs/haiku.texi b/doc/emacs/haiku.texi
new file mode 100644
index 00000000000..d2b7eb8408f
--- /dev/null
+++ b/doc/emacs/haiku.texi
@@ -0,0 +1,124 @@
+@c This is part of the Emacs manual.
+@c Copyright (C) 2021 Free Software Foundation, Inc.
+@c See file emacs.texi for copying conditions.
+@node Haiku
+@appendix Emacs and Haiku
+@cindex Haiku
+
+ Haiku is a Unix-like operating system that originated as a
+re-implementation of the operating system BeOS.
+
+ This section describes the peculiarities of using Emacs built with
+the Application Kit, the windowing system native to Haiku. The
+oddities described here do not apply to using Emacs on Haiku built
+without windowing support, or built with X11.
+
+@menu
+* Haiku Basics:: Basic Emacs usage and installation under Haiku.
+* Haiku Fonts:: The various options for displaying fonts on Haiku.
+@end menu
+
+@node Haiku Basics
+@section Installation and usage peculiarities under Haiku
+@cindex haiku application
+@cindex haiku installation
+
+ Emacs installs two separate executables under Haiku; it is up to the
+user to decide which one suits him best: A regular executable, with
+the lowercase name @code{emacs}, and a binary containing
+Haiku-specific application metadata, with the name @code{Emacs}.
+
+@cindex launching Emacs from the tracker
+@cindex tty Emacs in haiku
+ If you are launching Emacs from the Tracker, or want to make the
+Tracker open files using Emacs, you should use the binary named
+@code{Emacs}; if you are going to use Emacs in the terminal, or wish
+to launch separate instances of Emacs, or do not care for the
+aforementioned system integration features, use the binary named
+@code{emacs} instead.
+
+@cindex modifier keys and system keymap (Haiku)
+@cindex haiku keymap
+ On Haiku, unusual modifier keys such as the Hyper key are
+unsupported. By default, the super key corresponds with the option
+key defined by the operating system, the meta key with the command
+key, the control key with the system control key, and the shift key
+with the system shift key. On a standard PC keyboard, Haiku should
+map these keys to positions familiar to those using a GNU system, but
+this may require some adjustment to your system's configuration to
+work.
+
+ It is impossible to type accented characters using the system super
+key map.
+
+ You can customize the correspondence between modifier keys known to
+the system, and those known to Emacs. The variables that allow for
+that are described below.
+
+@cindex modifier key customization (Haiku)
+@table @code
+@vindex haiku-meta-keysym
+@item haiku-meta-keysym
+The system modifier key that will be treated as the Meta key by Emacs.
+It defaults to @code{command}.
+
+@vindex haiku-control-keysym
+@item haiku-control-keysym
+The system modifier key that will be treated as the Control key by
+Emacs. It defaults to @code{control}.
+
+@vindex haiku-super-keysym
+@item haiku-super-keysym
+The system modifier key that will be treated as the Super key by
+Emacs. It defaults to @code{option}.
+
+@vindex haiku-shift-keysym
+@item haiku-shift-keysym
+The system modifier key that will be treated as the Shift key by
+Emacs. It defaults to @code{shift}.
+@end table
+
+The value of each variable can be one of the symbols @code{command},
+@code{control}, @code{option}, @code{shift}, or @code{nil}.
+@code{nil} or any other value will cause the default value to be used
+instead.
+
+@cindex tooltips (haiku)
+@cindex haiku tooltips
+@vindex haiku-use-system-tooltips
+ On Haiku, Emacs defaults to using the system tooltip mechanism.
+This usually leads to more responsive tooltips, but the tooltips will
+not be able to display text properties or faces. If you need those
+features, customize the variable @code{haiku-use-system-tooltips} to
+the nil value, and Emacs will use its own implementation of tooltips.
+
+ Both system tooltips and Emacs's own tooltips cannot display above
+the menu bar, so help text in the menu bar will display in the echo
+area instead.
+
+@subsection What to do when Emacs crashes
+@cindex crashes, Haiku
+@cindex haiku debugger
+@vindex haiku-debug-on-fatal-error
+ If the variable @code{haiku-debug-on-fatal-error} is non-nil, Emacs
+will launch the system debugger when a fatal signal is received. It
+defaults to @code{t}. If GDB cannot be used on your system, please
+attach the report generated by the system debugger when reporting a
+bug.
+
+@node Haiku Fonts
+@section Font and font backend selection on Haiku
+@cindex font backend selection (Haiku)
+
+ Emacs, when built with Haiku windowing support, can be built with
+several different font backends. You can specify font backends by
+specifying @kbd{-xrm Emacs.fontBackend:BACKEND} on the command line
+used to invoke Emacs, where @kbd{BACKEND} is one of the backends
+specified below, or on a per-frame basis by changing the
+@code{font-backend} frame parameter.
+
+ Two of these backends, @code{ftcr} and @code{ftcrhb} are identical
+to their counterparts on the X Window System. There is also a
+Haiku-specific backend named @code{haiku}, that uses the App Server to
+draw fonts, but does not at present support display of color font and
+emoji.
diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi
index 78964bb903f..e0533f049ea 100644
--- a/doc/emacs/kmacro.texi
+++ b/doc/emacs/kmacro.texi
@@ -439,7 +439,7 @@ name to execute the last keyboard macro, in its current form. (If you
later add to the definition of this macro, that does not alter the
name's definition as a macro.) The macro name is a Lisp symbol, and
defining it in this way makes it a valid command name for calling with
-@kbd{M-x} or for binding a key to with @code{global-set-key}
+@kbd{M-x} or for binding a key to with @code{keymap-global-set}
(@pxref{Keymaps}). If you specify a name that has a prior definition
other than a keyboard macro, an error message is shown and nothing is
changed.
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 3d423d7675b..1f2c852fac1 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -3011,6 +3011,14 @@ the WebKit widget to display the next search result, while typing
To leave incremental search, you can type @kbd{C-g}.
+@findex xwidget-webkit-browse-history
+@cindex history of webkit buffers
+ The command @code{xwidget-webkit-browse-history} displays a buffer
+containing a list of pages previously loaded by the current WebKit
+buffer, and lets you navigate to those pages by hitting @kbd{RET}.
+
+It is bound to @kbd{H}.
+
@node Browse-URL
@subsection Following URLs
@cindex World Wide Web
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi
index 00fa6c0aa31..a7bd006df4d 100644
--- a/doc/emacs/xresources.texi
+++ b/doc/emacs/xresources.texi
@@ -395,6 +395,8 @@ Background color.
Foreground color for a selected item.
@item foreground
Foreground color.
+@item disabledForeground
+Foreground color for a disabled menu item.
@ifnottex
@item horizontalSpacing
Horizontal spacing in pixels between items. Default is 3.
@@ -406,6 +408,12 @@ the associated text. Default is 10.
@item shadowThickness
Thickness of shadow lines for 3D buttons, arrows, and other graphical
elements. Default is 1.
+@item borderThickness
+Thickness of the external borders of the menu bars and pop-up menus.
+Default is 1.
+@item cursor
+Name of the cursor to use in the menu bars and pop-up menus. Default
+is @code{"right_ptr"}.
@end ifnottex
@item margin
Margin of the menu bar, in characters. Default is 1.
diff --git a/doc/lispref/anti.texi b/doc/lispref/anti.texi
index 118df05c791..45cbff61e0b 100644
--- a/doc/lispref/anti.texi
+++ b/doc/lispref/anti.texi
@@ -135,7 +135,7 @@ the programmers should be trusted to know what they are doing.
@item
We deleted several features of the @code{pcase} macro, in accordance
-with our general plane to remove @code{pcase} from Emacs:
+with our general plan to remove @code{pcase} from Emacs:
@itemize @minus
@item
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index 6ed46fa6a27..581183a0a39 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -451,7 +451,7 @@ reads and discards the following up-event. You can get access to that
up-event with the @samp{U} code character.
This kind of input is used by commands such as @code{describe-key} and
-@code{global-set-key}.
+@code{keymap-global-set}.
@item K
A key sequence on a form that can be used as input to functions like
@@ -1559,8 +1559,10 @@ corner of @var{object}, which is @code{(0 . 0)}. If @var{object} is
the top left corner of the character glyph clicked on.
@item @var{width}, @var{height}
-These are the pixel width and height of @var{object} or, if this is
-@code{nil}, those of the character glyph clicked on.
+If the click is on a character, either from buffer text or from
+overlay or display string, these are the pixel width and height of
+that character's glyph; otherwise they are dimensions of @var{object}
+clicked on.
@end table
For clicks on a scroll bar, @var{position} has this form:
@@ -1886,6 +1888,15 @@ This event is sent whenever some kind of update occurs in
@var{xwidget}. There are several types of updates, identified by
their @var{kind}.
+@cindex xwidget callbacks
+It is a special event (@pxref{Special Events}), which should be
+handled by adding a callback to an xwidget that is called whenever an
+xwidget event for @var{xwidget} is received.
+
+You can add a callback by setting the @code{callback} of an xwidget's
+property list, which should be a function that accepts @var{xwidget}
+and @var{kind} as arguments.
+
@table @code
@cindex @code{load-changed} xwidget event
@item load-changed
@@ -1941,9 +1952,15 @@ internally by @code{xwidget-webkit-execute-script}.
@end table
@cindex @code{xwidget-display-event} event
-@item (xwidget-display-event @var{xwidget})
+@item (xwidget-display-event @var{xwidget} @var{source})
This event is sent whenever an xwidget requests that another xwidget
-be displayed. @var{xwidget} is the xwidget that should be displayed.
+be displayed. @var{xwidget} is the xwidget that should be displayed,
+and @var{source} is the xwidget that asked to display @var{xwidget}.
+
+It is also a special event which should be handled through callbacks.
+You can add such a callback by setting the @code{display-callback} of
+@var{source}'s property list, which should be a function that accepts
+@var{xwidget} and @var{source} as arguments.
@var{xwidget}'s buffer will be set to a temporary buffer. When
displaying the widget, care should be taken to replace the buffer with
@@ -1980,13 +1997,28 @@ frame has already been made visible, Emacs has no work to do.
@cindex @code{wheel-up} event
@cindex @code{wheel-down} event
-@item (wheel-up @var{position})
-@itemx (wheel-down @var{position})
+@item (wheel-up @var{position} @var{clicks} @var{lines} @var{pixel-delta})
+@itemx (wheel-down @var{position} @var{clicks} @var{lines} @var{pixel-delta})
These kinds of event are generated by moving a mouse wheel. The
@var{position} element is a mouse position list (@pxref{Click
Events}), specifying the position of the mouse cursor when the event
occurred.
+@var{clicks}, if present, is the number of times in quick succession
+the wheel has been moved. @xref{Repeat Events}. @var{lines}, if
+present and not @code{nil}, is the number of screen lines that should
+be scrolled. @var{pixel-delta}, if present, is a pair of the form
+@w{@code{(@var{x} . @var{y})}}, where @var{x} and @var{y} are the
+number of pixels to scroll by in each axis.
+
+@cindex pixel-resolution wheel events
+You can use @var{x} and @var{y} to determine how much the mouse wheel
+has actually moved at pixel resolution.
+
+For example, the pixelwise deltas could be used to scroll the display
+at pixel resolution, exactly according to the user's turning the mouse
+wheel.
+
@vindex mouse-wheel-up-event
@vindex mouse-wheel-down-event
This kind of event is generated only on some kinds of systems. On some
@@ -2147,7 +2179,7 @@ bind it to the @code{signal usr1} event sequence:
(defun usr1-handler ()
(interactive)
(message "Got USR1 signal"))
-(global-set-key [signal usr1] 'usr1-handler)
+(keymap-global-set "" 'usr1-handler)
@end smallexample
@node Classifying Events
@@ -3016,7 +3048,7 @@ supplied to input methods (@pxref{Input Methods}). Use
if you want to translate characters after input methods operate.
@end defvar
-@defun keyboard-translate from to
+@defun key-translate from to
This function modifies @code{keyboard-translate-table} to translate
character code @var{from} into character code @var{to}. It creates
the keyboard translate table if necessary.
@@ -3027,12 +3059,12 @@ make @kbd{C-x}, @kbd{C-c} and @kbd{C-v} perform the cut, copy and paste
operations:
@example
-(keyboard-translate ?\C-x 'control-x)
-(keyboard-translate ?\C-c 'control-c)
-(keyboard-translate ?\C-v 'control-v)
-(global-set-key [control-x] 'kill-region)
-(global-set-key [control-c] 'kill-ring-save)
-(global-set-key [control-v] 'yank)
+(key-translate "C-x" "")
+(key-translate "C-c" "")
+(key-translate "C-v" "")
+(keymap-global-set "" 'kill-region)
+(keymap-global-set "" 'kill-ring-save)
+(keymap-global-set "" 'yank)
@end example
@noindent
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index b93b8bc015a..00287a7212a 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -737,7 +737,7 @@ If omitted, @var{key-type} and @var{value-type} default to
The user can add any key matching the specified key type, but you can
give some keys a preferential treatment by specifying them with the
-@code{:options} (see @ref{Variable Definitions}). The specified keys
+@code{:options} (@pxref{Variable Definitions}). The specified keys
will always be shown in the customize buffer (together with a suitable
value), with a checkbox to include or exclude or disable the key/value
pair from the alist. The user will not be able to edit the keys
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index a8a7837a4a0..0bdbc06013e 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2052,14 +2052,14 @@ means hide the excess parts of @var{string} with a @code{display} text
property (@pxref{Display Property}) showing the ellipsis, instead of
actually truncating the string.
-@group
@example
+@group
(truncate-string-to-width "\tab\t" 12 4)
@result{} "ab"
(truncate-string-to-width "\tab\t" 12 4 ?\s)
@result{} " ab "
-@end example
@end group
+@end example
This function uses @code{string-width} and @code{char-width} to find
the suitable truncation point when @var{string} is too wide, so it
@@ -2201,6 +2201,23 @@ though when this function is run from an idle timer with a delay of zero
seconds.
@end defun
+@defun buffer-text-pixel-size &optional buffer-or-name window from to x-limit y-limit
+This is much like @code{window-text-pixel-size}, but can be used when
+the buffer isn't shown in a window. (@code{window-text-pixel-size} is
+faster when it is, so this function shouldn't be used in that case.)
+
+@var{buffer-or-name} must specify a live buffer or the name of a live
+buffer and defaults to the current buffer. @var{window} must be a
+live window and defaults to the selected one; the function will
+compute the text dimensions as if @var{buffer} is displayed in
+@var{window}. The return value is a cons of the maximum pixel-width
+of any text line and the pixel-height of all the text lines of the
+buffer specified by @var{buffer-or-name}.
+
+The optional arguments @var{x-limit} and @var{y-limit} have the same
+meaning as with @code{window-text-pixel-size}.
+@end defun
+
@defun string-pixel-width string
This is a convenience function that uses @code{window-text-pixel-size}
to compute the width of @var{string} (in pixels).
@@ -2767,8 +2784,9 @@ apply to. Here are the possible values of @var{characteristic}:
@item type
The kind of window system the terminal uses---either @code{graphic}
(any graphics-capable display), @code{x}, @code{pc} (for the MS-DOS
-console), @code{w32} (for MS Windows 9X/NT/2K/XP), or @code{tty} (a
-non-graphics-capable display). @xref{Window Systems, window-system}.
+console), @code{w32} (for MS Windows 9X/NT/2K/XP), @code{haiku} (for
+Haiku), or @code{tty} (a non-graphics-capable display).
+@xref{Window Systems, window-system}.
@item class
What kinds of colors the terminal supports---either @code{color},
@@ -4856,9 +4874,7 @@ window on a minibuffer-less frame.
The @code{display} text property (or overlay property) is used to
insert images into text, and to control other aspects of how text
-displays. The value of the @code{display} property should be a
-display specification, or a list or vector containing several display
-specifications. Display specifications in the same @code{display}
+displays. Display specifications in the same @code{display}
property value generally apply in parallel to the text they cover.
If several sources (overlays and/or a text property) specify values
@@ -4866,6 +4882,50 @@ for the @code{display} property, only one of the values takes effect,
following the rules of @code{get-char-property}. @xref{Examining
Properties}.
+ The value of the @code{display} property should be a display
+specification, or a list or vector containing several display
+specifications.
+
+@defun get-display-property position prop &optional object properties
+This convenience function can be used to get a specific display
+property, no matter whether the @code{display} property is a vector, a
+list or a simple property. This is like @code{get-text-property}
+(@pxref{Examining Properties}), but works on the @code{display}
+property only.
+
+@var{position} is the position in the buffer or string to examine, and
+@var{prop} is the @code{display} property to return. The optional
+@var{object} argument should be either a string or a buffer, and
+defaults to the current buffer. If the optional @var{properties}
+argument is non-@code{nil}, it should be a @code{display} property,
+and in that case, @var{position} and @var{object} are ignored. (This
+can be useful if you've already gotten the @code{display} property
+with @code{get-char-property}, for instance (@pxref{Examining
+Properties}).
+@end defun
+
+@defun add-display-text-property start end prop value &optional object
+Add @code{display} property @var{prop} of @var{value} to the text from
+@var{start} to @var{end}.
+
+If any text in the region has a non-@code{nil} @code{display}
+property, those properties are retained. For instance:
+
+@lisp
+(add-display-text-property 4 8 'height 2.0)
+(add-display-text-property 2 12 'raise 0.5)
+@end lisp
+
+After doing this, the region from 2 to 4 will have the @code{raise}
+@code{display} property, the region from 4 to 8 will have both the
+@code{raise} and @code{height} @code{display} properties, and finally
+the region from 8 to 12 will only have the @code{raise} @code{display}
+property.
+
+If @var{object} is non-@code{nil}, it should be a string or a buffer.
+If @code{nil}, this defaults to the current buffer.
+@end defun
+
@cindex display property, unsafe evaluation
@cindex security, and display specifications
Some of the display specifications allow inclusion of Lisp forms,
@@ -5141,6 +5201,24 @@ text that has the specification. It displays all of these spaces
be an integer or float. Characters other than spaces are not affected
at all; in particular, this has no effect on tab characters.
+@item (min-width (@var{width}))
+This display specification ensures the text that has it takes at least
+@var{width} space on display, by adding a stretch of white space to
+the end of the text if the text is shorter than @var{width}. The text
+is partitioned using the identity of the parameter, which is why the
+parameter is a list with one element. For instance:
+
+@lisp
+(insert (propertize "foo" '(display (min-width (6.0)))))
+@end lisp
+
+This will add padding after @samp{foo} bringing the total width up to
+the width of six normal characters. Note that the affected characters
+are identified by the @code{(6.0)} list in the display property,
+compared with @code{eq}. The element @var{width} can be either an
+integer or a float specifying the required minimum width of the text
+(@pxref{Pixel Specification}).
+
@item (height @var{height})
This display specification makes the text taller or shorter.
Here are the possibilities for @var{height}:
@@ -6806,10 +6884,11 @@ widget that the newly created widget should share settings and
subprocesses with.
The xwidget that is returned will be killed alongside its buffer
-(@pxref{Killing Buffers}). Once it is killed, the xwidget may
-continue to exist as a Lisp object and act as a @code{display}
-property until all references to it are gone, but most actions that
-can be performed on live xwidgets will no longer be available.
+(@pxref{Killing Buffers}). You can also kill it using
+@code{kill-xwidget}. Once it is killed, the xwidget may continue to
+exist as a Lisp object and act as a @code{display} property until all
+references to it are gone, but most actions that can be performed on
+live xwidgets will no longer be available.
@end defun
@defun xwidgetp object
@@ -6822,6 +6901,12 @@ This function returns @code{t} if @var{object} is an xwidget that
hasn't been killed, and @code{nil} otherwise.
@end defun
+@defun kill-xwidget xwidget
+This function kills @var{xwidget}, by removing it from its buffer and
+releasing window system resources it holds.
+@end defun
+
+@cindex xwidget property list
@defun xwidget-plist xwidget
This function returns the property list of @var{xwidget}.
@end defun
@@ -6965,6 +7050,65 @@ the absolute location of the web resources referenced by @var{text},
to be used for resolving relative links in @var{text}.
@end defun
+@defun xwidget-webkit-goto-history xwidget rel-pos
+Make @var{xwidget}, a WebKit widget, load the @var{rel-pos}th element
+in its navigation history.
+
+If @var{rel-pos} is zero, the current page will be reloaded instead.
+@end defun
+
+@defun xwidget-webkit-back-forward-list xwidget &optional limit
+Return the navigation history of @var{xwidget}, up to @var{limit}
+items in each direction. If not specified, @var{limit} defaults to
+50.
+
+The returned value is a list of the form @w{@code{(@var{back}
+@var{here} @var{forward})}}, where @var{here} is the current
+navigation item, while @var{back} is a list of items containing the
+items recorded by WebKit before the current navigation item, and
+@var{forward} is a list of items recorded after the current navigation
+item. @var{back}, @var{here} and @var{forward} can all be @code{nil}.
+
+When @var{here} is @code{nil}, it means that no items have been
+recorded yet; if @var{back} or @var{forward} are @code{nil}, it means
+that there is no history recorded before or after the current item
+respectively.
+
+Navigation items are themselves lists of the form @w{@code{(@var{idx}
+@var{title} @var{uri})}}. In these lists, @var{idx} is an index that
+can be passed to @code{xwidget-webkit-goto-history}, @var{title} is
+the human-readable title of the item, and @var{uri} is the URI of the
+item. The user should normally have no reason to load @var{uri}
+manually to reach a specific history item. Instead, @var{idx} should
+be passed as an index to @code{xwidget-webkit-goto-history}.
+@end defun
+
+@defun xwidget-webkit-estimated-load-progress xwidget
+Return an estimate of how much data is remaining to be transferred
+before the page displayed by the WebKit widget @var{xwidget} is fully
+loaded.
+
+The value returned is a float ranging between 0.0 and 1.0.
+@end defun
+
+@defun xwidget-webkit-set-cookie-storage-file xwidget file
+Make the WebKit widget @var{xwidget} store cookies in @var{file}.
+
+@var{file} must be an absolute file name. The new setting will also
+affect any xwidget that was created with @var{xwidget} as the
+@code{related} argument to @code{make-xwidget}, and widgets related to
+those as well.
+
+If this function is not called at least once on @var{xwidget} or a
+related widget, @var{xwidget} will not store cookies on disk at all.
+@end defun
+
+@defun xwidget-webkit-stop-loading xwidget
+Terminate any data transfer still in progress in the WebKit widget
+@var{xwidget} as part of a page-loading operation. If a page is not
+being loaded, this function does nothing.
+@end defun
+
@node Buttons
@section Buttons
@cindex buttons in buffers
@@ -8208,6 +8352,8 @@ Emacs is displaying the frame using the Nextstep interface (used on
GNUstep and macOS).
@item pc
Emacs is displaying the frame using MS-DOS direct screen writes.
+@item haiku
+Emacs is displaying the frame using the Application Kit on Haiku.
@item nil
Emacs is displaying the frame on a character-based terminal.
@end table
@@ -8254,6 +8400,7 @@ area. On text-mode (a.k.a.@: ``TTY'') frames, tooltips are always
displayed in the echo area.
@end defun
+@cindex system tooltips
@vindex x-gtk-use-system-tooltips
When Emacs is built with GTK+ support, it by default displays tooltips
using GTK+ functions, and the appearance of the tooltips is then
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi
index 7d67cc3af11..0db77255a65 100644
--- a/doc/lispref/edebug.texi
+++ b/doc/lispref/edebug.texi
@@ -1267,7 +1267,7 @@ balanced parentheses, recursive processing of forms, and recursion via
indirect specifications.
Here's a table of the possible elements of a specification list, with
-their meanings (see @ref{Specification Examples}, for the referenced
+their meanings (@pxref{Specification Examples}, for the referenced
examples):
@table @code
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 1c0b0fa1b5a..4f47a1d1bbd 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -840,6 +840,7 @@ Keymaps
* Key Lookup:: Finding a key's binding in one keymap.
* Functions for Key Lookup:: How to request key lookup.
* Changing Key Bindings:: Redefining a key in a keymap.
+* Low-Level Key Binding:: Legacy key syntax description.
* Remapping Commands:: A keymap can translate one command to another.
* Translation Keymaps:: Keymaps for translating sequences of events.
* Key Binding Commands:: Interactive interfaces for redefining keys.
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index d93770a0d2f..4b114ba111d 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -3308,8 +3308,8 @@ first, before handlers for jobs such as remote file access.
@ifnottex
@noindent
-@code{access-file}, @code{add-name-to-file},
-@code{byte-compiler-base-file-name},@*
+@code{abbreviate-file-name}, @code{access-file},
+@code{add-name-to-file}, @code{byte-compiler-base-file-name},@*
@code{copy-directory}, @code{copy-file},
@code{delete-directory}, @code{delete-file},
@code{diff-latest-backup-file},
@@ -3368,7 +3368,8 @@ first, before handlers for jobs such as remote file access.
@iftex
@noindent
@flushleft
-@code{access-file}, @code{add-name-to-file},
+@code{abbreviate-file-name}, @code{access-file},
+@code{add-name-to-file},
@code{byte-com@discretionary{}{}{}piler-base-file-name},
@code{copy-directory}, @code{copy-file},
@code{delete-directory}, @code{delete-file},
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 31ad82b7ada..923ff19997e 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -214,7 +214,8 @@ The terminal and keyboard coding systems used on the terminal.
@item
The kind of display associated with the terminal. This is the symbol
returned by the function @code{terminal-live-p} (i.e., @code{x},
-@code{t}, @code{w32}, @code{ns}, or @code{pc}). @xref{Frames}.
+@code{t}, @code{w32}, @code{ns}, @code{pc}, or @code{haiku}).
+@xref{Frames}.
@item
A list of terminal parameters. @xref{Terminal Parameters}.
@@ -680,7 +681,7 @@ indicate that position for the various builds:
@itemize @w{}
@item (1) non-toolkit and terminal frames
-@item (2) Lucid, Motif and MS-Windows frames
+@item (2) Lucid, Motif, MS-Windows, and Haiku frames
@item (3) GTK+ and NS frames
@end itemize
@@ -1729,7 +1730,9 @@ fit will be clipped by the window manager.
@item fullscreen
This parameter specifies whether to maximize the frame's width, height
or both. Its value can be @code{fullwidth}, @code{fullheight},
-@code{fullboth}, or @code{maximized}. A @dfn{fullwidth} frame is as
+@code{fullboth}, or @code{maximized}.@footnote{On Haiku, setting
+@code{fullscreen} to @code{fullwidth} or @code{fullheight} has no
+effect.} A @dfn{fullwidth} frame is as
wide as possible, a @dfn{fullheight} frame is as tall as possible, and
a @dfn{fullboth} frame is both as wide and as tall as possible. A
@dfn{maximized} frame is like a ``fullboth'' frame, except that it usually
@@ -2191,7 +2194,10 @@ either via @code{focus-follows-mouse} (@pxref{Input Focus}) or
@code{mouse-autoselect-window} (@pxref{Mouse Window Auto-selection}).
This may have the unwanted side-effect that a user cannot scroll a
non-selected frame with the mouse. Some window managers may not honor
-this parameter.
+this parameter. On Haiku, it also has the side-effect that the window
+will not be able to receive any keyboard input from the user, not even
+if the user switches to the frame using the key combination
+@kbd{Alt-@key{TAB}}.
@vindex undecorated@r{, a frame parameter}
@item undecorated
@@ -2352,7 +2358,10 @@ driver for OTF and TTF fonts with text shaping by the Uniscribe
engine), and @code{harfbuzz} (font driver for OTF and TTF fonts with
HarfBuzz text shaping) (@pxref{Windows Fonts,,, emacs, The GNU Emacs
Manual}). The @code{harfbuzz} driver is similarly recommended. On
-other systems, there is only one available font backend, so it does
+Haiku, there can be several font drivers (@pxref{Haiku Fonts,,, emacs,
+The GNU Emacs Manual}).
+
+On other systems, there is only one available font backend, so it does
not make sense to modify this frame parameter.
@vindex background-mode@r{, a frame parameter}
@@ -3141,8 +3150,10 @@ raises @var{frame} above all other child frames of its parent.
@deffn Command lower-frame &optional frame
This function lowers frame @var{frame} (default, the selected frame)
below all other frames belonging to the same or a higher z-group as
-@var{frame}. If @var{frame} is a child frame (@pxref{Child Frames}),
-this lowers @var{frame} below all other child frames of its parent.
+@var{frame}.@footnote{Lowering frames is not supported on Haiku, due
+to limitations imposed by the system.} If @var{frame} is a child
+frame (@pxref{Child Frames}), this lowers @var{frame} below all other
+child frames of its parent.
@end deffn
@defun frame-restack frame1 frame2 &optional above
@@ -3152,7 +3163,8 @@ that if both frames are visible and their display areas overlap,
third argument @var{above} is non-@code{nil}, this function restacks
@var{frame1} above @var{frame2}. This means that if both frames are
visible and their display areas overlap, @var{frame1} will (partially)
-obscure @var{frame2}.
+obscure @var{frame2}.@footnote{Restacking frames is not supported on
+Haiku, due to limitations imposed by the system.}
Technically, this function may be thought of as an atomic action
performed in two steps: The first step removes @var{frame1}'s
@@ -3247,12 +3259,16 @@ parent frame's window-system window.
@cindex reparent frame
@cindex nest frame
- The @code{parent-frame} parameter can be changed at any time. Setting
-it to another frame @dfn{reparents} the child frame. Setting it to
-another child frame makes the frame a @dfn{nested} child frame. Setting
-it to @code{nil} restores the frame's status as a top-level frame---a
-frame whose window-system window is a child of its display's root
-window.
+ The @code{parent-frame} parameter can be changed at any time.
+Setting it to another frame @dfn{reparents} the child frame. Setting
+it to another child frame makes the frame a @dfn{nested} child frame.
+Setting it to @code{nil} restores the frame's status as a top-level
+frame---a frame whose window-system window is a child of its display's
+root window.@footnote{On Haiku, child frames are only visible when a
+parent frame is active, owing to a limitation of the Haiku windowing
+system. Owing to the same limitation, child frames are only
+guaranteed to appear above their top-level parent; that is to say, the
+top-most frame in the hierarchy, which does not have a parent frame.}
Since child frames can be arbitrarily nested, a frame can be both a
child and a parent frame. Also, the relative roles of child and parent
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index a788852de75..1a9eb30fde1 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -333,6 +333,13 @@ stands for no text itself. It is used only for a side effect: it
specifies @var{mapvar}'s value as the keymap for any following
@samp{\[@var{command}]} sequences in this documentation string.
+@item \`@var{KEYSEQ}'
+stands for a key sequence @var{KEYSEQ}, which will use the same face
+as a command substitution. This should be used only when a key
+sequence has no corresponding command, for example when it is read
+directly with @code{read-key-sequence}. It must be a valid key
+sequence according to @code{key-valid-p}.
+
@item `
(grave accent) stands for a left quote.
This generates a left single quotation mark, an apostrophe, or a grave
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 899499ed46e..d893e22b8b9 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -30,6 +30,7 @@ is found. The whole process is called @dfn{key lookup}.
* Key Lookup:: Finding a key's binding in one keymap.
* Functions for Key Lookup:: How to request key lookup.
* Changing Key Bindings:: Redefining a key in a keymap.
+* Low-Level Key Binding:: Legacy key syntax description.
* Remapping Commands:: A keymap can translate one command to another.
* Translation Keymaps:: Keymaps for translating sequences of events.
* Key Binding Commands:: Interactive interfaces for redefining keys.
@@ -95,21 +96,11 @@ Manual}.
(kbd "C-M-") @result{} [C-M-down]
@end example
-@findex kbd-valid-p
+@findex key-valid-p
The @code{kbd} function is very permissive, and will try to return
something sensible even if the syntax used isn't completely
conforming. To check whether the syntax is actually valid, use the
-@code{kbd-valid-p} function.
-
-@code{define-key} also supports using the shorthand syntax
-@samp{["..."]} syntax to define a key. The string has to be a
-strictly valid @code{kbd} sequence, and if it's not valid, an error
-will be signalled. For instance, to bind @key{C-c f}, you can say:
-
-@lisp
-(define-key global-map ["C-c f"] #'find-file-literally)
-@end lisp
-
+@code{key-valid-p} function.
@end defun
@@ -627,16 +618,16 @@ active keymap.
@result{} nil
@end group
@group
-(local-set-key "\C-p" ctl-x-map)
+(keymap-local-set "C-p" ctl-x-map)
@result{} nil
@end group
@group
-(key-binding "\C-p\C-f")
+(keymap-binding "C-p C-f")
@result{} find-file
@end group
@group
-(key-binding "\C-p6")
+(keymap-binding "C-p 6")
@result{} nil
@end group
@end example
@@ -699,7 +690,7 @@ use, in place of the buffer's default local keymap.
@cindex major mode keymap
The local keymap is normally set by the buffer's major mode, and
every buffer with the same major mode shares the same local keymap.
-Hence, if you call @code{local-set-key} (@pxref{Key Binding Commands})
+Hence, if you call @code{keymap-local-set} (@pxref{Key Binding Commands})
to change the local keymap in one buffer, that also affects the local
keymaps in other buffers with the same major mode.
@@ -733,39 +724,7 @@ Normally it ignores @code{overriding-local-map} and
then it pays attention to them. @var{position} can optionally be either
an event position as returned by @code{event-start} or a buffer
position, and may change the keymaps as described for
-@code{key-binding}.
-@end defun
-
-@defun key-binding key &optional accept-defaults no-remap position
-This function returns the binding for @var{key} according to the
-current active keymaps. The result is @code{nil} if @var{key} is
-undefined in the keymaps.
-
-The argument @var{accept-defaults} controls checking for default
-bindings, as in @code{lookup-key} (@pxref{Functions for Key Lookup}).
-
-When commands are remapped (@pxref{Remapping Commands}),
-@code{key-binding} normally processes command remappings so as to
-return the remapped command that will actually be executed. However,
-if @var{no-remap} is non-@code{nil}, @code{key-binding} ignores
-remappings and returns the binding directly specified for @var{key}.
-
-If @var{key} starts with a mouse event (perhaps following a prefix
-event), the maps to be consulted are determined based on the event's
-position. Otherwise, they are determined based on the value of point.
-However, you can override either of them by specifying @var{position}.
-If @var{position} is non-@code{nil}, it should be either a buffer
-position or an event position like the value of @code{event-start}.
-Then the maps consulted are determined based on @var{position}.
-
-Emacs signals an error if @var{key} is not a string or a vector.
-
-@example
-@group
-(key-binding "\C-x\C-f")
- @result{} find-file
-@end group
-@end example
+@code{keymap-binding}.
@end defun
@node Searching Keymaps
@@ -1042,7 +1001,7 @@ keymap.
Let's use the term @dfn{keymap entry} to describe the value found by
looking up an event type in a keymap. (This doesn't include the item
string and other extra elements in a keymap element for a menu item, because
-@code{lookup-key} and other key lookup functions don't include them in
+@code{keymap-lookup} and other key lookup functions don't include them in
the returned value.) While any Lisp object may be stored in a keymap
as a keymap entry, not all make sense for key lookup. Here is a table
of the meaningful types of keymap entries:
@@ -1193,7 +1152,7 @@ Used in keymaps to undefine keys. It calls @code{ding}, but does
not cause an error.
@end deffn
-@defun local-key-binding key &optional accept-defaults
+@defun keymap-local-binding key &optional accept-defaults
This function returns the binding for @var{key} in the current
local keymap, or @code{nil} if it is undefined there.
@@ -1201,7 +1160,7 @@ The argument @var{accept-defaults} controls checking for default bindings,
as in @code{lookup-key} (above).
@end defun
-@defun global-key-binding key &optional accept-defaults
+@defun keymap-global-binding key &optional accept-defaults
This function returns the binding for command @var{key} in the
current global keymap, or @code{nil} if it is undefined there.
@@ -1284,65 +1243,55 @@ change a binding in the global keymap, the change is effective in all
buffers (though it has no direct effect in buffers that shadow the
global binding with a local one). If you change the current buffer's
local map, that usually affects all buffers using the same major mode.
-The @code{global-set-key} and @code{local-set-key} functions are
+The @code{keymap-global-set} and @code{keymap-local-set} functions are
convenient interfaces for these operations (@pxref{Key Binding
-Commands}). You can also use @code{define-key}, a more general
+Commands}). You can also use @code{keymap-set}, a more general
function; then you must explicitly specify the map to change.
When choosing the key sequences for Lisp programs to rebind, please
follow the Emacs conventions for use of various keys (@pxref{Key
Binding Conventions}).
-@cindex meta character key constants
-@cindex control character key constants
- @code{define-key} (and other functions that are used to rebind keys)
-understand a number of different syntaxes for the keys.
+ The functions below signal an error if @var{keymap} is not a keymap,
+or if @var{key} is not a valid key.
-@table @asis
-@item A vector containing a single string.
-This is the preferred way to represent a key sequence. Here's a
-couple of examples:
+@var{key} is a string representing a single key or a series of key
+strokes. Key strokes are separated by a single space character.
-@example
-["C-c M-f"]
-["S-"]
-@end example
+Each key stroke is either a single character, or the name of an
+event, surrounded by angle brackets. In addition, any key stroke
+may be preceded by one or more modifier keys. Finally, a limited
+number of characters have a special shorthand syntax. Here's some
+example key sequences:
-The syntax is the same as the one used by Emacs when displaying key
-bindings, for instance in @samp{*Help*} buffers and help texts.
+@table @kbd
+@item f
+The key @kbd{f}.
-If the syntax isn't valid, an error will be raised when running
-@code{define-key}, or when byte-compiling code that has these calls.
+@item S o m
+A three key sequence of the keys @kbd{S}, @kbd{o} and @kbd{m}.
-@item A vector containing lists of keys.
-You can use a list containing modifier names plus one base event (a
-character or function key name). For example, @code{[(control ?a)
-(meta b)]} is equivalent to @kbd{C-a M-b} and @code{[(hyper control
-left)]} is equivalent to @kbd{C-H-left}.
+@item C-c o
+A two key sequence of the keys @kbd{c} with the control modifier and
+then the key @kbd{o}
-@item A string with control and meta characters.
-Internally, key sequences are often represented as strings using the
-special escape sequences for control and meta characters
-(@pxref{String Type}), but this representation can also be used by
-users when rebinding keys. A string like @code{"\M-x"} is read as
-containing a single @kbd{M-x}, @code{"\C-f"} is read as containing a
-single @kbd{C-f}, and @code{"\M-\C-x"} and @code{"\C-\M-x"} are both
-read as containing a single @kbd{C-M-x}.
+@item H-
+The key named @kbd{left} with the hyper modifier.
-@item a vector of characters.
-This is the other internal representation of key sequences, and
-supports a fuller range of modifiers than the string representation.
-One example is @samp{[?\C-\H-x home]}, which represents the @kbd{C-H-x
-home} key sequence. @xref{Character Type}.
+@item M-RET
+The @kbd{return} key with a meta modifier.
+
+@item C-M-
+The @kbd{space} key with both the control and meta modifiers.
@end table
- The functions below signal an error if @var{keymap} is not a keymap,
-or if @var{key} is not a string or vector representing a key sequence.
-You can use event types (symbols) as shorthand for events that are
-lists. The @code{kbd} function (@pxref{Key Sequences}) is a
-convenient way to specify the key sequence.
+The only keys that have a special shorthand syntax are @kbd{NUL},
+@kbd{RET}, @kbd{TAB}, @kbd{LFD}, @kbd{ESC}, @kbd{SPC} and @kbd{DEL}.
-@defun define-key keymap key binding
+The modifiers have to be specified in alphabetical order:
+@samp{A-C-H-M-S-s}, which is @samp{Alt-Control-Hyper-Meta-Shift-super}.
+
+@defun keymap-set keymap key binding
This function sets the binding for @var{key} in @var{keymap}. (If
@var{key} is more than one event long, the change is actually made
in another keymap reached from @var{keymap}.) The argument
@@ -1350,7 +1299,7 @@ in another keymap reached from @var{keymap}.) The argument
meaningful. (For a list of meaningful types, see @ref{Key Lookup}.)
The value returned by @code{define-key} is @var{binding}.
-If @var{key} is @code{[t]}, this sets the default binding in
+If @var{key} is @kbd{}, this sets the default binding in
@var{keymap}. When an event has no binding of its own, the Emacs
command loop uses the keymap's default binding, if there is one.
@@ -1358,7 +1307,7 @@ command loop uses the keymap's default binding, if there is one.
@cindex key sequence error
Every prefix of @var{key} must be a prefix key (i.e., bound to a keymap)
or undefined; otherwise an error is signaled. If some prefix of
-@var{key} is undefined, then @code{define-key} defines it as a prefix
+@var{key} is undefined, then @code{keymap-set} defines it as a prefix
key so that the rest of @var{key} can be defined as specified.
If there was previously no binding for @var{key} in @var{keymap}, the
@@ -1376,7 +1325,7 @@ bindings in it:
@result{} (keymap)
@end group
@group
-(define-key map ["C-f"] 'forward-char)
+(keymap-set map "C-f" 'forward-char)
@result{} forward-char
@end group
@group
@@ -1386,7 +1335,7 @@ map
@group
;; @r{Build sparse submap for @kbd{C-x} and bind @kbd{f} in that.}
-(define-key map ["C-x f"] 'forward-word)
+(keymap-set map "C-x f" 'forward-word)
@result{} forward-word
@end group
@group
@@ -1399,14 +1348,14 @@ map
@group
;; @r{Bind @kbd{C-p} to the @code{ctl-x-map}.}
-(define-key map ["C-p"] ctl-x-map)
+(keymap-set map "C-p" ctl-x-map)
;; @code{ctl-x-map}
@result{} [nil @dots{} find-file @dots{} backward-kill-sentence]
@end group
@group
;; @r{Bind @kbd{C-f} to @code{foo} in the @code{ctl-x-map}.}
-(define-key map ["C-p C-f"] 'foo)
+(keymap-set map "C-p C-f" 'foo)
@result{} 'foo
@end group
@group
@@ -1426,9 +1375,9 @@ changing the bindings of both @kbd{C-p C-f} and @kbd{C-x C-f} in the
default global map.
@defun define-keymap &key options... &rest pairs...
-@code{define-key} is the general work horse for defining a key in a
+@code{keymap-set} is the general work horse for defining a key in a
keymap. When writing modes, however, you frequently have to bind a
-large number of keys at once, and using @code{define-key} on them all
+large number of keys at once, and using @code{keymap-set} on them all
can be tedious and error-prone. Instead you can use
@code{define-keymap}, which creates a keymaps and binds a number of
keys. Here's a very basic example:
@@ -1437,14 +1386,14 @@ keys. Here's a very basic example:
(define-keymap
"n" #'forward-line
"f" #'previous-line
- ["C-c C-c"] #'quit-window)
+ "C-c C-c" #'quit-window)
@end lisp
This function creates a new sparse keymap, defines the two keystrokes
in @var{pairs}, and returns the new keymap.
@var{pairs} is a list of alternating key bindings and key definitions,
-as accepted by @code{define-key}. In addition the key can be the
+as accepted by @code{keymap-set}. In addition the key can be the
special symbol @code{:menu}, in which case the definition should be a
menu definition as accepted by @code{easy-menu-define} (@pxref{Easy
Menu}). Here's a brief example:
@@ -1513,8 +1462,8 @@ Here's an example:
@lisp
(defvar-keymap eww-textarea-map
:parent text-mode-map
- "\r" #'forward-line
- [?\t] #'shr-next-link)
+ "RET" #'forward-line
+ "TAB" #'shr-next-link)
@end lisp
@end defmac
@@ -1617,13 +1566,166 @@ Modes}); then its keymap will automatically inherit from
(defvar special-mode-map
(let ((map (make-sparse-keymap)))
(suppress-keymap map)
- (define-key map "q" 'quit-window)
+ (keymap-set map "q" 'quit-window)
@dots{}
map))
@end group
@end smallexample
@end defun
+@node Low-Level Key Binding
+@section Low-Level Key Binding
+@cindex low-level key bindings
+
+ Historically, Emacs has supported a number of different syntaxes for
+defining keys. The documented way to bind a key today is to use the
+syntax supported by @code{key-valid-p}, which is what all the
+functions like @code{keymap-set} and @code{keymap-lookup} supports.
+This section documents the old-style syntax and interface functions;
+they should not be used in new code.
+
+@cindex meta character key constants
+@cindex control character key constants
+ @code{define-key} (and other low-level functions that are used to
+rebind keys) understand a number of different syntaxes for the keys.
+
+@table @asis
+@item A vector containing lists of keys.
+You can use a list containing modifier names plus one base event (a
+character or function key name). For example, @code{[(control ?a)
+(meta b)]} is equivalent to @kbd{C-a M-b} and @code{[(hyper control
+left)]} is equivalent to @kbd{C-H-left}.
+
+@item A string of characters with modifiers
+Internally, key sequences are often represented as strings using the
+special escape sequences for shift, control and meta modifiers
+(@pxref{String Type}), but this representation can also be used by
+users when rebinding keys. A string like @code{"\M-x"} is read as
+containing a single @kbd{M-x}, @code{"\C-f"} is read as containing a
+single @kbd{C-f}, and @code{"\M-\C-x"} and @code{"\C-\M-x"} are both
+read as containing a single @kbd{C-M-x}.
+
+@item A vector of characters and key symbols
+This is the other internal representation of key sequences. It
+supports a fuller range of modifiers than the string representation,
+and also support function keys. An example is @w{@samp{[?\C-\H-x
+home]}}, which represents the @w{@kbd{C-H-x @key{home}}} key sequence.
+@xref{Character Type}.
+@end table
+
+@defun define-key keymap key binding &optional remove
+This function is like @code{keymap-set} (@pxref{Changing Key
+Bindings}, but understands only the legacy key syntaxes.
+
+In addition, this function also has a @var{remove} argument. If it is
+non-@code{nil}, the definition will be removed. This is almost the
+same as setting the definition to @code{nil}, but makes a difference
+if the @var{keymap} has a parent, and @var{key} is shadowing the same
+binding in the parent. With @var{remove}, subsequent lookups will
+return the binding in the parent, and with a nil @var{def}, the
+lookups will return @code{nil}.
+@end defun
+
+Here are other legacy key definition functions and commands, with the
+equivalent modern function to use instead in new code.
+
+@deffn Command global-set-key key binding
+This function sets the binding of @var{key} in the current global map
+to @var{binding}. Use @code{keymap-global-set} instead.
+@end deffn
+
+@deffn Command global-unset-key key
+This function removes the binding of @var{key} from the current
+global map. Use @code{keymap-global-unset} instead.
+@end deffn
+
+@deffn Command local-set-key key binding
+This function sets the binding of @var{key} in the current local
+keymap to @var{binding}. Use @code{keymap-local-set} instead.
+@end deffn
+
+@deffn Command local-unset-key key
+This function removes the binding of @var{key} from the current
+local map. Use @code{keymap-local-unset} instead.
+@end deffn
+
+@defun substitute-key-definition olddef newdef keymap &optional oldmap
+This function replaces @var{olddef} with @var{newdef} for any keys in
+@var{keymap} that were bound to @var{olddef}. In other words,
+@var{olddef} is replaced with @var{newdef} wherever it appears. The
+function returns @code{nil}. Use @code{keymap-substitute} instead.
+@end defun
+
+@defun define-key-after map key binding &optional after
+Define a binding in @var{map} for @var{key}, with value @var{binding},
+just like @code{define-key}, but position the binding in @var{map} after
+the binding for the event @var{after}. The argument @var{key} should be
+of length one---a vector or string with just one element. But
+@var{after} should be a single event type---a symbol or a character, not
+a sequence. The new binding goes after the binding for @var{after}. If
+@var{after} is @code{t} or is omitted, then the new binding goes last, at
+the end of the keymap. However, new bindings are added before any
+inherited keymap. Use @code{keymap-set-after} instead of this function.
+@end defun
+
+@defun keyboard-translate from to
+This function modifies @code{keyboard-translate-table} to translate
+character code @var{from} into character code @var{to}. It creates
+the keyboard translate table if necessary. Use @code{key-translate}
+instead.
+@end defun
+
+@defun key-binding key &optional accept-defaults no-remap position
+This function returns the binding for @var{key} according to the
+current active keymaps. The result is @code{nil} if @var{key} is
+undefined in the keymaps. The argument @var{accept-defaults} controls
+checking for default bindings, as in @code{lookup-key}
+(@pxref{Functions for Key Lookup}). If @var{no-remap} is
+non-@code{nil}, @code{key-binding} ignores command remappings
+(@pxref{Remapping Commands}) and returns the binding directly
+specified for @var{key}. The optional argument @var{position} should
+be either a buffer position or an event position like the value of
+@code{event-start}; it tells the function to consult the maps
+determined based on that @var{position}.
+
+Emacs signals an error if @var{key} is not a string or a vector.
+
+Use @code{keymap-lookup} instead of this function.
+@end defun
+
+@defun lookup-key keymap key &optional accept-defaults
+This function returns the definition of @var{key} in @var{keymap}. If
+the string or vector @var{key} is not a valid key sequence according
+to the prefix keys specified in @var{keymap}, it must be too long and
+have extra events at the end that do not fit into a single key
+sequence. Then the value is a number, the number of events at the
+front of @var{key} that compose a complete key.
+
+If @var{accept-defaults} is non-@code{nil}, then @code{lookup-key}
+considers default bindings as well as bindings for the specific events
+in @var{key}. Otherwise, @code{lookup-key} reports only bindings for
+the specific sequence @var{key}, ignoring default bindings except when
+you explicitly ask about them.
+
+Use @code{keymap-lookup} instead of this function.
+@end defun
+
+@defun local-key-binding key &optional accept-defaults
+This function returns the binding for @var{key} in the current
+local keymap, or @code{nil} if it is undefined there.
+
+The argument @var{accept-defaults} controls checking for default bindings,
+as in @code{lookup-key} (above).
+@end defun
+
+@defun global-key-binding key &optional accept-defaults
+This function returns the binding for command @var{key} in the
+current global keymap, or @code{nil} if it is undefined there.
+
+The argument @var{accept-defaults} controls checking for default bindings,
+as in @code{lookup-key} (above).
+@end defun
+
@node Remapping Commands
@section Remapping Commands
@cindex remapping commands
@@ -1834,32 +1936,18 @@ problematic suffixes/prefixes are @kbd{@key{ESC}}, @kbd{M-O} (which is really
This section describes some convenient interactive interfaces for
changing key bindings. They work by calling @code{define-key}.
- People often use @code{global-set-key} in their init files
+ People often use @code{keymap-global-set} in their init files
(@pxref{Init File}) for simple customization. For example,
@smallexample
-(global-set-key (kbd "C-x C-\\") 'next-line)
-@end smallexample
-
-@noindent
-or
-
-@smallexample
-(global-set-key [?\C-x ?\C-\\] 'next-line)
-@end smallexample
-
-@noindent
-or
-
-@smallexample
-(global-set-key [(control ?x) (control ?\\)] 'next-line)
+(keymap-global-set "C-x C-\\" 'next-line)
@end smallexample
@noindent
redefines @kbd{C-x C-\} to move down a line.
@smallexample
-(global-set-key [M-mouse-1] 'mouse-set-point)
+(keymap-global-set "M-" 'mouse-set-point)
@end smallexample
@noindent
@@ -1873,14 +1961,7 @@ they usually will be in a Lisp file (@pxref{Loading Non-ASCII}), you
must type the keys as multibyte too. For instance, if you use this:
@smallexample
-(global-set-key "ö" 'my-function) ; bind o-umlaut
-@end smallexample
-
-@noindent
-or
-
-@smallexample
-(global-set-key ?ö 'my-function) ; bind o-umlaut
+(keymap-global-set "ö" 'my-function) ; bind o-umlaut
@end smallexample
@noindent
@@ -1891,20 +1972,20 @@ binding, you need to teach Emacs how to decode the keyboard by using an
appropriate input method (@pxref{Input Methods, , Input Methods, emacs, The GNU
Emacs Manual}).
-@deffn Command global-set-key key binding
+@deffn Command keymap-global-set key binding
This function sets the binding of @var{key} in the current global map
to @var{binding}.
@smallexample
@group
-(global-set-key @var{key} @var{binding})
+(keymap-global-set @var{key} @var{binding})
@equiv{}
-(define-key (current-global-map) @var{key} @var{binding})
+(keymap-set (current-global-map) @var{key} @var{binding})
@end group
@end smallexample
@end deffn
-@deffn Command global-unset-key key
+@deffn Command keymap-global-unset key
@cindex unbinding keys
This function removes the binding of @var{key} from the current
global map.
@@ -1915,50 +1996,32 @@ that uses @var{key} as a prefix---which would not be allowed if
@smallexample
@group
-(global-unset-key "\C-l")
+(keymap-global-unset "C-l")
@result{} nil
@end group
@group
-(global-set-key "\C-l\C-l" 'redraw-display)
+(keymap-global-set "C-l C-l" 'redraw-display)
@result{} nil
@end group
@end smallexample
-
-This function is equivalent to using @code{define-key} as follows:
-
-@smallexample
-@group
-(global-unset-key @var{key})
-@equiv{}
-(define-key (current-global-map) @var{key} nil)
-@end group
-@end smallexample
@end deffn
-@deffn Command local-set-key key binding
+@deffn Command keymap-local-set key binding
This function sets the binding of @var{key} in the current local
keymap to @var{binding}.
@smallexample
@group
-(local-set-key @var{key} @var{binding})
+(keymap-local-set @var{key} @var{binding})
@equiv{}
-(define-key (current-local-map) @var{key} @var{binding})
+(keymap-set (current-local-map) @var{key} @var{binding})
@end group
@end smallexample
@end deffn
-@deffn Command local-unset-key key
+@deffn Command keymap-local-unset key
This function removes the binding of @var{key} from the current
local map.
-
-@smallexample
-@group
-(local-unset-key @var{key})
-@equiv{}
-(define-key (current-local-map) @var{key} nil)
-@end group
-@end smallexample
@end deffn
@node Scanning Keymaps
@@ -2813,9 +2876,9 @@ using an indirection through @code{tool-bar-map}.
By default, the global map binds @code{[tool-bar]} as follows:
@example
-(global-set-key [tool-bar]
- `(menu-item ,(purecopy "tool bar") ignore
- :filter tool-bar-make-keymap))
+(keymap-global-set ""
+ `(menu-item ,(purecopy "tool bar") ignore
+ :filter tool-bar-make-keymap))
@end example
@noindent
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 1fbd66458a4..fb0f25fa3d7 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -947,6 +947,9 @@ actually Linux is just the kernel, not the whole system.)
@item gnu/kfreebsd
A GNU (glibc-based) system with a FreeBSD kernel.
+@item haiku
+The Haiku operating system, a derivative of the Be Operating System.
+
@item hpux
Hewlett-Packard HPUX operating system.
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 937680c200d..863b318c205 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -3650,9 +3650,20 @@ property is obsolete; use the @code{cursor-intangible} property instead.
@item cursor-intangible
@kindex cursor-intangible @r{(text property)}
@findex cursor-intangible-mode
+@cindex rear-nonsticky, and cursor-intangible property
When the minor mode @code{cursor-intangible-mode} is turned on, point
is moved away from any position that has a non-@code{nil}
@code{cursor-intangible} property, just before redisplay happens.
+Note that ``stickiness'' of the property (@pxref{Sticky Properties})
+is taken into account when computing allowed cursor positions, so (for
+instance) to insert a stretch of five @samp{x} characters into which
+the cursor can't enter, you should do something like:
+
+@lisp
+(insert
+ (propertize "xxxx" 'cursor-intangible t)
+ (propertize "x" 'cursor-intangible t 'rear-nonsticky t))
+@end lisp
@vindex cursor-sensor-inhibit
When the variable @code{cursor-sensor-inhibit} is non-@code{nil}, the
@@ -3950,6 +3961,8 @@ of the kill ring. To insert with inheritance, use the special
primitives described in this section. Self-inserting characters
inherit properties because they work using these primitives.
+@cindex front-sticky text property
+@cindex rear-nonsticky text property
When you do insertion with inheritance, @emph{which} properties are
inherited, and from where, depends on which properties are @dfn{sticky}.
Insertion after a character inherits those of its properties that are
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index d2247004bcb..1ae0e5e5ee1 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -363,7 +363,7 @@ where you are in Emacs.
@cindex evaluation error
@cindex infinite recursion
This variable defines the limit on the total number of local variable
-bindings and @code{unwind-protect} cleanups (see @ref{Cleanups,,
+bindings and @code{unwind-protect} cleanups (@pxref{Cleanups,,
Cleaning Up from Nonlocal Exits}) that are allowed before Emacs
signals an error (with data @code{"Variable binding depth exceeds
max-specpdl-size"}).
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index d718ac59be6..f8dcca72cc0 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -6419,7 +6419,9 @@ changed. @xref{Other Font Lock Variables}.
during redisplay provided a significant, non-scrolling change of a
window has been detected. For simplicity, these hooks and the
functions they call will be collectively referred to as @dfn{window
-change functions}.
+change functions}. As any hook, these hooks can be set either
+globally of buffer-locally via the @var{local} argument of
+@code{add-hook} (@pxref{Setting Hooks}) when the hook is installed.
@cindex window buffer change
The first of these hooks is run after a @dfn{window buffer change} is
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index 18342e65b0a..757418a67ca 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -151,7 +151,7 @@ and @key{Meta}
@item
@key{DEL}: @key{Delete}, usually @strong{not} the same as
-@key{Backspace}; same as @kbd{C-?} (see @ref{Backspace invokes help}, if
+@key{Backspace}; same as @kbd{C-?} (@pxref{Backspace invokes help}, if
deleting invokes Emacs help)
@item
@@ -793,7 +793,7 @@ informational files about Emacs and relevant aspects of the GNU project
are available for you to read.
The following files (and others) are available in the @file{etc}
-directory of the Emacs distribution (see @ref{File-name conventions}, if
+directory of the Emacs distribution (@pxref{File-name conventions}, if
you're not sure where that is). Many of these files are available via
the Emacs @samp{Help} menu, or by typing @kbd{C-h ?} (@kbd{M-x
help-for-help}).
@@ -1086,7 +1086,7 @@ Emacs Lisp form at point.
@cindex pasting text on text terminals
@cindex bracketed paste mode
@item
-On text terminals that support the ``bracketed paste mode'' EMacs now
+On text terminals that support the ``bracketed paste mode'' Emacs now
uses that mode by default. This mode allows Emacs to distinguish
between pasted text and text typed by the user.
@@ -2542,12 +2542,12 @@ load @code{dired-x} by adding the following to your @file{.emacs} file:
(require 'dired-x))
@end lisp
-With @code{dired-x} loaded, @kbd{M-o} toggles omitting in each dired buffer.
+With @code{dired-x} loaded, @kbd{C-x M-o} toggles omitting in each dired buffer.
You can make omitting the default for new dired buffers by putting the
following in your @file{.emacs}:
@lisp
-(add-hook 'dired-mode-hook 'dired-omit-toggle)
+(add-hook 'dired-mode-hook 'dired-omit-mode)
@end lisp
If you're tired of seeing backup files whenever you do an @samp{ls} at
diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi
index 7cd3e5f5828..96a4ad556f6 100644
--- a/doc/misc/emacs-mime.texi
+++ b/doc/misc/emacs-mime.texi
@@ -454,7 +454,8 @@ setting this option to non-@code{nil}. The default value is @code{t}.
@item mm-external-terminal-program
@vindex mm-external-terminal-program
-The program used to start an external terminal.
+This should be a list of strings; typically something like
+@samp{("xterm" "-e")} or @samp{("gnome-terminal" "--")}.
@item mm-enable-external
@vindex mm-enable-external
diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi
index 440c61add8e..af215482f41 100644
--- a/doc/misc/ert.texi
+++ b/doc/misc/ert.texi
@@ -390,12 +390,37 @@ summary as shown below:
emacs -batch -l ert -f ert-summarize-tests-batch-and-exit output.log
@end example
+@vindex ert-batch-print-level
+@vindex ert-batch-print-length
+ERT attempts to limit the output size for failed tests by choosing
+conservative values for @code{print-level} and @code{print-length}
+when printing Lisp values. This can in some cases make it difficult
+to see which portions of those values are incorrect. Use
+@code{ert-batch-print-level} and @code{ert-batch-print-length}
+to customize that:
+
+@example
+emacs -batch -l ert -l my-tests.el \
+ --eval "(let ((ert-batch-print-level 10) \
+ (ert-batch-print-length 120)) \
+ (ert-run-tests-batch-and-exit))"
+@end example
+
+@vindex ert-batch-backtrace-line-length
+Even modest settings for @code{print-level} and @code{print-length} can
+produce extremely long lines in backtraces, however, with attendant
+pauses in execution progress. Set
+@code{ert-batch-backtrace-line-length} to t to use the value of
+@code{backtrace-line-length}, @code{nil} to stop any limitations on backtrace
+line lengths (that is, to get full backtraces), or a positive integer to
+limit backtrace line length to that number.
+
@vindex ert-quiet
By default, ERT in batch mode is quite verbose, printing a line with
result after each test. This gives you progress information: how many
tests have been executed and how many there are. However, in some
cases this much output may be undesirable. In this case, set
-@code{ert-quiet} variable to a non-nil value:
+@code{ert-quiet} variable to a non-@code{nil} value:
@example
emacs -batch -l ert -l my-tests.el \
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index f741ee5d723..ca464aff665 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -1,4 +1,4 @@
-\input texinfo @c -*-texinfo; coding: utf-8 -*-
+\input texinfo @c -*- mode: texinfo; coding: utf-8 -*-
@comment %**start of header
@setfilename ../../info/flymake.info
@set VERSION 1.2
@@ -1145,7 +1145,7 @@ file are parsed.
For @file{file.h}, the include directives to look for are
@code{#include "file.h"}, @code{#include "../file.h"}, etc. Each
include is checked against a list of include directories
-(see @ref{Getting the include directories}) to be sure it points to the
+(@pxref{Getting the include directories}) to be sure it points to the
correct @file{file.h}.
First matching master file found stops the search. The master file is then
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 796bb3bac84..a18afec02e8 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -1004,7 +1004,7 @@ The fundamental building blocks of Gnus are @dfn{servers},
@dfn{groups}, and @dfn{articles}. Servers can be local or remote.
Each server maintains a list of groups, and those groups contain
articles. Because Gnus presents a unified interface to a wide variety
-of servers, the vocabulary doesn't always quite line up (see @ref{FAQ
+of servers, the vocabulary doesn't always quite line up (@pxref{FAQ
- Glossary}, for a more complete glossary). Thus a local maildir is
referred to as a ``server'' (@pxref{Finding the News}) the same as a
Usenet or IMAP server is; ``groups'' (@pxref{Group Buffer}) might mean
@@ -28890,7 +28890,7 @@ gnus-agent-cache nil)} reverts to the old behavior.
@item
Dired integration
-@code{gnus-dired-minor-mode} (see @ref{Other modes}) installs key
+@code{gnus-dired-minor-mode} (@pxref{Other modes}) installs key
bindings in dired buffers to send a file as an attachment, open a file
using the appropriate mailcap entry, and print a file using the mailcap
entry.
diff --git a/doc/misc/htmlfontify.texi b/doc/misc/htmlfontify.texi
index 1674565cdac..b2216924e2d 100644
--- a/doc/misc/htmlfontify.texi
+++ b/doc/misc/htmlfontify.texi
@@ -633,7 +633,7 @@ Convert an Emacs :foreground property to a CSS color property.
(hfy-flatten-style @var{style})
@end lisp
-Take @var{style} (see @ref{hfy-face-to-style-i}, @ref{hfy-face-to-style})
+Take @var{style} (@pxref{hfy-face-to-style-i}, @pxref{hfy-face-to-style})
and merge any multiple attributes appropriately. Currently only font-size is
merged down to a single occurrence---others may need special handling, but I
haven't encountered them yet. Returns a @ref{hfy-style-assoc}.
@@ -841,7 +841,7 @@ See @ref{hfy-display-class} for details of valid values for @var{class}.
@end lisp
Find face in effect at point P@. If overlays are to be considered
-(see @ref{hfy-optimizations}) then this may return a @code{defface} style
+(@pxref{hfy-optimizations}) then this may return a @code{defface} style
list of face properties instead of a face symbol.
@item hfy-bgcol
diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi
index bc788ebae09..d96c243f52b 100644
--- a/doc/misc/mh-e.texi
+++ b/doc/misc/mh-e.texi
@@ -1018,16 +1018,16 @@ Send multimedia messages (@pxref{Adding Attachments}).
Read HTML messages (@pxref{HTML}).
@c -------------------------
@item
-Use aliases and identities (see @ref{Aliases}, @pxref{Identities}).
+Use aliases and identities (@pxref{Aliases}, @pxref{Identities}).
@c -------------------------
@item
-Create different views of your mail (see @ref{Threading}, @pxref{Limits}).
+Create different views of your mail (@pxref{Threading}, @pxref{Limits}).
@c -------------------------
@item
Deal with junk mail (@pxref{Junk}).
@c -------------------------
@item
-Handle signed and encrypted messages (see @ref{Reading PGP},
+Handle signed and encrypted messages (@pxref{Reading PGP},
@pxref{Sending PGP}).
@c -------------------------
@item
@@ -1038,7 +1038,7 @@ Process mail that was sent with @command{shar} or @command{uuencode}
Use sequences conveniently (@pxref{Sequences}).
@c -------------------------
@item
-Use the speedbar, tool bar, and menu bar (see @ref{Speedbar}, see @ref{Tool
+Use the speedbar, tool bar, and menu bar (@pxref{Speedbar}, @pxref{Tool
Bar}, @pxref{Menu Bar}).
@c -------------------------
@item
diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org
index 675144d5177..f3c2e37b7dd 100644
--- a/doc/misc/modus-themes.org
+++ b/doc/misc/modus-themes.org
@@ -5,9 +5,9 @@
#+options: ':t toc:nil author:t email:t num:t
#+startup: content
-#+macro: stable-version 1.6.0
-#+macro: release-date 2021-09-29
-#+macro: development-version 1.7.0-dev
+#+macro: stable-version 1.7.0
+#+macro: release-date 2021-11-18
+#+macro: development-version 1.8.0-dev
#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
#+macro: space @@texinfo:@: @@
#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@
@@ -95,7 +95,7 @@ Emacs.
:end:
#+cindex: Screenshots
-Check the web page with [[https://protesilaos.com/modus-themes-pictures/][the screen shots]]. There are lots of scenarios
+Check the web page with [[https://protesilaos.com/emacs/modus-themes-pictures/][the screen shots]]. There are lots of scenarios
on display that draw attention to details and important aspects in the
design of the themes. They also showcase the numerous customization
options.
@@ -108,7 +108,7 @@ options.
:end:
#+cindex: Changelog
-Please refer to the [[https://protesilaos.com/modus-themes-changelog][web page with the change log]]. It is comprehensive
+Please refer to the [[https://protesilaos.com/emacs/modus-themes-changelog][web page with the change log]]. It is comprehensive
and covers everything that goes into every tagged release of the themes.
* Installation
@@ -268,7 +268,7 @@ could look like:
(define-key global-map (kbd "") #'modus-themes-toggle)
#+end_src
-[[#h:e979734c-a9e1-4373-9365-0f2cd36107b8][Sample configuration for use-package]].
+[[#h:e979734c-a9e1-4373-9365-0f2cd36107b8][Sample configuration with and without use-package]].
With those granted, bear in mind a couple of technical points on
~modus-themes-load-operandi~ and ~modus-themes-load-vivendi~, as well as
@@ -283,11 +283,12 @@ With those granted, bear in mind a couple of technical points on
wish to rely on such a hook and the functions that run it: they may
prefer a custom solution ([[#h:86f6906b-f090-46cc-9816-1fe8aeb38776][A theme-agnostic hook for theme loading]]).
-** Sample configuration for use-package
+** Sample configuration with and without use-package
:properties:
:custom_id: h:e979734c-a9e1-4373-9365-0f2cd36107b8
:end:
#+cindex: use-package configuration
+#+cindex: sample configuration
It is common for Emacs users to rely on ~use-package~ for declaring
package configurations in their setup. We use this as an example:
@@ -309,6 +310,25 @@ package configurations in their setup. We use this as an example:
:bind ("" . modus-themes-toggle))
#+end_src
+The same without ~use-package~:
+
+#+begin_src emacs-lisp
+(require 'modus-themes)
+
+;; Add all your customizations prior to loading the themes
+(setq modus-themes-italic-constructs t
+ modus-themes-bold-constructs nil
+ modus-themes-region '(bg-only no-extend))
+
+;; Load the theme files before enabling a theme
+(modus-themes-load-themes)
+
+;; Load the theme of your choice:
+(modus-themes-load-operandi) ;; OR (modus-themes-load-vivendi)
+
+(define-key global-map (kbd "") #'modus-themes-toggle)
+#+end_src
+
[[#h:e68560b3-7fb0-42bc-a151-e015948f8a35][Differences between loading and enabling]].
Note: make sure not to customize the variable ~custom-theme-load-path~
@@ -325,7 +345,7 @@ package declaration of the themes.
The reason we recommend ~load-theme~ instead of the other option of
~enable-theme~ is that the former does a kind of "reset" on the face
-specs. It quite literally loads (or re-loads) the theme. Whereas the
+specs. It quite literally loads (or reloads) the theme. Whereas the
latter simply puts an already loaded theme at the top of the list of
enabled items, re-using whatever state was last loaded.
@@ -352,7 +372,7 @@ session, are better off using something like this:
(enable-theme 'modus-operandi) ;; OR (enable-theme 'modus-vivendi)
#+end_src
-[[#h:e979734c-a9e1-4373-9365-0f2cd36107b8][Sample configuration for use-package]].
+[[#h:e979734c-a9e1-4373-9365-0f2cd36107b8][Sample configuration with and without use-package]].
With the above granted, other sections of the manual discuss how to
configure custom faces, where ~load-theme~ is expected, though
@@ -372,7 +392,8 @@ without any further tweaks. By default, all customization options are
set to nil, unless otherwise noted in this manual.
Remember that all customization options must be evaluated before loading
-a theme ([[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]]).
+a theme ([[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]]). If the theme is already active, it must be
+reloaded for changes in user options to come into force.
Below is a summary of what you will learn in the subsequent sections of
this manual.
@@ -380,8 +401,9 @@ this manual.
#+begin_src emacs-lisp
(setq modus-themes-italic-constructs t
modus-themes-bold-constructs nil
- modus-themes-no-mixed-fonts nil
+ modus-themes-mixed-fonts nil
modus-themes-subtle-line-numbers nil
+ modus-themes-intense-markup t
modus-themes-success-deuteranopia t
modus-themes-tabs-accented t
modus-themes-inhibit-reload t ; only applies to `customize-set-variable' and related
@@ -391,7 +413,7 @@ this manual.
;; Options for `modus-themes-lang-checkers' are either nil (the
;; default), or a list of properties that may include any of those
;; symbols: `straight-underline', `text-also', `background',
- ;; `intense'
+ ;; `intense' OR `faint'.
modus-themes-lang-checkers nil
;; Options for `modus-themes-mode-line' are either nil, or a list
@@ -399,6 +421,10 @@ this manual.
;; `accented', `padded'.
modus-themes-mode-line '(padded accented borderless)
+ ;; This one only works when `modus-themes-mode-line' (above) has
+ ;; the `padded' property. It takes a positive integer.
+ modus-themes-mode-line-padding 3
+
;; Options for `modus-themes-syntax' are either nil (the default),
;; or a list of properties that may include any of those symbols:
;; `faint', `yellow-comments', `green-strings', `alt-syntax'
@@ -450,7 +476,7 @@ this manual.
modus-themes-headings ; this is an alist: read the manual or its doc string
'((1 . (overline background))
(2 . (rainbow overline))
- (t . (no-bold)))
+ (t . (semibold)))
modus-themes-variable-pitch-ui nil
modus-themes-variable-pitch-headings t
@@ -470,7 +496,10 @@ this manual.
:end:
#+vindex: modus-themes-inhibit-reload
-Symbol: ~modus-themes-inhibit-reload~
+Brief: Toggle reloading of the active theme when an option is changed
+through the Customize UI.
+
+Symbol: ~modus-themes-inhibit-reload~ (=boolean= type)
Possible values:
@@ -483,6 +512,9 @@ currently active Modus theme.
Enable this behaviour by setting this variable to ~nil~.
+Regardless of this option, the active theme must be reloaded for changes
+to user options to take effect ([[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]]).
+
** Option for color-coding success state (deuteranopia)
:properties:
:alt_title: Success' color-code
@@ -491,25 +523,27 @@ Enable this behaviour by setting this variable to ~nil~.
:end:
#+vindex: modus-themes-success-deuteranopia
-Symbol: ~modus-themes-success-deuteranopia~
+Brief: Toggle the use of blue instead of green in places which
+color-code green as "success" and red as "failure".
+
+Symbol: ~modus-themes-success-deuteranopia~ (=boolean= type)
Possible values:
1. ~nil~ (default)
2. ~t~
-The default is to colorise all faces that denote "success", "done", or
-similar with a variant of green.
+The default is to colorise a passing state in a green hue. This affects
+all faces that denote "success", "done", marking a selection as opposed
+to marking for deletion, the current search match in contrast to lazily
+highlighted ones, and the like.
With a non-nil value (~t~), use variants of blue instead of green. This
is meant to empower users with red-green color deficiency.
-The present customization option should apply to all contexts where
-there can be a color-coded distinction between success and failure,
-to-do and done, and so on.
-
-Diffs, which have a red/green dichotomy by default, can also be
-configured to conform with deuteranopia.
+Diffs, which rely on a red/green dichotomy by default, can also be
+configured to meet the needs of users with deuteranopia via the option
+~modus-themes-diffs~.
[[#h:ea7ac54f-5827-49bd-b09f-62424b3b6427][Option for diff buffer looks]].
@@ -521,7 +555,9 @@ configured to conform with deuteranopia.
:end:
#+vindex: modus-themes-bold-constructs
-Symbol: ~modus-themes-bold-constructs~
+Brief: Use bold for code syntax highlighting and related.
+
+Symbol: ~modus-themes-bold-constructs~ (=boolean= type)
Possible values:
@@ -549,7 +585,9 @@ Advanced users may also want to configure the exact attributes of the
:end:
#+vindex: modus-themes-italic-constructs
-Symbol: ~modus-themes-italic-constructs~
+Brief: Use italics for code syntax highlighting and related.
+
+Symbol: ~modus-themes-italic-constructs~ (=boolean= type)
Possible values:
@@ -575,7 +613,9 @@ Advanced users may also want to configure the exact attributes of the
:end:
#+vindex: modus-themes-syntax
-Symbol: ~modus-themes-syntax~
+Brief: Set the overall style of code syntax highlighting.
+
+Symbol: ~modus-themes-syntax~ (=choice= type, list of properties)
Possible values are expressed as a list of properties (default is ~nil~ or
an empty list). The list can include any of the following symbols:
@@ -629,36 +669,41 @@ weight or italic text: ~modus-themes-bold-constructs~ and
[[#h:977c900d-0d6d-4dbb-82d9-c2aae69543d6][Option for more italic constructs]].
-** Option for no font mixing
+** Option for font mixing
:properties:
-:alt_title: No mixed fonts
+:alt_title: Mixed fonts
:description: Toggle mixing of font families
:custom_id: h:115e6c23-ee35-4a16-8cef-e2fcbb08e28b
:end:
-#+vindex: modus-themes-no-mixed-fonts
+#+vindex: modus-themes-mixed-fonts
-Symbol: ~modus-themes-no-mixed-fonts~
+Brief: Toggle the use of monospaced fonts for spacing-sensitive
+constructs (affects font families).
+
+Symbol: ~modus-themes-mixed-fonts~ (=boolean= type)
Possible values:
1. ~nil~ (default)
2. ~t~
-By default, the themes configure some spacing-sensitive faces like Org
+When set to non-nil (~t~), configure some spacing-sensitive faces like Org
tables and code blocks to always inherit from the ~fixed-pitch~ face.
-This is to ensure that 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~.
+This is to ensure that certain constructs like code blocks and tables
+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.
-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~.
+For a consistent experience, user may need to specify the font family of
+the ~fixed-pitch~ face.
[[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org and others]].
+Furthermore, 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~.
+
** Option for links
:properties:
:alt_title: Link styles
@@ -667,7 +712,9 @@ are ~org-variable-pitch~ and ~mixed-pitch~.
:end:
#+vindex: modus-themes-links
-Symbol: ~modus-themes-links~
+Brief: Control the style of links to web pages, files, buffers...
+
+Symbol: ~modus-themes-links~ (=choice= type, list of properties)
Possible values are expressed as a list of properties (default is ~nil~ or
an empty list). The list can include any of the following symbols:
@@ -738,7 +785,10 @@ their documentation strings.
:end:
#+vindex: modus-themes-prompts
-Symbol: ~modus-themes-prompts~
+Brief: Control the style of command prompts (e.g. minibuffer, shell, IRC
+clients).
+
+Symbol: ~modus-themes-prompts~ (=choice= type, list of properties)
Possible values are expressed as a list of properties (default is ~nil~ or
an empty list). The list can include any of the following symbols:
@@ -794,7 +844,9 @@ In user configuration files the form may look like this:
:end:
#+vindex: modus-themes-mode-line
-Symbol: ~modus-themes-mode-line~
+Brief: Control the style of the mode lines.
+
+Symbol: ~modus-themes-mode-line~ (=choice= type, list of properties)
Possible values, which can be expressed as a list of combinations of box
effect, color, and border visibility:
@@ -836,7 +888,10 @@ This is done by applying box effects and combining them with an
underline and overline. To ensure that the underline is placed at the
bottom, set ~x-underline-at-descent-line~ to non-nil. The ~padded~ property
has no effect when the ~moody~ property is also used, because Moody
-already applies its own padding.
+already applies its own padding. The exact value of the padding is
+controlled by the variable ~modus-themes-mode-line-padding~.
+
+[[#h:a12b4d3c-e66b-42ed-99ab-4ea039b69e2e][Option for mode line padding]].
Combinations of any of those properties are expressed as a list,
like in these examples:
@@ -877,6 +932,28 @@ Furthermore, because Moody expects an underline and overline instead of
a box style, it is advised to set ~x-underline-at-descent-line~ to a
non-nil value.
+Finally, note that various packages which heavily modify the mode line,
+such as =doom-modeline=, =nano-modeline=, =powerline=, =spaceline= may not look
+as intended with all possible combinations of this user option.
+
+*** Option for mode line padding
+:properties:
+:custom_id: h:a12b4d3c-e66b-42ed-99ab-4ea039b69e2e
+:end:
+#+vindex: modus-themes-mode-line-padding
+
+Brief: Set the padding of the mode lines.
+
+Symbol: ~modus-themes-mode-line-padding~ (=natnum= type)
+
+Controls the exact width of the mode line's padding. Possible values
+are positive integers. The default value is =6=.
+
+This customization option applies only when ~modus-themes-mode-line~ is
+configured with the ~padded~ property.
+
+[[#h:27943af6-d950-42d0-bc23-106e43f50a24][Option for mode line presentation]].
+
** Option for accented background in tab interfaces
:properties:
:alt_title: Tab style
@@ -885,7 +962,9 @@ non-nil value.
:end:
#+vindex: modus-themes-tabs-accented
-Symbol: ~modus-themes-tabs-accented~
+Brief: Toggle accent colors for tabbed interfaces.
+
+Symbol: ~modus-themes-tabs-accented~ (=boolean= type)
Possible values:
@@ -906,7 +985,9 @@ Centaur tabs package.
:end:
#+vindex: modus-themes-completions
-Symbol: ~modus-themes-completions~
+Brief: Set the overall style of completion framework interfaces.
+
+Symbol: ~modus-themes-completions~ (=choice= type)
Possible values:
@@ -951,7 +1032,10 @@ possibilities.
:end:
#+vindex: modus-themes-mail-citations
-Symbol: ~modus-themes-mail-citations~
+Brief: Set the overall style of citations/quotes when composing
+emails.
+
+Symbol: ~modus-themes-mail-citations~ (=choice= type)
Possible values:
@@ -980,7 +1064,9 @@ not touch.
:end:
#+vindex: modus-themes-fringes
-Symbol: ~modus-themes-fringes~
+Brief: Control the overall coloration of the fringes.
+
+Symbol: ~modus-themes-fringes~ (=choice= type)
Possible values:
@@ -1004,7 +1090,10 @@ names imply.
:end:
#+vindex: modus-themes-lang-checkers
-Symbol: ~modus-themes-lang-checkers~
+Brief: Control the style of in-buffer warnings and errors produced by
+spell checkers, code linters, and the like.
+
+Symbol: ~modus-themes-lang-checkers~ (=choice= type, list of properties)
Possible values are expressed as a list of properties (default is ~nil~ or
an empty list). The list can include any of the following symbols:
@@ -1012,7 +1101,9 @@ an empty list). The list can include any of the following symbols:
+ ~straight-underline~
+ ~text-also~
+ ~background~
-+ ~intense~
++ Overall coloration:
+ - ~intense~
+ - ~faint~
The default (a ~nil~ value or an empty list) applies a color-coded
underline to the affected text, while it leaves the original foreground
@@ -1028,15 +1119,15 @@ affected text.
The property ~background~ adds a color-coded background.
The property ~intense~ amplifies the applicable colors if ~background~
-and/or ~text-only~ are set. If ~intense~ is set on its own, then it implies
-~text-only~.
+and/or ~text-also~ are set. If ~intense~ is set on its own, then it implies
+~text-also~.
-To disable fringe indicators for Flymake or Flycheck, refer to variables
-~flymake-fringe-indicator-position~ and ~flycheck-indication-mode~,
-respectively.
+The property ~faint~ uses nuanced colors for the underline and for the
+foreground when ~text-also~ is included. If both ~faint~ and ~intense~ are
+specified, the former takes precedence.
-Combinations of any of those properties can be expressed in a
-list, as in those examples:
+Combinations of any of those properties can be expressed in a list, as
+in those examples:
#+begin_src emacs-lisp
(background)
@@ -1056,6 +1147,10 @@ NOTE: The placement of the straight underline, though not the wave
style, is controlled by the built-in variables ~underline-minimum-offset~,
~x-underline-at-descent-line~, ~x-use-underline-position-properties~.
+To disable fringe indicators for Flymake or Flycheck, refer to variables
+~flymake-fringe-indicator-position~ and ~flycheck-indication-mode~,
+respectively.
+
** Option for line highlighting (hl-line-mode)
:properties:
:alt_title: Line highlighting
@@ -1064,7 +1159,9 @@ style, is controlled by the built-in variables ~underline-minimum-offset~,
:end:
#+vindex: modus-themes-hl-line
-Symbol: ~modus-themes-hl-line~
+Brief: Control the style of the current line of ~hl-line-mode~.
+
+Symbol: ~modus-themes-hl-line~ (=choice= type, list of properties)
Possible values are expressed as a list of properties (default is ~nil~ or
an empty list). The list can include any of the following symbols:
@@ -1116,7 +1213,9 @@ This style affects several packages that enable ~hl-line-mode~, such as
:end:
#+vindex: modus-themes-subtle-line-numbers
-Symbol: ~modus-themes-subtle-line-numbers~
+Brief: Toggle subtle line numbers.
+
+Symbol: ~modus-themes-subtle-line-numbers~ (=boolean= type)
Possible value:
@@ -1137,6 +1236,30 @@ 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.
+** Option for intense markup in Org and others
+:properties:
+:alt_title: Intense markup
+:description: Toggle intense style for markup in Org and others
+:custom_id: h:9d9a4e64-99ac-4018-8f66-3051b9c43fd7
+:end:
+#+vindex: modus-themes-intense-markup
+
+Brief: Toggle intense style for inline code and related markup.
+
+Symbol: ~modus-themes-intense-markup~ (=boolean= type)
+
+Possible value:
+
+1. ~nil~ (default)
+2. ~t~
+
+The default style for certain markup types like inline code and verbatim
+constructs in Org and related major modes is a subtle foreground color
+combined with a subtle background.
+
+With a non-nil value (~t~), these constructs will use a more prominent
+background and foreground color combination instead.
+
** Option for parenthesis matching (show-paren-mode)
:properties:
:alt_title: Matching parentheses
@@ -1145,7 +1268,10 @@ updated to accommodate this aesthetic.
:end:
#+vindex: modus-themes-paren-match
-Symbol: ~modus-themes-paren-match~
+Brief: Control the style of matching delimiters produced by
+~show-paren-mode~.
+
+Symbol: ~modus-themes-paren-match~ (=choice= type, list of properties)
Possible values are expressed as a list of properties (default is ~nil~ or
an empty list). The list can include any of the following symbols:
@@ -1192,7 +1318,9 @@ This customization variable affects the built-in ~show-paren-mode~ and the
:end:
#+vindex: modus-themes-region
-Symbol: ~modus-themes-region~
+Brief: Control the style of the region.
+
+Symbol: ~modus-themes-region~ (=choice= type, list of properties)
Possible values are expressed as a list of properties (default is ~nil~ or
an empty list). The list can include any of the following symbols:
@@ -1238,7 +1366,9 @@ In user configuration files the form may look like this:
:end:
#+vindex: modus-themes-diffs
-Symbol: ~modus-themes-diffs~
+Bried: Set the overall style of diffs.
+
+Symbol: ~modus-themes-diffs~ (=choice= type)
Possible values:
@@ -1284,7 +1414,9 @@ interest of backward compatibility.
:end:
#+vindex: modus-themes-org-blocks
-Symbol: ~modus-themes-org-blocks~
+Brief: Set the overall style of Org code blocks, quotes, and the like.
+
+Symbol: ~modus-themes-org-blocks~ (=choice= type)
Possible values:
@@ -1325,7 +1457,10 @@ and ~rainbow~. Those will continue to work as they are aliases for
:end:
#+vindex: modus-themes-org-agenda
-Symbol: ~modus-themes-org-agenda~
+Brief: Control the style of the Org agenda. Multiple parameters are
+available, each with its own options.
+
+Symbol: ~modus-themes-org-agenda~ (=alist= type, multiple styles)
This is an alist that accepts a =(key . value)= combination. Some values
are specified as a list. Here is a sample, followed by a description of
@@ -1335,7 +1470,7 @@ all possible combinations:
(setq modus-themes-org-agenda
'((header-block . (variable-pitch scale-title))
(header-date . (grayscale workaholic bold-today))
- (event . (accented scale-small))
+ (event . (accented italic varied))
(scheduled . uniform)
(habit . traffic-light)))
#+end_src
@@ -1394,28 +1529,41 @@ For example:
(header-date . (grayscale workaholic bold-today scale-heading))
#+end_src
-An ~event~ key covers events from the diary and other entries that derive
-from a symbolic expression or sexp (e.g. phases of the moon, holidays).
-This key accepts a list of values. By default (a nil value or an empty
-list) those have a gray foreground, while sexp events are additionally
-presented using slanted text (italics). The properties that can form a
-list of possible values are:
+An ~event~ key covers (i) headings with a plain time stamp that are
+shown on the agenda, also known as events, (ii) entries imported from
+the diary, and (iii) other items that derive from a symbolic expression
+or sexp (phases of the moon, holidays, etc.). By default all those look
+the same and have a subtle foreground color (the default is a nil value
+or an empty list). This key accepts a list of properties. Those are:
-- ~scale-small~ reduces the height of the entries to the value of the user
- option ~modus-themes-scale-small~ (0.9 the height of the main font size
- by default).
-- ~accented~ applies an accent value to the event's foreground, replacing
- the original gray.
+- ~scale-small~ reduces the height of the entries to the value of
+ the user option ~modus-themes-scale-small~ (0.9 the height of
+ the main font size by default). This work best when the
+ relevant entries have no tags associated with them and when the
+ user is interested in reducing their presence in the agenda
+ view.
+- ~accented~ applies an accent value to the event's foreground,
+ replacing the original gray. It makes all entries stand out more.
- ~italic~ adds a slant to the font's forms (italic or oblique forms,
depending on the typeface).
+- ~varied~ differentiates between events with a plain time stamp and
+ entries that are generated from either the diary or a symbolic
+ expression. It generally puts more emphasis on events. When ~varied~
+ is combined with ~accented~, it makes only events use an accent color,
+ while diary/sexp entries retain their original subtle foreground.
+ When ~varied~ is used in tandem with ~italic~, it applies a slant only
+ to diary and sexp entries, not events. And when ~varied~ is the sole
+ property passed to the ~event~ key, it has the same meaning as the
+ list (italic varied). The combination of ~varied~, ~accented~,
+ ~italic~ covers all of the aforementioned cases.
For example:
#+begin_src emacs-lisp
(event . nil)
-(event . (scale-small))
-(event . (scale-small accented))
-(event . (scale-small accented italic))
+(event . (italic))
+(event . (accented italic))
+(event . (accented italic varied))
#+end_src
A ~scheduled~ key applies to tasks with a scheduled date. By default (a
@@ -1498,7 +1646,10 @@ Putting it all together, the alist can look like this:
:end:
#+vindex: modus-themes-headings
-Symbol: ~modus-themes-headings~
+Brief: Control the style of headings. This can be particularised for
+each level of heading (e.g. Org has eight levels).
+
+Symbol: ~modus-themes-headings~ (=alist= type, multiple properties)
This is an alist that accepts a =(key . list-of-values)= combination. The
key is either a number, representing the heading's level or ~t~, which
@@ -1518,8 +1669,21 @@ Properties:
+ ~rainbow~
+ ~overline~
+ ~background~
-+ ~no-bold~
+ ~monochrome~
++ A font weight, which must be supported by the underlying typeface:
+ - ~thin~
+ - ~ultralight~
+ - ~extralight~
+ - ~light~
+ - ~semilight~
+ - ~regular~
+ - ~medium~
+ - ~semibold~
+ - ~bold~
+ - ~heavy~
+ - ~extrabold~
+ - ~ultrabold~
++ ~no-bold~
By default (a ~nil~ value for this variable), all headings have a bold
typographic weight and use a desaturated text color.
@@ -1531,20 +1695,27 @@ An ~overline~ property draws a line above the area of the heading.
A ~background~ property adds a subtle tinted color to the background of
the heading.
-A ~no-bold~ property removes the bold weight from the heading's text.
-
A ~monochrome~ property makes all headings the same base color, which is
that of the default for the active theme (black/white). When ~background~
is also set, ~monochrome~ changes its color to gray. If both ~monochrome~
and ~rainbow~ are set, the former takes precedence.
+The symbol of a weight attribute adjusts the font of the heading
+accordingly, such as ~light~, ~semibold~, etc. Valid symbols are defined in
+the internal variable ~modus-themes--heading-weights~. The absence of a
+weight means that bold will be used by virtue of inheriting the ~bold~
+face. For backward compatibility, the ~no-bold~ value is accepted, though
+users are encouraged to specify a ~regular~ weight instead.
+
+[[#h:2793a224-2109-4f61-a106-721c57c01375][Configure bold and italic faces]].
+
Combinations of any of those properties are expressed as a list, like in
these examples:
#+begin_src emacs-lisp
-(no-bold)
+(semibold)
(rainbow background)
-(overline monochrome no-bold)
+(overline monochrome semibold)
#+end_src
The order in which the properties are set is not significant.
@@ -1555,7 +1726,7 @@ In user configuration files the form may look like this:
(setq modus-themes-headings
'((1 . (background overline rainbow))
(2 . (background overline))
- (t . (overline no-bold))))
+ (t . (overline semibold))))
#+end_src
When defining the styles per heading level, it is possible to pass a
@@ -1570,7 +1741,7 @@ original aesthetic for that level. For example:
(setq modus-themes-headings
'((1 . (background overline))
- (2 . (rainbow no-bold))
+ (2 . (rainbow semibold))
(t . t))) ; default style for all other levels
#+end_src
@@ -1591,7 +1762,9 @@ others, such as ~org-fontify-done-headline~.
:end:
#+vindex: modus-themes-scale-headings
-Symbol: ~modus-themes-scale-headings~
+Brief: Toggle the scaling of headings.
+
+Symbol: ~modus-themes-scale-headings~ (=boolean= type)
Possible values:
@@ -1610,6 +1783,17 @@ main text. This is noticeable in modes like Org, Markdown, and Info.
:custom_id: h:6868baa1-beba-45ed-baa5-5fd68322ccb3
:end:
+Brief: Specify the height for individual heading scales.
+
+Symbols (all are =number= type):
+
++ ~modus-themes-scale-1~
++ ~modus-themes-scale-2~
++ ~modus-themes-scale-3~
++ ~modus-themes-scale-4~
++ ~modus-themes-scale-title~
++ ~modus-themes-scale-small~
+
In addition to the toggle for enabling scaled headings, users can also
specify a number of their own.
@@ -1681,7 +1865,10 @@ size of the heading, but not of keywords that were added to it, like
:end:
#+vindex: modus-themes-variable-pitch-ui
-Symbol: ~modus-themes-variable-pitch-ui~
+Brief: Toggle the use of proportionately spaced (~variable-pitch~) fonts
+in the User Interface.
+
+Symbol: ~modus-themes-variable-pitch-ui~ (=boolean= type)
Possible values:
@@ -1708,7 +1895,10 @@ is done by assigning the ~variable-pitch~ face to the relevant items.
:end:
#+vindex: modus-themes-variable-pitch-headings
-Symbol: ~modus-themes-variable-pitch-headings~
+Brief: Toggle the use of proportionately spaced (~variable-pitch~) fonts
+in headings.
+
+Symbol: ~modus-themes-variable-pitch-headings~ (=boolean= type)
Possible values:
@@ -2460,17 +2650,16 @@ inspiration from the ~modus-themes-toggle~ we already provide:
:end:
#+cindex: Font configurations
-The themes are designed to cope well with mixed font configurations.
+The themes are designed to optionally cope well with mixed font
+configurations. This mostly concerns ~org-mode~ and ~markdown-mode~, though
+expect to find it elsewhere like in ~Info-mode~.
-[[#h:115e6c23-ee35-4a16-8cef-e2fcbb08e28b][Option for no font mixing]].
-
-This mostly concerns ~org-mode~ and ~markdown-mode~, though expect to find
-it elsewhere like in ~Info-mode~.
+[[#h:115e6c23-ee35-4a16-8cef-e2fcbb08e28b][Option for font mixing]].
In practice it means that the user can safely opt for a more
prose-friendly proportionately spaced typeface as their default, while
-letting spacing-sensitive elements like tables and inline code always
-use a monospaced font, by inheriting from the ~fixed-pitch~ face.
+spacing-sensitive elements like tables and inline code always use a
+monospaced font, by inheriting from the ~fixed-pitch~ face.
Users can try the built-in {{{kbd(M-x variable-pitch-mode)}}} to see the
effect in action.
@@ -2491,7 +2680,14 @@ reading the doc string of ~set-face-attribute~):
(set-face-attribute 'variable-pitch nil :family "DejaVu Serif" :height 1.0)
;; Monospaced typeface
-(set-face-attribute 'fixed-pitch nil :family "DejaVu Sans Mono" :height 1.0)
+(set-face-attribute 'fixed-pitch nil :family "DejaVu Sans Mono" :height 1.5)
+#+end_src
+
+Or employ the ~face-attribute~ function to read an existing value, such as
+if you want to make ~fixed-pitch~ use the font family of the ~default~ face:
+
+#+begin_src emacs-lisp
+(set-face-attribute 'fixed-pitch nil :family (face-attribute 'default :family))
#+end_src
The next section shows how to make those work in a more elaborate setup
@@ -2504,12 +2700,13 @@ 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~
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
-relative to the default, represented as a floating point (if you use an
-integer, then that means an absolute height). This is of paramount
-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).
+finer increments.] Whereas every other face must either not specify a
+height or have a value that is relative to the default, represented as a
+floating point. If you use an integer, then that means an absolute
+height. This is of paramount 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)]].
@@ -2545,7 +2742,7 @@ it means for a construct to be bold/italic, by tweaking the ~bold~ and
To achieve those effects, one must first be sure that the fonts they use
have support for those features. It then is a matter of following the
-instructions for all face tweaks.
+instructions for all typeface tweaks.
[[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org and others]].
@@ -2573,19 +2770,20 @@ To reset the font family, one can use this:
To ensure that the effects persist after switching between the Modus
themes (such as with {{{kbd(M-x modus-themes-toggle)}}}), the user needs to
-write their configurations to a function and hook it up to the
-~modus-themes-after-load-theme-hook~. This is necessary because the
-themes set the default styles of faces (otherwise changing themes would
-not be possible).
+write their configurations to a function and pass it to the
+~modus-themes-after-load-theme-hook~. This is necessary because themes
+set the styles of faces upon activation, overriding prior values where
+conflicts occur between the previous and the current states (otherwise
+changing themes would not be possible).
[[#h:86f6906b-f090-46cc-9816-1fe8aeb38776][A theme-agnostic hook for theme loading]].
This is a minimal setup to preserve font configurations across theme
-load phases. For a more permanent setup, it is better to employ the
+load phases. For a more permanent setup, it is better to rely on the
~custom-set-faces~ function: ~set-face-attribute~ works just fine, though it
-is more convenient for quick previews or for smaller scale operations
-(~custom-set-faces~ follows the format used in the source code of the
-themes).
+probably is better suited for quick previews or for smaller scale
+operations (~custom-set-faces~ follows the format used in the source code
+of the themes, which can make it easier to redefine faces in bulk).
#+begin_src emacs-lisp
;; our generic function
@@ -2605,6 +2803,8 @@ themes).
(add-hook 'modus-themes-after-load-theme-hook #'my-modes-themes-bold-italic-faces)
#+end_src
+[[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]].
+
** Custom Org user faces (DIY)
:properties:
:custom_id: h:89f0678d-c5c3-4a57-a526-668b2bb2d7ad
@@ -2897,6 +3097,101 @@ 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~.
+** Decrease mode line height (DIY)
+:properties:
+:custom_id: h:03be4438-dae1-4961-9596-60a307c070b5
+:end:
+#+cindex: Decrease mode line height
+
+By default, the mode line of the Modus themes is set to 1 pixel width
+for its =:box= attribute. In contrast, the mode line of stock Emacs is -1
+pixel. This small difference is considered necessary for the purposes
+of accessibility as our out-of-the-box design has a prominent color
+around the mode line (a border) to make its boundaries clear. With a
+negative width the border and the text on the mode line can feel a bit
+more difficult to read under certain scenaria.
+
+Furthermore, the user option ~modus-themes-mode-line~ ([[#h:27943af6-d950-42d0-bc23-106e43f50a24][Mode line]]) does not
+allow for such a negative value because there are many edge cases that
+simply make for a counter-intuitive set of possibilities, such as a =0=
+value not being acceptable by the underlying face infrastructure, and
+negative values greater than =-2= not being particularly usable.
+
+For these reasons, users who wish to decrease the overall height of the
+mode line must handle things on their own by implementing the methods
+for face customization documented herein.
+
+[[#h:1487c631-f4fe-490d-8d58-d72ffa3bd474][Basic face customization]].
+
+One such method is to create a function that configures the desired
+faces and hook it to ~modus-themes-after-load-theme-hook~ so that it
+persists while switching between the Modus themes with the command
+~modus-themes-toggle~.
+
+This one simply disables the box altogether, which will reduce the
+height of the mode lines, but also remove their border:
+
+#+begin_src emacs-lisp
+(defun my-modus-themes-custom-faces ()
+ (set-face-attribute 'mode-line nil :box nil)
+ (set-face-attribute 'mode-line-inactive nil :box nil))
+
+(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces)
+#+end_src
+
+The above relies on the ~set-face-attribute~ function, though users who
+plan to re-use colors from the theme and do so at scale are better off
+with the more streamlined combination of the ~modus-themes-with-colors~
+macro and ~custom-set-faces~.
+
+[[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face customization at scale]].
+
+As explained before in this document, this approach has a syntax that is
+consistent with the source code of the themes, so it probably is easier
+to re-use parts of the design.
+
+The following emulates the stock Emacs style, while still using the
+colors of the Modus themes (whichever attribute is not explicitly stated
+is inherited from the underlying theme):
+
+#+begin_src emacs-lisp
+(defun my-modus-themes-custom-faces ()
+ (modus-themes-with-colors
+ (custom-set-faces
+ `(mode-line ((,class :box (:line-width -1 :style released-button))))
+ `(mode-line-inactive ((,class :box (:line-width -1 :color ,bg-region)))))))
+
+(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces)
+#+end_src
+
+And this one is like the out-of-the-box style of the Modus themes, but
+with the -1 height instead of 1:
+
+#+begin_src emacs-lisp
+(defun my-modus-themes-custom-faces ()
+ (modus-themes-with-colors
+ (custom-set-faces
+ `(mode-line ((,class :box (:line-width -1 :color ,fg-alt))))
+ `(mode-line-inactive ((,class :box (:line-width -1 :color ,bg-region)))))))
+
+(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces)
+#+end_src
+
+Finally, to also change the background color of the active mode line,
+such as that it looks like the "accented" variant which is possible via
+the user option ~modus-themes-mode-line~, the =:background= attribute needs
+to be specified as well:
+
+#+begin_src emacs-lisp
+(defun my-modus-themes-custom-faces ()
+ (modus-themes-with-colors
+ (custom-set-faces
+ `(mode-line ((,class :box (:line-width -1 :color ,fg-alt) :background ,bg-active-accent)))
+ `(mode-line-inactive ((,class :box (:line-width -1 :color ,bg-region)))))))
+
+(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces)
+#+end_src
+
** A theme-agnostic hook for theme loading (DIY)
:properties:
:custom_id: h:86f6906b-f090-46cc-9816-1fe8aeb38776
@@ -3121,6 +3416,7 @@ have lots of extensions, so the "full support" may not be 100% true…
+ ido-mode
+ iedit
+ iflipb
++ image-dired
+ imenu-list
+ indium
+ info
@@ -3162,6 +3458,7 @@ have lots of extensions, so the "full support" may not be 100% true…
+ mu4e
+ mu4e-conversation
+ multiple-cursors
++ nano-modeline
+ neotree
+ no-emoji
+ notmuch
@@ -3263,6 +3560,7 @@ have lots of extensions, so the "full support" may not be 100% true…
+ vc-annotate (the output of {{{kbd(C-x v g)}}})
+ vdiff
+ vertico
++ vertico-quick
+ vimish-fold
+ visible-mark
+ visual-regexp
@@ -3314,7 +3612,6 @@ supported by the themes.
+ tide
+ vertico-indexed
+ vertico-mouse
-+ vertico-quick
* Notes on individual packages
:properties:
@@ -4219,7 +4516,7 @@ The source code of the themes is [[https://gitlab.com/protesilaos/modus-themes/]
being. A [[https://github.com/protesilaos/modus-themes/][mirror on Github]] is also on offer.
An HTML version of this manual is provided as an extension of the
-[[https://protesilaos.com/modus-themes/][author's personal website]] (does not rely on any non-free code).
+[[https://protesilaos.com/emacs/modus-themes/][author's personal website]] (does not rely on any non-free code).
** Issues you can help with
:properties:
@@ -4323,11 +4620,11 @@ The Modus themes are a collective effort. Every bit of work matters.
+ Author/maintainer :: Protesilaos Stavrou.
+ Contributions to code or documentation :: Anders Johansson, Basil
- L.{{{space()}}} Contovounesios, Carlo Zancanaro, Eli Zaretskii, Fritz Grabo,
- Kévin Le Gouguec, Kostadin Ninev, Madhavan Krishnan, Markus Beppler,
- Matthew Stevenson, Mauro Aranda, Nicolas De Jaeghere, Philip
- Kaludercic, Rudolf Adamkovič, Stephen Gildea, Shreyas Ragavan, Stefan
- Kangas, Vincent Murphy, Xinglu Chen.
+ L.{{{space()}}} Contovounesios, Carlo Zancanaro, Christian Tietze, Daniel
+ Mendler, Eli Zaretskii, Fritz Grabo, Kévin Le Gouguec, Kostadin Ninev,
+ Madhavan Krishnan, Markus Beppler, Matthew Stevenson, Mauro Aranda,
+ Nicolas De Jaeghere, Philip Kaludercic, Rudolf Adamkovič, Stephen
+ Gildea, Shreyas Ragavan, Stefan Kangas, Vincent Murphy, Xinglu Chen.
+ Ideas and user feedback :: Aaron Jensen, Adam Porter, Adam Spiers,
Adrian Manea, Alex Griffin, Alex Peitsinis, Alexey Shmalko, Alok
@@ -4336,19 +4633,20 @@ The Modus themes are a collective effort. Every bit of work matters.
Dimech, Damien Cassou, Daniel Mendler, Dario Gjorgjevski, David
Edmondson, Davor Rotim, Divan Santana, Eliraz Kedmi, Emanuele Michele
Alberto Monterosso, Farasha Euker, Feng Shu, Gautier Ponsinet, Gerry
- Agbobada, Gianluca Recchia, Gustavo Barros, Hörmetjan Yiltiz, Ilja
- Kocken, Iris Garcia, Jeremy Friesen, Jerry Zhang, 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, Pengji Zhang, Pete Kazmier, Peter Wu,
- Philip Kaludercic, Pierre Téchoueyres, Roman Rudakov, Ryan Phillips,
- Rudolf Adamkovič, Sam Kleinman, Shreyas Ragavan, Simon Pugnet, Tassilo
- Horn, Thibaut Verron, Thomas Heartman, 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.
+ Agbobada, Gianluca Recchia, Guilherme Semente, Gustavo Barros,
+ Hörmetjan Yiltiz, Ilja Kocken, Iris Garcia, Jeremy Friesen, Jerry
+ Zhang, Johannes Grødem, 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, Pengji Zhang, Pete Kazmier, Peter Wu, Philip Kaludercic,
+ Pierre Téchoueyres, Roman Rudakov, Ryan Phillips, Rudolf Adamkovič,
+ Sam Kleinman, Shreyas Ragavan, Simon Pugnet, Tassilo Horn, Thibaut
+ Verron, Thomas Heartman, 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),
@@ -4358,9 +4656,10 @@ The Modus themes are a collective effort. Every bit of work matters.
+ Inspiration for certain features :: Bozhidar Batsov (zenburn-theme),
Fabrice Niessen (leuven-theme).
-Special thanks, in no particular order, to Manuel Uberti, Gustavo
-Barros, and Omar Antolín Camarena for their long time contributions and
-insightful commentary.
+Special thanks (from A-Z) to Gustavo Barros, Manuel Uberti, Nicolas De
+Jaeghere, and Omar Antolín Camarena for their long time contributions
+and insightful commentary on key aspects of the themes' design and/or
+aspects of their functionality.
* Meta
:properties:
@@ -4388,9 +4687,9 @@ of this sort):
And here are the canonical sources of this project's documentation:
-+ Manual ::
-+ Change Log ::
-+ Screenshots ::
++ Manual ::
++ Change Log ::
++ Screenshots ::
* GNU Free Documentation License
:properties:
diff --git a/doc/misc/org.org b/doc/misc/org.org
index df2724dd9c0..85117714ee9 100644
--- a/doc/misc/org.org
+++ b/doc/misc/org.org
@@ -10811,6 +10811,18 @@ To turn off fontification for marked up text, you can set
~org-fontify-emphasized-text~ to ~nil~. To narrow down the list of
available markup syntax, you can customize ~org-emphasis-alist~.
+Sometimes, when marked text also contains the marker character itself,
+the result may be unsettling. For example,
+
+#+begin_example
+/One may expect this whole sentence to be italicized, but the
+following ~user/?variable~ contains =/= character, which effectively
+stops emphasis there./
+#+end_example
+
+You can use zero width space to help Org sorting out the ambiguity.
+See [[*Escape Character]] for more details.
+
** Subscripts and Superscripts
:PROPERTIES:
:DESCRIPTION: Simple syntax for raising/lowering text.
diff --git a/doc/misc/pcl-cvs.texi b/doc/misc/pcl-cvs.texi
index 4ba067fd81f..833326c089b 100644
--- a/doc/misc/pcl-cvs.texi
+++ b/doc/misc/pcl-cvs.texi
@@ -524,8 +524,8 @@ you can use in PCL-CVS@. They are grouped together by type.
Most commands in PCL-CVS require that you have a @file{*cvs*}
buffer. The commands that you use to get one are listed below.
For each, a @samp{cvs} process will be run, the output will be parsed by
-PCL-CVS, and the result will be printed in the @file{*cvs*} buffer (see
-@ref{Buffer contents}, for a description of the buffer's contents).
+PCL-CVS, and the result will be printed in the @file{*cvs*} buffer
+(@pxref{Buffer contents}, for a description of the buffer's contents).
@table @kbd
@item M-x cvs-update
diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi
index a4ca54a8b01..58ca045e786 100644
--- a/doc/misc/rcirc.texi
+++ b/doc/misc/rcirc.texi
@@ -609,12 +609,6 @@ Use this symbol if you need to identify yourself in the Bitlbee channel
as follows: @code{identify secret}. The necessary arguments are the
nickname you want to use this for, and the password to use.
-@item sasl
-@cindex sasl authentication
-Use this symbol if you want to use @acronym{SASL} authentication. The
-necessary arguments are the nickname you want to use this for, and the
-password to use.
-
@cindex gateway to other IM services
@cindex instant messaging, other services
@cindex Jabber
@@ -633,6 +627,19 @@ the other instant messaging services, and Bitlbee will log you in. All
@code{rcirc} needs to know, is the login to your Bitlbee account. Don't
confuse the Bitlbee account with all the other accounts.
+@item sasl
+@cindex sasl authentication
+Use this symbol if you want to use @acronym{SASL} authentication. The
+necessary arguments are the nickname you want to use this for, and the
+password to use.
+
+@item certfp
+@cindex certfp authentication
+Use this symbol if you want to use CertFP authentication. The
+necessary arguments are the path to the client certificate key and
+password. The CertFP authentication requires a @acronym{TLS}
+connection.
+
@end table
@end table
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 819670a5088..1f6d4ad6269 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -3388,8 +3388,8 @@ returns the exit code for it. When the user option
indication that the process has been interrupted, and returns a
corresponding string.
-This remote process handling does not apply to @acronym{GVFS} (see
-@ref{GVFS-based methods}) because the remote file system is mounted on
+This remote process handling does not apply to @acronym{GVFS}
+(@pxref{GVFS-based methods}) because the remote file system is mounted on
the local host and @value{tramp} accesses it by changing the
@code{default-directory}.
@@ -3410,7 +3410,7 @@ might also add their name to this environment variable, like
For @value{tramp} to find the command on the remote, it must be
accessible through the default search path as setup by @value{tramp}
upon first connection. Alternatively, use an absolute path or extend
-@code{tramp-remote-path} (see @ref{Remote programs}):
+@code{tramp-remote-path} (@pxref{Remote programs}):
@lisp
@group
@@ -5222,6 +5222,28 @@ time being you can suppress this error by the following code in your
@end lisp
+@item
+I get an error @samp{Remote file error: Not a valid Tramp file name
+function `tramp-FOO-file-name-p'}
+
+@value{tramp} has changed the signature of an internal function.
+External packages implementing an own @value{tramp} backend must
+follow this change. Please report this problem to the author of that
+package.
+
+For the running session, @value{tramp} disables the external package,
+and you can continue to work. If you don't want to see this error
+while activating @value{tramp}, you can suppress it by the same code
+as above in your @file{~/.emacs}:
+
+@lisp
+@group
+(setq debug-ignored-errors
+ (cons 'remote-file-error debug-ignored-errors))
+@end group
+@end lisp
+
+
@item
How to disable other packages from calling @value{tramp}?
diff --git a/doc/misc/vhdl-mode.texi b/doc/misc/vhdl-mode.texi
index fef98a74636..7022582db51 100644
--- a/doc/misc/vhdl-mode.texi
+++ b/doc/misc/vhdl-mode.texi
@@ -243,7 +243,7 @@ components. Also notice that the first component,
@vindex vhdl-offsets-alist
@vindex offsets-alist @r{(vhdl-)}
Indentation for the current line is calculated using the syntactic
-component list derived in step 1 above (see @ref{Syntactic
+component list derived in step 1 above (@pxref{Syntactic
Analysis}). Each component contributes to the final total indentation
of the line in two ways.
@@ -668,7 +668,7 @@ not handled by the mode directly.
@cindex custom indentation functions
One of the most common ways to customize VHDL Mode is by writing
@dfn{custom indentation functions} and associating them with specific
-syntactic symbols (see @ref{Syntactic Symbols}). VHDL Mode itself
+syntactic symbols (@pxref{Syntactic Symbols}). VHDL Mode itself
uses custom indentation functions to provide more sophisticated
indentation, for example when lining up selected signal assignments:
@example
@@ -732,7 +732,7 @@ operator on the first line of the statement. Here is the lisp code
@end example
@noindent
Custom indent functions take a single argument, which is a syntactic
-component cons cell (see @ref{Syntactic Analysis}). The
+component cons cell (@pxref{Syntactic Analysis}). The
function returns an integer offset value that will be added to the
running total indentation for the line. Note that what actually gets
returned is the difference between the column that the signal assignment
diff --git a/etc/DEBUG b/etc/DEBUG
index 555370588fe..a05aeef1606 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -591,9 +591,13 @@ If you cannot figure out the cause for the problem using the above,
native-compile the problematic file after setting the variable
'comp-libgccjit-reproducer' to a non-nil value. That should produce a
file named ELNFILENAME_libgccjit_repro.c, where ELNFILENAME is the
-name of the problematic .eln file, in the same directory where the
-.eln file is produced. Then attach that reproducer C file to your bug
-report.
+name of the problematic .eln file, either in the same directory where
+the .eln file is produced, or under your ~/.emacs.d/eln-cache (which
+one depends on how the native-compilation is invoked). It is also
+possible that the reproducer file's name will be something like
+subr--trampoline-XXXXXXX_FUNCTION_libgccjit_repro.c, where XXXXXXX is
+a long string of hex digits and FUNCTION is some function from the
+compiled .el file. Attach that reproducer C file to your bug report.
** Following longjmp call.
diff --git a/etc/MACHINES b/etc/MACHINES
index d8d0b86fb4d..d883f1abd60 100644
--- a/etc/MACHINES
+++ b/etc/MACHINES
@@ -103,6 +103,34 @@ the list at the end of this file.
./configure CC='gcc -m64' # GCC
./configure CC='cc -m64' # Oracle Developer Studio
+** Haiku
+
+ On 32-bit Haiku it is required that the newer GCC 8 be used, instead
+ of the legacy GCC 2 used by default. This can be achieved by
+ invoking configure inside a shell launched by the 'setarch' program
+ invoked as 'setarch x86'.
+
+ When building with packages discovered through pkg-config, such as
+ libpng, on a GCC 2/GCC 8 hybrid system, simply evaluating 'setarch
+ x86' is insufficient to ensure that all required libraries are found
+ at their correct locations. To avoid this problem, set the
+ environment variable 'PKG_CONFIG_PATH' to the GCC 8 pkg-config
+ directory at '/system/develop/lib/x86/pkgconfig/' before configuring
+ Emacs.
+
+ If GCC complains about not being able to resolve symbols such as
+ "BHandler::LockLooper", you are almost certainly experiencing this
+ problem.
+
+ Haiku running on non-x86 systems has not been tested. It is
+ anticipated that Haiku running on big-endian systems will experience
+ problems when Emacs is built with Haiku windowing support, but there
+ doesn't seem to be any reliable way to get Haiku running on a
+ big-endian system at present.
+
+ The earliest release of Haiku that will successfully compile Emacs
+ is R1/Beta2. For windowing support, R1/Beta3 or later is required.
+
* Obsolete platforms
diff --git a/etc/NEWS b/etc/NEWS
index c362e56ceeb..87a7a43a5ed 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -24,12 +24,41 @@ applies, and please also update docstrings as needed.
* Installation Changes in Emacs 29.1
+** Emacs has been ported to the Haiku operating system.
+The configuration process should automatically detect and build for
+Haiku. There is also an optional window-system port to Haiku, which
+can be enabled by configuring Emacs with the option '--with-be-app',
+which will require the Haiku Application Kit development headers and a
+C++ compiler to be present on your system. If Emacs is not built with
+the option '--with-be-app', the resulting Emacs will only run in
+text-mode terminals.
+
++++
+*** Cairo drawing support has been enabled for Haiku builds.
+To enable Cairo support, ensure that the Cairo and FreeType
+development files are present on your system, and configure Emacs with
+'--with-be-cairo'.
+
+---
+*** Double buffering is now enabled on the Haiku operating system.
+Unlike X, there is no compile-time option to enable or disable
+double-buffering. If you wish to disable double-buffering, change the
+frame parameter `inhibit-double-buffering' instead.
+
** Emacs now installs the ".pdmp" file using a unique fingerprint in the name.
The file is typically installed using a file name akin to
"...dir/libexec/emacs/29.1/x86_64-pc-linux-gnu/emacs-.pdmp".
If a constant file name is required, the file can be renamed to
"emacs.pdmp", and Emacs will find it during startup anyway.
+** Emacs now supports use of XInput 2 for input events.
+If your X server has support and you have the XInput 2 development headers
+installed, you can configure Emacs with the option '--with-xinput2' to enable
+this support.
+
+The named feature `xinput2' can be used to test for the presence of
+XInput 2 support from Lisp programs.
+
* Startup Changes in Emacs 29.1
@@ -46,6 +75,38 @@ time.
* Changes in Emacs 29.1
++++
+** New face 'mode-line-active'.
+This inherits from the 'mode-line' face, but is the face actually used
+on the mode lines (along with 'mode-line-inactive').
+
+---
+** The mode line now uses a proportional font by default.
+To get the old monospaced mode line back, customize the
+'mode-line-active' and 'mode-line-inactive' faces not to inherit from
+the 'variable-pitch' face, or add this to your ~/.emacs:
+
+ (set-face-attribute 'mode-line-active nil :inherit 'mode-line)
+ (set-face-attribute 'mode-line-inactive nil :inherit 'mode-line)
+
++++
+** New function 'buffer-text-pixel-size'.
+This is similar to 'window-text-pixel-size', but can be used when the
+buffer isn't displayed.
+
++++
+** New X resource: "borderThickness".
+This controls the thickness of the external borders of the menu bars
+and pop-up menus.
+
+---
+** New minor mode 'pixel-scroll-precision-mode'.
+When enabled, and if your mouse supports it, you can scroll the
+display up or down at pixel resolution, according to what your mouse
+wheel reports. Unlike 'pixel-scroll-mode', this mode scrolls the
+display pixel-by-pixel, as opposed to only animating line-by-line
+scrolls.
+
** Terminal Emacs
---
@@ -54,6 +115,18 @@ This is in addition to previously-supported ways of discovering 24-bit
color support: either via the "RGB" or "setf24" capabilities, or if
the 'COLORTERM' environment variable is set to the value "truecolor".
++++
+** New ERT variables 'ert-batch-print-length' and 'ert-batch-print-level'.
+These variables will override 'print-length' and 'print-level' when
+printing Lisp values in ERT batch test results.
+
+---
+** Redefining an ERT test in batch mode now signals an error
+Executing 'ert-deftest' with the same name as an existing test causes
+the previous definition to be discarded, which was probably not
+intended when this occurs in batch mode. To remedy the error, rename
+tests so that they all have unique names.
+
** Emoji
+++
@@ -130,6 +203,11 @@ For example, a 'display-buffer-alist' entry of
will make the body of the chosen window 40 columns wide. For the
height use 'window-height' in combination with 'body-lines'.
+** Tab Bars and Tab Lines
+
+---
+*** 'C-x t RET' creates a new tab when the provided tab name doesn't exist.
+
** Better detection of text suspiciously reordered on display.
The function 'bidi-find-overridden-directionality' has been extended
to detect reordering effects produced by embeddings and isolates
@@ -205,6 +283,15 @@ The user option 'comint-terminfo-terminal' and variable
'system-uses-terminfo' can now be set as connection-local variables to
change the terminal used on a remote host.
+** Mwheel
+
+---
+*** New user options for alternate wheel events.
+The options 'mouse-wheel-down-alternate-event', 'mouse-wheel-up-alternate-event',
+'mouse-wheel-left-alternate-event', and 'mouse-wheel-right-alternate-event' have
+been added to better support systems where two kinds of wheel events can be
+received.
+
* Changes in Specialized Modes and Packages in Emacs 29.1
@@ -261,6 +348,10 @@ the common "utm_" trackers from URLs.
** Gnus
+---
+*** New face 'gnus-header'.
+All other 'gnus-header-*' faces inherit from this face now.
+
+++
*** New user option 'gnus-treat-emojize-symbols'.
If non-nil, symbols that have an emoji representation will be
@@ -374,7 +465,7 @@ This works like 'image-transform-fit-to-window'.
*** New user option 'image-auto-resize-max-scale-percent'.
The new 'fit-window' option will never scale an image more than this
-much (in percent). It is nil by default.
+much (in percent). It is nil by default, which means no limit.
** Image-Dired
@@ -474,6 +565,11 @@ This is a convenience function to extract the field data from
Using this option you can control how the xwidget-webkit buffers are
named.
+---
+*** New user option 'xwidget-webkit-cookie-file'.
+Using this option you can control whether the xwidget-webkit buffers
+save cookies set by web pages, and if so, in which file to save them.
+
+++
*** New minor mode 'xwidget-webkit-edit-mode'.
When this mode is enabled, self-inserting characters and other common
@@ -482,10 +578,15 @@ WebKit widget.
+++
*** New minor mode 'xwidget-webkit-isearch-mode'.
-This mode acts similarly to incremental search, and allows to search
+This mode acts similarly to incremental search, and allows searching
the contents of a WebKit widget. In xwidget-webkit mode, it is bound
to 'C-s' and 'C-r'.
++++
+*** New command 'xwidget-webkit-browse-history'.
+This command displays a buffer containing the page load history of
+the current WebKit widget, and allows you to navigate it.
+
---
*** On X11, the WebKit inspector is now available inside xwidgets.
To access the inspector, right click on the widget and select "Inspect
@@ -497,6 +598,14 @@ The newly created buffer will be displayed via 'display-buffer', which
can be customized through the usual mechanism of 'display-buffer-alist'
and friends.
+** Tramp
+
+---
+*** Tramp supports abbreviating remote home directories now.
+When calling 'abbreviate-file-name' on a Tramp filename, the result
+will abbreviate the user's home directory, for example by abbreviating
+"/ssh:user@host:/home/user" to "/ssh:user@host:~".
+
* New Modes and Packages in Emacs 29.1
@@ -585,6 +694,85 @@ Use 'exif-parse-file' and 'exif-field' instead.
* Lisp Changes in Emacs 29.1
++++
+** New function 'get-display-property'.
+This is like 'get-text-property', but works on the 'display' text
+property.
+
++++
+** New function 'add-text-display-property'.
+This is like 'put-text-property', but works on the 'display' text
+property.
+
++++
+** New 'min-width' 'display' property.
+This allows setting a minimum display width for a region of text.
+
+** Keymaps and key definitions
+
++++
+*** New functions for defining and manipulating keystrokes have been added.
+These all take just the syntax defined by 'key-valid-p'. None of the
+older functions have been depreciated or altered, but are deemphasised
+in the documentation.
+
++++
+*** Use 'keymap-set' instead of 'define-key'.
+
++++
+*** Use 'keymap-global-set' instead of 'global-set-key'.
+
++++
+*** Use 'keymap-local-set' instead of 'local-set-key'.
+
++++
+*** Use 'keymap-global-unset' instead of 'global-unset-key'.
+
++++
+*** Use 'keymap-local-unset' instead of 'local-unset-key'.
+
++++
+*** Use 'keymap-substitute' instead of 'substitute-key-definition'.
+
++++
+*** Use 'keymap-set-after' instead of 'define-key-after'.
+
++++
+*** Use 'keymap-lookup' instead of 'lookup-keymap' and 'key-binding'.
+
++++
+*** Use 'keymap-local-lookup' instead of 'local-key-binding'.
+
++++
+*** Use 'keymap-global-lookup' instead of 'global-key-binding'.
+
++++
+*** 'define-key' now takes an optional REMOVE argument.
+If non-nil, remove the definition from the keymap. This is subtly
+different from setting a definition to nil (when the keymap has a
+parent).
+
++++
+*** New function 'key-valid-p'.
+The 'kbd' function is quite permissive, and will try to return
+something usable even if the syntax of the argument isn't completely
+correct. The 'key-valid-p' predicate does a stricter check of the
+syntax.
+
+---
+*** New function 'key-parse'.
+This is like 'kbd', but only returns vectors instead of a mix of
+vectors and strings.
+
++++
+** New substitution in docstrings and 'substitute-command-keys'.
+Use \\`KEYSEQ' to insert a literal key sequence "KEYSEQ" (for example
+\\`C-k') in a docstring or when calling 'substitute-command-keys',
+which will use the same face as a command substitution. This should
+be used only when a key sequence has no corresponding command, for
+example when it is read directly with 'read-key-sequence'. It must be
+a valid key sequence according to 'key-valid-p'.
+
+++
** New function 'file-name-split'.
This returns a list of all the components of a file name.
@@ -632,6 +820,9 @@ This convenience function is useful when writing code that parses
files at run-time, and allows Lisp programs to re-parse files only
when they have changed.
++++
+** 'abbreviate-file-name' now respects magic file name handlers.
+
---
** New function 'font-has-char-p'.
This can be used to check whether a specific font has a glyph for a
@@ -674,13 +865,6 @@ The 'tabulated-list-entries' variable now supports using an image
descriptor, which means to insert an image in that column instead of
text. See the documentation string of that variable for details.
-+++
-** 'define-key' now understands a new strict 'kbd' representation for keys.
-The '(define-key map ["C-c M-f"] #'some-command)' syntax is now
-supported, and is like the 'kbd' representation, but is stricter. If
-the string doesn't represent a valid key sequence, an error is
-signalled (both when evaluating and byte compiling).
-
+++
** :keys in 'menu-item' can now be a function.
If so, it is called whenever the menu is computed, and can be used to
@@ -717,13 +901,6 @@ This macro allows defining keymap variables more conveniently.
** 'kbd' can now be used in built-in, preloaded libraries.
It no longer depends on edmacro.el and cl-lib.el.
-+++
-** New function 'kbd-valid-p'.
-The 'kbd' function is quite permissive, and will try to return
-something usable even if the syntax of the argument isn't completely
-correct. The 'kbd-valid-p' predicate does a stricter check of the
-syntax.
-
+++
** New function 'image-at-point-p'.
This function returns t if point is on a valid image, and nil
@@ -781,6 +958,21 @@ markup, and passing the URI of the file as an argument to
Some new functions, such as 'xwidget-webkit-search', have been added
for performing searches on WebKit xwidgets.
++++
+*** New function 'xwidget-webkit-back-forward-list'.
+This function is used to obtain the history of page-loads in a given
+WebKit xwidget.
+
++++
+*** New function 'xwidget-webkit-estimated-load-progress'.
+This function is used to obtain the estimated progress of page loading
+in a given WebKit xwidget.
+
++++
+*** New function 'xwidget-webkit-stop-loading'.
+This function is used to terminate all data transfer during page loads
+in a given WebKit xwidget.
+
+++
*** 'load-changed' xwidget events are now more detailed.
In particular, they can now have different arguments based on the
@@ -792,8 +984,13 @@ commits to the load.
+++
*** New event type 'xwidget-display-event'.
These events are sent whenever an xwidget requests that Emacs display
-another xwidget. The only argument to this event is the xwidget that
-should be displayed.
+another xwidget. The only arguments to this event are the xwidget
+that should be displayed, and the xwidget that asked to display it.
+
++++
+*** New function 'xwidget-webkit-set-cookie-storage-file'.
+This function is used to control where and if an xwidget stores
+cookies set by web pages on disk.
* Changes in Emacs 29.1 on Non-Free Operating Systems
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index f506881a4ba..acff3be7da4 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -1022,6 +1022,15 @@ modern fonts are used, such as Noto Emoji or Ebrima.
The solution is to switch to a configuration that uses HarfBuzz as its
shaping engine, where these problems don't exist.
+** On Haiku, some proportionally-spaced fonts display with artifacting.
+
+This is a Haiku bug: https://dev.haiku-os.org/ticket/17229, which can
+be remedied by using a different font that does not exhibit this
+problem, or by configuring Emacs '--with-be-cairo'.
+
+So far, Bitstream Charter and Noto Sans have been known to exhibit
+this problem, while Noto Sans Display is known to not do so.
+
* Internationalization problems
** M-{ does not work on a Spanish PC keyboard.
@@ -1105,6 +1114,13 @@ In your ~/.Xresources file, then run
And restart Emacs.
+** On Haiku, BeCJK doesn't work properly with Emacs
+
+Some popular Haiku input methods such BeCJK are known to behave badly
+when interacting with Emacs, in ways such as stealing input focus and
+displaying popup windows that don't disappear. If you are affected,
+you should use an Emacs input method instead.
+
* X runtime problems
** X keyboard problems
diff --git a/etc/compilation.txt b/etc/compilation.txt
index 01d4df1b09d..34d8c53c9a6 100644
--- a/etc/compilation.txt
+++ b/etc/compilation.txt
@@ -310,6 +310,9 @@ G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
file:G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
{standard input}:27041: Warning: end of file not at end of a line; newline inserted
boost/container/detail/flat_tree.hpp:589:25: [ skipping 5 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
+ |
+ |board.h:60:21:
+ | 60 | #define I(b, C) ((C).y * (b)->width + (C).x)
* Guile backtrace, 2.0.11
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex
index d3715948d65..181516172d2 100644
--- a/etc/refcards/orgcard.tex
+++ b/etc/refcards/orgcard.tex
@@ -1,5 +1,5 @@
% Reference Card for Org Mode
-\def\orgversionnumber{9.5}
+\def\orgversionnumber{9.5.1}
\def\versionyear{2021} % latest update
\input emacsver.tex
diff --git a/etc/themes/modus-operandi-theme.el b/etc/themes/modus-operandi-theme.el
index 350524779d6..5a73e655f30 100644
--- a/etc/themes/modus-operandi-theme.el
+++ b/etc/themes/modus-operandi-theme.el
@@ -4,8 +4,8 @@
;; Author: Protesilaos Stavrou
;; URL: https://gitlab.com/protesilaos/modus-themes
-;; Version: 1.6.0
-;; Package-Requires: ((emacs "26.1"))
+;; Version: 1.7.0
+;; Package-Requires: ((emacs "27.1"))
;; Keywords: faces, theme, accessibility
;; This file is part of GNU Emacs.
diff --git a/etc/themes/modus-themes.el b/etc/themes/modus-themes.el
index 7ab985c0771..f7d38ac2dea 100644
--- a/etc/themes/modus-themes.el
+++ b/etc/themes/modus-themes.el
@@ -4,8 +4,8 @@
;; Author: Protesilaos Stavrou
;; URL: https://gitlab.com/protesilaos/modus-themes
-;; Version: 1.6.0
-;; Last-Modified: <2021-09-29 08:47:03 +0300>
+;; Version: 1.7.0
+;; Last-Modified: <2021-11-18 12:28:22 +0200>
;; Package-Requires: ((emacs "27.1"))
;; Keywords: faces, theme, accessibility
@@ -31,7 +31,7 @@
;; This file contains all customization variables, helper functions,
;; interactive commands, and face specifications. Please refer to the
;; official Info manual for further documentation (distributed with the
-;; themes, or available at: ).
+;; themes, or available at: ).
;;
;; The themes share the following customization variables:
;;
@@ -39,8 +39,9 @@
;; modus-themes-org-agenda (alist)
;; modus-themes-bold-constructs (boolean)
;; modus-themes-inhibit-reload (boolean)
+;; modus-themes-intense-markup (boolean)
;; modus-themes-italic-constructs (boolean)
-;; modus-themes-no-mixed-fonts (boolean)
+;; modus-themes-mixed-fonts (boolean)
;; modus-themes-scale-headings (boolean)
;; modus-themes-subtle-line-numbers (boolean)
;; modus-themes-success-deuteranopia (boolean)
@@ -59,6 +60,7 @@
;; modus-themes-prompts (choice)
;; modus-themes-region (choice)
;; modus-themes-syntax (choice)
+;; modus-themes-mode-line-padding (natnum)
;;
;; The default scale for headings is as follows (it can be customized as
;; well---remember, no scaling takes place by default):
@@ -238,6 +240,7 @@
;; ido-mode
;; iedit
;; iflipb
+;; image-dired
;; imenu-list
;; indium
;; info
@@ -278,6 +281,7 @@
;; mu4e
;; mu4e-conversation
;; multiple-cursors
+;; nano-modeline
;; neotree
;; no-emoji
;; notmuch
@@ -378,6 +382,7 @@
;; vc-annotate (C-x v g)
;; vdiff
;; vertico
+;; vertico-quick
;; vimish-fold
;; visible-mark
;; visual-regexp
@@ -1475,7 +1480,7 @@ The actual styling of the face is done by `modus-themes-faces'."
(defface modus-themes-variable-pitch nil
"Generic face for applying a conditional `variable-pitch'.
-This behaves in accordance with `modus-themes-no-mixed-fonts',
+This behaves in accordance with `modus-themes-mixed-fonts',
`modus-themes-variable-pitch-headings' for all heading levels,
and `modus-themes-variable-pitch-ui'.
@@ -1484,7 +1489,7 @@ The actual styling of the face is done by `modus-themes-faces'."
(defface modus-themes-fixed-pitch nil
"Generic face for applying a conditional `fixed-pitch'.
-This behaves in accordance with `modus-themes-no-mixed-fonts'.
+This behaves in accordance with `modus-themes-mixed-fonts'.
The actual styling of the face is done by `modus-themes-faces'."
:group 'modus-theme-faces)
@@ -1782,30 +1787,43 @@ This includes the mode line, header line, tab bar, and tab line."
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) UI typeface"))
-(defcustom modus-themes-no-mixed-fonts nil
- "Disable inheritance from `fixed-pitch' in some faces.
+(define-obsolete-variable-alias
+ 'modus-themes-no-mixed-fonts
+ 'modus-themes-mixed-fonts "On 2021-10-02 for version 1.7.0")
-This is done by default to allow spacing-sensitive constructs,
-such as Org tables and code blocks, to remain monospaced when
-users opt for something like the command `variable-pitch-mode'.
-The downside with the default is that users need to explicitly
-configure the font family of `fixed-pitch' in order to get a
-consistent experience. That may be something they do not want to
-do. Hence this option to disable any kind of technique for
-mixing fonts."
+(defcustom modus-themes-mixed-fonts nil
+ "Non-nil to enable inheritance from `fixed-pitch' in some faces.
+
+This is done to allow spacing-sensitive constructs, such as Org
+tables and code blocks, to remain monospaced when users opt for
+something like the command `variable-pitch-mode'.
+
+Users may need to explicitly configure the font family of
+`fixed-pitch' in order to get a consistent experience."
:group 'modus-themes
- :package-version '(modus-themes . "1.0.0")
- :version "28.1"
+ :package-version '(modus-themes . "1.7.0")
+ :version "29.1"
:type 'boolean
:set #'modus-themes--set-option
:initialize #'custom-initialize-default
- :link '(info-link "(modus-themes) No mixed fonts"))
+ :link '(info-link "(modus-themes) Mixed fonts"))
(defconst modus-themes--headings-choice
'(set :tag "Properties" :greedy t
(const :tag "Background color" background)
(const :tag "Overline" overline)
- (const :tag "No bold weight" no-bold)
+ (choice :tag "Font weight (must be supported by the typeface)"
+ (const :tag "Bold (default)" nil)
+ (const :tag "Thin" thin)
+ (const :tag "Ultra-light" ultralight)
+ (const :tag "Extra-light" extralight)
+ (const :tag "Light" light)
+ (const :tag "Semi-light" semilight)
+ (const :tag "Regular" regular)
+ (const :tag "Medium" medium)
+ (const :tag "Semi-bold" semibold)
+ (const :tag "Extra-bold" extrabold)
+ (const :tag "Ultra-bold" ultrabold))
(choice :tag "Colors"
(const :tag "Subtle colors" nil)
(const :tag "Rainbow colors" rainbow)
@@ -1839,21 +1857,27 @@ heading.
A `background' property adds a subtle tinted color to the
background of the heading.
-A `no-bold' property removes the bold weight from the heading's
-text.
-
A `monochrome' property makes all headings the same base color,
which is that of the default for the active theme (black/white).
When `background' is also set, `monochrome' changes its color to
gray. If both `monochrome' and `rainbow' are set, the former
takes precedence.
+The symbol of a weight attribute adjusts the font of the heading
+accordingly, such as `light', `semibold', etc. Valid symbols are
+defined in the internal variable `modus-themes--heading-weights'.
+The absence of a weight means that bold will be used by virtue of
+inheriting the `bold' face (check the manual for tweaking bold
+and italic faces). For backward compatibility, the `no-bold'
+value is accepted, though users are encouraged to specify a
+`regular' weight instead.
+
Combinations of any of those properties are expressed as a list,
like in these examples:
- (no-bold)
+ (semibold)
(rainbow background)
- (overline monochrome no-bold)
+ (overline monochrome semibold)
The order in which the properties are set is not significant.
@@ -1862,7 +1886,7 @@ In user configuration files the form may look like this:
(setq modus-themes-headings
'((1 . (background overline rainbow))
(2 . (background overline))
- (t . (overline no-bold))))
+ (t . (overline semibold))))
When defining the styles per heading level, it is possible to
pass a non-nil value (t) instead of a list of properties. This
@@ -1875,7 +1899,7 @@ will retain the original aesthetic for that level. For example:
(setq modus-themes-headings
'((1 . (background overline))
- (2 . (rainbow no-bold))
+ (2 . (rainbow semibold))
(t . t))) ; default style for all other levels
For Org users, the extent of the heading depends on the variable
@@ -1887,8 +1911,8 @@ Also read `modus-themes-scale-headings' to change the height of
headings and `modus-themes-variable-pitch-headings' to make them
use a proportionately spaced font."
:group 'modus-themes
- :package-version '(modus-themes . "1.5.0")
- :version "28.1"
+ :package-version '(modus-themes . "1.7.0")
+ :version "29.1"
:type `(alist
:options ,(mapcar (lambda (el)
(list el modus-themes--headings-choice))
@@ -1909,7 +1933,7 @@ combinations:
(setq modus-themes-org-agenda
'((header-block . (variable-pitch scale-title))
(header-date . (grayscale workaholic bold-today))
- (event . (accented scale-small))
+ (event . (accented italic varied))
(scheduled . uniform)
(habit . traffic-light)))
@@ -1963,26 +1987,42 @@ For example:
(header-date . (grayscale workaholic bold-today))
(header-date . (grayscale workaholic bold-today scale-heading))
-An `event' key covers events from the diary and other entries
-that derive from a symbolic expression or sexp (e.g. phases of
-the moon, holidays). By default those have a gray
-foreground (the default is a nil value or an empty list). This
-key accepts a list of properties. Those are:
+An `event' key covers (i) headings with a plain time stamp that
+are shown on the agenda, also known as events, (ii) entries
+imported from the diary, and (iii) other items that derive from a
+symbolic expression or sexp (phases of the moon, holidays, etc.).
+By default all those look the same and have a subtle foreground
+color (the default is a nil value or an empty list). This key
+accepts a list of properties. Those are:
- `scale-small' reduces the height of the entries to the value of
the user option `modus-themes-scale-small' (0.9 the height of
- the main font size by default).
+ the main font size by default). This work best when the
+ relevant entries have no tags associated with them and when the
+ user is interested in reducing their presence in the agenda
+ view.
- `accented' applies an accent value to the event's foreground,
- replacing the original gray.
+ replacing the original gray. It makes all entries stand out more.
- `italic' adds a slant to the font's forms (italic or oblique
- forms, depending on the typeface)
+ forms, depending on the typeface).
+- `varied' differentiates between events with a plain time stamp
+ and entries that are generated from either the diary or a
+ symbolic expression. It generally puts more emphasis on
+ events. When `varied' is combined with `accented', it makes
+ only events use an accent color, while diary/sexp entries
+ retain their original subtle foreground. When `varied' is used
+ in tandem with `italic', it applies a slant only to diary and
+ sexp entries, not events. And when `varied' is the sole
+ property passed to the `event' key, it has the same meaning as
+ the list (italic varied). The combination of `varied',
+ `accented', `italic' covers all of the aforementioned cases.
For example:
(event . nil)
- (event . (scale-small))
- (event . (scale-small accented))
- (event . (scale-small accented italic))
+ (event . (italic))
+ (event . (accented italic))
+ (event . (accented italic varied))
A `scheduled' key applies to tasks with a scheduled date. By
default (a nil value), these use varying shades of yellow to
@@ -2038,8 +2078,8 @@ For example:
(habit . simplified)
(habit . traffic-light)"
:group 'modus-themes
- :package-version '(modus-themes . "1.6.0")
- :version "28.1"
+ :package-version '(modus-themes . "1.7.0")
+ :version "29.1"
:type '(set
(cons :tag "Block header"
(const header-block)
@@ -2065,7 +2105,8 @@ For example:
(set :tag "Text presentation" :greedy t
(const :tag "Use smaller font size (`modus-themes-scale-small')" scale-small)
(const :tag "Apply an accent color" accented)
- (const :tag "Italic font slant (oblique forms)" italic)))
+ (const :tag "Italic font slant (oblique forms)" italic)
+ (const :tag "Differentiate events from diary/sexp entries" varied)))
(cons :tag "Scheduled tasks"
(const scheduled)
(choice (const :tag "Yellow colors to distinguish current and future tasks (default)" nil)
@@ -2289,12 +2330,12 @@ to the affected text.
The property `background' adds a color-coded background.
The property `intense' amplifies the applicable colors if
-`background' and/or `text-only' are set. If `intense' is set on
-its own, then it implies `text-only'.
+`background' and/or `text-also' are set. If `intense' is set on
+its own, then it implies `text-also'.
-To disable fringe indicators for Flymake or Flycheck, refer to
-variables `flymake-fringe-indicator-position' and
-`flycheck-indication-mode', respectively.
+The property `faint' uses nuanced colors for the underline and
+for the foreground when `text-also' is included. If both `faint'
+and `intense' are specified, the former takes precedence.
Combinations of any of those properties can be expressed in a
list, as in those examples:
@@ -2312,15 +2353,21 @@ In user configuration files the form may look like this:
NOTE: The placement of the straight underline, though not the
wave style, is controlled by the built-in variables
`underline-minimum-offset', `x-underline-at-descent-line',
-`x-use-underline-position-properties'."
+`x-use-underline-position-properties'.
+
+To disable fringe indicators for Flymake or Flycheck, refer to
+variables `flymake-fringe-indicator-position' and
+`flycheck-indication-mode', respectively."
:group 'modus-themes
- :package-version '(modus-themes . "1.5.0")
- :version "28.1"
+ :package-version '(modus-themes . "1.7.0")
+ :version "29.1"
:type '(set :tag "Properties" :greedy t
(const :tag "Straight underline" straight-underline)
(const :tag "Colorise text as well" text-also)
- (const :tag "Increase color intensity" intense)
- (const :tag "With background" background))
+ (const :tag "With background" background)
+ (choice :tag "Overall coloration"
+ (const :tag "Intense colors" intense)
+ (const :tag "Faint colors" faint)))
:set #'modus-themes--set-option
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) Language checkers"))
@@ -2502,6 +2549,17 @@ instead of a box style, it is advised to set
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) Mode line"))
+(defcustom modus-themes-mode-line-padding 6
+ "Padding for `modus-themes-mode-line'.
+The value is expressed as a positive integer."
+ :group 'modus-themes
+ :package-version '(modus-themes . "1.7.0")
+ :version "29.1"
+ :type 'natnum
+ :set #'modus-themes--set-option
+ :initialize #'custom-initialize-default
+ :link '(info-link "(modus-themes) Mode line"))
+
(defcustom modus-themes-diffs nil
"Adjust the overall style of diffs.
@@ -2643,16 +2701,6 @@ In user configuration files the form may look like this:
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) Command prompts"))
-(defcustom modus-themes-intense-hl-line nil
- "Use a more prominent background for command `hl-line-mode'."
- :group 'modus-themes
- :package-version '(modus-themes . "1.0.0")
- :version "28.1"
- :type 'boolean
- :set #'modus-themes--set-option
- :initialize #'custom-initialize-default
- :link '(info-link "(modus-themes) Line highlighting"))
-
(make-obsolete 'modus-themes-intense-hl-line 'modus-themes-hl-line "1.3.0")
(defcustom modus-themes-hl-line nil
@@ -2708,6 +2756,22 @@ results with underlines."
:initialize #'custom-initialize-default
:link '(info-link "(modus-themes) Line numbers"))
+(defcustom modus-themes-intense-markup nil
+ "Use more intense markup in Org, Markdown, and related.
+The default style for certain markup types like inline code and
+verbatim constructs in Org and related major modes is a subtle
+foreground color combined with a subtle background.
+
+With a non-nil value (t), these constructs will use a more
+prominent background and foreground color combination instead."
+ :group 'modus-themes
+ :package-version '(modus-themes . "1.7.0")
+ :version "29.1"
+ :type 'boolean
+ :set #'modus-themes--set-option
+ :initialize #'custom-initialize-default
+ :link '(info-link "(modus-themes) Intense markup"))
+
(defcustom modus-themes-paren-match nil
"Control the style of matching parentheses or delimiters.
@@ -2913,12 +2977,14 @@ In user configuration files the form may look like this:
This is to account for red-green color deficiency.
-The present customization option should apply to all contexts where
-there can be a color-coded distinction between success and failure,
-to-do and done, and so on.
+The present customization option applies to all contexts where
+there can be a color-coded distinction between success or
+failure, to-do or done, mark for selection or deletion (e.g. in
+Dired), current and lazily highlighted search matches, and so on.
-Diffs, which have a red/green dichotomy by default, can also be
-configured to conform with deuteranopia: `modus-themes-diffs'."
+Diffs, which rely on a red/green dichotomy by default, can also
+be configured to meet the needs of users with deuteranopia via
+the option `modus-themes-diffs'."
:group 'modus-themes
:package-version '(modus-themes . "1.4.0")
:version "28.1"
@@ -3024,7 +3090,7 @@ Those are stored in `modus-themes-faces' and
(defun modus-themes--fixed-pitch ()
"Conditional application of `fixed-pitch' inheritance."
- (unless modus-themes-no-mixed-fonts
+ (when modus-themes-mixed-fonts
(list :inherit 'fixed-pitch)))
(defun modus-themes--variable-pitch ()
@@ -3054,14 +3120,23 @@ combines with the theme's primary background (white/black)."
(list :background (or altbg 'unspecified) :foreground altfg)
(list :background mainbg :foreground mainfg)))
-(defun modus-themes--lang-check (underline subtlefg intensefg intensefg-alt subtlebg intensebg)
+(defun modus-themes--markup (mainfg intensefg &optional mainbg intensebg)
+ "Conditional use of colors for markup in Org and others.
+MAINBG is the default background. MAINFG is the default
+foreground. INTENSEBG and INTENSEFG must be more colorful
+variants."
+ (if modus-themes-intense-markup
+ (list :background (or intensebg 'unspecified) :foreground intensefg)
+ (list :background (or mainbg 'unspecified) :foreground mainfg)))
+
+(defun modus-themes--lang-check (underline subtlefg intensefg intensefg-alt subtlebg intensebg faintfg)
"Conditional use of foreground colors for language checkers.
UNDERLINE is a color-code value for the affected text's underline
property. SUBTLEFG and INTENSEFG follow the same color-coding
pattern and represent a value that is faint or vibrant
respectively. INTENSEFG-ALT is used when the intensity is high.
SUBTLEBG and INTENSEBG are color-coded background colors that
-differ in overall intensity."
+differ in overall intensity. FAINTFG is a nuanced color."
(let ((modus-themes-lang-checkers
(if (listp modus-themes-lang-checkers)
modus-themes-lang-checkers
@@ -3074,12 +3149,16 @@ differ in overall intensity."
('straight-underline '(straight-underline))))))
(list :underline
(list :color
- underline
+ (if (memq 'faint modus-themes-lang-checkers)
+ faintfg underline)
:style
(if (memq 'straight-underline modus-themes-lang-checkers)
'line 'wave))
:background
(cond
+ ((and (memq 'background modus-themes-lang-checkers)
+ (memq 'faint modus-themes-lang-checkers))
+ subtlebg)
((and (memq 'background modus-themes-lang-checkers)
(memq 'intense modus-themes-lang-checkers))
intensebg)
@@ -3087,6 +3166,9 @@ differ in overall intensity."
subtlebg))
:foreground
(cond
+ ((and (memq 'faint modus-themes-lang-checkers)
+ (memq 'text-also modus-themes-lang-checkers))
+ faintfg)
((and (memq 'background modus-themes-lang-checkers)
(memq 'intense modus-themes-lang-checkers))
intensefg-alt)
@@ -3312,6 +3394,18 @@ an alternative to the default value."
"Get cdr of KEY in ALIST."
(cdr (assoc key alist)))
+(defvar modus-themes--heading-weights
+ '( thin ultralight extralight light semilight regular medium
+ semibold bold heavy extrabold ultrabold)
+ "List of font weights used by `modus-themes--heading'.")
+
+(defun modus-themes--heading-weight (list)
+ "Search for `modus-themes--heading' weight in LIST."
+ (catch 'found
+ (dolist (elt list)
+ (when (memq elt modus-themes--heading-weights)
+ (throw 'found elt)))))
+
(defun modus-themes--heading (level fg fg-alt bg bg-gray border)
"Conditional styles for `modus-themes-headings'.
@@ -3323,8 +3417,9 @@ values. BG-GRAY is a gray background. BORDER is a color value
that combines well with the background and foreground."
(let* ((key (modus-themes--key-cdr level modus-themes-headings))
(style (or key (modus-themes--key-cdr t modus-themes-headings)))
+ (style-listp (listp style))
(modus-themes-headings
- (if (listp style)
+ (if style-listp
style
;; translation layer for legacy values
(pcase style
@@ -3345,15 +3440,16 @@ that combines well with the background and foreground."
('rainbow-section-no-bold '(no-bold rainbow background overline))
('section '(background overline))
('section-no-bold '(background overline no-bold)))))
- (var (if modus-themes-variable-pitch-headings
- 'variable-pitch
- 'unspecified))
+ (var (when modus-themes-variable-pitch-headings 'variable-pitch))
(varbold (if var
(append (list 'bold) (list var))
- 'bold)))
+ 'bold))
+ (weight (when style-listp (modus-themes--heading-weight style))))
(list :inherit
(cond
- ((memq 'no-bold modus-themes-headings)
+ ;; `no-bold' is for backward compatibility because we cannot
+ ;; deprecate a variable's value.
+ ((or weight (memq 'no-bold modus-themes-headings))
var)
(varbold))
:background
@@ -3371,6 +3467,8 @@ that combines well with the background and foreground."
((memq 'rainbow modus-themes-headings)
fg-alt)
(fg))
+ :weight
+ (or weight 'unspecified)
:overline
(if (memq 'overline modus-themes-headings)
border
@@ -3430,24 +3528,42 @@ weight. Optional UL applies an underline."
t
'unspecified))))
-(defun modus-themes--agenda-event (fg)
+(defun modus-themes--agenda-event (fg-accent &optional varied)
"Control the style of the Org agenda events.
-FG is the accent color to use."
+FG-ACCENT is the accent color to use. Optional VARIED is a
+toggle to behave in accordance with the semantics of the `varied'
+property that the `event' key accepts in
+`modus-themes-org-agenda'."
(let ((properties (modus-themes--key-cdr 'event modus-themes-org-agenda)))
(list :height
(if (memq 'scale-small properties)
modus-themes-scale-small
'unspecified)
:foreground
- (if (memq 'accented properties)
- fg
+ (cond
+ ((or (and (memq 'varied properties) varied)
+ (and (memq 'accented properties)
+ (memq 'varied properties)
+ varied))
'unspecified)
+ ((memq 'accented properties)
+ fg-accent)
+ ('unspecified))
:inherit
(cond
+ ((and (memq 'italic properties)
+ (memq 'varied properties)
+ varied)
+ '(shadow italic))
((and (memq 'accented properties)
- (memq 'italic properties))
- 'italic)
- ((memq 'italic properties)
+ (memq 'varied properties)
+ varied)
+ 'shadow)
+ ((or (and (memq 'varied properties) varied)
+ (and (memq 'italic properties) varied))
+ '(shadow italic))
+ ((and (memq 'italic properties)
+ (not (memq 'varied properties)))
'(shadow italic))
('shadow)))))
@@ -3512,6 +3628,13 @@ set to `rainbow'."
('rainbow (list :background bgaccent :foreground fgaccent))
(_ (list :background bg :foreground fg))))
+(defun modus-themes--mode-line-padding ()
+ "Determine mode line padding value.
+See `modus-themes--mode-line-attrs'."
+ (if (natnump modus-themes-mode-line-padding)
+ modus-themes-mode-line-padding
+ 6)) ; the default value
+
(defun modus-themes--mode-line-attrs
(fg bg fg-alt bg-alt fg-accent bg-accent border border-3d &optional alt-style fg-distant)
"Color combinations for `modus-themes-mode-line'.
@@ -3528,7 +3651,8 @@ line's box property.
Optional FG-DISTANT should be close to the main background
values. It is intended to be used as a distant-foreground
property."
- (let ((modus-themes-mode-line
+ (let ((padding (modus-themes--mode-line-padding))
+ (modus-themes-mode-line
(if (listp modus-themes-mode-line)
modus-themes-mode-line
;; translation layer for legacy values
@@ -3552,10 +3676,10 @@ property."
(cons fg-alt bg-alt))
((cons fg bg))))
(box (cond ((memq 'moody modus-themes-mode-line)
- nil)
+ 'unspecified)
((and (memq '3d modus-themes-mode-line)
(memq 'padded modus-themes-mode-line))
- (list :line-width 4
+ (list :line-width padding
:color
(cond ((and (memq 'accented modus-themes-mode-line)
(memq 'borderless modus-themes-mode-line))
@@ -3567,9 +3691,9 @@ property."
:style (when alt-style 'released-button)))
((and (memq 'accented modus-themes-mode-line)
(memq 'padded modus-themes-mode-line))
- (list :line-width 6 :color bg-accent))
+ (list :line-width padding :color bg-accent))
((memq 'padded modus-themes-mode-line)
- (list :line-width 6 :color bg))
+ (list :line-width padding :color bg))
((memq '3d modus-themes-mode-line)
(list :line-width 1
:color
@@ -3579,14 +3703,17 @@ property."
((memq 'borderless modus-themes-mode-line) bg)
(border-3d))
:style (when alt-style 'released-button)))
+ ((and (memq 'accented modus-themes-mode-line)
+ (memq 'borderless modus-themes-mode-line))
+ bg-accent)
((memq 'borderless modus-themes-mode-line)
bg)
((memq 'padded modus-themes-mode-line)
- (list :line-width 6 :color bg))
+ (list :line-width padding :color bg))
(border)))
(line (cond ((not (or (memq 'moody modus-themes-mode-line)
(memq 'padded modus-themes-mode-line)))
- nil)
+ 'unspecified)
((and (memq 'borderless modus-themes-mode-line)
(memq 'accented modus-themes-mode-line))
bg-accent)
@@ -4007,6 +4134,7 @@ as when they are declared in the `:config' phase)."
(defun modus-themes-load-operandi ()
"Load `modus-operandi' and disable `modus-vivendi'.
Also run `modus-themes-after-load-theme-hook'."
+ (interactive)
(disable-theme 'modus-vivendi)
(load-theme 'modus-operandi t)
(run-hooks 'modus-themes-after-load-theme-hook))
@@ -4015,6 +4143,7 @@ Also run `modus-themes-after-load-theme-hook'."
(defun modus-themes-load-vivendi ()
"Load `modus-vivendi' and disable `modus-operandi'.
Also run `modus-themes-after-load-theme-hook'."
+ (interactive)
(disable-theme 'modus-operandi)
(load-theme 'modus-vivendi t)
(run-hooks 'modus-themes-after-load-theme-hook))
@@ -4169,7 +4298,11 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(modus-themes-pseudo-header ((,class :inherit bold :foreground ,fg-main)))
`(modus-themes-mark-alt ((,class :inherit bold :background ,bg-mark-alt :foreground ,fg-mark-alt)))
`(modus-themes-mark-del ((,class :inherit bold :background ,bg-mark-del :foreground ,fg-mark-del)))
- `(modus-themes-mark-sel ((,class :inherit bold :background ,bg-mark-sel :foreground ,fg-mark-sel)))
+ `(modus-themes-mark-sel ((,class :inherit bold
+ :background ,@(modus-themes--success-deuteran
+ cyan-refine-bg
+ bg-mark-sel)
+ :foreground ,fg-mark-sel)))
`(modus-themes-mark-symbol ((,class :inherit bold :foreground ,blue-alt)))
;;;;; heading levels
;; styles for regular headings used in Org, Markdown, Info, etc.
@@ -4225,13 +4358,13 @@ by virtue of calling either of `modus-themes-load-operandi' and
;;;;; language checkers
`(modus-themes-lang-error ((,class ,@(modus-themes--lang-check
fg-lang-underline-error fg-lang-error
- red red-refine-fg red-nuanced-bg red-refine-bg))))
+ red red-refine-fg red-nuanced-bg red-refine-bg red-faint))))
`(modus-themes-lang-note ((,class ,@(modus-themes--lang-check
fg-lang-underline-note fg-lang-note
- blue-alt blue-refine-fg blue-nuanced-bg blue-refine-bg))))
+ blue-alt blue-refine-fg blue-nuanced-bg blue-refine-bg blue-faint))))
`(modus-themes-lang-warning ((,class ,@(modus-themes--lang-check
fg-lang-underline-warning fg-lang-warning
- yellow yellow-refine-fg yellow-nuanced-bg yellow-refine-bg))))
+ yellow yellow-refine-fg yellow-nuanced-bg yellow-refine-bg yellow-faint))))
;;;;; other custom faces
`(modus-themes-bold ((,class ,@(modus-themes--bold-weight))))
`(modus-themes-hl-line ((,class ,@(modus-themes--hl-line
@@ -4276,15 +4409,16 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(buffer-menu-buffer ((,class :inherit bold)))
`(comint-highlight-input ((,class :inherit bold)))
`(comint-highlight-prompt ((,class :inherit modus-themes-prompt)))
+ `(confusingly-reordered ((,class :inherit modus-themes-lang-error)))
`(error ((,class :inherit bold :foreground ,red)))
`(escape-glyph ((,class :foreground ,fg-escape-char-construct)))
- `(file-name-shadow ((,class :foreground ,fg-unfocused)))
+ `(file-name-shadow ((,class :inherit (shadow italic))))
`(header-line ((,class ,@(modus-themes--variable-pitch-ui)
:background ,bg-header :foreground ,fg-header)))
`(header-line-highlight ((,class :inherit modus-themes-active-blue)))
`(help-argument-name ((,class :inherit modus-themes-slant :foreground ,cyan)))
- `(help-key-binding ((,class :box (:line-width (1 . -1) :color ,bg-region) ; NOTE: box syntax is for Emacs28
- :background ,bg-inactive)))
+ `(help-key-binding ((,class :box (:line-width (-1 . -1) :color ,bg-active) ; NOTE: box syntax is for Emacs28
+ :background ,bg-alt)))
`(homoglyph ((,class :foreground ,red-alt-faint)))
`(ibuffer-locked-buffer ((,class :foreground ,yellow-alt-other-faint)))
`(italic ((,class :slant italic)))
@@ -4316,7 +4450,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(widget-button-pressed ((,class :inherit widget-button :foreground ,magenta)))
`(widget-documentation ((,class :foreground ,green)))
`(widget-field ((,class :background ,bg-alt :foreground ,fg-dim)))
- `(widget-inactive ((,class :foreground ,fg-alt)))
+ `(widget-inactive ((,class :inherit shadow :background ,bg-dim)))
`(widget-single-line-field ((,class :inherit widget-field)))
;;;;; ag
`(ag-hit-face ((,class :foreground ,fg-special-cold)))
@@ -4505,7 +4639,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(bongo-marked-track ((,class :foreground ,fg-mark-alt)))
`(bongo-marked-track-line ((,class :background ,bg-mark-alt)))
`(bongo-played-track ((,class :foreground ,fg-unfocused :strike-through t)))
- `(bongo-track-length ((,class :foreground ,fg-alt)))
+ `(bongo-track-length ((,class :inherit shadow)))
`(bongo-track-title ((,class :foreground ,blue-active)))
`(bongo-unfilled-seek-bar ((,class :background ,bg-special-cold :foreground ,fg-main)))
;;;;; boon
@@ -4569,7 +4703,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
;;;;; cfrs
`(cfrs-border-color ((,class :background ,fg-window-divider-inner)))
;;;;; change-log and log-view (`vc-print-log' and `vc-print-root-log')
- `(change-log-acknowledgment ((,class :foreground ,fg-alt)))
+ `(change-log-acknowledgment ((,class :inherit shadow)))
`(change-log-conditionals ((,class :foreground ,yellow)))
`(change-log-date ((,class :foreground ,cyan)))
`(change-log-email ((,class :foreground ,cyan-alt-other)))
@@ -4609,7 +4743,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(cider-stacktrace-filter-active-face ((,class :foreground ,cyan-alt :underline t)))
`(cider-stacktrace-filter-inactive-face ((,class :foreground ,cyan-alt)))
`(cider-stacktrace-fn-face ((,class :inherit bold :foreground ,fg-main)))
- `(cider-stacktrace-ns-face ((,class :inherit italic :foreground ,fg-alt)))
+ `(cider-stacktrace-ns-face ((,class :inherit (shadow italic))))
`(cider-stacktrace-promoted-button-face ((,class :box (:line-width 3 :color ,fg-alt :style released-button) :foreground ,red)))
`(cider-stacktrace-suppressed-button-face ((,class :box (:line-width 3 :color ,fg-alt :style pressed-button)
:background ,bg-alt :foreground ,fg-alt)))
@@ -4658,6 +4792,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(company-tooltip-annotation-selection ((,class :inherit bold :foreground ,fg-main)))
`(company-tooltip-common ((,class :inherit bold :foreground ,blue-alt)))
`(company-tooltip-common-selection ((,class :foreground ,fg-main)))
+ `(company-tooltip-deprecated ((,class :inherit company-tooltip :strike-through t)))
`(company-tooltip-mouse ((,class :inherit modus-themes-intense-blue)))
`(company-tooltip-search ((,class :inherit (modus-themes-search-success-lazy bold))))
`(company-tooltip-search-selection ((,class :inherit (modus-themes-search-success bold) :underline t)))
@@ -4698,10 +4833,10 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(consult-preview-error ((,class :inherit modus-themes-intense-red)))
`(consult-preview-line ((,class :background ,bg-hl-alt-intense)))
;;;;; corfu
- `(corfu-background ((,class :background ,bg-alt)))
`(corfu-current ((,class :inherit bold :background ,cyan-subtle-bg)))
`(corfu-bar ((,class :background ,fg-alt)))
`(corfu-border ((,class :background ,bg-active)))
+ `(corfu-default ((,class :background ,bg-alt)))
;;;;; counsel
`(counsel-active-mode ((,class :foreground ,magenta-alt-other)))
`(counsel-application-name ((,class :foreground ,red-alt-other)))
@@ -4758,7 +4893,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(custom-comment ((,class :inherit shadow)))
`(custom-comment-tag ((,class :background ,bg-alt :foreground ,yellow-alt-other)))
`(custom-face-tag ((,class :inherit bold :foreground ,blue-intense)))
- `(custom-group-tag ((,class :inherit bold :foreground ,green-intense)))
+ `(custom-group-tag ((,class :inherit modus-themes-pseudo-header :foreground ,magenta-alt)))
`(custom-group-tag-1 ((,class :inherit modus-themes-special-warm)))
`(custom-invalid ((,class :inherit (modus-themes-intense-red bold))))
`(custom-modified ((,class :inherit modus-themes-subtle-cyan)))
@@ -4814,7 +4949,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(deft-filter-string-face ((,class :foreground ,green-intense)))
`(deft-header-face ((,class :inherit bold :foreground ,fg-special-warm)))
`(deft-separator-face ((,class :inherit shadow)))
- `(deft-summary-face ((,class :inherit modus-themes-slant :foreground ,fg-alt)))
+ `(deft-summary-face ((,class :inherit (shadow modus-themes-slant))))
`(deft-time-face ((,class :foreground ,fg-special-cold)))
`(deft-title-face ((,class :inherit bold :foreground ,fg-main)))
;;;;; dictionary
@@ -4862,7 +4997,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(dir-treeview-audio-icon-face ((,class :inherit dir-treeview-default-icon-face :foreground ,magenta-alt)))
`(dir-treeview-control-face ((,class :inherit shadow)))
`(dir-treeview-control-mouse-face ((,class :inherit highlight)))
- `(dir-treeview-default-icon-face ((,class :inherit bold :family "Font Awesome" :foreground ,fg-alt)))
+ `(dir-treeview-default-icon-face ((,class :inherit (shadow bold) :family "Font Awesome")))
`(dir-treeview-default-filename-face ((,class :foreground ,fg-main)))
`(dir-treeview-directory-face ((,class :foreground ,blue)))
`(dir-treeview-directory-icon-face ((,class :inherit dir-treeview-default-icon-face :foreground ,blue-alt)))
@@ -5484,8 +5619,8 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(git-gutter-fr:modified ((,class :inherit modus-themes-fringe-yellow)))
;;;;; git-{gutter,fringe}+
`(git-gutter+-added ((,class :inherit ,@(modus-themes--diff-deuteran
- 'modus-themes-fringe-blue
- 'modus-themes-fringe-green))))
+ 'modus-themes-fringe-blue
+ 'modus-themes-fringe-green))))
`(git-gutter+-deleted ((,class :inherit modus-themes-fringe-red)))
`(git-gutter+-modified ((,class :inherit modus-themes-fringe-yellow)))
`(git-gutter+-separator ((,class :inherit modus-themes-fringe-cyan)))
@@ -5851,6 +5986,11 @@ by virtue of calling either of `modus-themes-load-operandi' and
;;;;; iflipb
`(iflipb-current-buffer-face ((,class :inherit bold :foreground ,cyan-alt)))
`(iflipb-other-buffer-face ((,class :inherit shadow)))
+;;;;; image-dired
+ `(image-dired-thumb-flagged ((,class :background ,red-intense-bg)))
+ `(image-dired-thumb-mark ((,class :background ,@(modus-themes--success-deuteran
+ cyan-intense-bg
+ green-intense-bg))))
;;;;; imenu-list
`(imenu-list-entry-face-0 ((,class :foreground ,cyan)))
`(imenu-list-entry-face-1 ((,class :foreground ,blue)))
@@ -5862,7 +6002,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(imenu-list-entry-subalist-face-3 ((,class :inherit bold :foreground ,red-alt-other :underline t)))
;;;;; indium
`(indium-breakpoint-face ((,class :foreground ,red-active)))
- `(indium-frame-url-face ((,class :inherit button :foreground ,fg-alt)))
+ `(indium-frame-url-face ((,class :inherit (shadow button))))
`(indium-keyword-face ((,class :inherit font-lock-keyword-face)))
`(indium-litable-face ((,class :inherit modus-themes-slant :foreground ,fg-special-warm)))
`(indium-repl-error-face ((,class :inherit error)))
@@ -5870,8 +6010,9 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(indium-repl-stdout-face ((,class :foreground ,fg-main)))
;;;;; info
`(Info-quoted ((,class :inherit modus-themes-fixed-pitch ; the capitalization is canonical
- :background ,bg-alt :foreground ,fg-special-calm)))
- `(info-header-node ((,class :inherit bold :foreground ,fg-alt)))
+ ,@(modus-themes--markup fg-special-calm magenta-alt
+ bg-alt magenta-nuanced-bg))))
+ `(info-header-node ((,class :inherit (shadow bold))))
`(info-header-xref ((,class :foreground ,blue-active)))
`(info-index-match ((,class :inherit match)))
`(info-menu-header ((,class :inherit modus-themes-heading-3)))
@@ -5882,7 +6023,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(info-title-3 ((,class :inherit modus-themes-heading-3)))
`(info-title-4 ((,class :inherit modus-themes-heading-4)))
;;;;; info-colors
- `(info-colors-lisp-code-block ((,class :inherit fixed-pitch)))
+ `(info-colors-lisp-code-block ((,class :inherit modus-themes-fixed-pitch)))
`(info-colors-ref-item-command ((,class :inherit font-lock-function-name-face)))
`(info-colors-ref-item-constant ((,class :inherit font-lock-constant-face)))
`(info-colors-ref-item-function ((,class :inherit font-lock-function-name-face)))
@@ -6089,7 +6230,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(lsp-face-semhl-variable ((,class :foreground ,cyan)))
`(lsp-face-semhl-variable-local ((,class :foreground ,cyan)))
`(lsp-face-semhl-variable-parameter ((,class :foreground ,cyan-alt-other)))
- `(lsp-lens-face ((,class :height 0.8 :foreground ,fg-alt)))
+ `(lsp-lens-face ((,class :inherit shadow :height 0.8)))
`(lsp-lens-mouse-face ((,class :height 0.8 :foreground ,blue-alt-other :underline t)))
`(lsp-ui-doc-background ((,class :background ,bg-alt)))
`(lsp-ui-doc-header ((,class :background ,bg-header :foreground ,fg-header)))
@@ -6309,13 +6450,14 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(markdown-html-tag-name-face ((,class :inherit modus-themes-fixed-pitch
:foreground ,magenta-alt)))
`(markdown-inline-code-face ((,class :inherit modus-themes-fixed-pitch
- :background ,bg-alt :foreground ,fg-special-calm)))
+ ,@(modus-themes--markup fg-special-calm magenta-alt
+ bg-alt magenta-nuanced-bg))))
`(markdown-italic-face ((,class :inherit italic)))
`(markdown-language-info-face ((,class :inherit modus-themes-fixed-pitch
:foreground ,fg-special-cold)))
`(markdown-language-keyword-face ((,class :inherit modus-themes-fixed-pitch
- :background ,bg-alt
- :foreground ,fg-alt)))
+ ,@(modus-themes--markup fg-alt red-alt
+ bg-alt red-nuanced-bg))))
`(markdown-line-break-face ((,class :inherit modus-themes-refine-cyan :underline t)))
`(markdown-link-face ((,class :inherit button)))
`(markdown-link-title-face ((,class :inherit modus-themes-slant :foreground ,fg-special-cold)))
@@ -6349,7 +6491,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(markup-meta-face ((,class :inherit shadow)))
`(markup-meta-hide-face ((,class :foreground "gray50")))
`(markup-reference-face ((,class :foreground ,blue-alt :underline ,bg-region)))
- `(markup-replacement-face ((,class :inherit fixed-pitch :foreground ,red-alt)))
+ `(markup-replacement-face ((,class :inherit modus-themes-fixed-pitch :foreground ,red-alt)))
`(markup-secondary-text-face ((,class :height 0.9 :foreground ,cyan-alt-other)))
`(markup-small-face ((,class :inherit markup-gen-face :height 0.9)))
`(markup-strong-face ((,class :inherit markup-bold-face)))
@@ -6479,7 +6621,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(mu4e-title-face ((,class :foreground ,fg-main)))
`(mu4e-trashed-face ((,class :foreground ,red)))
`(mu4e-unread-face ((,class :inherit bold)))
- `(mu4e-url-number-face ((,class :foreground ,fg-alt)))
+ `(mu4e-url-number-face ((,class :inherit shadow)))
`(mu4e-view-body-face ((,class :foreground ,fg-main)))
`(mu4e-warning-face ((,class :inherit warning)))
;;;;; mu4e-conversation
@@ -6498,6 +6640,17 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(mc/cursor-bar-face ((,class :height 1 :background ,fg-main)))
`(mc/cursor-face ((,class :inverse-video t)))
`(mc/region-face ((,class :inherit region)))
+;;;;; nano-modeline
+ `(nano-modeline-active-primary ((,class :inherit mode-line :foreground ,fg-special-mild)))
+ `(nano-modeline-active-secondary ((,class :inherit mode-line :foreground ,fg-special-cold)))
+ `(nano-modeline-active-status-** ((,class :inherit mode-line :background ,yellow-subtle-bg)))
+ `(nano-modeline-active-status-RO ((,class :inherit mode-line :background ,red-subtle-bg)))
+ `(nano-modeline-active-status-RW ((,class :inherit mode-line :background ,cyan-subtle-bg)))
+ `(nano-modeline-inactive-primary ((,class :inherit mode-line-inactive :foreground ,fg-inactive)))
+ `(nano-modeline-inactive-secondary ((,class :inherit mode-line-inactive :foreground ,fg-inactive)))
+ `(nano-modeline-inactive-status-** ((,class :inherit mode-line-inactive :foreground ,yellow-active)))
+ `(nano-modeline-inactive-status-RO ((,class :inherit mode-line-inactive :foreground ,red-active)))
+ `(nano-modeline-inactive-status-RW ((,class :inherit mode-line-inactive :foreground ,cyan-active)))
;;;;; neotree
`(neo-banner-face ((,class :foreground ,magenta)))
`(neo-button-face ((,class :inherit button)))
@@ -6507,7 +6660,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(neo-header-face ((,class :inherit bold :foreground ,fg-main)))
`(neo-root-dir-face ((,class :inherit bold :foreground ,cyan-alt)))
`(neo-vc-added-face ((,class :foreground ,@(modus-themes--diff-deuteran blue green))))
- `(neo-vc-conflict-face ((,class :inherit bold :foreground ,red)))
+ `(neo-vc-conflict-face ((,class :inherit error)))
`(neo-vc-default-face ((,class :foreground ,fg-main)))
`(neo-vc-edited-face ((,class :foreground ,yellow)))
`(neo-vc-ignored-face ((,class :foreground ,fg-inactive)))
@@ -6601,17 +6754,20 @@ by virtue of calling either of `modus-themes-load-operandi' and
yellow-refine-bg yellow-refine-fg))))
;;;;; org
`(org-agenda-calendar-event ((,class ,@(modus-themes--agenda-event blue-alt))))
- `(org-agenda-calendar-sexp ((,class :inherit org-agenda-calendar-event)))
+ `(org-agenda-calendar-sexp ((,class ,@(modus-themes--agenda-event blue-alt t))))
`(org-agenda-clocking ((,class :inherit modus-themes-special-cold :extend t)))
`(org-agenda-column-dateline ((,class :background ,bg-alt)))
`(org-agenda-current-time ((,class :foreground ,blue-alt-other-faint)))
`(org-agenda-date ((,class ,@(modus-themes--agenda-date cyan fg-main))))
- `(org-agenda-date-today ((,class ,@(modus-themes--agenda-date blue-active fg-main
- cyan-active fg-main
- bg-active t t))))
- `(org-agenda-date-weekend ((,class ,@(modus-themes--agenda-date cyan-alt-other fg-alt
+ `(org-agenda-date-today ((,class ,@(modus-themes--agenda-date cyan fg-main
+ nil nil
+ bg-inactive t t))))
+ `(org-agenda-date-weekend ((,class ,@(modus-themes--agenda-date cyan-alt-other-faint fg-alt
cyan fg-main))))
- `(org-agenda-diary ((,class :inherit org-agenda-calendar-event)))
+ `(org-agenda-date-weekend-today ((,class ,@(modus-themes--agenda-date cyan-alt-other-faint fg-alt
+ cyan fg-main
+ bg-inactive t t))))
+ `(org-agenda-diary ((,class :inherit org-agenda-calendar-sexp)))
`(org-agenda-dimmed-todo-face ((,class :inherit shadow)))
`(org-agenda-done ((,class :foreground ,@(modus-themes--success-deuteran
blue-nuanced-fg
@@ -6622,6 +6778,8 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(org-agenda-filter-tags ((,class :inherit bold :foreground ,cyan-active)))
`(org-agenda-restriction-lock ((,class :background ,bg-dim :foreground ,fg-dim)))
`(org-agenda-structure ((,class ,@(modus-themes--agenda-structure blue-alt))))
+ `(org-agenda-structure-filter ((,class :inherit org-agenda-structure :foreground ,yellow)))
+ `(org-agenda-structure-secondary ((,class :foreground ,cyan)))
`(org-archived ((,class :background ,bg-alt :foreground ,fg-alt)))
`(org-block ((,class :inherit modus-themes-fixed-pitch
,@(modus-themes--org-block bg-dim fg-main))))
@@ -6636,23 +6794,24 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(org-checkbox-statistics-todo ((,class :inherit org-todo)))
`(org-clock-overlay ((,class :inherit modus-themes-special-cold)))
`(org-code ((,class :inherit modus-themes-fixed-pitch
- :background ,bg-alt :foreground ,fg-special-mild
+ ,@(modus-themes--markup fg-special-mild green-alt-other
+ bg-alt green-nuanced-bg)
:extend t)))
`(org-column ((,class :background ,bg-alt)))
`(org-column-title ((,class :inherit bold :underline t :background ,bg-alt)))
- `(org-date ((,class :inherit ,(if modus-themes-no-mixed-fonts
- 'button
- '(button fixed-pitch))
+ `(org-date ((,class :inherit ,(if modus-themes-mixed-fonts
+ '(button fixed-pitch)
+ 'button)
,@(modus-themes--link-color
cyan cyan-faint))))
`(org-date-selected ((,class :inherit bold :foreground ,blue-alt :inverse-video t)))
`(org-dispatcher-highlight ((,class :inherit (bold modus-themes-mark-alt))))
`(org-document-info ((,class :foreground ,fg-special-cold)))
- `(org-document-info-keyword ((,class :inherit modus-themes-fixed-pitch :foreground ,fg-alt)))
+ `(org-document-info-keyword ((,class :inherit (shadow modus-themes-fixed-pitch))))
`(org-document-title ((,class :inherit (bold modus-themes-variable-pitch) :foreground ,fg-special-cold
,@(modus-themes--scale modus-themes-scale-title))))
`(org-done ((,class :foreground ,@(modus-themes--success-deuteran blue green))))
- `(org-drawer ((,class :inherit modus-themes-fixed-pitch :foreground ,fg-alt)))
+ `(org-drawer ((,class :inherit (shadow modus-themes-fixed-pitch))))
`(org-ellipsis (())) ; inherits from the heading's color
`(org-footnote ((,class :inherit button
,@(modus-themes--link-color
@@ -6701,6 +6860,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(org-headline-todo ((,class :inherit modus-themes-variable-pitch :foreground ,red-nuanced-fg)))
`(org-hide ((,class :foreground ,bg-main)))
`(org-indent ((,class :inherit (fixed-pitch org-hide))))
+ `(org-imminent-deadline ((,class :foreground ,red-intense)))
`(org-latex-and-related ((,class :foreground ,magenta-refine-fg)))
`(org-level-1 ((,class :inherit modus-themes-heading-1)))
`(org-level-2 ((,class :inherit modus-themes-heading-2)))
@@ -6713,8 +6873,9 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(org-link ((,class :inherit button)))
`(org-list-dt ((,class :inherit bold)))
`(org-macro ((,class :inherit modus-themes-fixed-pitch
- :background ,cyan-nuanced-bg :foreground ,cyan-nuanced-fg)))
- `(org-meta-line ((,class :inherit modus-themes-fixed-pitch :foreground ,fg-alt)))
+ ,@(modus-themes--markup cyan-nuanced-fg cyan
+ cyan-nuanced-bg cyan-nuanced-bg))))
+ `(org-meta-line ((,class :inherit (shadow modus-themes-fixed-pitch))))
`(org-mode-line-clock ((,class :foreground ,fg-main)))
`(org-mode-line-clock-overrun ((,class :inherit bold :foreground ,red-active)))
`(org-priority ((,class :foreground ,magenta)))
@@ -6724,18 +6885,19 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(org-scheduled-previously ((,class ,@(modus-themes--agenda-scheduled yellow fg-special-warm yellow-alt-other))))
`(org-scheduled-today ((,class ,@(modus-themes--agenda-scheduled yellow fg-special-warm magenta-alt-other))))
`(org-sexp-date ((,class :inherit org-date)))
- `(org-special-keyword ((,class :inherit modus-themes-fixed-pitch :foreground ,fg-alt)))
+ `(org-special-keyword ((,class :inherit (shadow modus-themes-fixed-pitch))))
`(org-table ((,class :inherit modus-themes-fixed-pitch :foreground ,fg-special-cold)))
`(org-table-header ((,class :inherit (fixed-pitch modus-themes-intense-neutral))))
`(org-tag ((,class :foreground ,magenta-nuanced-fg)))
`(org-tag-group ((,class :inherit bold :foreground ,cyan-nuanced-fg)))
`(org-target ((,class :underline t)))
- `(org-time-grid ((,class :foreground ,fg-unfocused)))
+ `(org-time-grid ((,class :inherit shadow)))
`(org-todo ((,class :foreground ,red)))
`(org-upcoming-deadline ((,class :foreground ,red-alt-other)))
`(org-upcoming-distant-deadline ((,class :foreground ,red-faint)))
`(org-verbatim ((,class :inherit modus-themes-fixed-pitch
- :background ,bg-alt :foreground ,fg-special-calm)))
+ ,@(modus-themes--markup fg-special-calm magenta-alt
+ bg-alt magenta-nuanced-bg))))
`(org-verse ((,class :inherit org-quote)))
`(org-warning ((,class :inherit bold :foreground ,red-alt-other)))
;;;;; org-journal
@@ -6764,7 +6926,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(org-roam-link-shielded ((,class :inherit button
,@(modus-themes--link-color
yellow yellow-faint))))
- `(org-roam-tag ((,class :inherit italic :foreground ,fg-alt)))
+ `(org-roam-tag ((,class :inherit (shadow italic))))
;;;;; org-superstar
`(org-superstar-item ((,class :foreground ,fg-main)))
`(org-superstar-leading ((,class :foreground ,fg-whitespace)))
@@ -6863,7 +7025,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
;;;;; pomidor
`(pomidor-break-face ((,class :foreground ,blue-alt-other)))
`(pomidor-overwork-face ((,class :foreground ,red-alt-other)))
- `(pomidor-skip-face ((,class :inherit modus-themes-slant :foreground ,fg-alt)))
+ `(pomidor-skip-face ((,class :inherit (shadow modus-themes-slant))))
`(pomidor-work-face ((,class :foreground ,@(modus-themes--success-deuteran
blue-alt
green-alt-other))))
@@ -6914,7 +7076,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
:foreground ,green)))
`(racket-here-string-face ((,class :foreground ,blue-alt)))
`(racket-keyword-argument-face ((,class :foreground ,red-alt)))
- `(racket-logger-config-face ((,class :inherit modus-themes-slant :foreground ,fg-alt)))
+ `(racket-logger-config-face ((,class :inherit (shadow modus-themes-slant))))
`(racket-logger-debug-face ((,class :foreground ,blue-alt-other)))
`(racket-logger-info-face ((,class :foreground ,fg-lang-note)))
`(racket-logger-topic-face ((,class :inherit modus-themes-slant :foreground ,magenta)))
@@ -7208,7 +7370,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(spray-base-face ((,class :inherit default :foreground ,fg-special-cold)))
;;;;; stripes
`(stripes ((,class :background ,bg-alt)))
-;;;;; success
+;;;;; suggest
`(suggest-heading ((,class :inherit bold :foreground ,yellow-alt-other)))
;;;;; switch-window
`(switch-window-background ((,class :background ,bg-dim)))
@@ -7255,7 +7417,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(sx-question-mode-score-downvoted ((,class :foreground ,yellow)))
`(sx-question-mode-score-upvoted ((,class :inherit bold :foreground ,magenta)))
`(sx-question-mode-title ((,class :inherit bold :foreground ,fg-main)))
- `(sx-question-mode-title-comments ((,class :inherit bold :foreground ,fg-alt)))
+ `(sx-question-mode-title-comments ((,class :inherit (shadow bold))))
`(sx-tag ((,class :foreground ,magenta-alt)))
`(sx-user-name ((,class :foreground ,blue-alt)))
`(sx-user-reputation ((,class :inherit shadow)))
@@ -7318,9 +7480,9 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(telega-button-active ((,class :box ,blue-intense-bg :background ,blue-intense-bg :foreground ,fg-main)))
`(telega-button-highlight ((,class :inherit modus-themes-subtle-magenta)))
`(telega-chat-prompt ((,class :inherit bold)))
- `(telega-entity-type-code ((,class :inherit fixed-pitch)))
+ `(telega-entity-type-code ((,class :inherit modus-themes-fixed-pitch)))
`(telega-entity-type-mention ((,class :foreground ,cyan)))
- `(telega-entity-type-pre ((,class :inherit fixed-pitch)))
+ `(telega-entity-type-pre ((,class :inherit modus-themes-fixed-pitch)))
`(telega-msg-heading ((,class :background ,bg-alt)))
`(telega-msg-self-title ((,class :inherit bold)))
`(telega-root-heading ((,class :inherit modus-themes-subtle-neutral)))
@@ -7329,9 +7491,9 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(telega-user-online-status ((,class :foreground ,cyan-active)))
`(telega-username ((,class :foreground ,cyan-alt-other)))
`(telega-webpage-chat-link ((,class :background ,bg-alt)))
- `(telega-webpage-fixed ((,class :inherit fixed-pitch :height 0.85)))
+ `(telega-webpage-fixed ((,class :inherit modus-themes-fixed-pitch :height 0.85)))
`(telega-webpage-header ((,class :inherit modus-themes-variable-pitch :height 1.3)))
- `(telega-webpage-preformatted ((,class :inherit fixed-pitch :background ,bg-alt)))
+ `(telega-webpage-preformatted ((,class :inherit modus-themes-fixed-pitch :background ,bg-alt)))
`(telega-webpage-subheader ((,class :inherit modus-themes-variable-pitch :height 1.15)))
;;;;; telephone-line
`(telephone-line-accent-active ((,class :background ,fg-inactive :foreground ,bg-inactive)))
@@ -7383,10 +7545,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(transient-heading ((,class :inherit bold :foreground ,fg-main)))
`(transient-inactive-argument ((,class :inherit shadow)))
`(transient-inactive-value ((,class :inherit shadow)))
- ;; FIXME 2021-08-28: using `modus-themes-key-binding' leads to
- ;; misalignments because of the added box property.
- ;; `(transient-key ((,class :inherit modus-themes-key-binding)))
- `(transient-key ((,class :inherit bold :foreground ,blue-alt-other)))
+ `(transient-key ((,class :inherit modus-themes-key-binding)))
`(transient-mismatched-key ((,class :underline t)))
`(transient-nonstandard-key ((,class :underline t)))
`(transient-pink ((,class :inherit bold :foreground ,magenta-alt-faint)))
@@ -7473,10 +7632,10 @@ by virtue of calling either of `modus-themes-load-operandi' and
`(vc-dir-header-value ((,class :foreground ,magenta-alt-other)))
`(vc-dir-mark-indicator ((,class :foreground ,blue-alt-other)))
`(vc-dir-status-edited ((,class :foreground ,yellow)))
- `(vc-dir-status-ignored ((,class :foreground ,fg-unfocused)))
+ `(vc-dir-status-ignored ((,class :inherit shadow)))
`(vc-dir-status-up-to-date ((,class :foreground ,cyan)))
- `(vc-dir-status-warning ((,class :foreground ,red)))
- `(vc-conflict-state ((,class :inherit modus-themes-slant :foreground ,red-active)))
+ `(vc-dir-status-warning ((,class :inherit error)))
+ `(vc-conflict-state ((,class :inherit bold :foreground ,red-active)))
`(vc-edited-state ((,class :foreground ,yellow-active)))
`(vc-locally-added-state ((,class :foreground ,cyan-active)))
`(vc-locked-state ((,class :foreground ,blue-active)))
@@ -7498,6 +7657,9 @@ by virtue of calling either of `modus-themes-load-operandi' and
:background ,@(pcase modus-themes-completions
('opinionated (list bg-active))
(_ (list bg-inactive))))))
+;;;;; vertico-quick
+ `(vertico-quick1 ((,class :inherit (modus-themes-intense-magenta bold))))
+ `(vertico-quick2 ((,class :inherit (modus-themes-refine-cyan bold))))
;;;;; vimish-fold
`(vimish-fold-fringe ((,class :foreground ,cyan-active)))
`(vimish-fold-mouse-face ((,class :inherit modus-themes-intense-blue)))
diff --git a/etc/themes/modus-vivendi-theme.el b/etc/themes/modus-vivendi-theme.el
index 919009278b1..6dffbf07e94 100644
--- a/etc/themes/modus-vivendi-theme.el
+++ b/etc/themes/modus-vivendi-theme.el
@@ -4,8 +4,8 @@
;; Author: Protesilaos Stavrou
;; URL: https://gitlab.com/protesilaos/modus-themes
-;; Version: 1.6.0
-;; Package-Requires: ((emacs "26.1"))
+;; Version: 1.7.0
+;; Package-Requires: ((emacs "27.1"))
;; Keywords: faces, theme, accessibility
;; This file is part of GNU Emacs.
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index e6cda733679..d062e78366f 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -27,7 +27,9 @@ EMACSOPT = -batch --no-site-file --no-site-lisp
# ==================== Things 'configure' will edit ====================
CC=@CC@
+CXX=@CXX@
CFLAGS=@CFLAGS@
+CXXFLAGS=@CXXFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
@@ -130,6 +132,11 @@ MKDIR_P = @MKDIR_P@
# ========================== Lists of Files ===========================
+## Haiku build-time support
+HAVE_BE_APP=@HAVE_BE_APP@
+HAIKU_LIBS=@HAIKU_LIBS@
+HAIKU_CFLAGS=@HAIKU_CFLAGS@
+
# emacsclientw.exe for MinGW, empty otherwise
CLIENTW = @CLIENTW@
@@ -143,7 +150,11 @@ UTILITIES = hexl${EXEEXT} \
$(if $(with_mailutils), , movemail${EXEEXT}) \
$(and $(use_gamedir), update-game-score${EXEEXT})
+ifeq ($(HAVE_BE_APP),yes)
+DONT_INSTALL= make-docfile${EXEEXT} make-fingerprint${EXEEXT} be-resources
+else
DONT_INSTALL= make-docfile${EXEEXT} make-fingerprint${EXEEXT}
+endif
# Like UTILITIES, but they're not system-dependent, and should not be
# deleted by the distclean target.
@@ -230,6 +241,10 @@ WINDRES = @WINDRES@
## Some systems define this to request special libraries.
LIBS_SYSTEM = @LIBS_SYSTEM@
+# Flags that could be in WARN_CFLAGS, but are invalid for C++.
+NON_CXX_CFLAGS = -Wmissing-prototypes -Wnested-externs -Wold-style-definition \
+ -Wstrict-prototypes -Wno-override-init
+
BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
-I. -I../src -I../lib \
@@ -238,6 +253,9 @@ BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS}
+ALL_CXXFLAGS = $(filter-out ${NON_CXX_CFLAGS},${BASE_CFLAGS}) \
+ ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} ${CXXFLAGS} ${HAIKU_CFLAGS}
+
# Configuration files for .o files to depend on.
config_h = ../src/config.h $(srcdir)/../src/conf_post.h
@@ -407,6 +425,9 @@ emacsclientw${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(CLIENTRES) $(config_h)
$(LOADLIBES) \
$(LIB_WSOCK32) $(LIB_EACCESS) $(LIBS_ECLIENT) -o $@
+be-resources: ${srcdir}/be_resources.cc ${config_h}
+ $(AM_V_CXXLD)$(CXX) ${ALL_CXXFLAGS} ${HAIKU_LIBS} $< -o $@
+
NTINC = ${srcdir}/../nt/inc
NTDEPS = $(NTINC)/ms-w32.h $(NTINC)/sys/stat.h $(NTINC)/inttypes.h \
$(NTINC)/stdint.h $(NTINC)/pwd.h $(NTINC)/sys/time.h $(NTINC)/stdbool.h \
diff --git a/lib-src/be_resources.cc b/lib-src/be_resources.cc
new file mode 100644
index 00000000000..e6a14f037b6
--- /dev/null
+++ b/lib-src/be_resources.cc
@@ -0,0 +1,144 @@
+/* Haiku window system support
+ Copyright (C) 2021 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs. If not, see . */
+
+#include
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+using namespace std;
+
+static void
+be_perror (status_t code, char *arg)
+{
+ if (code != B_OK)
+ {
+ switch (code)
+ {
+ case B_BAD_VALUE:
+ fprintf (stderr, "%s: Bad value\n", arg);
+ break;
+ case B_ENTRY_NOT_FOUND:
+ fprintf (stderr, "%s: Not found\n", arg);
+ break;
+ case B_PERMISSION_DENIED:
+ fprintf (stderr, "%s: Permission denied\n", arg);
+ break;
+ case B_NO_MEMORY:
+ fprintf (stderr, "%s: No memory\n", arg);
+ break;
+ case B_LINK_LIMIT:
+ fprintf (stderr, "%s: Link limit reached\n", arg);
+ break;
+ case B_BUSY:
+ fprintf (stderr, "%s: Busy\n", arg);
+ break;
+ case B_NO_MORE_FDS:
+ fprintf (stderr, "%s: No more file descriptors\n", arg);
+ break;
+ case B_FILE_ERROR:
+ fprintf (stderr, "%s: File error\n", arg);
+ break;
+ default:
+ fprintf (stderr, "%s: Unknown error\n", arg);
+ }
+ }
+ else
+ {
+ abort ();
+ }
+}
+
+int
+main (int argc, char **argv)
+{
+ BApplication app ("application/x-vnd.GNU-emacs-resource-helper");
+ BFile file;
+ BBitmap *icon;
+ BAppFileInfo info;
+ status_t code;
+ struct version_info vinfo;
+ char *v = strdup (PACKAGE_VERSION);
+
+ if (argc != 3)
+ {
+ printf ("be-resources ICON FILE: make FILE appropriate for Emacs.\n");
+ return EXIT_FAILURE;
+ }
+
+ code = file.SetTo (argv[2], B_READ_WRITE);
+ if (code != B_OK)
+ {
+ be_perror (code, argv[2]);
+ return EXIT_FAILURE;
+ }
+ code = info.SetTo (&file);
+ if (code != B_OK)
+ {
+ be_perror (code, argv[2]);
+ return EXIT_FAILURE;
+ }
+ code = info.SetAppFlags (B_EXCLUSIVE_LAUNCH | B_ARGV_ONLY);
+ if (code != B_OK)
+ {
+ be_perror (code, argv[2]);
+ return EXIT_FAILURE;
+ }
+
+ icon = BTranslationUtils::GetBitmapFile (argv[1], NULL);
+
+ if (!icon)
+ {
+ be_perror (B_ERROR, argv[1]);
+ return EXIT_FAILURE;
+ }
+
+ info.SetIcon (icon, B_MINI_ICON);
+ info.SetIcon (icon, B_LARGE_ICON);
+ info.SetSignature ("application/x-vnd.GNU-emacs");
+
+ v = strtok (v, ".");
+ vinfo.major = atoi (v);
+
+ v = strtok (NULL, ".");
+ vinfo.middle = atoi (v);
+
+ v = strtok (NULL, ".");
+ vinfo.minor = v ? atoi (v) : 0;
+
+ vinfo.variety = 0;
+ vinfo.internal = 0;
+
+ strncpy ((char *) &vinfo.short_info, PACKAGE_VERSION,
+ sizeof vinfo.short_info - 1);
+ strncpy ((char *) &vinfo.long_info, PACKAGE_STRING,
+ sizeof vinfo.long_info - 1);
+
+ info.SetVersionInfo (&vinfo, B_APP_VERSION_KIND);
+
+ return EXIT_SUCCESS;
+}
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 1f3e72f81db..bdf228aeaa9 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -603,6 +603,8 @@ decode_options (int argc, char **argv)
alt_display = "ns";
#elif defined (HAVE_NTGUI)
alt_display = "w32";
+#elif defined (HAVE_HAIKU)
+ alt_display = "be";
#endif
#ifdef HAVE_PGTK
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index d3daf637cc6..386aff16270 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -403,7 +403,7 @@ argument."
(defun expand-region-abbrevs (start end &optional noquery)
"For abbrev occurrence in the region, offer to expand it.
-The user is asked to type `y' or `n' for each occurrence.
+The user is asked to type \\`y' or \\`n' for each occurrence.
A prefix argument means don't query; expand all abbrevs."
(interactive "r\nP")
(save-excursion
diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el
index 2e51264ec39..c962cbd4780 100644
--- a/lisp/ansi-color.el
+++ b/lisp/ansi-color.el
@@ -91,7 +91,7 @@ as a PDF file."
:group 'processes)
(defface ansi-color-bold
- '((t :inherit 'bold))
+ '((t :inherit bold))
"Face used to render bold text."
:group 'ansi-colors
:version "28.1")
@@ -103,13 +103,13 @@ as a PDF file."
:version "28.1")
(defface ansi-color-italic
- '((t :inherit 'italic))
+ '((t :inherit italic))
"Face used to render italic text."
:group 'ansi-colors
:version "28.1")
(defface ansi-color-underline
- '((t :inherit 'underline))
+ '((t :inherit underline))
"Face used to render underlined text."
:group 'ansi-colors
:version "28.1")
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 121e484a0ee..e28b06a1dcd 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -501,8 +501,9 @@ mouse-1: Display Line and Column Mode Menu"))
(defvar mode-line-position
`((:propertize
- mode-line-percent-position
+ (" " mode-line-percent-position)
local-map ,mode-line-column-line-number-mode-map
+ display (min-width (5.0))
mouse-face mode-line-highlight
;; XXX needs better description
help-echo "Window Scroll Percentage
@@ -521,26 +522,31 @@ mouse-1: Display Line and Column Mode Menu")))
(10
(:propertize
mode-line-position-column-line-format
+ display (min-width (10.0))
,@mode-line-position--column-line-properties))
(10
(:propertize
(:eval (string-replace
"%c" "%C" (car mode-line-position-column-line-format)))
+ display (min-width (10.0))
,@mode-line-position--column-line-properties)))
(6
(:propertize
mode-line-position-line-format
+ display (min-width (6.0))
,@mode-line-position--column-line-properties))))
(column-number-mode
(column-number-indicator-zero-based
(6
(:propertize
mode-line-position-column-format
+ display (min-width (6.0))
(,@mode-line-position--column-line-properties)))
(6
(:propertize
(:eval (string-replace
"%c" "%C" (car mode-line-position-column-format)))
+ display (min-width (6.0))
,@mode-line-position--column-line-properties))))))
"Mode line construct for displaying the position in the buffer.
Normally displays the buffer percentage and, optionally, the
@@ -597,10 +603,14 @@ By default, this shows the information specified by `global-mode-string'.")
(let ((standard-mode-line-format
(list "%e"
'mode-line-front-space
- 'mode-line-mule-info
- 'mode-line-client
- 'mode-line-modified
- 'mode-line-remote
+ (list
+ :propertize
+ (list ""
+ 'mode-line-mule-info
+ 'mode-line-client
+ 'mode-line-modified
+ 'mode-line-remote)
+ 'display '(min-width (5.0)))
'mode-line-frame-identification
'mode-line-buffer-identification
" "
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index a4c28e751ca..a8fa9ae7749 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -214,31 +214,28 @@ A non-nil value may result in truncated bookmark names."
;;;###autoload (define-key ctl-x-r-map "l" 'bookmark-bmenu-list)
;;;###autoload
-(defvar bookmark-map
- (let ((map (make-sparse-keymap)))
- ;; Read the help on all of these functions for details...
- (define-key map "x" 'bookmark-set)
- (define-key map "m" 'bookmark-set) ;"m"ark
- (define-key map "M" 'bookmark-set-no-overwrite) ;"M"aybe mark
- (define-key map "j" 'bookmark-jump)
- (define-key map "g" 'bookmark-jump) ;"g"o
- (define-key map "o" 'bookmark-jump-other-window)
- (define-key map "5" 'bookmark-jump-other-frame)
- (define-key map "i" 'bookmark-insert)
- (define-key map "e" 'edit-bookmarks)
- (define-key map "f" 'bookmark-insert-location) ;"f"ind
- (define-key map "r" 'bookmark-rename)
- (define-key map "d" 'bookmark-delete)
- (define-key map "D" 'bookmark-delete-all)
- (define-key map "l" 'bookmark-load)
- (define-key map "w" 'bookmark-write)
- (define-key map "s" 'bookmark-save)
- map)
- "Keymap containing bindings to bookmark functions.
+(defvar-keymap bookmark-map
+ :doc "Keymap containing bindings to bookmark functions.
It is not bound to any key by default: to bind it
so that you have a bookmark prefix, just use `global-set-key' and bind a
key of your choice to variable `bookmark-map'. All interactive bookmark
-functions have a binding in this keymap.")
+functions have a binding in this keymap."
+ "x" #'bookmark-set
+ "m" #'bookmark-set ;"m"ark
+ "M" #'bookmark-set-no-overwrite ;"M"aybe mark
+ "j" #'bookmark-jump
+ "g" #'bookmark-jump ;"g"o
+ "o" #'bookmark-jump-other-window
+ "5" #'bookmark-jump-other-frame
+ "i" #'bookmark-insert
+ "e" #'edit-bookmarks
+ "f" #'bookmark-insert-location ;"f"ind
+ "r" #'bookmark-rename
+ "d" #'bookmark-delete
+ "D" #'bookmark-delete-all
+ "l" #'bookmark-load
+ "w" #'bookmark-write
+ "s" #'bookmark-save)
;;;###autoload (fset 'bookmark-map bookmark-map)
@@ -479,7 +476,10 @@ See user option `bookmark-set-fringe'."
(dolist (buf (buffer-list))
(with-current-buffer buf
(when (equal filename buffer-file-name)
- (setq overlays (overlays-in pos (1+ pos)))
+ (setq overlays
+ (save-excursion
+ (goto-char pos)
+ (overlays-in (point-at-bol) (1+ (point-at-bol)))))
(while (and (not found) (setq temp (pop overlays)))
(when (eq 'bookmark (overlay-get temp 'category))
(delete-overlay (setq found temp))))))))))
@@ -810,11 +810,9 @@ CODING is the symbol of the coding-system in which the file is encoded."
(define-obsolete-function-alias 'bookmark-maybe-message 'message "27.1")
-(defvar bookmark-minibuffer-read-name-map
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map minibuffer-local-map)
- (define-key map "\C-w" 'bookmark-yank-word)
- map))
+(defvar-keymap bookmark-minibuffer-read-name-map
+ :parent minibuffer-local-map
+ "C-w" #'bookmark-yank-word)
(defun bookmark-set-internal (prompt name overwrite-or-push)
"Set a bookmark using specified NAME or prompting with PROMPT.
@@ -918,7 +916,7 @@ it removes only the first instance of a bookmark with that name from
the list of bookmarks.)"
(interactive (list nil current-prefix-arg))
(let ((prompt
- (if no-overwrite "Set bookmark" "Set bookmark unconditionally")))
+ (if no-overwrite "Append bookmark named" "Set bookmark named")))
(bookmark-set-internal prompt name (if no-overwrite 'push 'overwrite))))
;;;###autoload
@@ -989,12 +987,10 @@ annotations."
"Function to return default text to use for a bookmark annotation.
It takes one argument, the name of the bookmark, as a string.")
-(defvar bookmark-edit-annotation-mode-map
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map text-mode-map)
- (define-key map "\C-c\C-c" 'bookmark-send-edited-annotation)
- map)
- "Keymap for editing an annotation of a bookmark.")
+(defvar-keymap bookmark-edit-annotation-mode-map
+ :doc "Keymap for editing an annotation of a bookmark."
+ :parent text-mode-map
+ "C-c C-c" #'bookmark-send-edited-annotation)
(defun bookmark-insert-annotation (bookmark-name-or-record)
"Insert annotation for BOOKMARK-NAME-OR-RECORD at point."
@@ -1697,44 +1693,42 @@ unique numeric suffixes \"<2>\", \"<3>\", etc."
(defvar bookmark-bmenu-hidden-bookmarks ())
-
-(defvar bookmark-bmenu-mode-map
- (let ((map (make-keymap)))
- (set-keymap-parent map tabulated-list-mode-map)
- (define-key map "v" 'bookmark-bmenu-select)
- (define-key map "w" 'bookmark-bmenu-locate)
- (define-key map "5" 'bookmark-bmenu-other-frame)
- (define-key map "2" 'bookmark-bmenu-2-window)
- (define-key map "1" 'bookmark-bmenu-1-window)
- (define-key map "j" 'bookmark-bmenu-this-window)
- (define-key map "\C-c\C-c" 'bookmark-bmenu-this-window)
- (define-key map "f" 'bookmark-bmenu-this-window)
- (define-key map "\C-m" 'bookmark-bmenu-this-window)
- (define-key map "o" 'bookmark-bmenu-other-window)
- (define-key map "\C-o" 'bookmark-bmenu-switch-other-window)
- (define-key map "s" 'bookmark-bmenu-save)
- (define-key map "\C-x\C-s" 'bookmark-bmenu-save)
- (define-key map "k" 'bookmark-bmenu-delete)
- (define-key map "\C-d" 'bookmark-bmenu-delete-backwards)
- (define-key map "x" 'bookmark-bmenu-execute-deletions)
- (define-key map "d" 'bookmark-bmenu-delete)
- (define-key map "D" 'bookmark-bmenu-delete-all)
- (define-key map " " 'next-line)
- (define-key map "\177" 'bookmark-bmenu-backup-unmark)
- (define-key map "u" 'bookmark-bmenu-unmark)
- (define-key map "U" 'bookmark-bmenu-unmark-all)
- (define-key map "m" 'bookmark-bmenu-mark)
- (define-key map "M" 'bookmark-bmenu-mark-all)
- (define-key map "l" 'bookmark-bmenu-load)
- (define-key map "r" 'bookmark-bmenu-rename)
- (define-key map "R" 'bookmark-bmenu-relocate)
- (define-key map "t" 'bookmark-bmenu-toggle-filenames)
- (define-key map "a" 'bookmark-bmenu-show-annotation)
- (define-key map "A" 'bookmark-bmenu-show-all-annotations)
- (define-key map "e" 'bookmark-bmenu-edit-annotation)
- (define-key map "/" 'bookmark-bmenu-search)
- (define-key map [mouse-2] 'bookmark-bmenu-other-window-with-mouse)
- map))
+(defvar-keymap bookmark-bmenu-mode-map
+ :doc "Keymap for `bookmark-bmenu-mode'."
+ :parent tabulated-list-mode-map
+ "v" #'bookmark-bmenu-select
+ "w" #'bookmark-bmenu-locate
+ "5" #'bookmark-bmenu-other-frame
+ "2" #'bookmark-bmenu-2-window
+ "1" #'bookmark-bmenu-1-window
+ "j" #'bookmark-bmenu-this-window
+ "C-c C-c" #'bookmark-bmenu-this-window
+ "f" #'bookmark-bmenu-this-window
+ "C-m" #'bookmark-bmenu-this-window
+ "o" #'bookmark-bmenu-other-window
+ "C-o" #'bookmark-bmenu-switch-other-window
+ "s" #'bookmark-bmenu-save
+ "C-x C-s" #'bookmark-bmenu-save
+ "k" #'bookmark-bmenu-delete
+ "C-d" #'bookmark-bmenu-delete-backwards
+ "x" #'bookmark-bmenu-execute-deletions
+ "d" #'bookmark-bmenu-delete
+ "D" #'bookmark-bmenu-delete-all
+ "SPC" #'next-line
+ "DEL" #'bookmark-bmenu-backup-unmark
+ "u" #'bookmark-bmenu-unmark
+ "U" #'bookmark-bmenu-unmark-all
+ "m" #'bookmark-bmenu-mark
+ "M" #'bookmark-bmenu-mark-all
+ "l" #'bookmark-bmenu-load
+ "r" #'bookmark-bmenu-rename
+ "R" #'bookmark-bmenu-relocate
+ "t" #'bookmark-bmenu-toggle-filenames
+ "a" #'bookmark-bmenu-show-annotation
+ "A" #'bookmark-bmenu-show-all-annotations
+ "e" #'bookmark-bmenu-edit-annotation
+ "/" #'bookmark-bmenu-search
+ "" #'bookmark-bmenu-other-window-with-mouse)
(easy-menu-define bookmark-menu bookmark-bmenu-mode-map
"Menu for `bookmark-bmenu'."
diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el
index 7891e35c40f..b6ee124a72f 100644
--- a/lisp/calc/calc-graph.el
+++ b/lisp/calc/calc-graph.el
@@ -969,7 +969,8 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
(define-key calc-dumb-map "\C-c\C-c" 'exit-recursive-edit)))
(use-local-map calc-dumb-map)
(setq truncate-lines t)
- (message "Type `q' or `C-c C-c' to return to Calc")
+ (message (substitute-command-keys
+ "Type \\`q' or \\`C-c C-c' to return to Calc"))
(recursive-edit)
(bury-buffer "*Gnuplot Trail*")))
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el
index 8481d0b5e9d..2633d64fe42 100644
--- a/lisp/calc/calc-help.el
+++ b/lisp/calc/calc-help.el
@@ -50,25 +50,25 @@
(beep))))
(defun calc-help-for-help (arg)
- "You have typed `h', the Calc help character. Type a Help option:
+ "You have typed \\`h', the Calc help character. Type a Help option:
-B calc-describe-bindings. Display a table of all key bindings.
-H calc-full-help. Display all `?' key messages at once.
+\\`B' calc-describe-bindings. Display a table of all key bindings.
+\\`H' calc-full-help. Display all \\`?' key messages at once.
-I calc-info. Read the Calc manual using the Info system.
-T calc-tutorial. Read the Calc tutorial using the Info system.
-S calc-info-summary. Read the Calc summary using the Info system.
+\\`I' calc-info. Read the Calc manual using the Info system.
+\\`T' calc-tutorial. Read the Calc tutorial using the Info system.
+\\`S' calc-info-summary. Read the Calc summary using the Info system.
-C calc-describe-key-briefly. Look up the command name for a given key.
-K calc-describe-key. Look up a key's documentation in the manual.
-F calc-describe-function. Look up a function's documentation in the manual.
-V calc-describe-variable. Look up a variable's documentation in the manual.
+\\`C' calc-describe-key-briefly. Look up the command name for a given key.
+\\`K' calc-describe-key. Look up a key's documentation in the manual.
+\\`F' calc-describe-function. Look up a function's documentation in the manual.
+\\`V' calc-describe-variable. Look up a variable's documentation in the manual.
-N calc-view-news. Display Calc history of changes.
+\\`N' calc-view-news. Display Calc history of changes.
-C-c Describe conditions for copying Calc.
-C-d Describe how you can get a new copy of Calc or report a bug.
-C-w Describe how there is no warranty for Calc."
+\\`C-c' Describe conditions for copying Calc.
+\\`C-d' Describe how you can get a new copy of Calc or report a bug.
+\\`C-w' Describe how there is no warranty for Calc."
(interactive "P")
(if calc-dispatch-help
(let (key)
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index c8394e8c2fa..1c4438e7f7a 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -216,26 +216,28 @@ Calc user interface as before (either C-x * C or C-x * K; initially C-x * C)."
(defun calc-help ()
(interactive)
(let ((msgs
- '("Press `h' for complete help; press `?' repeatedly for a summary"
- "Letter keys: Negate; Precision; Yank; Why; Xtended cmd; Quit"
- "Letter keys: SHIFT + Undo, reDo; Inverse, Hyperbolic, Option"
- "Letter keys: SHIFT + sQrt; Sin, Cos, Tan; Exp, Ln, logB"
- "Letter keys: SHIFT + Floor, Round; Abs, conJ, arG; Pi"
- "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro; Keep-args"
- "Other keys: +, -, *, /, ^, \\ (int div), : (frac div)"
- "Other keys: & (1/x), | (concat), % (modulo), ! (factorial)"
- "Other keys: \\=' (alg-entry), = (eval), \\=` (edit); M-RET (last-args)"
- "Other keys: SPC/RET (enter/dup), LFD (over); < > (scroll horiz)"
- "Other keys: DEL (drop), M-DEL (drop-above); { } (scroll vert)"
- "Other keys: TAB (swap/roll-dn), M-TAB (roll-up)"
- "Other keys: [ , ; ] (vector), ( , ) (complex), ( ; ) (polar)"
- "Prefix keys: Algebra, Binary/business, Convert, Display"
- "Prefix keys: Functions, Graphics, Help, J (select)"
- "Prefix keys: Kombinatorics/statistics, Modes, Store/recall"
- "Prefix keys: Trail/time, Units/statistics, Vector/matrix"
- "Prefix keys: Z (user), SHIFT + Z (define)"
- "Prefix keys: prefix + ? gives further help for that prefix"
- " Calc by Dave Gillespie, daveg@synaptics.com")))
+ ;; FIXME: Change these to `substitute-command-keys' syntax.
+ (mapcar #'substitute-command-keys
+ '("Press \\`h' for complete help; press \\`?' repeatedly for a summary"
+ "Letter keys: Negate; Precision; Yank; Why; Xtended cmd; Quit"
+ "Letter keys: SHIFT + Undo, reDo; Inverse, Hyperbolic, Option"
+ "Letter keys: SHIFT + sQrt; Sin, Cos, Tan; Exp, Ln, logB"
+ "Letter keys: SHIFT + Floor, Round; Abs, conJ, arG; Pi"
+ "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro; Keep-args"
+ "Other keys: +, -, *, /, ^, \\ (int div), : (frac div)"
+ "Other keys: & (1/x), | (concat), % (modulo), ! (factorial)"
+ "Other keys: \\=' (alg-entry), = (eval), \\=` (edit); M-RET (last-args)"
+ "Other keys: \\`SPC'/\\`RET' (enter/dup), LFD (over); < > (scroll horiz)"
+ "Other keys: \\`DEL' (drop), \\`M-DEL' (drop-above); { } (scroll vert)"
+ "Other keys: \\`TAB' (swap/roll-dn), \\`M-TAB' (roll-up)"
+ "Other keys: [ , ; ] (vector), ( , ) (complex), ( ; ) (polar)"
+ "Prefix keys: Algebra, Binary/business, Convert, Display"
+ "Prefix keys: Functions, Graphics, Help, J (select)"
+ "Prefix keys: Kombinatorics/statistics, Modes, Store/recall"
+ "Prefix keys: Trail/time, Units/statistics, Vector/matrix"
+ "Prefix keys: Z (user), SHIFT + Z (define)"
+ "Prefix keys: prefix + ? gives further help for that prefix"
+ " Calc by Dave Gillespie, daveg@synaptics.com"))))
(if calc-full-help-flag
msgs
(if (or calc-inverse-flag calc-hyperbolic-flag)
diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el
index 68c8b90ac3b..211b8e661fd 100644
--- a/lisp/calc/calc-mode.el
+++ b/lisp/calc/calc-mode.el
@@ -109,11 +109,14 @@
(setq n (and (not (eq calc-auto-why t)) (if calc-auto-why t 1))))
(calc-change-mode 'calc-auto-why n nil)
(cond ((null n)
- (message "User must press `w' to explain unsimplified results"))
+ (message (substitute-command-keys
+ "User must press \\`w' to explain unsimplified results")))
((eq n t)
- (message "Automatically doing `w' to explain unsimplified results"))
+ (message (substitute-command-keys
+ "Automatically doing \\`w' to explain unsimplified results")))
(t
- (message "Automatically doing `w' only for unusual messages")))))
+ (message (substitute-command-keys
+ "Automatically doing \\`w' only for unusual messages"))))))
(defun calc-group-digits (n)
(interactive "P")
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index bd4ec4ff2f0..9774ddff402 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -1621,7 +1621,8 @@ See calc-keypad for details."
(stringp (nth 1 err))
(string-match "max-specpdl-size\\|max-lisp-eval-depth"
(nth 1 err)))
- (error "Computation got stuck or ran too long. Type `M' to increase the limit")
+ (error (substitute-command-keys
+ "Computation got stuck or ran too long. Type \\`M' to increase the limit"))
(setq calc-aborted-prefix nil)
(signal (car err) (cdr err)))))
(when calc-aborted-prefix
diff --git a/lisp/calculator.el b/lisp/calculator.el
index 6bcea2d885e..0c255c0cf9d 100644
--- a/lisp/calculator.el
+++ b/lisp/calculator.el
@@ -593,15 +593,15 @@ except when using a non-decimal radix mode for input (in this case `e'
will be the hexadecimal digit).
Here are the editing keys:
-* `RET' `=' evaluate the current expression
-* `C-insert' copy the whole current expression to the `kill-ring'
-* `C-return' evaluate, save result the `kill-ring' and exit
-* `insert' paste a number if the one was copied (normally)
-* `delete' `C-d' clear last argument or whole expression (hit twice)
-* `backspace' delete a digit or a previous expression element
-* `h' `?' pop-up a quick reference help
-* `ESC' `q' exit (`ESC' can be used if `calculator-bind-escape' is
- non-nil, otherwise use three consecutive `ESC's)
+* \\`RET' \\`=' evaluate the current expression
+* \\`C-' copy the whole current expression to the `kill-ring'
+* \\`C-' evaluate, save result the `kill-ring' and exit
+* \\`' paste a number if the one was copied (normally)
+* \\`' \\`C-d' clear last argument or whole expression (hit twice)
+* \\`' delete a digit or a previous expression element
+* \\`h' \\`?' pop-up a quick reference help
+* \\`ESC' \\`q' exit (\\`ESC' can be used if `calculator-bind-escape' is
+ non-nil, otherwise use three consecutive \\`ESC's)
These operators are pre-defined:
* `+' `-' `*' `/' the common binary operators
@@ -623,10 +623,10 @@ argument.
hex/oct/bin modes can be set for input and for display separately.
Another toggle-able mode is for using degrees instead of radians for
trigonometric functions.
-The keys to switch modes are (both `H' and `X' are for hex):
-* `D' switch to all-decimal mode, or toggle degrees/radians
-* `B' `O' `H' `X' binary/octal/hexadecimal modes for input & display
-* `i' `o' followed by one of `D' `B' `O' `H' `X' (case
+The keys to switch modes are (both \\`H' and \\`X' are for hex):
+* \\`D' switch to all-decimal mode, or toggle degrees/radians
+* \\`B' \\`O' \\`H' \\`X' binary/octal/hexadecimal modes for input & display
+* \\`i' \\`o' followed by one of \\`D' \\`B' \\`O' \\`H' \\`X' (case
insensitive) sets only the input or display radix mode
The prompt indicates the current modes:
* \"==\": decimal mode (using radians);
@@ -649,17 +649,17 @@ collected data. It is possible to navigate in this list, and if the
value shown is the current one on the list, an indication is displayed
as \"[N]\" if this is the last number and there are N numbers, or
\"[M/N]\" if the M-th value is shown.
-* `SPC' evaluate the current value as usual, but also adds
+* \\`SPC' evaluate the current value as usual, but also adds
the result to the list of saved values
-* `l' `v' computes total / average of saved values
-* `up' `C-p' browse to the previous value in the list
-* `down' `C-n' browse to the next value in the list
-* `delete' `C-d' remove current value from the list (if it is on it)
-* `C-delete' `C-c' delete the whole list
+* \\`l' \\`v' computes total / average of saved values
+* \\`' \\`C-p' browse to the previous value in the list
+* \\`' \\`C-n' browse to the next value in the list
+* \\`' \\`C-d' remove current value from the list (if it is on it)
+* \\`C-' \\`C-c' delete the whole list
Registers are variable-like place-holders for values:
-* `s' followed by a character attach the current value to that character
-* `g' followed by a character fetches the attached value
+* \\`s' followed by a character attach the current value to that character
+* \\`g' followed by a character fetches the attached value
There are many variables that can be used to customize the calculator.
Some interesting customization variables are:
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
index 2d31101e50e..7a483d40627 100644
--- a/lisp/calendar/icalendar.el
+++ b/lisp/calendar/icalendar.el
@@ -644,13 +644,13 @@ FIXME: multiple comma-separated values should be allowed!"
;; seconds present
(setq second (read (substring isodatetimestring 13 15))))
;; FIXME: Support subseconds.
- (when (and (> (length isodatetimestring) 15)
- ;; UTC specifier present
- (char-equal ?Z (aref isodatetimestring 15)))
- (setq source-zone t
- ;; decode to local time unless result-zone is explicitly given,
- ;; i.e. do not decode to UTC, i.e. do not (setq result-zone t)
- ))
+ (when (> (length isodatetimestring) 15)
+ (cl-case (aref isodatetimestring 15)
+ (?Z
+ (setq source-zone t))
+ ((?- ?+)
+ (setq source-zone
+ (concat "UTC" (substring isodatetimestring 15))))))
;; shift if necessary
(if day-shift
(let ((mdy (calendar-gregorian-from-absolute
diff --git a/lisp/cedet/semantic/symref/cscope.el b/lisp/cedet/semantic/symref/cscope.el
index e63b7a7e914..bc3f4a248b7 100644
--- a/lisp/cedet/semantic/symref/cscope.el
+++ b/lisp/cedet/semantic/symref/cscope.el
@@ -43,7 +43,7 @@ the hit list.
See the function `cedet-cscope-search' for more details.")
(cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-cscope))
- "Perform a search with GNU Global."
+ "Perform a search with CScope."
(let* ((rootproj (when (and (featurep 'ede) ede-minor-mode)
(ede-toplevel)))
(default-directory (if rootproj
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index f91a7e228ed..ae71140e262 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -2176,7 +2176,7 @@ and `face'."
;;; The `custom' Widget.
(defface custom-button
- '((((type x w32 ns pgtk) (class color)) ; Like default mode line
+ '((((type x w32 ns haiku pgtk) (class color)) ; Like default mode line
:box (:line-width 2 :style released-button)
:background "lightgrey" :foreground "black"))
"Face for custom buffer buttons if `custom-raised-buttons' is non-nil."
@@ -2184,7 +2184,7 @@ and `face'."
:group 'custom-faces)
(defface custom-button-mouse
- '((((type x w32 ns pgtk) (class color))
+ '((((type x w32 ns haiku pgtk) (class color))
:box (:line-width 2 :style released-button)
:background "grey90" :foreground "black")
(t
@@ -2209,7 +2209,7 @@ and `face'."
(if custom-raised-buttons 'custom-button-mouse 'highlight))
(defface custom-button-pressed
- '((((type x w32 ns pgtk) (class color))
+ '((((type x w32 ns haiku pgtk) (class color))
:box (:line-width 2 :style pressed-button)
:background "lightgrey" :foreground "black")
(t :inverse-video t))
@@ -4650,8 +4650,8 @@ You can set this option through Custom, if you carefully read the
last paragraph below. However, usually it is simpler to write
something like the following in your init file:
-\(setq custom-file \"~/.emacs-custom.el\")
-\(load custom-file)
+(setq custom-file \"~/.config/emacs-custom.el\")
+(load custom-file)
Note that both lines are necessary: the first line tells Custom to
save all customizations in this file, but does not load it.
diff --git a/lisp/cus-face.el b/lisp/cus-face.el
index 5037ee77c7c..c78a327fdfa 100644
--- a/lisp/cus-face.el
+++ b/lisp/cus-face.el
@@ -54,6 +54,7 @@
(string :tag "Font Foundry"
:help-echo "Font foundry name."))
+ ;; The width, weight, and slant should be in sync with font.c.
(:width
(choice :tag "Width"
:help-echo "Font width."
@@ -63,15 +64,21 @@
(const :tag "demiexpanded" semi-expanded)
(const :tag "expanded" expanded)
(const :tag "extracondensed" extra-condensed)
+ (const :tag "extra-condensed" extra-condensed)
(const :tag "extraexpanded" extra-expanded)
- (const :tag "medium" normal)
+ (const :tag "extra-expanded" extra-expanded)
(const :tag "narrow" condensed)
(const :tag "normal" normal)
+ (const :tag "medium" normal)
(const :tag "regular" normal)
(const :tag "semicondensed" semi-condensed)
+ (const :tag "demicondensed" semi-condensed)
+ (const :tag "semi-condensed" semi-condensed)
(const :tag "semiexpanded" semi-expanded)
(const :tag "ultracondensed" ultra-condensed)
+ (const :tag "ultra-condensed" ultra-condensed)
(const :tag "ultraexpanded" ultra-expanded)
+ (const :tag "ultra-expanded" ultra-expanded)
(const :tag "wide" extra-expanded)))
(:height
@@ -85,22 +92,32 @@
(choice :tag "Weight"
:help-echo "Font weight."
:value normal ; default
- (const :tag "ultralight" ultra-light)
- (const :tag "extralight" extra-light)
- (const :tag "light" light)
(const :tag "thin" thin)
+ (const :tag "ultralight" ultra-light)
+ (const :tag "ultra-light" ultra-light)
+ (const :tag "extralight" ultra-light)
+ (const :tag "extra-light" ultra-light)
+ (const :tag "light" light)
(const :tag "semilight" semi-light)
- (const :tag "book" semi-light)
+ (const :tag "semi-light" semi-light)
+ (const :tag "demilight" semi-light)
(const :tag "normal" normal)
- (const :tag "regular" normal)
- (const :tag "medium" normal)
+ (const :tag "regular" regular)
+ (const :tag "book" normal)
+ (const :tag "medium" medium)
(const :tag "semibold" semi-bold)
+ (const :tag "semi-bold" semi-bold)
(const :tag "demibold" semi-bold)
+ (const :tag "demi-bold" semi-bold)
(const :tag "bold" bold)
(const :tag "extrabold" extra-bold)
- (const :tag "heavy" extra-bold)
- (const :tag "ultrabold" ultra-bold)
- (const :tag "black" ultra-bold)))
+ (const :tag "extra-bold" extra-bold)
+ (const :tag "ultrabold" extra-bold)
+ (const :tag "ultra-bold" extra-bold)
+ (const :tag "heavy" heavy)
+ (const :tag "black" heavy)
+ (const :tag "ultra-heavy" ultra-heavy)
+ (const :tag "ultraheavy" ultra-heavy)))
(:slant
(choice :tag "Slant"
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index a46107a6784..33b861b3408 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -826,10 +826,15 @@ since it could result in memory overflow and make Emacs crash."
(x-underline-at-descent-line display boolean "22.1")
(x-stretch-cursor display boolean "21.1")
(scroll-bar-adjust-thumb-portion windows boolean "24.4")
+ (x-scroll-event-delta-factor mouse float "29.1")
;; xselect.c
(x-select-enable-clipboard-manager killing boolean "24.1")
;; xsettings.c
- (font-use-system-font font-selection boolean "23.2")))
+ (font-use-system-font font-selection boolean "23.2")
+ ;; haikuterm.c
+ (haiku-debug-on-fatal-error debug boolean "29.1")
+ ;; haikufns.c
+ (haiku-use-system-tooltips tooltip boolean "29.1")))
(setq ;; If we did not specify any standard value expression above,
;; use the current value as the standard value.
standard (if (setq prop (memq :standard rest))
@@ -846,10 +851,17 @@ since it could result in memory overflow and make Emacs crash."
(eq system-type 'windows-nt))
((string-match "\\`ns-" (symbol-name symbol))
(featurep 'ns))
+ ((string-match "\\`haiku-" (symbol-name symbol))
+ (featurep 'haiku))
((string-match "\\`x-.*gtk" (symbol-name symbol))
(featurep 'gtk))
((string-match "clipboard-manager" (symbol-name symbol))
(boundp 'x-select-enable-clipboard-manager))
+ ((or (equal "scroll-bar-adjust-thumb-portion"
+ (symbol-name symbol))
+ (equal "x-scroll-event-delta-factor"
+ (symbol-name symbol)))
+ (featurep 'x))
((string-match "\\`x-" (symbol-name symbol))
(fboundp 'x-create-frame))
((string-match "selection" (symbol-name symbol))
@@ -870,9 +882,6 @@ since it could result in memory overflow and make Emacs crash."
(symbol-name symbol))
;; Any function from fontset.c will do.
(fboundp 'new-fontset))
- ((equal "scroll-bar-adjust-thumb-portion"
- (symbol-name symbol))
- (featurep 'x))
(t t))))
(if (not (boundp symbol))
;; If variables are removed from C code, give an error here!
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 7d81d45326f..588551a6417 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1007,6 +1007,7 @@ Else returns nil for success."
(erase-buffer)
(setq default-directory dir ; caller's default-directory
err (not (eq 0 (apply #'process-file program nil t nil arguments))))
+ (dired-uncache dir)
(if err
(progn
(dired-log (concat program " " (prin1-to-string arguments) "\n"))
@@ -1032,6 +1033,7 @@ Return the result of `process-file' - zero for success."
nil
shell-command-switch
cmd)))
+ (dired-uncache dir)
(unless (zerop res)
(pop-to-buffer out-buffer))
res))))
@@ -1280,9 +1282,9 @@ Return nil if no change in files."
(prog1 (setq newname (file-name-as-directory newname))
(dired-shell-command
(replace-regexp-in-string
- "%o" (shell-quote-argument newname)
+ "%o" (shell-quote-argument (file-local-name newname))
(replace-regexp-in-string
- "%i" (shell-quote-argument file)
+ "%i" (shell-quote-argument (file-local-name file))
command
nil t)
nil t)))
@@ -1293,10 +1295,10 @@ Return nil if no change in files."
(dired-check-process msg
(substring command 0 match)
(substring command (1+ match))
- file)
+ (file-local-name file))
(dired-check-process msg
command
- file))
+ (file-local-name file)))
newname))))
(t
;; We don't recognize the file as compressed, so compress it.
@@ -1314,7 +1316,8 @@ Return nil if no change in files."
(default-directory (file-name-directory file)))
(dired-shell-command
(replace-regexp-in-string
- "%o" (shell-quote-argument out-name)
+ "%o" (shell-quote-argument
+ (file-local-name out-name))
(replace-regexp-in-string
"%i" (shell-quote-argument
(file-name-nondirectory file))
@@ -1344,9 +1347,10 @@ see `dired-compress-file-alist' for the supported suffixes list"
out-name)))
(dired-shell-command
(replace-regexp-in-string
- "%o" (shell-quote-argument out-name)
+ "%o" (shell-quote-argument
+ (file-local-name out-name))
(replace-regexp-in-string
- "%i" (shell-quote-argument file)
+ "%i" (shell-quote-argument (file-local-name file))
(cdr rule)
nil t)
nil t))
@@ -1361,7 +1365,8 @@ see `dired-compress-file-alist' for the supported suffixes list"
out-name)))))
(file-error
(if (not (dired-check-process (concat "Compressing " file)
- "compress" "-f" file))
+ "compress" "-f"
+ (file-local-name file)))
;; Don't use NEWNAME with `compress'.
(concat file ".Z"))))))))
@@ -1984,11 +1989,12 @@ or with the current marker character if MARKER-CHAR is t."
(let* ((overwrite (file-exists-p to))
(dired-overwrite-confirmed ; for dired-handle-overwrite
(and overwrite
- (let ((help-form (format-message "\
-Type SPC or `y' to overwrite file `%s',
-DEL or `n' to skip to next,
-ESC or `q' to not overwrite any of the remaining files,
-`!' to overwrite all remaining files with no more questions." to)))
+ (let ((help-form (format-message
+ (substitute-command-keys "\
+Type \\`SPC' or \\`y' to overwrite file `%s',
+\\`DEL' or \\`n' to skip to next,
+\\`ESC' or \\`q' to not overwrite any of the remaining files,
+\\`!' to overwrite all remaining files with no more questions.") to)))
(dired-query 'overwrite-query
"Overwrite `%s'?" to))))
;; must determine if FROM is marked before file-creator
@@ -2481,11 +2487,12 @@ Also see `dired-do-revert-buffer'."
;; Optional arg MARKER-CHAR as in dired-create-files.
(let* ((fn-list (dired-get-marked-files nil arg))
(operation-prompt (concat operation " `%s' to `%s'?"))
- (rename-regexp-help-form (format-message "\
-Type SPC or `y' to %s one match, DEL or `n' to skip to next,
-`!' to %s all remaining matches with no more questions."
- (downcase operation)
- (downcase operation)))
+ (rename-regexp-help-form (format-message
+ (substitute-command-keys "\
+Type \\`SPC' or \\`y' to %s one match, \\`DEL' or \\`n' to skip to next,
+\\`!' to %s all remaining matches with no more questions.")
+ (downcase operation)
+ (downcase operation)))
(regexp-name-constructor
;; Function to construct new filename using REGEXP and NEWNAME:
(if whole-name ; easy (but rare) case
@@ -2606,11 +2613,12 @@ See function `dired-do-rename-regexp' for more info."
(let ((to (concat (file-name-directory from)
(funcall basename-constructor
(file-name-nondirectory from)))))
- (and (let ((help-form (format-message "\
-Type SPC or `y' to %s one file, DEL or `n' to skip to next,
-`!' to %s all remaining matches with no more questions."
- (downcase operation)
- (downcase operation))))
+ (and (let ((help-form (format-message
+ (substitute-command-keys "\
+Type \\`SPC' or \\`y' to %s one file, \\`DEL' or \\`n' to skip to next,
+\\`!' to %s all remaining matches with no more questions.")
+ (downcase operation)
+ (downcase operation))))
(dired-query 'rename-non-directory-query
(concat operation " `%s' to `%s'")
(dired-make-relative from)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index fc626aa76b5..de21dcf7a60 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -596,7 +596,7 @@ If you have saved a Dired buffer in a file you can use \\[dired-virtual] to
resume it in a later session.
Type \\\\[revert-buffer] \
-in the Virtual Dired buffer and answer `y' to convert
+in the Virtual Dired buffer and answer \\`y' to convert
the virtual to a real Dired buffer again. You don't have to do this, though:
you can relist single subdirs using \\[dired-do-redisplay]."
diff --git a/lisp/dired.el b/lisp/dired.el
index 40dfc39b9ad..9280c080a4c 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -345,11 +345,11 @@ When `file', the region marking is based on the file name.
This means don't mark the file if the end of the region is
before the file name displayed on the Dired line, so the file name
is visually outside the region. This behavior is consistent with
-marking files without the region using the key `m' that advances
+marking files without the region using the key \\`m' that advances
point to the next line after marking the file. Thus the number
of keys used to mark files is the same as the number of keys
-used to select the region, e.g. `M-2 m' marks 2 files, and
-`C-SPC M-2 n m' marks 2 files, and `M-2 S-down m' marks 2 files.
+used to select the region, for example \\`M-2 m' marks 2 files, and
+\\`C-SPC M-2 n m' marks 2 files, and \\`M-2 S- m' marks 2 files.
When `line', the region marking is based on Dired lines,
so include the file into marking if the end of the region
@@ -1672,9 +1672,9 @@ see `dired-use-ls-dired' for more details.")
(dired-goto-subdir current-dir)
(dired current-dir)))))
(define-keymap
- [mouse-2] click
- [follow-link] 'mouse-face
- ["RET"] click))))
+ "" click
+ "" 'mouse-face
+ "RET" click))))
(setq segment-start (point)))))))
@@ -2449,7 +2449,9 @@ directory in another window."
file-name
(if (file-symlink-p file-name)
(error "File is a symlink to a nonexistent target")
- (error "File no longer exists; type `g' to update Dired buffer")))))
+ (error (substitute-command-keys
+ (concat "File no longer exists; type \\"
+ "\\[revert-buffer] to update Dired buffer")))))))
;; Force C-m keybinding rather than `f' or `e' in the mode doc:
(define-obsolete-function-alias 'dired-advertised-find-file
@@ -4100,9 +4102,9 @@ Type \\[help-command] at that time for help."
(inhibit-read-only t) case-fold-search
dired-unmark-all-files-query
(string (format "\n%c" mark))
- (help-form "\
-Type SPC or `y' to unmark one file, DEL or `n' to skip to next,
-`!' to unmark all remaining files with no more questions."))
+ (help-form (substitute-command-keys "\
+Type \\`SPC' or \\`y' to unmark one file, \\`DEL' or \\`n' to skip to next,
+\\`!' to unmark all remaining files with no more questions.")))
(goto-char (point-min))
(while (if (eq mark ?\r)
(re-search-forward dired-re-mark nil t)
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 088ca5bfeae..7e113e4f34c 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -493,24 +493,69 @@ Typically \"page-%s.png\".")
(easy-menu-define doc-view-menu doc-view-mode-map
"Menu for Doc View mode."
'("DocView"
- ["Toggle display" doc-view-toggle-display]
- ("Continuous"
- ["Off" (setq doc-view-continuous nil)
- :style radio :selected (eq doc-view-continuous nil)]
- ["On" (setq doc-view-continuous t)
- :style radio :selected (eq doc-view-continuous t)]
+ ["Next page" doc-view-next-page
+ :help "Go to the next page"]
+ ["Previous page" doc-view-previous-page
+ :help "Go to the previous page"]
+ ("Other Navigation"
+ ["Go to page..." doc-view-goto-page
+ :help "Go to specific page"]
"---"
- ["Save as Default"
- (customize-save-variable 'doc-view-continuous doc-view-continuous) t]
+ ["First page" doc-view-first-page
+ :help "View the first page"]
+ ["Last page" doc-view-last-page
+ :help "View the last page"]
+ "---"
+ ["Move forward" doc-view-scroll-up-or-next-page
+ :help "Scroll page up or go to next page"]
+ ["Move backward" doc-view-scroll-down-or-previous-page
+ :help "Scroll page down or go to previous page"])
+ ("Continuous Scrolling"
+ ["Off" (setq doc-view-continuous nil)
+ :style radio :selected (eq doc-view-continuous nil)
+ :help "Scrolling stops at page beginning and end"]
+ ["On" (setq doc-view-continuous t)
+ :style radio :selected (eq doc-view-continuous t)
+ :help "Scrolling continues to next or previous page"]
+ "---"
+ ["Save as Default" (customize-save-variable 'doc-view-continuous doc-view-continuous)
+ :help "Save current continuous scrolling option as default"]
)
"---"
- ["Set Slice" doc-view-set-slice-using-mouse]
- ["Set Slice (BoundingBox)" doc-view-set-slice-from-bounding-box]
- ["Set Slice (manual)" doc-view-set-slice]
- ["Reset Slice" doc-view-reset-slice]
+ ("Toggle edit/display"
+ ["Edit document" doc-view-toggle-display
+ :style radio :selected (eq major-mode 'doc-view--text-view-mode)]
+ ["Display document" (lambda ()) ; ignore but show no keybinding
+ :style radio :selected (eq major-mode 'doc-view-mode)])
+ ("Adjust Display"
+ ["Fit to window" doc-view-fit-page-to-window
+ :help "Fit the image to the window"]
+ ["Fit width" doc-view-fit-width-to-window
+ :help "Fit the image width to the window width"]
+ ["Fit height" doc-view-fit-height-to-window
+ :help "Fit the image height to the window height"]
+ "---"
+ ["Enlarge" doc-view-enlarge
+ :help "Enlarge the document"]
+ ["Shrink" doc-view-shrink
+ :help "Shrink the document"]
+ "---"
+ ["Set Slice" doc-view-set-slice-using-mouse
+ :help "Set the slice of the images that should be displayed"]
+ ["Set Slice (BoundingBox)" doc-view-set-slice-from-bounding-box
+ :help "Set the slice from the document's BoundingBox information"]
+ ["Set Slice (manual)" doc-view-set-slice
+ :help "Set the slice of the images that should be displayed"]
+ ["Reset Slice" doc-view-reset-slice
+ :help "Reset the current slice"
+ :enabled (image-mode-window-get 'slice)])
"---"
- ["Search" doc-view-search]
- ["Search Backwards" doc-view-search-backward]
+ ["New Search" (doc-view-search t)
+ :help "Initiate a new search"]
+ ["Search Forward" doc-view-search
+ :help "Jump to the next match or initiate a new search"]
+ ["Search Backward" doc-view-search-backward
+ :help "Jump to the previous match or initiate a new search"]
))
(defvar doc-view-minor-mode-map
@@ -520,6 +565,16 @@ Typically \"page-%s.png\".")
map)
"Keymap used by `doc-view-minor-mode'.")
+(easy-menu-define doc-view-minor-mode-menu doc-view-minor-mode-map
+ "Menu for Doc View minor mode."
+ '("DocView (edit)"
+ ("Toggle edit/display"
+ ["Edit document" (lambda ()) ; ignore but show no keybinding
+ :style radio :selected (eq major-mode 'doc-view--text-view-mode)]
+ ["Display document" doc-view-toggle-display
+ :style radio :selected (eq major-mode 'doc-view-mode)])
+ ["Exit DocView Mode" doc-view-minor-mode]))
+
;;;; Navigation Commands
;; FIXME: The doc-view-current-* definitions below are macros because they
@@ -1530,16 +1585,16 @@ have the page we want to view."
(overlay-put (doc-view-current-overlay) 'display
(concat (propertize "Welcome to DocView!" 'face 'bold)
"\n"
- "
+ (substitute-command-keys "
If you see this buffer it means that the document you want to view is being
converted to PNG and the conversion of the first page hasn't finished yet or
`doc-view-conversion-refresh-interval' is set to nil.
For now these keys are useful:
-
-`q' : Bury this buffer. Conversion will go on in background.
-`k' : Kill the conversion process and this buffer.
-`K' : Kill the conversion process.\n"))))
+\\
+\\[quit-window] : Bury this buffer. Conversion will go on in background.
+\\[image-kill-buffer] : Kill the conversion process and this buffer.
+\\[doc-view-kill-proc] : Kill the conversion process.\n")))))
(declare-function tooltip-show "tooltip" (text &optional use-echo-area))
diff --git a/lisp/edmacro.el b/lisp/edmacro.el
index b3118b0aa67..29900a9595c 100644
--- a/lisp/edmacro.el
+++ b/lisp/edmacro.el
@@ -601,6 +601,12 @@ This function assumes that the events can be stored in a string."
(setf (aref seq i) (logand (aref seq i) 127))))
seq)
+;; These are needed in a --without-x build.
+(defvar mouse-wheel-down-event)
+(defvar mouse-wheel-up-event)
+(defvar mouse-wheel-right-event)
+(defvar mouse-wheel-left-event)
+
(defun edmacro-fix-menu-commands (macro &optional noerror)
(if (vectorp macro)
(let (result)
diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el
index a5721aa3193..a8b484aee0b 100644
--- a/lisp/emacs-lisp/backtrace.el
+++ b/lisp/emacs-lisp/backtrace.el
@@ -55,9 +55,9 @@ order to debug the code that does fontification."
(defcustom backtrace-line-length 5000
"Target length for lines in Backtrace buffers.
Backtrace mode will attempt to abbreviate printing of backtrace
-frames to make them shorter than this, but success is not
-guaranteed. If set to nil or zero, Backtrace mode will not
-abbreviate the forms it prints."
+frames by setting `print-level' and `print-length' to make them
+shorter than this, but success is not guaranteed. If set to nil
+or zero, backtrace mode will not abbreviate the forms it prints."
:type 'integer
:group 'backtrace
:version "27.1")
@@ -751,6 +751,13 @@ property for use by navigation."
(insert (make-string (- backtrace--flags-width (- (point) beg)) ?\s))
(put-text-property beg (point) 'backtrace-section 'func)))
+(defun backtrace--line-length-or-nil ()
+ "Return `backtrace-line-length' if valid, nil else."
+ ;; mirror the logic in `cl-print-to-string-with-limits'
+ (and (natnump backtrace-line-length)
+ (not (zerop backtrace-line-length))
+ backtrace-line-length))
+
(defun backtrace--print-func-and-args (frame _view)
"Print the function, arguments and buffer position of a backtrace FRAME.
Format it according to VIEW."
@@ -769,11 +776,16 @@ Format it according to VIEW."
(if (atom fun)
(funcall backtrace-print-function fun)
(insert
- (backtrace--print-to-string fun (when args (/ backtrace-line-length 2)))))
+ (backtrace--print-to-string
+ fun
+ (when (and args (backtrace--line-length-or-nil))
+ (/ backtrace-line-length 2)))))
(if args
(insert (backtrace--print-to-string
- args (max (truncate (/ backtrace-line-length 5))
- (- backtrace-line-length (- (point) beg)))))
+ args
+ (if (backtrace--line-length-or-nil)
+ (max (truncate (/ backtrace-line-length 5))
+ (- backtrace-line-length (- (point) beg))))))
;; The backtrace-form property is so that backtrace-multi-line
;; will find it. backtrace-multi-line doesn't do anything
;; useful with it, just being consistent.
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 9c64083b64b..f6db803b78e 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1186,72 +1186,6 @@ See Info node `(elisp) Integer Basics'."
(put 'concat 'byte-optimizer #'byte-optimize-concat)
-(defun byte-optimize-define-key (form)
- "Expand key bindings in FORM."
- (let ((key (nth 2 form)))
- (if (and (vectorp key)
- (= (length key) 1)
- (stringp (aref key 0)))
- ;; We have key on the form ["C-c C-c"].
- (if (not (kbd-valid-p (aref key 0)))
- (error "Invalid `kbd' syntax: %S" key)
- (list (nth 0 form) (nth 1 form)
- (kbd (aref key 0)) (nth 4 form)))
- ;; No improvement.
- form)))
-
-(put 'define-key 'byte-optimizer #'byte-optimize-define-key)
-
-(defun byte-optimize-define-keymap (form)
- "Expand key bindings in FORM."
- (let ((result nil)
- (orig-form form)
- improved)
- (push (pop form) result)
- (while (and form
- (keywordp (car form))
- (not (eq (car form) :menu)))
- (unless (memq (car form)
- '(:full :keymap :parent :suppress :name :prefix))
- (error "Invalid keyword: %s" (car form)))
- (push (pop form) result)
- (when (null form)
- (error "Uneven number of keywords in %S" form))
- (push (pop form) result))
- ;; Bindings.
- (while form
- (let ((key (pop form)))
- (if (and (vectorp key)
- (= (length key) 1)
- (stringp (aref key 0)))
- (progn
- (unless (kbd-valid-p (aref key 0))
- (error "Invalid `kbd' syntax: %S" key))
- (push (kbd (aref key 0)) result)
- (setq improved t))
- ;; No improvement.
- (push key result)))
- (when (null form)
- (error "Uneven number of key bindings in %S" form))
- (push (pop form) result))
- (if improved
- (nreverse result)
- orig-form)))
-
-(defun byte-optimize-define-keymap--define (form)
- "Expand key bindings in FORM."
- (if (not (consp (nth 1 form)))
- form
- (let ((optimized (byte-optimize-define-keymap (nth 1 form))))
- (if (eq optimized (nth 1 form))
- ;; No improvement.
- form
- (list (car form) optimized)))))
-
-(put 'define-keymap 'byte-optimizer #'byte-optimize-define-keymap)
-(put 'define-keymap--define 'byte-optimizer
- #'byte-optimize-define-keymap--define)
-
;; I'm not convinced that this is necessary. Doesn't the optimizer loop
;; take care of this? - Jamie
;; I think this may some times be necessary to reduce ie (quote 5) to 5,
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index d82d9454e84..2ce2efd2aa7 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -134,6 +134,7 @@ The return value of this function is not used."
:autoload-end
(eval-and-compile
(defun ,cfname (,@(car data) ,@args)
+ (ignore ,@(delq '&rest (delq '&optional (copy-sequence args))))
,@(cdr data))))))))
(defalias 'byte-run--set-doc-string
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 471a0b623ad..5ce5b2952b8 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1672,9 +1672,14 @@ URLs."
;; known at compile time. So instead, we assume that these
;; substitutions are of some length N.
(replace-regexp-in-string
- (rx "\\" (or (seq "[" (* (not "]")) "]")))
+ (rx "\\[" (* (not "]")) "]")
(make-string byte-compile--wide-docstring-substitution-len ?x)
- docstring))))
+ ;; For literal key sequence substitutions (e.g. "\\`C-h'"), just
+ ;; remove the markup as `substitute-command-keys' would.
+ (replace-regexp-in-string
+ (rx "\\`" (group (* (not "'"))) "'")
+ "\\1"
+ docstring)))))
(defcustom byte-compile-docstring-max-column 80
"Recommended maximum width of doc string lines.
@@ -5043,6 +5048,8 @@ binding slots have been popped."
nil))
(_ (byte-compile-keep-pending form))))
+
+
;;; tags
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index b30d3fc30f4..cd0e7dca7cf 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -385,7 +385,8 @@ Also store it in `eldoc-last-message' and return that value."
;; The following configuration shows "Matches..." in the
;; echo area when point is after a closing bracket, which
;; conflicts with eldoc.
- (and show-paren-context-when-offscreen
+ (and (boundp 'show-paren-context-when-offscreen)
+ show-paren-context-when-offscreen
(not (pos-visible-in-window-p
(overlay-end show-paren--overlay)))))))
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index 8ebc81fd418..946193e40dc 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -77,6 +77,35 @@
Use nil for no limit (caution: backtrace lines can be very long)."
:type '(choice (const :tag "No truncation" nil) integer))
+(defvar ert-batch-print-length 10
+ "`print-length' setting used in `ert-run-tests-batch'.
+
+When formatting lists in test conditions, `print-length' will be
+temporarily set to this value. See also
+`ert-batch-backtrace-line-length' for its effect on stack
+traces.")
+
+(defvar ert-batch-print-level 5
+ "`print-level' setting used in `ert-run-tests-batch'.
+
+When formatting lists in test conditions, `print-level' will be
+temporarily set to this value. See also
+`ert-batch-backtrace-line-length' for its effect on stack
+traces.")
+
+(defvar ert-batch-backtrace-line-length t
+ "Target length for lines in ERT batch backtraces.
+
+Even modest settings for `print-length' and `print-level' can
+produce extremely long lines in backtraces and lengthy delays in
+forming them. This variable governs the target maximum line
+length by manipulating these two variables while printing stack
+traces. Setting this variable to t will re-use the value of
+`backtrace-line-length' while printing stack traces in ERT batch
+mode. Any other value will be temporarily bound to
+`backtrace-line-length' when producing stack traces in batch
+mode.")
+
(defface ert-test-result-expected '((((class color) (background light))
:background "green1")
(((class color) (background dark))
@@ -120,6 +149,10 @@ Use nil for no limit (caution: backtrace lines can be very long)."
;; Note that nil is still a valid value for the `name' slot in
;; ert-test objects. It designates an anonymous test.
(error "Attempt to define a test named nil"))
+ (when (and noninteractive (get symbol 'ert--test))
+ ;; Make sure duplicated tests are discovered since the older test would
+ ;; be ignored silently otherwise.
+ (error "Test `%s' redefined" symbol))
(define-symbol-prop symbol 'ert--test definition)
definition)
@@ -175,6 +208,9 @@ Macros in BODY are expanded when the test is defined, not when it
is run. If a macro (possibly with side effects) is to be tested,
it has to be wrapped in `(eval (quote ...))'.
+If NAME is already defined as a test and Emacs is running
+in batch mode, an error is signalled.
+
\(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] \
[:tags \\='(TAG...)] BODY...)"
(declare (debug (&define [&name "test@" symbolp]
@@ -1402,8 +1438,7 @@ Returns the stats object."
(ert-reason-for-test-result result)
""))))
(message "%s" "")))))
- (test-started
- )
+ (test-started)
(test-ended
(cl-destructuring-bind (stats test result) event-args
(unless (ert-test-result-expected-p test result)
@@ -1413,8 +1448,14 @@ Returns the stats object."
(ert-test-result-with-condition
(message "Test %S backtrace:" (ert-test-name test))
(with-temp-buffer
- (insert (backtrace-to-string
- (ert-test-result-with-condition-backtrace result)))
+ (let ((backtrace-line-length
+ (if (eq ert-batch-backtrace-line-length t)
+ backtrace-line-length
+ ert-batch-backtrace-line-length))
+ (print-level ert-batch-print-level)
+ (print-length ert-batch-print-length))
+ (insert (backtrace-to-string
+ (ert-test-result-with-condition-backtrace result))))
(if (not ert-batch-backtrace-right-margin)
(message "%s"
(buffer-substring-no-properties (point-min)
@@ -1433,8 +1474,8 @@ Returns the stats object."
(ert--insert-infos result)
(insert " ")
(let ((print-escape-newlines t)
- (print-level 5)
- (print-length 10))
+ (print-level ert-batch-print-level)
+ (print-length ert-batch-print-length))
(ert--pp-with-indentation-and-newline
(ert-test-result-with-condition-condition result)))
(goto-char (1- (point-max)))
@@ -1962,13 +2003,13 @@ otherwise."
(ewoc-refresh ert--results-ewoc)
(font-lock-default-function enabledp))
-(defun ert--setup-results-buffer (stats listener buffer-name)
+(defvar ert--output-buffer-name "*ert*")
+
+(defun ert--setup-results-buffer (stats listener)
"Set up a test results buffer.
-STATS is the stats object; LISTENER is the results listener;
-BUFFER-NAME, if non-nil, is the buffer name to use."
- (unless buffer-name (setq buffer-name "*ert*"))
- (let ((buffer (get-buffer-create buffer-name)))
+STATS is the stats object; LISTENER is the results listener."
+ (let ((buffer (get-buffer-create ert--output-buffer-name)))
(with-current-buffer buffer
(let ((inhibit-read-only t))
(buffer-disable-undo)
@@ -2000,18 +2041,11 @@ BUFFER-NAME, if non-nil, is the buffer name to use."
(defvar ert--selector-history nil
"List of recent test selectors read from terminal.")
-;; Should OUTPUT-BUFFER-NAME and MESSAGE-FN really be arguments here?
-;; They are needed only for our automated self-tests at the moment.
-;; Or should there be some other mechanism?
;;;###autoload
-(defun ert-run-tests-interactively (selector
- &optional output-buffer-name message-fn)
+(defun ert-run-tests-interactively (selector)
"Run the tests specified by SELECTOR and display the results in a buffer.
-SELECTOR works as described in `ert-select-tests'.
-OUTPUT-BUFFER-NAME and MESSAGE-FN should normally be nil; they
-are used for automated self-tests and specify which buffer to use
-and how to display message."
+SELECTOR works as described in `ert-select-tests'."
(interactive
(list (let ((default (if ert--selector-history
;; Can't use `first' here as this form is
@@ -2022,25 +2056,18 @@ and how to display message."
(read
(completing-read (format-prompt "Run tests" default)
obarray #'ert-test-boundp nil nil
- 'ert--selector-history default nil)))
- nil))
- (unless message-fn (setq message-fn 'message))
- (let ((output-buffer-name output-buffer-name)
- buffer
- listener
- (message-fn message-fn))
+ 'ert--selector-history default nil)))))
+ (let (buffer listener)
(setq listener
(lambda (event-type &rest event-args)
(cl-ecase event-type
(run-started
(cl-destructuring-bind (stats) event-args
- (setq buffer (ert--setup-results-buffer stats
- listener
- output-buffer-name))
+ (setq buffer (ert--setup-results-buffer stats listener))
(pop-to-buffer buffer)))
(run-ended
(cl-destructuring-bind (stats abortedp) event-args
- (funcall message-fn
+ (message
"%sRan %s tests, %s results were as expected%s%s"
(if (not abortedp)
""
@@ -2394,7 +2421,7 @@ To be used in the ERT results buffer."
(interactive nil ert-results-mode)
(cl-assert (eql major-mode 'ert-results-mode))
(let ((selector (ert--stats-selector ert--results-stats)))
- (ert-run-tests-interactively selector (buffer-name))))
+ (ert-run-tests-interactively selector)))
(defun ert-results-rerun-test-at-point ()
"Re-run the test at point.
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index d90d0f5f6ac..416d64558d9 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1308,6 +1308,7 @@ Lisp function does not specify a special indentation."
(put 'handler-bind 'lisp-indent-function 1) ;CL
(put 'unwind-protect 'lisp-indent-function 1)
(put 'with-output-to-temp-buffer 'lisp-indent-function 1)
+(put 'closure 'lisp-indent-function 2)
(defun indent-sexp (&optional endpos)
"Indent each line of the list starting just after point.
diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el
index b95f11eab64..2f2f96ca0da 100644
--- a/lisp/emacs-lisp/map-ynp.el
+++ b/lisp/emacs-lisp/map-ynp.el
@@ -215,12 +215,12 @@ The function's value is the number of actions taken."
(action (or (nth 2 help) "act on")))
(concat
(format-message
- "\
-Type SPC or `y' to %s the current %s;
-DEL or `n' to skip the current %s;
-RET or `q' to skip the current and all remaining %s;
-C-g to quit (cancel the whole command);
-! to %s all remaining %s;\n"
+ (substitute-command-keys "\
+Type \\`SPC' or \\`y' to %s the current %s;
+\\`DEL' or \\`n' to skip the current %s;
+\\`RET' or \\`q' to skip the current and all remaining %s;
+\\`C-g' to quit (cancel the whole command);
+\\`!' to %s all remaining %s;\n")
action object object objects action objects)
(mapconcat (lambda (elt)
(format "%s to %s;\n"
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index aec438ed994..5516b2a81f4 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -448,7 +448,8 @@ provided in the Commentary section of this library."
(setq reb-subexp-mode t)
(reb-update-modestring)
(use-local-map reb-subexp-mode-map)
- (message "`0'-`9' to display subexpressions `q' to quit subexp mode"))
+ (message (substitute-command-keys
+ "\\`0'-\\`9' to display subexpressions \\`q' to quit subexp mode")))
(defun reb-show-subexp (subexp &optional pause)
"Visually show limit of subexpression SUBEXP of recent search.
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index a9f548b104e..ba08e68af57 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -159,8 +159,6 @@ There can be any number of :example/:result elements."
:eval (split-string-and-unquote "foo \"bar zot\""))
(split-string-shell-command
:eval (split-string-shell-command "ls /tmp/'foo bar'"))
- (string-glyph-split
- :eval (string-glyph-split "Hello, 👼🏻🧑🏼🤝🧑🏻"))
(string-lines
:eval (string-lines "foo\n\nbar")
:eval (string-lines "foo\n\nbar" t))
@@ -198,6 +196,13 @@ There can be any number of :example/:result elements."
:eval (substring-no-properties (propertize "foobar" 'face 'bold) 0 3))
(try-completion
:eval (try-completion "foo" '("foobar" "foozot" "gazonk")))
+ "Unicode Strings"
+ (string-glyph-split
+ :eval (string-glyph-split "Hello, 👼🏻🧑🏼🤝🧑🏻"))
+ (string-glyph-compose
+ :eval (string-glyph-compose "Å"))
+ (string-glyph-decompose
+ :eval (string-glyph-decompose "Å"))
"Predicates for Strings"
(string-equal
:eval (string-equal "foo" "foo"))
@@ -1222,6 +1227,39 @@ There can be any number of :example/:result elements."
(text-property-search-backward
:no-eval (text-property-search-backward 'face nil t)))
+(define-short-documentation-group keymaps
+ "Defining keymaps"
+ (define-keymap
+ :no-eval (define-keymap "C-c C-c" #'quit-buffer))
+ (defvar-keymap
+ :no-eval (defvar-keymap my-keymap "C-c C-c" map #'quit-buffer))
+ "Setting keys"
+ (keymap-set
+ :no-eval (keymap-set map "C-c C-c" #'quit-buffer))
+ (keymap-local-set
+ :no-eval (keymap-local-set "C-c C-c" #'quit-buffer))
+ (keymap-global-set
+ :no-eval (keymap-global-set "C-c C-c" #'quit-buffer))
+ (keymap-unset
+ :no-eval (keymap-unset map "C-c C-c"))
+ (keymap-local-unset
+ :no-eval (keymap-local-unset "C-c C-c"))
+ (keymap-global-unset
+ :no-eval (keymap-global-unset "C-c C-c"))
+ (keymap-substitute
+ :no-eval (keymap-substitute map "C-c C-c" "M-a"))
+ (keymap-set-after
+ :no-eval (keymap-set-after map "" menu-bar-separator))
+ "Predicates"
+ (keymapp
+ :eval (keymapp (define-keymap)))
+ (key-valid-p
+ :eval (key-valid-p "C-c C-c")
+ :eval (key-valid-p "C-cC-c"))
+ "Lookup"
+ (keymap-lookup
+ :eval (keymap-lookup (current-global-map) "C-x x g")))
+
;;;###autoload
(defun shortdoc-display-group (group &optional function)
"Pop to a buffer with short documentation summary for functions in GROUP.
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index f336799040f..b53245b9b5f 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -446,8 +446,7 @@ is inserted before adjusting the number of empty lines."
"Return the width of STRING in pixels."
(with-temp-buffer
(insert string)
- (car (window-text-pixel-size
- (current-buffer) (point-min) (point)))))
+ (car (buffer-text-pixel-size nil nil t))))
;;;###autoload
(defun string-glyph-split (string)
@@ -457,7 +456,12 @@ This takes into account combining characters and grapheme clusters."
(start 0)
comp)
(while (< start (length string))
- (if (setq comp (find-composition-internal start nil string nil))
+ (if (setq comp (find-composition-internal
+ start
+ ;; Don't search backward in the string for the
+ ;; start of the composition.
+ (min (length string) (1+ start))
+ string nil))
(progn
(push (substring string (car comp) (cadr comp)) result)
(setq start (cadr comp)))
@@ -465,6 +469,48 @@ This takes into account combining characters and grapheme clusters."
(setq start (1+ start))))
(nreverse result)))
+;;;###autoload
+(defun add-display-text-property (start end prop value
+ &optional object)
+ "Add display property PROP with VALUE to the text from START to END.
+If any text in the region has a non-nil `display' property, those
+properties are retained.
+
+If OBJECT is non-nil, it should be a string or a buffer. If nil,
+this defaults to the current buffer."
+ (let ((sub-start start)
+ (sub-end 0)
+ disp)
+ (while (< sub-end end)
+ (setq sub-end (next-single-property-change sub-start 'display object
+ (if (stringp object)
+ (min (length object) end)
+ (min end (point-max)))))
+ (if (not (setq disp (get-text-property sub-start 'display object)))
+ ;; No old properties in this range.
+ (put-text-property sub-start sub-end 'display (list prop value))
+ ;; We have old properties.
+ (let ((vector nil))
+ ;; Make disp into a list.
+ (setq disp
+ (cond
+ ((vectorp disp)
+ (setq vector t)
+ (seq-into disp 'list))
+ ((not (consp (car disp)))
+ (list disp))
+ (t
+ disp)))
+ ;; Remove any old instances.
+ (when-let ((old (assoc prop disp)))
+ (setq disp (delete old disp)))
+ (setq disp (cons (list prop value) disp))
+ (when vector
+ (setq disp (seq-into disp 'vector)))
+ ;; Finally update the range.
+ (put-text-property sub-start sub-end 'display disp)))
+ (setq sub-start sub-end))))
+
(provide 'subr-x)
;;; subr-x.el ends here
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 59be3f48462..849ad3d8241 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -2311,7 +2311,6 @@ problems."
(viper-downgrade-to-insert))
(defun viper-start-R-mode ()
- ;; Leave arg as 1, not t: XEmacs insists that it must be a pos number
(overwrite-mode 1)
(add-hook
'viper-post-command-hooks #'viper-R-state-post-command-sentinel t 'local)
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index e3790b74534..368a5dc40a6 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -44,7 +44,6 @@
(define-obsolete-function-alias 'viper-device-type #'window-system "27.1")
-;; in XEmacs: device-type is tty on tty and stream in batch.
(defun viper-window-display-p ()
(and window-system (not (memq window-system '(tty stream pc)))))
diff --git a/lisp/emulation/viper-mous.el b/lisp/emulation/viper-mous.el
index 3d55690bd6f..879d8edca6f 100644
--- a/lisp/emulation/viper-mous.el
+++ b/lisp/emulation/viper-mous.el
@@ -198,8 +198,7 @@ is ignored."
(setq result (buffer-substring word-beg (point))))
) ; if
- ;; XEmacs doesn't have set-text-properties, but there buffer-substring
- ;; doesn't return properties together with the string, so it's not needed.
+ ;; FIXME: Use `buffer-substring-no-properties' above instead?
(set-text-properties 0 (length result) nil result)
result))
diff --git a/lisp/epa-ks.el b/lisp/epa-ks.el
index 35caa1a93c5..5dd6ad34d74 100644
--- a/lisp/epa-ks.el
+++ b/lisp/epa-ks.el
@@ -210,7 +210,8 @@ KEYS is a list of `epa-ks-key' structures, as parsed by
(with-current-buffer buf
(setq tabulated-list-entries entries)
(tabulated-list-print t t))
- (message "Press `f' to mark a key, `x' to fetch all marked keys."))))
+ (message (substitute-command-keys
+ "Press \\`f' to mark a key, \\`x' to fetch all marked keys.")))))
(defun epa-ks--restart-search ()
(when epa-ks-last-query
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index abb1f64a822..df6c3c09d90 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1479,6 +1479,7 @@ Defaults to the server buffer."
(define-derived-mode erc-mode fundamental-mode "ERC"
"Major mode for Emacs IRC."
+ :interactive nil
(setq local-abbrev-table erc-mode-abbrev-table)
(setq-local next-line-add-newlines nil)
(setq line-move-ignore-invisible t)
@@ -2404,7 +2405,8 @@ If ARG is non-nil, show the *erc-protocol* buffer."
(concat "This buffer displays all IRC protocol "
"traffic exchanged with servers."))
(erc-make-notice "Kill it to disable logging.")
- (erc-make-notice "Press `t' to toggle."))))
+ (erc-make-notice (substitute-command-keys
+ "Press \\`t' to toggle.")))))
(insert (string-join msg "\r\n")))
(use-local-map (make-sparse-keymap))
(local-set-key (kbd "t") 'erc-toggle-debug-irc-protocol))
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index a054cd66e27..cae5236d894 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -308,7 +308,7 @@ and the hook `eshell-exit-hook'."
(make-local-variable 'eshell-command-running-string)
(let ((fmt (copy-sequence mode-line-format)))
(setq-local mode-line-format fmt))
- (let ((mode-line-elt (memq 'mode-line-modified mode-line-format)))
+ (let ((mode-line-elt (cdr (memq 'mode-line-front-space mode-line-format))))
(if mode-line-elt
(setcar mode-line-elt 'eshell-command-running-string))))
diff --git a/lisp/faces.el b/lisp/faces.el
index 5804f56378f..535fa44246e 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1172,9 +1172,8 @@ an integer value."
(:height
'integerp)
(:stipple
- (and (memq (window-system frame) '(x ns pgtk)) ; No stipple on w32
- (mapcar (lambda (f)
- (cons (file-name-base f) f))
+ (and (memq (window-system frame) '(x ns pgtk)) ; No stipple on w32 or haiku
+ (mapcar #'list
(apply #'nconc
(mapcar (lambda (dir)
(and (file-readable-p dir)
@@ -2615,14 +2614,23 @@ non-nil."
:background "grey75" :foreground "black")
(t
:inverse-video t))
- "Basic mode line face for selected window."
+ "Face for the mode lines (for the selected window) as well as header lines.
+See `mode-line-display' for the face used on mode lines."
:version "21.1"
:group 'mode-line-faces
:group 'basic-faces)
+(defface mode-line-active
+ '((t :inherit (mode-line variable-pitch)))
+ "Face for the selected mode line.
+This inherits from the `mode-line' face."
+ :version "29.1"
+ :group 'mode-line-faces
+ :group 'basic-faces)
+
(defface mode-line-inactive
'((default
- :inherit mode-line)
+ :inherit (mode-line variable-pitch))
(((class color) (min-colors 88) (background light))
:weight light
:box (:line-width -1 :color "grey75" :style nil)
@@ -2823,7 +2831,7 @@ Note: Other faces cannot inherit from the cursor face."
'((default
:box (:line-width 1 :style released-button)
:foreground "black")
- (((type x w32 ns pgtk) (class color))
+ (((type x w32 ns haiku pgtk) (class color))
:background "grey75")
(((type x) (class mono))
:background "grey"))
@@ -2884,13 +2892,17 @@ Note: Other faces cannot inherit from the cursor face."
;; making the characters wider, which then would cause unpleasant
;; horizontal shifts of the cursor during C-n/C-p movement
;; through a line with this face.
- :box (:line-width (-1 . -1) :color "grey80"))
+ :box (:line-width (-1 . -1) :color "grey80")
+ :inherit fixed-pitch)
(((class color) (min-colors 88) (background dark))
:background "grey19" :foreground "LightBlue"
- :box (:line-width (-1 . -1) :color "grey35"))
- (((class color grayscale) (background light)) :background "grey90")
- (((class color grayscale) (background dark)) :background "grey25")
- (t :background "grey90"))
+ :box (:line-width (-1 . -1) :color "grey35")
+ :inherit fixed-pitch)
+ (((class color grayscale) (background light)) :background "grey90"
+ :inherit fixed-pitch)
+ (((class color grayscale) (background dark)) :background "grey25"
+ :inherit fixed-pitch)
+ (t :background "grey90" :inherit fixed-pitch))
"Face for keybindings in *Help* buffers.
This face is added by `substitute-command-keys', which see.
diff --git a/lisp/files.el b/lisp/files.el
index 3490d0428a0..f72723ab7dd 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -68,6 +68,31 @@ a regexp matching the name it is linked to."
:group 'abbrev
:group 'find-file)
+(defun directory-abbrev-make-regexp (directory)
+ "Create a regexp to match DIRECTORY for `directory-abbrev-alist'."
+ (let ((regexp
+ ;; We include a slash at the end, to avoid spurious
+ ;; matches such as `/usr/foobar' when the home dir is
+ ;; `/usr/foo'.
+ (concat "\\`" (regexp-quote directory) "\\(/\\|\\'\\)")))
+ ;; The value of regexp could be multibyte or unibyte. In the
+ ;; latter case, we need to decode it.
+ (if (multibyte-string-p regexp)
+ regexp
+ (decode-coding-string regexp
+ (if (eq system-type 'windows-nt)
+ 'utf-8
+ locale-coding-system)))))
+
+(defun directory-abbrev-apply (filename)
+ "Apply the abbreviations in `directory-abbrev-alist' to FILENAME.
+Note that when calling this, you should set `case-fold-search' as
+appropriate for the filesystem used for FILENAME."
+ (dolist (dir-abbrev directory-abbrev-alist filename)
+ (when (string-match (car dir-abbrev) filename)
+ (setq filename (concat (cdr dir-abbrev)
+ (substring filename (match-end 0)))))))
+
(defcustom make-backup-files t
"Non-nil means make a backup of a file the first time it is saved.
This can be done by renaming the file or by copying.
@@ -2015,73 +2040,54 @@ if you want to permanently change your home directory after having
started Emacs, set `abbreviated-home-dir' to nil so it will be recalculated)."
;; Get rid of the prefixes added by the automounter.
(save-match-data ;FIXME: Why?
- (if (and automount-dir-prefix
- (string-match automount-dir-prefix filename)
- (file-exists-p (file-name-directory
- (substring filename (1- (match-end 0))))))
- (setq filename (substring filename (1- (match-end 0)))))
- ;; Avoid treating /home/foo as /home/Foo during `~' substitution.
- (let ((case-fold-search (file-name-case-insensitive-p filename)))
- ;; If any elt of directory-abbrev-alist matches this name,
- ;; abbreviate accordingly.
- (dolist (dir-abbrev directory-abbrev-alist)
- (if (string-match (car dir-abbrev) filename)
- (setq filename
- (concat (cdr dir-abbrev)
- (substring filename (match-end 0))))))
- ;; Compute and save the abbreviated homedir name.
- ;; We defer computing this until the first time it's needed, to
- ;; give time for directory-abbrev-alist to be set properly.
- ;; We include a slash at the end, to avoid spurious matches
- ;; such as `/usr/foobar' when the home dir is `/usr/foo'.
- (unless abbreviated-home-dir
- (put 'abbreviated-home-dir 'home (expand-file-name "~"))
- (setq abbreviated-home-dir
- (let* ((abbreviated-home-dir "\\`\\'.") ;Impossible regexp.
- (regexp
- (concat "\\`"
- (regexp-quote
- (abbreviate-file-name
- (get 'abbreviated-home-dir 'home)))
- "\\(/\\|\\'\\)")))
- ;; Depending on whether default-directory does or
- ;; doesn't include non-ASCII characters, the value
- ;; of abbreviated-home-dir could be multibyte or
- ;; unibyte. In the latter case, we need to decode
- ;; it. Note that this function is called for the
- ;; first time (from startup.el) when
- ;; locale-coding-system is already set up.
- (if (multibyte-string-p regexp)
- regexp
- (decode-coding-string regexp
- (if (eq system-type 'windows-nt)
- 'utf-8
- locale-coding-system))))))
+ (if-let ((handler (find-file-name-handler filename 'abbreviate-file-name)))
+ (funcall handler 'abbreviate-file-name filename)
+ (if (and automount-dir-prefix
+ (string-match automount-dir-prefix filename)
+ (file-exists-p (file-name-directory
+ (substring filename (1- (match-end 0))))))
+ (setq filename (substring filename (1- (match-end 0)))))
+ ;; Avoid treating /home/foo as /home/Foo during `~' substitution.
+ (let ((case-fold-search (file-name-case-insensitive-p filename)))
+ ;; If any elt of directory-abbrev-alist matches this name,
+ ;; abbreviate accordingly.
+ (setq filename (directory-abbrev-apply filename))
- ;; If FILENAME starts with the abbreviated homedir,
- ;; and ~ hasn't changed since abbreviated-home-dir was set,
- ;; make it start with `~' instead.
- ;; If ~ has changed, we ignore abbreviated-home-dir rather than
- ;; invalidating it, on the assumption that a change in HOME
- ;; is likely temporary (eg for testing).
- ;; FIXME Is it even worth caching abbreviated-home-dir?
- ;; Ref: https://debbugs.gnu.org/19657#20
- (let (mb1)
- (if (and (string-match abbreviated-home-dir filename)
- (setq mb1 (match-beginning 1))
- ;; If the home dir is just /, don't change it.
- (not (and (= (match-end 0) 1)
- (= (aref filename 0) ?/)))
- ;; MS-DOS root directories can come with a drive letter;
- ;; Novell Netware allows drive letters beyond `Z:'.
- (not (and (memq system-type '(ms-dos windows-nt cygwin))
- (string-match "\\`[a-zA-`]:/\\'" filename)))
- (equal (get 'abbreviated-home-dir 'home)
- (expand-file-name "~")))
- (setq filename
- (concat "~"
- (substring filename mb1))))
- filename))))
+ ;; Compute and save the abbreviated homedir name.
+ ;; We defer computing this until the first time it's needed, to
+ ;; give time for directory-abbrev-alist to be set properly.
+ (unless abbreviated-home-dir
+ (put 'abbreviated-home-dir 'home (expand-file-name "~"))
+ (setq abbreviated-home-dir
+ (directory-abbrev-make-regexp
+ (let ((abbreviated-home-dir "\\`\\'.")) ;Impossible regexp.
+ (abbreviate-file-name
+ (get 'abbreviated-home-dir 'home))))))
+
+ ;; If FILENAME starts with the abbreviated homedir,
+ ;; and ~ hasn't changed since abbreviated-home-dir was set,
+ ;; make it start with `~' instead.
+ ;; If ~ has changed, we ignore abbreviated-home-dir rather than
+ ;; invalidating it, on the assumption that a change in HOME
+ ;; is likely temporary (eg for testing).
+ ;; FIXME Is it even worth caching abbreviated-home-dir?
+ ;; Ref: https://debbugs.gnu.org/19657#20
+ (let (mb1)
+ (if (and (string-match abbreviated-home-dir filename)
+ (setq mb1 (match-beginning 1))
+ ;; If the home dir is just /, don't change it.
+ (not (and (= (match-end 0) 1)
+ (= (aref filename 0) ?/)))
+ ;; MS-DOS root directories can come with a drive letter;
+ ;; Novell Netware allows drive letters beyond `Z:'.
+ (not (and (memq system-type '(ms-dos windows-nt cygwin))
+ (string-match "\\`[a-zA-`]:/\\'" filename)))
+ (equal (get 'abbreviated-home-dir 'home)
+ (expand-file-name "~")))
+ (setq filename
+ (concat "~"
+ (substring filename mb1))))
+ filename)))))
(defun find-buffer-visiting (filename &optional predicate)
"Return the buffer visiting file FILENAME (a string).
@@ -5800,13 +5806,13 @@ of the directory that was default during command invocation."
(defun save-some-buffers (&optional arg pred)
"Save some modified file-visiting buffers. Asks user about each one.
-You can answer `y' or SPC to save, `n' or DEL not to save, `C-r'
+You can answer \\`y' or \\`SPC' to save, \\`n' or \\`DEL' not to save, \\`C-r'
to look at the buffer in question with `view-buffer' before
-deciding, `d' to view the differences using
-`diff-buffer-with-file', `!' to save the buffer and all remaining
-buffers without any further querying, `.' to save only the
-current buffer and skip the remaining ones and `q' or RET to exit
-the function without saving any more buffers. `C-h' displays a
+deciding, \\`d' to view the differences using
+`diff-buffer-with-file', \\`!' to save the buffer and all remaining
+buffers without any further querying, \\`.' to save only the
+current buffer and skip the remaining ones and \\`q' or \\`RET' to exit
+the function without saving any more buffers. \\`C-h' displays a
help message describing these options.
This command first saves any buffers where `buffer-save-without-query' is
@@ -6218,8 +6224,7 @@ of `file-has-changed-p' always returns non-nil when FILE exists.
The optional argument TAG, which must be a symbol, can be used to
limit the comparison to invocations with identical tags; it can be
the symbol of the calling function, for example."
- (let* (;; FIXME: Shall we use `file-truename'?
- (file (directory-file-name file))
+ (let* ((file (directory-file-name (expand-file-name file)))
(remote-file-name-inhibit-cache t)
(fileattr (file-attributes file 'integer))
(attr (and fileattr
@@ -7836,10 +7841,11 @@ only these files will be asked to be saved."
;; Get a list of the indices of the args that are file names.
(file-arg-indices
(cdr (or (assq operation
- '(;; The first seven are special because they
+ '(;; The first eight are special because they
;; return a file name. We want to include
;; the /: in the return value. So just
;; avoid stripping it in the first place.
+ (abbreviate-file-name)
(directory-file-name)
(expand-file-name)
(file-name-as-directory)
diff --git a/lisp/follow.el b/lisp/follow.el
index 2ca2c1f17ba..3761275bbf6 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -669,24 +669,30 @@ Works like `scroll-down' when not in Follow mode."
(t
(let* ((orig-point (point))
(windows (follow-all-followers))
- (win (car (reverse windows)))
- (start (window-start (car windows))))
+ (start (window-start (car windows)))
+ (lines 0))
(if (eq start (point-min))
(if (or (null scroll-error-top-bottom)
(bobp))
(signal 'beginning-of-buffer nil)
(goto-char (point-min)))
- (select-window win)
- (goto-char start)
- (vertical-motion (- (- (window-height win)
- (if header-line-format 2 1) ; always mode-line
- (if tab-line-format 1 0)
- next-screen-context-lines)))
- (set-window-start win (point))
- (if (< orig-point (window-end win t))
- (goto-char orig-point)
- (goto-char start)
- (vertical-motion (- next-screen-context-lines 1)))
+ (select-window (car windows))
+ (dolist (win windows)
+ (setq lines
+ (+ lines
+ (- (window-height win)
+ (if header-line-format 2 1) ; Count mode-line, too.
+ (if tab-line-format 1 0)))))
+ (setq lines (- lines next-screen-context-lines))
+ (goto-char start)
+ (let ((at-top (> (vertical-motion (- lines)) (- lines))))
+ (set-window-start (car windows) (point))
+ (if at-top
+ (goto-char orig-point)
+ (goto-char start)
+ (vertical-motion (- next-screen-context-lines 1))
+ (if (< orig-point (point))
+ (goto-char orig-point))))
(setq follow-internal-force-redisplay t))))))
(put 'follow-scroll-down 'scroll-command t)
diff --git a/lisp/frame.el b/lisp/frame.el
index 5e54d8d9af7..c9306ec46df 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1634,6 +1634,7 @@ live frame and defaults to the selected one."
(declare-function w32-frame-geometry "w32fns.c" (&optional frame))
(declare-function ns-frame-geometry "nsfns.m" (&optional frame))
(declare-function pgtk-frame-geometry "pgtkfns.c" (&optional frame))
+(declare-function haiku-frame-geometry "haikufns.c" (&optional frame))
(defun frame-geometry (&optional frame)
"Return geometric attributes of FRAME.
@@ -1685,6 +1686,8 @@ and width values are in pixels.
(ns-frame-geometry frame))
((eq frame-type 'pgtk)
(pgtk-frame-geometry frame))
+ ((eq frame-type 'haiku)
+ (haiku-frame-geometry frame))
(t
(list
'(outer-position 0 . 0)
@@ -1810,6 +1813,7 @@ of frames like calls to map a frame or change its visibility."
(declare-function w32-frame-edges "w32fns.c" (&optional frame type))
(declare-function ns-frame-edges "nsfns.m" (&optional frame type))
(declare-function pgtk-frame-edges "pgtkfns.c" (&optional frame type))
+(declare-function haiku-frame-edges "haikufns.c" (&optional frame type))
(defun frame-edges (&optional frame type)
"Return coordinates of FRAME's edges.
@@ -1835,6 +1839,8 @@ FRAME."
(ns-frame-edges frame type))
((eq frame-type 'pgtk)
(pgtk-frame-edges frame type))
+ ((eq frame-type 'haiku)
+ (haiku-frame-edges frame type))
(t
(list 0 0 (frame-width frame) (frame-height frame))))))
@@ -1842,6 +1848,7 @@ FRAME."
(declare-function x-mouse-absolute-pixel-position "xfns.c")
(declare-function ns-mouse-absolute-pixel-position "nsfns.m")
(declare-function pgtk-mouse-absolute-pixel-position "pgtkfns.c")
+(declare-function haiku-mouse-absolute-pixel-position "haikufns.c")
(defun mouse-absolute-pixel-position ()
"Return absolute position of mouse cursor in pixels.
@@ -1858,6 +1865,8 @@ position (0, 0) of the selected frame's terminal."
(ns-mouse-absolute-pixel-position))
((eq frame-type 'pgtk)
(pgtk-mouse-absolute-pixel-position))
+ ((eq frame-type 'haiku)
+ (haiku-mouse-absolute-pixel-position))
(t
(cons 0 0)))))
@@ -1865,6 +1874,7 @@ position (0, 0) of the selected frame's terminal."
(declare-function ns-set-mouse-absolute-pixel-position "nsfns.m" (x y))
(declare-function w32-set-mouse-absolute-pixel-position "w32fns.c" (x y))
(declare-function x-set-mouse-absolute-pixel-position "xfns.c" (x y))
+(declare-function haiku-set-mouse-absolute-pixel-position "haikufns.c" (x y))
(defun set-mouse-absolute-pixel-position (x y)
"Move mouse pointer to absolute pixel position (X, Y).
@@ -1879,7 +1889,9 @@ position (0, 0) of the selected frame's terminal."
((eq frame-type 'x)
(x-set-mouse-absolute-pixel-position x y))
((eq frame-type 'w32)
- (w32-set-mouse-absolute-pixel-position x y)))))
+ (w32-set-mouse-absolute-pixel-position x y))
+ ((eq frame-type 'haiku)
+ (haiku-set-mouse-absolute-pixel-position x y)))))
(defun frame-monitor-attributes (&optional frame)
"Return the attributes of the physical monitor dominating FRAME.
@@ -1973,6 +1985,7 @@ workarea attribute."
(declare-function w32-frame-list-z-order "w32fns.c" (&optional display))
(declare-function ns-frame-list-z-order "nsfns.m" (&optional display))
(declare-function pgtk-frame-list-z-order "pgtkfns.c" (&optional display))
+(declare-function haiku-frame-list-z-order "haikufns.c" (&optional display))
(defun frame-list-z-order (&optional display)
"Return list of Emacs' frames, in Z (stacking) order.
@@ -1994,7 +2007,9 @@ Return nil if DISPLAY contains no Emacs frame."
((eq frame-type 'ns)
(ns-frame-list-z-order display))
((eq frame-type 'pgtk)
- (pgtk-frame-list-z-order display)))))
+ (pgtk-frame-list-z-order display))
+ ((eq frame-type 'haiku)
+ (haiku-frame-list-z-order display)))))
(declare-function x-frame-restack "xfns.c" (frame1 frame2 &optional above))
(declare-function w32-frame-restack "w32fns.c" (frame1 frame2 &optional above))
@@ -2078,8 +2093,8 @@ frame's display)."
((eq frame-type 'w32)
(with-no-warnings
(> w32-num-mouse-buttons 0)))
- ((memq frame-type '(x ns pgtk))
- t) ;; We assume X and NeXTstep *always* have a pointing device
+ ((memq frame-type '(x ns haiku pgtk))
+ t) ;; We assume X, NeXTstep, GTK, and Haiku *always* have a pointing device
(t
(or (and (featurep 'xt-mouse)
xterm-mouse-mode)
@@ -2104,7 +2119,7 @@ frames and several different fonts at once. This is true for displays
that use a window system such as X, and false for text-only terminals.
DISPLAY can be a display name, a frame, or nil (meaning the selected
frame's display)."
- (not (null (memq (framep-on-display display) '(x w32 ns pgtk)))))
+ (not (null (memq (framep-on-display display) '(x w32 ns haiku haiku)))))
(defun display-images-p (&optional display)
"Return non-nil if DISPLAY can display images.
@@ -2155,7 +2170,7 @@ DISPLAY should be either a frame or a display name (a string).
If DISPLAY is omitted or nil, it defaults to the selected frame's display."
(let ((frame-type (framep-on-display display)))
(cond
- ((memq frame-type '(x w32 ns pgtk))
+ ((memq frame-type '(x w32 ns haiku pgtk))
(x-display-screens display))
(t
1))))
@@ -2175,7 +2190,7 @@ with DISPLAY. To get information for each physical monitor, use
`display-monitor-attributes-list'."
(let ((frame-type (framep-on-display display)))
(cond
- ((memq frame-type '(x w32 ns pgtk))
+ ((memq frame-type '(x w32 ns haiku pgtk))
(x-display-pixel-height display))
(t
(frame-height (if (framep display) display (selected-frame)))))))
@@ -2195,7 +2210,7 @@ with DISPLAY. To get information for each physical monitor, use
`display-monitor-attributes-list'."
(let ((frame-type (framep-on-display display)))
(cond
- ((memq frame-type '(x w32 ns pgtk))
+ ((memq frame-type '(x w32 ns haiku pgtk))
(x-display-pixel-width display))
(t
(frame-width (if (framep display) display (selected-frame)))))))
@@ -2233,7 +2248,7 @@ For graphical terminals, note that on \"multi-monitor\" setups this
refers to the height in millimeters for all physical monitors
associated with DISPLAY. To get information for each physical
monitor, use `display-monitor-attributes-list'."
- (and (memq (framep-on-display display) '(x w32 ns pgtk))
+ (and (memq (framep-on-display display) '(x w32 ns haiku pgtk))
(or (cddr (assoc (or display (frame-parameter nil 'display))
display-mm-dimensions-alist))
(cddr (assoc t display-mm-dimensions-alist))
@@ -2254,7 +2269,7 @@ For graphical terminals, note that on \"multi-monitor\" setups this
refers to the width in millimeters for all physical monitors
associated with DISPLAY. To get information for each physical
monitor, use `display-monitor-attributes-list'."
- (and (memq (framep-on-display display) '(x w32 ns pgtk))
+ (and (memq (framep-on-display display) '(x w32 ns haiku pgtk))
(or (cadr (assoc (or display (frame-parameter nil 'display))
display-mm-dimensions-alist))
(cadr (assoc t display-mm-dimensions-alist))
@@ -2272,7 +2287,7 @@ DISPLAY can be a display name or a frame.
If DISPLAY is omitted or nil, it defaults to the selected frame's display."
(let ((frame-type (framep-on-display display)))
(cond
- ((memq frame-type '(x w32 ns pgtk))
+ ((memq frame-type '(x w32 ns haiku pgtk))
(x-display-backing-store display))
(t
'not-useful))))
@@ -2285,7 +2300,7 @@ DISPLAY can be a display name or a frame.
If DISPLAY is omitted or nil, it defaults to the selected frame's display."
(let ((frame-type (framep-on-display display)))
(cond
- ((memq frame-type '(x w32 ns pgtk))
+ ((memq frame-type '(x w32 ns haiku pgtk))
(x-display-save-under display))
(t
'not-useful))))
@@ -2298,7 +2313,7 @@ DISPLAY can be a display name or a frame.
If DISPLAY is omitted or nil, it defaults to the selected frame's display."
(let ((frame-type (framep-on-display display)))
(cond
- ((memq frame-type '(x w32 ns pgtk))
+ ((memq frame-type '(x w32 ns haiku pgtk))
(x-display-planes display))
((eq frame-type 'pc)
4)
@@ -2313,7 +2328,7 @@ DISPLAY can be a display name or a frame.
If DISPLAY is omitted or nil, it defaults to the selected frame's display."
(let ((frame-type (framep-on-display display)))
(cond
- ((memq frame-type '(x w32 ns pgtk))
+ ((memq frame-type '(x w32 ns haiku pgtk))
(x-display-color-cells display))
((eq frame-type 'pc)
16)
@@ -2330,7 +2345,7 @@ DISPLAY can be a display name or a frame.
If DISPLAY is omitted or nil, it defaults to the selected frame's display."
(let ((frame-type (framep-on-display display)))
(cond
- ((memq frame-type '(x w32 ns pgtk))
+ ((memq frame-type '(x w32 ns haiku pgtk))
(x-display-visual-class display))
((and (memq frame-type '(pc t))
(tty-display-color-p display))
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index 20da295aca9..169a351c2c7 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -476,15 +476,15 @@ manipulated as follows:
(intern (format "gnus-agent-%s-mode-hook" buffer)))))
(defvar-keymap gnus-agent-group-mode-map
- "Ju" #'gnus-agent-fetch-groups
- "Jc" #'gnus-enter-category-buffer
- "Jj" #'gnus-agent-toggle-plugged
- "Js" #'gnus-agent-fetch-session
- "JY" #'gnus-agent-synchronize-flags
- "JS" #'gnus-group-send-queue
- "Ja" #'gnus-agent-add-group
- "Jr" #'gnus-agent-remove-group
- "Jo" #'gnus-agent-toggle-group-plugged)
+ "J u" #'gnus-agent-fetch-groups
+ "J c" #'gnus-enter-category-buffer
+ "J j" #'gnus-agent-toggle-plugged
+ "J s" #'gnus-agent-fetch-session
+ "J Y" #'gnus-agent-synchronize-flags
+ "J S" #'gnus-group-send-queue
+ "J a" #'gnus-agent-add-group
+ "J r" #'gnus-agent-remove-group
+ "J o" #'gnus-agent-toggle-group-plugged)
(defun gnus-agent-group-make-menu-bar ()
(unless (boundp 'gnus-agent-group-menu)
@@ -504,14 +504,14 @@ manipulated as follows:
))))
(defvar-keymap gnus-agent-summary-mode-map
- "Jj" #'gnus-agent-toggle-plugged
- "Ju" #'gnus-agent-summary-fetch-group
- "JS" #'gnus-agent-fetch-group
- "Js" #'gnus-agent-summary-fetch-series
- "J#" #'gnus-agent-mark-article
- "J\M-#" #'gnus-agent-unmark-article
+ "J j" #'gnus-agent-toggle-plugged
+ "J u" #'gnus-agent-summary-fetch-group
+ "J S" #'gnus-agent-fetch-group
+ "J s" #'gnus-agent-summary-fetch-series
+ "J #" #'gnus-agent-mark-article
+ "J M-#" #'gnus-agent-unmark-article
"@" #'gnus-agent-toggle-mark
- "Jc" #'gnus-agent-catchup)
+ "J c" #'gnus-agent-catchup)
(defun gnus-agent-summary-make-menu-bar ()
(unless (boundp 'gnus-agent-summary-menu)
@@ -526,9 +526,9 @@ manipulated as follows:
["Catchup undownloaded" gnus-agent-catchup t]))))
(defvar-keymap gnus-agent-server-mode-map
- "Jj" #'gnus-agent-toggle-plugged
- "Ja" #'gnus-agent-add-server
- "Jr" #'gnus-agent-remove-server)
+ "J j" #'gnus-agent-toggle-plugged
+ "J a" #'gnus-agent-add-server
+ "J r" #'gnus-agent-remove-server)
(defun gnus-agent-server-make-menu-bar ()
(unless (boundp 'gnus-agent-server-menu)
@@ -2606,8 +2606,8 @@ General format specifiers can also be used. See Info node
"s" #'gnus-category-edit-score
"l" #'gnus-category-list
- "\C-c\C-i" #'gnus-info-find-node
- "\C-c\C-b" #'gnus-bug)
+ "C-c C-i" #'gnus-info-find-node
+ "C-c C-b" #'gnus-bug)
(defcustom gnus-category-menu-hook nil
"Hook run after the creation of the menu."
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 78ce89dde3c..02f0d50be5d 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -768,28 +768,37 @@ Obsolete; use the face `gnus-signature' for customizations instead."
:group 'gnus-article-highlight
:group 'gnus-article-signature)
+(defface gnus-header
+ '((t nil))
+ "Base face used for all Gnus header faces.
+All the other `gnus-header-' faces inherit from this face."
+ :version "29.1"
+ :group 'gnus-article-headers
+ :group 'gnus-article-highlight)
+
(defface gnus-header-from
'((((class color)
(background dark))
- (:foreground "PaleGreen1"))
+ (:foreground "PaleGreen1" :inherit gnus-header))
(((class color)
(background light))
- (:foreground "red3"))
+ (:foreground "red3" :inherit gnus-header))
(t
- (:italic t)))
+ (:italic t :inherit gnus-header)))
"Face used for displaying from headers."
+ :version "29.1"
:group 'gnus-article-headers
:group 'gnus-article-highlight)
(defface gnus-header-subject
'((((class color)
(background dark))
- (:foreground "SeaGreen1"))
+ (:foreground "SeaGreen1" :inherit gnus-header))
(((class color)
(background light))
- (:foreground "red4"))
+ (:foreground "red4" :inherit gnus-header))
(t
- (:bold t :italic t)))
+ (:bold t :italic t :inherit gnus-header)))
"Face used for displaying subject headers."
:group 'gnus-article-headers
:group 'gnus-article-highlight)
@@ -797,7 +806,7 @@ Obsolete; use the face `gnus-signature' for customizations instead."
(defface gnus-header-newsgroups
'((((class color)
(background dark))
- (:foreground "yellow" :italic t))
+ (:foreground "yellow" :italic t :inherit gnus-header))
(((class color)
(background light))
(:foreground "MidnightBlue" :italic t))
@@ -812,12 +821,12 @@ articles."
(defface gnus-header-name
'((((class color)
(background dark))
- (:foreground "SpringGreen2"))
+ (:foreground "SpringGreen2" :inherit gnus-header))
(((class color)
(background light))
- (:foreground "maroon"))
+ (:foreground "maroon" :inherit gnus-header))
(t
- (:bold t)))
+ (:bold t :inherit gnus-header)))
"Face used for displaying header names."
:group 'gnus-article-headers
:group 'gnus-article-highlight)
@@ -825,12 +834,13 @@ articles."
(defface gnus-header-content
'((((class color)
(background dark))
- (:foreground "SpringGreen1" :italic t))
+ (:foreground "SpringGreen1" :italic t :inherit gnus-header))
(((class color)
(background light))
- (:foreground "indianred4" :italic t))
+ (:foreground "indianred4" :italic t :inherit gnus-header))
(t
- (:italic t))) "Face used for displaying header content."
+ (:italic t :inherit gnus-header)))
+ "Face used for displaying header content."
:group 'gnus-article-headers
:group 'gnus-article-highlight)
@@ -4419,36 +4429,36 @@ If variable `gnus-use-long-file-name' is non-nil, it is
(define-keymap :keymap gnus-article-mode-map :suppress t
:parent button-buffer-map
- " " #'gnus-article-goto-next-page
- [?\S-\ ] #'gnus-article-goto-prev-page
- "\177" #'gnus-article-goto-prev-page
- [delete] #'gnus-article-goto-prev-page
- "\C-c^" #'gnus-article-refer-article
+ "SPC" #'gnus-article-goto-next-page
+ "S-SPC" #'gnus-article-goto-prev-page
+ "DEL" #'gnus-article-goto-prev-page
+ "" #'gnus-article-goto-prev-page
+ "C-c ^" #'gnus-article-refer-article
"h" #'gnus-article-show-summary
"s" #'gnus-article-show-summary
- "\C-c\C-m" #'gnus-article-mail
+ "C-c C-m" #'gnus-article-mail
"?" #'gnus-article-describe-briefly
"<" #'beginning-of-buffer
">" #'end-of-buffer
- "\C-c\C-i" #'gnus-info-find-node
- "\C-c\C-b" #'gnus-bug
+ "C-c C-i" #'gnus-info-find-node
+ "C-c C-b" #'gnus-bug
"R" #'gnus-article-reply-with-original
"F" #'gnus-article-followup-with-original
- "\C-hk" #'gnus-article-describe-key
- "\C-hc" #'gnus-article-describe-key-briefly
- "\C-hb" #'gnus-article-describe-bindings
+ "C-h k" #'gnus-article-describe-key
+ "C-h c" #'gnus-article-describe-key-briefly
+ "C-h b" #'gnus-article-describe-bindings
"e" #'gnus-article-read-summary-keys
- "\C-d" #'gnus-article-read-summary-keys
- "\C-c\C-f" #'gnus-summary-mail-forward
- "\M-*" #'gnus-article-read-summary-keys
- "\M-#" #'gnus-article-read-summary-keys
- "\M-^" #'gnus-article-read-summary-keys
- "\M-g" #'gnus-article-read-summary-keys
+ "C-d" #'gnus-article-read-summary-keys
+ "C-c C-f" #'gnus-summary-mail-forward
+ "M-*" #'gnus-article-read-summary-keys
+ "M-#" #'gnus-article-read-summary-keys
+ "M-^" #'gnus-article-read-summary-keys
+ "M-g" #'gnus-article-read-summary-keys
"S" (define-keymap :prefix 'gnus-article-send-map
"W" #'gnus-article-wide-reply-with-original
- [t] #'gnus-article-read-summary-send-keys))
+ "" #'gnus-article-read-summary-send-keys))
(substitute-key-definition
#'undefined #'gnus-article-read-summary-keys gnus-article-mode-map)
@@ -6897,8 +6907,8 @@ KEY is a string or a vector."
unread-command-events))
(let ((cursor-in-echo-area t)
gnus-pick-mode)
- (describe-key (cons (read-key-sequence nil t)
- (this-single-command-raw-keys))
+ (describe-key (list (cons (read-key-sequence nil t)
+ (this-single-command-raw-keys)))
(current-buffer))))
(describe-key key)))
@@ -6922,8 +6932,8 @@ KEY is a string or a vector."
unread-command-events))
(let ((cursor-in-echo-area t)
gnus-pick-mode)
- (describe-key-briefly (cons (read-key-sequence nil t)
- (this-single-command-raw-keys))
+ (describe-key-briefly (list (cons (read-key-sequence nil t)
+ (this-single-command-raw-keys)))
insert (current-buffer))))
(describe-key-briefly key insert)))
@@ -7254,41 +7264,40 @@ other groups."
(defvar-keymap gnus-article-edit-mode-map
:full t :parent text-mode-map
- "\C-c?" #'describe-mode
- "\C-c\C-c" #'gnus-article-edit-done
- "\C-c\C-k" #'gnus-article-edit-exit
- "\C-c\C-f\C-t" #'message-goto-to
- "\C-c\C-f\C-o" #'message-goto-from
- "\C-c\C-f\C-b" #'message-goto-bcc
- ;;"\C-c\C-f\C-w" message-goto-fcc
- "\C-c\C-f\C-c" #'message-goto-cc
- "\C-c\C-f\C-s" #'message-goto-subject
- "\C-c\C-f\C-r" #'message-goto-reply-to
- "\C-c\C-f\C-n" #'message-goto-newsgroups
- "\C-c\C-f\C-d" #'message-goto-distribution
- "\C-c\C-f\C-f" #'message-goto-followup-to
- "\C-c\C-f\C-m" #'message-goto-mail-followup-to
- "\C-c\C-f\C-k" #'message-goto-keywords
- "\C-c\C-f\C-u" #'message-goto-summary
- "\C-c\C-f\C-i" #'message-insert-or-toggle-importance
- "\C-c\C-f\C-a" #'message-generate-unsubscribed-mail-followup-to
- "\C-c\C-b" #'message-goto-body
- "\C-c\C-i" #'message-goto-signature
+ "C-c ?" #'describe-mode
+ "C-c C-c" #'gnus-article-edit-done
+ "C-c C-k" #'gnus-article-edit-exit
+ "C-c C-f C-t" #'message-goto-to
+ "C-c C-f C-o" #'message-goto-from
+ "C-c C-f C-b" #'message-goto-bcc
+ "C-c C-f C-c" #'message-goto-cc
+ "C-c C-f C-s" #'message-goto-subject
+ "C-c C-f C-r" #'message-goto-reply-to
+ "C-c C-f C-n" #'message-goto-newsgroups
+ "C-c C-f C-d" #'message-goto-distribution
+ "C-c C-f C-f" #'message-goto-followup-to
+ "C-c C-f RET" #'message-goto-mail-followup-to
+ "C-c C-f C-k" #'message-goto-keywords
+ "C-c C-f C-u" #'message-goto-summary
+ "C-c C-f TAB" #'message-insert-or-toggle-importance
+ "C-c C-f C-a" #'message-generate-unsubscribed-mail-followup-to
+ "C-c C-b" #'message-goto-body
+ "C-c TAB" #'message-goto-signature
- "\C-c\C-t" #'message-insert-to
- "\C-c\C-n" #'message-insert-newsgroups
- "\C-c\C-o" #'message-sort-headers
- "\C-c\C-e" #'message-elide-region
- "\C-c\C-v" #'message-delete-not-region
- "\C-c\C-z" #'message-kill-to-signature
- "\M-\r" #'message-newline-and-reformat
- "\C-c\C-a" #'mml-attach-file
- "\C-a" #'message-beginning-of-line
- "\t" #'message-tab
- "\M-;" #'comment-region
+ "C-c C-t" #'message-insert-to
+ "C-c C-n" #'message-insert-newsgroups
+ "C-c C-o" #'message-sort-headers
+ "C-c C-e" #'message-elide-region
+ "C-c C-v" #'message-delete-not-region
+ "C-c C-z" #'message-kill-to-signature
+ "M-RET" #'message-newline-and-reformat
+ "C-c C-a" #'mml-attach-file
+ "C-a" #'message-beginning-of-line
+ "TAB" #'message-tab
+ "M-;" #'comment-region
- "\C-c\C-w" (define-keymap :prefix 'gnus-article-edit-wash-map
- "f" #'gnus-article-edit-full-stops))
+ "C-c C-w" (define-keymap :prefix 'gnus-article-edit-wash-map
+ "f" #'gnus-article-edit-full-stops))
(easy-menu-define
gnus-article-edit-mode-field-menu gnus-article-edit-mode-map ""
diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el
index 171da9d17a0..e9696b66a9f 100644
--- a/lisp/gnus/gnus-bookmark.el
+++ b/lisp/gnus/gnus-bookmark.el
@@ -423,16 +423,16 @@ That is, all information but the name."
:full t
:suppress 'nodigits
"q" #'quit-window
- "\C-m" #'gnus-bookmark-bmenu-select
+ "RET" #'gnus-bookmark-bmenu-select
"v" #'gnus-bookmark-bmenu-select
"d" #'gnus-bookmark-bmenu-delete
"k" #'gnus-bookmark-bmenu-delete
- "\C-d" #'gnus-bookmark-bmenu-delete-backwards
+ "C-d" #'gnus-bookmark-bmenu-delete-backwards
"x" #'gnus-bookmark-bmenu-execute-deletions
- " " #'next-line
+ "SPC" #'next-line
"n" #'next-line
"p" #'previous-line
- "\177" #'gnus-bookmark-bmenu-backup-unmark
+ "DEL" #'gnus-bookmark-bmenu-backup-unmark
"?" #'describe-mode
"u" #'gnus-bookmark-bmenu-unmark
"m" #'gnus-bookmark-bmenu-mark
@@ -440,7 +440,7 @@ That is, all information but the name."
"s" #'gnus-bookmark-bmenu-save
"t" #'gnus-bookmark-bmenu-toggle-infos
"a" #'gnus-bookmark-bmenu-show-details
- [mouse-2] #'gnus-bookmark-bmenu-select-by-mouse)
+ "" #'gnus-bookmark-bmenu-select-by-mouse)
;; Bookmark Buffer Menu mode is suitable only for specially formatted
;; data.
diff --git a/lisp/gnus/gnus-dired.el b/lisp/gnus/gnus-dired.el
index be46d3a341d..00769a5da6e 100644
--- a/lisp/gnus/gnus-dired.el
+++ b/lisp/gnus/gnus-dired.el
@@ -54,9 +54,9 @@
(autoload 'gnus-print-buffer "gnus-sum")
(defvar-keymap gnus-dired-mode-map
- "\C-c\C-m\C-a" #'gnus-dired-attach
- "\C-c\C-m\C-l" #'gnus-dired-find-file-mailcap
- "\C-c\C-m\C-p" #'gnus-dired-print)
+ "C-c C-m C-a" #'gnus-dired-attach
+ "C-c C-m C-l" #'gnus-dired-find-file-mailcap
+ "C-c C-m C-p" #'gnus-dired-print)
;; FIXME: Make it customizable, change the default to `mail-user-agent' when
;; this file is renamed (e.g. to `dired-mime.el').
@@ -204,7 +204,8 @@ If ARG is non-nil, open it in a new buffer."
(find-file file-name)))
(if (file-symlink-p file-name)
(error "File is a symlink to a nonexistent target")
- (error "File no longer exists; type `g' to update Dired buffer"))))
+ (error (substitute-command-keys
+ "File no longer exists; type \\`g' to update Dired buffer")))))
(defun gnus-dired-print (&optional file-name print-to)
"In dired, print FILE-NAME according to the mailcap file.
@@ -244,9 +245,10 @@ of the file to save in."
(error "MIME print only implemented via Gnus")))
(ps-despool print-to))))
((file-symlink-p file-name)
- (error "File is a symlink to a nonexistent target"))
- (t
- (error "File no longer exists; type `g' to update Dired buffer"))))
+ (error "File is a symlink to a nonexistent target"))
+ (t
+ (error (substitute-command-keys
+ "File no longer exists; type \\`g' to update Dired buffer")))))
(provide 'gnus-dired)
diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el
index 756e6d2d362..7c56db0ba45 100644
--- a/lisp/gnus/gnus-draft.el
+++ b/lisp/gnus/gnus-draft.el
@@ -34,11 +34,11 @@
;;; Draft minor mode
(defvar-keymap gnus-draft-mode-map
- "Dt" #'gnus-draft-toggle-sending
+ "D t" #'gnus-draft-toggle-sending
"e" #' gnus-draft-edit-message ;; Use `B w' for `gnus-summary-edit-article'
- "De" #'gnus-draft-edit-message
- "Ds" #'gnus-draft-send-message
- "DS" #'gnus-draft-send-all-messages)
+ "D e" #'gnus-draft-edit-message
+ "D s" #'gnus-draft-send-message
+ "D S" #'gnus-draft-send-all-messages)
(defun gnus-draft-make-menu-bar ()
(unless (boundp 'gnus-draft-menu)
diff --git a/lisp/gnus/gnus-eform.el b/lisp/gnus/gnus-eform.el
index b0aa58f0f28..c727926731b 100644
--- a/lisp/gnus/gnus-eform.el
+++ b/lisp/gnus/gnus-eform.el
@@ -50,8 +50,8 @@
(defvar-keymap gnus-edit-form-mode-map
:parent emacs-lisp-mode-map
- "\C-c\C-c" #'gnus-edit-form-done
- "\C-c\C-k" #'gnus-edit-form-exit)
+ "C-c C-c" #'gnus-edit-form-done
+ "C-c C-k" #'gnus-edit-form-exit)
(defun gnus-edit-form-make-menu-bar ()
(unless (boundp 'gnus-edit-form-menu)
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index ddc819877c1..2ec001faee7 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -62,7 +62,7 @@
(defcustom gnus-keep-same-level nil
"Non-nil means that the newsgroup after this one will be on the same level.
-When you type, for instance, `n' after reading the last article in the
+When you type, for instance, \\`n' after reading the last article in the
current newsgroup, you will go to the next newsgroup. If this variable
is nil, the next newsgroup will be the next from the group
buffer.
@@ -574,79 +574,79 @@ simple manner."
;;;
(define-keymap :keymap gnus-group-mode-map
- " " #'gnus-group-read-group
+ "SPC" #'gnus-group-read-group
"=" #'gnus-group-select-group
- "\r" #'gnus-group-select-group
- "\M-\r" #'gnus-group-quick-select-group
- "\M- " #'gnus-group-visible-select-group
- [(meta control return)] #'gnus-group-select-group-ephemerally
+ "RET" #'gnus-group-select-group
+ "M-RET" #'gnus-group-quick-select-group
+ "M-SPC" #'gnus-group-visible-select-group
+ "C-M-" #'gnus-group-select-group-ephemerally
"j" #'gnus-group-jump-to-group
"n" #'gnus-group-next-unread-group
"p" #'gnus-group-prev-unread-group
- "\177" #'gnus-group-prev-unread-group
- [delete] #'gnus-group-prev-unread-group
+ "DEL" #'gnus-group-prev-unread-group
+ "" #'gnus-group-prev-unread-group
"N" #'gnus-group-next-group
"P" #'gnus-group-prev-group
- "\M-n" #'gnus-group-next-unread-group-same-level
- "\M-p" #'gnus-group-prev-unread-group-same-level
+ "M-n" #'gnus-group-next-unread-group-same-level
+ "M-p" #'gnus-group-prev-unread-group-same-level
"," #'gnus-group-best-unread-group
"." #'gnus-group-first-unread-group
"u" #'gnus-group-toggle-subscription-at-point
"U" #'gnus-group-toggle-subscription
"c" #'gnus-group-catchup-current
"C" #'gnus-group-catchup-current-all
- "\M-c" #'gnus-group-clear-data
+ "M-c" #'gnus-group-clear-data
"l" #'gnus-group-list-groups
"L" #'gnus-group-list-all-groups
"m" #'gnus-group-mail
"i" #'gnus-group-news
"g" #'gnus-group-get-new-news
- "\M-g" #'gnus-group-get-new-news-this-group
+ "M-g" #'gnus-group-get-new-news-this-group
"R" #'gnus-group-restart
"r" #'gnus-group-read-init-file
"B" #'gnus-group-browse-foreign-server
"b" #'gnus-group-check-bogus-groups
"F" #'gnus-group-find-new-groups
- "\C-c\C-d" #'gnus-group-describe-group
- "\M-d" #'gnus-group-describe-all-groups
- "\C-c\C-a" #'gnus-group-apropos
- "\C-c\M-\C-a" #'gnus-group-description-apropos
+ "C-c C-d" #'gnus-group-describe-group
+ "M-d" #'gnus-group-describe-all-groups
+ "C-c C-a" #'gnus-group-apropos
+ "C-c C-M-a" #'gnus-group-description-apropos
"a" #'gnus-group-post-news
- "\ek" #'gnus-group-edit-local-kill
- "\eK" #'gnus-group-edit-global-kill
- "\C-k" #'gnus-group-kill-group
- "\C-y" #'gnus-group-yank-group
- "\C-w" #'gnus-group-kill-region
- "\C-x\C-t" #'gnus-group-transpose-groups
- "\C-c\C-l" #'gnus-group-list-killed
- "\C-c\C-x" #'gnus-group-expire-articles
- "\C-c\M-\C-x" #'gnus-group-expire-all-groups
+ "ESC k" #'gnus-group-edit-local-kill
+ "ESC K" #'gnus-group-edit-global-kill
+ "C-k" #'gnus-group-kill-group
+ "C-y" #'gnus-group-yank-group
+ "C-w" #'gnus-group-kill-region
+ "C-x C-t" #'gnus-group-transpose-groups
+ "C-c C-l" #'gnus-group-list-killed
+ "C-c C-x" #'gnus-group-expire-articles
+ "C-c C-M-x" #'gnus-group-expire-all-groups
"V" #'gnus-version
"s" #'gnus-group-save-newsrc
"z" #'gnus-group-suspend
"q" #'gnus-group-exit
"Q" #'gnus-group-quit
"?" #'gnus-group-describe-briefly
- "\C-c\C-i" #'gnus-info-find-node
- "\M-e" #'gnus-group-edit-group-method
+ "C-c C-i" #'gnus-info-find-node
+ "M-e" #'gnus-group-edit-group-method
"^" #'gnus-group-enter-server-mode
- [mouse-2] #'gnus-mouse-pick-group
- [follow-link] 'mouse-face
+ "" #'gnus-mouse-pick-group
+ "" 'mouse-face
"<" #'beginning-of-buffer
">" #'end-of-buffer
- "\C-c\C-b" #'gnus-bug
- "\C-c\C-s" #'gnus-group-sort-groups
+ "C-c C-b" #'gnus-bug
+ "C-c C-s" #'gnus-group-sort-groups
"t" #'gnus-topic-mode
- "\C-c\M-g" #'gnus-activate-all-groups
- "\M-&" #'gnus-group-universal-argument
+ "C-c M-g" #'gnus-activate-all-groups
+ "M-&" #'gnus-group-universal-argument
"#" #'gnus-group-mark-group
- "\M-#" #'gnus-group-unmark-group
+ "M-#" #'gnus-group-unmark-group
"~" (define-keymap :prefix 'gnus-group-cloud-map
"u" #'gnus-cloud-upload-all-data
"~" #'gnus-cloud-upload-all-data
"d" #'gnus-cloud-download-all-data
- "\r" #'gnus-cloud-download-all-data)
+ "RET" #'gnus-cloud-download-all-data)
"M" (define-keymap :prefix 'gnus-group-mark-map
"m" #'gnus-group-mark-group
@@ -682,8 +682,8 @@ simple manner."
"c" #'gnus-group-customize
"z" #'gnus-group-compact-group
"x" #'gnus-group-expunge-group
- "\177" #'gnus-group-delete-group
- [delete] #'gnus-group-delete-group
+ "DEL" #'gnus-group-delete-group
+ "" #'gnus-group-delete-group
"S" (define-keymap :prefix 'gnus-group-sort-map
"s" #'gnus-group-sort-groups
@@ -774,7 +774,7 @@ simple manner."
"k" #'gnus-group-kill-group
"y" #'gnus-group-yank-group
"w" #'gnus-group-kill-region
- "\C-k" #'gnus-group-kill-level
+ "C-k" #'gnus-group-kill-level
"z" #'gnus-group-kill-all-zombies))
(defun gnus-topic-mode-p ()
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index c1815d3486c..ef376f138e7 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -79,9 +79,9 @@ fit these criteria."
(defvar-keymap gnus-html-displayed-image-map
"a" #'gnus-html-show-alt-text
"i" #'gnus-html-browse-image
- "\r" #'gnus-html-browse-url
+ "RET" #'gnus-html-browse-url
"u" #'gnus-article-copy-string
- [tab] #'forward-button)
+ "" #'forward-button)
(defun gnus-html-encode-url (url)
"Encode URL."
diff --git a/lisp/gnus/gnus-kill.el b/lisp/gnus/gnus-kill.el
index 7e589c54e97..7137efd7309 100644
--- a/lisp/gnus/gnus-kill.el
+++ b/lisp/gnus/gnus-kill.el
@@ -68,13 +68,13 @@ of time."
(defvar-keymap gnus-kill-file-mode-map
:parent emacs-lisp-mode-map
- "\C-c\C-k\C-s" #'gnus-kill-file-kill-by-subject
- "\C-c\C-k\C-a" #'gnus-kill-file-kill-by-author
- "\C-c\C-k\C-t" #'gnus-kill-file-kill-by-thread
- "\C-c\C-k\C-x" #'gnus-kill-file-kill-by-xref
- "\C-c\C-a" #'gnus-kill-file-apply-buffer
- "\C-c\C-e" #'gnus-kill-file-apply-last-sexp
- "\C-c\C-c" #'gnus-kill-file-exit)
+ "C-c C-k C-s" #'gnus-kill-file-kill-by-subject
+ "C-c C-k C-a" #'gnus-kill-file-kill-by-author
+ "C-c C-k C-t" #'gnus-kill-file-kill-by-thread
+ "C-c C-k C-x" #'gnus-kill-file-kill-by-xref
+ "C-c C-a" #'gnus-kill-file-apply-buffer
+ "C-c C-e" #'gnus-kill-file-apply-last-sexp
+ "C-c C-c" #'gnus-kill-file-exit)
(define-derived-mode gnus-kill-file-mode emacs-lisp-mode "Kill"
"Major mode for editing kill files.
diff --git a/lisp/gnus/gnus-ml.el b/lisp/gnus/gnus-ml.el
index bf33194cf75..a5358e9ff42 100644
--- a/lisp/gnus/gnus-ml.el
+++ b/lisp/gnus/gnus-ml.el
@@ -32,12 +32,12 @@
;;; Mailing list minor mode
(defvar-keymap gnus-mailing-list-mode-map
- "\C-c\C-nh" #'gnus-mailing-list-help
- "\C-c\C-ns" #'gnus-mailing-list-subscribe
- "\C-c\C-nu" #'gnus-mailing-list-unsubscribe
- "\C-c\C-np" #'gnus-mailing-list-post
- "\C-c\C-no" #'gnus-mailing-list-owner
- "\C-c\C-na" #'gnus-mailing-list-archive)
+ "C-c C-n h" #'gnus-mailing-list-help
+ "C-c C-n s" #'gnus-mailing-list-subscribe
+ "C-c C-n u" #'gnus-mailing-list-unsubscribe
+ "C-c C-n p" #'gnus-mailing-list-post
+ "C-c C-n o" #'gnus-mailing-list-owner
+ "C-c C-n a" #'gnus-mailing-list-archive)
(defvar gnus-mailing-list-menu)
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index e88aa8f7d09..bb265642bc6 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -369,13 +369,13 @@ only affect the Gcc copy, but not the original message."
"m" #'gnus-summary-mail-other-window
"u" #'gnus-uu-post-news
"A" #'gnus-summary-attach-article
- "\M-c" #'gnus-summary-mail-crosspost-complaint
- "Br" #'gnus-summary-reply-broken-reply-to
- "BR" #'gnus-summary-reply-broken-reply-to-with-original
- "om" #'gnus-summary-mail-forward
- "op" #'gnus-summary-post-forward
- "Om" #'gnus-uu-digest-mail-forward
- "Op" #'gnus-uu-digest-post-forward
+ "M-c" #'gnus-summary-mail-crosspost-complaint
+ "B r" #'gnus-summary-reply-broken-reply-to
+ "B R" #'gnus-summary-reply-broken-reply-to-with-original
+ "o m" #'gnus-summary-mail-forward
+ "o p" #'gnus-summary-post-forward
+ "O m" #'gnus-uu-digest-mail-forward
+ "O p" #'gnus-uu-digest-post-forward
"D" (define-keymap :prefix 'gnus-send-bounce-map
"b" #'gnus-summary-resend-bounced-mail
@@ -1305,7 +1305,7 @@ For the \"inline\" alternatives, also see the variable
(gnus-inews-insert-gcc)
(let ((gcc (message-unquote-tokens
(message-tokenize-header (mail-fetch-field "gcc" nil t)
- " ,")))
+ ",")))
(self (with-current-buffer gnus-summary-buffer
gnus-gcc-self-resent-messages)))
(message-remove-header "gcc")
@@ -1572,7 +1572,7 @@ this is a reply."
(message-remove-header "gcc")
(widen)
(setq groups (message-unquote-tokens
- (message-tokenize-header gcc " ,\n\t")))
+ (message-tokenize-header gcc ",\n\t")))
;; Copy the article over to some group(s).
(while (setq group (pop groups))
(setq method (gnus-inews-group-method group))
diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el
index 8ffe4a4c573..205e936bc7e 100644
--- a/lisp/gnus/gnus-salt.el
+++ b/lisp/gnus/gnus-salt.el
@@ -65,11 +65,11 @@ It accepts the same format specs that `gnus-summary-line-format' does."
;;; Internal variables.
(defvar-keymap gnus-pick-mode-map
- " " #'gnus-pick-next-page
+ "SPC" #'gnus-pick-next-page
"u" #'gnus-pick-unmark-article-or-thread
"." #'gnus-pick-article-or-thread
- [down-mouse-2] #'gnus-pick-mouse-pick-region
- "\r" #'gnus-pick-start-reading)
+ "" #'gnus-pick-mouse-pick-region
+ "RET" #'gnus-pick-start-reading)
(defun gnus-pick-make-menu-bar ()
(unless (boundp 'gnus-pick-menu)
@@ -420,12 +420,12 @@ Two predefined functions are available:
(defvar-keymap gnus-tree-mode-map
:full t :suppress t
- "\r" #'gnus-tree-select-article
- [mouse-2] #'gnus-tree-pick-article
- "\C-?" #'gnus-tree-read-summary-keys
+ "RET" #'gnus-tree-select-article
+ "" #'gnus-tree-pick-article
+ "DEL" #'gnus-tree-read-summary-keys
"h" #'gnus-tree-show-summary
- "\C-c\C-i" #'gnus-info-find-node)
+ "C-c C-i" #'gnus-info-find-node)
(substitute-key-definition 'undefined #'gnus-tree-read-summary-keys
gnus-tree-mode-map)
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index 2ca25802957..d031047804a 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -2562,16 +2562,17 @@ score in `gnus-newsgroup-scored' by SCORE."
(or (caddr s)
gnus-score-interactive-default-score))
trace))))
- (insert
- "\n\nQuick help:
+ (insert
+ (substitute-command-keys
+ "\n\nQuick help:
-Type `e' to edit score file corresponding to the score rule on current line,
-`f' to format (pretty print) the score file and edit it,
-`t' toggle to truncate long lines in this buffer,
-`q' to quit, `k' to kill score trace buffer.
+Type \\`e' to edit score file corresponding to the score rule on current line,
+\\`f' to format (pretty print) the score file and edit it,
+\\`t' toggle to truncate long lines in this buffer,
+\\`q' to quit, \\`k' to kill score trace buffer.
The first sexp on each line is the score rule, followed by the file name of
-the score file and its full name, including the directory.")
+the score file and its full name, including the directory."))
(goto-char (point-min))
(gnus-configure-windows 'score-trace)))
(set-buffer gnus-summary-buffer)
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el
index f2ffb067b8e..fa880b7eddb 100644
--- a/lisp/gnus/gnus-srvr.el
+++ b/lisp/gnus/gnus-srvr.el
@@ -105,9 +105,9 @@ If nil, a faster, but more primitive, buffer is used instead."
(defvar-keymap gnus-server-mode-map
:full t :suppress t
- " " #'gnus-server-read-server-in-server-buffer
- "\r" #'gnus-server-read-server
- [mouse-2] #'gnus-server-pick-server
+ "SPC" #'gnus-server-read-server-in-server-buffer
+ "RET" #'gnus-server-read-server
+ "" #'gnus-server-pick-server
"q" #'gnus-server-exit
"l" #'gnus-server-list-servers
"k" #'gnus-server-kill-server
@@ -119,9 +119,9 @@ If nil, a faster, but more primitive, buffer is used instead."
"s" #'gnus-server-scan-server
"O" #'gnus-server-open-server
- "\M-o" #'gnus-server-open-all-servers
+ "M-o" #'gnus-server-open-all-servers
"C" #'gnus-server-close-server
- "\M-c" #'gnus-server-close-all-servers
+ "M-c" #'gnus-server-close-all-servers
"D" #'gnus-server-deny-server
"L" #'gnus-server-offline-server
"R" #'gnus-server-remove-denials
@@ -138,8 +138,8 @@ If nil, a faster, but more primitive, buffer is used instead."
"i" #'gnus-server-toggle-cloud-server
"I" #'gnus-server-set-cloud-method-server
- "\C-c\C-i" #'gnus-info-find-node
- "\C-c\C-b" #'gnus-bug)
+ "C-c C-i" #'gnus-info-find-node
+ "C-c C-b" #'gnus-bug)
(defcustom gnus-server-menu-hook nil
"Hook run after the creation of the server mode menu."
@@ -694,29 +694,29 @@ claim them."
(defvar-keymap gnus-browse-mode-map
:full t :suppress t
- " " #'gnus-browse-read-group
+ "SPC" #'gnus-browse-read-group
"=" #'gnus-browse-select-group
"n" #'gnus-browse-next-group
"p" #'gnus-browse-prev-group
- "\177" #'gnus-browse-prev-group
- [delete] #'gnus-browse-prev-group
+ "DEL" #'gnus-browse-prev-group
+ "" #'gnus-browse-prev-group
"N" #'gnus-browse-next-group
"P" #'gnus-browse-prev-group
- "\M-n" #'gnus-browse-next-group
- "\M-p" #'gnus-browse-prev-group
- "\r" #'gnus-browse-select-group
+ "M-n" #'gnus-browse-next-group
+ "M-p" #'gnus-browse-prev-group
+ "RET" #'gnus-browse-select-group
"u" #'gnus-browse-toggle-subscription-at-point
"l" #'gnus-browse-exit
"L" #'gnus-browse-exit
"q" #'gnus-browse-exit
"Q" #'gnus-browse-exit
"d" #'gnus-browse-describe-group
- [delete] #'gnus-browse-delete-group
- "\C-c\C-c" #'gnus-browse-exit
+ "" #'gnus-browse-delete-group
+ "C-c C-c" #'gnus-browse-exit
"?" #'gnus-browse-describe-briefly
- "\C-c\C-i" #'gnus-info-find-node
- "\C-c\C-b" #'gnus-bug)
+ "C-c C-i" #'gnus-info-find-node
+ "C-c C-b" #'gnus-bug)
(defun gnus-browse-make-menu-bar ()
(gnus-turn-off-edit-menu 'browse)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index f06661209bd..dcdf3d977df 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -1908,129 +1908,129 @@ increase the score of each group you read."
;; Non-orthogonal keys
(define-keymap :keymap gnus-summary-mode-map
- " " #'gnus-summary-next-page
- [?\S-\ ] #'gnus-summary-prev-page
- "\177" #'gnus-summary-prev-page
- [delete] #'gnus-summary-prev-page
- "\r" #'gnus-summary-scroll-up
- "\M-\r" #'gnus-summary-scroll-down
+ "SPC" #'gnus-summary-next-page
+ "S-SPC" #'gnus-summary-prev-page
+ "DEL" #'gnus-summary-prev-page
+ "" #'gnus-summary-prev-page
+ "RET" #'gnus-summary-scroll-up
+ "M-RET" #'gnus-summary-scroll-down
"n" #'gnus-summary-next-unread-article
"p" #'gnus-summary-prev-unread-article
"N" #'gnus-summary-next-article
"P" #'gnus-summary-prev-article
- "\M-\C-n" #'gnus-summary-next-same-subject
- "\M-\C-p" #'gnus-summary-prev-same-subject
- "\M-n" #'gnus-summary-next-unread-subject
- "\M-p" #'gnus-summary-prev-unread-subject
+ "C-M-n" #'gnus-summary-next-same-subject
+ "C-M-p" #'gnus-summary-prev-same-subject
+ "M-n" #'gnus-summary-next-unread-subject
+ "M-p" #'gnus-summary-prev-unread-subject
"." #'gnus-summary-first-unread-article
"," #'gnus-summary-best-unread-article
"[" #'gnus-summary-prev-unseen-article
"]" #'gnus-summary-next-unseen-article
- "\M-s\M-s" #'gnus-summary-search-article-forward
- "\M-s\M-r" #'gnus-summary-search-article-backward
- "\M-r" #'gnus-summary-search-article-backward
- "\M-S" #'gnus-summary-repeat-search-article-forward
- "\M-R" #'gnus-summary-repeat-search-article-backward
+ "M-s M-s" #'gnus-summary-search-article-forward
+ "M-s M-r" #'gnus-summary-search-article-backward
+ "M-r" #'gnus-summary-search-article-backward
+ "M-S" #'gnus-summary-repeat-search-article-forward
+ "M-R" #'gnus-summary-repeat-search-article-backward
"<" #'gnus-summary-beginning-of-article
">" #'gnus-summary-end-of-article
"j" #'gnus-summary-goto-article
"^" #'gnus-summary-refer-parent-article
- "\M-^" #'gnus-summary-refer-article
+ "M-^" #'gnus-summary-refer-article
"u" #'gnus-summary-tick-article-forward
"!" #'gnus-summary-tick-article-forward
"U" #'gnus-summary-tick-article-backward
"d" #'gnus-summary-mark-as-read-forward
"D" #'gnus-summary-mark-as-read-backward
"E" #'gnus-summary-mark-as-expirable
- "\M-u" #'gnus-summary-clear-mark-forward
- "\M-U" #'gnus-summary-clear-mark-backward
+ "M-u" #'gnus-summary-clear-mark-forward
+ "M-U" #'gnus-summary-clear-mark-backward
"k" #'gnus-summary-kill-same-subject-and-select
- "\C-k" #'gnus-summary-kill-same-subject
- "\M-\C-k" #'gnus-summary-kill-thread
- "\M-\C-l" #'gnus-summary-lower-thread
+ "C-k" #'gnus-summary-kill-same-subject
+ "C-M-k" #'gnus-summary-kill-thread
+ "C-M-l" #'gnus-summary-lower-thread
"e" #'gnus-summary-edit-article
"#" #'gnus-summary-mark-as-processable
- "\M-#" #'gnus-summary-unmark-as-processable
- "\M-\C-t" #'gnus-summary-toggle-threads
- "\M-\C-s" #'gnus-summary-show-thread
- "\M-\C-h" #'gnus-summary-hide-thread
- "\M-\C-f" #'gnus-summary-next-thread
- "\M-\C-b" #'gnus-summary-prev-thread
- [(meta down)] #'gnus-summary-next-thread
- [(meta up)] #'gnus-summary-prev-thread
- "\M-\C-u" #'gnus-summary-up-thread
- "\M-\C-d" #'gnus-summary-down-thread
+ "M-#" #'gnus-summary-unmark-as-processable
+ "C-M-t" #'gnus-summary-toggle-threads
+ "C-M-s" #'gnus-summary-show-thread
+ "C-M-h" #'gnus-summary-hide-thread
+ "C-M-f" #'gnus-summary-next-thread
+ "C-M-b" #'gnus-summary-prev-thread
+ "M-" #'gnus-summary-next-thread
+ "M-" #'gnus-summary-prev-thread
+ "C-M-u" #'gnus-summary-up-thread
+ "C-M-d" #'gnus-summary-down-thread
"&" #'gnus-summary-execute-command
"c" #'gnus-summary-catchup-and-exit
- "\C-w" #'gnus-summary-mark-region-as-read
- "\C-t" #'toggle-truncate-lines
+ "C-w" #'gnus-summary-mark-region-as-read
+ "C-t" #'toggle-truncate-lines
"?" #'gnus-summary-mark-as-dormant
- "\C-c\M-\C-s" #'gnus-summary-limit-include-expunged
- "\C-c\C-s\C-n" #'gnus-summary-sort-by-number
- "\C-c\C-s\C-m\C-n" #'gnus-summary-sort-by-most-recent-number
- "\C-c\C-s\C-l" #'gnus-summary-sort-by-lines
- "\C-c\C-s\C-c" #'gnus-summary-sort-by-chars
- "\C-c\C-s\C-m\C-m" #'gnus-summary-sort-by-marks
- "\C-c\C-s\C-a" #'gnus-summary-sort-by-author
- "\C-c\C-s\C-t" #'gnus-summary-sort-by-recipient
- "\C-c\C-s\C-s" #'gnus-summary-sort-by-subject
- "\C-c\C-s\C-d" #'gnus-summary-sort-by-date
- "\C-c\C-s\C-m\C-d" #'gnus-summary-sort-by-most-recent-date
- "\C-c\C-s\C-i" #'gnus-summary-sort-by-score
- "\C-c\C-s\C-o" #'gnus-summary-sort-by-original
- "\C-c\C-s\C-r" #'gnus-summary-sort-by-random
- "\C-c\C-s\C-u" #'gnus-summary-sort-by-newsgroups
- "\C-c\C-s\C-x" #'gnus-summary-sort-by-extra
+ "C-c C-M-s" #'gnus-summary-limit-include-expunged
+ "C-c C-s C-n" #'gnus-summary-sort-by-number
+ "C-c C-s C-m C-n" #'gnus-summary-sort-by-most-recent-number
+ "C-c C-s C-l" #'gnus-summary-sort-by-lines
+ "C-c C-s C-c" #'gnus-summary-sort-by-chars
+ "C-c C-s C-m C-m" #'gnus-summary-sort-by-marks
+ "C-c C-s C-a" #'gnus-summary-sort-by-author
+ "C-c C-s C-t" #'gnus-summary-sort-by-recipient
+ "C-c C-s C-s" #'gnus-summary-sort-by-subject
+ "C-c C-s C-d" #'gnus-summary-sort-by-date
+ "C-c C-s C-m C-d" #'gnus-summary-sort-by-most-recent-date
+ "C-c C-s C-i" #'gnus-summary-sort-by-score
+ "C-c C-s C-o" #'gnus-summary-sort-by-original
+ "C-c C-s C-r" #'gnus-summary-sort-by-random
+ "C-c C-s C-u" #'gnus-summary-sort-by-newsgroups
+ "C-c C-s C-x" #'gnus-summary-sort-by-extra
"=" #'gnus-summary-expand-window
- "\C-x\C-s" #'gnus-summary-reselect-current-group
- "\M-g" #'gnus-summary-rescan-group
- "\C-c\C-r" #'gnus-summary-caesar-message
+ "C-x C-s" #'gnus-summary-reselect-current-group
+ "M-g" #'gnus-summary-rescan-group
+ "C-c C-r" #'gnus-summary-caesar-message
"f" #'gnus-summary-followup
"F" #'gnus-summary-followup-with-original
"C" #'gnus-summary-cancel-article
"r" #'gnus-summary-reply
"R" #'gnus-summary-reply-with-original
- "\C-c\C-f" #'gnus-summary-mail-forward
+ "C-c C-f" #'gnus-summary-mail-forward
"o" #'gnus-summary-save-article
- "\C-o" #'gnus-summary-save-article-mail
+ "C-o" #'gnus-summary-save-article-mail
"|" #'gnus-summary-pipe-output
- "\M-k" #'gnus-summary-edit-local-kill
- "\M-K" #'gnus-summary-edit-global-kill
+ "M-k" #'gnus-summary-edit-local-kill
+ "M-K" #'gnus-summary-edit-global-kill
;; "V" gnus-version
- "\C-c\C-d" #'gnus-summary-describe-group
- "\C-c\C-p" #'gnus-summary-make-group-from-search
+ "C-c C-d" #'gnus-summary-describe-group
+ "C-c C-p" #'gnus-summary-make-group-from-search
"q" #'gnus-summary-exit
"Q" #'gnus-summary-exit-no-update
- "\C-c\C-i" #'gnus-info-find-node
- [mouse-2] #'gnus-mouse-pick-article
- [follow-link] 'mouse-face
+ "C-c C-i" #'gnus-info-find-node
+ "" #'gnus-mouse-pick-article
+ "" 'mouse-face
"m" #'gnus-summary-mail-other-window
"a" #'gnus-summary-post-news
"x" #'gnus-summary-limit-to-unread
"s" #'gnus-summary-isearch-article
- "\t" #'gnus-summary-button-forward
- [backtab] #'gnus-summary-button-backward
+ "TAB" #'gnus-summary-button-forward
+ "" #'gnus-summary-button-backward
"w" #'gnus-summary-browse-url
"t" #'gnus-summary-toggle-header
"g" #'gnus-summary-show-article
"l" #'gnus-summary-goto-last-article
- "\C-c\C-v\C-v" #'gnus-uu-decode-uu-view
- "\C-d" #'gnus-summary-enter-digest-group
- "\M-\C-d" #'gnus-summary-read-document
- "\M-\C-e" #'gnus-summary-edit-parameters
- "\M-\C-a" #'gnus-summary-customize-parameters
- "\C-c\C-b" #'gnus-bug
+ "C-c C-v C-v" #'gnus-uu-decode-uu-view
+ "C-d" #'gnus-summary-enter-digest-group
+ "C-M-d" #'gnus-summary-read-document
+ "C-M-e" #'gnus-summary-edit-parameters
+ "C-M-a" #'gnus-summary-customize-parameters
+ "C-c C-b" #'gnus-bug
"*" #'gnus-cache-enter-article
- "\M-*" #'gnus-cache-remove-article
- "\M-&" #'gnus-summary-universal-argument
- "\C-l" #'gnus-recenter
+ "M-*" #'gnus-cache-remove-article
+ "M-&" #'gnus-summary-universal-argument
+ "C-l" #'gnus-recenter
"I" #'gnus-summary-increase-score
"L" #'gnus-summary-lower-score
- "\M-i" #'gnus-symbolic-argument
+ "M-i" #'gnus-symbolic-argument
"h" #'gnus-summary-select-article-buffer
"b" #'gnus-article-view-part
- "\M-t" #'gnus-summary-toggle-display-buttonized
+ "M-t" #'gnus-summary-toggle-display-buttonized
"S" #'gnus-summary-send-map
@@ -2041,19 +2041,19 @@ increase the score of each group you read."
"d" #'gnus-summary-mark-as-read-forward
"r" #'gnus-summary-mark-as-read-forward
"c" #'gnus-summary-clear-mark-forward
- " " #'gnus-summary-clear-mark-forward
+ "SPC" #'gnus-summary-clear-mark-forward
"e" #'gnus-summary-mark-as-expirable
"x" #'gnus-summary-mark-as-expirable
"?" #'gnus-summary-mark-as-dormant
"b" #'gnus-summary-set-bookmark
"B" #'gnus-summary-remove-bookmark
"#" #'gnus-summary-mark-as-processable
- "\M-#" #'gnus-summary-unmark-as-processable
+ "M-#" #'gnus-summary-unmark-as-processable
"S" #'gnus-summary-limit-include-expunged
"C" #'gnus-summary-catchup
"H" #'gnus-summary-catchup-to-here
"h" #'gnus-summary-catchup-from-here
- "\C-c" #'gnus-summary-catchup-all
+ "C-c" #'gnus-summary-catchup-all
"k" #'gnus-summary-kill-same-subject-and-select
"K" #'gnus-summary-kill-same-subject
@@ -2118,10 +2118,10 @@ increase the score of each group you read."
"p" #'gnus-summary-prev-unread-article
"N" #'gnus-summary-next-article
"P" #'gnus-summary-prev-article
- "\C-n" #'gnus-summary-next-same-subject
- "\C-p" #'gnus-summary-prev-same-subject
- "\M-n" #'gnus-summary-next-unread-subject
- "\M-p" #'gnus-summary-prev-unread-subject
+ "C-n" #'gnus-summary-next-same-subject
+ "C-p" #'gnus-summary-prev-same-subject
+ "M-n" #'gnus-summary-next-unread-subject
+ "M-p" #'gnus-summary-prev-unread-subject
"f" #'gnus-summary-first-unread-article
"b" #'gnus-summary-best-unread-article
"u" #'gnus-summary-next-unseen-article
@@ -2139,7 +2139,7 @@ increase the score of each group you read."
"T" #'gnus-summary-toggle-threads
"t" #'gnus-summary-rethread-current
"^" #'gnus-summary-reparent-thread
- "\M-^" #'gnus-summary-reparent-children
+ "M-^" #'gnus-summary-reparent-children
"s" #'gnus-summary-show-thread
"S" #'gnus-summary-show-all-threads
"h" #'gnus-summary-hide-thread
@@ -2150,7 +2150,7 @@ increase the score of each group you read."
"o" #'gnus-summary-top-thread
"d" #'gnus-summary-down-thread
"#" #'gnus-uu-mark-thread
- "\M-#" #'gnus-uu-unmark-thread)
+ "M-#" #'gnus-uu-unmark-thread)
"Y" (define-keymap :prefix 'gnus-summary-buffer-map
"g" #'gnus-summary-prepare
@@ -2173,14 +2173,14 @@ increase the score of each group you read."
"P" #'gnus-summary-prev-group)
"A" (define-keymap :prefix 'gnus-summary-article-map
- " " #'gnus-summary-next-page
+ "SPC" #'gnus-summary-next-page
"n" #'gnus-summary-next-page
- [?\S-\ ] #'gnus-summary-prev-page
- "\177" #'gnus-summary-prev-page
- [delete] #'gnus-summary-prev-page
+ "S-SPC" #'gnus-summary-prev-page
+ "DEL" #'gnus-summary-prev-page
+ "" #'gnus-summary-prev-page
"p" #'gnus-summary-prev-page
- "\r" #'gnus-summary-scroll-up
- "\M-\r" #'gnus-summary-scroll-down
+ "RET" #'gnus-summary-scroll-up
+ "M-RET" #'gnus-summary-scroll-down
"<" #'gnus-summary-beginning-of-article
">" #'gnus-summary-end-of-article
"b" #'gnus-summary-beginning-of-article
@@ -2194,8 +2194,8 @@ increase the score of each group you read."
"W" #'gnus-warp-to-article
"g" #'gnus-summary-show-article
"s" #'gnus-summary-isearch-article
- "\t" #'gnus-summary-button-forward
- [backtab] #'gnus-summary-button-backward
+ "TAB" #'gnus-summary-button-forward
+ "" #'gnus-summary-button-backward
"w" #'gnus-summary-browse-url
"P" #'gnus-summary-print-article
"S" #'gnus-sticky-article
@@ -2250,7 +2250,7 @@ increase the score of each group you read."
"l" #'gnus-article-hide-list-identifiers
"B" #'gnus-article-strip-banner
"P" #'gnus-article-hide-pem
- "\C-c" #'gnus-article-hide-citation-maybe)
+ "C-c" #'gnus-article-hide-citation-maybe)
"H" (define-keymap :prefix 'gnus-summary-wash-highlight-map
"a" #'gnus-article-highlight
@@ -2312,10 +2312,10 @@ increase the score of each group you read."
"B" (define-keymap :prefix 'gnus-summary-backend-map
"e" #'gnus-summary-expire-articles
- "\M-\C-e" #'gnus-summary-expire-articles-now
- "\177" #'gnus-summary-delete-article
- [delete] #'gnus-summary-delete-article
- [backspace] #'gnus-summary-delete-article
+ "C-M-e" #'gnus-summary-expire-articles-now
+ "DEL" #'gnus-summary-delete-article
+ "" #'gnus-summary-delete-article
+ "" #'gnus-summary-delete-article
"m" #'gnus-summary-move-article
"r" #'gnus-summary-respool-article
"w" #'gnus-summary-edit-article
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el
index e78dd1542c8..0855e98917f 100644
--- a/lisp/gnus/gnus-topic.el
+++ b/lisp/gnus/gnus-topic.el
@@ -1059,26 +1059,26 @@ articles in the topic and its subtopics."
(defvar-keymap gnus-topic-mode-map
;; Override certain group mode keys.
"=" #'gnus-topic-select-group
- "\r" #'gnus-topic-select-group
- " " #'gnus-topic-read-group
- "\C-c\C-x" #'gnus-topic-expire-articles
+ "RET" #'gnus-topic-select-group
+ "SPC" #'gnus-topic-read-group
+ "C-c C-x" #'gnus-topic-expire-articles
"c" #'gnus-topic-catchup-articles
- "\C-k" #'gnus-topic-kill-group
- "\C-y" #'gnus-topic-yank-group
- "\M-g" #'gnus-topic-get-new-news-this-topic
- "AT" #'gnus-topic-list-active
- "Gp" #'gnus-topic-edit-parameters
+ "C-k" #'gnus-topic-kill-group
+ "C-y" #'gnus-topic-yank-group
+ "M-g" #'gnus-topic-get-new-news-this-topic
+ "A T" #'gnus-topic-list-active
+ "G p" #'gnus-topic-edit-parameters
"#" #'gnus-topic-mark-topic
- "\M-#" #'gnus-topic-unmark-topic
- [tab] #'gnus-topic-indent
- [(meta tab)] #'gnus-topic-unindent
- "\C-i" #'gnus-topic-indent
- "\M-\C-i" #'gnus-topic-unindent
- [mouse-2] #'gnus-mouse-pick-topic
+ "M-#" #'gnus-topic-unmark-topic
+ "" #'gnus-topic-indent
+ "M-" #'gnus-topic-unindent
+ "TAB" #'gnus-topic-indent
+ "C-M-i" #'gnus-topic-unindent
+ "" #'gnus-mouse-pick-topic
"T" (define-keymap :prefix 'gnus-group-topic-map
"#" #'gnus-topic-mark-topic
- "\M-#" #'gnus-topic-unmark-topic
+ "M-#" #'gnus-topic-unmark-topic
"n" #'gnus-topic-create-topic
"m" #'gnus-topic-move-group
"D" #'gnus-topic-remove-group
@@ -1088,13 +1088,13 @@ articles in the topic and its subtopics."
"j" #'gnus-topic-jump-to-topic
"M" #'gnus-topic-move-matching
"C" #'gnus-topic-copy-matching
- "\M-p" #'gnus-topic-goto-previous-topic
- "\M-n" #'gnus-topic-goto-next-topic
- "\C-i" #'gnus-topic-indent
- [tab] #'gnus-topic-indent
+ "M-p" #'gnus-topic-goto-previous-topic
+ "M-n" #'gnus-topic-goto-next-topic
+ "TAB" #'gnus-topic-indent
+ "" #'gnus-topic-indent
"r" #'gnus-topic-rename
- "\177" #'gnus-topic-delete
- [delete] #'gnus-topic-delete
+ "DEL" #'gnus-topic-delete
+ "" #'gnus-topic-delete
"H" #'gnus-topic-toggle-display-empty-topics
"S" (define-keymap :prefix 'gnus-topic-sort-map
diff --git a/lisp/gnus/gnus-undo.el b/lisp/gnus/gnus-undo.el
index 0717a7ccfba..a82b1f87a3e 100644
--- a/lisp/gnus/gnus-undo.el
+++ b/lisp/gnus/gnus-undo.el
@@ -76,11 +76,11 @@
;;; Minor mode definition.
(defvar-keymap gnus-undo-mode-map
- "\M-\C-_" #'gnus-undo
- "\C-_" #'gnus-undo
- "\C-xu" #'gnus-undo
+ "C-M-_" #'gnus-undo
+ "C-_" #'gnus-undo
+ "C-x u" #'gnus-undo
;; many people are used to type `C-/' on GUI frames and get `C-_'.
- [(control /)] #'gnus-undo)
+ "C-/" #'gnus-undo)
(defun gnus-undo-make-menu-bar ()
;; This is disabled for the time being.
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 9b3181fd4d0..56934dfa15d 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -1467,11 +1467,11 @@ address was listed in gnus-group-split Addresses (see below).")
:variable-group gnus-group-parameter
:parameter-type '(gnus-email-address :tag "To List")
:parameter-document "\
-This address will be used when doing a `a' in the group.
+This address will be used when doing a \\`a' in the group.
It is totally ignored when doing a followup--except that if it is
present in a news group, you'll get mail group semantics when doing
-`f'.
+\\`f'.
The gnus-group-split mail splitting mechanism will behave as if this
address was listed in gnus-group-split Addresses (see below).")
@@ -2749,7 +2749,7 @@ with some simple extensions.
%F Contents of the From: header (string)
%f Contents of the From: or To: headers (string)
%x Contents of the Xref: header (string)
-%D Date of the article (string)
+%D Contents of the Date: header article (string)
%d Date of the article (string) in DD-MMM format
%o Date of the article (string) in YYYYMMDD`T'HHMMSS
format
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 77e8fcdfd16..562bc64f6fb 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -2875,75 +2875,75 @@ Consider adding this function to `message-header-setup-hook'"
(defvar-keymap message-mode-map
:full t :parent text-mode-map
:doc "Message Mode keymap."
- "\C-c?" #'describe-mode
+ "C-c ?" #'describe-mode
- "\C-c\C-f\C-t" #'message-goto-to
- "\C-c\C-f\C-o" #'message-goto-from
- "\C-c\C-f\C-b" #'message-goto-bcc
- "\C-c\C-f\C-w" #'message-goto-fcc
- "\C-c\C-f\C-c" #'message-goto-cc
- "\C-c\C-f\C-s" #'message-goto-subject
- "\C-c\C-f\C-r" #'message-goto-reply-to
- "\C-c\C-f\C-n" #'message-goto-newsgroups
- "\C-c\C-f\C-d" #'message-goto-distribution
- "\C-c\C-f\C-f" #'message-goto-followup-to
- "\C-c\C-f\C-m" #'message-goto-mail-followup-to
- "\C-c\C-f\C-k" #'message-goto-keywords
- "\C-c\C-f\C-u" #'message-goto-summary
- "\C-c\C-f\C-i" #'message-insert-or-toggle-importance
- "\C-c\C-f\C-a" #'message-generate-unsubscribed-mail-followup-to
+ "C-c C-f C-t" #'message-goto-to
+ "C-c C-f C-o" #'message-goto-from
+ "C-c C-f C-b" #'message-goto-bcc
+ "C-c C-f C-w" #'message-goto-fcc
+ "C-c C-f C-c" #'message-goto-cc
+ "C-c C-f C-s" #'message-goto-subject
+ "C-c C-f C-r" #'message-goto-reply-to
+ "C-c C-f C-n" #'message-goto-newsgroups
+ "C-c C-f C-d" #'message-goto-distribution
+ "C-c C-f C-f" #'message-goto-followup-to
+ "C-c C-f C-m" #'message-goto-mail-followup-to
+ "C-c C-f C-k" #'message-goto-keywords
+ "C-c C-f C-u" #'message-goto-summary
+ "C-c C-f C-i" #'message-insert-or-toggle-importance
+ "C-c C-f C-a" #'message-generate-unsubscribed-mail-followup-to
;; modify headers (and insert notes in body)
- "\C-c\C-fs" #'message-change-subject
+ "C-c C-f s" #'message-change-subject
;;
- "\C-c\C-fx" #'message-cross-post-followup-to
+ "C-c C-f x" #'message-cross-post-followup-to
;; prefix+message-cross-post-followup-to = same w/o cross-post
- "\C-c\C-ft" #'message-reduce-to-to-cc
- "\C-c\C-fa" #'message-add-archive-header
+ "C-c C-f t" #'message-reduce-to-to-cc
+ "C-c C-f a" #'message-add-archive-header
;; mark inserted text
- "\C-c\M-m" #'message-mark-inserted-region
- "\C-c\M-f" #'message-mark-insert-file
+ "C-c M-m" #'message-mark-inserted-region
+ "C-c M-f" #'message-mark-insert-file
- "\C-c\C-b" #'message-goto-body
- "\C-c\C-i" #'message-goto-signature
+ "C-c C-b" #'message-goto-body
+ "C-c C-i" #'message-goto-signature
- "\C-c\C-t" #'message-insert-to
- "\C-c\C-fw" #'message-insert-wide-reply
- "\C-c\C-n" #'message-insert-newsgroups
- "\C-c\C-l" #'message-to-list-only
- "\C-c\C-f\C-e" #'message-insert-expires
- "\C-c\C-u" #'message-insert-or-toggle-importance
- "\C-c\M-n" #'message-insert-disposition-notification-to
+ "C-c C-t" #'message-insert-to
+ "C-c C-f w" #'message-insert-wide-reply
+ "C-c C-n" #'message-insert-newsgroups
+ "C-c C-l" #'message-to-list-only
+ "C-c C-f C-e" #'message-insert-expires
+ "C-c C-u" #'message-insert-or-toggle-importance
+ "C-c M-n" #'message-insert-disposition-notification-to
- "\C-c\C-y" #'message-yank-original
- "\C-c\M-\C-y" #'message-yank-buffer
- "\C-c\C-q" #'message-fill-yanked-message
- "\C-c\C-w" #'message-insert-signature
- "\C-c\M-h" #'message-insert-headers
- "\C-c\C-r" #'message-caesar-buffer-body
- "\C-c\C-o" #'message-sort-headers
- "\C-c\M-r" #'message-rename-buffer
+ "C-c C-y" #'message-yank-original
+ "C-c C-M-y" #'message-yank-buffer
+ "C-c C-q" #'message-fill-yanked-message
+ "C-c C-w" #'message-insert-signature
+ "C-c M-h" #'message-insert-headers
+ "C-c C-r" #'message-caesar-buffer-body
+ "C-c C-o" #'message-sort-headers
+ "C-c M-r" #'message-rename-buffer
- "\C-c\C-c" #'message-send-and-exit
- "\C-c\C-s" #'message-send
- "\C-c\C-k" #'message-kill-buffer
- "\C-c\C-d" #'message-dont-send
- "\C-c\n" #'gnus-delay-article
+ "C-c C-c" #'message-send-and-exit
+ "C-c C-s" #'message-send
+ "C-c C-k" #'message-kill-buffer
+ "C-c C-d" #'message-dont-send
+ "C-c C-j" #'gnus-delay-article
- "\C-c\M-k" #'message-kill-address
- "\C-c\C-e" #'message-elide-region
- "\C-c\C-v" #'message-delete-not-region
- "\C-c\C-z" #'message-kill-to-signature
- "\M-\r" #'message-newline-and-reformat
- [remap split-line] #'message-split-line
+ "C-c M-k" #'message-kill-address
+ "C-c C-e" #'message-elide-region
+ "C-c C-v" #'message-delete-not-region
+ "C-c C-z" #'message-kill-to-signature
+ "M-RET" #'message-newline-and-reformat
+ "" #'message-split-line
- "\C-c\C-a" #'mml-attach-file
- "\C-c\C-p" #'message-insert-screenshot
+ "C-c C-a" #'mml-attach-file
+ "C-c C-p" #'message-insert-screenshot
- "\C-a" #'message-beginning-of-line
- "\t" #'message-tab
+ "C-a" #'message-beginning-of-line
+ "TAB" #'message-tab
- "\M-n" #'message-display-abbrev)
+ "M-n" #'message-display-abbrev)
(easy-menu-define
message-mode-menu message-mode-map "Message Menu."
@@ -4763,23 +4763,25 @@ Valid types are `send', `return', `exit', `kill' and `postpone'."
t
"\
The message size, "
- (/ (buffer-size) 1000) "KB, is too large.
+ (/ (buffer-size) 1000)
+ (substitute-command-keys "KB, is too large.
Some mail gateways (MTA's) bounce large messages. To avoid the
-problem, answer `y', and the message will be split into several
-smaller pieces, the size of each is about "
+problem, answer \\`y', and the message will be split into several
+smaller pieces, the size of each is about ")
(/ message-send-mail-partially-limit 1000)
- "KB except the last
+ (substitute-command-keys
+ "KB except the last
one.
However, some mail readers (MUA's) can't read split messages, i.e.,
-mails in message/partially format. Answer `n', and the message
+mails in message/partially format. Answer \\`n', and the message
will be sent in one piece.
The size limit is controlled by `message-send-mail-partially-limit'.
If you always want Gnus to send messages in one piece, set
`message-send-mail-partially-limit' to nil.
-")))
+"))))
(progn
(message "Sending via mail...")
(if message-send-mail-real-function
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index aca4bf2062d..d781407cdcd 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -446,10 +446,11 @@ If not set, `default-directory' will be used."
:type 'integer
:group 'mime-display)
-(defcustom mm-external-terminal-program "xterm"
- "The program to start an external terminal."
- :version "22.1"
- :type 'string
+(defcustom mm-external-terminal-program '("xterm" "-e")
+ "The program to start an external terminal.
+This should be a list of strings."
+ :version "29.1"
+ :type '(choice string (repeat string))
:group 'mime-display)
;;; Internal variables.
@@ -957,10 +958,16 @@ external if displayed external."
(unwind-protect
(if window-system
(set-process-sentinel
- (start-process "*display*" nil
- mm-external-terminal-program
- "-e" shell-file-name
- shell-command-switch command)
+ (apply #'start-process "*display*" nil
+ (append
+ (if (listp mm-external-terminal-program)
+ mm-external-terminal-program
+ ;; Be backwards-compatible.
+ (list mm-external-terminal-program
+ "-e"))
+ (list shell-file-name
+ shell-command-switch
+ command)))
(lambda (process _state)
(if (eq 'exit (process-status process))
(run-at-time
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 079c1b51225..e60d777e0d2 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -1143,48 +1143,40 @@ If HANDLES is non-nil, use it instead reparsing the buffer."
;;; Mode for inserting and editing MML forms
;;;
-(defvar mml-mode-map
- (let ((sign (make-sparse-keymap))
- (encrypt (make-sparse-keymap))
- (signpart (make-sparse-keymap))
- (encryptpart (make-sparse-keymap))
- (map (make-sparse-keymap))
- (main (make-sparse-keymap)))
- (define-key map "\C-s" 'mml-secure-message-sign)
- (define-key map "\C-c" 'mml-secure-message-encrypt)
- (define-key map "\C-e" 'mml-secure-message-sign-encrypt)
- (define-key map "\C-p\C-s" 'mml-secure-sign)
- (define-key map "\C-p\C-c" 'mml-secure-encrypt)
- (define-key sign "p" 'mml-secure-message-sign-pgpmime)
- (define-key sign "o" 'mml-secure-message-sign-pgp)
- (define-key sign "s" 'mml-secure-message-sign-smime)
- (define-key signpart "p" 'mml-secure-sign-pgpmime)
- (define-key signpart "o" 'mml-secure-sign-pgp)
- (define-key signpart "s" 'mml-secure-sign-smime)
- (define-key encrypt "p" 'mml-secure-message-encrypt-pgpmime)
- (define-key encrypt "o" 'mml-secure-message-encrypt-pgp)
- (define-key encrypt "s" 'mml-secure-message-encrypt-smime)
- (define-key encryptpart "p" 'mml-secure-encrypt-pgpmime)
- (define-key encryptpart "o" 'mml-secure-encrypt-pgp)
- (define-key encryptpart "s" 'mml-secure-encrypt-smime)
- (define-key map "\C-n" 'mml-unsecure-message)
- (define-key map "f" 'mml-attach-file)
- (define-key map "b" 'mml-attach-buffer)
- (define-key map "e" 'mml-attach-external)
- (define-key map "q" 'mml-quote-region)
- (define-key map "m" 'mml-insert-multipart)
- (define-key map "p" 'mml-insert-part)
- (define-key map "v" 'mml-validate)
- (define-key map "P" 'mml-preview)
- (define-key map "s" sign)
- (define-key map "S" signpart)
- (define-key map "c" encrypt)
- (define-key map "C" encryptpart)
- ;;(define-key map "n" 'mml-narrow-to-part)
- ;; `M-m' conflicts with `back-to-indentation'.
- ;; (define-key main "\M-m" map)
- (define-key main "\C-c\C-m" map)
- main))
+(defvar-keymap mml-mode-map
+ "C-c C-m"
+ (define-keymap
+ "C-s" #'mml-secure-message-sign
+ "C-c" #'mml-secure-message-encrypt
+ "C-e" #'mml-secure-message-sign-encrypt
+ "C-p C-s" #'mml-secure-sign
+ "C-p C-c" #'mml-secure-encrypt
+
+ "s" (define-keymap
+ "p" #'mml-secure-message-sign-pgpmime
+ "o" #'mml-secure-message-sign-pgp
+ "s" #'mml-secure-message-sign-smime)
+ "S" (define-keymap
+ "p" #'mml-secure-sign-pgpmime
+ "o" #'mml-secure-sign-pgp
+ "s" #'mml-secure-sign-smime)
+ "c" (define-keymap
+ "p" #'mml-secure-message-encrypt-pgpmime
+ "o" #'mml-secure-message-encrypt-pgp
+ "s" #'mml-secure-message-encrypt-smime)
+ "C" (define-keymap
+ "p" #'mml-secure-encrypt-pgpmime
+ "o" #'mml-secure-encrypt-pgp
+ "s" #'mml-secure-encrypt-smime)
+ "C-n" #'mml-unsecure-message
+ "f" #'mml-attach-file
+ "b" #'mml-attach-buffer
+ "e" #'mml-attach-external
+ "q" #'mml-quote-region
+ "m" #'mml-insert-multipart
+ "p" #'mml-insert-part
+ "v" #'mml-validate
+ "P" #'mml-preview))
(easy-menu-define
mml-menu mml-mode-map ""
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index cfef69f1031..508ef5424ea 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -664,11 +664,11 @@ order for SpamAssassin to recognize the new registered spam."
;;; Key bindings for spam control.
(define-keymap :keymap gnus-summary-mode-map
- "St" #'spam-generic-score
- "Sx" #'gnus-summary-mark-as-spam
- "Mst" #'spam-generic-score
- "Msx" #'gnus-summary-mark-as-spam
- "\M-d" #'gnus-summary-mark-as-spam
+ "S t" #'spam-generic-score
+ "S x" #'gnus-summary-mark-as-spam
+ "M s t" #'spam-generic-score
+ "M s x" #'gnus-summary-mark-as-spam
+ "M-d" #'gnus-summary-mark-as-spam
"$" #'gnus-summary-mark-as-spam)
(defvar spam-cache-lookups t
diff --git a/lisp/help-macro.el b/lisp/help-macro.el
index 1fa9d82afd8..588efee66b1 100644
--- a/lisp/help-macro.el
+++ b/lisp/help-macro.el
@@ -140,6 +140,7 @@ and then returns."
(insert (substitute-command-keys help-screen)))
(let ((minor-mode-map-alist new-minor-mode-map-alist))
(help-mode)
+ (variable-pitch-mode)
(setq new-minor-mode-map-alist minor-mode-map-alist))
(goto-char (point-min))
(while (or (memq char (append help-event-list
diff --git a/lisp/help.el b/lisp/help.el
index b2772f4389b..9122d96271d 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1078,6 +1078,9 @@ Each substring of the form \\\\=[COMMAND] is replaced by either a
keystroke sequence that invokes COMMAND, or \"M-x COMMAND\" if COMMAND
is not on any keys. Keybindings will use the face `help-key-binding'.
+Each substring of the form \\\\=`KEYBINDING' will be replaced by
+KEYBINDING and use the `help-key-binding' face.
+
Each substring of the form \\\\={MAPVAR} is replaced by a summary of
the value of MAPVAR as a keymap. This summary is similar to the one
produced by ‘describe-bindings’. The summary ends in two newlines
@@ -1130,6 +1133,23 @@ Otherwise, return a new string."
(delete-char 2)
(ignore-errors
(forward-char 1)))
+ ((and (= (following-char) ?`)
+ (save-excursion
+ (prog1 (search-forward "'" nil t)
+ (setq end-point (- (point) 2)))))
+ (goto-char orig-point)
+ (delete-char 2)
+ (goto-char (1- end-point))
+ (delete-char 1)
+ ;; (backward-char 1)
+ (let ((k (buffer-substring-no-properties orig-point (point))))
+ (cond ((= (length k) 0)
+ (error "Empty key sequence in substitution"))
+ ((not (key-valid-p k))
+ (error "Invalid key sequence in substitution: `%s'" k))))
+ (add-text-properties orig-point (point)
+ '( face help-key-binding
+ font-lock-face help-key-binding)))
;; 1C. \[foo] is replaced with the keybinding.
((and (= (following-char) ?\[)
(save-excursion
@@ -1226,8 +1246,8 @@ Otherwise, return a new string."
(buffer-string)))))
(defvar help--keymaps-seen nil)
-(defun describe-map-tree (startmap partial shadow prefix title no-menu
- transl always-title mention-shadow)
+(defun describe-map-tree (startmap &optional partial shadow prefix title
+ no-menu transl always-title mention-shadow)
"Insert a description of the key bindings in STARTMAP.
This is followed by the key bindings of all maps reachable
through STARTMAP.
@@ -1328,9 +1348,11 @@ Return nil if the key sequence is too long."
(defun help--describe-command (definition &optional translation)
(cond ((symbolp definition)
- (insert-text-button (symbol-name definition)
- 'type 'help-function
- 'help-args (list definition))
+ (if (fboundp definition)
+ (insert-text-button (symbol-name definition)
+ 'type 'help-function
+ 'help-args (list definition))
+ (insert (symbol-name definition)))
(insert "\n"))
((or (stringp definition) (vectorp definition))
(if translation
@@ -1831,13 +1853,13 @@ Return VALUE."
(cond
((eq help-setup 'window)
;; ... and is new, ...
- "Type \"q\" to delete help window")
+ "Type \\\\[help-quit] to delete help window")
((eq help-setup 'frame)
;; ... on a new frame, ...
- "Type \"q\" to quit the help frame")
+ "Type \\\\[help-quit] to quit the help frame")
((eq help-setup 'other)
;; ... or displayed some other buffer before.
- "Type \"q\" to restore previous buffer"))
+ "Type \\\\[help-quit] to restore previous buffer"))
window t))
((and (eq (window-frame window) help-window-old-frame)
(= (length (window-list nil 'no-mini)) 2))
@@ -1848,7 +1870,7 @@ Return VALUE."
((eq help-setup 'window)
"Type \\[delete-other-windows] to delete the help window")
((eq help-setup 'other)
- "Type \"q\" in help window to restore its previous buffer"))
+ "Type \\\\[help-quit] in help window to restore its previous buffer"))
window 'other))
(t
;; The help window is not selected ...
@@ -1856,10 +1878,10 @@ Return VALUE."
(cond
((eq help-setup 'window)
;; ... and is new, ...
- "Type \"q\" in help window to delete it")
+ "Type \\\\[help-quit] in help window to delete it")
((eq help-setup 'other)
;; ... or displayed some other buffer before.
- "Type \"q\" in help window to restore previous buffer"))
+ "Type \\\\[help-quit] in help window to restore previous buffer"))
window))))
;; Return VALUE.
value))
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 5b69a878e21..2d2365dc34d 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1597,7 +1597,10 @@ to move by. The default is `ibuffer-marked-char'."
"Hide all of the currently marked lines."
(interactive)
(if (= (ibuffer-count-marked-lines) 0)
- (message "No buffers marked; use `m' to mark a buffer")
+ (message (substitute-command-keys
+ (concat
+ "No buffers marked; use \\"
+ "\\[ibuffer-mark-forward] to mark a buffer")))
(let ((count
(ibuffer-map-marked-lines
(lambda (_buf _mark)
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 233127b0112..b461197abe9 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1257,7 +1257,9 @@ Otherwise, toggle lock status."
"Unmark all buffers with mark MARK."
(interactive "cRemove marks (RET means all):")
(if (= (ibuffer-count-marked-lines t) 0)
- (message "No buffers marked; use `m' to mark a buffer")
+ (message (substitute-command-keys
+ "No buffers marked; use \\\
+\\[ibuffer-mark-forward] to mark a buffer"))
(let ((fn (lambda (_buf mk)
(unless (eq mk ?\s)
(ibuffer-set-mark-1 ?\s)) t)))
diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index 852ef0f1035..47a44a4a60e 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -520,14 +520,14 @@ Return the last form in BODY."
,@body))
(defun image-dired-dir ()
- "Return the current thumbnails directory (from variable `image-dired-dir').
-Create the thumbnails directory if it does not exist."
+ "Return the current thumbnail directory (from variable `image-dired-dir').
+Create the thumbnail directory if it does not exist."
(let ((image-dired-dir (file-name-as-directory
- (expand-file-name image-dired-dir))))
+ (expand-file-name image-dired-dir))))
(unless (file-directory-p image-dired-dir)
(with-file-modes #o700
(make-directory image-dired-dir t))
- (message "Creating thumbnails directory"))
+ (message "Thumbnail directory created: %s" image-dired-dir))
image-dired-dir))
(defun image-dired-insert-image (file type relief margin)
@@ -743,9 +743,9 @@ and remove the cached thumbnail files between each trial run.")
(thumbnail-dir (file-name-directory thumbnail-file))
process)
(when (not (file-exists-p thumbnail-dir))
- (message "Creating thumbnail directory")
(with-file-modes #o700
- (make-directory thumbnail-dir t)))
+ (make-directory thumbnail-dir t))
+ (message "Thumbnail directory created: %s" thumbnail-dir))
;; Thumbnail file creation processes begin here and are marshaled
;; in a queue by `image-dired-create-thumb'.
@@ -2013,7 +2013,7 @@ With prefix argument ARG, display image in its original size."
(cons ?o (expand-file-name file))
(cons ?t image-dired-temp-rotate-image-file))))
(unless (eq 'jpeg (image-type file))
- (error "Only JPEG images can be rotated!"))
+ (user-error "Only JPEG images can be rotated"))
(if (not (= 0 (apply #'call-process image-dired-cmd-rotate-original-program
nil nil nil
(mapcar (lambda (arg) (format-spec arg spec))
diff --git a/lisp/indent.el b/lisp/indent.el
index aa6b8d17c4a..ec01733d123 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -88,16 +88,20 @@ This variable has no effect unless `tab-always-indent' is `complete'."
indent-relative-first-indent-point)
"Values that are ignored by `indent-according-to-mode'.")
-(defun indent-according-to-mode ()
+(defun indent-according-to-mode (&optional inhibit-widen)
"Indent line in proper way for current major mode.
Normally, this is done by calling the function specified by the
variable `indent-line-function'. However, if the value of that
variable is present in the `indent-line-ignored-functions' variable,
handle it specially (since those functions are used for tabbing);
-in that case, indent by aligning to the previous non-blank line."
+in that case, indent by aligning to the previous non-blank line.
+
+Ignore restriction, unless the optional argument INHIBIT-WIDEN is
+non-nil."
(interactive)
(save-restriction
- (widen)
+ (unless inhibit-widen
+ (widen))
(syntax-propertize (line-end-position))
(if (memq indent-line-function indent-line-ignored-functions)
;; These functions are used for tabbing, but can't be used for
@@ -601,7 +605,10 @@ column to indent to; if it is nil, use one of the three methods above."
(funcall indent-region-function start end)))
;; Else, use a default implementation that calls indent-line-function on
;; each line.
- (t (indent-region-line-by-line start end)))
+ (t
+ (save-restriction
+ (widen)
+ (indent-region-line-by-line start end))))
;; In most cases, reindenting modifies the buffer, but it may also
;; leave it unmodified, in which case we have to deactivate the mark
;; by hand.
@@ -615,7 +622,7 @@ column to indent to; if it is nil, use one of the three methods above."
(make-progress-reporter "Indenting region..." (point) end))))
(while (< (point) end)
(or (and (bolp) (eolp))
- (indent-according-to-mode))
+ (indent-according-to-mode t))
(forward-line 1)
(and pr (progress-reporter-update pr (point))))
(and pr (progress-reporter-done pr))
diff --git a/lisp/info.el b/lisp/info.el
index cd4c867f4e6..94537c2417a 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -4896,9 +4896,16 @@ first line or header line, and for breadcrumb links.")
;; an end of sentence
(skip-syntax-backward " ("))
(setq other-tag
- (cond ((save-match-data (looking-back "\\(^\\| \\)see"
+ (cond ((save-match-data (looking-back "\\(^\\|[ (]\\)see"
(- (point) 4)))
"")
+ ;; We want "Also *note" to produce
+ ;; "Also see", but "See also *note" to produce
+ ;; "See also", so match case-sensitively.
+ ((save-match-data (let ((case-fold-search nil))
+ (looking-back "\\(^\\| \\)also"
+ (- (point) 5))))
+ "")
((save-match-data (looking-back "\\(^\\| \\)in"
(- (point) 3)))
"")
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 5aefda23283..3a8e968c34b 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -1594,12 +1594,14 @@ GROUP must be one of these symbols:
such as U+200C (ZWNJ), U+200E (LRM), but
excluding characters that have graphic images,
such as U+00AD (SHY).
- `variation-selectors': U+FE00..U+FE0F, used for choosing between
- glyph variations (e.g. Emoji vs Text
- presentation).
- `no-font': characters for which no suitable font is found.
- For character terminals, characters that cannot
- be encoded by `terminal-coding-system'.
+ `variation-selectors':
+ Characters in the range U+FE00..U+FE0F, used for
+ selecting alternate glyph presentations, such as
+ Emoji vs Text presentation, of the preceding
+ character(s).
+ `no-font': For GUI frames, characters for which no suitable
+ font is found; for text-mode frames, characters
+ that cannot be encoded by `terminal-coding-system'.
METHOD must be one of these symbols:
`zero-width': don't display.
@@ -1618,31 +1620,36 @@ function (`update-glyphless-char-display'), which updates
:type '(alist :key-type (symbol :tag "Character Group")
:value-type (symbol :tag "Display Method"))
:options '((c0-control
- (choice (const :tag "Don't display" zero-width)
+ (choice :value thin-space
+ (const :tag "Don't display" zero-width)
(const :tag "Display as thin space" thin-space)
(const :tag "Display as empty box" empty-box)
(const :tag "Display acronym" acronym)
(const :tag "Display hex code in a box" hex-code)))
(c1-control
- (choice (const :tag "Don't display" zero-width)
+ (choice :value thin-space
+ (const :tag "Don't display" zero-width)
(const :tag "Display as thin space" thin-space)
(const :tag "Display as empty box" empty-box)
(const :tag "Display acronym" acronym)
(const :tag "Display hex code in a box" hex-code)))
(format-control
- (choice (const :tag "Don't display" zero-width)
+ (choice :value thin-space
+ (const :tag "Don't display" zero-width)
(const :tag "Display as thin space" thin-space)
(const :tag "Display as empty box" empty-box)
(const :tag "Display acronym" acronym)
(const :tag "Display hex code in a box" hex-code)))
(variation-selectors
- (choice (const :tag "Don't display" zero-width)
+ (choice :value thin-space
+ (const :tag "Don't display" zero-width)
(const :tag "Display as thin space" thin-space)
(const :tag "Display as empty box" empty-box)
(const :tag "Display acronym" acronym)
(const :tag "Display hex code in a box" hex-code)))
(no-font
- (choice (const :tag "Don't display" zero-width)
+ (choice :value hex-code
+ (const :tag "Don't display" zero-width)
(const :tag "Display as thin space" thin-space)
(const :tag "Display as empty box" empty-box)
(const :tag "Display acronym" acronym)
diff --git a/lisp/international/emoji.el b/lisp/international/emoji.el
index d2570e99111..5f8c358caab 100644
--- a/lisp/international/emoji.el
+++ b/lisp/international/emoji.el
@@ -184,10 +184,10 @@ character) under point is."
(get-char-code-property (aref glyph 0) 'name)))
(defvar-keymap emoji-list-mode-map
- ["RET"] #'emoji-list-select
- [""] #'emoji-list-select
+ "RET" #'emoji-list-select
+ "" #'emoji-list-select
"h" #'emoji-list-help
- [follow-link] 'mouse-face)
+ "" 'mouse-face)
(define-derived-mode emoji-list-mode special-mode "Emoji"
"Mode to display emojis."
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 2b94a2845f7..a4cbf22511c 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -88,7 +88,7 @@
(bindings--define-key map [separator-3] menu-bar-separator)
(bindings--define-key map [set-terminal-coding-system]
'(menu-item "For Terminal" set-terminal-coding-system
- :enable (null (memq initial-window-system '(x w32 ns pgtk)))
+ :enable (null (memq initial-window-system '(x w32 ns haiku pgtk)))
:help "How to encode terminal output"))
(bindings--define-key map [set-keyboard-coding-system]
'(menu-item "For Keyboard" set-keyboard-coding-system
diff --git a/lisp/international/ucs-normalize.el b/lisp/international/ucs-normalize.el
index 0f8dedfc09b..3da47e701ab 100644
--- a/lisp/international/ucs-normalize.el
+++ b/lisp/international/ucs-normalize.el
@@ -536,74 +536,124 @@ COMPOSITION-PREDICATE will be used to compose region."
(,ucs-normalize-region (point-min) (point-max))
(buffer-string)))
-;;;###autoload
(defun ucs-normalize-NFD-region (from to)
- "Normalize the current region by the Unicode NFD."
+ "Decompose the region between FROM and TO according to the Unicode NFD.
+This replaces the text between FROM and TO with its canonical decomposition,
+a.k.a. the \"Unicode Normalization Form D\"."
(interactive "r")
(ucs-normalize-region from to
ucs-normalize-nfd-quick-check-regexp
'ucs-normalize-nfd-table nil))
-;;;###autoload
+
(defun ucs-normalize-NFD-string (str)
- "Normalize the string STR by the Unicode NFD."
+ "Decompose the string STR according to the Unicode NFD.
+This returns a new string that is the canonical decomposition of STR,
+a.k.a. the \"Unicode Normalization Form D\" of STR. For instance:
+
+ (ucs-normalize-NFD-string \"Å\") => \"Å\""
(ucs-normalize-string ucs-normalize-NFD-region))
-;;;###autoload
(defun ucs-normalize-NFC-region (from to)
- "Normalize the current region by the Unicode NFC."
+ "Compose the region between FROM and TO according to the Unicode NFC.
+This replaces the text between FROM and TO with the result of its
+canonical decomposition (see `ucs-normalize-NFD-region') followed by
+canonical composition, a.k.a. the \"Unicode Normalization Form C\"."
(interactive "r")
(ucs-normalize-region from to
ucs-normalize-nfc-quick-check-regexp
'ucs-normalize-nfd-table t))
-;;;###autoload
-(defun ucs-normalize-NFC-string (str)
- "Normalize the string STR by the Unicode NFC."
- (ucs-normalize-string ucs-normalize-NFC-region))
;;;###autoload
+(defun string-glyph-compose (string)
+ "Compose STRING according to the Unicode NFC.
+This returns a new string obtained by canonical decomposition
+of STRING (see `ucs-normalize-NFC-string') followed by canonical
+composition, a.k.a. the \"Unicode Normalization Form C\" of STRING.
+For instance:
+
+ (string-glyph-compose \"Å\") => \"Å\""
+ (ucs-normalize-NFC-string string))
+
+;;;###autoload
+(defun string-glyph-decompose (string)
+ "Decompose STRING according to the Unicode NFD.
+This returns a new string that is the canonical decomposition of STRING,
+a.k.a. the \"Unicode Normalization Form D\" of STRING. For instance:
+
+ (ucs-normalize-NFD-string \"Å\") => \"Å\""
+ (ucs-normalize-NFD-string string))
+
+(defun ucs-normalize-NFC-string (str)
+ "Compose STR according to the Unicode NFC.
+This returns a new string obtained by canonical decomposition
+of STR (see `ucs-normalize-NFC-string') followed by canonical
+composition, a.k.a. the \"Unicode Normalization Form C\" of STR.
+For instance:
+
+ (string-glyph-compose \"Å\") => \"Å\""
+ (ucs-normalize-string ucs-normalize-NFC-region))
+
(defun ucs-normalize-NFKD-region (from to)
- "Normalize the current region by the Unicode NFKD."
+ "Decompose the region between FROM and TO according to the Unicode NFKD.
+This replaces the text between FROM and TO with its compatibility
+decomposition, a.k.a. \"Unicode Normalization Form KD\"."
(interactive "r")
(ucs-normalize-region from to
ucs-normalize-nfkd-quick-check-regexp
'ucs-normalize-nfkd-table nil))
-;;;###autoload
+
(defun ucs-normalize-NFKD-string (str)
- "Normalize the string STR by the Unicode NFKD."
+ "Decompose the string STR according to the Unicode NFKD.
+This returns a new string obtained by compatibility decomposition
+of STR. This is much like the NFD (canonical decomposition) form,
+see `ucs-normalize-NFD-string', but mainly differs for precomposed
+characters. For instance:
+
+ (ucs-normalize-NFD-string \"fi\") => \"fi\"
+ (ucs-normalize-NFKD-string \"fi\") = \"fi\""
(ucs-normalize-string ucs-normalize-NFKD-region))
-;;;###autoload
(defun ucs-normalize-NFKC-region (from to)
- "Normalize the current region by the Unicode NFKC."
+ "Compose the region between FROM and TO according to the Unicode NFKC.
+This replaces the text between FROM and TO with the result of its
+compatibility decomposition (see `ucs-normalize-NFC-region') followed by
+canonical composition, a.k.a. the \"Unicode Normalization Form KC\"."
(interactive "r")
(ucs-normalize-region from to
ucs-normalize-nfkc-quick-check-regexp
'ucs-normalize-nfkd-table t))
-;;;###autoload
+
(defun ucs-normalize-NFKC-string (str)
- "Normalize the string STR by the Unicode NFKC."
+ "Compose STR according to the Unicode NFC.
+This returns a new string obtained by compatibility decomposition
+of STR (see `ucs-normalize-NFKD-string') followed by canonical
+composition, a.k.a. the \"Unicode Normalization Form KC\" of STR.
+This is much like the NFC (canonical composition) form, but mainly
+differs for precomposed characters. For instance:
+
+ (ucs-normalize-NFC-string \"fi\") => \"fi\"
+ (ucs-normalize-NFKC-string \"fi\") = \"fi\""
(ucs-normalize-string ucs-normalize-NFKC-region))
-;;;###autoload
(defun ucs-normalize-HFS-NFD-region (from to)
- "Normalize the current region by the Unicode NFD and Mac OS's HFS Plus."
+ "Normalize region between FROM and TO by Unicode NFD and Mac OS's HFS Plus."
(interactive "r")
(ucs-normalize-region from to
ucs-normalize-hfs-nfd-quick-check-regexp
'ucs-normalize-hfs-nfd-table
'ucs-normalize-hfs-nfd-comp-p))
-;;;###autoload
+
(defun ucs-normalize-HFS-NFD-string (str)
"Normalize the string STR by the Unicode NFD and Mac OS's HFS Plus."
(ucs-normalize-string ucs-normalize-HFS-NFD-region))
-;;;###autoload
+
(defun ucs-normalize-HFS-NFC-region (from to)
- "Normalize the current region by the Unicode NFC and Mac OS's HFS Plus."
+ "Normalize region between FROM and TO by Unicode NFC and Mac OS's HFS Plus."
(interactive "r")
(ucs-normalize-region from to
ucs-normalize-hfs-nfc-quick-check-regexp
'ucs-normalize-hfs-nfd-table t))
-;;;###autoload
+
(defun ucs-normalize-HFS-NFC-string (str)
"Normalize the string STR by the Unicode NFC and Mac OS's HFS Plus."
(ucs-normalize-string ucs-normalize-HFS-NFC-region))
diff --git a/lisp/isearch.el b/lisp/isearch.el
index dea96624774..9dc8525417a 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -488,9 +488,9 @@ and doesn't remove full-buffer highlighting after a search."
"You have typed %THIS-KEY%, the help character. Type a Help option:
\(Type \\\\[help-quit] to exit the Help command.)
-\\[isearch-describe-bindings] Display all Isearch key bindings.
-\\[isearch-describe-key] KEYS Display full documentation of Isearch key sequence.
-\\[isearch-describe-mode] Display documentation of Isearch mode.
+ \\[isearch-describe-bindings] Display all Isearch key bindings.
+ \\[isearch-describe-key] Display full documentation of Isearch key sequence.
+ \\[isearch-describe-mode] Display documentation of Isearch mode.
You can't type here other help keys available in the global help map,
but outside of this help window when you type them in Isearch mode,
diff --git a/lisp/keymap.el b/lisp/keymap.el
new file mode 100644
index 00000000000..770a6ed20d1
--- /dev/null
+++ b/lisp/keymap.el
@@ -0,0 +1,457 @@
+;;; keymap.el --- Keymap functions -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see .
+
+;;; Commentary:
+
+;; This library deals with the "new" keymap binding interface: The
+;; only key syntax allowed by these functions is the `kbd' one.
+
+;;; Code:
+
+
+
+(defun keymap--check (key)
+ "Signal an error if KEY doesn't have a valid syntax."
+ (unless (key-valid-p key)
+ (error "%S is not a valid key definition; see `key-valid-p'" key)))
+
+(defun keymap--compile-check (&rest keys)
+ (dolist (key keys)
+ (when (or (vectorp key)
+ (and (stringp key) (not (key-valid-p key))))
+ (byte-compile-warn "Invalid `kbd' syntax: %S" key))))
+
+(defun keymap-set (keymap key definition)
+ "Set key sequence KEY to DEFINITION in KEYMAP.
+KEY is a string that satisfies `key-valid-p'.
+
+DEFINITION is anything that can be a key's definition:
+ nil (means key is undefined in this keymap),
+ a command (a Lisp function suitable for interactive calling),
+ a string (treated as a keyboard macro),
+ a keymap (to define a prefix key),
+ a symbol (when the key is looked up, the symbol will stand for its
+ function definition, which should at that time be one of the above,
+ or another symbol whose function definition is used, etc.),
+ a cons (STRING . DEFN), meaning that DEFN is the definition
+ (DEFN should be a valid definition in its own right) and
+ STRING is the menu item name (which is used only if the containing
+ keymap has been created with a menu name, see `make-keymap'),
+ or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP,
+ or an extended menu item definition.
+ (See info node `(elisp)Extended Menu Items'.)"
+ (declare (compiler-macro (lambda (form) (keymap--compile-check key) form)))
+ (keymap--check key)
+ (define-key keymap (key-parse key) definition))
+
+(defun keymap-global-set (key command)
+ "Give KEY a global binding as COMMAND.
+COMMAND is the command definition to use; usually it is
+a symbol naming an interactively-callable function.
+
+KEY is a string that satisfies `key-valid-p'.
+
+Note that if KEY has a local binding in the current buffer,
+that local binding will continue to shadow any global binding
+that you make with this function."
+ (declare (compiler-macro (lambda (form) (keymap--compile-check key) form)))
+ (interactive
+ (let* ((menu-prompting nil)
+ (key (read-key-sequence "Set key globally: " nil t)))
+ (list key
+ (read-command (format "Set key %s to command: "
+ (key-description key))))))
+ (keymap-set (current-global-map) key command))
+
+(defun keymap-local-set (key command)
+ "Give KEY a local binding as COMMAND.
+COMMAND is the command definition to use; usually it is
+a symbol naming an interactively-callable function.
+
+KEY is a string that satisfies `key-valid-p'.
+
+The binding goes in the current buffer's local map, which in most
+cases is shared with all other buffers in the same major mode."
+ (declare (compiler-macro (lambda (form) (keymap--compile-check key) form)))
+ (interactive "KSet key locally: \nCSet key %s locally to command: ")
+ (let ((map (current-local-map)))
+ (unless map
+ (use-local-map (setq map (make-sparse-keymap))))
+ (keymap-set map key command)))
+
+(defun keymap-global-unset (key &optional remove)
+ "Remove global binding of KEY (if any).
+KEY is a string that satisfies `key-valid-p'.
+
+If REMOVE (interactively, the prefix arg), remove the binding
+instead of unsetting it. See `keymap-unset' for details."
+ (declare (compiler-macro (lambda (form) (keymap--compile-check key) form)))
+ (interactive
+ (list (key-description (read-key-sequence "Set key locally: "))
+ current-prefix-arg))
+ (keymap-unset (current-global-map) key remove))
+
+(defun keymap-local-unset (key &optional remove)
+ "Remove local binding of KEY (if any).
+KEY is a string that satisfies `key-valid-p'.
+
+If REMOVE (interactively, the prefix arg), remove the binding
+instead of unsetting it. See `keymap-unset' for details."
+ (declare (compiler-macro (lambda (form) (keymap--compile-check key) form)))
+ (interactive
+ (list (key-description (read-key-sequence "Unset key locally: "))
+ current-prefix-arg))
+ (when (current-local-map)
+ (keymap-unset (current-local-map) key remove)))
+
+(defun keymap-unset (keymap key &optional remove)
+ "Remove key sequence KEY from KEYMAP.
+KEY is a string that satisfies `key-valid-p'.
+
+If REMOVE, remove the binding instead of unsetting it. This only
+makes a difference when there's a parent keymap. When unsetting
+a key in a child map, it will still shadow the same key in the
+parent keymap. Removing the binding will allow the key in the
+parent keymap to be used."
+ (declare (compiler-macro (lambda (form) (keymap--compile-check key) form)))
+ (keymap--check key)
+ (define-key keymap (key-parse key) nil remove))
+
+(defun keymap-substitute (keymap olddef newdef &optional oldmap prefix)
+ "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF.
+In other words, OLDDEF is replaced with NEWDEF wherever it appears.
+Alternatively, if optional fourth argument OLDMAP is specified, we redefine
+in KEYMAP as NEWDEF those keys that are defined as OLDDEF in OLDMAP.
+
+If you don't specify OLDMAP, you can usually get the same results
+in a cleaner way with command remapping, like this:
+ (define-key KEYMAP [remap OLDDEF] NEWDEF)
+\n(fn OLDDEF NEWDEF KEYMAP &optional OLDMAP)"
+ (declare (compiler-macro
+ (lambda (form) (keymap--compile-check olddef newdef) form)))
+ ;; Don't document PREFIX in the doc string because we don't want to
+ ;; advertise it. It's meant for recursive calls only. Here's its
+ ;; meaning
+
+ ;; If optional argument PREFIX is specified, it should be a key
+ ;; prefix, a string. Redefined bindings will then be bound to the
+ ;; original key, with PREFIX added at the front.
+ (unless prefix
+ (setq prefix ""))
+ (keymap--check olddef)
+ (keymap--check newdef)
+ (setq olddef (key-parse olddef))
+ (setq newdef (key-parse newdef))
+ (let* ((scan (or oldmap keymap))
+ (prefix1 (vconcat prefix [nil]))
+ (key-substitution-in-progress
+ (cons scan key-substitution-in-progress)))
+ ;; Scan OLDMAP, finding each char or event-symbol that
+ ;; has any definition, and act on it with hack-key.
+ (map-keymap
+ (lambda (char defn)
+ (aset prefix1 (length prefix) char)
+ (substitute-key-definition-key defn olddef newdef prefix1 keymap))
+ scan)))
+
+(defun keymap-set-after (keymap key definition &optional after)
+ "Add binding in KEYMAP for KEY => DEFINITION, right after AFTER's binding.
+This is like `keymap-set' except that the binding for KEY is placed
+just after the binding for the event AFTER, instead of at the beginning
+of the map. Note that AFTER must be an event type (like KEY), NOT a command
+\(like DEFINITION).
+
+If AFTER is t or omitted, the new binding goes at the end of the keymap.
+AFTER should be a single event type--a symbol or a character, not a sequence.
+
+Bindings are always added before any inherited map.
+
+The order of bindings in a keymap matters only when it is used as
+a menu, so this function is not useful for non-menu keymaps."
+ (declare (indent defun)
+ (compiler-macro (lambda (form) (keymap--compile-check key) form)))
+ (keymap--check key)
+ (when after
+ (keymap--check after))
+ (define-key-after keymap (key-parse key) definition
+ (and after (key-parse after))))
+
+(defun key-parse (keys)
+ "Convert KEYS to the internal Emacs key representation.
+See `kbd' for a descripion of KEYS."
+ (declare (pure t) (side-effect-free t))
+ ;; A pure function is expected to preserve the match data.
+ (save-match-data
+ (let ((case-fold-search nil)
+ (len (length keys)) ; We won't alter keys in the loop below.
+ (pos 0)
+ (res []))
+ (while (and (< pos len)
+ (string-match "[^ \t\n\f]+" keys pos))
+ (let* ((word-beg (match-beginning 0))
+ (word-end (match-end 0))
+ (word (substring keys word-beg len))
+ (times 1)
+ key)
+ ;; Try to catch events of the form "".
+ (if (string-match "\\`<[^ <>\t\n\f][^>\t\n\f]*>" word)
+ (setq word (match-string 0 word)
+ pos (+ word-beg (match-end 0)))
+ (setq word (substring keys word-beg word-end)
+ pos word-end))
+ (when (string-match "\\([0-9]+\\)\\*." word)
+ (setq times (string-to-number (substring word 0 (match-end 1))))
+ (setq word (substring word (1+ (match-end 1)))))
+ (cond ((string-match "^<<.+>>$" word)
+ (setq key (vconcat (if (eq (key-binding [?\M-x])
+ 'execute-extended-command)
+ [?\M-x]
+ (or (car (where-is-internal
+ 'execute-extended-command))
+ [?\M-x]))
+ (substring word 2 -2) "\r")))
+ ((and (string-match "^\\(\\([ACHMsS]-\\)*\\)<\\(.+\\)>$" word)
+ (progn
+ (setq word (concat (match-string 1 word)
+ (match-string 3 word)))
+ (not (string-match
+ "\\<\\(NUL\\|RET\\|LFD\\|ESC\\|SPC\\|DEL\\)$"
+ word))))
+ (setq key (list (intern word))))
+ ((or (equal word "REM") (string-match "^;;" word))
+ (setq pos (string-match "$" keys pos)))
+ (t
+ (let ((orig-word word) (prefix 0) (bits 0))
+ (while (string-match "^[ACHMsS]-." word)
+ (setq bits (+ bits
+ (cdr
+ (assq (aref word 0)
+ '((?A . ?\A-\^@) (?C . ?\C-\^@)
+ (?H . ?\H-\^@) (?M . ?\M-\^@)
+ (?s . ?\s-\^@) (?S . ?\S-\^@))))))
+ (setq prefix (+ prefix 2))
+ (setq word (substring word 2)))
+ (when (string-match "^\\^.$" word)
+ (setq bits (+ bits ?\C-\^@))
+ (setq prefix (1+ prefix))
+ (setq word (substring word 1)))
+ (let ((found (assoc word '(("NUL" . "\0") ("RET" . "\r")
+ ("LFD" . "\n") ("TAB" . "\t")
+ ("ESC" . "\e") ("SPC" . " ")
+ ("DEL" . "\177")))))
+ (when found (setq word (cdr found))))
+ (when (string-match "^\\\\[0-7]+$" word)
+ (let ((n 0))
+ (dolist (ch (cdr (string-to-list word)))
+ (setq n (+ (* n 8) ch -48)))
+ (setq word (vector n))))
+ (cond ((= bits 0)
+ (setq key word))
+ ((and (= bits ?\M-\^@) (stringp word)
+ (string-match "^-?[0-9]+$" word))
+ (setq key (mapcar (lambda (x) (+ x bits))
+ (append word nil))))
+ ((/= (length word) 1)
+ (error "%s must prefix a single character, not %s"
+ (substring orig-word 0 prefix) word))
+ ((and (/= (logand bits ?\C-\^@) 0) (stringp word)
+ ;; We used to accept . and ? here,
+ ;; but . is simply wrong,
+ ;; and C-? is not used (we use DEL instead).
+ (string-match "[@-_a-z]" word))
+ (setq key (list (+ bits (- ?\C-\^@)
+ (logand (aref word 0) 31)))))
+ (t
+ (setq key (list (+ bits (aref word 0)))))))))
+ (when key
+ (dolist (_ (number-sequence 1 times))
+ (setq res (vconcat res key))))))
+ (if (and (>= (length res) 4)
+ (eq (aref res 0) ?\C-x)
+ (eq (aref res 1) ?\()
+ (eq (aref res (- (length res) 2)) ?\C-x)
+ (eq (aref res (- (length res) 1)) ?\)))
+ (apply #'vector (let ((lres (append res nil)))
+ ;; Remove the first and last two elements.
+ (setq lres (cdr (cdr lres)))
+ (nreverse lres)
+ (setq lres (cdr (cdr lres)))
+ (nreverse lres)))
+ res))))
+
+(defun key-valid-p (keys)
+ "Say whether KEYS is a valid `kbd' sequence.
+A `kbd' sequence is a string consisting of one and more key
+strokes. The key strokes are separated by a space character.
+
+Each key stroke is either a single character, or the name of an
+event, surrounded by angle brackets. In addition, any key stroke
+may be preceded by one or more modifier keys. Finally, a limited
+number of characters have a special shorthand syntax.
+
+Here's some example key sequences.
+
+ \"f\" (the key 'f')
+ \"S o m\" (a three key sequence of the keys 'S', 'o' and 'm')
+ \"C-c o\" (a two key sequence of the keys 'c' with the control modifier
+ and then the key 'o')
+ \"H-\" (the key named \"left\" with the hyper modifier)
+ \"M-RET\" (the \"return\" key with a meta modifier)
+ \"C-M-\" (the \"space\" key with both the control and meta modifiers)
+
+These are the characters that have shorthand syntax:
+NUL, RET, TAB, LFD, ESC, SPC, DEL.
+
+Modifiers have to be specified in this order:
+
+ A-C-H-M-S-s
+
+which is
+
+ Alt-Control-Hyper-Meta-Shift-super"
+ (declare (pure t) (side-effect-free t))
+ (and
+ (stringp keys)
+ (string-match-p "\\`[^ ]+\\( [^ ]+\\)*\\'" keys)
+ (save-match-data
+ (catch 'exit
+ (let ((prefixes
+ "\\(A-\\)?\\(C-\\)?\\(H-\\)?\\(M-\\)?\\(S-\\)?\\(s-\\)?")
+ (case-fold-search nil))
+ (dolist (key (split-string keys " "))
+ ;; Every key might have these modifiers, and they should be
+ ;; in this order.
+ (when (string-match (concat "\\`" prefixes) key)
+ (setq key (substring key (match-end 0))))
+ (unless (or (and (= (length key) 1)
+ ;; Don't accept control characters as keys.
+ (not (< (aref key 0) ?\s))
+ ;; Don't accept Meta'd characters as keys.
+ (or (multibyte-string-p key)
+ (not (<= 127 (aref key 0) 255))))
+ (and (string-match-p "\\`<[-_A-Za-z0-9]+>\\'" key)
+ ;; Don't allow .
+ (= (progn
+ (string-match
+ (concat "\\`<" prefixes) key)
+ (match-end 0))
+ 1))
+ (string-match-p
+ "\\`\\(NUL\\|RET\\|TAB\\|LFD\\|ESC\\|SPC\\|DEL\\)\\'"
+ key))
+ ;; Invalid.
+ (throw 'exit nil)))
+ t)))))
+
+(defun key-translate (from to)
+ "Translate character FROM to TO on the current terminal.
+This function creates a `keyboard-translate-table' if necessary
+and then modifies one entry in it.
+
+Both KEY and TO are strings that satisfy `key-valid-p'."
+ (declare (compiler-macro
+ (lambda (form) (keymap--compile-check from to) form)))
+ (keymap--check from)
+ (keymap--check to)
+ (or (char-table-p keyboard-translate-table)
+ (setq keyboard-translate-table
+ (make-char-table 'keyboard-translate-table nil)))
+ (aset keyboard-translate-table (key-parse from) (key-parse to)))
+
+(defun keymap-lookup (keymap key &optional accept-default no-remap position)
+ "Return the binding for command KEY.
+KEY is a string that satisfies `key-valid-p'.
+
+If KEYMAP is nil, look up in the current keymaps. If non-nil, it
+should either be a keymap or a list of keymaps, and only these
+keymap(s) will be consulted.
+
+The binding is probably a symbol with a function definition.
+
+Normally, `keymap-lookup' ignores bindings for t, which act as
+default bindings, used when nothing else in the keymap applies;
+this makes it usable as a general function for probing keymaps.
+However, if the optional second argument ACCEPT-DEFAULT is
+non-nil, `keymap-lookup' does recognize the default bindings,
+just as `read-key-sequence' does.
+
+Like the normal command loop, `keymap-lookup' will remap the
+command resulting from looking up KEY by looking up the command
+in the current keymaps. However, if the optional third argument
+NO-REMAP is non-nil, `keymap-lookup' returns the unmapped
+command.
+
+If KEY is a key sequence initiated with the mouse, the used keymaps
+will depend on the clicked mouse position with regard to the buffer
+and possible local keymaps on strings.
+
+If the optional argument POSITION is non-nil, it specifies a mouse
+position as returned by `event-start' and `event-end', and the lookup
+occurs in the keymaps associated with it instead of KEY. It can also
+be a number or marker, in which case the keymap properties at the
+specified buffer position instead of point are used."
+ (declare (compiler-macro (lambda (form) (keymap--compile-check key) form)))
+ (keymap--check key)
+ (when (and keymap (not position))
+ (error "Can't pass in both keymap and position"))
+ (if keymap
+ (let ((value (lookup-key (key-parse key) keymap accept-default)))
+ (when (and (not no-remap)
+ (symbolp value))
+ (or (command-remapping value) value)))
+ (key-binding (kbd key) accept-default no-remap position)))
+
+(defun keymap-local-lookup (keys &optional accept-default)
+ "Return the binding for command KEYS in current local keymap only.
+KEY is a string that satisfies `key-valid-p'.
+
+The binding is probably a symbol with a function definition.
+
+If optional argument ACCEPT-DEFAULT is non-nil, recognize default
+bindings; see the description of `keymap-lookup' for more details
+about this."
+ (declare (compiler-macro (lambda (form) (keymap--compile-check keys) form)))
+ (when-let ((map (current-local-map)))
+ (keymap-lookup map keys accept-default)))
+
+(defun keymap-global-lookup (keys &optional accept-default message)
+ "Return the binding for command KEYS in current global keymap only.
+KEY is a string that satisfies `key-valid-p'.
+
+The binding is probably a symbol with a function definition.
+This function's return values are the same as those of `keymap-lookup'
+\(which see).
+
+If optional argument ACCEPT-DEFAULT is non-nil, recognize default
+bindings; see the description of `keymap-lookup' for more details
+about this.
+
+If MESSAGE (and interactively), message the result."
+ (declare (compiler-macro (lambda (form) (keymap--compile-check keys) form)))
+ (interactive
+ (list (key-description (read-key-sequence "Look up key in global keymap: "))
+ nil t))
+ (let ((def (keymap-lookup (current-global-map) keys accept-default)))
+ (when message
+ (message "%s is bound to %s globally" keys def))
+ def))
+
+(provide 'keymap)
+
+;;; keymap.el ends here
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index 2eae134e3d1..613d9734ae5 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -1,4 +1,5 @@
;;; loaddefs.el --- automatically extracted autoloads -*- lexical-binding: t -*-
+;; This file will be copied to ldefs-boot.el and checked in periodically.
;;
;;; Code:
@@ -2381,12 +2382,7 @@ a reflection.
(define-key ctl-x-r-map "M" 'bookmark-set-no-overwrite)
(define-key ctl-x-r-map "l" 'bookmark-bmenu-list)
-(defvar bookmark-map (let ((map (make-sparse-keymap))) (define-key map "x" 'bookmark-set) (define-key map "m" 'bookmark-set) (define-key map "M" 'bookmark-set-no-overwrite) (define-key map "j" 'bookmark-jump) (define-key map "g" 'bookmark-jump) (define-key map "o" 'bookmark-jump-other-window) (define-key map "5" 'bookmark-jump-other-frame) (define-key map "i" 'bookmark-insert) (define-key map "e" 'edit-bookmarks) (define-key map "f" 'bookmark-insert-location) (define-key map "r" 'bookmark-rename) (define-key map "d" 'bookmark-delete) (define-key map "D" 'bookmark-delete-all) (define-key map "l" 'bookmark-load) (define-key map "w" 'bookmark-write) (define-key map "s" 'bookmark-save) map) "\
-Keymap containing bindings to bookmark functions.
-It is not bound to any key by default: to bind it
-so that you have a bookmark prefix, just use `global-set-key' and bind a
-key of your choice to variable `bookmark-map'. All interactive bookmark
-functions have a binding in this keymap.")
+(defvar-keymap bookmark-map :doc "Keymap containing bindings to bookmark functions.\nIt is not bound to any key by default: to bind it\nso that you have a bookmark prefix, just use `global-set-key' and bind a\nkey of your choice to variable `bookmark-map'. All interactive bookmark\nfunctions have a binding in this keymap." "x" #'bookmark-set "m" #'bookmark-set "M" #'bookmark-set-no-overwrite "j" #'bookmark-jump "g" #'bookmark-jump "o" #'bookmark-jump-other-window "5" #'bookmark-jump-other-frame "i" #'bookmark-insert "e" #'edit-bookmarks "f" #'bookmark-insert-location "r" #'bookmark-rename "d" #'bookmark-delete "D" #'bookmark-delete-all "l" #'bookmark-load "w" #'bookmark-write "s" #'bookmark-save)
(fset 'bookmark-map bookmark-map)
(autoload 'bookmark-set "bookmark" "\
@@ -4772,6 +4768,14 @@ space at the end of each line.
\(fn &optional NO-ERROR)" t nil)
+(autoload 'checkdoc-dired "checkdoc" "\
+In Dired, run `checkdoc' on marked files.
+Skip anything that doesn't have the Emacs Lisp library file
+extension (\".el\").
+When called from Lisp, FILES is a list of filenames.
+
+\(fn FILES)" '(dired-mode) nil)
+
(autoload 'checkdoc-ispell "checkdoc" "\
Check the style and spelling of everything interactively.
Calls `checkdoc' with spell-checking turned on.
@@ -6755,7 +6759,7 @@ You can set this option through Custom, if you carefully read the
last paragraph below. However, usually it is simpler to write
something like the following in your init file:
-\(setq custom-file \"~/.emacs-custom.el\")
+\(setq custom-file \"~/.config/emacs-custom.el\")
\(load custom-file)
Note that both lines are necessary: the first line tells Custom to
@@ -11135,6 +11139,9 @@ Macros in BODY are expanded when the test is defined, not when it
is run. If a macro (possibly with side effects) is to be tested,
it has to be wrapped in `(eval (quote ...))'.
+If NAME is already defined as a test and Emacs is running
+in batch mode, an error is signalled.
+
\(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil t)
(function-put 'ert-deftest 'doc-string-elt '3)
@@ -11167,11 +11174,8 @@ the tests).
Run the tests specified by SELECTOR and display the results in a buffer.
SELECTOR works as described in `ert-select-tests'.
-OUTPUT-BUFFER-NAME and MESSAGE-FN should normally be nil; they
-are used for automated self-tests and specify which buffer to use
-and how to display message.
-\(fn SELECTOR &optional OUTPUT-BUFFER-NAME MESSAGE-FN)" t nil)
+\(fn SELECTOR)" t nil)
(defalias 'ert #'ert-run-tests-interactively)
@@ -13301,7 +13305,7 @@ retrieval with `flymake-diagnostic-data'.
If LOCUS is a buffer BEG and END should be buffer positions
inside it. If LOCUS designates a file, BEG and END should be a
cons (LINE . COL) indicating a file position. In this second
-case, END may be ommited in which case the region is computed
+case, END may be omitted in which case the region is computed
using `flymake-diag-region' if the diagnostic is appended to an
actual buffer.
@@ -30412,6 +30416,29 @@ only these files will be asked to be saved.
\(fn ARG)" nil nil)
+(autoload 'server-stop-automatically "server" "\
+Automatically stop server as specified by ARG.
+
+If ARG is the symbol `empty', stop the server when it has no
+remaining clients, no remaining unsaved file-visiting buffers,
+and no running processes with a `query-on-exit' flag.
+
+If ARG is the symbol `delete-frame', ask the user when the last
+frame is deleted whether each unsaved file-visiting buffer must
+be saved and each running process with a `query-on-exit' flag
+can be stopped, and if so, stop the server itself.
+
+If ARG is the symbol `kill-terminal', ask the user when the
+terminal is killed with \\[save-buffers-kill-terminal] whether each unsaved file-visiting
+buffer must be saved and each running process with a `query-on-exit'
+flag can be stopped, and if so, stop the server itself.
+
+Any other value of ARG will cause this function to signal an error.
+
+This function is meant to be called from the user init file.
+
+\(fn ARG)" nil nil)
+
(register-definition-prefixes "server" '("server-"))
;;;***
@@ -30748,7 +30775,7 @@ If FUNCTION is non-nil, place point on the entry for FUNCTION (if any).
\(fn GROUP &optional FUNCTION)" t nil)
-(register-definition-prefixes "shortdoc" '("alist" "buffer" "define-short-documentation-group" "file" "hash-table" "list" "number" "overlay" "process" "regexp" "sequence" "shortdoc-" "string" "text-properties" "vector"))
+(register-definition-prefixes "shortdoc" '("alist" "buffer" "define-short-documentation-group" "file" "hash-table" "keymaps" "list" "number" "overlay" "process" "regexp" "sequence" "shortdoc-" "string" "text-properties" "vector"))
;;;***
@@ -35146,7 +35173,7 @@ Add archive file name handler to `file-name-handler-alist'." (when tramp-archive
;;;;;; 0))
;;; Generated autoloads from net/tramp-compat.el
-(register-definition-prefixes "tramp-compat" '("tramp-"))
+(register-definition-prefixes "tramp-compat" '("tramp-compat-"))
;;;***
@@ -35232,7 +35259,7 @@ Add archive file name handler to `file-name-handler-alist'." (when tramp-archive
;;;### (autoloads nil "trampver" "net/trampver.el" (0 0 0 0))
;;; Generated autoloads from net/trampver.el
-(push (purecopy '(tramp 2 5 2 -1)) package--builtin-versions)
+(push (purecopy '(tramp 2 6 0 -1)) package--builtin-versions)
(register-definition-prefixes "trampver" '("tramp-"))
@@ -35555,65 +35582,21 @@ You might need to set `uce-mail-reader' before using this.
;;;;;; (0 0 0 0))
;;; Generated autoloads from international/ucs-normalize.el
-(autoload 'ucs-normalize-NFD-region "ucs-normalize" "\
-Normalize the current region by the Unicode NFD.
+(autoload 'string-glyph-compose "ucs-normalize" "\
+Compose the string STR by according to the Unicode NFC.
+This is the canonical composed form. For instance:
-\(fn FROM TO)" t nil)
+ (ucs-normalize-NFC-string \"Å\") => \"Å\"
-(autoload 'ucs-normalize-NFD-string "ucs-normalize" "\
-Normalize the string STR by the Unicode NFD.
+\(fn STRING)" nil nil)
-\(fn STR)" nil nil)
+(autoload 'string-glyph-decompose "ucs-normalize" "\
+Decompose the string STR according to the Unicode NFD.
+This is the canonical decomposed form. For instance:
-(autoload 'ucs-normalize-NFC-region "ucs-normalize" "\
-Normalize the current region by the Unicode NFC.
+ (ucs-normalize-NFD-string \"Å\") => \"Å\"
-\(fn FROM TO)" t nil)
-
-(autoload 'ucs-normalize-NFC-string "ucs-normalize" "\
-Normalize the string STR by the Unicode NFC.
-
-\(fn STR)" nil nil)
-
-(autoload 'ucs-normalize-NFKD-region "ucs-normalize" "\
-Normalize the current region by the Unicode NFKD.
-
-\(fn FROM TO)" t nil)
-
-(autoload 'ucs-normalize-NFKD-string "ucs-normalize" "\
-Normalize the string STR by the Unicode NFKD.
-
-\(fn STR)" nil nil)
-
-(autoload 'ucs-normalize-NFKC-region "ucs-normalize" "\
-Normalize the current region by the Unicode NFKC.
-
-\(fn FROM TO)" t nil)
-
-(autoload 'ucs-normalize-NFKC-string "ucs-normalize" "\
-Normalize the string STR by the Unicode NFKC.
-
-\(fn STR)" nil nil)
-
-(autoload 'ucs-normalize-HFS-NFD-region "ucs-normalize" "\
-Normalize the current region by the Unicode NFD and Mac OS's HFS Plus.
-
-\(fn FROM TO)" t nil)
-
-(autoload 'ucs-normalize-HFS-NFD-string "ucs-normalize" "\
-Normalize the string STR by the Unicode NFD and Mac OS's HFS Plus.
-
-\(fn STR)" nil nil)
-
-(autoload 'ucs-normalize-HFS-NFC-region "ucs-normalize" "\
-Normalize the current region by the Unicode NFC and Mac OS's HFS Plus.
-
-\(fn FROM TO)" t nil)
-
-(autoload 'ucs-normalize-HFS-NFC-string "ucs-normalize" "\
-Normalize the string STR by the Unicode NFC and Mac OS's HFS Plus.
-
-\(fn STR)" nil nil)
+\(fn STRING)" nil nil)
(register-definition-prefixes "ucs-normalize" '("ucs-normalize-" "utf-8-hfs"))
@@ -39738,7 +39721,7 @@ Zone out, completely." t nil)
;;;;;; "international/uni-special-lowercase.el" "international/uni-special-titlecase.el"
;;;;;; "international/uni-special-uppercase.el" "international/uni-titlecase.el"
;;;;;; "international/uni-uppercase.el" "isearch.el" "jit-lock.el"
-;;;;;; "jka-cmpr-hook.el" "language/burmese.el" "language/cham.el"
+;;;;;; "jka-cmpr-hook.el" "keymap.el" "language/burmese.el" "language/cham.el"
;;;;;; "language/chinese.el" "language/cyrillic.el" "language/czech.el"
;;;;;; "language/english.el" "language/ethiopic.el" "language/european.el"
;;;;;; "language/georgian.el" "language/greek.el" "language/hebrew.el"
diff --git a/lisp/loadup.el b/lisp/loadup.el
index c6bd930cdf7..3d941f7b512 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -131,6 +131,7 @@
(load "emacs-lisp/byte-run")
(load "emacs-lisp/backquote")
(load "subr")
+(load "keymap")
;; Do it after subr, since both after-load-functions and add-hook are
;; implemented in subr.el.
@@ -302,6 +303,11 @@
(load "term/common-win")
(load "term/x-win")))
+(if (featurep 'haiku)
+ (progn
+ (load "term/common-win")
+ (load "term/haiku-win")))
+
(if (or (eq system-type 'windows-nt)
(featurep 'w32))
(progn
@@ -564,6 +570,7 @@ lost after dumping")))
(delete-file output)))))
;; Recompute NAME now, so that it isn't set when we dump.
(if (not (or (eq system-type 'ms-dos)
+ (eq system-type 'haiku) ;; BFS doesn't support hard links
;; Don't bother adding another name if we're just
;; building bootstrap-emacs.
(member dump-mode '("pbootstrap" "bootstrap"))))
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el
index 716348a9c19..ef040ca90b3 100644
--- a/lisp/mail/footnote.el
+++ b/lisp/mail/footnote.el
@@ -898,7 +898,7 @@ play around with the following keys:
(make-local-variable 'footnote-end-tag)
(make-local-variable 'adaptive-fill-function)
- ;; Filladapt was an XEmacs package which is now in GNU ELPA.
+ ;; Filladapt is a GNU ELPA package.
(when (boundp 'filladapt-token-table)
;; add tokens to filladapt to match footnotes
;; 1] xxxxxxxxxxx x x x or [1] x x x x x x x
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el
index f393ac773f5..b3080ac416b 100644
--- a/lisp/mail/supercite.el
+++ b/lisp/mail/supercite.el
@@ -1767,7 +1767,7 @@ is determined non-interactively. The value is queried for in the
minibuffer exactly the same way that `set-variable' does it.
You can see the current value of the variable when the minibuffer is
-querying you by typing `C-h'. Note that the format is changed
+querying you by typing \\`C-h'. Note that the format is changed
slightly from that used by `set-variable' -- the current value is
printed just after the variable's name instead of at the bottom of the
help window."
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index b9ca57f5c49..bd110226618 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1347,14 +1347,13 @@ mail status in mode line"))
(frame-parameter (menu-bar-frame-for-menubar)
'menu-bar-lines)))))
- (unless (featurep 'ns)
- (bindings--define-key menu [showhide-tab-bar]
- '(menu-item "Tab Bar" toggle-tab-bar-mode-from-frame
- :help "Turn tab bar on/off"
- :button
- (:toggle . (menu-bar-positive-p
- (frame-parameter (menu-bar-frame-for-menubar)
- 'tab-bar-lines))))))
+ (bindings--define-key menu [showhide-tab-bar]
+ '(menu-item "Tab Bar" toggle-tab-bar-mode-from-frame
+ :help "Turn tab bar on/off"
+ :button
+ (:toggle . (menu-bar-positive-p
+ (frame-parameter (menu-bar-frame-for-menubar)
+ 'tab-bar-lines)))))
(if (and (boundp 'menu-bar-showhide-tool-bar-menu)
(keymapp menu-bar-showhide-tool-bar-menu))
@@ -2541,6 +2540,7 @@ See `menu-bar-mode' for more information."
(declare-function x-menu-bar-open "term/x-win" (&optional frame))
(declare-function w32-menu-bar-open "term/w32-win" (&optional frame))
(declare-function pgtk-menu-bar-open "term/pgtk-win" (&optional frame))
+(declare-function haiku-menu-bar-open "haikumenu.c" (&optional frame))
(defun lookup-key-ignore-too-long (map key)
"Call `lookup-key' and convert numeric values to nil."
@@ -2666,9 +2666,10 @@ first TTY menu-bar menu to be dropped down. Interactively,
this is the numeric argument to the command.
This function decides which method to use to access the menu
depending on FRAME's terminal device. On X displays, it calls
-`x-menu-bar-open'; on Windows, `w32-menu-bar-open'; otherwise it
-calls either `popup-menu' or `tmm-menubar' depending on whether
-`tty-menu-open-use-tmm' is nil or not.
+`x-menu-bar-open'; on Windows, `w32-menu-bar-open'; on Haiku,
+`haiku-menu-bar-open'; otherwise it calls either `popup-menu'
+or `tmm-menubar' depending on whether `tty-menu-open-use-tmm'
+is nil or not.
If FRAME is nil or not given, use the selected frame."
(interactive
@@ -2677,6 +2678,8 @@ If FRAME is nil or not given, use the selected frame."
(cond
((eq type 'x) (x-menu-bar-open frame))
((eq type 'w32) (w32-menu-bar-open frame))
+ ((eq type 'haiku) (haiku-menu-bar-open frame))
+ ((eq type 'pgtk) (pgtk-menu-bar-open frame))
((and (null tty-menu-open-use-tmm)
(not (zerop (or (frame-parameter nil 'menu-bar-lines) 0))))
;; Make sure the menu bar is up to date. One situation where
@@ -2739,7 +2742,7 @@ could provide `global-map' where items are limited to the global map only."
;; sorting.
(push (cons pos menu-item) menu-end)
(push menu-item menu-bar))))
- (lookup-key (or keymap (menu-bar-current-active-maps)) [menu-bar]))
+ (or keymap (lookup-key (menu-bar-current-active-maps) [menu-bar])))
`(keymap ,@(nreverse menu-bar)
,@(mapcar #'cdr (sort menu-end
(lambda (a b)
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el
index 0669f5bb22c..25fff6a8e1b 100644
--- a/lisp/mh-e/mh-acros.el
+++ b/lisp/mh-e/mh-acros.el
@@ -59,7 +59,8 @@
;;;###mh-autoload
(defmacro mh-funcall-if-exists (function &rest args)
"Call FUNCTION with ARGS as parameters if it exists."
- (declare (debug (symbolp body)))
+ (declare (obsolete "use `(when (fboundp 'foo) (foo))' instead." "29.1")
+ (debug (symbolp body)))
;; FIXME: Not clear when this should be used. If the function happens
;; not to exist at compile-time (e.g. because the corresponding package
;; wasn't loaded), then it won't ever be used :-(
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el
index 5761df5297c..8087df97c94 100644
--- a/lisp/mh-e/mh-alias.el
+++ b/lisp/mh-e/mh-alias.el
@@ -258,15 +258,7 @@ Blind aliases or users from /etc/passwd are not expanded."
(read-string prompt)
(let* ((minibuffer-local-completion-map mh-alias-read-address-map)
(completion-ignore-case mh-alias-completion-ignore-case-flag)
- (the-answer
- (cond ((fboundp 'completing-read-multiple)
- (mh-funcall-if-exists
- completing-read-multiple prompt mh-alias-alist nil nil))
- ((featurep 'multi-prompt)
- (mh-funcall-if-exists
- multi-prompt "," nil prompt mh-alias-alist nil nil))
- (t (split-string
- (completing-read prompt mh-alias-alist nil nil) ",")))))
+ (the-answer (completing-read-multiple prompt mh-alias-alist nil nil)))
(if (not mh-alias-expand-aliases-flag)
(mapconcat #'identity the-answer ", ")
;; Loop over all elements, checking if in passwd alias or blind first
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index 130d3784ddd..a47a6f9cca9 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -624,6 +624,8 @@ See also `mh-compose-forward-as-mime-flag',
(defun mh-forwarded-letter-subject (from subject)
"Return a Subject suitable for a forwarded message.
Original message has headers FROM and SUBJECT."
+ ;; Join continued lines.
+ (setq from (replace-regexp-in-string "\\s *\n\\s +" " " from))
(let ((addr-start (string-search "<" from))
(comment (string-search "(" from)))
(cond ((and addr-start (> addr-start 0))
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el
index 19be5afd790..23dc48a574c 100644
--- a/lisp/mh-e/mh-compat.el
+++ b/lisp/mh-e/mh-compat.el
@@ -46,10 +46,9 @@
;; cl-letf. This macro is based upon gmm-flet from Gnus.
(defmacro mh-flet (bindings &rest body)
"Make temporary overriding function definitions.
-This is an analogue of a dynamically scoped `let' that operates on
-the function cell of FUNCs rather than their value cell.
-
-\(fn ((FUNC ARGLIST BODY...) ...) FORM...)"
+That is, temporarily rebind the functions listed in BINDINGS and then
+execute BODY. BINDINGS is a list containing one or more lists of the
+form (FUNCNAME ARGLIST BODY...), similar to defun."
(declare (indent 1) (debug ((&rest (sexp sexp &rest form)) &rest form)))
(if (fboundp 'cl-letf)
`(cl-letf ,(mapcar (lambda (binding)
@@ -138,7 +137,7 @@ This is taken from RFC 2396.")
#'window-full-height-p "29.1")
(defmacro mh-write-file-functions ()
- "Return `write-file-functions'. "
+ "Return `write-file-functions'."
(declare (obsolete nil "29.1"))
''write-file-functions)
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index c700b3348df..132ac33d269 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -212,7 +212,7 @@ annotation.")
;; Save the "b" binding for a future `back'. Maybe?
(define-keymap :keymap mh-folder-mode-map
- " " #'mh-page-msg
+ "SPC" #'mh-page-msg
"!" #'mh-refile-or-write-again
"'" #'mh-toggle-tick
"," #'mh-header-display
@@ -223,15 +223,15 @@ annotation.")
"?" #'mh-help
"E" #'mh-extract-rejected-mail
"M" #'mh-modify
- "\177" #'mh-previous-page
- "\C-d" #'mh-delete-msg-no-motion
- "\t" #'mh-index-next-folder
- [backtab] #'mh-index-previous-folder
- "\M-\t" #'mh-index-previous-folder
- "\e<" #'mh-first-msg
- "\e>" #'mh-last-msg
- "\ed" #'mh-redistribute
- "\r" #'mh-show
+ "DEL" #'mh-previous-page
+ "C-d" #'mh-delete-msg-no-motion
+ "TAB" #'mh-index-next-folder
+ "" #'mh-index-previous-folder
+ "C-M-i" #'mh-index-previous-folder
+ "ESC <" #'mh-first-msg
+ "ESC >" #'mh-last-msg
+ "ESC d" #'mh-redistribute
+ "RET" #'mh-show
"^" #'mh-alt-refile-msg
"c" #'mh-copy-msg
"d" #'mh-delete-msg
@@ -242,10 +242,10 @@ annotation.")
"k" #'mh-delete-subject-or-thread
"m" #'mh-alt-send
"n" #'mh-next-undeleted-msg
- "\M-n" #'mh-next-unread-msg
+ "M-n" #'mh-next-unread-msg
"o" #'mh-refile-msg
"p" #'mh-previous-undeleted-msg
- "\M-p" #'mh-previous-unread-msg
+ "M-p" #'mh-previous-unread-msg
"q" #'mh-quit
"r" #'mh-reply
"s" #'mh-send
@@ -324,9 +324,9 @@ annotation.")
"u" #'mh-store-msg) ;uuencode
"D" (define-keymap :prefix 'mh-digest-map
- " " #'mh-page-digest
+ "SPC" #'mh-page-digest
"?" #'mh-prefix-help
- "\177" #'mh-page-digest-backwards
+ "DEL" #'mh-page-digest-backwards
"b" #'mh-burst-digest)
"K" (define-keymap :prefix 'mh-mime-map
@@ -337,11 +337,11 @@ annotation.")
"o" #'mh-folder-save-mime-part
"t" #'mh-toggle-mime-buttons
"v" #'mh-folder-toggle-mime-part
- "\t" #'mh-next-button
- [backtab] #'mh-prev-button
- "\M-\t" #'mh-prev-button)
+ "TAB" #'mh-next-button
+ "" #'mh-prev-button
+ "C-M-i" #'mh-prev-button)
- [mouse-2] #'mh-show-mouse)
+ "" #'mh-show-mouse)
;; "C-c /" prefix is used in mh-folder-mode by pgp.el and mailcrypt
@@ -631,7 +631,7 @@ perform the operation on all messages in that region.
(add-hook 'write-file-functions #'mh-execute-commands nil t)
(make-local-variable 'revert-buffer-function)
(make-local-variable 'hl-line-mode) ; avoid pollution
- (mh-funcall-if-exists hl-line-mode 1)
+ (hl-line-mode 1)
(setq revert-buffer-function #'mh-undo-folder)
(add-to-list 'minor-mode-alist '(mh-showing-mode " Show"))
(mh-inc-spool-make)
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index 1f7902640a1..ebe94a7af83 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -115,67 +115,67 @@
;; If this changes, modify mh-letter-mode-help-messages accordingly, above.
(define-keymap :keymap mh-letter-mode-map
- " " #'mh-letter-complete-or-space
+ "SPC" #'mh-letter-complete-or-space
"," #'mh-letter-confirm-address
- "\C-c?" #'mh-help
- "\C-c\C-\\" #'mh-fully-kill-draft ;if no C-q
- "\C-c\C-^" #'mh-insert-signature ;if no C-s
- "\C-c\C-c" #'mh-send-letter
- "\C-c\C-d" #'mh-insert-identity
- "\C-c\C-e" #'mh-mh-to-mime
- "\C-c\C-f\C-a" #'mh-to-field
- "\C-c\C-f\C-b" #'mh-to-field
- "\C-c\C-f\C-c" #'mh-to-field
- "\C-c\C-f\C-d" #'mh-to-field
- "\C-c\C-f\C-f" #'mh-to-fcc
- "\C-c\C-f\C-l" #'mh-to-field
- "\C-c\C-f\C-m" #'mh-to-field
- "\C-c\C-f\C-r" #'mh-to-field
- "\C-c\C-f\C-s" #'mh-to-field
- "\C-c\C-f\C-t" #'mh-to-field
- "\C-c\C-fa" #'mh-to-field
- "\C-c\C-fb" #'mh-to-field
- "\C-c\C-fc" #'mh-to-field
- "\C-c\C-fd" #'mh-to-field
- "\C-c\C-ff" #'mh-to-fcc
- "\C-c\C-fl" #'mh-to-field
- "\C-c\C-fm" #'mh-to-field
- "\C-c\C-fr" #'mh-to-field
- "\C-c\C-fs" #'mh-to-field
- "\C-c\C-ft" #'mh-to-field
- "\C-c\C-i" #'mh-insert-letter
- "\C-c\C-m\C-e" #'mh-mml-secure-message-encrypt
- "\C-c\C-m\C-f" #'mh-compose-forward
- "\C-c\C-m\C-g" #'mh-mh-compose-anon-ftp
- "\C-c\C-m\C-i" #'mh-compose-insertion
- "\C-c\C-m\C-m" #'mh-mml-to-mime
- "\C-c\C-m\C-n" #'mh-mml-unsecure-message
- "\C-c\C-m\C-s" #'mh-mml-secure-message-sign
- "\C-c\C-m\C-t" #'mh-mh-compose-external-compressed-tar
- "\C-c\C-m\C-u" #'mh-mh-to-mime-undo
- "\C-c\C-m\C-x" #'mh-mh-compose-external-type
- "\C-c\C-mee" #'mh-mml-secure-message-encrypt
- "\C-c\C-mes" #'mh-mml-secure-message-signencrypt
- "\C-c\C-mf" #'mh-compose-forward
- "\C-c\C-mg" #'mh-mh-compose-anon-ftp
- "\C-c\C-mi" #'mh-compose-insertion
- "\C-c\C-mm" #'mh-mml-to-mime
- "\C-c\C-mn" #'mh-mml-unsecure-message
- "\C-c\C-mse" #'mh-mml-secure-message-signencrypt
- "\C-c\C-mss" #'mh-mml-secure-message-sign
- "\C-c\C-mt" #'mh-mh-compose-external-compressed-tar
- "\C-c\C-mu" #'mh-mh-to-mime-undo
- "\C-c\C-mx" #'mh-mh-compose-external-type
- "\C-c\C-o" #'mh-open-line
- "\C-c\C-q" #'mh-fully-kill-draft
- "\C-c\C-s" #'mh-insert-signature
- "\C-c\C-t" #'mh-letter-toggle-header-field-display
- "\C-c\C-w" #'mh-check-whom
- "\C-c\C-y" #'mh-yank-cur-msg
- "\C-c\M-d" #'mh-insert-auto-fields
- "\M-\t" #'completion-at-point
- "\t" #'mh-letter-next-header-field-or-indent
- [backtab] #'mh-letter-previous-header-field)
+ "C-c ?" #'mh-help
+ "C-c C-\\" #'mh-fully-kill-draft ;if no C-q
+ "C-c C-^" #'mh-insert-signature ;if no C-s
+ "C-c C-c" #'mh-send-letter
+ "C-c C-d" #'mh-insert-identity
+ "C-c C-e" #'mh-mh-to-mime
+ "C-c C-f C-a" #'mh-to-field
+ "C-c C-f C-b" #'mh-to-field
+ "C-c C-f C-c" #'mh-to-field
+ "C-c C-f C-d" #'mh-to-field
+ "C-c C-f C-f" #'mh-to-fcc
+ "C-c C-f C-l" #'mh-to-field
+ "C-c C-f C-m" #'mh-to-field
+ "C-c C-f C-r" #'mh-to-field
+ "C-c C-f C-s" #'mh-to-field
+ "C-c C-f C-t" #'mh-to-field
+ "C-c C-f a" #'mh-to-field
+ "C-c C-f b" #'mh-to-field
+ "C-c C-f c" #'mh-to-field
+ "C-c C-f d" #'mh-to-field
+ "C-c C-f f" #'mh-to-fcc
+ "C-c C-f l" #'mh-to-field
+ "C-c C-f m" #'mh-to-field
+ "C-c C-f r" #'mh-to-field
+ "C-c C-f s" #'mh-to-field
+ "C-c C-f t" #'mh-to-field
+ "C-c C-i" #'mh-insert-letter
+ "C-c C-m C-e" #'mh-mml-secure-message-encrypt
+ "C-c C-m C-f" #'mh-compose-forward
+ "C-c C-m C-g" #'mh-mh-compose-anon-ftp
+ "C-c C-m TAB" #'mh-compose-insertion
+ "C-c C-m C-m" #'mh-mml-to-mime
+ "C-c C-m C-n" #'mh-mml-unsecure-message
+ "C-c C-m C-s" #'mh-mml-secure-message-sign
+ "C-c C-m C-t" #'mh-mh-compose-external-compressed-tar
+ "C-c C-m C-u" #'mh-mh-to-mime-undo
+ "C-c C-m C-x" #'mh-mh-compose-external-type
+ "C-c C-m e e" #'mh-mml-secure-message-encrypt
+ "C-c C-m e s" #'mh-mml-secure-message-signencrypt
+ "C-c C-m f" #'mh-compose-forward
+ "C-c C-m g" #'mh-mh-compose-anon-ftp
+ "C-c C-m i" #'mh-compose-insertion
+ "C-c C-m m" #'mh-mml-to-mime
+ "C-c C-m n" #'mh-mml-unsecure-message
+ "C-c C-m s e" #'mh-mml-secure-message-signencrypt
+ "C-c C-m s s" #'mh-mml-secure-message-sign
+ "C-c C-m t" #'mh-mh-compose-external-compressed-tar
+ "C-c C-m u" #'mh-mh-to-mime-undo
+ "C-c C-m x" #'mh-mh-compose-external-type
+ "C-c C-o" #'mh-open-line
+ "C-c C-q" #'mh-fully-kill-draft
+ "C-c C-s" #'mh-insert-signature
+ "C-c C-t" #'mh-letter-toggle-header-field-display
+ "C-c C-w" #'mh-check-whom
+ "C-c C-y" #'mh-yank-cur-msg
+ "C-c M-d" #'mh-insert-auto-fields
+ "C-M-i" #'completion-at-point
+ "TAB" #'mh-letter-next-header-field-or-indent
+ "" #'mh-letter-previous-header-field)
;; "C-c /" prefix is used in mh-letter-mode by pgp.el and mailcrypt.el.
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index 0b58d7ba1f4..714bf029bb7 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -39,6 +39,7 @@
;;; Code:
(require 'mh-e)
+(require 'mh-acros)
(require 'mh-gnus) ;needed because mh-gnus.el not compiled
(require 'font-lock)
@@ -700,8 +701,7 @@ buttons for alternative parts that are usually suppressed."
;; Delete the button and displayed part (if any)
(let ((region (get-text-property point 'mh-region)))
(when region
- (mh-funcall-if-exists
- remove-images (car region) (cdr region)))
+ (remove-images (car region) (cdr region)))
(mm-display-part handle)
(when region
(delete-region (car region) (cdr region))))
diff --git a/lisp/mh-e/mh-scan.el b/lisp/mh-e/mh-scan.el
index 5a1a671aee2..9ac251e8b71 100644
--- a/lisp/mh-e/mh-scan.el
+++ b/lisp/mh-e/mh-scan.el
@@ -327,7 +327,11 @@ Note that columns in Emacs start with 0.")
(defvar mh-scan-cmd-note-width 1
"Number of columns consumed by the cmd-note field in `mh-scan-format'.
-This column will have one of the values: \" \", \"^\", \"D\", \"B\", \"A\", \"+\", where
+This column will have one of the values:
+
+ \" \", \"^\", \"D\", \"B\", \"A\", \"+\"
+
+where
\" \" is the default value,
\"^\" is the `mh-note-refiled' character,
@@ -509,7 +513,7 @@ with `mh-scan-msg-format-string'."
Note that columns in Emacs start with 0.
If `mh-scan-format-file' is set to \"Use MH-E scan Format\" this
-means that either `mh-scan-format-mh' or `mh-scan-format-nmh' are
+means that either `mh-scan-format-mh' or `mh-scan-format-nmh' is
in use. This function therefore assumes that the first column is
empty (to provide room for the cursor), the following WIDTH
columns contain the message number, and the column for notations
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el
index ef84c5eb283..8012e624f16 100644
--- a/lisp/mh-e/mh-search.el
+++ b/lisp/mh-e/mh-search.el
@@ -550,19 +550,19 @@ group of results."
;; If this changes, modify mh-search-mode-help-messages accordingly, below.
(define-keymap :keymap mh-search-mode-map
- "\C-c?" #'mh-help
- "\C-c\C-c" #'mh-index-do-search
- "\C-c\C-p" #'mh-pick-do-search
- "\C-c\C-f\C-b" #'mh-to-field
- "\C-c\C-f\C-c" #'mh-to-field
- "\C-c\C-f\C-m" #'mh-to-field
- "\C-c\C-f\C-s" #'mh-to-field
- "\C-c\C-f\C-t" #'mh-to-field
- "\C-c\C-fb" #'mh-to-field
- "\C-c\C-fc" #'mh-to-field
- "\C-c\C-fm" #'mh-to-field
- "\C-c\C-fs" #'mh-to-field
- "\C-c\C-ft" #'mh-to-field)
+ "C-c ?" #'mh-help
+ "C-c C-c" #'mh-index-do-search
+ "C-c C-p" #'mh-pick-do-search
+ "C-c C-f C-b" #'mh-to-field
+ "C-c C-f C-c" #'mh-to-field
+ "C-c C-f C-m" #'mh-to-field
+ "C-c C-f C-s" #'mh-to-field
+ "C-c C-f C-t" #'mh-to-field
+ "C-c C-f b" #'mh-to-field
+ "C-c C-f c" #'mh-to-field
+ "C-c C-f m" #'mh-to-field
+ "C-c C-f s" #'mh-to-field
+ "C-c C-f t" #'mh-to-field)
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el
index 524179648dc..16489bf0172 100644
--- a/lisp/mh-e/mh-show.el
+++ b/lisp/mh-e/mh-show.el
@@ -367,7 +367,8 @@ still visible.\n")
(setq normal-exit t))
(deactivate-mark)
(when (eq major-mode 'mh-folder-mode)
- (mh-funcall-if-exists hl-line-highlight))
+ (when (fboundp 'hl-line-highlight)
+ (hl-line-highlight)))
(cond ((not normal-exit)
(set-window-configuration config))
,(if dont-return
@@ -560,7 +561,7 @@ still visible.\n")
;;; MH-Show Keys
(define-keymap :keymap mh-show-mode-map
- " " #'mh-show-page-msg
+ "SPC" #'mh-show-page-msg
"!" #'mh-show-refile-or-write-again
"'" #'mh-show-toggle-tick
"," #'mh-show-header-display
@@ -570,12 +571,12 @@ still visible.\n")
"?" #'mh-help
"E" #'mh-show-extract-rejected-mail
"M" #'mh-show-modify
- "\177" #'mh-show-previous-page
- "\C-d" #'mh-show-delete-msg-no-motion
- "\t" #'mh-show-next-button
- [backtab] #'mh-show-prev-button
- "\M-\t" #'mh-show-prev-button
- "\ed" #'mh-show-redistribute
+ "DEL" #'mh-show-previous-page
+ "C-d" #'mh-show-delete-msg-no-motion
+ "TAB" #'mh-show-next-button
+ "" #'mh-show-prev-button
+ "C-M-i" #'mh-show-prev-button
+ "ESC d" #'mh-show-redistribute
"^" #'mh-show-refile-msg
"c" #'mh-show-copy-msg
"d" #'mh-show-delete-msg
@@ -586,10 +587,10 @@ still visible.\n")
"k" #'mh-show-delete-subject-or-thread
"m" #'mh-show-send
"n" #'mh-show-next-undeleted-msg
- "\M-n" #'mh-show-next-unread-msg
+ "M-n" #'mh-show-next-unread-msg
"o" #'mh-show-refile-msg
"p" #'mh-show-previous-undeleted-msg
- "\M-p" #'mh-show-previous-unread-msg
+ "M-p" #'mh-show-previous-unread-msg
"q" #'mh-show-quit
"r" #'mh-show-reply
"s" #'mh-show-send
@@ -670,8 +671,8 @@ still visible.\n")
"D" (define-keymap :prefix 'mh-show-digest-map
"?" #'mh-prefix-help
- " " #'mh-show-page-digest
- "\177" #'mh-show-page-digest-backwards
+ "SPC" #'mh-show-page-digest
+ "DEL" #'mh-show-page-digest-backwards
"b" #'mh-show-burst-digest)
"K" (define-keymap :prefix 'mh-show-mime-map
@@ -682,9 +683,9 @@ still visible.\n")
"o" #'mh-show-save-mime-part
"i" #'mh-show-inline-mime-part
"t" #'mh-show-toggle-mime-buttons
- "\t" #'mh-show-next-button
- [backtab] #'mh-show-prev-button
- "\M-\t" #'mh-show-prev-button))
+ "TAB" #'mh-show-next-button
+ "" #'mh-show-prev-button
+ "C-M-i" #'mh-show-prev-button))
diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el
index 82b108c8c8d..d9909a034d9 100644
--- a/lisp/mh-e/mh-speed.el
+++ b/lisp/mh-e/mh-speed.el
@@ -86,7 +86,7 @@
(define-keymap :keymap mh-folder-speedbar-key-map
"+" #'mh-speed-expand-folder
"-" #'mh-speed-contract-folder
- "\r" #'mh-speed-view
+ "RET" #'mh-speed-view
"r" #'mh-speed-refresh)
(defvar mh-show-speedbar-key-map mh-folder-speedbar-key-map)
@@ -535,8 +535,8 @@ be handled next."
(insert-char char 1 t)
(put-text-property (point) (1- (point)) 'invisible nil)
;; make sure we fix the image on the text here.
- (mh-funcall-if-exists
- speedbar-insert-image-button-maybe (- (point) 2) 3)))))
+ (when (fboundp 'speedbar-insert-image-button-maybe)
+ (speedbar-insert-image-button-maybe (- (point) 2) 3))))))
;;;###mh-autoload
(defun mh-speed-add-folder (folder)
diff --git a/lisp/mh-e/mh-thread.el b/lisp/mh-e/mh-thread.el
index 21954da6acd..1be2185ecdf 100644
--- a/lisp/mh-e/mh-thread.el
+++ b/lisp/mh-e/mh-thread.el
@@ -139,7 +139,7 @@ to the message that started everything."
(cond (thread-root-flag
(while (mh-thread-immediate-ancestor))
(mh-maybe-show))
- ((equal current-level 1)
+ ((equal current-level 0)
(message "Message has no ancestor"))
(t (mh-thread-immediate-ancestor)
(mh-maybe-show)))))
@@ -242,8 +242,8 @@ sibling."
(defun mh-thread-current-indentation-level ()
"Find the number of spaces by which current message is indented."
(save-excursion
- (let ((address-start-offset (+ mh-cmd-note mh-scan-date-flag-width
- mh-scan-date-width 1))
+ (let ((address-start-offset (+ mh-cmd-note
+ mh-scan-field-from-start-offset))
(level 0))
(beginning-of-line)
(forward-char address-start-offset)
@@ -275,8 +275,8 @@ at the end."
(beginning-of-line)
(if (eobp)
nil
- (let ((address-start-offset (+ mh-cmd-note mh-scan-date-flag-width
- mh-scan-date-width 1))
+ (let ((address-start-offset (+ mh-cmd-note
+ mh-scan-field-from-start-offset))
(level (mh-thread-current-indentation-level))
spaces begin)
(setq begin (point))
diff --git a/lisp/mh-e/mh-tool-bar.el b/lisp/mh-e/mh-tool-bar.el
index 0200d232c33..d451ae34d29 100644
--- a/lisp/mh-e/mh-tool-bar.el
+++ b/lisp/mh-e/mh-tool-bar.el
@@ -182,8 +182,7 @@ where,
(add-to-list vector-list `(vector nil ',function t ,full-doc))
(add-to-list
setter `(when (member ',name ,list)
- (mh-funcall-if-exists
- tool-bar-add-item ,icon ',function ',key
+ (tool-bar-add-item ,icon ',function ',key
:help ,doc :enable ',enable-expr)))
(add-to-list mbuttons name)
(if docs (add-to-list docs doc))))))
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index feebf6416fe..b75025d6a4d 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -139,8 +139,7 @@ Ignores case when searching for OLD."
0 2
`(display ,(or mh-logo-cache
(setq mh-logo-cache
- (mh-funcall-if-exists
- find-image '(( :type xpm :ascent center
+ (find-image '(( :type xpm :ascent center
:file "mh-logo.xpm" ))))))
(car mode-line-buffer-identification))))
@@ -531,7 +530,12 @@ results of the actual folders call.
If optional argument ADD-TRAILING-SLASH-FLAG is non-nil then a
slash is added to each of the sub-folder names that may have
nested folders within them."
- (let* ((folder (mh-normalize-folder-name folder nil nil t))
+ ;; In most cases we want to remove a trailing slash. We keep the
+ ;; slash for "+/", because it refers to folders in the system root
+ ;; directory, whereas "+" refers to the user's top-level folders.
+ (let* ((folder (mh-normalize-folder-name folder nil
+ (string= folder "+/")
+ t))
(match (gethash folder mh-sub-folders-cache 'no-result))
(sub-folders (cond ((eq match 'no-result)
(setf (gethash folder mh-sub-folders-cache)
@@ -558,7 +562,6 @@ Expects FOLDER to have already been normalized with
(let ((arg-list `(,(expand-file-name "folders" mh-progs)
nil (t nil) nil "-noheader" "-norecurse" "-nototal"
,@(if (stringp folder) (list folder) ())))
- (results ())
(current-folder (concat
(with-temp-buffer
(call-process (expand-file-name "folder" mh-progs)
@@ -567,33 +570,48 @@ Expects FOLDER to have already been normalized with
"+")))
(with-temp-buffer
(apply #'call-process arg-list)
- (goto-char (point-min))
- (while (not (and (eolp) (bolp)))
- (goto-char (line-end-position))
- (let ((start-pos (line-beginning-position))
- (has-pos (search-backward " has "
- (line-beginning-position) t)))
- (when (integerp has-pos)
- (while (equal (char-after has-pos) ? )
- (cl-decf has-pos))
- (cl-incf has-pos)
- (while (equal (char-after start-pos) ? )
- (cl-incf start-pos))
- (let* ((name (buffer-substring start-pos has-pos))
- (first-char (aref name 0))
- (last-char (aref name (1- (length name)))))
- (unless (member first-char '(?. ?# ?,))
- (when (and (equal last-char ?+) (equal name current-folder))
- (setq name (substring name 0 (1- (length name)))))
- (push
- (cons name
- (search-forward "(others)" (line-end-position) t))
- results))))
- (forward-line 1))))
+ (mh-sub-folders-parse folder current-folder))))
+
+(defun mh-sub-folders-parse (folder current-folder)
+ "Parse the results of \"folders FOLDER\" and return a list of sub-folders.
+CURRENT-FOLDER is the result of \"folder -fast\".
+FOLDER will be nil or start with '+'; CURRENT-FOLDER will end with '+'.
+This function is a testable helper of `mh-sub-folders-actual'."
+ (let ((results ()))
+ (goto-char (point-min))
+ (while (not (and (eolp) (bolp)))
+ (goto-char (line-end-position))
+ (let ((start-pos (line-beginning-position))
+ (has-pos (search-backward " has "
+ (line-beginning-position) t)))
+ (when (integerp has-pos)
+ (while (equal (char-after has-pos) ? )
+ (cl-decf has-pos))
+ (cl-incf has-pos)
+ (while (equal (char-after start-pos) ? )
+ (cl-incf start-pos))
+ (let* ((name (buffer-substring start-pos has-pos))
+ (first-char (aref name 0))
+ (second-char (and (length> name 1) (aref name 1)))
+ (last-char (aref name (1- (length name)))))
+ (unless (member first-char '(?. ?# ?,))
+ (when (and (equal last-char ?+) (equal name current-folder))
+ (setq name (substring name 0 (1- (length name)))))
+ ;; nmh outputs double slash in root folder, e.g., "//tmp"
+ (when (and (equal first-char ?/) (equal second-char ?/))
+ (setq name (substring name 1)))
+ (push
+ (cons name
+ (search-forward "(others)" (line-end-position) t))
+ results))))
+ (forward-line 1)))
(setq results (nreverse results))
(when (stringp folder)
(setq results (cdr results))
(let ((folder-name-len (length (format "%s/" (substring folder 1)))))
+ (when (equal "+/" folder)
+ ;; folder "+/" includes a trailing slash
+ (cl-decf folder-name-len))
(setq results (mapcar (lambda (f)
(cons (substring (car f) folder-name-len)
(cdr f)))
diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el
index 0c1bcdfefd5..8350f3d0fbb 100644
--- a/lisp/mh-e/mh-xface.el
+++ b/lisp/mh-e/mh-xface.el
@@ -73,8 +73,7 @@ in this order is used."
(when (re-search-forward "^from:" (point-max) t)
(if (eq type 'url)
(mh-x-image-url-display url)
- (mh-funcall-if-exists
- insert-image (create-image
+ (insert-image (create-image
raw type t
:foreground
(face-foreground 'mh-show-xface nil t)
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 0fea057d1cb..c2a6b01fc8e 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -2734,7 +2734,7 @@ not active.")
This is only used when the minibuffer area has no active minibuffer.
Note that the minibuffer may change to this mode more often than
-you might expect. For instance, typing `M-x' may change the
+you might expect. For instance, typing \\`M-x' may change the
buffer to this mode, then to a different mode, and then back
again to this mode upon exit. Code running from
`minibuffer-inactive-mode-hook' has to be prepared to run
diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el
index ecfb359b36f..0cdba6b4d01 100644
--- a/lisp/mouse-drag.el
+++ b/lisp/mouse-drag.el
@@ -282,6 +282,8 @@ To test this function, evaluate:
(setq window-last-row (- (window-height) 2)
window-last-col (- (window-width) 2))
(track-mouse
+ ;; Set 'track-mouse' to something neither nil nor t (Bug#51794).
+ (setq track-mouse 'drag-dragging)
(while (progn
(setq event (read--potential-mouse-event)
end (event-end event)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 4f9c49ce463..3ab9fbcdfe2 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -364,7 +364,7 @@ Some context functions add menu items below the separator."
(when (consp binding)
(define-key-after menu (vector key)
(copy-sequence binding))))
- (menu-bar-keymap global-map))
+ (menu-bar-keymap (lookup-key global-map [menu-bar])))
menu)
(defun context-menu-local (menu _click)
@@ -377,7 +377,7 @@ Some context functions add menu items below the separator."
(when (consp binding)
(define-key-after menu (vector key)
(copy-sequence binding))))
- keymap)))
+ (menu-bar-keymap keymap))))
menu)
(defun context-menu-minor (menu _click)
@@ -541,8 +541,11 @@ activates the menu whose contents depends on its surrounding context."
"Start key navigation of the context menu.
This is the keyboard interface to \\[context-menu-map]."
(interactive)
- (let ((inhibit-mouse-event-check t))
- (popup-menu (context-menu-map) (point))))
+ (let ((inhibit-mouse-event-check t)
+ (map (context-menu-map)))
+ (if (commandp map)
+ (call-interactively map)
+ (popup-menu map (point)))))
(global-set-key [S-f10] 'context-menu-open)
@@ -1627,7 +1630,11 @@ The region will be defined with mark and point."
(goto-char (nth 1 range)))
(setf (terminal-parameter nil 'mouse-drag-start) start-event)
- (setq track-mouse t)
+ ;; Set 'track-mouse' to something neither nil nor t, so that mouse
+ ;; events are not reported to have happened on the tool bar or the
+ ;; tab bar, as that breaks drag events that originate on the window
+ ;; body below these bars; see make_lispy_position and bug#51794.
+ (setq track-mouse 'drag-tracking)
(set-transient-map
(let ((map (make-sparse-keymap)))
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index 4627142757b..d04139d1489 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -55,29 +55,47 @@
(mouse-wheel-mode 1)))
(defcustom mouse-wheel-down-event
- (cond ((or (featurep 'w32-win) (featurep 'ns-win))
- 'wheel-up)
- ((featurep 'pgtk-win)
- '(mouse-4 wheel-up))
- (t
- 'mouse-4))
+ (if (or (featurep 'w32-win) (featurep 'ns-win)
+ (featurep 'haiku-win) (featurep 'pgtk-win))
+ 'wheel-up
+ 'mouse-4)
"Event used for scrolling down."
:group 'mouse
:type 'symbol
:set 'mouse-wheel-change-button)
+(defcustom mouse-wheel-down-alternate-event
+ (if (featurep 'xinput2)
+ 'wheel-up
+ (unless (featurep 'x)
+ 'mouse-4))
+ "Alternative wheel down event to consider."
+ :group 'mouse
+ :type 'symbol
+ :version "29.1"
+ :set 'mouse-wheel-change-button)
+
(defcustom mouse-wheel-up-event
- (cond ((or (featurep 'w32-win) (featurep 'ns-win))
- 'wheel-down)
- ((featurep 'pgtk-win)
- '(mouse-5 wheel-down))
- (t
- 'mouse-5))
+ (if (or (featurep 'w32-win) (featurep 'ns-win)
+ (featurep 'haiku-win) (feautrep 'pgtk-win))
+ 'wheel-down
+ 'mouse-5)
"Event used for scrolling up."
:group 'mouse
:type 'symbol
:set 'mouse-wheel-change-button)
+(defcustom mouse-wheel-up-alternate-event
+ (if (featurep 'xinput2)
+ 'wheel-down
+ (unless (featurep 'x)
+ 'mouse-5))
+ "Alternative wheel up event to consider."
+ :group 'mouse
+ :type 'symbol
+ :version "29.1"
+ :set 'mouse-wheel-change-button)
+
(defcustom mouse-wheel-click-event 'mouse-2
"Event that should be temporarily inhibited after mouse scrolling.
The mouse wheel is typically on the mouse-2 button, so it may easily
@@ -227,23 +245,33 @@ Also see `mouse-wheel-tilt-scroll'."
"Function that does the job of scrolling right.")
(defvar mouse-wheel-left-event
- (cond ((or (featurep 'w32-win) (featurep 'ns-win))
- 'wheel-left)
- ((featurep 'pgtk-win)
- '(mouse-6 wheel-left))
- (t
- 'mouse-6))
+ (if (or (featurep 'w32-win) (featurep 'ns-win)
+ (featurep 'haiku-win) (featurep 'pgtk-win))
+ 'wheel-left
+ 'mouse-6)
"Event used for scrolling left.")
+(defvar mouse-wheel-left-alternate-event
+ (if (featurep 'xinput2)
+ 'wheel-left
+ (unless (featurep 'x)
+ 'mouse-8))
+ "Alternative wheel left event to consider.")
+
(defvar mouse-wheel-right-event
- (cond ((or (featurep 'w32-win) (featurep 'ns-win))
- 'wheel-right)
- ((featurep 'pgtk-win)
- '(mouse-7 wheel-right))
- (t
- 'mouse-7))
+ (if (or (featurep 'w32-win) (featurep 'ns-win)
+ (featurep 'haiku-win) (featurep 'pgtk-win))
+ 'wheel-right
+ 'mouse-7)
"Event used for scrolling right.")
+(defvar mouse-wheel-right-alternate-event
+ (if (featurep 'xinput2)
+ 'wheel-right
+ (unless (featurep 'x)
+ 'mouse-7))
+ "Alternative wheel right event to consider.")
+
(defun mouse-wheel--get-scroll-window (event)
"Return window for mouse wheel event EVENT.
If `mouse-wheel-follow-mouse' is non-nil, return the window that
@@ -271,18 +299,6 @@ active window."
frame nil t)))))
(mwheel-event-window event)))
-(defun mouse-wheel--button-eq (btn lst)
- "Test whether BTN is included in LST."
- (cond ((listp lst)
- (memq btn lst))
- (t
- (eq lst btn))
- ))
-
-(defun mouse-wheel--button-flatten (&rest arg)
- "Flatten ARG."
- (flatten-list arg))
-
(defun mwheel-scroll (event &optional arg)
"Scroll up or down according to the EVENT.
This should be bound only to mouse buttons 4, 5, 6, and 7 on
@@ -320,14 +336,16 @@ value of ARG, and the command uses it in subsequent scrolls."
(condition-case nil
(unwind-protect
(let ((button (mwheel-event-button event)))
- (cond ((and (eq amt 'hscroll) (mouse-wheel--button-eq button mouse-wheel-down-event))
+ (cond ((and (eq amt 'hscroll) (memq button (list mouse-wheel-down-event
+ mouse-wheel-down-alternate-event)))
(when (and (natnump arg) (> arg 0))
(setq mouse-wheel-scroll-amount-horizontal arg))
(funcall (if mouse-wheel-flip-direction
mwheel-scroll-left-function
mwheel-scroll-right-function)
mouse-wheel-scroll-amount-horizontal))
- ((mouse-wheel--button-eq button mouse-wheel-down-event)
+ ((memq button (list mouse-wheel-down-event
+ mouse-wheel-down-alternate-event))
(condition-case nil (funcall mwheel-scroll-down-function amt)
;; Make sure we do indeed scroll to the beginning of
;; the buffer.
@@ -342,23 +360,27 @@ value of ARG, and the command uses it in subsequent scrolls."
;; for a reason that escapes me. This problem seems
;; to only affect scroll-down. --Stef
(set-window-start (selected-window) (point-min))))))
- ((and (eq amt 'hscroll) (mouse-wheel--button-eq button mouse-wheel-up-event))
+ ((and (eq amt 'hscroll) (memq button (list mouse-wheel-up-event
+ mouse-wheel-up-alternate-event)))
(when (and (natnump arg) (> arg 0))
(setq mouse-wheel-scroll-amount-horizontal arg))
(funcall (if mouse-wheel-flip-direction
mwheel-scroll-right-function
mwheel-scroll-left-function)
mouse-wheel-scroll-amount-horizontal))
- ((mouse-wheel--button-eq button mouse-wheel-up-event)
+ ((memq button (list mouse-wheel-up-event
+ mouse-wheel-up-alternate-event))
(condition-case nil (funcall mwheel-scroll-up-function amt)
;; Make sure we do indeed scroll to the end of the buffer.
(end-of-buffer (while t (funcall mwheel-scroll-up-function)))))
- ((eq button mouse-wheel-left-event) ; for tilt scroll
+ ((memq button (list mouse-wheel-left-event
+ mouse-wheel-left-alternate-event)) ; for tilt scroll
(when mouse-wheel-tilt-scroll
(funcall (if mouse-wheel-flip-direction
mwheel-scroll-right-function
mwheel-scroll-left-function) amt)))
- ((eq button mouse-wheel-right-event) ; for tilt scroll
+ ((memq button (list mouse-wheel-right-event
+ mouse-wheel-right-alternate-event)) ; for tilt scroll
(when mouse-wheel-tilt-scroll
(funcall (if mouse-wheel-flip-direction
mwheel-scroll-left-function
@@ -402,9 +424,11 @@ value of ARG, and the command uses it in subsequent scrolls."
(button (mwheel-event-button event)))
(select-window scroll-window 'mark-for-redisplay)
(unwind-protect
- (cond ((mouse-wheel--button-eq button mouse-wheel-down-event)
+ (cond ((memq button (list mouse-wheel-down-event
+ mouse-wheel-down-alternate-event))
(text-scale-increase 1))
- ((mouse-wheel--button-eq button mouse-wheel-up-event)
+ ((memq button (list mouse-wheel-up-event
+ mouse-wheel-up-alternate-event))
(text-scale-decrease 1)))
(select-window selected-window))))
@@ -456,18 +480,23 @@ an event used for scrolling, such as `mouse-wheel-down-event'."
(cond
;; Bindings for changing font size.
((and (consp binding) (eq (cdr binding) 'text-scale))
- (dolist (event (mouse-wheel--button-flatten mouse-wheel-down-event
- mouse-wheel-up-event))
- (mouse-wheel--add-binding `[,(list (caar binding) event)]
- 'mouse-wheel-text-scale)))
+ (dolist (event (list mouse-wheel-down-event mouse-wheel-up-event
+ mouse-wheel-down-alternate-event
+ mouse-wheel-up-alternate-event))
+ (when event
+ (mouse-wheel--add-binding `[,(list (caar binding) event)]
+ 'mouse-wheel-text-scale))))
;; Bindings for scrolling.
(t
- (dolist (event (mouse-wheel--button-flatten mouse-wheel-down-event
- mouse-wheel-up-event
- mouse-wheel-left-event
- mouse-wheel-right-event))
- (dolist (key (mouse-wheel--create-scroll-keys binding event))
- (mouse-wheel--add-binding key 'mwheel-scroll)))))))
+ (dolist (event (list mouse-wheel-down-event mouse-wheel-up-event
+ mouse-wheel-left-event mouse-wheel-right-event
+ mouse-wheel-down-alternate-event
+ mouse-wheel-up-alternate-event
+ mouse-wheel-left-alternate-event
+ mouse-wheel-right-alternate-event))
+ (when event
+ (dolist (key (mouse-wheel--create-scroll-keys binding event))
+ (mouse-wheel--add-binding key 'mwheel-scroll))))))))
(when mouse-wheel-mode
(mouse-wheel--setup-bindings))
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 1fafed32e6c..b1f981f28e6 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -39,6 +39,7 @@
;; browse-url-chrome Chrome 47.0.2526.111
;; browse-url-chromium Chromium 3.0
;; browse-url-epiphany Epiphany Don't know
+;; browse-url-webpositive WebPositive 1.2-alpha (Haiku R1/beta3)
;; browse-url-w3 w3 0
;; browse-url-text-* Any text browser 0
;; browse-url-generic arbitrary
@@ -156,6 +157,7 @@
(function-item :tag "Google Chrome" :value browse-url-chrome)
(function-item :tag "Chromium" :value browse-url-chromium)
(function-item :tag "Epiphany" :value browse-url-epiphany)
+ (function-item :tag "WebPositive" :value browse-url-webpositive)
(function-item :tag "Text browser in an xterm window"
:value browse-url-text-xterm)
(function-item :tag "Text browser in an Emacs window"
@@ -366,6 +368,11 @@ Defaults to the value of `browse-url-epiphany-arguments' at the time
`browse-url' is loaded."
:type '(repeat (string :tag "Argument")))
+(defcustom browse-url-webpositive-program "WebPositive"
+ "The name by which to invoke WebPositive."
+ :type 'string
+ :version "29.1")
+
;; GNOME means of invoking either Mozilla or Netscape.
(defvar browse-url-gnome-moz-program "gnome-moz-remote")
@@ -730,7 +737,7 @@ position clicked before acting.
This function returns a list (URL NEW-WINDOW-FLAG)
for use in `interactive'."
(let ((event (elt (this-command-keys) 0)))
- (and (listp event) (mouse-set-point event)))
+ (mouse-set-point event))
(list (read-string prompt (or (and transient-mark-mode mark-active
;; rfc2396 Appendix E.
(replace-regexp-in-string
@@ -1059,6 +1066,7 @@ instead of `browse-url-new-window-flag'."
((executable-find browse-url-kde-program) 'browse-url-kde)
;;; ((executable-find browse-url-netscape-program) 'browse-url-netscape)
((executable-find browse-url-chrome-program) 'browse-url-chrome)
+ ((executable-find browse-url-webpositive-program) 'browse-url-webpositive)
((executable-find browse-url-xterm-program) 'browse-url-text-xterm)
((locate-library "w3") 'browse-url-w3)
(t
@@ -1385,6 +1393,18 @@ used instead of `browse-url-new-window-flag'."
(defvar url-handler-regexp)
+;;;###autoload
+(defun browse-url-webpositive (url &optional _new-window)
+ "Ask the WebPositive WWW browser to load URL.
+Default to the URL around or before point.
+The optional argument NEW-WINDOW is not used."
+ (interactive (browse-url-interactive-arg "URL: "))
+ (setq url (browse-url-encode-url url))
+ (let* ((process-environment (browse-url-process-environment)))
+ (start-process (concat "WebPositive " url) nil "WebPositive" url)))
+
+(function-put 'browse-url-webpositive 'browse-url-browser-kind 'external)
+
;;;###autoload
(defun browse-url-emacs (url &optional same-window)
"Ask Emacs to load URL into a buffer and show it in another window.
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 46e211171e6..0c66cf3a0d7 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -239,7 +239,7 @@ parameter, and should return the (possibly) transformed URL."
:version "29.1")
(defface eww-form-submit
- '((((type x w32 ns pgtk) (class color)) ; Like default mode line
+ '((((type x w32 ns haiku pgtk) (class color)) ; Like default mode line
:box (:line-width 2 :style released-button)
:background "#808080" :foreground "black"))
"Face for eww buffer buttons."
@@ -247,7 +247,7 @@ parameter, and should return the (possibly) transformed URL."
:group 'eww)
(defface eww-form-file
- '((((type x w32 ns pgtk) (class color)) ; Like default mode line
+ '((((type x w32 ns haiku pgtk) (class color)) ; Like default mode line
:box (:line-width 2 :style released-button)
:background "#808080" :foreground "black"))
"Face for eww buffer buttons."
@@ -255,7 +255,7 @@ parameter, and should return the (possibly) transformed URL."
:group 'eww)
(defface eww-form-checkbox
- '((((type x w32 ns pgtk) (class color)) ; Like default mode line
+ '((((type x w32 ns haiku pgtk) (class color)) ; Like default mode line
:box (:line-width 2 :style released-button)
:background "lightgrey" :foreground "black"))
"Face for eww buffer buttons."
@@ -263,7 +263,7 @@ parameter, and should return the (possibly) transformed URL."
:group 'eww)
(defface eww-form-select
- '((((type x w32 ns pgtk) (class color)) ; Like default mode line
+ '((((type x w32 ns haiku pgtk) (class color)) ; Like default mode line
:box (:line-width 2 :style released-button)
:background "lightgrey" :foreground "black"))
"Face for eww buffer buttons."
@@ -314,11 +314,11 @@ parameter, and should return the (possibly) transformed URL."
(defvar-keymap eww-link-keymap
:parent shr-map
- "\r" #'eww-follow-link)
+ "RET" #'eww-follow-link)
(defvar-keymap eww-image-link-keymap
:parent shr-map
- "\r" #'eww-follow-link)
+ "RET" #'eww-follow-link)
(defun eww-suggested-uris nil
"Return the list of URIs to suggest at the `eww' prompt.
@@ -1045,11 +1045,11 @@ the like."
(defvar-keymap eww-mode-map
"g" #'eww-reload ;FIXME: revert-buffer-function instead!
"G" #'eww
- [?\M-\r] #'eww-open-in-new-buffer
- [?\t] #'shr-next-link
- [?\M-\t] #'shr-previous-link
- [backtab] #'shr-previous-link
- [delete] #'scroll-down-command
+ "M-RET" #'eww-open-in-new-buffer
+ "TAB" #'shr-next-link
+ "C-M-i" #'shr-previous-link
+ "" #'shr-previous-link
+ "" #'scroll-down-command
"l" #'eww-back-url
"r" #'eww-forward-url
"n" #'eww-next-url
@@ -1068,16 +1068,16 @@ the like."
"S" #'eww-list-buffers
"F" #'eww-toggle-fonts
"D" #'eww-toggle-paragraph-direction
- [(meta C)] #'eww-toggle-colors
- [(meta I)] #'eww-toggle-images
+ "M-C" #'eww-toggle-colors
+ "M-I" #'eww-toggle-images
"b" #'eww-add-bookmark
"B" #'eww-list-bookmarks
- [(meta n)] #'eww-next-bookmark
- [(meta p)] #'eww-previous-bookmark
+ "M-n" #'eww-next-bookmark
+ "M-p" #'eww-previous-bookmark
- [(mouse-8)] #'eww-back-url
- [(mouse-9)] #'eww-forward-url
+ "" #'eww-back-url
+ "" #'eww-forward-url
:menu '("Eww"
["Exit" quit-window t]
@@ -1300,42 +1300,42 @@ just re-display the HTML already fetched."
(defvar eww-form nil)
(defvar-keymap eww-submit-map
- "\r" #'eww-submit
- [(control c) (control c)] #'eww-submit)
+ "RET" #'eww-submit
+ "C-c C-c" #'eww-submit)
(defvar-keymap eww-submit-file
- "\r" #'eww-select-file
- [(control c) (control c)] #'eww-submit)
+ "RET" #'eww-select-file
+ "C-c C-c" #'eww-submit)
(defvar-keymap eww-checkbox-map
- " " #'eww-toggle-checkbox
- "\r" #'eww-toggle-checkbox
- [(control c) (control c)] #'eww-submit)
+ "SPC" #'eww-toggle-checkbox
+ "RET" #'eww-toggle-checkbox
+ "C-c C-c" #'eww-submit)
(defvar-keymap eww-text-map
:full t :parent text-mode-map
- "\r" #'eww-submit
- [(control a)] #'eww-beginning-of-text
- [(control c) (control c)] #'eww-submit
- [(control e)] #'eww-end-of-text
- [?\t] #'shr-next-link
- [?\M-\t] #'shr-previous-link
- [backtab] #'shr-previous-link)
+ "RET" #'eww-submit
+ "C-a" #'eww-beginning-of-text
+ "C-c C-c" #'eww-submit
+ "C-e" #'eww-end-of-text
+ "TAB" #'shr-next-link
+ "M-TAB" #'shr-previous-link
+ "" #'shr-previous-link)
(defvar-keymap eww-textarea-map
:full t :parent text-mode-map
- "\r" #'forward-line
- [(control c) (control c)] #'eww-submit
- [?\t] #'shr-next-link
- [?\M-\t] #'shr-previous-link
- [backtab] #'shr-previous-link)
+ "RET" #'forward-line
+ "C-c C-c" #'eww-submit
+ "TAB" #'shr-next-link
+ "M-TAB" #'shr-previous-link
+ "" #'shr-previous-link)
(defvar-keymap eww-select-map
:doc "Map for select buttons"
- "\r" #'eww-change-select
- [follow-link] 'mouse-face
- [mouse-2] #'eww-change-select
- [(control c) (control c)] #'eww-submit)
+ "RET" #'eww-change-select
+ "" 'mouse-face
+ "" #'eww-change-select
+ "C-c C-c" #'eww-submit)
(defun eww-beginning-of-text ()
"Move to the start of the input field."
@@ -2171,9 +2171,9 @@ If ERROR-OUT, signal user-error if there are no bookmarks."
(eww-browse-url (plist-get bookmark :url))))
(defvar-keymap eww-bookmark-mode-map
- [(control k)] #'eww-bookmark-kill
- [(control y)] #'eww-bookmark-yank
- "\r" #'eww-bookmark-browse
+ "C-k" #'eww-bookmark-kill
+ "C-y" #'eww-bookmark-yank
+ "RET" #'eww-bookmark-browse
:menu '("Eww Bookmark"
["Exit" quit-window t]
["Browse" eww-bookmark-browse
@@ -2247,7 +2247,7 @@ If ERROR-OUT, signal user-error if there are no bookmarks."
(eww-restore-history history)))
(defvar-keymap eww-history-mode-map
- "\r" #'eww-history-browse
+ "RET" #'eww-history-browse
"n" #'next-line
"p" #'previous-line
:menu '("Eww History"
@@ -2366,8 +2366,8 @@ If ERROR-OUT, signal user-error if there are no bookmarks."
(eww-buffer-show))
(defvar-keymap eww-buffers-mode-map
- [(control k)] #'eww-buffer-kill
- "\r" #'eww-buffer-select
+ "C-k" #'eww-buffer-kill
+ "RET" #'eww-buffer-select
"n" #'eww-buffer-show-next
"p" #'eww-buffer-show-previous
:menu '("Eww Buffers"
diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el
index 2c687557181..14d49251f55 100644
--- a/lisp/net/mailcap.el
+++ b/lisp/net/mailcap.el
@@ -55,7 +55,7 @@ you have an entry for \"image/*\" in your ~/.mailcap file."
"A syntax table for parsing SGML attributes.")
(defvar mailcap-print-command
- (mapconcat 'identity
+ (mapconcat #'identity
(cons (if (boundp 'lpr-command)
lpr-command
"lpr")
@@ -116,8 +116,7 @@ is consulted."
(regexp :tag "MIME Type")
(sexp :tag "Test (optional)")))
:get #'mailcap--get-user-mime-data
- :set #'mailcap--set-user-mime-data
- :group 'mailcap)
+ :set #'mailcap--set-user-mime-data)
;; Postpone using defcustom for this as it's so big and we essentially
;; have to have two copies of the data around then. Perhaps just
@@ -344,8 +343,7 @@ Same format as `mailcap-mime-data'.")
"Directory to which `mailcap-save-binary-file' downloads files by default.
nil means your home directory."
:type '(choice (const :tag "Home directory" nil)
- directory)
- :group 'mailcap)
+ directory))
(defvar mailcap-poor-system-types
'(ms-dos windows-nt)
@@ -439,6 +437,8 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus
("/etc/mailcap" system)
("/usr/etc/mailcap" system)
("/usr/local/etc/mailcap" system)))))
+ (when (stringp path)
+ (setq path (mapcar #'list (split-string path path-separator t))))
(when (seq-some (lambda (f)
(file-has-changed-p (car f) 'mail-parse-mailcaps))
path)
@@ -451,14 +451,9 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus
do (cl-loop for (minor . entry) in minors
do (mailcap-add-mailcap-entry major minor entry)))
;; The ~/.mailcap entries will end up first in the resulting data.
- (dolist (spec (reverse
- (if (stringp path)
- (split-string path path-separator t)
- path)))
- (let ((source (and (consp spec) (cadr spec)))
- (file-name (if (stringp spec)
- spec
- (car spec))))
+ (dolist (spec (reverse path))
+ (let ((source (cadr spec))
+ (file-name (car spec)))
(when (and (file-readable-p file-name)
(file-regular-p file-name))
(mailcap-parse-mailcap file-name source)))))
@@ -639,7 +634,7 @@ the test clause will be unchanged."
((and (listp test) (symbolp (car test))) test)
((or (stringp test)
(and (listp test) (stringp (car test))
- (setq test (mapconcat 'identity test " "))))
+ (setq test (mapconcat #'identity test " "))))
(with-temp-buffer
(insert test)
(goto-char (point-min))
@@ -710,12 +705,12 @@ to supply to the test."
(symbol-value test))
((and (listp test) ; List to be eval'd
(symbolp (car test)))
- (eval test))
+ (eval test t))
(t
(setq test (mailcap-unescape-mime-test test type-info)
test (list shell-file-name nil nil nil
shell-command-switch test)
- status (apply 'call-process test))
+ status (apply #'call-process test))
(eq 0 status))))
(push (list otest result) mailcap-viewer-test-cache)
result))))
@@ -840,7 +835,7 @@ If NO-DECODE is non-nil, don't decode STRING."
(dolist (entry viewers)
(when (mailcap-viewer-passes-test entry info)
(push entry passed)))
- (setq passed (sort (nreverse passed) 'mailcap-viewer-lessp))
+ (setq passed (sort (nreverse passed) #'mailcap-viewer-lessp))
;; When we want to prefer entries from the user's
;; ~/.mailcap file, then we filter out the system entries
;; and see whether we have anything left.
@@ -1070,7 +1065,7 @@ For instance, \"foo.png\" will result in \"image/png\"."
;;;###autoload
(defun mailcap-mime-type-to-extension (mime-type)
- "Return a file name extension based on a mime type.
+ "Return a file name extension based on a MIME-TYPE.
For instance, `image/png' will result in `png'."
(intern (cadr (split-string (if (symbolp mime-type)
(symbol-name mime-type)
@@ -1082,7 +1077,7 @@ For instance, `image/png' will result in `png'."
(mailcap-parse-mimetypes)
(delete-dups
(nconc
- (mapcar 'cdr mailcap-mime-extensions)
+ (mapcar #'cdr mailcap-mime-extensions)
(let (res type)
(dolist (data mailcap--computed-mime-data)
(dolist (info (cdr data))
diff --git a/lisp/net/puny.el b/lisp/net/puny.el
index 42a7e796798..c1833ffdb0b 100644
--- a/lisp/net/puny.el
+++ b/lisp/net/puny.el
@@ -43,6 +43,7 @@ For instance, \"fśf.org\" => \"xn--ff-2sa.org\"."
"Encode STRING according to the IDNA/punycode algorithm.
This is used to encode non-ASCII domain names.
For instance, \"bücher\" => \"xn--bcher-kva\"."
+ (setq string (downcase (string-glyph-compose string)))
(let ((ascii (seq-filter (lambda (char)
(< char 128))
string)))
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 52d74a33945..b4e9031e0d4 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -262,6 +262,7 @@ The ARGUMENTS for each METHOD symbol are:
`bitlbee': NICK PASSWORD
`quakenet': ACCOUNT PASSWORD
`sasl': NICK PASSWORD
+ `certfp': KEY CERT
Examples:
((\"Libera.Chat\" nickserv \"bob\" \"p455w0rd\")
@@ -291,7 +292,11 @@ Examples:
(list :tag "SASL"
(const sasl)
(string :tag "Nick")
- (string :tag "Password")))))
+ (string :tag "Password"))
+ (list :tag "CertFP"
+ (const certfp)
+ (string :tag "Key")
+ (string :tag "Certificate")))))
(defcustom rcirc-auto-authenticate-flag t
"Non-nil means automatically send authentication string to server.
@@ -547,6 +552,9 @@ If ARG is non-nil, instead prompt for connection parameters."
(password (plist-get (cdr c) :password))
(encryption (plist-get (cdr c) :encryption))
(server-alias (plist-get (cdr c) :server-alias))
+ (client-cert (when (eq (rcirc-get-server-method (car c))
+ 'certfp)
+ (rcirc-get-server-cert (car c))))
contact)
(when-let (((not password))
(auth (auth-source-search :host server
@@ -563,7 +571,7 @@ If ARG is non-nil, instead prompt for connection parameters."
(condition-case nil
(let ((process (rcirc-connect server port nick user-name
full-name channels password encryption
- server-alias)))
+ client-cert server-alias)))
(when rcirc-display-server-buffer
(pop-to-buffer-same-window (process-buffer process))))
(quit (message "Quit connecting to %s"
@@ -646,29 +654,23 @@ See `rcirc-connect' for more details on these variables.")
(defun rcirc-get-server-method (server)
"Return authentication method for SERVER."
- (catch 'method
- (dolist (i rcirc-authinfo)
- (let ((server-i (car i))
- (method (cadr i)))
- (when (string-match server-i server)
- (throw 'method method))))))
+ (cadr (assoc server rcirc-authinfo #'string-match)))
(defun rcirc-get-server-password (server)
"Return password for SERVER."
- (catch 'pass
- (dolist (i rcirc-authinfo)
- (let ((server-i (car i))
- (args (cdddr i)))
- (when (string-match server-i server)
- (throw 'pass (car args)))))))
+ (cadddr (assoc server rcirc-authinfo #'string-match)))
+
+(defun rcirc-get-server-cert (server)
+ "Return a list of key and certificate for SERVER."
+ (cddr (assoc server rcirc-authinfo #'string-match)))
;;;###autoload
(defun rcirc-connect (server &optional port nick user-name
full-name startup-channels password encryption
- server-alias)
+ certfp server-alias)
"Connect to SERVER.
The arguments PORT, NICK, USER-NAME, FULL-NAME, PASSWORD,
-ENCRYPTION, SERVER-ALIAS are interpreted as in
+ENCRYPTION, CERTFP, SERVER-ALIAS are interpreted as in
`rcirc-server-alist'. STARTUP-CHANNELS is a list of channels
that are joined after authentication."
(save-excursion
@@ -695,6 +697,7 @@ that are joined after authentication."
(setq process (open-network-stream
(or server-alias server) nil server port-number
:type (or encryption 'plain)
+ :client-certificate certfp
:nowait t))
(set-process-coding-system process 'raw-text 'raw-text)
(with-current-buffer (get-buffer-create (rcirc-generate-new-buffer-name process nil))
@@ -2583,7 +2586,7 @@ that, an interactive form can specified."
,(concat documentation
"\n\nNote: If PROCESS or TARGET are nil, the values given"
"\nby `rcirc-buffer-process' and `rcirc-target' will be used.")
- (interactive ,interactive-spec)
+ (interactive (list ,interactive-spec))
(unless (if (listp ,argument)
(<= ,required (length ,argument) ,total)
(string-match ,regexp ,argument))
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index fd7469389ad..d59b0ed3629 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -162,6 +162,10 @@ cid: URL as the argument.")
(defvar shr-put-image-function #'shr-put-image
"Function called to put image and alt string.")
+(defface shr-text '((t :inherit variable-pitch))
+ "Face used for rendering text."
+ :version "29.1")
+
(defface shr-strike-through '((t :strike-through t))
"Face for elements."
:version "24.1")
@@ -183,6 +187,11 @@ temporarily blinks with this face."
"Face for elements."
:version "27.1")
+(defface shr-sup
+ '((t :height 0.8))
+ "Face for and elements."
+ :version "29.1")
+
(defface shr-h1
'((t :height 1.3 :weight bold))
"Face for