Merge remote-tracking branch 'origin/master' into feature/pgtk
This commit is contained in:
commit
8f5d2a3181
350 changed files with 24824 additions and 3718 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -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
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# 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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
23
INSTALL.REPO
23
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'
|
||||
|
|
21
Makefile.in
21
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
## Copyright (C) 2018-2021 Free Software Foundation, Inc.
|
||||
|
||||
## Author: Glenn Morris <rgm@gnu.org>
|
||||
## Maintainer: emacs-devel@gnu.org
|
||||
## Maintainer: Stefan Kangas <stefan@marxist.se>
|
||||
|
||||
## This file is part of GNU Emacs.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
<https://emba.gnu.org/help/ci/yaml/README.md>.
|
||||
|
||||
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
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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)"
|
||||
}
|
||||
|
|
265
configure.ac
265
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 <termios.h>])
|
||||
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 <fcntl.h>
|
||||
#include <signal.h>
|
||||
]],
|
||||
[[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.
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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 "<f5>") 'flyspell-mode)
|
||||
(global-set-key (kbd "C-<f5>") 'display-line-numbers-mode)
|
||||
(global-set-key (kbd "C-<right>") 'forward-sentence)
|
||||
(global-set-key (kbd "<mouse-2>") '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 "<f5>" 'flyspell-mode)
|
||||
(keymap-global-set "C-<f5>" 'display-line-numbers-mode)
|
||||
(keymap-global-set "C-<right>" 'forward-sentence)
|
||||
(keymap-global-set "<mouse-2>" '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 "<mouse-2>" '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 "<mode-line> <mouse-1>" '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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
124
doc/emacs/haiku.texi
Normal file
124
doc/emacs/haiku.texi
Normal file
|
@ -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.
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 "<signal> <usr1>" '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" "<control-x>")
|
||||
(key-translate "C-c" "<control-c>")
|
||||
(key-translate "C-v" "<control-v>")
|
||||
(keymap-global-set "<control-x>" 'kill-region)
|
||||
(keymap-global-set "<control-c>" 'kill-ring-save)
|
||||
(keymap-global-set "<control-v>" 'yank)
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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},
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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-<down>") @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-<home>"]
|
||||
@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-<left>
|
||||
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-<space>
|
||||
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{<t>}, 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-1>" '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 "<tool-bar>"
|
||||
`(menu-item ,(purecopy "tool bar") ignore
|
||||
:filter tool-bar-make-keymap))
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"}).
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}?
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
10
etc/DEBUG
10
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.
|
||||
|
||||
|
|
28
etc/MACHINES
28
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
|
||||
|
||||
|
|
233
etc/NEWS
233
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-<fingerprint>.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
|
||||
|
|
16
etc/PROBLEMS
16
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
;; Author: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; 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.
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4,8 +4,8 @@
|
|||
|
||||
;; Author: Protesilaos Stavrou <info@protesilaos.com>
|
||||
;; 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.
|
||||
|
|
|
@ -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 \
|
||||
|
|
144
lib-src/be_resources.cc
Normal file
144
lib-src/be_resources.cc
Normal file
|
@ -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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
|
||||
#include <SupportDefs.h>
|
||||
#include <Path.h>
|
||||
#include <AppFileInfo.h>
|
||||
#include <TranslationUtils.h>
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
#include <Roster.h>
|
||||
|
||||
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;
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
" "
|
||||
|
|
140
lisp/bookmark.el
140
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
|
||||
"<mouse-2>" #'bookmark-bmenu-other-window-with-mouse)
|
||||
|
||||
(easy-menu-define bookmark-menu bookmark-bmenu-mode-map
|
||||
"Menu for `bookmark-bmenu'."
|
||||
|
|
|
@ -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*")))
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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-<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)
|
||||
|
||||
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
|
||||
* \\`<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
|
||||
|
||||
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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 \\<dired-mode-map>\\[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]."
|
||||
|
||||
|
|
|
@ -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-<down> 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))))
|
||||
"<mouse-2>" click
|
||||
"<follow-link>" '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 \\<dired-mode-map>"
|
||||
"\\[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)
|
||||
|
|
|
@ -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"))))
|
||||
\\<doc-view-mode-map>
|
||||
\\[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))
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)))))))
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 "<separator-2>" 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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)))))
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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))))
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
156
lisp/files.el
156
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)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue