forked from Github/emacs
Compare commits
9 commits
master
...
scratch/lo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0b9530862 | ||
|
|
0cc8d6826a | ||
|
|
097c5ee8f5 | ||
|
|
dce08cf05c | ||
|
|
2093e010dc | ||
|
|
974e4f3333 | ||
|
|
afc2c6c13c | ||
|
|
7e26a5c774 | ||
|
|
85ed1c9ca6 |
780 changed files with 29545 additions and 164679 deletions
|
|
@ -21,9 +21,6 @@
|
|||
(electric-quote-comment . nil)
|
||||
(electric-quote-string . nil)
|
||||
(mode . bug-reference-prog)))
|
||||
(c-ts-mode . ((c-ts-mode-indent-style . gnu)
|
||||
(indent-tabs-mode . t)
|
||||
(mode . bug-reference-prog)))
|
||||
(log-edit-mode . ((log-edit-font-lock-gnu-style . t)
|
||||
(log-edit-setup-add-author . t)
|
||||
(vc-git-log-edit-summary-target-len . 50)))
|
||||
|
|
|
|||
14
CONTRIBUTE
14
CONTRIBUTE
|
|
@ -18,7 +18,7 @@ To configure Git for Emacs development, you can run the following:
|
|||
|
||||
The following shell commands then build and run Emacs from scratch:
|
||||
|
||||
git clone https://git.savannah.gnu.org/git/emacs.git
|
||||
git clone git://git.sv.gnu.org/emacs.git
|
||||
cd emacs
|
||||
./autogen.sh
|
||||
./configure
|
||||
|
|
@ -110,7 +110,7 @@ admin/notes/bug-triage.
|
|||
|
||||
Any change that matters to end-users should have an entry in etc/NEWS.
|
||||
Try to start each NEWS entry with a sentence that summarizes the entry
|
||||
and takes just one line -- this will allow reading NEWS in Outline
|
||||
and takes just one line -- this will allow to read NEWS in Outline
|
||||
mode after hiding the body of each entry.
|
||||
|
||||
Doc-strings should be updated together with the code.
|
||||
|
|
@ -123,7 +123,7 @@ Think about whether your change requires updating the manuals. If you
|
|||
know it does not, mark the NEWS entry with "---". If you know
|
||||
that *all* the necessary documentation updates have been made as part
|
||||
of your changes or those by others, mark the entry with "+++".
|
||||
Otherwise, do not mark it.
|
||||
Otherwise do not mark it.
|
||||
|
||||
If your change requires updating the manuals to document new
|
||||
functions/commands/variables/faces, then use the proper Texinfo
|
||||
|
|
@ -321,7 +321,7 @@ them right the first time, so here are guidelines for formatting them:
|
|||
** Committing your changes.
|
||||
|
||||
When you commit changes, Git invokes several scripts that test the
|
||||
commit for validity, and may abort the commit if some of the tests
|
||||
commit for validity, and may abort the commit of some of the tests
|
||||
fail. These scripts live in the '.git/hooks/' subdirectory of the
|
||||
top-level directory of the repository, and they perform the following
|
||||
tests:
|
||||
|
|
@ -400,7 +400,7 @@ the commit to master, by starting the commit message with "Backport:".
|
|||
The gitmerge function excludes these commits from the merge to the master.
|
||||
|
||||
Some changes should not be merged to master at all, for whatever
|
||||
reason. These should be marked by including something like "Do not
|
||||
reasons. These should be marked by including something like "Do not
|
||||
merge to master" or anything that matches gitmerge-skip-regexp (see
|
||||
admin/gitmerge.el) in the commit message.
|
||||
|
||||
|
|
@ -449,8 +449,8 @@ files intended for use only with Emacs version 24.5 and later.
|
|||
|
||||
*** Useful files in the admin/ directory
|
||||
|
||||
See all the files in 'admin/notes/*'. In particular, see
|
||||
'admin/notes/newfile' and 'admin/notes/repo'.
|
||||
See all the files in admin/notes/* . In particular, see
|
||||
admin/notes/newfile, see admin/notes/repo.
|
||||
|
||||
The file admin/MAINTAINERS records the areas of interest of frequent
|
||||
Emacs contributors. If you are making changes in one of the files
|
||||
|
|
|
|||
114348
ChangeLog.4
114348
ChangeLog.4
File diff suppressed because it is too large
Load diff
|
|
@ -4,7 +4,7 @@ The Emacs repository is hosted on Savannah. The following Git command
|
|||
will clone the repository to the 'emacs' subdirectory of the current
|
||||
directory on your local machine:
|
||||
|
||||
git clone https://git.savannah.gnu.org/git/emacs.git
|
||||
git clone git://git.sv.gnu.org/emacs.git
|
||||
|
||||
To build the repository code, simply run 'make' in the 'emacs'
|
||||
directory. This should work if your files are freshly checked out
|
||||
|
|
|
|||
|
|
@ -417,9 +417,9 @@ advice-on-failure:
|
|||
|
||||
sanity-check:
|
||||
@[ -f .no-advice-on-failure ] && exit 0; true
|
||||
@v=`src/emacs${EXEEXT} --batch --eval \
|
||||
@v=$$(src/emacs${EXEEXT} --batch --eval \
|
||||
'(progn (defun f (n) (if (= 0 n) 1 (* n (f (- n 1))))) (princ (f 10)))' \
|
||||
2> /dev/null`; \
|
||||
2> /dev/null); \
|
||||
[ "X$$v" = "X3628800" ] && exit 0; \
|
||||
echo >&2 '***'; \
|
||||
echo >&2 '*** '"\"make ${make-target}\" succeeded, but Emacs is not functional."; \
|
||||
|
|
@ -1030,9 +1030,6 @@ $(foreach dir,$(distclean_dirs),$(eval $(call submake_template,$(dir),distclean)
|
|||
|
||||
distclean: $(distclean_dirs:=_distclean) clean-gsettings-schemas
|
||||
${top_distclean}
|
||||
ifeq ($(HAVE_NATIVE_COMP),yes)
|
||||
rm -rf native-lisp
|
||||
endif
|
||||
|
||||
### 'bootstrap-clean'
|
||||
### Delete everything that can be reconstructed by 'make' and that
|
||||
|
|
@ -1287,7 +1284,7 @@ PREFERRED_BRANCH = emacs-28
|
|||
preferred-branch-is-current:
|
||||
git branch | grep -q '^\* $(PREFERRED_BRANCH)$$'
|
||||
unchanged-history-files:
|
||||
x=`git diff-files --name-only $(CHANGELOG_N) $(emacslog)` && \
|
||||
x=$$(git diff-files --name-only $(CHANGELOG_N) $(emacslog)) && \
|
||||
test -z "$$x"
|
||||
|
||||
# Regular expression that matches the newest commit covered by a ChangeLog.
|
||||
|
|
|
|||
2
README
2
README
|
|
@ -2,7 +2,7 @@ Copyright (C) 2001-2023 Free Software Foundation, Inc.
|
|||
See the end of the file for license conditions.
|
||||
|
||||
|
||||
This directory tree holds version 30.0.50 of GNU Emacs, the extensible,
|
||||
This directory tree holds version 29.0.60 of GNU Emacs, the extensible,
|
||||
customizable, self-documenting real-time display editor.
|
||||
|
||||
The file INSTALL in this directory says how to build and install GNU
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ Po Lu
|
|||
|
||||
Tramp
|
||||
Maintainer: Michael Albinus
|
||||
Repository: https://git.savannah.gnu.org/git/tramp.git
|
||||
Repository: git://git.savannah.gnu.org/tramp.git
|
||||
Mailing List: tramp-devel@gnu.org
|
||||
Bug Reports: M-x tramp-bug
|
||||
Notes: For backward compatibility requirements, see
|
||||
|
|
@ -316,7 +316,7 @@ Modus themes
|
|||
Org Mode
|
||||
Home Page: https://orgmode.org/
|
||||
Maintainer: Org Mode developers
|
||||
Repository: https://git.savannah.gnu.org/git/emacs/org-mode.git
|
||||
Repository: git://git.sv.gnu.org/emacs/org-mode.git
|
||||
Mailing list: emacs-orgmode@gnu.org
|
||||
Bug Reports: M-x org-submit-bug-report
|
||||
Notes: Org Mode is maintained as a separate project that is
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ Root must be the root of an Emacs source tree."
|
|||
(submatch (1+ (in "0-9."))))))
|
||||
(set-version-in-file root "configure.ac" version
|
||||
(rx (and "AC_INIT" (1+ (not (in ?,)))
|
||||
?, (0+ space)
|
||||
?, (0+ space) ?\[
|
||||
(submatch (1+ (in "0-9."))))))
|
||||
(set-version-in-file root "nt/README.W32" version
|
||||
(rx (and "version" (1+ space)
|
||||
|
|
@ -843,11 +843,8 @@ $Date: %s $
|
|||
(package-install pkg)
|
||||
(require pkg nil t))))
|
||||
|
||||
(declare-function org-html-export-as-html "ox-html.el")
|
||||
(defvar org-html-postamble)
|
||||
(defvar org-html-mathjax-template)
|
||||
(defvar htmlize-output-type)
|
||||
|
||||
(defun make-news-html-file (root version)
|
||||
"Convert the NEWS file into an HTML file."
|
||||
(interactive (let ((root
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ files.")
|
|||
("Philip Kaludercic" "Philip K\\." "Philip K")
|
||||
("Philipp Stephani" "Philipp .*phst@google")
|
||||
("Piotr Zieliński" "Piotr Zielinski")
|
||||
("Po Lu" "Po Lu Via" "Your Name") ; looks like a mistake
|
||||
("Po Lu" "Po Lu Via") ; looks like a mistake
|
||||
("Przemysław Wojnowski" "Przemyslaw Wojnowski")
|
||||
("R. Bernstein" "rb@dustyfeet.com")
|
||||
("Rainer Schöpf" "Rainer Schoepf")
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ ${charsetdir}/GB180304.map: ${charsetdir}/GB180302.map ${gb180304}
|
|||
${AM_V_GEN}$(AWK) -f ${gb180304} < $< > $@
|
||||
|
||||
${charsetdir}/JISX0201.map: ${GLIBC_CHARMAPS}/JIS_X0201.gz ${mapconv} ${compact}
|
||||
${AM_V_GEN}(${run_mapconv} $< '/^<.*[ ]\/x[0-9]/' GLIBC-1 ${compact} && \
|
||||
${AM_V_GEN}(${mapconv} $< '/^<.*[ ]\/x[0-9]/' GLIBC-1 ${compact} && \
|
||||
echo "# Generated by hand" && \
|
||||
echo "0xA1-0xDF 0xFF61" ) > $@
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@
|
|||
## So that eg [A-F] as used by KANJI-DATABASE branch below works as expected.
|
||||
## Otherwise with LANG=en_US.utf8, CNS-6.map was generated with a
|
||||
## bogus entry. By experiment, LC_COLLATE=C was not enough.
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
export LC_ALL=C
|
||||
|
||||
BASE=`expr "$1" : '.*/\(.*\)' '|' "$1"` # basename
|
||||
FILE="admin/charsets/mapfiles/$BASE"
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ Also store it in `find-gc-unsafe-list'."
|
|||
|
||||
|
||||
|
||||
(defun trace-call-tree (&optional _ignored)
|
||||
(defun trace-call-tree (&optional ignored)
|
||||
(message "Setting up directories...")
|
||||
(setq find-gc-subrs-called nil)
|
||||
(let ((case-fold-search nil)
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ should not be skipped."
|
|||
"Try to resolve conflicts in FILE with smerge.
|
||||
Returns non-nil if conflicts remain."
|
||||
(unless (file-exists-p file) (error "Gitmerge-resolve: Can't find %s" file))
|
||||
(with-demoted-errors "Error: %S"
|
||||
(with-demoted-errors
|
||||
(let ((exists (find-buffer-visiting file)))
|
||||
(with-current-buffer (let ((enable-local-variables :safe)
|
||||
(enable-local-eval nil))
|
||||
|
|
|
|||
|
|
@ -68,25 +68,16 @@ General steps (for each step, check for possible errors):
|
|||
PREFERRED_BRANCH = emacs-NN
|
||||
|
||||
where NN is the version on the release branch from which you are
|
||||
producing the tarball. If NN is incorrect (which it usually is
|
||||
when starting a pretest of a new major release), update
|
||||
Makefile.in and re-run 'configure' to update Makefile.
|
||||
producing the tarball. If NN is incorrect, update Makefile.in and
|
||||
re-run 'configure' to update Makefile.
|
||||
|
||||
For the first pretest of a new major release, consider starting a
|
||||
new top-level ChangeLog.N file if the last versioned ChangeLog.N
|
||||
file is too large. A good point to start a new ChangeLog.N file
|
||||
is when the last one gets larger than 1.5 MiB. If so, start a new
|
||||
one by bumping N, and also update the line in top-level
|
||||
Makefile.in which says
|
||||
If the versioned ChangeLog.N file is too large, start a new one
|
||||
by bumping N, and also update the line in top-level Makefile.in
|
||||
which says
|
||||
|
||||
CHANGELOG_HISTORY_INDEX_MAX = N
|
||||
|
||||
by incrementing the value of N by 1; then regenerate Makefile.
|
||||
After bumping N, you need to actually create and commit
|
||||
ChangeLog.N with the updated N, otherwise "M-x authors" below will
|
||||
fail. The easiest way of creating the new ChangeLog.N is to
|
||||
rename the file ChangeLog (without the .N suffix) left over from
|
||||
the last major release (it is usually unversioned) and commit it.
|
||||
|
||||
Now:
|
||||
|
||||
|
|
@ -108,12 +99,11 @@ General steps (for each step, check for possible errors):
|
|||
the relevant entry. If a file was deleted or renamed, consider
|
||||
adding an appropriate entry to variables authors-ignored-files,
|
||||
authors-valid-file-names, or authors-renamed-files-alist in
|
||||
authors.el. If some authors are "ignored", consider adding
|
||||
entries to the author-aliases variable.
|
||||
authors.el.
|
||||
|
||||
If necessary, repeat 'C-u M-x authors' after making those changes.
|
||||
Save the "*Authors*" buffer as etc/AUTHORS.
|
||||
Check the diff looks reasonable. Maybe add more entries to
|
||||
Check the diff looks reasonable. Maybe add entries to
|
||||
authors-ambiguous-files or authors-aliases, and repeat.
|
||||
Commit any fixes to authors.el.
|
||||
|
||||
|
|
@ -179,13 +169,7 @@ General steps (for each step, check for possible errors):
|
|||
messages from TeX, but those seem to be harmless, as the result
|
||||
looks just fine.)
|
||||
|
||||
5. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. After copying, edit
|
||||
ldefs-boot.el to add
|
||||
|
||||
;; no-byte-compile: t
|
||||
|
||||
to its file-local variables section, otherwise make-dist will
|
||||
complain.
|
||||
5. Copy lisp/loaddefs.el to lisp/ldefs-boot.el.
|
||||
|
||||
Commit ChangeLog.N, etc/AUTHORS, lisp/ldefs-boot.el, and the files
|
||||
changed by M-x set-version. Note that the set-version changes
|
||||
|
|
|
|||
|
|
@ -23,30 +23,29 @@
|
|||
|
||||
# written by Paul Eggert
|
||||
|
||||
GNULIB_URL=https://git.savannah.gnu.org/git/gnulib.git
|
||||
GNULIB_URL=git://git.savannah.gnu.org/gnulib.git
|
||||
|
||||
GNULIB_MODULES='
|
||||
alignasof alloca-opt binary-io byteswap c-ctype c-strcase
|
||||
alloca-opt binary-io byteswap c-ctype c-strcase
|
||||
canonicalize-lgpl
|
||||
careadlinkat close-stream copy-file-range
|
||||
count-leading-zeros count-one-bits count-trailing-zeros
|
||||
crypto/md5 crypto/md5-buffer
|
||||
crypto/sha1-buffer crypto/sha256-buffer crypto/sha512-buffer
|
||||
d-type diffseq double-slash-root dtoastr dtotimespec dup2
|
||||
environ execinfo faccessat
|
||||
environ execinfo explicit_bzero faccessat
|
||||
fchmodat fcntl fcntl-h fdopendir file-has-acl
|
||||
filemode filename filevercmp flexmember fpieee
|
||||
free-posix fstatat fsusage fsync futimens
|
||||
getloadavg getopt-gnu getrandom gettime gettimeofday gitlog-to-changelog
|
||||
ieee754-h ignore-value intprops largefile libgmp lstat
|
||||
manywarnings memmem-simple mempcpy memrchr memset_explicit
|
||||
minmax mkostemp mktime
|
||||
manywarnings memmem-simple mempcpy memrchr minmax mkostemp mktime
|
||||
nanosleep nproc nstrftime
|
||||
pathmax pipe2 pselect pthread_sigmask
|
||||
qcopy-acl readlink readlinkat regex
|
||||
sig2str sigdescr_np socklen stat-time std-gnu11 stdbool stddef stdio
|
||||
sig2str sigdescr_np socklen stat-time std-gnu11 stdalign stdbool stddef stdio
|
||||
stpcpy strnlen strtoimax symlink sys_stat sys_time
|
||||
tempname time-h time_r time_rz timegm timer-time timespec-add timespec-sub
|
||||
tempname time time_r time_rz timegm timer-time timespec-add timespec-sub
|
||||
update-copyright unlocked-io utimensat
|
||||
vla warnings
|
||||
'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ NOTES ON THE EMACS PACKAGE ARCHIVE
|
|||
The GNU Emacs package archive, at elpa.gnu.org, is managed using a Git
|
||||
repository named "elpa", hosted on Savannah. To check it out:
|
||||
|
||||
git clone https://git.savannah.gnu.org/git/emacs/elpa
|
||||
git clone git://git.sv.gnu.org/emacs/elpa
|
||||
cd elpa
|
||||
make setup
|
||||
|
||||
|
|
|
|||
|
|
@ -83,46 +83,6 @@ Lisp packages, Makefiles, scripts, and other software could determine
|
|||
whether they run on emba by checking for the environment variable
|
||||
EMACS_EMBA_CI.
|
||||
|
||||
* Running Emba tests locally
|
||||
|
||||
As usual in GitLab, the tests run in containers, which could be
|
||||
applied also locally. Unfortunately, the Emba container registry,
|
||||
emba.gnu.org:5050, is not accessible publicly. Instead, the container
|
||||
images must be build locally. Change the current directory to a
|
||||
recent Emacs branch, and apply the command
|
||||
|
||||
docker build --target emacs-inotify --tag emacs-inotify \
|
||||
-f test/infra/Dockerfile.emba .
|
||||
|
||||
This creates the Debian-based image emacs-inotify, based on the
|
||||
instructions in the file Dockerfile.emba. This image is good for the
|
||||
majority of tests. However, there are also other image build
|
||||
instructions like emacs-filenotify-gio, emacs-eglot, emacs-gnustep and
|
||||
emacs-native-comp-speed{0,1,2}. Use the appropriate one.
|
||||
|
||||
The image contains a directory "/checkout", which is a copy of your
|
||||
local Emacs git repository. Emacs has been built in this directory
|
||||
via "make bootstrap". In order to use the image, start a container
|
||||
like
|
||||
|
||||
docker run --interactive --env EMACS_EMBA_CI=1 --name emacs-inotify \
|
||||
emacs-inotify /bin/sh -i
|
||||
|
||||
In this container, change the current directory to "/checkout". Now
|
||||
you can apply all commands known for Emacs, like
|
||||
|
||||
cd /checkout
|
||||
make -C test files-tests.log
|
||||
|
||||
While this container runs, you can also access its filesystem from
|
||||
your local Emacs via Tramp. For example, in order to see the result
|
||||
of the above test run, open the log file in your local Emacs with
|
||||
|
||||
C-x C-f /docker:emacs-inotify:/checkout/test/lisp/files-tests.log
|
||||
|
||||
Note: On local Red Hat-based systems, use "podman" instead of "docker"
|
||||
in the shell commands and Tramp file names.
|
||||
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
|
|
|
|||
|
|
@ -16,14 +16,14 @@ Initial setup
|
|||
|
||||
Then we want to clone the repository. We normally want to have both
|
||||
the current master and (if there is one) the active release branch
|
||||
(eg emacs-29).
|
||||
(eg emacs-28).
|
||||
|
||||
mkdir ~/emacs
|
||||
cd ~/emacs
|
||||
git clone <membername>@git.sv.gnu.org:/srv/git/emacs.git master
|
||||
cd master
|
||||
git config push.default current
|
||||
git worktree add ../emacs-29 emacs-29
|
||||
git worktree add ../emacs-28 emacs-28
|
||||
|
||||
You now have both branches conveniently accessible, and you can do
|
||||
"git pull" in them once in a while to keep updated.
|
||||
|
|
@ -67,10 +67,10 @@ which will look like
|
|||
|
||||
commit 958b768a6534ae6e77a8547a56fc31b46b63710b
|
||||
|
||||
cd ~/emacs/emacs-29
|
||||
cd ~/emacs/emacs-28
|
||||
git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b
|
||||
|
||||
and add "Backport:" to the commit string. Then
|
||||
and optionally add "Backport:" to the commit string. Then
|
||||
|
||||
git push
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ up-to-date by doing a pull. Then start Emacs with
|
|||
emacs -l admin/gitmerge.el -f gitmerge
|
||||
|
||||
You'll be asked for the branch to merge, which will default to
|
||||
(eg) 'origin/emacs-29', which you should accept. Merging a local tracking
|
||||
(eg) 'origin/emacs-28', which you should accept. Merging a local tracking
|
||||
branch is discouraged, since it might not be up-to-date, or worse,
|
||||
contain commits from you which are not yet pushed upstream.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
languages=(
|
||||
'bash'
|
||||
'c'
|
||||
'cmake'
|
||||
'cpp'
|
||||
'css'
|
||||
'c-sharp'
|
||||
'dockerfile'
|
||||
'elixir'
|
||||
'go'
|
||||
'go-mod'
|
||||
'heex'
|
||||
'html'
|
||||
'javascript'
|
||||
'json'
|
||||
'python'
|
||||
'rust'
|
||||
'toml'
|
||||
'tsx'
|
||||
'typescript'
|
||||
'yaml'
|
||||
)
|
||||
|
||||
for language in "${languages[@]}"
|
||||
do
|
||||
./build.sh $language
|
||||
done
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
lang=$1
|
||||
topdir="$PWD"
|
||||
|
||||
case $(uname) in
|
||||
"Darwin")
|
||||
soext="dylib"
|
||||
;;
|
||||
*"MINGW"*)
|
||||
soext="dll"
|
||||
;;
|
||||
*)
|
||||
soext="so"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Building ${lang}"
|
||||
|
||||
### Retrieve sources
|
||||
|
||||
org="tree-sitter"
|
||||
repo="tree-sitter-${lang}"
|
||||
sourcedir="tree-sitter-${lang}/src"
|
||||
grammardir="tree-sitter-${lang}"
|
||||
|
||||
case "${lang}" in
|
||||
"dockerfile")
|
||||
org="camdencheek"
|
||||
;;
|
||||
"cmake")
|
||||
org="uyha"
|
||||
;;
|
||||
"elixir")
|
||||
org="elixir-lang"
|
||||
;;
|
||||
"go-mod")
|
||||
# The parser is called "gomod".
|
||||
lang="gomod"
|
||||
org="camdencheek"
|
||||
;;
|
||||
"heex")
|
||||
org="phoenixframework"
|
||||
;;
|
||||
"typescript")
|
||||
sourcedir="tree-sitter-typescript/typescript/src"
|
||||
grammardir="tree-sitter-typescript/typescript"
|
||||
;;
|
||||
"tsx")
|
||||
repo="tree-sitter-typescript"
|
||||
sourcedir="tree-sitter-typescript/tsx/src"
|
||||
grammardir="tree-sitter-typescript/tsx"
|
||||
;;
|
||||
"yaml")
|
||||
org="ikatyang"
|
||||
;;
|
||||
esac
|
||||
|
||||
git clone "https://github.com/${org}/${repo}.git" \
|
||||
--depth 1 --quiet
|
||||
cp "${grammardir}"/grammar.js "${sourcedir}"
|
||||
# We have to go into the source directory to compile, because some
|
||||
# C files refer to files like "../../common/scanner.h".
|
||||
cd "${sourcedir}"
|
||||
|
||||
### Build
|
||||
|
||||
cc -fPIC -c -I. parser.c
|
||||
# Compile scanner.c.
|
||||
if test -f scanner.c
|
||||
then
|
||||
cc -fPIC -c -I. scanner.c
|
||||
fi
|
||||
# Compile scanner.cc.
|
||||
if test -f scanner.cc
|
||||
then
|
||||
c++ -fPIC -I. -c scanner.cc
|
||||
fi
|
||||
# Link.
|
||||
if test -f scanner.cc
|
||||
then
|
||||
c++ -fPIC -shared *.o -o "libtree-sitter-${lang}.${soext}"
|
||||
else
|
||||
cc -fPIC -shared *.o -o "libtree-sitter-${lang}.${soext}"
|
||||
fi
|
||||
|
||||
### Copy out
|
||||
|
||||
mkdir -p "${topdir}/dist"
|
||||
cp "libtree-sitter-${lang}.${soext}" "${topdir}/dist"
|
||||
cd "${topdir}"
|
||||
rm -rf "${repo}"
|
||||
|
|
@ -340,8 +340,7 @@ git_config diff.texinfo.xfuncname \
|
|||
tailored_hooks=
|
||||
sample_hooks=
|
||||
|
||||
for hook in commit-msg pre-commit prepare-commit-msg post-commit \
|
||||
pre-push commit-msg-files.awk; do
|
||||
for hook in commit-msg pre-commit prepare-commit-msg; do
|
||||
cmp -- build-aux/git-hooks/$hook "$hooks/$hook" >/dev/null 2>&1 ||
|
||||
tailored_hooks="$tailored_hooks $hook"
|
||||
done
|
||||
|
|
|
|||
4
build-aux/config.guess
vendored
4
build-aux/config.guess
vendored
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2023-01-01'
|
||||
timestamp='2022-09-17'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
|
@ -60,7 +60,7 @@ version="\
|
|||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2023 Free Software Foundation, Inc.
|
||||
Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
|
|
|||
6
build-aux/config.sub
vendored
6
build-aux/config.sub
vendored
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2023-01-21'
|
||||
timestamp='2022-09-17'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
|
@ -76,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright 1992-2023 Free Software Foundation, Inc.
|
||||
Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
|
@ -1075,7 +1075,7 @@ case $cpu-$vendor in
|
|||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||
cpu=i586
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
|
||||
cpu=i686
|
||||
;;
|
||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||
|
|
|
|||
|
|
@ -1,128 +0,0 @@
|
|||
# Check the file list of GNU Emacs change log entries for each commit SHA.
|
||||
|
||||
# Copyright 2023 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/>.
|
||||
|
||||
### Commentary:
|
||||
|
||||
# This script accepts a list of (unabbreviated) Git commit SHAs, and
|
||||
# will then iterate over them to check that any files mentioned in the
|
||||
# commit message are actually present in the commit's diff. If not,
|
||||
# it will print out the incorrect file names and return 1.
|
||||
|
||||
# You can also pass "-v reason=pre-push", which will add more-verbose
|
||||
# output, indicating the abbreviated commit SHA and first line of the
|
||||
# commit message for any improper commits.
|
||||
|
||||
### Code:
|
||||
|
||||
function get_commit_changes(commit_sha, changes, cmd, i, j, len, \
|
||||
bits, filename) {
|
||||
# Collect all the files touched in the specified commit.
|
||||
cmd = ("git show --name-status --first-parent --format= " commit_sha)
|
||||
while ((cmd | getline) > 0) {
|
||||
for (i = 2; i <= NF; i++) {
|
||||
len = split($i, bits, "/")
|
||||
for (j = 1; j <= len; j++) {
|
||||
if (j == 1)
|
||||
filename = bits[j]
|
||||
else
|
||||
filename = filename "/" bits[j]
|
||||
changes[filename] = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
close(cmd)
|
||||
}
|
||||
|
||||
function check_commit_msg_files(commit_sha, verbose, changes, good, \
|
||||
cmd, msg, filenames_str, filenames, i) {
|
||||
get_commit_changes(commit_sha, changes)
|
||||
good = 1
|
||||
|
||||
cmd = ("git log -1 --format=%B " commit_sha)
|
||||
while ((cmd | getline) > 0) {
|
||||
if (verbose && ! msg)
|
||||
msg = $0
|
||||
|
||||
# Find file entries in the commit message. We look at any line
|
||||
# starting with "*" (possibly prefixed by "; ") followed by a ":",
|
||||
# possibly on a different line. If we encounter a blank line
|
||||
# without seeing a ":", then we don't treat that as a file entry.
|
||||
|
||||
# Accumulate the contents of a (possible) file entry.
|
||||
if (/^[ \t]*$/)
|
||||
filenames_str = ""
|
||||
else if (/^(; )?\*[ \t]+[[:alnum:]]/)
|
||||
filenames_str = $0
|
||||
else if (filenames_str)
|
||||
filenames_str = (filenames_str $0)
|
||||
|
||||
# We have a file entry; analyze it.
|
||||
if (filenames_str && /:/) {
|
||||
# Delete the leading "*" and any trailing information.
|
||||
sub(/^(; )?\*[ \t]+/, "", filenames_str)
|
||||
sub(/[ \t]*[[(<:].*$/, "", filenames_str)
|
||||
|
||||
# There might be multiple files listed in this entry, separated
|
||||
# by spaces (and possibly a comma). Iterate over each of them.
|
||||
split(filenames_str, filenames, ",[ \t]+")
|
||||
for (i in filenames) {
|
||||
# Remove trailing slashes from any directory entries.
|
||||
sub(/\/$/, "", filenames[i])
|
||||
|
||||
if (length(filenames[i]) && ! (filenames[i] in changes)) {
|
||||
if (good) {
|
||||
# Print a header describing the error.
|
||||
if (verbose)
|
||||
printf("In commit %s \"%s\"...\n", substr(commit_sha, 1, 10), msg)
|
||||
printf("Files listed in commit message, but not in diff:\n")
|
||||
}
|
||||
printf(" %s\n", filenames[i])
|
||||
good = 0
|
||||
}
|
||||
}
|
||||
|
||||
filenames_str = ""
|
||||
}
|
||||
}
|
||||
close(cmd)
|
||||
|
||||
return good
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
if (reason == "pre-push")
|
||||
verbose = 1
|
||||
}
|
||||
|
||||
/^[a-z0-9]{40}$/ {
|
||||
if (! check_commit_msg_files($0, verbose)) {
|
||||
status = 1
|
||||
}
|
||||
}
|
||||
|
||||
END {
|
||||
if (status != 0) {
|
||||
if (reason == "pre-push")
|
||||
error_msg = "Push aborted"
|
||||
else
|
||||
error_msg = "Bad commit message"
|
||||
printf("%s; please see the file 'CONTRIBUTE'\n", error_msg)
|
||||
}
|
||||
exit status
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Check the file list of GNU Emacs change log entries after committing.
|
||||
|
||||
# Copyright 2023 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/>.
|
||||
|
||||
### Commentary:
|
||||
|
||||
# This hook runs after a commit is finalized and checks that the files
|
||||
# mentioned in the commit message match the diff. We perform this in
|
||||
# the post-commit phase so that we can be sure we properly detect all
|
||||
# the files in the diff (this is difficult during the commit-msg hook,
|
||||
# since there's no cross-platform way to detect when a commit is being
|
||||
# amended).
|
||||
|
||||
# However, since this is a post-commit hook, it's too late to error
|
||||
# out and abort the commit: it's already done! As a result, this hook
|
||||
# is purely advisory, and instead we error out when trying to push
|
||||
# (see "pre-push" in this directory).
|
||||
|
||||
### Code:
|
||||
|
||||
HOOKS_DIR=`dirname "$0"`
|
||||
|
||||
# Prefer gawk if available, as it handles NUL bytes properly.
|
||||
if type gawk >/dev/null 2>&1; then
|
||||
awk="gawk"
|
||||
else
|
||||
awk="awk"
|
||||
fi
|
||||
|
||||
git rev-parse HEAD | $awk -v reason=post-commit \
|
||||
-f "$HOOKS_DIR"/commit-msg-files.awk
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Check the file list of GNU Emacs change log entries before pushing.
|
||||
|
||||
# Copyright 2023 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/>.
|
||||
|
||||
### Commentary:
|
||||
|
||||
# This hook runs before pushing a series of commits and checks that
|
||||
# the files mentioned in each commit message match the diffs. This
|
||||
# helps ensure that the resulting change logs are correct, which
|
||||
# should prevent errors when generating etc/AUTHORS.
|
||||
|
||||
# These checks also happen in the "post-commit" hook (which see), but
|
||||
# that hook can't abort a commit; it just advises the committer to fix
|
||||
# the commit so that this hook runs without errors.
|
||||
|
||||
### Code:
|
||||
|
||||
HOOKS_DIR=`dirname "$0"`
|
||||
|
||||
# Prefer gawk if available, as it handles NUL bytes properly.
|
||||
if type gawk >/dev/null 2>&1; then
|
||||
awk="gawk"
|
||||
else
|
||||
awk="awk"
|
||||
fi
|
||||
|
||||
# Standard input receives lines of the form:
|
||||
# <local ref> SP <local sha> SP <remote ref> SP <remote sha> LF
|
||||
$awk -v origin_name="$1" '
|
||||
# If the local SHA is all zeroes, ignore it.
|
||||
$2 ~ /^0{40}$/ {
|
||||
next
|
||||
}
|
||||
|
||||
# Check any lines with a valid local SHA and whose remote ref is
|
||||
# master or an emacs-NN release branch. (We want to avoid checking
|
||||
# feature or scratch branches here.)
|
||||
$2 ~ /^[a-z0-9]{40}$/ && $3 ~ /^refs\/heads\/(master|emacs-[0-9]+)$/ {
|
||||
newref = $2
|
||||
# If the remote SHA is all zeroes, this is a new object to be
|
||||
# pushed (likely a branch)...
|
||||
if ($4 ~ /^0{40}$/) {
|
||||
back = 0
|
||||
# ... Go backwards until we find a SHA on an origin branch.
|
||||
# Stop trying after 1000 commits, just in case...
|
||||
for (back = 0; back < 1000; back++) {
|
||||
cmd = ("git branch -r -l '\''" origin_name "/*'\''" \
|
||||
" --contains " newref "~" back)
|
||||
rv = (cmd | getline)
|
||||
close(cmd)
|
||||
if (rv > 0)
|
||||
break;
|
||||
}
|
||||
|
||||
cmd = ("git rev-parse " newref "~" back)
|
||||
cmd | getline oldref
|
||||
if (!(oldref ~ /^[a-z0-9]{40}$/)) {
|
||||
# The SHA is misformatted! Skip this line.
|
||||
next
|
||||
}
|
||||
close(cmd)
|
||||
} else if ($4 ~ /^[a-z0-9]{40}$/) {
|
||||
oldref = $4
|
||||
} else {
|
||||
# The SHA is misformatted! Skip this line.
|
||||
next
|
||||
}
|
||||
|
||||
# Print every SHA after oldref, up to (and including) newref.
|
||||
system("git rev-list --first-parent --reverse " oldref ".." newref)
|
||||
}
|
||||
' | $awk -v reason=pre-push -f "$HOOKS_DIR"/commit-msg-files.awk
|
||||
|
|
@ -137,7 +137,7 @@
|
|||
eval 'exec perl -wSx -0777 -pi "$0" "$@"'
|
||||
if 0;
|
||||
|
||||
my $VERSION = '2023-01-11.04:24'; # UTC
|
||||
my $VERSION = '2020-04-04.15:07'; # UTC
|
||||
# The definition above must lie within the first 8 lines in order
|
||||
# for the Emacs time-stamp write hook (at end) to update it.
|
||||
# If you change this file with Emacs, please let the write hook
|
||||
|
|
@ -280,7 +280,7 @@ if (defined $stmt_re)
|
|||
}
|
||||
|
||||
# Replace the old copyright statement.
|
||||
s/$stmt_re/$stmt_wrapped/g;
|
||||
s/$stmt_re/$stmt_wrapped/;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
130
configure.ac
130
configure.ac
|
|
@ -23,7 +23,7 @@ dnl along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
AC_PREREQ([2.65])
|
||||
dnl Note this is parsed by (at least) make-dist and lisp/cedet/ede/emacs.el.
|
||||
AC_INIT([GNU Emacs], [30.0.50], [bug-gnu-emacs@gnu.org], [],
|
||||
AC_INIT([GNU Emacs], [29.0.60], [bug-gnu-emacs@gnu.org], [],
|
||||
[https://www.gnu.org/software/emacs/])
|
||||
|
||||
dnl Set emacs_config_options to the options of 'configure', quoted for the shell,
|
||||
|
|
@ -1001,7 +1001,7 @@ AC_ARG_ENABLE([gcc-warnings],
|
|||
# however, if there is also a .tarball-version file it is probably
|
||||
# just a release imported into Git for patch management.
|
||||
gl_gcc_warnings=no
|
||||
if test -d "$srcdir"/.git && test ! -f "$srcdir"/.tarball-version; then
|
||||
if test -e "$srcdir"/.git && test ! -f "$srcdir"/.tarball-version; then
|
||||
# Clang typically identifies itself as GCC 4.2 or something similar
|
||||
# even if it is recent enough to accept the warnings we enable.
|
||||
AS_IF([test "$emacs_cv_clang" = yes],
|
||||
|
|
@ -1139,7 +1139,6 @@ AS_IF([test $gl_gcc_warnings = no],
|
|||
|
||||
# clang is unduly picky about some things.
|
||||
if test "$emacs_cv_clang" = yes; then
|
||||
gl_WARN_ADD([-Wno-bitwise-instead-of-logical])
|
||||
gl_WARN_ADD([-Wno-missing-braces])
|
||||
gl_WARN_ADD([-Wno-null-pointer-arithmetic])
|
||||
gl_WARN_ADD([-Wno-implicit-const-int-float-conversion])
|
||||
|
|
@ -1643,8 +1642,7 @@ case "$opsys" in
|
|||
## Motif needs -lgen.
|
||||
unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
|
||||
|
||||
# Haiku needs -lbsd for cfsetspeed.
|
||||
haiku) LIBS_SYSTEM="-lnetwork -lbsd" ;;
|
||||
haiku) LIBS_SYSTEM="-lnetwork" ;;
|
||||
esac
|
||||
|
||||
AC_SUBST([LIBS_SYSTEM])
|
||||
|
|
@ -1843,9 +1841,7 @@ AC_CHECK_HEADERS_ONCE(
|
|||
coff.h pty.h
|
||||
sys/resource.h
|
||||
sys/utsname.h pwd.h utmp.h util.h
|
||||
sanitizer/lsan_interface.h
|
||||
sanitizer/asan_interface.h
|
||||
sanitizer/common_interface_defs.h])
|
||||
sanitizer/lsan_interface.h])
|
||||
|
||||
AC_CACHE_CHECK([for ADDR_NO_RANDOMIZE],
|
||||
[emacs_cv_personality_addr_no_randomize],
|
||||
|
|
@ -2034,23 +2030,31 @@ if test "${with_ns}" != no; then
|
|||
ns_appresdir=${ns_appdir}/Contents/Resources
|
||||
ns_appsrc=Cocoa/Emacs.base
|
||||
ns_fontfile=macfont.o
|
||||
elif flags=`(gnustep-config --objc-flags) 2>/dev/null`; then
|
||||
elif flags=$( (gnustep-config --objc-flags) 2>/dev/null); then
|
||||
NS_IMPL_GNUSTEP=yes
|
||||
NS_GNUSTEP_CONFIG=yes
|
||||
GNU_OBJC_CFLAGS="$flags"
|
||||
LIBS_GNUSTEP=`gnustep-config --gui-libs || exit`
|
||||
LIBS_GNUSTEP=$(gnustep-config --gui-libs) || exit
|
||||
elif test -f $GNUSTEP_CONFIG_FILE; then
|
||||
NS_IMPL_GNUSTEP=yes
|
||||
dnl FIXME sourcing this several times in subshells seems inefficient.
|
||||
GNUSTEP_SYSTEM_HEADERS=`. $GNUSTEP_CONFIG_FILE \
|
||||
&& AS_ECHO(["$GNUSTEP_SYSTEM_HEADERS"])`
|
||||
GNUSTEP_SYSTEM_LIBRARIES=` . $GNUSTEP_CONFIG_FILE \
|
||||
&& AS_ECHO(["$GNUSTEP_SYSTEM_LIBRARIES"])`
|
||||
GNUSTEP_SYSTEM_HEADERS=$(
|
||||
. $GNUSTEP_CONFIG_FILE
|
||||
AS_ECHO(["$GNUSTEP_SYSTEM_HEADERS"])
|
||||
)
|
||||
GNUSTEP_SYSTEM_LIBRARIES=$(
|
||||
. $GNUSTEP_CONFIG_FILE
|
||||
AS_ECHO(["$GNUSTEP_SYSTEM_LIBRARIES"])
|
||||
)
|
||||
dnl I seemed to need these as well with GNUstep-startup 0.25.
|
||||
GNUSTEP_LOCAL_HEADERS=`. $GNUSTEP_CONFIG_FILE \
|
||||
&& AS_ECHO(["$GNUSTEP_LOCAL_HEADERS"])`
|
||||
GNUSTEP_LOCAL_LIBRARIES=`. $GNUSTEP_CONFIG_FILE \
|
||||
&& AS_ECHO(["$GNUSTEP_LOCAL_LIBRARIES"])`
|
||||
GNUSTEP_LOCAL_HEADERS=$(
|
||||
. $GNUSTEP_CONFIG_FILE
|
||||
AS_ECHO(["$GNUSTEP_LOCAL_HEADERS"])
|
||||
)
|
||||
GNUSTEP_LOCAL_LIBRARIES=$(
|
||||
. $GNUSTEP_CONFIG_FILE
|
||||
AS_ECHO(["$GNUSTEP_LOCAL_LIBRARIES"])
|
||||
)
|
||||
test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
|
||||
GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
|
||||
test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
|
||||
|
|
@ -2689,6 +2693,39 @@ if test "${HAVE_X11}" = "yes"; then
|
|||
export LD_RUN_PATH
|
||||
fi
|
||||
|
||||
if test "${opsys}" = "gnu-linux"; then
|
||||
AC_CACHE_CHECK([whether X on GNU/Linux needs -b to link], [emacs_cv_b_link],
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
|
||||
[[XOpenDisplay ("foo");]])],
|
||||
[xgnu_linux_first_failure=no],
|
||||
[xgnu_linux_first_failure=yes])
|
||||
if test "${xgnu_linux_first_failure}" = "yes"; then
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
OLD_LIBS="$LIBS"
|
||||
CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
|
||||
LIBS="$LIBS -b i486-linuxaout"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
|
||||
[[XOpenDisplay ("foo");]])],
|
||||
[xgnu_linux_second_failure=no],
|
||||
[xgnu_linux_second_failure=yes])
|
||||
if test "${xgnu_linux_second_failure}" = "yes"; then
|
||||
# If we get the same failure with -b, there is no use adding -b.
|
||||
# So leave it out. This plays safe.
|
||||
emacs_cv_b_link=no
|
||||
else
|
||||
emacs_cv_b_link=yes
|
||||
fi
|
||||
CPPFLAGS=$OLD_CPPFLAGS
|
||||
LIBS=$OLD_LIBS
|
||||
else
|
||||
emacs_cv_b_link=no
|
||||
fi])
|
||||
if test "x$emacs_cv_b_link" = xyes ; then
|
||||
LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
|
||||
C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Reportedly, some broken Solaris systems have XKBlib.h but are missing
|
||||
# header files included from there.
|
||||
AC_CACHE_CHECK([for Xkb], [emacs_cv_xkb],
|
||||
|
|
@ -3773,7 +3810,7 @@ if test "${HAVE_X11}" = "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 :; else
|
||||
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
|
||||
|
|
@ -3881,7 +3918,7 @@ if test "${HAVE_BE_APP}" = "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 :; else
|
||||
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
|
||||
|
|
@ -3921,10 +3958,21 @@ if test "${HAVE_X11}" = "yes"; then
|
|||
if test "${HAVE_XCB}" = "yes"; then
|
||||
AC_CHECK_LIB([X11-xcb], [XGetXCBConnection], [HAVE_X11_XCB=yes])
|
||||
if test "${HAVE_X11_XCB}" = "yes"; then
|
||||
AC_DEFINE([USE_XCB], [1],
|
||||
AC_CHECK_LIB([xcb-util], [xcb_aux_sync], [HAVE_XCB_UTIL=yes])
|
||||
if test "${HAVE_XCB_UTIL}" = "yes"; then
|
||||
AC_DEFINE([USE_XCB], [1],
|
||||
[Define to 1 if you have the XCB library and X11-XCB library for mixed
|
||||
X11/XCB programming.])
|
||||
XCB_LIBS="-lX11-xcb -lxcb"
|
||||
X11/XCB programming.])
|
||||
XCB_LIBS="-lX11-xcb -lxcb -lxcb-util"
|
||||
else
|
||||
AC_CHECK_LIB([xcb-aux], [xcb_aux_sync], [HAVE_XCB_AUX=yes])
|
||||
if test "${HAVE_XCB_AUX}" = "yes"; then
|
||||
AC_DEFINE([USE_XCB], [1],
|
||||
[Define to 1 if you have the XCB library and X11-XCB library for mixed
|
||||
X11/XCB programming.])
|
||||
XCB_LIBS="-lX11-xcb -lxcb -lxcb-aux"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
@ -4192,14 +4240,12 @@ AC_SUBST_FILE([module_env_snippet_26])
|
|||
AC_SUBST_FILE([module_env_snippet_27])
|
||||
AC_SUBST_FILE([module_env_snippet_28])
|
||||
AC_SUBST_FILE([module_env_snippet_29])
|
||||
AC_SUBST_FILE([module_env_snippet_30])
|
||||
module_env_snippet_25="$srcdir/src/module-env-25.h"
|
||||
module_env_snippet_26="$srcdir/src/module-env-26.h"
|
||||
module_env_snippet_27="$srcdir/src/module-env-27.h"
|
||||
module_env_snippet_28="$srcdir/src/module-env-28.h"
|
||||
module_env_snippet_29="$srcdir/src/module-env-29.h"
|
||||
module_env_snippet_30="$srcdir/src/module-env-30.h"
|
||||
emacs_major_version=`AS_ECHO([$PACKAGE_VERSION]) | sed 's/[[.]].*//'`
|
||||
emacs_major_version="${PACKAGE_VERSION%%.*}"
|
||||
AC_SUBST([emacs_major_version])
|
||||
|
||||
### Emacs Lisp native compiler support
|
||||
|
|
@ -4309,16 +4355,14 @@ if test "${with_native_compilation}" != "no"; then
|
|||
# available. (We filter out the gcc4 packages, because they
|
||||
# don't support jit, and they have names like "gcc49" that
|
||||
# sort later than "gcc11".)
|
||||
PORT_PACKAGE=`port installed active | grep '^ *gcc@<:@0-9@:>@* ' | \
|
||||
PORT_PACKAGE=$(port installed active | grep '^ *gcc@<:@0-9@:>@* ' | \
|
||||
awk '{ print $1; }' | grep -v 'gcc4@<:@0-9@:>@' | \
|
||||
sort -V | tail -n 1`
|
||||
sort -V | tail -n 1)
|
||||
if test -n "$PORT_PACKAGE"; then
|
||||
emacs_val=`port contents $PORT_PACKAGE | grep libgccjit.h`
|
||||
emacs_val=`dirname $emacs_val`
|
||||
MAC_CFLAGS="-I$emacs_val"
|
||||
emacs_val=`port contents $PORT_PACKAGE | grep libgccjit.dylib`
|
||||
emacs_val=`dirname $emacs_val`
|
||||
MAC_LIBS="-L$emacs_val"
|
||||
MAC_CFLAGS="-I$(dirname $(port contents $PORT_PACKAGE | \
|
||||
grep libgccjit.h))"
|
||||
MAC_LIBS="-L$(dirname $(port contents $PORT_PACKAGE | \
|
||||
grep libgccjit.dylib))"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -4682,7 +4726,7 @@ AC_SUBST([XINERAMA_LIBS])
|
|||
### Use Xfixes (-lXfixes) if available
|
||||
HAVE_XFIXES=no
|
||||
if test "${HAVE_X11}" = "yes"; then
|
||||
XFIXES_REQUIRED=1.0.0
|
||||
XFIXES_REQUIRED=4.0.0
|
||||
XFIXES_MODULES="xfixes >= $XFIXES_REQUIRED"
|
||||
EMACS_CHECK_MODULES([XFIXES], [$XFIXES_MODULES])
|
||||
if test $HAVE_XFIXES = no; then
|
||||
|
|
@ -4986,7 +5030,6 @@ pthread_sigmask strsignal setitimer \
|
|||
sendto recvfrom getsockname getifaddrs freeifaddrs \
|
||||
gai_strerror sync \
|
||||
getpwent endpwent getgrent endgrent \
|
||||
renameat2 \
|
||||
cfmakeraw cfsetspeed __executable_start log2 pthread_setname_np \
|
||||
pthread_set_name_np])
|
||||
LIBS=$OLD_LIBS
|
||||
|
|
@ -5616,7 +5659,7 @@ case $opsys in
|
|||
esac
|
||||
|
||||
case $opsys in
|
||||
gnu-* | solaris | cygwin )
|
||||
gnu-* | solaris )
|
||||
dnl FIXME Can't we test if this exists (eg /proc/$$)?
|
||||
AC_DEFINE([HAVE_PROCFS], [1], [Define if you have the /proc filesystem.])
|
||||
;;
|
||||
|
|
@ -6380,7 +6423,7 @@ fi
|
|||
# it temporarily reverts them to their pre-pkg-config values,
|
||||
# because gnulib needs to work with both src (which uses the
|
||||
# pkg-config stuff) and lib-src (which does not). For example, gnulib
|
||||
# may need to determine whether CLOCK_TIME_LIB should contain -lrt,
|
||||
# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
|
||||
# and it therefore needs to run in an environment where LIBS does not
|
||||
# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
|
||||
# for some package unrelated to lib-src.
|
||||
|
|
@ -6520,12 +6563,6 @@ if test "$window_system" != "none"; then
|
|||
AC_DEFINE([POLL_FOR_INPUT], [1],
|
||||
[Define if you poll periodically to detect C-g.])
|
||||
WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
|
||||
|
||||
if test "$window_system" = "x11"; then
|
||||
AC_DEFINE([HAVE_TEXT_CONVERSION], [1],
|
||||
[Define if the window system has text conversion support.])
|
||||
WINDOW_SYSTEM_OBJ="$WINDOW_SYSTEM_OBJ textconv.o"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST([WINDOW_SYSTEM_OBJ])
|
||||
|
|
@ -6578,9 +6615,7 @@ if test "${HAVE_GTK}" = "yes"; then
|
|||
fi
|
||||
|
||||
if test $USE_ACL -ne 0; then
|
||||
ACL_SUMMARY="yes"
|
||||
test "$LIB_ACL" && ACL_SUMMARY="$ACL_SUMMARY $LIB_ACL"
|
||||
test "$LIB_XATTR" && ACL_SUMMARY="$ACL_SUMMARY $LIB_XATTR"
|
||||
ACL_SUMMARY="yes $LIB_ACL"
|
||||
else
|
||||
ACL_SUMMARY=no
|
||||
fi
|
||||
|
|
@ -6651,7 +6686,6 @@ AC_DEFINE_UNQUOTED([EMACS_CONFIG_FEATURES], ["${emacs_config_features}"],
|
|||
[Summary of some of the main features enabled by configure.])
|
||||
|
||||
AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D}
|
||||
Does Emacs use the X Double Buffer Extension? ${HAVE_XDBE}
|
||||
Does Emacs use -lXpm? ${HAVE_XPM}
|
||||
Does Emacs use -ljpeg? ${HAVE_JPEG}
|
||||
Does Emacs use -ltiff? ${HAVE_TIFF}
|
||||
|
|
|
|||
|
|
@ -1245,7 +1245,6 @@ Manual}.
|
|||
These four keywords are not really variables; setting them in any
|
||||
other context has no special meaning.
|
||||
|
||||
@cindex fallback modes
|
||||
If you're editing a file across Emacs versions, and a new mode has
|
||||
been introduced to handle a file in a newer Emacs version, you can use
|
||||
several @code{mode} entries to use the new mode (called
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ the buffer will be momentarily unfontified.
|
|||
@vindex redisplay-skip-fontification-on-input
|
||||
Finally, a third alternative to these variables is
|
||||
@code{redisplay-skip-fontification-on-input}. If this variable is
|
||||
non-@code{nil}, skip some fontifications if there's input pending.
|
||||
non-@code{nil}, skip some fontifications is there's input pending.
|
||||
This usually does not affect the display because redisplay is
|
||||
completely skipped anyway if input was pending, but it can make
|
||||
scrolling smoother by avoiding unnecessary fontification.
|
||||
|
|
|
|||
|
|
@ -812,21 +812,22 @@ in these cases, customize the variable
|
|||
@vindex write-region-inhibit-fsync
|
||||
Normally, when a program writes a file, the operating system briefly
|
||||
caches the file's data in main memory before committing the data to
|
||||
secondary storage. Although this can greatly improve performance, it
|
||||
risks data loss if the system loses power before committing the cache,
|
||||
and on some platforms other processes might not immediately notice the
|
||||
file's change.
|
||||
disk. This can greatly improve performance; for example, when running
|
||||
on laptops, it can avoid a disk spin-up each time a file is written.
|
||||
However, it risks data loss if the operating system crashes before
|
||||
committing the cache to disk.
|
||||
|
||||
To lessen this risk, Emacs can invoke the @code{fsync} system call
|
||||
after saving a file. Using @code{fsync} does not eliminate the risk
|
||||
of data loss or slow notification, partly because many systems do not support
|
||||
of data loss, partly because many systems do not implement
|
||||
@code{fsync} properly, and partly because Emacs's file-saving
|
||||
procedure typically relies also on directory updates that might not
|
||||
survive a crash even if @code{fsync} works properly.
|
||||
|
||||
The @code{write-region-inhibit-fsync} variable controls whether
|
||||
Emacs invokes @code{fsync} after saving a file. The variable's
|
||||
default value is @code{t}.
|
||||
default value is @code{nil} when Emacs is interactive, and @code{t}
|
||||
when Emacs runs in batch mode (@pxref{Initial Options, Batch Mode}).
|
||||
|
||||
Emacs never uses @code{fsync} when writing auto-save files, as these
|
||||
files might lose data anyway.
|
||||
|
|
@ -1737,13 +1738,9 @@ only the hunks within the region.
|
|||
Re-generate the current hunk (@code{diff-refresh-hunk}).
|
||||
|
||||
@item C-c C-w
|
||||
@vindex diff-ignore-whitespace-switches
|
||||
@findex diff-ignore-whitespace-hunk
|
||||
Re-generate the current hunk, disregarding changes in whitespace.
|
||||
With a non-@code{nil} prefix arg, re-generate all the hunks
|
||||
(@code{diff-ignore-whitespace-hunk}). This calls @code{diff-command}
|
||||
with @code{diff-ignore-whitespace-switches}, which defaults to
|
||||
@samp{-b}, meaning ignore changes in whitespace only.
|
||||
Re-generate the current hunk, disregarding changes in whitespace
|
||||
(@code{diff-ignore-whitespace-hunk}).
|
||||
|
||||
@item C-x 4 A
|
||||
@findex diff-add-change-log-entries-other-window
|
||||
|
|
@ -1903,11 +1900,6 @@ following in the Trash directory:
|
|||
liable to also delete this @code{.dir-locals.el} file, so this should
|
||||
only be done if you delete files from the Trash directory manually.
|
||||
|
||||
@vindex remote-file-name-inhibit-delete-by-moving-to-trash
|
||||
If the variable @code{remote-file-name-inhibit-delete-by-moving-to-trash}
|
||||
is non-@code{nil}, remote files are never moved to the Trash. They
|
||||
are deleted instead.
|
||||
|
||||
@ifnottex
|
||||
If a file is under version control (@pxref{Version Control}), you
|
||||
should delete it using @kbd{M-x vc-delete-file} instead of @kbd{M-x
|
||||
|
|
@ -2289,15 +2281,10 @@ behavior by using the options @code{image-auto-resize} and
|
|||
@code{image-auto-resize-on-window-resize}.
|
||||
|
||||
@findex image-transform-fit-to-window
|
||||
@kindex s w (Image mode)
|
||||
@findex image-transform-set-percent
|
||||
@kindex s p (Image mode)
|
||||
@findex image-transform-set-scale
|
||||
@kindex s s (Image mode)
|
||||
@findex image-transform-reset-to-initial
|
||||
@kindex s 0 (Image mode)
|
||||
@findex image-transform-reset-to-original
|
||||
@kindex s o (Image mode)
|
||||
To resize the image manually you can use the command
|
||||
@code{image-transform-fit-to-window} bound to @kbd{s w} that fits the
|
||||
image to both the window height and width. To scale the image to a
|
||||
|
|
@ -2358,94 +2345,6 @@ frames at once. You can go to a specific frame with @kbd{F}
|
|||
(@code{image-reverse-speed}) reverses it. The command @kbd{a 0}
|
||||
(@code{image-reset-speed}) resets the speed to the original value.
|
||||
|
||||
In addition to the above key bindings, which are specific to Image
|
||||
mode, images shown in any Emacs buffer have special key bindings when
|
||||
point is at or inside the image:
|
||||
|
||||
@table @kbd
|
||||
@cindex resize images
|
||||
@cindex image resize
|
||||
@findex image-increase-size
|
||||
@kindex i + (Image mode)
|
||||
@item i +
|
||||
Increase the image size (@code{image-increase-size}) by 20%. Prefix
|
||||
numeric argument controls the increment; the value of @var{n} means to
|
||||
multiply the size by the factor of @w{@code{1 + @var{n} / 10}}, so
|
||||
@w{@kbd{C-u 5 i +}} means to increase the size by 50%.
|
||||
|
||||
@findex image-decrease-size
|
||||
@kindex i - (Image mode)
|
||||
@item i -
|
||||
Decrease the image size (@code{image-increase-size}) by 20%. Prefix
|
||||
numeric argument controls the decrement; the value of @var{n} means to
|
||||
multiply the size by the factor of @w{@code{1 - @var{n} / 10}}, so
|
||||
@w{@kbd{C-u 3 i -}} means to decrease the size by 30%.
|
||||
|
||||
@cindex rotating images
|
||||
@cindex image rotation
|
||||
@findex image-rotate
|
||||
@kindex i r (Image mode)
|
||||
@item i r
|
||||
Rotate the image by 90 degrees clockwise (@code{image-rotate}).
|
||||
With the prefix argument, rotate by 90 degrees counter-clockwise instead.
|
||||
Note that this command is not available for sliced images.
|
||||
|
||||
@findex image-flip-horizontally
|
||||
@kindex i h (Image mode)
|
||||
@item i h
|
||||
Flip the image horizontally (@code{image-flip-horizontally}). This
|
||||
presents the image as if reflected in a vertical mirror.
|
||||
Note that this command is not available for sliced images.
|
||||
|
||||
@findex image-flip-vertically
|
||||
@kindex i v (Image mode)
|
||||
@item i v
|
||||
Flip the image vertically (@code{image-flip-vertically}). This
|
||||
presents the image as if reflected in a horizontal mirror.
|
||||
Note that this command is not available for sliced images.
|
||||
|
||||
@findex image-save
|
||||
@kindex i o (Image mode)
|
||||
@item i o
|
||||
Save the image to a file (@code{image-save}). This command prompts
|
||||
you for the name of the file to save the image.
|
||||
|
||||
@cindex cropping images
|
||||
@vindex image-crop-crop-command
|
||||
@findex image-crop
|
||||
@kindex i c (Image mode)
|
||||
@item i c
|
||||
Crop the image (@code{image-crop}). This command is available only if
|
||||
your system has an external program installed that can be used for
|
||||
cropping and cutting of images; the user option
|
||||
@code{image-crop-crop-command} determines what program to use, and
|
||||
defaults to the ImageMagick's @command{convert} program. The command
|
||||
displays the image with a rectangular frame superimposed on it, and
|
||||
lets you use the mouse to move and resize the frame. Type @kbd{m} to
|
||||
cause mouse movements to move the frame instead of resizing it; type
|
||||
@kbd{s} to move a square frame instead. When you are satisfied with
|
||||
the position and size of the cropping frame, type @kbd{@key{RET}} to
|
||||
actually crop the part under the frame; or type @kbd{q} to exit
|
||||
without cropping. You can then save the cropped image using @w{@kbd{i
|
||||
o}} or @w{@kbd{M-x image-save}}.
|
||||
|
||||
@findex image-cut
|
||||
@kindex i x (Image mode)
|
||||
@vindex image-cut-color
|
||||
@vindex image-crop-cut-command
|
||||
@item i x
|
||||
Cut a rectangle from the image (@code{image-cut}). This works the
|
||||
same as @code{image-crop} (and also requires an external program,
|
||||
defined by the variable @code{image-crop-cut-command}, to perform the
|
||||
image cut), but instead of cropping the image, it removes the part
|
||||
inside the frame and fills that part with the color specified by
|
||||
@code{image-cut-color}. With prefix argument, the command prompts for
|
||||
the color to use.
|
||||
@end table
|
||||
|
||||
The size and rotation commands are ``repeating'', which means that you
|
||||
can continue adjusting the image without using the @kbd{i} prefix.
|
||||
|
||||
@cindex ImageMagick support
|
||||
@vindex imagemagick-enabled-types
|
||||
@vindex imagemagick-types-inhibit
|
||||
|
|
|
|||
|
|
@ -317,16 +317,6 @@ by using the @kbd{M-x shortdoc} command. This will prompt you for an
|
|||
area of interest, e.g., @code{string}, and pop you to a buffer where
|
||||
many of the functions relevant for handling strings are listed.
|
||||
|
||||
You can also request that documentation of functions and commands
|
||||
shown in @file{*Help*} buffers popped by @kbd{C-h f} includes examples
|
||||
of their use. To that end, add the following to your initialization
|
||||
file (@pxref{Init File}):
|
||||
|
||||
@example
|
||||
(add-hook 'help-fns-describe-function-functions
|
||||
#'shortdoc-help-fns-examples-function)
|
||||
@end example
|
||||
|
||||
@kindex C-h v
|
||||
@findex describe-variable
|
||||
@kbd{C-h v} (@code{describe-variable}) is like @kbd{C-h f} but
|
||||
|
|
|
|||
|
|
@ -313,27 +313,19 @@ may be defined in your Emacs session. For example, if a command
|
|||
called @code{authorize-me} was defined, Emacs could only complete
|
||||
as far as @samp{aut}.)
|
||||
|
||||
If you type @kbd{@key{TAB}} again immediately, it cannot determine
|
||||
the next character; it could be @samp{-}, @samp{a}, or @samp{c}. So
|
||||
it does not add any characters; instead, @key{TAB} displays a list of
|
||||
all possible completions in another window.
|
||||
If you type @key{TAB} again immediately, it cannot determine the
|
||||
next character; it could be @samp{-}, @samp{a}, or @samp{c}. So it
|
||||
does not add any characters; instead, @key{TAB} displays a list of all
|
||||
possible completions in another window.
|
||||
|
||||
Next, type @kbd{-f}. The minibuffer now contains @samp{auto-f}, and
|
||||
the only command name that starts with this is @code{auto-fill-mode}.
|
||||
If you now type @kbd{@key{TAB}}, completion fills in the rest of the
|
||||
If you now type @key{TAB}, completion fills in the rest of the
|
||||
argument @samp{auto-fill-mode} into the minibuffer.
|
||||
|
||||
Hence, typing just @kbd{a u @key{TAB} - f @key{TAB}} allows you to
|
||||
enter @samp{auto-fill-mode}.
|
||||
|
||||
@key{TAB} also works while point is not at the end of the
|
||||
minibuffer. In that case, it will fill in text both at point and at
|
||||
the end of the minibuffer. If you type @kbd{M-x autocm}, then press
|
||||
@kbd{C-b} to move point before the @samp{m}, you can type
|
||||
@kbd{@key{TAB}} to insert the text @samp{onf-} at point and @samp{ode}
|
||||
at the end of the minibuffer, so that the minibuffer contains
|
||||
@samp{autoconf-mode}.
|
||||
|
||||
@node Completion Commands
|
||||
@subsection Completion Commands
|
||||
|
||||
|
|
@ -961,14 +953,12 @@ File ‘foo.el’ exists; overwrite? (y or n)
|
|||
@end smallexample
|
||||
|
||||
@cindex yes or no prompt
|
||||
@vindex yes-or-no-prompt
|
||||
The second type of yes-or-no query is typically employed if giving
|
||||
the wrong answer would have serious consequences; it thus features a
|
||||
longer prompt ending with @samp{(yes or no)} (or the value of
|
||||
@code{yes-or-no-prompt} if you've customized that). For example, if
|
||||
you invoke @kbd{C-x k} (@code{kill-buffer}) on a file-visiting buffer
|
||||
with unsaved changes, Emacs activates the minibuffer with a prompt
|
||||
like this:
|
||||
longer prompt ending with @samp{(yes or no)}. For example, if you
|
||||
invoke @kbd{C-x k} (@code{kill-buffer}) on a file-visiting buffer with
|
||||
unsaved changes, Emacs activates the minibuffer with a prompt like
|
||||
this:
|
||||
|
||||
@smallexample
|
||||
Buffer foo.el modified; kill anyway? (yes or no)
|
||||
|
|
|
|||
|
|
@ -1810,28 +1810,31 @@ you can give each daemon its own server name like this:
|
|||
emacs --daemon=foo
|
||||
@end example
|
||||
|
||||
@vindex server-stop-automatically
|
||||
@findex server-stop-automatically
|
||||
The Emacs server can optionally be stopped automatically when
|
||||
certain conditions are met. To do this, set the option
|
||||
@code{server-stop-automatically} to one of the following values:
|
||||
certain conditions are met. To do this, call the function
|
||||
@code{server-stop-automatically} in your init file (@pxref{Init
|
||||
File}), with one of the following arguments:
|
||||
|
||||
@table @code
|
||||
@item empty
|
||||
This value causes the server to be stopped when it has no clients, no
|
||||
unsaved file-visiting buffers and no running processes anymore.
|
||||
@itemize
|
||||
@item
|
||||
With the argument @code{empty}, the server is stopped when it has no
|
||||
clients, no unsaved file-visiting buffers and no running processes
|
||||
anymore.
|
||||
|
||||
@item delete-frame
|
||||
This value means that when the last client frame is being closed, you
|
||||
are asked whether each unsaved file-visiting buffer must be saved and
|
||||
each unfinished process can be stopped, and if so, the server is
|
||||
@item
|
||||
With the argument @code{delete-frame}, when the last client frame is
|
||||
being closed, you are asked whether each unsaved file-visiting buffer
|
||||
must be saved and each unfinished process can be stopped, and if so,
|
||||
the server is stopped.
|
||||
|
||||
@item
|
||||
With the argument @code{kill-terminal}, when the last client frame is
|
||||
being closed with @kbd{C-x C-c} (@code{save-buffers-kill-terminal}),
|
||||
you are asked whether each unsaved file-visiting buffer must be saved
|
||||
and each unfinished process can be stopped, and if so, the server is
|
||||
stopped.
|
||||
|
||||
@item kill-terminal
|
||||
This value means that when the last client frame is being closed with
|
||||
@kbd{C-x C-c} (@code{save-buffers-kill-terminal}), you are asked
|
||||
whether each unsaved file-visiting buffer must be saved and each
|
||||
unfinished process can be stopped, and if so, the server is stopped.
|
||||
@end table
|
||||
@end itemize
|
||||
|
||||
@findex server-eval-at
|
||||
If you have defined a server by a unique server name, it is possible
|
||||
|
|
|
|||
|
|
@ -329,15 +329,15 @@ version of the package, a newer version is also installed.
|
|||
@section Package Installation
|
||||
|
||||
@findex package-install
|
||||
@findex package-upgrade
|
||||
@findex package-upgrade-all
|
||||
@findex package-update
|
||||
@findex package-update-all
|
||||
Packages are most conveniently installed using the package menu
|
||||
(@pxref{Package Menu}), but you can also use the command @kbd{M-x
|
||||
package-install}. This prompts for the name of a package with the
|
||||
@samp{available} status, then downloads and installs it. Similarly,
|
||||
if you want to upgrade a package, you can use the @kbd{M-x
|
||||
package-upgrade} command, and if you want to upgrade all the packages,
|
||||
you can use the @kbd{M-x package-upgrade-all} command.
|
||||
if you want to update a package, you can use the @kbd{M-x
|
||||
package-update} command, and if you just want to update all the
|
||||
packages, you can use the @kbd{M-x package-update-all} command.
|
||||
|
||||
@cindex package requirements
|
||||
A package may @dfn{require} certain other packages to be installed,
|
||||
|
|
@ -551,8 +551,8 @@ bugs.
|
|||
source code for a package directly from source. The command will also
|
||||
automatically ensure that all files are byte-compiled and auto-loaded,
|
||||
just like with a regular package. Packages installed this way behave
|
||||
just like any other package. You can upgrade them using
|
||||
@code{package-upgrade} or @code{package-upgrade-all} and delete them
|
||||
just like any other package. You can update them using
|
||||
@code{package-update} or @code{package-update-all} and delete them
|
||||
again using @code{package-delete}. They are even displayed in the
|
||||
regular package listing. If you just wish to clone the source of a
|
||||
package, without adding it to the package list, use
|
||||
|
|
@ -578,80 +578,3 @@ from the package directory (@pxref{Package Files}) to your checkout
|
|||
and initializes the code. Note that you might have to use
|
||||
@code{package-vc-refresh} to repeat the initialization and update the
|
||||
autoloads.
|
||||
|
||||
@subsection Specifying Package Sources
|
||||
@cindex package specification
|
||||
@cindex specification, for source packages
|
||||
|
||||
To install a package from source, Emacs must know where to get the
|
||||
package's source code (such as a code repository) and basic
|
||||
information about the structure of the code (such as the main file in
|
||||
a multi-file package). A @dfn{package specification} describes these
|
||||
properties.
|
||||
|
||||
When supported by a package archive (@pxref{Package
|
||||
Archives,,,elisp, The Emacs Lisp Reference Manual}), Emacs can
|
||||
automatically download a package's specification from said archive.
|
||||
If the first argument passed to @code{package-vc-install} is a symbol
|
||||
naming a package, then Emacs will use the specification provided by
|
||||
the archive for that package.
|
||||
|
||||
@example
|
||||
@group
|
||||
;; Emacs will download BBDB's specification from GNU ELPA:
|
||||
(package-vc-install 'bbdb)
|
||||
@end group
|
||||
@end example
|
||||
|
||||
The first argument to @code{package-vc-install} may also be a
|
||||
package specification. This allows you to install source packages
|
||||
from locations other than the known archives listed in the user option
|
||||
@code{package-archives}. A package specification is a list of the
|
||||
form @code{(@var{name} . @var{spec})}, in which @var{spec} should be a
|
||||
property list using any of the keys in the table below.
|
||||
|
||||
For definitions of basic terms for working with code repositories and
|
||||
version control systems, see @ref{VCS Concepts,,,emacs, The GNU Emacs
|
||||
Manual}.
|
||||
|
||||
@table @code
|
||||
@item :url
|
||||
A string providing the URL that specifies the repository from which to
|
||||
fetch the package's source code.
|
||||
|
||||
@item :branch
|
||||
A string providing the revision of the code to install. Do not
|
||||
confuse this with a package's version number.
|
||||
|
||||
@item :lisp-dir
|
||||
A string providing the repository-relative name of the directory to
|
||||
use for loading the Lisp sources, which defaults to the root directory
|
||||
of the repository.
|
||||
|
||||
@item :main-file
|
||||
A string providing the main file of the project, from which to gather
|
||||
package metadata. If not given, the default is the package name with
|
||||
".el" appended to it.
|
||||
|
||||
@item :doc
|
||||
A string providing the repository-relative name of the documentation
|
||||
file from which to build an Info file. This can be a Texinfo file or
|
||||
an Org file.
|
||||
|
||||
@item :vc-backend
|
||||
A symbol naming the VC backend to use for downloading a copy of the
|
||||
package's repository (@pxref{Version Control Systems,,,emacs, The GNU
|
||||
Emacs Manual}). If omitted, Emacs will attempt to make a guess based
|
||||
on the provided URL, or, failing that, the process will fall back onto
|
||||
the value of @code{package-vc-default-backend}.
|
||||
@end table
|
||||
|
||||
@example
|
||||
@group
|
||||
;; Specifying information manually:
|
||||
(package-vc-install
|
||||
'(bbdb :url "https://git.savannah.nongnu.org/git/bbdb.git"
|
||||
:lisp-dir "lisp"
|
||||
:doc "doc/bbdb.texi"))
|
||||
@end group
|
||||
@end example
|
||||
|
|
|
|||
|
|
@ -163,7 +163,6 @@ Emacs we use it for all languages.
|
|||
* Left Margin Paren:: An open-paren or similar opening delimiter
|
||||
starts a defun if it is at the left margin.
|
||||
* Moving by Defuns:: Commands to move over or mark a major definition.
|
||||
* Moving by Sentences:: Commands to move over certain code units.
|
||||
* Imenu:: Making buffer indexes as menus.
|
||||
* Which Function:: Which Function mode shows which function you are in.
|
||||
@end menu
|
||||
|
|
@ -266,66 +265,6 @@ tree-sitter library provide control of this behavior: if the variable
|
|||
@code{treesit-defun-tactic} is set to the value @code{top-level}, the
|
||||
defun commands will find the @emph{outermost} defuns instead.
|
||||
|
||||
@node Moving by Sentences
|
||||
@subsection Moving by Sentences
|
||||
@cindex sentences, in programming languages
|
||||
|
||||
These commands move point or set up the region based on units of
|
||||
code, also called @dfn{sentences}. Even though sentences are usually
|
||||
considered when writing human languages, Emacs can use the same
|
||||
commands to move over certain constructs in programming languages
|
||||
(@pxref{Sentences}, @pxref{Moving by Defuns}). In a programming
|
||||
language a sentence is usually a complete language construct smaller
|
||||
than defuns, but larger than sexps (@pxref{List Motion,,, elisp, The
|
||||
Emacs Lisp Reference Manual}). What exactly is a sentence in this
|
||||
case depends on the programming language, but usually it is a complete
|
||||
statement, such as a variable definition and initialization, or a
|
||||
conditional statement. An example of a sentence in the C language
|
||||
could be
|
||||
|
||||
@example
|
||||
int x = 5;
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
or in the JavaScript language it could look like
|
||||
|
||||
@example
|
||||
@group
|
||||
const thing = () => console.log("Hi");
|
||||
@end group
|
||||
@group
|
||||
const foo = [1] == '1'
|
||||
? "No way"
|
||||
: "...";
|
||||
@end group
|
||||
|
||||
@end example
|
||||
|
||||
@table @kbd
|
||||
@item M-a
|
||||
Move to beginning of current or preceding sentence
|
||||
(@code{backward-sentence}).
|
||||
@item M-e
|
||||
Move to end of current or following sentence (@code{forward-sentence}).
|
||||
@end table
|
||||
|
||||
@cindex move to beginning or end of sentence
|
||||
@cindex sentence, move to beginning or end
|
||||
@kindex M-a @r{(programming modes)}
|
||||
@kindex M-e @r{(programming modes)}
|
||||
@findex backward-sentence @r{(programming modes)}
|
||||
@findex forward-sentence @r{(programming modes)}
|
||||
The commands to move to the beginning and end of the current
|
||||
sentence are @kbd{M-a} (@code{backward-sentence}) and @kbd{M-e}
|
||||
(@code{forward-sentence}). If you repeat one of these commands, or
|
||||
use a positive numeric argument, each repetition moves to the next
|
||||
sentence in the direction of motion.
|
||||
|
||||
@kbd{M-a} with a negative argument @minus{}@var{n} moves forward
|
||||
@var{n} times to the next end of a sentence. Likewise, @kbd{M-e} with
|
||||
a negative argument moves back to the start of a sentence.
|
||||
|
||||
@node Imenu
|
||||
@subsection Imenu
|
||||
@cindex index of buffer definitions
|
||||
|
|
@ -492,9 +431,6 @@ large chunks of code:
|
|||
@table @kbd
|
||||
@item C-M-q
|
||||
Reindent all the lines within one parenthetical grouping.
|
||||
@item M-q
|
||||
Fill a single paragraph in a defun, or reindent all the lines within
|
||||
that defun.
|
||||
@item C-u @key{TAB}
|
||||
Shift an entire parenthetical grouping rigidly sideways so that its
|
||||
first line is properly indented.
|
||||
|
|
@ -515,21 +451,6 @@ indentation of the line where the grouping starts). The function that
|
|||
etc. To correct the overall indentation as well, type @kbd{@key{TAB}}
|
||||
first.
|
||||
|
||||
@kindex M-q
|
||||
@findex prog-fill-reindent-defun
|
||||
@vindex beginning-of-defun-function
|
||||
@vindex end-of-defun-function
|
||||
@vindex fill-paragraph-function
|
||||
To reindent the entire defun around point, type @kbd{M-q}
|
||||
(@code{prog-fill-reindent-defun}). If point is in a comment or a
|
||||
string, this command fills and indents the comment or string instead.
|
||||
What exactly constitutes a comment, a string, or a defun depends on
|
||||
the major mode: the bounds of a defun are decided by the variables
|
||||
@code{beginning-of-defun-function} and @code{end-of-defun-function}
|
||||
(@pxref{List Motion,,, elisp, The Emacs Lisp Reference Manual}),
|
||||
and the filling mechanism is decided by @code{fill-paragraph-function}
|
||||
(@pxref{Filling,,, elisp, The Emacs Lisp Reference Manual}).
|
||||
|
||||
@kindex C-u TAB
|
||||
If you like the relative indentation within a grouping but not the
|
||||
indentation of its first line, move point to that first line and type
|
||||
|
|
@ -1387,12 +1308,6 @@ this, change the value of the variable @code{Man-switches} to
|
|||
@kbd{M-p} to switch between man pages in different sections. The mode
|
||||
line shows how many manual pages are available.
|
||||
|
||||
@vindex Man-prefer-synchronous-call
|
||||
By default, @kbd{M-x man} calls the @code{man} program
|
||||
asynchronously. You can force the invocation to be synchronous by
|
||||
customizing @code{Man-prefer-synchronous-calls} to a non-@code{nil}
|
||||
value.
|
||||
|
||||
@findex woman
|
||||
@cindex manual pages, on MS-DOS/MS-Windows
|
||||
An alternative way of reading manual pages is the @kbd{M-x woman}
|
||||
|
|
|
|||
|
|
@ -253,10 +253,6 @@ value of @code{sentence-end-double-space}.
|
|||
of a sentence. Set the variable @code{sentence-end-without-period} to
|
||||
@code{t} in such cases.
|
||||
|
||||
Even though the above mentioned sentence movement commands are based
|
||||
on human languages, other Emacs modes can set these command to get
|
||||
similar functionality (@pxref{Moving by Sentences}).
|
||||
|
||||
@node Paragraphs
|
||||
@section Paragraphs
|
||||
@cindex paragraphs
|
||||
|
|
|
|||
|
|
@ -856,7 +856,7 @@ customizations.
|
|||
@cindex dribble file
|
||||
@cindex logging keystrokes
|
||||
One way to record the input to Emacs precisely is to write a dribble
|
||||
file. To start the file, use the command @w{@kbd{M-x open-dribble-file}}.
|
||||
file. To start the file, use the @kbd{M-x open-dribble-file} command.
|
||||
From then on, Emacs copies all your input to the specified dribble
|
||||
file until the Emacs process is killed. Be aware that sensitive
|
||||
information (such as passwords) may end up recorded in the dribble
|
||||
|
|
@ -1071,13 +1071,9 @@ backtrace for the error. To make a backtrace for the error, use
|
|||
say, you must give that command and then make the bug happen). This
|
||||
causes the error to start the Lisp debugger, which shows you a
|
||||
backtrace. Copy the text of the debugger's backtrace into the bug
|
||||
report. (The backtrace is more detailed if you load the relevant Lisp
|
||||
@file{*.el} source files before triggering the error, so do that if
|
||||
you know how to find and load those files.)
|
||||
|
||||
To debug the error, we suggest using Edebug. @xref{Edebug,, Edebug,
|
||||
elisp, the Emacs Lisp Reference Manual}, for information on debugging
|
||||
Emacs Lisp programs with the Edebug package.
|
||||
report. @xref{Edebug,, Edebug, elisp, the Emacs Lisp Reference
|
||||
Manual}, for information on debugging Emacs Lisp programs with the
|
||||
Edebug package.
|
||||
|
||||
This use of the debugger is possible only if you know how to make the
|
||||
bug happen again. If you can't make it happen again, at least copy
|
||||
|
|
|
|||
|
|
@ -6604,11 +6604,10 @@ works. You will probably need to use @kbd{C-h f}
|
|||
(@code{describe-function}). The newer version uses a conditional to
|
||||
determine whether the buffer has been narrowed.
|
||||
|
||||
Also, the modern version of @code{what-line} uses
|
||||
@code{line-number-at-pos}, which among other simple expressions, such
|
||||
as @code{(goto-char (point-min))}, moves point to the beginning of the
|
||||
current line with @code{(forward-line 0)} rather than
|
||||
@code{beginning-of-line}.)
|
||||
(Also, it uses @code{line-number-at-pos}, which among other simple
|
||||
expressions, such as @code{(goto-char (point-min))}, moves point to
|
||||
the beginning of the current line with @code{(forward-line 0)} rather
|
||||
than @code{beginning-of-line}.)
|
||||
|
||||
The @code{what-line} function as shown here has a documentation line
|
||||
and is interactive, as you would expect. The next two lines use the
|
||||
|
|
|
|||
|
|
@ -959,9 +959,9 @@ infinite recursion.
|
|||
|
||||
@defun buffer-match-p condition buffer-or-name &optional arg
|
||||
This function checks if a buffer designated by @code{buffer-or-name}
|
||||
satisfies the specified @code{condition}. Optional third argument
|
||||
@var{arg} is passed to the predicate function in @var{condition}. A
|
||||
valid @var{condition} can be one of the following:
|
||||
satisfies a @code{condition}. Optional third argument @var{arg} is
|
||||
passed to the predicate function in @var{condition}. A condition can
|
||||
be one of the following:
|
||||
@itemize @bullet{}
|
||||
@item
|
||||
A string, interpreted as a regular expression. The buffer
|
||||
|
|
@ -990,23 +990,21 @@ Satisfied if @emph{all} the conditions in @var{conds} satisfy
|
|||
Satisfied if the buffer's major mode derives from @var{expr}.
|
||||
@item major-mode
|
||||
Satisfied if the buffer's major mode is equal to @var{expr}. Prefer
|
||||
using @code{derived-mode} instead, when both can work.
|
||||
using @code{derived-mode} instead when both can work.
|
||||
@end table
|
||||
@item t
|
||||
Satisfied by any buffer. A convenient alternative to @code{""} (empty
|
||||
string) or @code{(and)} (empty conjunction).
|
||||
string), @code{(and)} (empty conjunction) or @code{always}.
|
||||
@end itemize
|
||||
@end defun
|
||||
|
||||
@defun match-buffers condition &optional buffer-list arg
|
||||
This function returns a list of all buffers that satisfy the
|
||||
@code{condition}. If no buffers match, the function returns
|
||||
@code{nil}. The argument @var{condition} is as defined in
|
||||
@code{buffer-match-p} above. By default, all the buffers are
|
||||
considered, but this can be restricted via the optional argument
|
||||
@code{buffer-list}, which should be a list of buffers to consider.
|
||||
Optional third argument @var{arg} will be passed to @var{condition} in
|
||||
the same way as @code{buffer-match-p} does.
|
||||
This function returns a list of all buffers that satisfy a
|
||||
@code{condition}, as defined for @code{buffer-match-p}. By default
|
||||
all buffers are considered, but this can be restricted via the second
|
||||
optional @code{buffer-list} argument. Optional third argument
|
||||
@var{arg} will be used by @var{condition} in the same way as
|
||||
@code{buffer-match-p} does.
|
||||
@end defun
|
||||
|
||||
@node Creating Buffers
|
||||
|
|
|
|||
|
|
@ -1960,8 +1960,8 @@ end-position of a drag event, this position list may represent a
|
|||
location outside the boundaries of the initially selected frame, in
|
||||
which case the list contains that frame in place of a window.
|
||||
|
||||
The @code{track-mouse} macro enables generation of motion
|
||||
events within its body. Outside of @code{track-mouse} body, Emacs
|
||||
The special form @code{track-mouse} enables generation of motion
|
||||
events within its body. Outside of @code{track-mouse} forms, Emacs
|
||||
does not generate events for mere motion of the mouse, and these
|
||||
events do not appear. @xref{Mouse Tracking}.
|
||||
|
||||
|
|
@ -2395,17 +2395,6 @@ as @code{set-language-environment}), use the
|
|||
;; Get the full localized name of the language
|
||||
(w32-get-locale-info language-id t)
|
||||
@end smallexample
|
||||
|
||||
@cindex @code{end-session} event
|
||||
@item end-session
|
||||
This event is generated on MS-Windows when the operating system
|
||||
informs Emacs that the user terminated the interactive session, or
|
||||
that the system is shutting down. The standard definition of this
|
||||
event is to invoke the @code{kill-emacs} command (@pxref{Killing
|
||||
Emacs}) so as to shut down Emacs in an orderly fashion; if there are
|
||||
unsaved changes, this will produce auto-save files
|
||||
(@pxref{Auto-Saving}) that the user can use after restarting the
|
||||
session to restore the unsaved edits.
|
||||
@end table
|
||||
|
||||
If one of these events arrives in the middle of a key sequence---that
|
||||
|
|
@ -2454,7 +2443,7 @@ into another window. That produces a pair of events like these:
|
|||
|
||||
The frame with input focus might not take up the entire screen, and
|
||||
the user might move the mouse outside the scope of the frame. Inside
|
||||
the @code{track-mouse} macro, that produces an event like this:
|
||||
the @code{track-mouse} special form, that produces an event like this:
|
||||
|
||||
@smallexample
|
||||
(mouse-movement (#<frame *ielm* 0x102849a30> nil (563 . 205) 532301936))
|
||||
|
|
|
|||
|
|
@ -1809,9 +1809,6 @@ wish the program to continue execution despite an error in a subroutine.
|
|||
In these cases, you would use @code{condition-case} to establish
|
||||
@dfn{error handlers} to recover control in case of error.
|
||||
|
||||
For reporting problems without terminating the execution of the
|
||||
current command, consider issuing a warning instead. @xref{Warnings}.
|
||||
|
||||
Resist the temptation to use error handling to transfer control from
|
||||
one part of the program to another; use @code{catch} and @code{throw}
|
||||
instead. @xref{Catch and Throw}.
|
||||
|
|
|
|||
|
|
@ -264,12 +264,11 @@ have any number of prefixes.
|
|||
@end table
|
||||
|
||||
@cindex @code{custom-group} property
|
||||
The variables, faces, and subgroups of a group are stored in the
|
||||
The variables and subgroups of a group are stored in the
|
||||
@code{custom-group} property of the group's symbol. @xref{Symbol
|
||||
Plists}. The value of that property is a list of pairs whose
|
||||
@code{car} is the symbol of the variable or the face or the subgroup,
|
||||
and the @code{cdr} is one of the corresponding symbols
|
||||
@code{custom-variable}, @code{custom-face}, or @code{custom-group}.
|
||||
@code{car} is the variable or subgroup symbol and the @code{cdr} is
|
||||
either @code{custom-variable} or @code{custom-group}.
|
||||
@end defmac
|
||||
|
||||
@defopt custom-unlispify-remove-prefixes
|
||||
|
|
@ -379,15 +378,8 @@ the option as a Lisp variable); preferably, though, it should not
|
|||
modify its value argument destructively. The default for
|
||||
@var{setfunction} is @code{set-default-toplevel-value}.
|
||||
|
||||
If defined, @var{setfunction} will also be called when evaluating a
|
||||
@code{defcustom} form with @kbd{C-M-x} in Emacs Lisp mode and when the
|
||||
@var{option}'s value is changed via the @code{setopt} macro
|
||||
(@pxref{Setting Variables, setopt}).
|
||||
|
||||
If you specify this keyword, the variable's documentation string
|
||||
should describe how to do the same job in hand-written Lisp code,
|
||||
either by invoking @var{setfunction} directly or by using
|
||||
@code{setopt}.
|
||||
should describe how to do the same job in hand-written Lisp code.
|
||||
|
||||
@item :get @var{getfunction}
|
||||
@kindex get@r{, @code{defcustom} keyword}
|
||||
|
|
|
|||
|
|
@ -310,29 +310,29 @@ reformatted, with undesirable results. Instead, use @code{(message
|
|||
"%s" @var{string})}.
|
||||
@end defun
|
||||
|
||||
The following facilities allow users and Lisp programs to control how
|
||||
echo-area messages are displayed.
|
||||
|
||||
@defvar set-message-function
|
||||
If this variable is non-@code{nil}, it should be a function of one
|
||||
argument, the text of a message to display in the echo area. That
|
||||
argument, the text of a message to display in the echo area. This
|
||||
function will be called by @code{message} and related functions. If
|
||||
the function returns @code{nil}, the message is displayed in the echo
|
||||
area as usual. If the function returns a string, that string is
|
||||
displayed in the echo area @emph{instead} of the original message. If
|
||||
the function returns any other non-@code{nil} value, that means the
|
||||
message was already handled, so @code{message} will not display
|
||||
anything in the echo area.
|
||||
area as usual. If this function returns a string, that string is
|
||||
displayed in the echo area instead of the original one. If this
|
||||
function returns other non-@code{nil} values, that means the message
|
||||
was already handled, so @code{message} will not display anything in
|
||||
the echo area. See also @code{clear-message-function} that can be
|
||||
used to clear the message displayed by this function.
|
||||
|
||||
The default value calls @code{set-minibuffer-message}, described
|
||||
below.
|
||||
The default value is the function that displays the message at the end
|
||||
of the minibuffer when the minibuffer is active. However, if the text
|
||||
shown in the active minibuffer has the @code{minibuffer-message} text
|
||||
property (@pxref{Special Properties}) on some character, the message
|
||||
will be displayed before the first character having that property.
|
||||
@end defvar
|
||||
|
||||
@defvar clear-message-function
|
||||
If this variable is non-@code{nil}, it should be a function of no
|
||||
arguments; @code{message} and related functions call it when their
|
||||
argument message is @code{nil} or the empty string, to clear the echo
|
||||
area.
|
||||
If this variable is non-@code{nil}, @code{message} and related
|
||||
functions call it with no arguments when their argument message is
|
||||
@code{nil} or the empty string.
|
||||
|
||||
Usually this function is called when the next input event arrives
|
||||
after displaying an echo-area message. The function is expected to
|
||||
|
|
@ -358,51 +358,11 @@ with the same text; if the last function in the list returns
|
|||
function returns a non-@code{nil} value that is not a string, the
|
||||
message is considered to be handled, and no further functions in the
|
||||
list are called.
|
||||
|
||||
The three useful functions to be put in the list that is the value of
|
||||
this option are described below.
|
||||
@end defopt
|
||||
|
||||
@defun set-minibuffer-message message
|
||||
This function displays @var{message} in the echo-area when the
|
||||
minibuffer is not active, and at the end of the minibuffer when the
|
||||
minibuffer is active. However, if the text shown in the active
|
||||
minibuffer has the @code{minibuffer-message} text property
|
||||
(@pxref{Special Properties}) on some character, the message will be
|
||||
displayed before the first character having that property.
|
||||
|
||||
This function is by default the only member of the list in
|
||||
@code{set-message-functions}.
|
||||
@end defun
|
||||
|
||||
@vindex inhibit-message-regexps
|
||||
@defun inhibit-message message
|
||||
If an echo-area @var{message} matches any regexp in the list that is
|
||||
the value of the user option @code{inhibit-message-regexps}, this
|
||||
function suppresses the display of that message and returns a
|
||||
non-@code{nil} value that is not a string. Thus, if this function is
|
||||
in the list @code{set-message-functions}, the rest of the functions in
|
||||
the list will not be called when @var{message} matches the regexps in
|
||||
@code{inhibit-message-regexps}. To ensure a matching @var{message}
|
||||
will never be displayed, make this function be the first element of
|
||||
the list in @code{set-message-functions}.
|
||||
@end defun
|
||||
|
||||
@vindex multi-message-max
|
||||
@vindex multi-message-timeout
|
||||
@defun set-multi-message message
|
||||
This function accumulates several echo-area messages emitted one after
|
||||
another, and returns them as a single string in which individual
|
||||
messages are separated by newlines. Up to @code{multi-message-max}
|
||||
recent messages can be accumulated. The accumulated messages are
|
||||
discarded when more than @code{multi-message-timeout} seconds have
|
||||
elapsed since the time the first message was emitted.
|
||||
@end defun
|
||||
|
||||
@defvar inhibit-message
|
||||
When this variable is non-@code{nil}, @code{message} and related functions
|
||||
will not display any messages in the Echo Area. Echo-area messages
|
||||
are still logged in the @file{*Messages*} buffer, though.
|
||||
will not use the Echo Area to display messages.
|
||||
@end defvar
|
||||
|
||||
@defmac with-temp-message message &rest body
|
||||
|
|
@ -752,8 +712,7 @@ echo area (which is really a special use of the minibuffer window;
|
|||
@cindex warnings
|
||||
|
||||
@dfn{Warnings} are a facility for a program to inform the user of a
|
||||
possible problem, but continue running (as opposed to signaling an
|
||||
error, @pxref{Errors}).
|
||||
possible problem, but continue running.
|
||||
|
||||
@menu
|
||||
* Warning Basics:: Warnings concepts and functions to report them.
|
||||
|
|
@ -766,74 +725,69 @@ error, @pxref{Errors}).
|
|||
@subsection Warning Basics
|
||||
@cindex severity level
|
||||
|
||||
Every warning is a textual message, which explains the problem for
|
||||
the user, with the associated @dfn{severity level} which is a symbol.
|
||||
Here are the supported severity levels, in order of decreasing
|
||||
severity, and their meanings:
|
||||
Every warning has a textual message, which explains the problem for
|
||||
the user, and a @dfn{severity level} which is a symbol. Here are the
|
||||
possible severity levels, in order of decreasing severity, and their
|
||||
meanings:
|
||||
|
||||
@table @code
|
||||
@item :emergency
|
||||
A problem that will seriously impair Emacs operation soon
|
||||
if the user does not attend to it promptly.
|
||||
if you do not attend to it promptly.
|
||||
@item :error
|
||||
A report about data or circumstances that are inherently wrong.
|
||||
A report of data or circumstances that are inherently wrong.
|
||||
@item :warning
|
||||
A report about data or circumstances that are not inherently wrong,
|
||||
but raise suspicion of a possible problem.
|
||||
A report of data or circumstances that are not inherently wrong, but
|
||||
raise suspicion of a possible problem.
|
||||
@item :debug
|
||||
A report of information that may be useful if the user is currently
|
||||
debugging the Lisp program which issues the warning.
|
||||
A report of information that may be useful if you are debugging.
|
||||
@end table
|
||||
|
||||
When your program encounters invalid input data, it can either
|
||||
signal a Lisp error by calling @code{error} or @code{signal}
|
||||
(@pxref{Signaling Errors}) or report a warning with severity
|
||||
@code{:error}. Signaling a Lisp error is the easiest thing to do, but
|
||||
it means the signaling program cannot continue execution. If you want
|
||||
to take the trouble of implementing a way to continue processing
|
||||
despite the invalid data, then reporting a warning of severity
|
||||
@code{:error} is the right way of informing the user of the problem.
|
||||
For instance, the Emacs Lisp byte compiler can report an error that
|
||||
way and continue compiling other functions. (If the program signals a
|
||||
Lisp error and then handles it with @code{condition-case}, the user
|
||||
won't see the error message; reporting that as a warning instead
|
||||
avoids that problem.)
|
||||
signal a Lisp error by calling @code{error} or @code{signal} or report
|
||||
a warning with severity @code{:error}. Signaling a Lisp error is the
|
||||
easiest thing to do, but it means the program cannot continue
|
||||
processing. If you want to take the trouble to implement a way to
|
||||
continue processing despite the bad data, then reporting a warning of
|
||||
severity @code{:error} is the right way to inform the user of the
|
||||
problem. For instance, the Emacs Lisp byte compiler can report an
|
||||
error that way and continue compiling other functions. (If the
|
||||
program signals a Lisp error and then handles it with
|
||||
@code{condition-case}, the user won't see the error message; it could
|
||||
show the message to the user by reporting it as a warning.)
|
||||
|
||||
@c FIXME: Why use "(bytecomp)" instead of "'bytecomp" or simply
|
||||
@c "bytecomp" here? The parens are part of warning-type-format but
|
||||
@c not part of the warning type. --xfq
|
||||
@cindex warning type
|
||||
In addition to severity level, each warning has a @dfn{warning type}
|
||||
to classify it. The warning type is either a symbol or a list of
|
||||
symbols. If it is a symbol, it should be the custom group that you
|
||||
use for the program's user options; if it is a list, the first element
|
||||
of the list should be that custom group. For example, byte compiler
|
||||
warnings use the warning type @code{(bytecomp)}. If the warning type
|
||||
is a list, the elements of the list after the first one, which should
|
||||
be arbitrary symbols, represent subcategories of the warning: they
|
||||
will be displayed to the user to better explain the nature of the
|
||||
warning.
|
||||
Each warning has a @dfn{warning type} to classify it. The type is a
|
||||
list of symbols. The first symbol should be the custom group that you
|
||||
use for the program's user options. For example, byte compiler
|
||||
warnings use the warning type @code{(bytecomp)}. You can also
|
||||
subcategorize the warnings, if you wish, by using more symbols in the
|
||||
list.
|
||||
|
||||
@defun display-warning type message &optional level buffer-name
|
||||
This function reports a warning, using the string @var{message} as the
|
||||
warning text and @var{type} as the warning type. @var{level} should
|
||||
be the severity level, and defaults to @code{:warning} if omitted or
|
||||
@code{nil}.
|
||||
This function reports a warning, using @var{message} as the message
|
||||
and @var{type} as the warning type. @var{level} should be the
|
||||
severity level, with @code{:warning} being the default.
|
||||
|
||||
@var{buffer-name}, if non-@code{nil}, specifies the name of the buffer
|
||||
for logging the warning message. By default, it is @file{*Warnings*}.
|
||||
for logging the warning. By default, it is @file{*Warnings*}.
|
||||
@end defun
|
||||
|
||||
@defun lwarn type level message &rest args
|
||||
This function reports a warning using the value returned by
|
||||
@w{@code{(format-message @var{message} @var{args}@dots{})}} as the
|
||||
message text in the @file{*Warnings*} buffer. In other respects it is
|
||||
equivalent to @code{display-warning}.
|
||||
This function reports a warning using the value of @code{(format-message
|
||||
@var{message} @var{args}...)} as the message in the @file{*Warnings*}
|
||||
buffer. In other respects it is equivalent to @code{display-warning}.
|
||||
@end defun
|
||||
|
||||
@defun warn message &rest args
|
||||
This function reports a warning using the value returned by
|
||||
@w{@code{(format-message @var{message} @var{args}@dots{})}} as the
|
||||
message text, @code{emacs} as the warning type, and @code{:warning} as
|
||||
the severity level. It exists for compatibility only; we recommend
|
||||
not using it, because you should specify a specific warning type.
|
||||
This function reports a warning using the value of @code{(format-message
|
||||
@var{message} @var{args}...)} as the message, @code{(emacs)} as the
|
||||
type, and @code{:warning} as the severity level. It exists for
|
||||
compatibility only; we recommend not using it, because you should
|
||||
specify a specific warning type.
|
||||
@end defun
|
||||
|
||||
@node Warning Variables
|
||||
|
|
@ -848,16 +802,15 @@ This list defines the meaning and severity order of the warning
|
|||
severity levels. Each element defines one severity level,
|
||||
and they are arranged in order of decreasing severity.
|
||||
|
||||
Each element has the form @w{@code{(@var{level} @var{string}
|
||||
[@var{function}])}}, where @var{level} is the severity level it
|
||||
defines. @var{string} specifies the textual description of this
|
||||
level. @var{string} should use @samp{%s} to specify where to put the
|
||||
warning type information, or it can omit the @samp{%s} so as not to
|
||||
include that information.
|
||||
Each element has the form @code{(@var{level} @var{string}
|
||||
@var{function})}, where @var{level} is the severity level it defines.
|
||||
@var{string} specifies the textual description of this level.
|
||||
@var{string} should use @samp{%s} to specify where to put the warning
|
||||
type information, or it can omit the @samp{%s} so as not to include
|
||||
that information.
|
||||
|
||||
The optional @var{function}, if non-@code{nil}, is a function to call
|
||||
with no arguments, to get the user's attention. A notable example is
|
||||
@code{ding} (@pxref{Beeping}).
|
||||
with no arguments, to get the user's attention.
|
||||
|
||||
Normally you should not change the value of this variable.
|
||||
@end defvar
|
||||
|
|
@ -866,19 +819,18 @@ Normally you should not change the value of this variable.
|
|||
If non-@code{nil}, the value is a function to generate prefix text for
|
||||
warnings. Programs can bind the variable to a suitable function.
|
||||
@code{display-warning} calls this function with the warnings buffer
|
||||
the current buffer, and the function can insert text into it. That
|
||||
text becomes the beginning of the warning message.
|
||||
current, and the function can insert text in it. That text becomes
|
||||
the beginning of the warning message.
|
||||
|
||||
The function is called with two arguments, the severity level and its
|
||||
entry in @code{warning-levels}. It should return a list to use
|
||||
@emph{instead} of that entry (the value need not be an actual member
|
||||
of @code{warning-levels}, but it must have the same structure). By
|
||||
constructing this value, the function can change the severity of the
|
||||
warning, or specify different handling for a given severity level.
|
||||
entry in @code{warning-levels}. It should return a list to use as the
|
||||
entry (this value need not be an actual member of
|
||||
@code{warning-levels}). By constructing this value, the function can
|
||||
change the severity of the warning, or specify different handling for
|
||||
a given severity level.
|
||||
|
||||
If the variable's value is @code{nil}, there's no prefix text, before
|
||||
the warning is displayed, starting with the @var{string} part of the
|
||||
entry in @code{warning-levels} corresponding to the warning's level.
|
||||
If the variable's value is @code{nil} then there is no function
|
||||
to call.
|
||||
@end defvar
|
||||
|
||||
@defvar warning-series
|
||||
|
|
@ -886,18 +838,17 @@ Programs can bind this variable to @code{t} to say that the next
|
|||
warning should begin a series. When several warnings form a series,
|
||||
that means to leave point on the first warning of the series, rather
|
||||
than keep moving it for each warning so that it appears on the last one.
|
||||
The series ends when the local binding of this variable is unbound and
|
||||
The series ends when the local binding is unbound and
|
||||
@code{warning-series} becomes @code{nil} again.
|
||||
|
||||
The value can also be a symbol with a function definition. That is
|
||||
equivalent to @code{t}, except that the next warning will also call
|
||||
the function with no arguments with the warnings buffer the current
|
||||
buffer. The function can, for example, insert text which will serve
|
||||
as a header for the series of warnings.
|
||||
the function with no arguments with the warnings buffer current. The
|
||||
function can insert text which will serve as a header for the series
|
||||
of warnings.
|
||||
|
||||
Once a series has begun, the value of this variable is a marker which
|
||||
points to the buffer position in the warnings buffer of the start of
|
||||
the series.
|
||||
Once a series has begun, the value is a marker which points to the
|
||||
buffer position in the warnings buffer of the start of the series.
|
||||
|
||||
The variable's normal value is @code{nil}, which means to handle
|
||||
each warning separately.
|
||||
|
|
@ -905,7 +856,7 @@ each warning separately.
|
|||
|
||||
@defvar warning-fill-prefix
|
||||
When this variable is non-@code{nil}, it specifies a fill prefix to
|
||||
use for filling the text of each warning.
|
||||
use for filling each warning's text.
|
||||
@end defvar
|
||||
|
||||
@defvar warning-fill-column
|
||||
|
|
@ -914,11 +865,11 @@ The column at which to fill warnings.
|
|||
|
||||
@defvar warning-type-format
|
||||
This variable specifies the format for displaying the warning type
|
||||
in the warning text. The result of formatting the type this way
|
||||
in the warning message. The result of formatting the type this way
|
||||
gets included in the message under the control of the string in the
|
||||
entry in @code{warning-levels}. The default value is @code{" (%s)"}.
|
||||
If you bind it to the empty string @code{""} then the warning type
|
||||
won't appear at all.
|
||||
If you bind it to @code{""} then the warning type won't appear at
|
||||
all.
|
||||
@end defvar
|
||||
|
||||
@node Warning Options
|
||||
|
|
@ -930,71 +881,38 @@ when a Lisp program reports a warning.
|
|||
|
||||
@defopt warning-minimum-level
|
||||
This user option specifies the minimum severity level that should be
|
||||
shown immediately to the user, by popping the warnings buffer in some
|
||||
window. The default is @code{:warning}, which means to show the
|
||||
warning buffer for any warning severity except @code{:debug}. The
|
||||
warnings of lower severity levels will still be written into the
|
||||
warnings buffer, but the buffer will not be forced onto display.
|
||||
shown immediately to the user. The default is @code{:warning}, which
|
||||
means to immediately display all warnings except @code{:debug}
|
||||
warnings.
|
||||
@end defopt
|
||||
|
||||
@defopt warning-minimum-log-level
|
||||
This user option specifies the minimum severity level that should be
|
||||
logged in the warnings buffer. Warnings of lower severity will be
|
||||
completely ignored: not written to the warnings buffer and not
|
||||
displayed. The default is @code{:warning}, which means to log
|
||||
warnings of any severity except @code{:debug}.
|
||||
logged in the warnings buffer. The default is @code{:warning}, which
|
||||
means to log all warnings except @code{:debug} warnings.
|
||||
@end defopt
|
||||
|
||||
@defopt warning-suppress-types
|
||||
This list specifies which warning types should not be displayed
|
||||
immediately when they occur. Each element of the list should be a
|
||||
list of symbols. If an element of this list has the same elements as
|
||||
the first elements in a warning type, then the warning of that type
|
||||
will not be shown on display by popping the warnings buffer in some
|
||||
window (the warning will still be logged in the warnings buffer).
|
||||
|
||||
For example, if the value of this variable is a list like this:
|
||||
|
||||
@lisp
|
||||
((foo) (bar subtype))
|
||||
@end lisp
|
||||
|
||||
@noindent
|
||||
then warnings whose types are @code{foo} or @code{(foo)} or
|
||||
@w{@code{(foo something)}} or @w{@code{(bar subtype other)}} will not
|
||||
be shown to the user.
|
||||
immediately for the user. Each element of the list should be a list
|
||||
of symbols. If its elements match the first elements in a warning
|
||||
type, then that warning is not displayed immediately.
|
||||
@end defopt
|
||||
|
||||
@defopt warning-suppress-log-types
|
||||
This list specifies which warning types should be ignored: not logged
|
||||
in the warnings buffer and not shown to the user. The structure and
|
||||
the matching of warning types are the same as for
|
||||
@code{warning-suppress-types} above.
|
||||
This list specifies which warning types should not be logged in the
|
||||
warnings buffer. Each element of the list should be a list of
|
||||
symbols. If it matches the first few elements in a warning type, then
|
||||
that warning is not logged.
|
||||
@end defopt
|
||||
|
||||
@cindex warnings, suppressing during startup
|
||||
@cindex prevent warnings in init files
|
||||
During startup, Emacs delays showing any warnings until after it
|
||||
loads and processes the site-wide and user's init files
|
||||
(@pxref{Startup Summary}). Let-binding (@pxref{Local Variables}) the
|
||||
values of these options around some code in your init files which
|
||||
might emit a warning will therefore not work, because it will not be
|
||||
in effect by the time the warning is actually processed. Thus, if you
|
||||
want to suppress some warnings during startup, change the values of
|
||||
the above options in your init file early enough, or put those
|
||||
let-binding forms in your @code{after-init-hook} or
|
||||
@code{emacs-startup-hook} functions. @xref{Init File}.
|
||||
|
||||
@node Delayed Warnings
|
||||
@subsection Delayed Warnings
|
||||
@cindex delayed warnings
|
||||
@cindex warnings, delayed
|
||||
|
||||
Sometimes, you may wish to avoid showing a warning while a command is
|
||||
running, and only show it only after the end of the command. You can
|
||||
use the function @code{delay-warning} for this. Emacs automatically
|
||||
delays any warnings emitted during the early stages of startup, and
|
||||
shows them only after the init files are processed.
|
||||
use the function @code{delay-warning} for this.
|
||||
|
||||
@defun delay-warning type message &optional level buffer-name
|
||||
This function is the delayed counterpart to @code{display-warning}
|
||||
|
|
@ -1015,7 +933,7 @@ with the same form, and the same meanings, as the argument list of
|
|||
@code{display-warning}. Immediately after running
|
||||
@code{post-command-hook} (@pxref{Command Overview}), the Emacs
|
||||
command loop displays all the warnings specified by this variable,
|
||||
then resets the variable to @code{nil}.
|
||||
then resets it to @code{nil}.
|
||||
@end defvar
|
||||
|
||||
Programs which need to further customize the delayed warnings
|
||||
|
|
@ -1024,9 +942,7 @@ mechanism can change the variable @code{delayed-warnings-hook}:
|
|||
@defvar delayed-warnings-hook
|
||||
This is a normal hook which is run by the Emacs command loop, after
|
||||
@code{post-command-hook}, in order to process and display delayed
|
||||
warnings. Emacs also runs this hook during startup, after loading the
|
||||
site-start and user init files (@pxref{Startup Summary}), because
|
||||
warnings emitted before that are automatically delayed.
|
||||
warnings.
|
||||
|
||||
Its default value is a list of two functions:
|
||||
|
||||
|
|
@ -6920,7 +6836,7 @@ This function puts image @var{image} in front of @var{pos} in the
|
|||
current buffer. The argument @var{pos} should be an integer or a
|
||||
marker. It specifies the buffer position where the image should appear.
|
||||
The argument @var{string} specifies the text that should hold the image
|
||||
as an alternative to the default @samp{x}.
|
||||
as an alternative to the default.
|
||||
|
||||
The argument @var{image} must be an image descriptor, perhaps returned
|
||||
by @code{create-image} or stored by @code{defimage}.
|
||||
|
|
@ -6933,7 +6849,7 @@ buffer's text.
|
|||
|
||||
Internally, this function creates an overlay, and gives it a
|
||||
@code{before-string} property containing text that has a @code{display}
|
||||
property whose value is the image. (Whew! that was a mouthful@dots{})
|
||||
property whose value is the image. (Whew!)
|
||||
@end defun
|
||||
|
||||
@defun remove-images start end &optional buffer
|
||||
|
|
@ -6980,47 +6896,41 @@ This function returns @code{t} if point is on an image, and @code{nil}
|
|||
otherwise.
|
||||
@end defun
|
||||
|
||||
@cindex operations on images
|
||||
Images inserted with the insertion functions above also get a local
|
||||
keymap installed in the text properties (or overlays) that span the
|
||||
displayed image. This keymap defines the following commands:
|
||||
|
||||
@table @kbd
|
||||
@findex image-increase-size
|
||||
@item i +
|
||||
Increase the image size (@code{image-increase-size})
|
||||
Increase the image size (@code{image-increase-size}). A prefix value
|
||||
of @samp{4} means to increase the size by 40%. The default is 20%.
|
||||
|
||||
@findex image-decrease-size
|
||||
@item i -
|
||||
Decrease the image size (@code{image-decrease-size}).
|
||||
Decrease the image size (@code{image-increase-size}). A prefix value
|
||||
of @samp{4} means to decrease the size by 40%. The default is 20%.
|
||||
|
||||
@findex image-rotate
|
||||
@item i r
|
||||
Rotate the image (@code{image-rotate}).
|
||||
Rotate the image by 90 degrees clockwise (@code{image-rotate}).
|
||||
A prefix means to rotate by 90 degrees counter-clockwise instead.
|
||||
|
||||
@findex image-flip-horizontally
|
||||
@item i h
|
||||
Flip the image horizontally (@code{image-flip-horizontally}).
|
||||
|
||||
@findex image-flip-vertically
|
||||
@item i v
|
||||
Flip the image vertically (@code{image-flip-vertically}).
|
||||
|
||||
@findex image-save
|
||||
@item i o
|
||||
Save the image to a file (@code{image-save}).
|
||||
|
||||
@findex image-crop
|
||||
@item i c
|
||||
Interactively crop the image (@code{image-crop}).
|
||||
Crop the image interactively (@code{image-crop}).
|
||||
|
||||
@findex image-cut
|
||||
@item i x
|
||||
Interactively cut a rectangle from the image (@code{image-cut}).
|
||||
Cut a rectangle from the image interactively (@code{image-cut}).
|
||||
@end table
|
||||
|
||||
@xref{Image Mode,,, emacs, The GNU Emacs Manual}, for more details
|
||||
about these image-specific key bindings.
|
||||
The size and rotation commands are ``repeating'', which means that you
|
||||
can continue adjusting the image without using the @kbd{i} prefix.
|
||||
|
||||
@node Multi-Frame Images
|
||||
@subsection Multi-Frame Images
|
||||
|
|
|
|||
|
|
@ -252,8 +252,11 @@ the original symbol. If the contents are another symbol, this
|
|||
process, called @dfn{symbol function indirection}, is repeated until
|
||||
it obtains a non-symbol. @xref{Function Names}, for more information
|
||||
about symbol function indirection.
|
||||
We eventually obtain a non-symbol, which ought to be a function or
|
||||
other suitable object.
|
||||
|
||||
One possible consequence of this process is an infinite loop, in the
|
||||
event that a symbol's function cell refers to the same symbol.
|
||||
Otherwise, we eventually obtain a non-symbol, which ought to be a
|
||||
function or other suitable object.
|
||||
|
||||
@kindex invalid-function
|
||||
More precisely, we should now have a Lisp function (a lambda
|
||||
|
|
@ -329,17 +332,19 @@ or just
|
|||
The built-in function @code{indirect-function} provides an easy way to
|
||||
perform symbol function indirection explicitly.
|
||||
|
||||
@defun indirect-function function
|
||||
@defun indirect-function function &optional noerror
|
||||
@anchor{Definition of indirect-function}
|
||||
This function returns the meaning of @var{function} as a function. If
|
||||
@var{function} is a symbol, then it finds @var{function}'s function
|
||||
definition and starts over with that value. If @var{function} is not a
|
||||
symbol, then it returns @var{function} itself.
|
||||
|
||||
This function returns @code{nil} if the final symbol is unbound.
|
||||
This function returns @code{nil} if the final symbol is unbound. It
|
||||
signals a @code{cyclic-function-indirection} error if there is a loop
|
||||
in the chain of symbols.
|
||||
|
||||
There is also a second, optional argument that is obsolete and has no
|
||||
effect.
|
||||
The optional argument @var{noerror} is obsolete, kept for backward
|
||||
compatibility, and has no effect.
|
||||
|
||||
Here is how you could define @code{indirect-function} in Lisp:
|
||||
|
||||
|
|
|
|||
|
|
@ -692,9 +692,11 @@ files that the user does not need to know about.
|
|||
|
||||
@defvar write-region-inhibit-fsync
|
||||
If this variable's value is @code{nil}, @code{write-region} uses the
|
||||
@code{fsync} system call after writing a file. If the value is
|
||||
@code{t}, Emacs does not use @code{fsync}. The default value is
|
||||
@code{t}. @xref{Files and Storage}.
|
||||
@code{fsync} system call after writing a file. Although this slows
|
||||
Emacs down, it lessens the risk of data loss after power failure. If
|
||||
the value is @code{t}, Emacs does not use @code{fsync}. The default
|
||||
value is @code{nil} when Emacs is interactive, and @code{t} when Emacs
|
||||
runs in batch mode. @xref{Files and Storage}.
|
||||
@end defvar
|
||||
|
||||
@defmac with-temp-file file body@dots{}
|
||||
|
|
@ -1877,11 +1879,6 @@ no prefix argument is given, and @code{nil} otherwise.
|
|||
See also @code{delete-directory} in @ref{Create/Delete Dirs}.
|
||||
@end deffn
|
||||
|
||||
@defopt remote-file-name-inhibit-delete-by-moving-to-trash
|
||||
If this variable is non-@code{nil}, remote files are never moved to
|
||||
the Trash. They are deleted instead.
|
||||
@end defopt
|
||||
|
||||
@cindex file permissions, setting
|
||||
@cindex permissions, file
|
||||
@cindex file modes, setting
|
||||
|
|
@ -2051,28 +2048,17 @@ data already stored elsewhere on secondary storage until one file or
|
|||
the other is later modified; this will lose both files if the only
|
||||
copy on secondary storage is lost due to media failure. Second, the
|
||||
operating system might not write data to secondary storage
|
||||
immediately, which will lose the data if power is lost
|
||||
or if there is a media failure.
|
||||
immediately, which will lose the data if power is lost.
|
||||
|
||||
@findex write-region
|
||||
Although both sorts of failures can largely be avoided by a suitably
|
||||
configured system, such systems are typically more expensive or
|
||||
less efficient. In lower-end systems, to survive media failure you
|
||||
configured file system, such systems are typically more expensive or
|
||||
less efficient. In more-typical systems, to survive media failure you
|
||||
can copy the file to a different device, and to survive a power
|
||||
failure (or be immediately notified of a media failure) you can use
|
||||
the @code{write-region} function with the
|
||||
failure you can use the @code{write-region} function with the
|
||||
@code{write-region-inhibit-fsync} variable set to @code{nil}.
|
||||
Although this variable is ordinarily @code{t} because that can
|
||||
significantly improve performance, it may make sense to temporarily
|
||||
bind it to @code{nil} if using Emacs to implement database-like
|
||||
transactions that survive power failure on lower-end systems.
|
||||
@xref{Writing to Files}.
|
||||
|
||||
On some platforms when Emacs changes a file other processes might not
|
||||
be notified of the change immediately. Setting
|
||||
@code{write-region-inhibit-fsync} to @code{nil} may improve
|
||||
notification speed in this case, though there are no guarantees.
|
||||
|
||||
@node File Names
|
||||
@section File Names
|
||||
@cindex file names
|
||||
|
|
@ -3390,7 +3376,7 @@ first, before handlers for jobs such as remote file access.
|
|||
@code{file-directory-p},
|
||||
@code{file-equal-p},
|
||||
@code{file-executable-p}, @code{file-exists-p},
|
||||
@code{file-group-gid}, @code{file-in-directory-p},
|
||||
@code{file-in-directory-p},
|
||||
@code{file-local-copy}, @code{file-locked-p},
|
||||
@code{file-modes}, @code{file-name-all-completions},
|
||||
@code{file-name-as-directory},
|
||||
|
|
@ -3405,8 +3391,7 @@ first, before handlers for jobs such as remote file access.
|
|||
@code{file-readable-p}, @code{file-regular-p},
|
||||
@code{file-remote-p}, @code{file-selinux-context},
|
||||
@code{file-symlink-p}, @code{file-system-info},
|
||||
@code{file-truename}, @code{file-user-uid},
|
||||
@code{file-writable-p},
|
||||
@code{file-truename}, @code{file-writable-p},
|
||||
@code{find-backup-file-name},@*
|
||||
@code{get-file-buffer},
|
||||
@code{insert-directory},
|
||||
|
|
@ -3452,7 +3437,7 @@ first, before handlers for jobs such as remote file access.
|
|||
@code{file-direc@discretionary{}{}{}tory-p},
|
||||
@code{file-equal-p},
|
||||
@code{file-executable-p}, @code{file-exists-p},
|
||||
@code{file-group-gid}, @code{file-in-directory-p},
|
||||
@code{file-in-directory-p},
|
||||
@code{file-local-copy}, @code{file-locked-p},
|
||||
@code{file-modes}, @code{file-name-all-completions},
|
||||
@code{file-name-as-directory},
|
||||
|
|
@ -3467,8 +3452,7 @@ first, before handlers for jobs such as remote file access.
|
|||
@code{file-readable-p}, @code{file-regular-p},
|
||||
@code{file-remote-p}, @code{file-selinux-context},
|
||||
@code{file-symlink-p}, @code{file-system-info},
|
||||
@code{file-truename}, @code{file-user-uid},
|
||||
@code{file-writable-p},
|
||||
@code{file-truename}, @code{file-writable-p},
|
||||
@code{find-backup-file-name},
|
||||
@code{get-file-buffer},
|
||||
@code{insert-directory},
|
||||
|
|
|
|||
|
|
@ -3577,7 +3577,7 @@ the mouse position list will be @code{nil} if the value is
|
|||
@code{drag-source}. This is useful to determine if a frame is not
|
||||
directly visible underneath the mouse pointer.
|
||||
|
||||
The @code{track-mouse} macro causes Emacs to generate mouse motion
|
||||
The @code{track-mouse} form causes Emacs to generate mouse motion
|
||||
events by binding the variable @code{track-mouse} to a
|
||||
non-@code{nil} value. If that variable has the special value
|
||||
@code{dragging}, it additionally instructs the display engine to
|
||||
|
|
@ -4112,7 +4112,7 @@ has the same meaning as the @var{action} argument to
|
|||
Emacs implements receiving text and URLs individually for each
|
||||
window system, and does not by default support receiving other kinds
|
||||
of data as drops. To support receiving other kinds of data, use the
|
||||
X-specific interface described below.
|
||||
X-specific interface described below:
|
||||
|
||||
@vindex x-dnd-test-function
|
||||
@vindex x-dnd-known-types
|
||||
|
|
@ -4141,71 +4141,29 @@ depending on the specific drag-and-drop protocol being used. For
|
|||
example, the data type used for plain text may be either
|
||||
@code{"STRING"} or @code{"text/plain"}.
|
||||
|
||||
@cindex XDS
|
||||
@cindex direct save protocol
|
||||
@vindex x-dnd-direct-save-function
|
||||
When Emacs runs on X window system, it supports the X Direct Save
|
||||
(@acronym{XDS}) protocol, which allows users to save a file by
|
||||
dragging and dropping it onto an Emacs window, such as a Dired window.
|
||||
To comply with the unique requirements of @acronym{XDS}, these
|
||||
drag-and-drop requests are processed specially: instead of being
|
||||
handled according to @code{x-dnd-types-alist}, they are handled by the
|
||||
@dfn{direct-save function} that is the value of the variable
|
||||
@code{x-dnd-direct-save-function}. The value should be a function of
|
||||
two arguments, @var{need-name} and @var{filename}. The @acronym{XDS}
|
||||
protocol uses a two-step procedure for dragging files:
|
||||
|
||||
@enumerate 1
|
||||
@item
|
||||
The application from which the file is dragged asks Emacs to provide
|
||||
the full file name under which to save the file. For this purpose,
|
||||
the direct-save function is called with its first argument
|
||||
@var{need-name} non-@code{nil}, and the second argument @var{filename}
|
||||
set to the basename of the file to be saved. It should return the
|
||||
fully-expanded absolute file name under which to save the file. For
|
||||
example, if a file is dragged to a Dired window, the natural directory
|
||||
for the file is the directory of the file shown at location of the
|
||||
drop. If saving the file is not possible for some reason, the
|
||||
function should return @code{nil}, which will cancel the drag-and-drop
|
||||
operation.
|
||||
|
||||
@item
|
||||
The application from which the file is dragged saves the file under
|
||||
the name returned by the first call to the direct-save function. If
|
||||
it succeeds in saving the file, the direct-save function is called
|
||||
again, this time with the first argument @var{need-name} set to
|
||||
@code{nil} and the second argument @var{filename} set to the full
|
||||
absolute name of the saved file. The function is then expected to do
|
||||
whatever is needed given the fact that file was saved. For example,
|
||||
Dired should update the directory on display by showing the new file
|
||||
there.
|
||||
@end enumerate
|
||||
|
||||
The default value of @code{x-dnd-direct-save-function} is
|
||||
@code{x-dnd-save-direct}.
|
||||
|
||||
@defun x-dnd-save-direct need-name filename
|
||||
When called with the @var{need-name} argument non-@code{nil}, this
|
||||
function prompts the user for the absolute file name under which it
|
||||
should be saved. If the specified file already exists, it
|
||||
additionally asks the user whether to overwrite it, and returns the
|
||||
absolute file name only if the user confirms the overwriting.
|
||||
|
||||
When called with the @var{need-name} argument @code{nil}, it reverts
|
||||
the Dired listing if the current buffer is in Dired mode or one of its
|
||||
descendants, and otherwise visits the file by calling @code{find-file}
|
||||
(@pxref{Visiting Functions}).
|
||||
@end defun
|
||||
|
||||
@defun x-dnd-save-direct-immediately need-name filename
|
||||
This function works like @code{x-dnd-save-direct}, but when called
|
||||
with its @var{need-name} argument non-@code{nil}, it doesn't prompt
|
||||
the user for the full name of the file to be saved; instead, it
|
||||
returns its argument @var{filename} expanded against the current
|
||||
buffer's default directory (@pxref{File Name Expansion}). (It still
|
||||
asks for confirmation if a file by that name already exists in the
|
||||
default directory.)
|
||||
@end defun
|
||||
@c FIXME: This description is overly-complicated and confusing. In
|
||||
@c particular, the two calls to the function basically sound
|
||||
@c identical, so it is unclear how should the function distinguish
|
||||
@c between the first and the second one. The description of who asks
|
||||
@c whom to do what is also very hard to understand. Needs rewording,
|
||||
@c and needs shorter sentences. Perhaps examples could help.
|
||||
However, @code{x-dnd-types-alist} does not handle a special kind of
|
||||
drop sent by a program that wants Emacs to tell it where to save a
|
||||
file in a specific location determined by the user. These drops are
|
||||
instead handled by a function that is the value of the variable
|
||||
@code{x-dnd-direct-save-function}. This function should accept two arguments.
|
||||
If the first argument is non-@code{nil}, then the second argument is a
|
||||
file name to save (with leading directories) that the other
|
||||
program recommends, and the
|
||||
function should return the full file name under which it should be
|
||||
saved. After the function completes, Emacs will ask the other program
|
||||
to save the file under the name that was returned, and if the file was
|
||||
successfully saved, call the function again with the first argument
|
||||
set to a non-@code{nil} value and the second argument set to the file
|
||||
name that was returned. The function should then perform whatever
|
||||
action is appropriate (i.e., opening the file or refreshing a
|
||||
directory listing.)
|
||||
|
||||
@cindex initiating drag-and-drop
|
||||
On capable window systems, Emacs also supports dragging contents
|
||||
|
|
|
|||
|
|
@ -593,8 +593,8 @@ symbol a function definition, its function cell is said to be
|
|||
In practice, nearly all functions have names, and are referred to by
|
||||
their names. You can create a named Lisp function by defining a
|
||||
lambda expression and putting it in a function cell (@pxref{Function
|
||||
Cells}). However, it is more common to use the @code{defun} macro,
|
||||
described in the next section.
|
||||
Cells}). However, it is more common to use the @code{defun} special
|
||||
form, described in the next section.
|
||||
@ifnottex
|
||||
@xref{Defining Functions}.
|
||||
@end ifnottex
|
||||
|
|
@ -737,12 +737,9 @@ explicitly in the source file being loaded. This is because
|
|||
By contrast, in programs that manipulate function definitions for other
|
||||
purposes, it is better to use @code{fset}, which does not keep such
|
||||
records. @xref{Function Cells}.
|
||||
|
||||
If the resulting function definition chain would be circular, then
|
||||
Emacs will signal a @code{cyclic-function-indirection} error.
|
||||
@end defun
|
||||
|
||||
@defun function-alias-p object
|
||||
@defun function-alias-p object &optional noerror
|
||||
Checks whether @var{object} is a function alias. If it is, it returns
|
||||
a list of symbols representing the function alias chain, else
|
||||
@code{nil}. For instance, if @code{a} is an alias for @code{b}, and
|
||||
|
|
@ -753,8 +750,9 @@ a list of symbols representing the function alias chain, else
|
|||
@result{} (b c)
|
||||
@end example
|
||||
|
||||
There is also a second, optional argument that is obsolete and has no
|
||||
effect.
|
||||
If there's a loop in the definitions, an error will be signaled. If
|
||||
@var{noerror} is non-@code{nil}, the non-looping parts of the chain is
|
||||
returned instead.
|
||||
@end defun
|
||||
|
||||
You cannot create a new primitive function with @code{defun} or
|
||||
|
|
@ -1541,9 +1539,6 @@ is not a function, e.g., a keyboard macro (@pxref{Keyboard Macros}):
|
|||
If you wish to use @code{fset} to make an alternate name for a
|
||||
function, consider using @code{defalias} instead. @xref{Definition of
|
||||
defalias}.
|
||||
|
||||
If the resulting function definition chain would be circular, then
|
||||
Emacs will signal a @code{cyclic-function-indirection} error.
|
||||
@end defun
|
||||
|
||||
@node Closures
|
||||
|
|
@ -2631,12 +2626,6 @@ so the byte compiler can ignore calls whose value is ignored. This is
|
|||
the same as the @code{side-effect-free} property of the function's
|
||||
symbol, @pxref{Standard Properties}.
|
||||
|
||||
@item (important-return-value @var{val})
|
||||
If @var{val} is non-@code{nil}, the byte compiler will warn about
|
||||
calls to this function that do not use the returned value. This is the
|
||||
same as the @code{important-return-value} property of the function's
|
||||
symbol, @pxref{Standard Properties}.
|
||||
|
||||
@item (speed @var{n})
|
||||
Specify the value of @code{native-comp-speed} in effect for native
|
||||
compilation of this function (@pxref{Native-Compilation Variables}).
|
||||
|
|
@ -2699,14 +2688,13 @@ byte compiler can check that the calls match the declaration.
|
|||
Tell the byte compiler to assume that @var{function} is defined in the
|
||||
file @var{file}. The optional third argument @var{arglist} is either
|
||||
@code{t}, meaning the argument list is unspecified, or a list of
|
||||
formal parameters in the same style as @code{defun} (including the
|
||||
parentheses). An omitted @var{arglist} defaults to @code{t}, not
|
||||
@code{nil}; this is atypical behavior for omitted arguments, and it
|
||||
means that to supply a fourth but not third argument one must specify
|
||||
@code{t} for the third-argument placeholder instead of the usual
|
||||
@code{nil}. The optional fourth argument @var{fileonly}
|
||||
non-@code{nil} means check only that @var{file} exists, not that it
|
||||
actually defines @var{function}.
|
||||
formal parameters in the same style as @code{defun}. An omitted
|
||||
@var{arglist} defaults to @code{t}, not @code{nil}; this is atypical
|
||||
behavior for omitted arguments, and it means that to supply a fourth
|
||||
but not third argument one must specify @code{t} for the third-argument
|
||||
placeholder instead of the usual @code{nil}. The optional fourth
|
||||
argument @var{fileonly} non-@code{nil} means check only that
|
||||
@var{file} exists, not that it actually defines @var{function}.
|
||||
@end defmac
|
||||
|
||||
@findex check-declare-file
|
||||
|
|
|
|||
|
|
@ -989,29 +989,3 @@ in the function group to insert the function into.
|
|||
If @var{group} doesn't exist, it will be created. If @var{section}
|
||||
doesn't exist, it will be added to the end of the function group.
|
||||
@end defun
|
||||
|
||||
You can also query the examples of use of functions defined in
|
||||
shortdoc groups.
|
||||
|
||||
@defun shortdoc-function-examples function
|
||||
This function returns all shortdoc examples for @var{function}. The
|
||||
return value is an alist with items of the form
|
||||
@w{@code{(@var{group} . @var{examples})}}, where @var{group} is a
|
||||
documentation group where @var{function} appears, and @var{examples}
|
||||
is a string with the examples of @var{function}s use as defined in
|
||||
@var{group}.
|
||||
|
||||
@code{shortdoc-function-examples} returns @code{nil} if @var{function}
|
||||
is not a function or if it doesn't have any shortdoc examples.
|
||||
@end defun
|
||||
|
||||
@vindex help-fns-describe-function-functions
|
||||
@defun shortdoc-help-fns-examples-function function
|
||||
This function queries the registered shortdoc groups and inserts
|
||||
examples of use of a given Emacs Lisp @var{function} into the current
|
||||
buffer. It is suitable for addition to the
|
||||
@code{help-fns-describe-function-functions} hook, in which case
|
||||
examples from shortdoc of using a function will be displayed in the
|
||||
@file{*Help*} buffer when the documentation of the function is
|
||||
requested.
|
||||
@end defun
|
||||
|
|
|
|||
|
|
@ -735,15 +735,14 @@ Emacs session.
|
|||
@section C Dialect
|
||||
@cindex C programming language
|
||||
|
||||
The C part of Emacs is portable to C99 or later: later C features such
|
||||
as @samp{<stdckdint.h>} and @samp{[[noreturn]]} are not used without a check,
|
||||
The C part of Emacs is portable to C99 or later: C11-specific features such
|
||||
as @samp{<stdalign.h>} and @samp{_Noreturn} are not used without a check,
|
||||
typically at configuration time, and the Emacs build procedure
|
||||
provides a substitute implementation if necessary. Some later features,
|
||||
provides a substitute implementation if necessary. Some C11 features,
|
||||
such as anonymous structures and unions, are too difficult to emulate,
|
||||
so they are avoided entirely.
|
||||
|
||||
At some point in the future the base C dialect will no doubt change to
|
||||
something later than C99.
|
||||
At some point in the future the base C dialect will no doubt change to C11.
|
||||
|
||||
@node Writing Emacs Primitives
|
||||
@section Writing Emacs Primitives
|
||||
|
|
@ -898,17 +897,15 @@ Currently, only the following attributes are recognized:
|
|||
@table @code
|
||||
@item noreturn
|
||||
Declares the C function as one that never returns. This corresponds
|
||||
to C23's @code{[[noreturn]]}, to C11's @code{_Noreturn}, and to GCC's
|
||||
@w{@code{__attribute__ ((__noreturn__))}} (@pxref{Function
|
||||
Attributes,,, gcc, Using the GNU Compiler Collection}). (Internally,
|
||||
Emacs's own C code uses @code{_Noreturn} as it can be defined as a
|
||||
macro on C platforms that do not support it.)
|
||||
to the C11 keyword @code{_Noreturn} and to @w{@code{__attribute__
|
||||
((__noreturn__))}} attribute of GCC (@pxref{Function Attributes,,,
|
||||
gcc, Using the GNU Compiler Collection}).
|
||||
|
||||
@item const
|
||||
Declares that the function does not examine any values except its
|
||||
arguments, and has no effects except the return value. This
|
||||
corresponds to C23's @code{[[unsequenced]]} and to GCC's
|
||||
@w{@code{__attribute__ ((__const__))}}.
|
||||
corresponds to @w{@code{__attribute__ ((__const__))}} attribute of
|
||||
GCC.
|
||||
|
||||
@item noinline
|
||||
This corresponds to @w{@code{__attribute__ ((__noinline__))}}
|
||||
|
|
|
|||
|
|
@ -768,8 +768,8 @@ prefix definition, and then by those from the global map.
|
|||
In the following example, we make @kbd{C-p} a prefix key in the local
|
||||
keymap, in such a way that @kbd{C-p} is identical to @kbd{C-x}. Then
|
||||
the binding for @kbd{C-p C-f} is the function @code{find-file}, just
|
||||
like @kbd{C-x C-f}. By contrast, the key sequence @kbd{C-p 9} is not
|
||||
found in any active keymap.
|
||||
like @kbd{C-x C-f}. The key sequence @kbd{C-p 6} is not found in any
|
||||
active keymap.
|
||||
|
||||
@example
|
||||
@group
|
||||
|
|
@ -778,14 +778,15 @@ found in any active keymap.
|
|||
@end group
|
||||
@group
|
||||
(keymap-local-set "C-p" ctl-x-map)
|
||||
@result{} (keymap #^[nil nil keymap @dots{}
|
||||
@result{} nil
|
||||
@end group
|
||||
@group
|
||||
(keymap-lookup nil "C-p C-f")
|
||||
(keymap-binding "C-p C-f")
|
||||
@result{} find-file
|
||||
@end group
|
||||
|
||||
@group
|
||||
(keymap-lookup nil "C-p 9")
|
||||
(keymap-binding "C-p 6")
|
||||
@result{} nil
|
||||
@end group
|
||||
@end example
|
||||
|
|
@ -882,7 +883,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{keymap-lookup} (@pxref{Functions for Key Lookup, keymap-lookup}).
|
||||
@code{keymap-binding}.
|
||||
@end defun
|
||||
|
||||
@node Searching Keymaps
|
||||
|
|
@ -1307,11 +1308,7 @@ the second example.
|
|||
@end group
|
||||
@end example
|
||||
|
||||
The @var{keymap} argument can be @code{nil}, meaning to look up
|
||||
@var{key} in the current keymaps (as returned by
|
||||
@code{current-active-maps}, @pxref{Active Keymaps}); or it can be a
|
||||
keymap or a list of keymaps, meaning to look up @var{key} only in the
|
||||
specified keymaps.
|
||||
The @var{keymap} argument can also be a list of keymaps.
|
||||
|
||||
Unlike @code{read-key-sequence}, this function does not modify the
|
||||
specified events in ways that discard information (@pxref{Key Sequence
|
||||
|
|
|
|||
|
|
@ -705,7 +705,7 @@ same way.
|
|||
Normally, when @var{tree} is anything other than a cons cell,
|
||||
@code{copy-tree} simply returns @var{tree}. However, if @var{vecp} is
|
||||
non-@code{nil}, it copies vectors too (and operates recursively on
|
||||
their elements). This function cannot cope with circular lists.
|
||||
their elements).
|
||||
@end defun
|
||||
|
||||
@defun flatten-tree tree
|
||||
|
|
@ -1224,15 +1224,7 @@ x
|
|||
@end example
|
||||
|
||||
However, the other arguments (all but the last) should be mutable
|
||||
lists. They can be dotted lists, whose last @sc{cdr}s are then
|
||||
replaced with the next argument:
|
||||
|
||||
@example
|
||||
@group
|
||||
(nconc (cons 1 2) (cons 3 (cons 4 5)) 'z)
|
||||
@result{} (1 3 4 . z)
|
||||
@end group
|
||||
@end example
|
||||
lists.
|
||||
|
||||
A common pitfall is to use a constant list as a non-last argument to
|
||||
@code{nconc}. If you do this, the resulting behavior is undefined
|
||||
|
|
|
|||
|
|
@ -1338,7 +1338,7 @@ specified @var{file} and perform the necessary initialization of the
|
|||
module. This is the primitive which makes sure the module exports the
|
||||
@code{plugin_is_GPL_compatible} symbol, calls the module's
|
||||
@code{emacs_module_init} function, and signals an error if that
|
||||
function returns an error indication, or if the user typed @kbd{C-g}
|
||||
function returns an error indication, or if the use typed @kbd{C-g}
|
||||
during the initialization. If the initialization succeeds,
|
||||
@code{module-load} returns @code{t}. Note that @var{file} must
|
||||
already have the proper file-name extension, as this function doesn't
|
||||
|
|
|
|||
|
|
@ -2233,12 +2233,10 @@ minibuffer. It returns @code{t} if the user enters @samp{yes},
|
|||
@code{nil} if the user types @samp{no}. The user must type @key{RET} to
|
||||
finalize the response. Upper and lower case are equivalent.
|
||||
|
||||
@vindex yes-or-no-prompt
|
||||
@code{yes-or-no-p} starts by displaying @var{prompt} in the
|
||||
minibuffer, followed by the value of @code{yes-or-no-prompt} @w{(default
|
||||
@samp{(yes or no) })}. The user must type one of the expected
|
||||
responses; otherwise, the function responds @w{@samp{Please answer yes or
|
||||
no.}}, waits about two seconds and repeats the request.
|
||||
@code{yes-or-no-p} starts by displaying @var{prompt} in the minibuffer,
|
||||
followed by @w{@samp{(yes or no) }}. The user must type one of the
|
||||
expected responses; otherwise, the function responds @samp{Please answer
|
||||
yes or no.}, waits about two seconds and repeats the request.
|
||||
|
||||
@code{yes-or-no-p} requires more work from the user than
|
||||
@code{y-or-n-p} and is appropriate for more crucial decisions.
|
||||
|
|
|
|||
|
|
@ -2398,7 +2398,6 @@ specifies addition of text properties.
|
|||
|
||||
@node %-Constructs
|
||||
@subsection @code{%}-Constructs in the Mode Line
|
||||
@cindex @code{%}-constructs in the mode line
|
||||
|
||||
Strings used as mode line constructs can use certain
|
||||
@code{%}-constructs to substitute various kinds of data. The
|
||||
|
|
@ -2489,9 +2488,6 @@ The mnemonics of keyboard, terminal, and buffer coding systems.
|
|||
@item %Z
|
||||
Like @samp{%z}, but including the end-of-line format.
|
||||
|
||||
@item %&
|
||||
@samp{*} if the buffer is modified, and @samp{-} otherwise.
|
||||
|
||||
@item %*
|
||||
@samp{%} if the buffer is read only (see @code{buffer-read-only}); @*
|
||||
@samp{*} if the buffer is modified (see @code{buffer-modified-p}); @*
|
||||
|
|
@ -2503,6 +2499,9 @@ Like @samp{%z}, but including the end-of-line format.
|
|||
@samp{-} otherwise. This differs from @samp{%*} only for a modified
|
||||
read-only buffer. @xref{Buffer Modification}.
|
||||
|
||||
@item %&
|
||||
@samp{*} if the buffer is modified, and @samp{-} otherwise.
|
||||
|
||||
@item %@@
|
||||
@samp{@@} if the buffer's @code{default-directory} (@pxref{File Name
|
||||
Expansion}) is on a remote machine, and @samp{-} otherwise.
|
||||
|
|
@ -4155,7 +4154,7 @@ Other keywords are optional:
|
|||
@end multitable
|
||||
|
||||
Lisp programs mark patterns in @var{query} with capture names (names
|
||||
that start with @code{@@}), and tree-sitter will return matched nodes
|
||||
that starts with @code{@@}), and tree-sitter will return matched nodes
|
||||
tagged with those same capture names. For the purpose of
|
||||
fontification, capture names in @var{query} should be face names like
|
||||
@code{font-lock-keyword-face}. The captured node will be fontified
|
||||
|
|
|
|||
|
|
@ -219,25 +219,17 @@ creates huge integers.
|
|||
|
||||
@cindex @acronym{IEEE} floating point
|
||||
Floating-point numbers are useful for representing numbers that are
|
||||
not integral. The range of floating-point numbers is the same as the
|
||||
range of the C data type @code{double} on the machine you are using.
|
||||
On almost all computers supported by Emacs, this is @acronym{IEEE}
|
||||
binary64 floating point format, which is standardized by
|
||||
@url{https://standards.ieee.org/standard/754-2019.html,,IEEE Std
|
||||
754-2019} and is discussed further in David Goldberg's paper
|
||||
not integral. The range of floating-point numbers is
|
||||
the same as the range of the C data type @code{double} on the machine
|
||||
you are using. On all computers supported by Emacs, this is
|
||||
@acronym{IEEE} binary64 floating point format, which is standardized by
|
||||
@url{https://standards.ieee.org/standard/754-2019.html,,IEEE Std 754-2019}
|
||||
and is discussed further in David Goldberg's paper
|
||||
``@url{https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html,
|
||||
What Every Computer Scientist Should Know About Floating-Point
|
||||
Arithmetic}''. On modern platforms, floating-point operations follow
|
||||
the IEEE-754 standard closely; however, results are not always rounded
|
||||
correctly on some systems, notably 32-bit x86.
|
||||
|
||||
On some old computer systems, Emacs may not use IEEE floating-point.
|
||||
We know of one such system on which Emacs runs correctly, but does not
|
||||
follow IEEE-754: the VAX running NetBSD using GCC 10.4.0, where the
|
||||
VAX @samp{D_Floating} format is used instead. IBM System/370-derived
|
||||
mainframes and their XL/C compiler are also capable of utilizing a
|
||||
hexadecimal floating point format, but Emacs has not yet been built in
|
||||
such a configuration.
|
||||
What Every Computer Scientist Should Know About Floating-Point Arithmetic}''.
|
||||
On modern platforms, floating-point operations follow the IEEE-754
|
||||
standard closely; however, results are not always rounded correctly on
|
||||
some obsolescent platforms, notably 32-bit x86.
|
||||
|
||||
The read syntax for floating-point numbers requires either a decimal
|
||||
point, an exponent, or both. Optional signs (@samp{+} or @samp{-})
|
||||
|
|
@ -270,10 +262,6 @@ two NaNs as equal when their
|
|||
signs and significands agree. Significands of NaNs are
|
||||
machine-dependent, as are the digits in their string representation.
|
||||
|
||||
NaNs are not available on systems which do not use IEEE
|
||||
floating-point arithmetic; if the read syntax for a NaN is used on a
|
||||
VAX, for example, the reader signals an error.
|
||||
|
||||
When NaNs and signed zeros are involved, non-numeric functions like
|
||||
@code{eql}, @code{equal}, @code{sxhash-eql}, @code{sxhash-equal} and
|
||||
@code{gethash} determine whether values are indistinguishable, not
|
||||
|
|
@ -754,10 +742,9 @@ by rounding the quotient towards zero after each division.
|
|||
|
||||
@cindex @code{arith-error} in division
|
||||
If you divide an integer by the integer 0, Emacs signals an
|
||||
@code{arith-error} error (@pxref{Errors}). On systems using IEEE-754
|
||||
floating-point, floating-point division of a nonzero number by zero
|
||||
yields either positive or negative infinity (@pxref{Float Basics});
|
||||
otherwise, an @code{arith-error} is signaled as usual.
|
||||
@code{arith-error} error (@pxref{Errors}). Floating-point division of
|
||||
a nonzero number by zero yields either positive or negative infinity
|
||||
(@pxref{Float Basics}).
|
||||
@end defun
|
||||
|
||||
@defun % dividend divisor
|
||||
|
|
|
|||
|
|
@ -182,9 +182,7 @@ is over, and, together with @code{before-init-time}, provides the
|
|||
measurement of how long it took.
|
||||
|
||||
@item
|
||||
It runs the normal hooks @code{after-init-hook} and
|
||||
@code{delayed-warnings-hook}. The latter shows any warnings emitted
|
||||
during previous stages of startup, which are automatically delayed.
|
||||
It runs the normal hook @code{after-init-hook}.
|
||||
|
||||
@item
|
||||
If the buffer @file{*scratch*} exists and is still in Fundamental mode
|
||||
|
|
@ -1279,33 +1277,13 @@ This function returns the real @acronym{UID} of the user.
|
|||
This function returns the effective @acronym{UID} of the user.
|
||||
@end defun
|
||||
|
||||
@defun file-user-uid
|
||||
This function returns the connection-local value for the user's
|
||||
effective @acronym{UID}. If @code{default-directory} is local, this
|
||||
is equivalent to @code{user-uid}, but for remote files (@pxref{Remote
|
||||
Files, , , emacs, The GNU Emacs Manual}), it will return the
|
||||
@acronym{UID} for the user associated with that remote connection; if
|
||||
the remote connection has no associated user, it will instead return
|
||||
-1.
|
||||
@end defun
|
||||
|
||||
@cindex GID
|
||||
@defun group-real-gid
|
||||
This function returns the real @acronym{GID} of the Emacs process.
|
||||
@end defun
|
||||
|
||||
@defun group-gid
|
||||
This function returns the effective @acronym{GID} of the Emacs process.
|
||||
@end defun
|
||||
|
||||
@defun file-group-gid
|
||||
This function returns the connection-local value for the user's
|
||||
effective @acronym{GID}. Similar to @code{file-user-uid}, if
|
||||
@code{default-directory} is local, this is equivalent to
|
||||
@code{group-gid}, but for remote files (@pxref{Remote Files, , ,
|
||||
emacs, The GNU Emacs Manual}), it will return the @acronym{GID} for
|
||||
the user associated with that remote connection; if the remote
|
||||
connection has no associated user, it will instead return -1.
|
||||
@defun group-real-gid
|
||||
This function returns the real @acronym{GID} of the Emacs process.
|
||||
@end defun
|
||||
|
||||
@defun system-users
|
||||
|
|
|
|||
|
|
@ -849,53 +849,6 @@ Each node in the returned tree looks like
|
|||
|
||||
@heading More convenience functions
|
||||
|
||||
@defun treesit-node-get node instructions
|
||||
This is a convenience function that chains together multiple node
|
||||
accessor functions together. For example, to get @var{node}'s
|
||||
parent's next sibling's second child's text:
|
||||
|
||||
@example
|
||||
@group
|
||||
(treesit-node-get node
|
||||
'((parent 1)
|
||||
(sibling 1 nil)
|
||||
(child 1 nil)
|
||||
(text nil)))
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@var{instruction} is a list of INSTRUCTIONs of the form
|
||||
@w{@code{(@var{fn} @var{arg}...)}}. The following @var{fn}'s are
|
||||
supported:
|
||||
|
||||
@table @code
|
||||
@item (child @var{idx} @var{named})
|
||||
Get the @var{idx}'th child.
|
||||
|
||||
@item (parent @var{n})
|
||||
Go to parent @var{n} times.
|
||||
|
||||
@item (field-name)
|
||||
Get the field name of the current node.
|
||||
|
||||
@item (type)
|
||||
Get the type of the current node.
|
||||
|
||||
@item (text @var{no-property})
|
||||
Get the text of the current node.
|
||||
|
||||
@item (children @var{named})
|
||||
Get a list of children.
|
||||
|
||||
@item (sibling @var{step} @var{named})
|
||||
Get the nth prev/next sibling, negative @var{step} means prev sibling,
|
||||
positive means next sibling.
|
||||
@end table
|
||||
|
||||
Note that arguments like @var{named} and @var{no-property} can't be
|
||||
omitted, unlike in their original functions.
|
||||
@end defun
|
||||
|
||||
@defun treesit-filter-child node predicate &optional named
|
||||
This function finds immediate children of @var{node} that satisfy
|
||||
@var{predicate}.
|
||||
|
|
@ -1358,8 +1311,7 @@ matches regular expression @var{regexp}. Matching is case-sensitive.
|
|||
|
||||
@deffn Predicate pred fn &rest nodes
|
||||
Matches if function @var{fn} returns non-@code{nil} when passed each
|
||||
node in @var{nodes} as arguments. The function runs with the current
|
||||
buffer set to the buffer of node being queried.
|
||||
node in @var{nodes} as arguments.
|
||||
@end deffn
|
||||
|
||||
Note that a predicate can only refer to capture names that appear in
|
||||
|
|
|
|||
|
|
@ -858,40 +858,6 @@ top-level defuns, if the value is @code{nested}, navigation functions
|
|||
recognize nested defuns.
|
||||
@end defvar
|
||||
|
||||
@defvar treesit-sentence-type-regexp
|
||||
The value of this variable is a regexp matching the node type of sentence
|
||||
nodes. (For ``node'' and ``node type'', @pxref{Parsing Program Source}.)
|
||||
@end defvar
|
||||
|
||||
@findex treesit-forward-sentence
|
||||
@findex forward-sentence
|
||||
@findex backward-sentence
|
||||
If Emacs is compiled with tree-sitter, it can use the tree-sitter
|
||||
parser information to move across syntax constructs. Since what
|
||||
exactly is considered a sentence varies between languages, a major
|
||||
mode should set @code{treesit-sentence-type-regexp} to determine that.
|
||||
Then the mode can get navigation-by-sentence functionality for free,
|
||||
by using @code{forward-sentence} and
|
||||
@code{backward-sentence}(@pxref{Moving by Sentences,,, emacs, The
|
||||
extensible self-documenting text editor}).
|
||||
|
||||
@defvar treesit-sexp-type-regexp
|
||||
The value of this variable is a regexp matching the node type of sexp
|
||||
nodes. (For ``node'' and ``node type'', @pxref{Parsing Program
|
||||
Source}.)
|
||||
@end defvar
|
||||
|
||||
@findex treesit-forward-sexp
|
||||
@findex forward-sexp@r{, and tree-sitter}
|
||||
@findex backward-sexp@r{, and tree-sitter}
|
||||
If Emacs is compiled with tree-sitter, it can use the tree-sitter
|
||||
parser information to move across syntax constructs. Since what
|
||||
exactly is considered a sexp varies between languages, a major mode
|
||||
should set @code{treesit-sexp-type-regexp} to determine that. Then
|
||||
the mode can get navigation-by-sexp functionality for free, by using
|
||||
@code{forward-sexp} and @code{backward-sexp}(@pxref{Moving by
|
||||
Sentences,,, emacs, The extensible self-documenting text editor}).
|
||||
|
||||
@node Skipping Characters
|
||||
@subsection Skipping Characters
|
||||
@cindex skipping characters
|
||||
|
|
@ -1188,6 +1154,7 @@ saved bounds. In that case it is equivalent to
|
|||
@end example
|
||||
|
||||
@cindex labeled narrowing
|
||||
@cindex labeled restriction
|
||||
When the optional argument @var{label}, a symbol, is present, the
|
||||
narrowing is @dfn{labeled}. A labeled narrowing differs from a
|
||||
non-labeled one in several ways:
|
||||
|
|
|
|||
|
|
@ -1755,9 +1755,7 @@ caught automatically, so that it doesn't stop the execution of whatever
|
|||
program was running when the filter function was started. However, if
|
||||
@code{debug-on-error} is non-@code{nil}, errors are not caught.
|
||||
This makes it possible to use the Lisp debugger to debug filter
|
||||
functions. @xref{Debugger}. If an error is caught, Emacs pauses for
|
||||
@code{process-error-pause-time} seconds so that the user sees the
|
||||
error. @xref{Asynchronous Processes}
|
||||
functions. @xref{Debugger}.
|
||||
|
||||
Many filter functions sometimes (or always) insert the output in the
|
||||
process's buffer, mimicking the actions of the default filter.
|
||||
|
|
@ -2161,9 +2159,7 @@ automatically, so that it doesn't stop the execution of whatever
|
|||
programs was running when the sentinel was started. However, if
|
||||
@code{debug-on-error} is non-@code{nil}, errors are not caught.
|
||||
This makes it possible to use the Lisp debugger to debug the
|
||||
sentinel. @xref{Debugger}. If an error is caught, Emacs pauses for
|
||||
@code{process-error-pause-time} seconds so that the user sees the
|
||||
error. @xref{Asynchronous Processes}
|
||||
sentinel. @xref{Debugger}.
|
||||
|
||||
While a sentinel is running, the process sentinel is temporarily
|
||||
set to @code{nil} so that the sentinel won't run recursively.
|
||||
|
|
|
|||
|
|
@ -376,43 +376,45 @@ is less than @var{c}, then @var{a} must be less than @var{c}. If you
|
|||
use a comparison function which does not meet these requirements, the
|
||||
result of @code{sort} is unpredictable.
|
||||
|
||||
The destructive aspect of @code{sort} for lists is that it reuses the
|
||||
cons cells forming @var{sequence} by changing their contents, possibly
|
||||
rearranging them in a different order. This means that the value of
|
||||
the input list is undefined after sorting; only the list returned by
|
||||
@code{sort} has a well-defined value. Example:
|
||||
The destructive aspect of @code{sort} for lists is that it rearranges the
|
||||
cons cells forming @var{sequence} by changing @sc{cdr}s. A nondestructive
|
||||
sort function would create new cons cells to store the elements in their
|
||||
sorted order. If you wish to make a sorted copy without destroying the
|
||||
original, copy it first with @code{copy-sequence} and then sort.
|
||||
|
||||
Sorting does not change the @sc{car}s of the cons cells in @var{sequence};
|
||||
the cons cell that originally contained the element @code{a} in
|
||||
@var{sequence} still has @code{a} in its @sc{car} after sorting, but it now
|
||||
appears in a different position in the list due to the change of
|
||||
@sc{cdr}s. For example:
|
||||
|
||||
@example
|
||||
@group
|
||||
(setq nums (list 2 1 4 3 0))
|
||||
(sort nums #'<)
|
||||
@result{} (0 1 2 3 4)
|
||||
; nums is unpredictable at this point
|
||||
(setq nums (list 1 3 2 6 5 4 0))
|
||||
@result{} (1 3 2 6 5 4 0)
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Most often we store the result back into the variable that held the
|
||||
original list:
|
||||
|
||||
@example
|
||||
(setq nums (sort nums #'<))
|
||||
@end example
|
||||
|
||||
If you wish to make a sorted copy without destroying the original,
|
||||
copy it first and then sort:
|
||||
|
||||
@example
|
||||
@group
|
||||
(setq nums (list 2 1 4 3 0))
|
||||
(sort (copy-sequence nums) #'<)
|
||||
@result{} (0 1 2 3 4)
|
||||
(sort nums #'<)
|
||||
@result{} (0 1 2 3 4 5 6)
|
||||
@end group
|
||||
@group
|
||||
nums
|
||||
@result{} (2 1 4 3 0)
|
||||
@result{} (1 2 3 4 5 6)
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
@strong{Warning}: Note that the list in @code{nums} no longer contains
|
||||
0; this is the same cons cell that it was before, but it is no longer
|
||||
the first one in the list. Don't assume a variable that formerly held
|
||||
the argument now holds the entire sorted list! Instead, save the result
|
||||
of @code{sort} and use that. Most often we store the result back into
|
||||
the variable that held the original list:
|
||||
|
||||
@example
|
||||
(setq nums (sort nums #'<))
|
||||
@end example
|
||||
|
||||
For the better understanding of what stable sort is, consider the following
|
||||
vector example. After sorting, all items whose @code{car} is 8 are grouped
|
||||
at the beginning of @code{vector}, but their relative order is preserved.
|
||||
|
|
|
|||
|
|
@ -643,12 +643,6 @@ ignore a call whose value is unused. If the property's value is
|
|||
calls. In addition to byte compiler optimizations, this property is
|
||||
also used for determining function safety (@pxref{Function Safety}).
|
||||
|
||||
@item important-return-value
|
||||
@cindex @code{important-return-value} property
|
||||
A non-@code{nil} value makes the byte compiler warn about code that
|
||||
calls the named function without using its returned value. This is
|
||||
useful for functions where doing so is likely to be a mistake.
|
||||
|
||||
@item undo-inhibit-region
|
||||
If non-@code{nil}, the named function prevents the @code{undo} operation
|
||||
from being restricted to the active region, if @code{undo} is invoked
|
||||
|
|
|
|||
|
|
@ -3765,19 +3765,18 @@ Consecutive characters with the same @code{field} property constitute a
|
|||
@item cursor
|
||||
@kindex cursor @r{(text property)}
|
||||
Normally, the cursor is displayed at the beginning or the end of any
|
||||
overlay and text property strings that ``hide'' (i.e., are displayed
|
||||
instead of) the current buffer position. You can instead tell Emacs
|
||||
to place the cursor on any desired character of these strings by
|
||||
giving that character a non-@code{nil} @code{cursor} text property.
|
||||
In addition, if the value of the @code{cursor} property is an integer,
|
||||
it specifies the number of buffer's character positions, starting with
|
||||
the position where the overlay or the @code{display} property begins,
|
||||
for which the cursor should be displayed on that character.
|
||||
Specifically, if the value of the @code{cursor} property of a
|
||||
character is the number @var{n}, the cursor will be displayed on this
|
||||
character for any buffer position in the range
|
||||
@code{[@var{ovpos}..@var{ovpos}+@var{n})}, where @var{ovpos} is the
|
||||
overlay's starting position given by @code{overlay-start}
|
||||
overlay and text property strings present at the current buffer
|
||||
position. You can instead tell Emacs to place the cursor on any
|
||||
desired character of these strings by giving that character a
|
||||
non-@code{nil} @code{cursor} text property. In addition, if the value
|
||||
of the @code{cursor} property is an integer, it specifies the number
|
||||
of buffer's character positions, starting with the position where the
|
||||
overlay or the @code{display} property begins, for which the cursor
|
||||
should be displayed on that character. Specifically, if the value of
|
||||
the @code{cursor} property of a character is the number @var{n}, the
|
||||
cursor will be displayed on this character for any buffer position in
|
||||
the range @code{[@var{ovpos}..@var{ovpos}+@var{n})}, where @var{ovpos}
|
||||
is the overlay's starting position given by @code{overlay-start}
|
||||
(@pxref{Managing Overlays}), or the position where the @code{display}
|
||||
text property begins in the buffer.
|
||||
|
||||
|
|
@ -5510,7 +5509,7 @@ contents of an SQLite database.
|
|||
@section Parsing HTML and XML
|
||||
@cindex parsing html
|
||||
|
||||
Emacs can be compiled with built-in @file{libxml2} support.
|
||||
Emacs can be compiled with built-in libxml2 support.
|
||||
|
||||
@defun libxml-available-p
|
||||
This function returns non-@code{nil} if built-in libxml2 support is
|
||||
|
|
@ -5529,10 +5528,8 @@ mistakes.
|
|||
If @var{start} or @var{end} are @code{nil}, they default to the values
|
||||
from @code{point-min} and @code{point-max}, respectively.
|
||||
|
||||
The optional argument @var{base-url}, if non-@code{nil}, should be
|
||||
used for warnings and errors reported by the @file{libxml2} library,
|
||||
but Emacs currently calls the library with errors and warnings
|
||||
disabled, so this argument is not used.
|
||||
The optional argument @var{base-url}, if non-@code{nil}, should be a
|
||||
string specifying the base URL for relative URLs occurring in links.
|
||||
|
||||
If the optional argument @var{discard-comments} is non-@code{nil},
|
||||
any top-level comment is discarded. (This argument is obsolete and
|
||||
|
|
|
|||
|
|
@ -1183,16 +1183,13 @@ wants the current value of a variable, it looks first in the lexical
|
|||
environment; if the variable is not specified in there, it looks in
|
||||
the symbol's value cell, where the dynamic value is stored.
|
||||
|
||||
(Internally, the lexical environment is a list whose members are
|
||||
usually cons cells that are symbol-value pairs, but some of its
|
||||
members can be symbols rather than cons cells. A symbol in the list
|
||||
means the lexical environment declared that symbol's variable as
|
||||
locally considered to be dynamically bound. This list can be passed
|
||||
as the second argument to the @code{eval} function, in order to
|
||||
specify a lexical environment in which to evaluate a form.
|
||||
@xref{Eval}. Most Emacs Lisp programs, however, should not interact
|
||||
directly with lexical environments in this way; only specialized
|
||||
programs like debuggers.)
|
||||
(Internally, the lexical environment is an alist of symbol-value
|
||||
pairs, with the final element in the alist being the symbol @code{t}
|
||||
rather than a cons cell. Such an alist can be passed as the second
|
||||
argument to the @code{eval} function, in order to specify a lexical
|
||||
environment in which to evaluate a form. @xref{Eval}. Most Emacs
|
||||
Lisp programs, however, should not interact directly with lexical
|
||||
environments in this way; only specialized programs like debuggers.)
|
||||
|
||||
@cindex closures, example of using
|
||||
Lexical bindings have indefinite extent. Even after a binding
|
||||
|
|
@ -2561,9 +2558,6 @@ documentation as @var{base-variable} has, if any, unless
|
|||
the documentation of the variable at the end of the chain of aliases.
|
||||
|
||||
This function returns @var{base-variable}.
|
||||
|
||||
If the resulting variable definition chain would be circular, then
|
||||
Emacs will signal a @code{cyclic-variable-indirection} error.
|
||||
@end defun
|
||||
|
||||
Variable aliases are convenient for replacing an old name for a
|
||||
|
|
@ -2612,6 +2606,9 @@ look like:
|
|||
This function returns the variable at the end of the chain of aliases
|
||||
of @var{variable}. If @var{variable} is not a symbol, or if @var{variable} is
|
||||
not defined as an alias, the function returns @var{variable}.
|
||||
|
||||
This function signals a @code{cyclic-variable-indirection} error if
|
||||
there is a loop in the chain of symbols.
|
||||
@end defun
|
||||
|
||||
@example
|
||||
|
|
|
|||
|
|
@ -3216,7 +3216,7 @@ any window it creates as dedicated to its buffer (@pxref{Dedicated
|
|||
Windows}). It does that by calling @code{set-window-dedicated-p} with
|
||||
the chosen window as first argument and the entry's value as second.
|
||||
Side windows are by default dedicated with the value @code{side}
|
||||
(@pxref{Side Window Options and Functions}).
|
||||
((@pxref{Side Window Options and Functions}).
|
||||
|
||||
@vindex preserve-size@r{, a buffer display action alist entry}
|
||||
@item preserve-size
|
||||
|
|
|
|||
|
|
@ -5394,7 +5394,7 @@ a variable containing a vector of rules.
|
|||
1: [merge, secsqr] 1: [a/x + b/x := (a + b)/x, ... ]
|
||||
. .
|
||||
|
||||
' [merge,secsqr] @key{RET} =
|
||||
' [merge,sinsqr] @key{RET} =
|
||||
|
||||
@end group
|
||||
@end smallexample
|
||||
|
|
@ -11042,8 +11042,7 @@ the year even for older dates. The customizable variable
|
|||
have Calc's date forms switch from the Julian to Gregorian calendar at
|
||||
any specified date.
|
||||
|
||||
A few platforms support leap seconds, such as the time stamp
|
||||
1972-06-30 23:59:60 UTC, an extra second appended to June 1972.
|
||||
Today's timekeepers introduce an occasional ``leap second''.
|
||||
These do not occur regularly and Calc does not take these minor
|
||||
effects into account. (If it did, it would have to report a
|
||||
non-integer number of days between, say,
|
||||
|
|
@ -17343,12 +17342,8 @@ it can be a variable which is a time zone name in upper- or lower-case.
|
|||
For example @samp{tzone(PST) = tzone(8)} and @samp{tzone(pdt) = tzone(7)}
|
||||
(for Pacific standard and daylight saving times, respectively).
|
||||
|
||||
North American and European time zone names are defined as follows.
|
||||
These names are obsolescent and new code should not rely on them:
|
||||
the @samp{YST}-related names have disagreed with time in Yukon since 1973,
|
||||
and other names could well become confusing or wrong in the future
|
||||
as countries change their time zone rules.
|
||||
For each time zone there is one name for standard time,
|
||||
North American and European time zone names are defined as follows;
|
||||
note that for each time zone there is one name for standard time,
|
||||
another for daylight saving time, and a third for ``generalized'' time
|
||||
in which the daylight saving adjustment is computed from context.
|
||||
|
||||
|
|
@ -17370,7 +17365,7 @@ To define time zone names that do not appear in the above table,
|
|||
you must modify the Lisp variable @code{math-tzone-names}. This
|
||||
is a list of lists describing the different time zone names; its
|
||||
structure is best explained by an example. The three entries for
|
||||
circa-2022 US Pacific Time look like this:
|
||||
Pacific Time look like this:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
|
|
|
|||
|
|
@ -330,7 +330,6 @@ Syntactic Symbols
|
|||
* Multiline Macro Symbols::
|
||||
* Objective-C Method Symbols::
|
||||
* Java Symbols::
|
||||
* Constraint Symbols::
|
||||
* Statement Block Symbols::
|
||||
* K&R Symbols::
|
||||
|
||||
|
|
@ -4235,9 +4234,6 @@ The first line in a ``topmost'' definition. @ref{Function Symbols}.
|
|||
Topmost definition continuation lines. This is only used in the parts
|
||||
that aren't covered by other symbols such as @code{func-decl-cont} and
|
||||
@code{knr-argdecl}. @ref{Function Symbols}.
|
||||
@item constraint-cont
|
||||
Continuation line of a topmost C++20 concept or requires clause.
|
||||
@ref{Constraint Symbols}.
|
||||
@item annotation-top-cont
|
||||
Topmost definition continuation lines where all previous items are
|
||||
annotations. @ref{Java Symbols}.
|
||||
|
|
@ -4401,7 +4397,6 @@ Java. @ref{Java Symbols}.
|
|||
* Multiline Macro Symbols::
|
||||
* Objective-C Method Symbols::
|
||||
* Java Symbols::
|
||||
* Constraint Symbols::
|
||||
* Statement Block Symbols::
|
||||
* K&R Symbols::
|
||||
@end menu
|
||||
|
|
@ -5075,39 +5070,6 @@ the current line. Similarly, line 4 is assigned the @code{annotation-var-cont}
|
|||
syntax due to it being a continuation of a variable declaration where preceding
|
||||
the declaration is an annotation.
|
||||
|
||||
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
@node Constraint Symbols
|
||||
@subsection C++ Constraint Symbols
|
||||
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
The C++20 standard introduced the notion of @dfn{concepts} and
|
||||
@dfn{requirements}, a typical instance of which looks something like
|
||||
this:
|
||||
|
||||
@example
|
||||
1: template <typename T>
|
||||
2: requires
|
||||
3: requires (T t) @{
|
||||
4: @{ ++t; @}
|
||||
5: @}
|
||||
6: && std::is_integral<T>
|
||||
7: int foo();
|
||||
@end example
|
||||
|
||||
@ssindex constraint-cont
|
||||
Line 1 is assigned the familiar @code{topmost-intro}. Line 2 gets
|
||||
@code{topmost-intro-cont}, being the keyword which introduces a
|
||||
@dfn{requires clause}. Lines 3, 6, and 7 are assigned the syntax
|
||||
@code{constraint-cont}, being continuations of the requires clause
|
||||
started on line 2. Lines 4 and 5 get the syntaxes
|
||||
@code{defun-block-intro} and @code{defun-close}, being analyzed as
|
||||
though part of a function.
|
||||
|
||||
Note that the @code{requires} on Line 3 begins a @dfn{requires
|
||||
expression}, not a a requires clause, hence its components are not
|
||||
assigned @code{constraint-cont}. See
|
||||
@url{https://en.cppreference.com/w/cpp/language/requires}.
|
||||
|
||||
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
@node Statement Block Symbols
|
||||
@subsection Statement Block Symbols
|
||||
|
|
|
|||
|
|
@ -3133,23 +3133,13 @@ example, you can put the following in your init file:
|
|||
|
||||
To avoid the slightly distracting visual effect of Emacs starting with
|
||||
its default frame size and then growing to fullscreen, you can add an
|
||||
@samp{Emacs.Geometry} entry to the Windows Registry settings. @xref{X
|
||||
Resources,,, emacs, The GNU Emacs Manual}. To compute the correct
|
||||
values for width and height you use in the Registry settings, first
|
||||
maximize the Emacs frame and then evaluate @code{(frame-height)} and
|
||||
@samp{Emacs.Geometry} entry to the Windows registry settings.
|
||||
@xref{X Resources,,, emacs, The GNU Emacs Manual}.
|
||||
|
||||
To compute the correct values for width and height, first maximize the
|
||||
Emacs frame and then evaluate @code{(frame-height)} and
|
||||
@code{(frame-width)} with @kbd{M-:}.
|
||||
|
||||
Alternatively, you can avoid the visual effect of Emacs changing its
|
||||
frame size entirely in your init file (i.e., without using the
|
||||
Registry), like this:
|
||||
|
||||
@lisp
|
||||
(setq frame-resize-pixelwise t)
|
||||
(set-frame-position nil 0 0)
|
||||
(set-frame-size nil (display-pixel-width) (display-pixel-height) t)
|
||||
@end lisp
|
||||
|
||||
|
||||
@node Emacs in a Linux console
|
||||
@section How can I alleviate the limitations of the Linux console?
|
||||
@cindex Console, Linux console, TTY, fbterm
|
||||
|
|
|
|||
|
|
@ -1265,7 +1265,7 @@ is serialized by Eglot to the following JSON text:
|
|||
@chapter Troubleshooting Eglot
|
||||
@cindex troubleshooting Eglot
|
||||
|
||||
This chapter documents commands and variables that can be used to
|
||||
This section documents commands and variables that can be used to
|
||||
troubleshoot Eglot problems. It also provides guidelines for
|
||||
reporting Eglot bugs in a way that facilitates their resolution.
|
||||
|
||||
|
|
@ -1275,15 +1275,7 @@ pop up special buffers that can be used to inspect the communications
|
|||
between the Eglot and language server. In many cases, this will
|
||||
indicate the problems or at least provide a hint.
|
||||
|
||||
@menu
|
||||
* Performance::
|
||||
* Getting the latest version::
|
||||
* Reporting bugs::
|
||||
@end menu
|
||||
|
||||
@node Performance
|
||||
@section Performance
|
||||
@cindex performance problems, with Eglot
|
||||
@cindex performance
|
||||
A common and easy-to-fix cause of performance problems is the length
|
||||
of the Eglot events buffer because it represent additional work that
|
||||
Eglot must do. After verifying Eglot is operating correctly but
|
||||
|
|
@ -1297,33 +1289,6 @@ techniques to improve their performance. Often, this can be tweaked
|
|||
by changing the server configuration (@pxref{Advanced server
|
||||
configuration}).
|
||||
|
||||
@node Getting the latest version
|
||||
@section Getting the latest version
|
||||
@cindex upgrading Eglot
|
||||
|
||||
To install the latest Eglot in an Emacs version that does not bundle
|
||||
Eglot, use @kbd{M-x package-install}.
|
||||
|
||||
Often, a newer Eglot version exists that has fixed a longstanding bug,
|
||||
has more LSP features, or just better supports a particular language
|
||||
server. Recent Eglot versions can self-update via the command
|
||||
@kbd{M-x eglot-upgrade-eglot}. This will replace any currently
|
||||
installed version with the newest one available from the ELPA archives
|
||||
configured in @code{package-archives}.
|
||||
|
||||
You can also update Eglot through other methods, such as
|
||||
@code{use-package} (@pxref{Installing packages,,, use-package,
|
||||
use-package User Manual}), @code{package-install},
|
||||
@code{list-packages} or the newer @code{package-upgrade}
|
||||
(@pxref{Packages,,, emacs, GNU Emacs Manual}). However, do read the
|
||||
docstrings of the command you intend to use before you use it, as some
|
||||
of them may not work in exactly the same way across Emacs versions,
|
||||
meaning your configuration may be not portable.
|
||||
|
||||
@node Reporting bugs
|
||||
@section Reporting bugs
|
||||
@cindex bug reports
|
||||
|
||||
If you think you have found a bug, we want to hear about it. Before
|
||||
reporting a bug, keep in mind that interaction with language servers
|
||||
represents a large quantity of unknown variables. Therefore, it is
|
||||
|
|
@ -1367,10 +1332,6 @@ public Git repository.
|
|||
Include versions of the software used. The Emacs version can be
|
||||
obtained with @kbd{M-x emacs-version}.
|
||||
|
||||
We welcome bug reports about all Eglot versions, but it is helpful to
|
||||
first check if the problem isn't already fixed in the latest version
|
||||
(@pxref{Getting the latest version}).
|
||||
|
||||
It's also essential to include the version of ELPA packages that are
|
||||
explicitly or implicitly loaded. The optional but popular Company or
|
||||
Markdown packages are distributed as GNU ELPA packages, not to mention
|
||||
|
|
|
|||
|
|
@ -952,7 +952,7 @@ Here, ``password'' refers to your account password, which is usually
|
|||
your @samp{NickServ} password. To make this work, customize
|
||||
@code{erc-sasl-user} and @code{erc-sasl-password} or specify the
|
||||
@code{:user} and @code{:password} keyword arguments when invoking
|
||||
@code{erc-tls}.
|
||||
@code{erc-tls}. Note that @code{:user} cannot be given interactively.
|
||||
|
||||
@item @code{external} (via Client TLS Certificate)
|
||||
This works in conjunction with the @code{:client-certificate} keyword
|
||||
|
|
@ -1477,30 +1477,10 @@ questions. You can also try the relatively quiet @samp{#erc}, on the
|
|||
same network, for more involved questions.
|
||||
|
||||
@item
|
||||
@anchor{Upgrading}
|
||||
You can check GNU ELPA between Emacs releases to see if a newer
|
||||
version is available that might contain a fix for your issue:
|
||||
@uref{https://elpa.gnu.org/packages/erc.html}.
|
||||
|
||||
To upgrade, run @kbd{M-x list-packages @key{RET}}. In the
|
||||
@file{*Packages*} (@code{package-menu-mode}) buffer, click the
|
||||
@samp{erc} package link for the desired version. If unsure, or if the
|
||||
version column is too narrow to tell, try the bottom-most candidate.
|
||||
In the resulting @code{help-mode} buffer, confirm the version and
|
||||
click @samp{Install}. Make sure to restart Emacs before reconnecting
|
||||
to IRC, and don't forget that you can roll back to the previous
|
||||
version by running @kbd{M-x package-delete @key{RET}}.
|
||||
@xref{Packages,,,emacs, the Emacs manual} for more information.
|
||||
|
||||
In the rare instance you need an emergency fix or have volunteered to
|
||||
test an edge feature between ERC releases, you can try adding
|
||||
@samp{("devel" . "https://elpa.gnu.org/devel/")} to
|
||||
@code{package-archives} prior to performing the steps above. For
|
||||
this, you'll want to instead select a ``snapshot'' version from the
|
||||
menu. Please be aware that when going this route, the latest changes
|
||||
may not yet be available and you run the risk of incurring other bugs
|
||||
and encountering unstable features.
|
||||
|
||||
@item
|
||||
To report a bug in ERC, use @kbd{M-x erc-bug}.
|
||||
|
||||
|
|
|
|||
|
|
@ -418,9 +418,9 @@ alias (@pxref{Aliases}). Example:
|
|||
@example
|
||||
~ $ which sudo
|
||||
eshell/sudo is a compiled Lisp function in `em-tramp.el'.
|
||||
~ $ alias sudo '*sudo $@@*'
|
||||
~ $ alias sudo '*sudo $*'
|
||||
~ $ which sudo
|
||||
sudo is an alias, defined as "*sudo $@@*"
|
||||
sudo is an alias, defined as "*sudo $*"
|
||||
@end example
|
||||
|
||||
Some of the built-in commands have different behavior from their
|
||||
|
|
@ -540,7 +540,7 @@ Manual}.
|
|||
|
||||
If @code{eshell-plain-diff-behavior} is non-@code{nil}, then this
|
||||
command does not use Emacs's internal @code{diff}. This is the same
|
||||
as using @samp{alias diff '*diff $@@*'}.
|
||||
as using @samp{alias diff '*diff $*'}.
|
||||
|
||||
@item dirname
|
||||
@cmindex dirname
|
||||
|
|
@ -602,8 +602,6 @@ disabled by default.
|
|||
@cmindex egrep
|
||||
@itemx fgrep
|
||||
@cmindex fgrep
|
||||
@itemx rgrep
|
||||
@cmindex rgrep
|
||||
@itemx glimpse
|
||||
@cmindex glimpse
|
||||
The @command{grep} commands are compatible with GNU @command{grep},
|
||||
|
|
@ -612,9 +610,9 @@ but use Emacs's internal @code{grep} instead.
|
|||
|
||||
If @code{eshell-plain-grep-behavior} is non-@code{nil}, then these
|
||||
commands do not use Emacs's internal @code{grep}. This is the same as
|
||||
using @samp{alias grep '*grep $@@*'}, though this setting applies to
|
||||
all of the built-in commands for which you would need to create a
|
||||
separate alias.
|
||||
using @samp{alias grep '*grep $*'}, though this setting applies to all
|
||||
of the built-in commands for which you would need to create a separate
|
||||
alias.
|
||||
|
||||
@item history
|
||||
@cmindex history
|
||||
|
|
@ -670,7 +668,7 @@ Alias to Emacs's @code{locate} function, which simply runs the external
|
|||
|
||||
If @code{eshell-plain-locate-behavior} is non-@code{nil}, then Emacs's
|
||||
internal @code{locate} is not used. This is the same as using
|
||||
@samp{alias locate '*locate $@@*'}.
|
||||
@samp{alias locate '*locate $*'}.
|
||||
|
||||
@item ls
|
||||
@cmindex ls
|
||||
|
|
@ -1049,21 +1047,12 @@ whenever you change the current directory to a different host
|
|||
the value will automatically update to reflect the search path on that
|
||||
host.
|
||||
|
||||
@vindex $UID
|
||||
@item $UID
|
||||
This returns the effective @acronym{UID} for the current user. This
|
||||
variable is connection-aware, so when the current directory is remote,
|
||||
its value will be @acronym{UID} for the user associated with that
|
||||
remote connection.
|
||||
|
||||
@vindex $_
|
||||
@item $_
|
||||
This refers to the last argument of the last command. With a
|
||||
subscript, you can access any argument of the last command. For
|
||||
example, @samp{$_[1]} refers to the second argument of the last
|
||||
command (excluding the command name itself). To get all arguments of
|
||||
the last command, you can use an index range like @samp{$_[..]}
|
||||
(@pxref{Dollars Expansion}).
|
||||
command (excluding the command name itself).
|
||||
|
||||
@vindex $$
|
||||
@item $$
|
||||
|
|
@ -1089,7 +1078,6 @@ that are currently visible in the Eshell window. They are both
|
|||
copied to the environment, so external commands invoked from
|
||||
Eshell can consult them to do the right thing.
|
||||
|
||||
@vindex $INSIDE_EMACS
|
||||
@item $INSIDE_EMACS
|
||||
This variable indicates to external commands that they are being
|
||||
invoked from within Emacs so they can adjust their behavior if
|
||||
|
|
@ -1103,47 +1091,24 @@ necessary. Its value is @code{@var{emacs-version},eshell}.
|
|||
@node Aliases
|
||||
@section Aliases
|
||||
|
||||
@findex eshell-read-aliases-list
|
||||
Aliases are commands that expand to a longer input line. For example,
|
||||
@command{ll} is a common alias for @code{ls -l}. To define this alias
|
||||
in Eshell, you can use the command invocation @kbd{alias ll 'ls -l
|
||||
$@@*'}; with this defined, running @samp{ll foo} in Eshell will
|
||||
actually run @samp{ls -l foo}. Aliases defined (or deleted) by the
|
||||
@command{alias} command are automatically written to the file named by
|
||||
@code{eshell-aliases-file}, which you can also edit directly. After
|
||||
doing so, use @w{@kbd{M-x eshell-read-aliases-list}} to load the
|
||||
edited aliases.
|
||||
|
||||
Note that unlike aliases in Bash, arguments must be handled
|
||||
explicitly. Within aliases, you can use the special variables
|
||||
@samp{$*}, @samp{$0}, @samp{$1}, @samp{$2}, etc. to refer to the
|
||||
arguments passed to the alias.
|
||||
|
||||
@table @code
|
||||
|
||||
@vindex $*
|
||||
@item $*
|
||||
This expands to the list of arguments passed to the alias. For
|
||||
example, if you run @code{my-alias 1 2 3}, then @samp{$*} would be the
|
||||
list @code{(1 2 3)}. Note that since this variable is a list, using
|
||||
@samp{$*} in an alias will pass this list as a single argument to the
|
||||
aliased command. Therefore, when defining an alias, you should
|
||||
usually use @samp{$@@*} to pass all arguments along, splicing them
|
||||
into your argument list (@pxref{Dollars Expansion}).
|
||||
Aliases are commands that expand to a longer input line. For example,
|
||||
@command{ll} is a common alias for @code{ls -l}, and would be defined
|
||||
with the command invocation @kbd{alias ll 'ls -l $*'}; with this defined,
|
||||
running @samp{ll foo} in Eshell will actually run @samp{ls -l foo}.
|
||||
Aliases defined (or deleted) by the @command{alias} command are
|
||||
automatically written to the file named by @code{eshell-aliases-file},
|
||||
which you can also edit directly (although you will have to manually
|
||||
reload it).
|
||||
|
||||
@vindex $0
|
||||
@item $0
|
||||
This expands to the name of the alias currently being executed.
|
||||
|
||||
@vindex $1, $2, @dots{}, $9
|
||||
@item $1, $2, @dots{}, $9
|
||||
These variables expand to the nth argument (starting at 1) passed to
|
||||
the alias. This lets you selectively use an alias's arguments, so
|
||||
@vindex $1, $2, @dots{}
|
||||
Note that unlike aliases in Bash, arguments must be handled
|
||||
explicitly. Typically the alias definition would end in @samp{$*} to
|
||||
pass all arguments along. More selective use of arguments via
|
||||
@samp{$1}, @samp{$2}, etc., is also possible. For example,
|
||||
@kbd{alias mcd 'mkdir $1 && cd $1'} would cause @kbd{mcd foo} to
|
||||
create and switch to a directory called @samp{foo}.
|
||||
|
||||
@end table
|
||||
|
||||
@node History
|
||||
@section History
|
||||
@cmindex history
|
||||
|
|
@ -1374,24 +1339,11 @@ index. The exact behavior depends on the type of @var{expr}'s value:
|
|||
@item a sequence
|
||||
Expands to the element at the (zero-based) index @var{i} of the
|
||||
sequence (@pxref{Sequences Arrays Vectors, Sequences, , elisp, The
|
||||
Emacs Lisp Reference Manual}). If @var{i} is negative, @var{i} counts
|
||||
from the end, so -1 refers to the last element of the sequence.
|
||||
|
||||
If @var{i} is a range like @code{@var{start}..@var{end}}, this expands
|
||||
to a subsequence from the indices @var{start} to @var{end}, where
|
||||
@var{end} is excluded@footnote{This behavior is different from ranges
|
||||
in Bash (where both the start and end are included in the range), but
|
||||
matches the behavior of similar Emacs Lisp functions, like
|
||||
@code{substring} (@pxref{Creating Strings, , , elisp, The Emacs Lisp
|
||||
Reference Manual}).}. @var{start} and/or @var{end} can also be
|
||||
omitted, which is equivalent to the start and/or end of the entire
|
||||
list. For example, @samp{$@var{expr}[-2..]} expands to the last two
|
||||
values of @var{expr}.
|
||||
Emacs Lisp Reference Manual}).
|
||||
|
||||
@item a string
|
||||
Split the string at whitespace, and then expand to the @var{i}th
|
||||
element of the resulting sequence. As above, @var{i} can be a range
|
||||
like @code{@var{start}..@var{end}}.
|
||||
element of the resulting sequence.
|
||||
|
||||
@item an alist
|
||||
If @var{i} is a non-numeric value, expand to the value associated with
|
||||
|
|
@ -1418,36 +1370,12 @@ to split the string. @var{regexp} can be any form other than a
|
|||
number. For example, @samp{$@var{var}[: 0]} will return the first
|
||||
element of a colon-delimited string.
|
||||
|
||||
@cindex length operator, in variable expansion
|
||||
@item $#@var{expr}
|
||||
This is the @dfn{length operator}. It expands to the length of the
|
||||
result of @var{expr}, an expression in one of the above forms. For
|
||||
example, @samp{$#@var{var}} returns the length of the variable
|
||||
@var{var} and @samp{$#@var{var}[0]} returns the length of the first
|
||||
element of @var{var}. Again, signals an error if the result of
|
||||
@var{expr} is not a string or a sequence.
|
||||
|
||||
@cindex splice operator, in variable expansion
|
||||
@item $@@@var{expr}
|
||||
This is the @dfn{splice operator}. It ``splices'' the elements of
|
||||
@var{expr} (an expression of one of the above forms) into the
|
||||
resulting list of arguments, much like the @samp{,@@} marker in Emacs
|
||||
Lisp (@pxref{Backquote, , , elisp, The Emacs Lisp Reference Manual}).
|
||||
The elements of @var{expr} become arguments at the same level as the
|
||||
other arguments around it. For example, if @var{numbers} is the list
|
||||
@code{(1 2 3)}, then:
|
||||
|
||||
@example
|
||||
@group
|
||||
~ $ echo 0 $numbers
|
||||
(0
|
||||
(1 2 3))
|
||||
@end group
|
||||
@group
|
||||
~ $ echo 0 $@@numbers
|
||||
(0 1 2 3)
|
||||
@end group
|
||||
@end example
|
||||
Expands to the length of the result of @var{expr}, an expression in
|
||||
one of the above forms. For example, @samp{$#@var{var}} returns the
|
||||
length of the variable @var{var} and @samp{$#@var{var}[0]} returns the
|
||||
length of the first element of @var{var}. Again, signals an error if
|
||||
the result of @var{expr} is not a string or a sequence.
|
||||
|
||||
@end table
|
||||
|
||||
|
|
@ -2166,7 +2094,7 @@ Allow for a Bash-compatible syntax, such as:
|
|||
|
||||
@example
|
||||
alias arg=blah
|
||||
function arg () @{ blah $@@* @}
|
||||
function arg () @{ blah $* @}
|
||||
@end example
|
||||
|
||||
@item Pcomplete sometimes gets stuck
|
||||
|
|
@ -2191,6 +2119,8 @@ Hitting space during a process invocation, such as @command{make}, will
|
|||
cause it to track the bottom of the output; but backspace no longer
|
||||
scrolls back.
|
||||
|
||||
@item It's not possible to fully @code{unload-feature} Eshell
|
||||
|
||||
@item Menu support was removed, but never put back
|
||||
|
||||
@item If an interactive process is currently running, @kbd{M-!} doesn't work
|
||||
|
|
@ -2249,6 +2179,11 @@ So that @kbd{M-@key{DEL}} acts in a predictable manner, etc.
|
|||
|
||||
@item Allow all Eshell buffers to share the same history and list-dir
|
||||
|
||||
@item There is a problem with script commands that output to @file{/dev/null}
|
||||
|
||||
If a script file, somewhere in the middle, uses @samp{> /dev/null},
|
||||
output from all subsequent commands is swallowed.
|
||||
|
||||
@item Split up parsing of text after @samp{$} in @file{esh-var.el}
|
||||
|
||||
Make it similar to the way that @file{esh-arg.el} is structured.
|
||||
|
|
@ -2457,6 +2392,13 @@ current being used.
|
|||
|
||||
This way, the user could change it to use rc syntax: @samp{>[2=1]}.
|
||||
|
||||
@item Allow @samp{$_[-1]}, which would indicate the last element of the array
|
||||
|
||||
@item Make @samp{$x[*]} equal to listing out the full contents of @samp{x}
|
||||
|
||||
Return them as a list, so that @samp{$_[*]} is all the arguments of the
|
||||
last command.
|
||||
|
||||
@item Copy ANSI code handling from @file{term.el} into @file{em-term.el}
|
||||
|
||||
Make it possible for the user to send char-by-char to the underlying
|
||||
|
|
|
|||
|
|
@ -92,10 +92,9 @@ searched via @code{eww-search-prefix}. The default search engine is
|
|||
either prefix the file name with @code{file://} or use the command
|
||||
@kbd{M-x eww-open-file}.
|
||||
|
||||
If you invoke @code{eww} or @code{eww-open-file} with a prefix
|
||||
argument, as in @w{@kbd{C-u M-x eww}}, they will create a new EWW
|
||||
buffer instead of reusing the default one, which is normally called
|
||||
@file{*eww*}.
|
||||
If you invoke @code{eww} with a prefix argument, as in @w{@kbd{C-u
|
||||
M-x eww}}, it will create a new EWW buffer instead of reusing the
|
||||
default one, which is normally called @file{*eww*}.
|
||||
|
||||
@findex eww-quit
|
||||
@findex eww-reload
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
\input texinfo @c -*- mode: texinfo; coding: utf-8 -*-
|
||||
@comment %**start of header
|
||||
@setfilename ../../info/flymake.info
|
||||
@set VERSION 1.3.4
|
||||
@set UPDATED April 2023
|
||||
@set VERSION 1.2.2
|
||||
@set UPDATED November 2021
|
||||
@settitle GNU Flymake @value{VERSION}
|
||||
@include docstyle.texi
|
||||
@syncodeindex pg cp
|
||||
|
|
@ -142,12 +142,6 @@ highlighted regions to learn what the specific problem
|
|||
is. Alternatively, place point on the highlighted regions and use the
|
||||
commands @code{eldoc} or @code{display-local-help}.
|
||||
|
||||
Another easy way to get instant access to the diagnostic text is to
|
||||
set @code{flymake-show-diagnostics-at-end-of-line} to a non-@code{nil}
|
||||
value. This makes the diagnostic messages appear at the end of the
|
||||
line where the regular annotation is located (@pxref{Customizable
|
||||
variables})
|
||||
|
||||
@cindex next and previous diagnostic
|
||||
If the diagnostics are outside the visible region of the buffer,
|
||||
@code{flymake-goto-next-error} and @code{flymake-goto-prev-error} are
|
||||
|
|
@ -320,22 +314,6 @@ Which fringe (if any) should show the warning/error bitmaps.
|
|||
@item flymake-wrap-around
|
||||
If non-@code{nil}, moving to errors with @code{flymake-goto-next-error} and
|
||||
@code{flymake-goto-prev-error} wraps around buffer boundaries.
|
||||
|
||||
@item flymake-show-diagnostics-at-end-of-line
|
||||
If non-@code{nil}, show summarized descriptions of diagnostics at the
|
||||
end of the line. Depending on your preference, this can either be
|
||||
distracting and easily confused with actual code, or a significant
|
||||
early aid that relieves you from moving around or reaching for the
|
||||
mouse to consult an error message.
|
||||
|
||||
@item flymake-error-eol
|
||||
A custom face for summarizing diagnostic error messages.
|
||||
|
||||
@item flymake-warning-eol
|
||||
A custom face for summarizing diagnostic warning messages.
|
||||
|
||||
@item flymake-note-eol
|
||||
A custom face for summarizing diagnostic notes.
|
||||
@end vtable
|
||||
|
||||
@node Extending Flymake
|
||||
|
|
@ -416,7 +394,7 @@ its @code{flymake-overlay-control} property:
|
|||
|
||||
@item
|
||||
@cindex severity of diagnostic
|
||||
@code{severity} is a non-negative integer specifying the
|
||||
@code{flymake-severity} is a non-negative integer specifying the
|
||||
diagnostic's severity. The higher the value, the more serious is the
|
||||
error. If the overlay property @code{priority} is not specified in
|
||||
@code{flymake-overlay-control}, @code{flymake-severity} is used to set
|
||||
|
|
@ -431,17 +409,6 @@ type, in case the name of the symbol associated with it is very long.
|
|||
@vindex flymake-category
|
||||
@code{flymake-category} is a symbol whose property list is considered
|
||||
the default for missing values of any other properties.
|
||||
|
||||
@item
|
||||
@cindex mode-line appearance of a diagnostic
|
||||
@code{mode-line-face} is a face specifier controlling the appearance
|
||||
of the indicator of this type of diagnostic in the mode line.
|
||||
|
||||
@item
|
||||
@cindex summarized appearance of a diagnostic
|
||||
@code{echo-face} is a face specifier controlling the appearance of the
|
||||
summarized description of this diagnostic when reading diagnostic
|
||||
messages (@pxref{Finding diagnostics}).
|
||||
@end itemize
|
||||
|
||||
@cindex predefined diagnostic types
|
||||
|
|
|
|||
|
|
@ -10528,9 +10528,9 @@ article (@code{gnus-summary-refer-references}).
|
|||
@kindex A T @r{(Summary)}
|
||||
Display the full thread where the current article appears
|
||||
(@code{gnus-summary-refer-thread}). By default this command looks for
|
||||
articles only in the current group. If the group belongs to a backend
|
||||
that has an associated search engine, articles are found by searching.
|
||||
In other cases each header in the current group must be fetched and
|
||||
articles only in the current group. Some backends (currently only
|
||||
@code{nnimap}) know how to find articles in the thread directly. In
|
||||
other cases each header in the current group must be fetched and
|
||||
examined, so it usually takes a while. If you do it often, you may
|
||||
consider setting @code{gnus-fetch-old-headers} to @code{invisible}
|
||||
(@pxref{Filling In Threads}). This won't have any visible effects
|
||||
|
|
@ -10538,22 +10538,19 @@ normally, but it'll make this command work a whole lot faster. Of
|
|||
course, it'll make group entry somewhat slow.
|
||||
|
||||
@vindex gnus-refer-thread-use-search
|
||||
If @code{gnus-refer-thread-use-search} is @code{nil} (the default)
|
||||
then thread-referral only looks for articles in the current group. If
|
||||
this variable is @code{t} the server to which the current group
|
||||
belongs is searched (provided that searching is available for the
|
||||
server's backend). If this variable is a list of servers, each server
|
||||
in the list is searched.
|
||||
If @code{gnus-refer-thread-use-search} is non-@code{nil} then those backends
|
||||
that know how to find threads directly will search not just in the
|
||||
current group but all groups on the same server.
|
||||
|
||||
@vindex gnus-refer-thread-limit
|
||||
The @code{gnus-refer-thread-limit} variable says how many old (i.e.,
|
||||
articles before the first displayed in the current group) headers to
|
||||
fetch when referring a thread. The default is 500. If @code{t}, all
|
||||
the available headers will be fetched. This variable can be
|
||||
overridden by giving the @kbd{A T} command a numerical prefix.
|
||||
fetch when doing this command. The default is 200. If @code{t}, all
|
||||
the available headers will be fetched. This variable can be overridden
|
||||
by giving the @kbd{A T} command a numerical prefix.
|
||||
|
||||
@vindex gnus-refer-thread-limit-to-thread
|
||||
@code{gnus-summary-refer-thread} tries to add any articles it finds to
|
||||
In most cases @code{gnus-refer-thread} adds any articles it finds to
|
||||
the current summary buffer. (When @code{gnus-refer-thread-use-search}
|
||||
is true and the initial referral starts from a summary buffer for a
|
||||
non-virtual group this may not be possible. In this case a new
|
||||
|
|
|
|||
|
|
@ -1948,9 +1948,11 @@ requires the @acronym{POP}-before-@acronym{SMTP} authentication.
|
|||
@cindex X-Message-SMTP-Method
|
||||
If you have a complex @acronym{SMTP} setup, and want some messages to
|
||||
go via one mail server, and other messages to go through another, you
|
||||
can use the @samp{X-Message-SMTP-Method} header to override the
|
||||
default by using the keyword @samp{smtp} followed by the server
|
||||
information:
|
||||
can use the @samp{X-Message-SMTP-Method} header. These are the
|
||||
supported values:
|
||||
|
||||
@table @samp
|
||||
@item smtpmail
|
||||
|
||||
@example
|
||||
X-Message-SMTP-Method: smtp smtp.fsf.org 587
|
||||
|
|
@ -1966,19 +1968,16 @@ This is the same as the above, but uses @samp{other-user} as the user
|
|||
name when authenticating. This is handy if you have several
|
||||
@acronym{SMTP} accounts on the same server.
|
||||
|
||||
This header may also be used to specify an alternative MTA by using a
|
||||
@samp{mailer} keyword, where @samp{mailer} is the name of an MTA with
|
||||
a corresponding @code{message-send-mail-with-'mailer'} function. For
|
||||
example:
|
||||
@item sendmail
|
||||
|
||||
@example
|
||||
X-Message-SMTP-Method: sendmail
|
||||
@end example
|
||||
|
||||
will send the message via the locally installed sendmail program. The
|
||||
recognized values of @samp{mailer} are sendmail, qmail, mh, and
|
||||
mailclient.
|
||||
This will send the message via the locally installed sendmail/exim/etc
|
||||
installation.
|
||||
|
||||
@end table
|
||||
|
||||
@item message-mh-deletable-headers
|
||||
@vindex message-mh-deletable-headers
|
||||
|
|
|
|||
|
|
@ -793,7 +793,7 @@ You should see the scan line for your message, and perhaps others. Use
|
|||
|
||||
@cartouche
|
||||
@smallexample
|
||||
3 t08/24 root received fax files on Wed Aug 24 11:00:13 -0700 1
|
||||
3 t08/24 root received fax files on Wed Aug 24 11:00:13 PDT 1
|
||||
# 4+t08/24 To:wohler Test<<This is a test message to get the wheels
|
||||
|
||||
-:%% @{+inbox/select@} 4 msgs (1-4) Bot L4 (MH-Folder Show)---------
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -307,16 +307,11 @@ news ticker.
|
|||
|
||||
@findex newsticker-start-ticker
|
||||
@findex newsticker-stop-ticker
|
||||
@vindex newsticker-ticker-period
|
||||
Headlines can be displayed in the echo area, either scrolling like
|
||||
messages in a stock-quote ticker, or just changing. This can be
|
||||
started with the command @code{newsticker-start-ticker}. It can be
|
||||
stopped with @code{newsticker-stop-ticker}.
|
||||
|
||||
The ticker by default runs continuously. To only run it once, at a
|
||||
specific time interval, set the @code{newsticker-ticker-period}
|
||||
variable.
|
||||
|
||||
|
||||
@node Navigation
|
||||
@section Navigation
|
||||
|
|
@ -547,10 +542,8 @@ are shown in the echo area, i.e., the ``ticker''.
|
|||
@itemize
|
||||
@item
|
||||
@vindex newsticker-display-interval
|
||||
@vindex newsticker-ticker-period
|
||||
@vindex newsticker-scroll-smoothly
|
||||
@code{newsticker-ticker-interval},
|
||||
@code{newsticker-ticker-period}, and
|
||||
@code{newsticker-ticker-interval} and
|
||||
@code{newsticker-scroll-smoothly} define how headlines are shown in
|
||||
the echo area.
|
||||
@end itemize
|
||||
|
|
|
|||
|
|
@ -5958,9 +5958,8 @@ the agenda (see [[*Weekly/daily agenda]]). We distinguish:
|
|||
#+findex: org-block
|
||||
|
||||
For more complex date specifications, Org mode supports using the
|
||||
special expression diary entries implemented in the
|
||||
[[info:emacs#Special Diary Entries][Emacs Calendar package]][fn:20].
|
||||
For example, with optional time:
|
||||
special expression diary entries implemented in the Emacs Calendar
|
||||
package[fn:20]. For example, with optional time:
|
||||
|
||||
#+begin_example
|
||||
,* 22:00-23:00 The nerd meeting on every 2nd Thursday of the month
|
||||
|
|
|
|||
|
|
@ -691,11 +691,11 @@ window is showing them), the mode line will now show you the abbreviated
|
|||
channel or nick name. Use @kbd{C-c C-@key{SPC}} to switch to these
|
||||
buffers.
|
||||
|
||||
@cindex rcirc-track-abbreviate-flag
|
||||
@cindex rcirc-track-abbrevate-flag
|
||||
By default the channel names are abbreviated, set
|
||||
@code{rcirc-track-abbreviate-flag} to a non-@code{nil} value. This
|
||||
might be interesting if the IRC activities are not tracked in the mode
|
||||
line, but somewhere else.
|
||||
@code{rcirc-track-abbrevate-flag} to a non-@code{nil} value. This might be
|
||||
interesting if the IRC activities are not tracked in the mode line,
|
||||
but somewhere else.
|
||||
|
||||
@vindex rcirc-mode-hook
|
||||
If you prefer not to load @code{rcirc} immediately, you can delay the
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ from the alist with the @code{sc-mail-field} function. Thus, if the
|
|||
following fields were present in the original article:
|
||||
|
||||
@example
|
||||
Date:@: 08 Apr 1991 17:32:09 -0500
|
||||
Date:@: 08 April 1991, 17:32:09 EST
|
||||
Subject:@: Better get out your asbestos suit
|
||||
@end example
|
||||
|
||||
|
|
@ -415,7 +415,7 @@ then, the following lisp constructs return:
|
|||
|
||||
@example
|
||||
(sc-mail-field "date")
|
||||
==> "08 Apr 1991 17:32:09 -0500"
|
||||
==> "08 April 1991, 17:32:09 EST"
|
||||
|
||||
(sc-mail-field "subject")
|
||||
==> "Better get out your asbestos suit"
|
||||
|
|
|
|||
1080
doc/misc/texinfo.tex
1080
doc/misc/texinfo.tex
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,5 @@
|
|||
\input texinfo @c -*- mode: texinfo; coding: utf-8 -*-
|
||||
@setfilename ../../info/tramp.info
|
||||
@setfilename ../info/tramp
|
||||
@c %**start of header
|
||||
@include docstyle.texi
|
||||
@c In the Tramp GIT, the version number and the bug report address
|
||||
|
|
@ -361,7 +361,7 @@ Another way is to follow the terminal session below:
|
|||
@example
|
||||
@group
|
||||
$ cd ~/emacs
|
||||
$ git clone https://git.savannah.gnu.org/git/tramp.git
|
||||
$ git clone git://git.savannah.gnu.org/tramp.git
|
||||
@end group
|
||||
@end example
|
||||
|
||||
|
|
@ -927,27 +927,6 @@ pod is used.
|
|||
|
||||
This method does not support user names.
|
||||
|
||||
@item @option{toolbox}
|
||||
@cindex method @option{toolbox}
|
||||
@cindex @option{toolbox} method
|
||||
|
||||
Integration of Toolbox system containers. The host name may be either
|
||||
a container's name or ID, as returned by @samp{toolbox list -c}.
|
||||
Without a host name, the default Toolbox container for the host will
|
||||
be used.
|
||||
|
||||
This method does not support user names.
|
||||
|
||||
@item @option{flatpak}
|
||||
@cindex method @option{flatpak}
|
||||
@cindex @option{flatpak} method
|
||||
|
||||
Integration of Flatpak sandboxes. The host name may be either an
|
||||
application ID, a sandbox instance ID, or a PID, as returned by
|
||||
@samp{flatpak ps}.
|
||||
|
||||
This method does not support user names.
|
||||
|
||||
@end table
|
||||
|
||||
|
||||
|
|
@ -2393,11 +2372,10 @@ This uses also the settings in @code{tramp-sh-extra-args}.
|
|||
@vindex RemoteCommand@r{, ssh option}
|
||||
@strong{Note}: If you use an @option{ssh}-based method for connection,
|
||||
do @emph{not} set the @option{RemoteCommand} option in your
|
||||
@command{ssh} configuration to something like @command{screen}. If
|
||||
used, @option{RemoteCommand} must open an interactive shell on the
|
||||
remote host. On the other hand, some @option{ssh}-based methods, like
|
||||
@option{sshx} or @option{scpx}, silently overwrite a
|
||||
@option{RemoteCommand} option of the configuration file.
|
||||
@command{ssh} configuration, for example to @command{screen}. On the
|
||||
other hand, some @option{ssh}-based methods, like @option{sshx} or
|
||||
@option{scpx}, silently overwrite a @option{RemoteCommand} option of
|
||||
the configuration file.
|
||||
|
||||
|
||||
@subsection Other remote shell setup hints
|
||||
|
|
@ -2742,7 +2720,6 @@ entry, @option{Seconds between keepalives} option. Set this to 5.
|
|||
There is no counter which could be set.
|
||||
|
||||
|
||||
@anchor{Using ssh connection sharing}
|
||||
@subsection Using ssh connection sharing
|
||||
|
||||
@vindex ControlPath@r{, ssh option}
|
||||
|
|
@ -2772,33 +2749,20 @@ allows you to set the @option{ControlPath} provided the variable
|
|||
Note how @samp{%r}, @samp{%h} and @samp{%p} must be encoded as
|
||||
@samp{%%r}, @samp{%%h} and @samp{%%p}.
|
||||
|
||||
@vindex tramp-use-connection-share
|
||||
Using a predefined string in @code{tramp-ssh-controlmaster-options},
|
||||
or puzzling an own string, happens only when user option
|
||||
@code{tramp-use-connection-share} is set to @code{t}. If the
|
||||
@file{~/.ssh/config} file is configured appropriately for the above
|
||||
behavior, then any changes to @command{ssh} can be suppressed with
|
||||
this @code{nil} setting:
|
||||
@vindex tramp-use-ssh-controlmaster-options
|
||||
If the @file{~/.ssh/config} file is configured appropriately for the
|
||||
above behavior, then any changes to @command{ssh} can be suppressed
|
||||
with this @code{nil} setting:
|
||||
|
||||
@lisp
|
||||
(customize-set-variable 'tramp-use-connection-share nil)
|
||||
(customize-set-variable 'tramp-use-ssh-controlmaster-options nil)
|
||||
@end lisp
|
||||
|
||||
Sometimes, it is not possible to use OpenSSH's @option{ControlMaster}
|
||||
option for remote processes. This could result in concurrent access
|
||||
to the OpenSSH socket when reading data by different processes, which
|
||||
could block Emacs. In this case, setting
|
||||
@code{tramp-use-connection-share} to @code{suppress} disables shared
|
||||
access. It is not needed to set this user option permanently to
|
||||
@code{suppress}, binding the user option prior calling
|
||||
@code{make-process} is sufficient. @value{tramp} does this for
|
||||
esxample for compilation processes on its own.
|
||||
|
||||
@vindex ProxyCommand@r{, ssh option}
|
||||
@vindex ProxyJump@r{, ssh option}
|
||||
@code{tramp-use-connection-share} should also be set to @code{nil} or
|
||||
@code{suppress} if you use the @option{ProxyCommand} or
|
||||
@option{ProxyJump} options in your @command{ssh} configuration.
|
||||
This should also be set to @code{nil} if you use the
|
||||
@option{ProxyCommand} or @option{ProxyJump} options in your
|
||||
@command{ssh} configuration.
|
||||
|
||||
In order to use the @option{ControlMaster} option, @value{tramp} must
|
||||
check whether the @command{ssh} client supports this option. This is
|
||||
|
|
@ -2820,16 +2784,12 @@ Host *
|
|||
Check the @samp{ssh_config(5)} man page whether these options are
|
||||
supported on your proxy host.
|
||||
|
||||
On MS Windows, @code{tramp-use-connection-share} is set to @code{nil}
|
||||
by default, because the MS Windows and MSYS2 implementations of
|
||||
@command{OpenSSH} do not support this option properly.
|
||||
On MS Windows, @code{tramp-use-ssh-controlmaster-options} is set to
|
||||
@code{nil} by default, because the MS Windows and MSYS2
|
||||
implementations of @command{OpenSSH} do not support this option properly.
|
||||
|
||||
In PuTTY, you can achieve connection sharing in the
|
||||
@option{Connection/SSH} entry, enabling the @option{Share SSH
|
||||
connections if possible} option. @code{tramp-use-connection-share}
|
||||
must be set to @code{nil}. If @code{tramp-use-connection-share} is
|
||||
set to @code{t} or @code{suppress}, @command{plink} is called with the
|
||||
option @option{-share} or @option{-noshare}, respectively.
|
||||
In PuTTY, you can achieve connection sharing in the @option{Connection/SSH}
|
||||
entry, enabling the @option{Share SSH connections if possible} option.
|
||||
|
||||
|
||||
@subsection Configure direct copying between two remote servers
|
||||
|
|
@ -3213,11 +3173,6 @@ auto-saved files to the same directory as the original file.
|
|||
Alternatively, set the user option @code{tramp-auto-save-directory}
|
||||
to direct all auto saves to that location.
|
||||
|
||||
@c Since Emacs 30.
|
||||
@vindex remote-file-name-inhibit-auto-save
|
||||
If you want to suppress auto-saving of remote files at all, set user
|
||||
option @code{remote-file-name-inhibit-auto-save} to non-@code{nil}.
|
||||
|
||||
@c Since Emacs 29.
|
||||
@vindex remote-file-name-inhibit-auto-save-visited
|
||||
An alternative to @code{auto-save-mode} is
|
||||
|
|
@ -3516,7 +3471,12 @@ much more appropriate.
|
|||
|
||||
@value{tramp} can complete the following @value{tramp} file name
|
||||
components: method names, user names, host names, and file names
|
||||
located on remote hosts.
|
||||
located on remote hosts. User name and host name completion is
|
||||
activated only, if file name completion has one of the styles
|
||||
@code{basic}, @code{emacs21}, or @code{emacs22}.
|
||||
@ifinfo
|
||||
@xref{Completion Styles, , , emacs}.
|
||||
@end ifinfo
|
||||
|
||||
For example, type @kbd{C-x C-f @value{prefixwithspace} s @key{TAB}},
|
||||
@value{tramp} completion choices show up as
|
||||
|
|
@ -3550,7 +3510,10 @@ directory @file{/sbin} on your local host.
|
|||
Type @kbd{s h @value{postfixhop}} for the minibuffer completion to
|
||||
@samp{@value{prefix}ssh@value{postfixhop}}. Typing @kbd{@key{TAB}}
|
||||
shows host names @value{tramp} extracts from @file{~/.ssh/config}
|
||||
file, for example:
|
||||
@c bug#50387
|
||||
file, for example@footnote{Some completion styles, like
|
||||
@code{substring} or @code{flex}, require to type at least one
|
||||
character after the trailing @samp{@value{postfixhop}}.}.
|
||||
|
||||
@example
|
||||
@group
|
||||
|
|
@ -3978,12 +3941,12 @@ connection-local variables.
|
|||
|
||||
@vindex async-shell-command-width
|
||||
@vindex COLUMNS@r{, environment variable}
|
||||
@value{tramp} cares about the user option
|
||||
@code{async-shell-command-width} for asynchronous shell commands. It
|
||||
specifies the number of display columns for command output. For
|
||||
synchronous shell commands, a similar effect can be achieved by adding
|
||||
the environment variable @env{COLUMNS} to
|
||||
@code{tramp-remote-process-environment}.
|
||||
If Emacs supports the user option @code{async-shell-command-width}
|
||||
(since @w{Emacs 27}), @value{tramp} cares about its value for
|
||||
asynchronous shell commands. It specifies the number of display
|
||||
columns for command output. For synchronous shell commands, a similar
|
||||
effect can be achieved by adding the environment variable
|
||||
@env{COLUMNS} to @code{tramp-remote-process-environment}.
|
||||
|
||||
|
||||
@subsection Running @code{eshell} on a remote host
|
||||
|
|
@ -4333,10 +4296,9 @@ It does not use @code{tramp-remote-path}.
|
|||
In order to gain even more performance, it is recommended to bind
|
||||
@code{tramp-verbose} to 0 when running @code{make-process} or
|
||||
@code{start-file-process}. Furthermore, you might set
|
||||
@code{tramp-use-connection-share} to @code{nil} in order to bypass
|
||||
@value{tramp}'s handling of the @option{ControlMaster} options, and
|
||||
use your own settings in @file{~/.ssh/config}, @ref{Using ssh
|
||||
connection sharing}.
|
||||
@code{tramp-use-ssh-controlmaster-options} to @code{nil} in order to
|
||||
bypass @value{tramp}'s handling of the @option{ControlMaster} options,
|
||||
and use your own settings in @file{~/.ssh/config}.
|
||||
|
||||
|
||||
@node Cleanup remote connections
|
||||
|
|
@ -4377,6 +4339,7 @@ Flushes the current buffer's remote connection objects, the same as in
|
|||
Flushes all active remote connection objects, the same as in
|
||||
@code{tramp-cleanup-connection}. This command removes also ad-hoc
|
||||
proxy definitions (@pxref{Ad-hoc multi-hops}).
|
||||
|
||||
@end deffn
|
||||
|
||||
@deffn Command tramp-cleanup-all-buffers
|
||||
|
|
@ -4385,20 +4348,6 @@ connections and ad-hoc proxy definition are cleaned up in addition to
|
|||
killing all buffers related to remote connections.
|
||||
@end deffn
|
||||
|
||||
@deffn Command tramp-cleanup-some-buffers
|
||||
Similar to @code{tramp-cleanup-all-buffers}, where all remote
|
||||
connections and ad-hoc proxy definition are cleaned up. However,
|
||||
additional buffers are killed only if one of the functions in
|
||||
@code{tramp-cleanup-some-buffers-hook} returns @code{t}.
|
||||
@end deffn
|
||||
|
||||
@defopt tramp-cleanup-some-buffers-hook
|
||||
The functions in this hook determine, whether a remote buffer is
|
||||
killed when @code{tramp-cleanup-some-buffers} is called. Per default,
|
||||
remote buffers which are linked to a remote file, remote @code{dired}
|
||||
buffers, and buffers related to a remote process are cleaned up.
|
||||
@end defopt
|
||||
|
||||
|
||||
@node Renaming remote files
|
||||
@section Renaming remote files
|
||||
|
|
@ -4888,8 +4837,8 @@ Where is the latest @value{tramp}?
|
|||
@item
|
||||
Which systems does it work on?
|
||||
|
||||
The package works successfully on @w{Emacs 27}, @w{Emacs 28}, @w{Emacs
|
||||
29}, and @w{Emacs 30}.
|
||||
The package works successfully on @w{Emacs 26}, @w{Emacs 27}, @w{Emacs
|
||||
28}, and @w{Emacs 29}.
|
||||
|
||||
While Unix and Unix-like systems are the primary remote targets,
|
||||
@value{tramp} has equal success connecting to other platforms, such as
|
||||
|
|
@ -4947,36 +4896,6 @@ Disable file locks. Set @code{remote-file-name-inhibit-locks} to
|
|||
@code{t} if you know that different Emacs sessions are not modifying
|
||||
the same remote file.
|
||||
|
||||
@item
|
||||
@vindex remote-file-name-inhibit-auto-save
|
||||
Keep auto-save files local. This is already the default configuration
|
||||
in Emacs, don't change it. If you want to disable auto-saving for
|
||||
remote files at all, set @code{remote-file-name-inhibit-auto-save} to
|
||||
@code{t}, but think about the consequences!
|
||||
|
||||
If you want to disable auto-saving just for selected connections, for
|
||||
example due to security considerations, use connection-local variables
|
||||
in order to set @code{buffer-auto-save-file-name}. If you, for
|
||||
example, want to disable auto-saving for all @option{sudo}
|
||||
connections, apply the following code.
|
||||
@ifinfo
|
||||
@xref{Connection Variables, , , emacs}.
|
||||
@end ifinfo
|
||||
|
||||
@lisp
|
||||
@group
|
||||
(connection-local-set-profile-variables
|
||||
'my-auto-save-profile
|
||||
'((buffer-auto-save-file-name . nil)))
|
||||
@end group
|
||||
|
||||
@group
|
||||
(connection-local-set-profiles
|
||||
'(:application tramp :protocol "sudo")
|
||||
'my-auto-save-profile)
|
||||
@end group
|
||||
@end lisp
|
||||
|
||||
@item
|
||||
Disable excessive traces. Set @code{tramp-verbose} to 3 or lower,
|
||||
default being 3. Increase trace levels temporarily when hunting for
|
||||
|
|
@ -5291,7 +5210,6 @@ HISTFILE=/dev/null
|
|||
@item
|
||||
Where are remote files trashed to?
|
||||
|
||||
@vindex remote-file-name-inhibit-delete-by-moving-to-trash
|
||||
Emacs can trash file instead of deleting
|
||||
@ifinfo
|
||||
them, @ref{Misc File Ops, Trashing , , emacs}.
|
||||
|
|
@ -5299,10 +5217,9 @@ them, @ref{Misc File Ops, Trashing , , emacs}.
|
|||
@ifnotinfo
|
||||
them.
|
||||
@end ifnotinfo
|
||||
Remote files are always trashed to the local trash, except the user
|
||||
option @code{remote-file-name-inhibit-delete-by-moving-to-trash} is
|
||||
non-@code{nil}, or it is a remote encrypted file (@pxref{Keeping files
|
||||
encrypted}), which are deleted anyway.
|
||||
Remote files are always trashed to the local trash, except remote
|
||||
encrypted files (@pxref{Keeping files encrypted}), which are deleted
|
||||
anyway.
|
||||
|
||||
If Emacs is configured to use the XDG conventions for the trash
|
||||
directory, remote files cannot be restored with the respective tools,
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
@c In the Tramp GIT, the version number and the bug report address
|
||||
@c are auto-frobbed from configure.ac.
|
||||
@set trampver 2.7.0-pre
|
||||
@set trampver 2.6.0.29.1
|
||||
@set trampurl https://www.gnu.org/software/tramp/
|
||||
@set tramp-bug-report-address tramp-devel@@gnu.org
|
||||
@set emacsver 27.1
|
||||
@set emacsver 26.1
|
||||
|
||||
@c Other flags from configuration.
|
||||
@set instprefix /usr/local
|
||||
|
|
|
|||
22
etc/DEBUG
22
etc/DEBUG
|
|
@ -1007,28 +1007,6 @@ Address sanitization is incompatible with undefined-behavior
|
|||
sanitization, unfortunately. Address sanitization is also
|
||||
incompatible with the --with-dumping=unexec option of 'configure'.
|
||||
|
||||
*** Address poisoning/unpoisoning
|
||||
|
||||
When compiled with address sanitization, Emacs will also try to mark
|
||||
dead/free lisp objects as poisoned, forbidding them from being
|
||||
accessed without being unpoisoned first. This adds an extra layer
|
||||
of checking with objects in internal free lists, which may otherwise
|
||||
evade traditional use-after-free checks. To disable this, add
|
||||
'allow_user_poisoning=0' to ASAN_OPTIONS, or build Emacs with
|
||||
'-DGC_ASAN_POISON_OBJECTS=0' in CFLAGS.
|
||||
|
||||
While using GDB, memory addresses can be inspected by using helper
|
||||
functions additionally provided by the ASan library:
|
||||
|
||||
(gdb) call __asan_describe_address(ptr)
|
||||
|
||||
To check whether an address range is poisoned or not, use:
|
||||
|
||||
(gdb) call __asan_region_is_poisoned(ptr, 8)
|
||||
|
||||
Additional functions can be found in the header
|
||||
'sanitizer/asan_interface.h' in your compiler's headers directory.
|
||||
|
||||
** Running Emacs under Valgrind
|
||||
|
||||
Valgrind <https://valgrind.org/> is free software that can be useful
|
||||
|
|
|
|||
101
etc/EGLOT-NEWS
101
etc/EGLOT-NEWS
|
|
@ -12,100 +12,11 @@ This file is about changes in Eglot, the Emacs client for LSP
|
|||
(Language Server Protocol) distributed with GNU Emacs since Emacs
|
||||
version 29.1 and with GNU ELPA since 2018.
|
||||
|
||||
Note: references to some Eglot issues are presented as "github#nnnn".
|
||||
This refers to https://github.com/joaotavora/eglot/issues/. That is,
|
||||
to look up issue github#1234, go to
|
||||
Note: references to Eglot issues are presented as "github#nnnn".
|
||||
This refers to https://github.com/joaotavora/eglot/issues/.
|
||||
That is, to look up issue github#1234, go to
|
||||
https://github.com/joaotavora/eglot/issues/1234.
|
||||
|
||||
|
||||
* Changes in Eglot 1.15 (29/4/2023)
|
||||
|
||||
** Fix LSP "languageId" detection
|
||||
|
||||
Many servers today support multiple languages, meaning they can handle
|
||||
more than one file type in the same connection. This relies on the
|
||||
client supplying a ':languageId' string. Previously, Eglot calculated
|
||||
this string based on an imperfect heuristic and was often wrong. See
|
||||
github#1206.
|
||||
|
||||
** Fix problems with missing signature documentation (bug#62687)
|
||||
|
||||
** Reworked 'eglot-imenu'
|
||||
|
||||
Eglot's Imenu backend (used for M-x imenu among other extensions), has
|
||||
been reworked. Most newer servers respond to
|
||||
'textDocument/documentSymbol' with a vector of 'DocumentSymbol', not
|
||||
'SymbolInformation'. It's not worth it trying to make the two formats
|
||||
resemble each other. This also lays groundwork supporting a
|
||||
forthcoming "breadcrumb" feature of bug#58431.
|
||||
|
||||
** New command 'eglot-update'
|
||||
|
||||
This allows users to easily update to the latest version of Eglot.
|
||||
|
||||
|
||||
* Changes in Eglot 1.14 (3/4/2023)
|
||||
|
||||
** Faster, more responsive completion
|
||||
|
||||
Eglot takes advantage of LSP's "isIncomplete" flag in responses to
|
||||
completion requests to drive new completion-caching mechanism for the
|
||||
duration of each completion session. Once a full set of completions
|
||||
is obtained for a given position, the server needn't be contacted in
|
||||
many scenarios, resulting in significantly less communication
|
||||
overhead. This works with the popular Company package and stock
|
||||
completion-at-point interfaces.
|
||||
|
||||
A variable 'eglot-cache-session-completions', t by default, controls
|
||||
this. The mechanism was tested with ccls, jdtls, pylsp, golsp and
|
||||
clangd. Notably, the C/C++ language server Clangd version 15 has a
|
||||
bug in its "isIcomplete" flag (it is fixed in later versions). If you
|
||||
run into problems, disable this mechanism like so:
|
||||
|
||||
(add-hook 'c-common-mode-hook
|
||||
(lambda () (setq-local eglot-cache-session-completions nil)))
|
||||
|
||||
** At-point documentation less obtrusive in echo area
|
||||
|
||||
Eglot takes advantage of new features of ElDoc to separate short
|
||||
documentation strings from large ones, sending the former to be shown in
|
||||
the ElDoc's echo area and the latter to be shown in other outlets,
|
||||
such as the *eldoc* buffer obtainable with 'C-h .'.
|
||||
|
||||
** New variable 'eglot-prefer-plaintext'
|
||||
|
||||
Customize this to t to opt-in to docstrings in plain text instead of
|
||||
Markdown.
|
||||
|
||||
(bug#61373)
|
||||
|
||||
** Progress indicators inhabit the mode-line by default
|
||||
|
||||
To switch to the echo area, customize 'eglot-report-progress' to
|
||||
'messages'. To switch off progress reporting completely, set to nil.
|
||||
|
||||
** Snippet support is easier to enable
|
||||
|
||||
The user needn't manually activate 'yas-minor-mode' or
|
||||
'yas-global-mode'. If YASnippet is installed and the server supports
|
||||
snippets, it is used automatically, unless the symbol 'yasnippet' has
|
||||
been added to 'eglot-stay-out-of'.
|
||||
|
||||
|
||||
* Changes in Eglot 1.13 (15/03/2023)
|
||||
|
||||
** ELPA installations on Emacs 26.3 are supported again.
|
||||
|
||||
|
||||
* Changes in Eglot 1.12.29 (Eglot bundled with Emacs 29.1)
|
||||
|
||||
** Eglot can upgrade itself to the latest version.
|
||||
|
||||
The new command 'eglot-upgrade-eglot' works around behaviour in the
|
||||
existing 'package-install' command and the new 'package-upgrade'
|
||||
command which would prevent the user from easily grabbing the latest
|
||||
version as usual.
|
||||
|
||||
|
||||
* Changes in Eglot 1.12 (13/03/2023)
|
||||
|
||||
|
|
@ -129,7 +40,7 @@ The position-encoding scheme (UTF-8, UTF-16 or UTF-32) can now
|
|||
be negotiated with the server.
|
||||
|
||||
** More of the user's Eldoc configuration is respected.
|
||||
This change addresses the problems reported in many Eglot reports
|
||||
This change addresses the problems reported in many Elglot reports
|
||||
dating back to early 2021 at least.
|
||||
|
||||
(github#646, github#894, github#920, github#1031, github#1171).
|
||||
|
|
@ -175,7 +86,7 @@ systems (bug#58790).
|
|||
These modes are usually handled by the same server that handles the
|
||||
"classical mode".
|
||||
|
||||
** New servers csharp-ls and texlab added to 'eglot-server-programs'.
|
||||
** New servers chsharp-ls and texlab added to 'eglot-server-programs'.
|
||||
|
||||
** Assorted bugfixes.
|
||||
(bug#59824, bug#59338)
|
||||
|
|
@ -417,7 +328,7 @@ This disconnects the server after last managed buffer is killed.
|
|||
|
||||
(github#217, github#270)
|
||||
|
||||
** Completion support has been fixed.
|
||||
** Completion support support has been fixed.
|
||||
Among other things, consider LSP's "filterText" cookies, which enable
|
||||
a kind of poor-man's flex-matching for some backends.
|
||||
|
||||
|
|
|
|||
208
etc/ERC-NEWS
208
etc/ERC-NEWS
|
|
@ -11,210 +11,6 @@ This file is about changes in ERC, the powerful, modular, and
|
|||
extensible IRC (Internet Relay Chat) client distributed with
|
||||
GNU Emacs since Emacs version 22.1.
|
||||
|
||||
|
||||
* Changes in ERC 5.6
|
||||
|
||||
** Module 'keep-place' now offers a visual indicator.
|
||||
Remember your place in ERC buffers a bit more easily while retaining
|
||||
the freedom to look around. Optionally sync the indicator to any
|
||||
progress made when you haven't yet caught up to the live stream. See
|
||||
options 'erc-keep-place-indicator-style' and friends and new module
|
||||
'keep-place-indicator', which for now must be added manually to
|
||||
'erc-modules'.
|
||||
|
||||
** Module 'fill' now offers a style based on 'visual-line-mode'.
|
||||
This fill style mimics the "hanging indent" look of 'erc-fill-static'
|
||||
and provides some movement and editing commands to optionally tame the
|
||||
less familiar aspects of 'visual-line' behavior. An interactive
|
||||
helper called 'erc-fill-wrap-nudge' allows for dynamic "refilling" of
|
||||
buffers on the fly. Set 'erc-fill-function' to 'erc-fill-wrap' to get
|
||||
started.
|
||||
|
||||
** A unified interactive entry point.
|
||||
New users are often dismayed to discover that M-x ERC doesn't connect
|
||||
to its default network, Libera.Chat, over TLS. Though perhaps a
|
||||
decade overdue, this is no longer the case. Other UX improvements in
|
||||
this area aim to make the process of connecting interactively slightly
|
||||
more streamlined and less repetitive, even for veteran users.
|
||||
|
||||
** Revised buffer-display handling for interactive commands.
|
||||
A point of friction for new users and one only just introduced with
|
||||
ERC 5.5 has been the lack of visual feedback when first connecting via
|
||||
M-x erc or when issuing a "/JOIN" command at the prompt. As explained
|
||||
below, in the news for 5.5, the discovery of a security issue led to
|
||||
most new ERC buffers being "buried" on creation. On further
|
||||
reflection, this was judged to have been an overcorrection in the case
|
||||
of interactive invocations, hence the borrowing of an old option,
|
||||
'erc-query-display', and the bestowing of a new alias,
|
||||
'erc-interactive-display', which better describes its expanded role as
|
||||
a more general buffer-display knob for interactive commands ("/QUERY"
|
||||
still among them).
|
||||
|
||||
Accompanying this addition are "display"-suffixed aliases for related
|
||||
options 'erc-join-buffer' and 'erc-auto-query', which users have
|
||||
reported as being difficult to discover and remember. When the latter
|
||||
option (now known as 'erc-receive-query-display') is nil, ERC uses
|
||||
'erc-join-buffer' in its place, much like it does for
|
||||
'erc-interactive-display'. The old nil behavior can still be gotten
|
||||
via the new compatibility flag 'erc-receive-query-display-defer'.
|
||||
|
||||
** Setting a module's mode variable via Customize earns a warning.
|
||||
Trying and failing to activate a module via its minor mode's Custom
|
||||
widget has been an age-old annoyance for new users. Previously
|
||||
ineffective, this method now actually works, but it also admonishes
|
||||
users to edit the 'erc-modules' widget instead.
|
||||
|
||||
** The option 'erc-timestamp-use-align-to' is more versatile.
|
||||
While this option has always offered to right-align stamps via the
|
||||
'display' text property, it's now more effective at doing so when set
|
||||
to a number indicating an offset from the right edge. And when set to
|
||||
the symbol 'margin', it displays stamps in the right margin, although,
|
||||
at the moment, this is mostly intended for use by other modules, such
|
||||
as 'fill-wrap', described above. For both these variants, users of
|
||||
the 'log' module may want to customize 'erc-log-filter-function' to
|
||||
'erc-stamp-prefix-log-filter' to avoid ragged right-hand stamps
|
||||
appearing in their saved logs.
|
||||
|
||||
** Smarter reconnect handling for users on the move.
|
||||
ERC now offers a new, experimental reconnect strategy in the function
|
||||
'erc-server-delayed-check-reconnect', which tests for underlying
|
||||
connectivity before attempting to reconnect in earnest. See options
|
||||
'erc-server-reconnect-function' and 'erc-nickname-in-use-functions' to
|
||||
get started.
|
||||
|
||||
** Easily constrain all ERC-related business to a dedicated frame.
|
||||
The option 'erc-reuse-frames' can now be set to 'displayed', which
|
||||
tells ERC to show new buffers in frames already occupied by buffers
|
||||
from the same connection. This customization depends on the option
|
||||
'erc-buffer-display' (formerly 'erc-join-buffer') being set to
|
||||
'frame'. If you find the name 'displayed' unhelpful, please suggest
|
||||
an alternative by writing to the mailing list.
|
||||
|
||||
** Some keybindings are now set by modules rather than their libraries.
|
||||
To put it another way, simply loading a built-in module's library no
|
||||
longer modifies 'erc-mode-map'. Instead, modifications occur during
|
||||
module setup. This should not impact most user configs since ERC
|
||||
doesn't bother with keys already taken and only removes bindings it's
|
||||
previously created. Note that while all affected bindings still
|
||||
reside in 'erc-mode-map', future built-in modules will use their own
|
||||
minor-mode maps, and new third-party modules should do the same.
|
||||
|
||||
** The option 'erc-timestamp-format-right' has been deprecated.
|
||||
Having to account for this option prevented other ERC modules from
|
||||
easily determining what right-hand stamps would look like before
|
||||
insertion, which is knowledge needed for certain UI decisions. The
|
||||
way ERC has chosen to address this is imperfect and boils down to
|
||||
asking users who've customized this option to switch to
|
||||
'erc-timestamp-format' instead. If you're affected by this and feel
|
||||
that some other solution, like automatic migration, is justified,
|
||||
please make that known on the bug list.
|
||||
|
||||
** The 'nicknames' entry in 'erc-button-alist' is officially exceptional.
|
||||
It's no secret that the 'buttons' module treats potential nicknames
|
||||
specially. To simplify ERC's move to next-gen "rich UI" extensions,
|
||||
this special treatment is being canonized. From now on, all values
|
||||
other than the symbol 'erc-button-buttonize-nicks' appearing in the
|
||||
"FORM" field (third element) of this entry are considered deprecated
|
||||
and will incur a warning.
|
||||
|
||||
** Option 'erc-query-on-unjoined-chan-privmsg' restored and renamed.
|
||||
This option was accidentally removed from the default client in ERC
|
||||
5.5 and was thus prevented from influencing PRIVMSG routing. It's now
|
||||
been restored with a slightly revised role contingent on a few
|
||||
assumptions explained in its doc string. For clarity, it has been
|
||||
renamed 'erc-ensure-target-buffer-on-privmsg'.
|
||||
|
||||
** Miscellaneous UX changes.
|
||||
Some minor quality-of-life niceties have finally made their way to
|
||||
ERC. For example, the function 'erc-echo-timestamp' is now
|
||||
interactive and can be invoked on any message to view its timestamp in
|
||||
the echo area. The command 'erc-button-previous' now moves to the
|
||||
beginning instead of the end of buttons. And the 'irccontrols' module
|
||||
now supports additional colors and special handling for "spoilers"
|
||||
(hidden text).
|
||||
|
||||
** Changes in the library API.
|
||||
|
||||
*** Some top-level dependencies have been removed.
|
||||
The library 'erc-goodies' is no longer loaded by ERC's main library.
|
||||
This was done to further cement the move toward a unidirectional
|
||||
dependency flow begun in 5.5. Additionally, a few barely used and
|
||||
newly introduced dependencies are now lazily loaded, which may upset
|
||||
some third-party code. The first of these is 'pp' because its
|
||||
'pp-to-string' is autoloaded in all supported ERC versions. Also gone
|
||||
are 'thingatpt', 'time-date', and 'iso8601'. All were used ultra
|
||||
sparingly, and the latter two have only been around for one minor
|
||||
release cycle, so their removal hopefully won't cause much churn.
|
||||
|
||||
*** Some ERC-applied text properties have changed.
|
||||
Chiefly, 'rear-sticky' has been replaced by 'erc-command', which
|
||||
records the IRC command (or numeric) associated with a message. Less
|
||||
impactfully, the value of the 'field' property for ERC's prompt has
|
||||
changed from 't' to the more useful 'erc-prompt', although the
|
||||
property of the same name has been retained.
|
||||
|
||||
*** ERC now manages timestamp-related properties a bit differently.
|
||||
For starters, the 'cursor-sensor-functions' property no longer
|
||||
contains unique closures and thus no longer proves effective for
|
||||
traversing messages. To compensate, a new property, 'erc-timestamp',
|
||||
now spans message bodies but not the newlines delimiting them.
|
||||
Somewhat relatedly, the function 'erc-insert-aligned' has been
|
||||
deprecated and removed from the primary client code path.
|
||||
|
||||
*** The role of a module's Custom group is now more clearly defined.
|
||||
Associating built-in modules with Custom groups and provided library
|
||||
features has improved. More specifically, a module's group now enjoys
|
||||
the singular purpose of determining where the module's minor mode
|
||||
variable lives in the Customize interface. And although ERC is now
|
||||
slightly more adept at linking these entities, third-parties are still
|
||||
encouraged to keep a module's name aligned with its group's as well as
|
||||
the provided feature of its containing library, if only for the usual
|
||||
reasons of namespace hygiene and discoverability.
|
||||
|
||||
*** ERC now supports arbitrary CHANTYPES.
|
||||
Specifically, channels can be prefixed with any predesignated
|
||||
character, mainly to afford more flexibility to specialty services,
|
||||
like bridges to other protocols.
|
||||
|
||||
*** 'erc-cmd-HELP' recognizes subcommands.
|
||||
Some IRC "slash" commands are hierarchical and require users to
|
||||
specify a subcommand to actually carry out anything of consequence.
|
||||
Built-in modules can now provide more detailed help for a particular
|
||||
subcommand by telling ERC to defer to a specialized handler.
|
||||
|
||||
*** Longtime quasi modules have been made proper.
|
||||
The 'fill' module is now defined by 'define-erc-module'. The same
|
||||
goes for ERC's imenu integration, which has 'imenu' now appearing in
|
||||
the default value of 'erc-modules'.
|
||||
|
||||
*** Prompt input is split before 'erc-pre-send-functions' has a say.
|
||||
Hook members are now treated to input whose lines have already been
|
||||
adjusted to fall within the allowed length limit. For convenience,
|
||||
third-party code can request that the final input be "re-filled" prior
|
||||
to being sent. See doc string for details.
|
||||
|
||||
*** ERC's prompt survives the insertion of user input and messages.
|
||||
Previously, ERC's prompt and its input marker disappeared while
|
||||
running hooks during message insertion, and the position of its
|
||||
"insert marker" (ERC's per-buffer process mark) was inconsistent
|
||||
during these spells. To make insertion handling more predictable in
|
||||
preparation for incorporating various protocol extensions, the prompt
|
||||
and its bounding markers have become perennial fixtures. In rare
|
||||
cases, these changes may mean third-party code needs tweaking, for
|
||||
example, requiring the use of 'insert-before-markers' instead of
|
||||
'insert'. As always, users feeling unduly inconvenienced by these
|
||||
changes are encouraged to voice their concerns on the bug list.
|
||||
|
||||
*** Miscellaneous changes
|
||||
Two helper macros from GNU ELPA's Compat library are now available to
|
||||
third-party modules as 'erc-compat-call' and 'erc-compat-function'.
|
||||
In the area of buttons, 'Info-goto-node' has been supplanted by plain
|
||||
old 'info' in 'erc-button-alist', and the bracketed "<URL:...>"
|
||||
pattern entry has been removed because it was more or less redundant.
|
||||
And the "TAB" key is now bound to a new command, 'erc-tab', that only
|
||||
calls 'completion-at-point' when point is in the input area and
|
||||
module-specific commands, like 'erc-button-next', otherwise.
|
||||
|
||||
|
||||
* Changes in ERC 5.5
|
||||
|
||||
|
|
@ -359,8 +155,8 @@ In an effort to help further tame ERC's complexity, the variable
|
|||
'erc-default-recipients' is now expected to hold but a single target.
|
||||
As a consequence, functions like 'erc-add-default-channel' that
|
||||
imagine an alternate, aspirational model of buffer-target relations
|
||||
have been deprecated. Grep for their names in ChangeLog.4 for
|
||||
details.
|
||||
have been deprecated. See Emacs change-log entries from around July
|
||||
of 2022 for specifics.
|
||||
|
||||
A number of less consequential deprecations also debut in this
|
||||
release. For example, the function 'erc-auto-query' was deemed too
|
||||
|
|
|
|||
|
|
@ -89,9 +89,7 @@ Mathematics ∀ p ∈ world • hello p □
|
|||
Meetei Mayek (ꯃꯤꯇꯩ ꯃꯌꯦꯛ) ꯈꯨꯔꯨꯝꯖꯔꯤ
|
||||
Mende Kikakui (𞠀𞠁𞠂) 𞠛𞠉
|
||||
Modi (𑘦𑘻𑘚𑘲) 𑘡𑘦𑘭𑘿𑘎𑘰𑘨
|
||||
Mongolian Cyrillic (монгол хэл) Сайн байна уу?
|
||||
Mongolian Traditional (ᠮᠣᠩᠭᠣᠯ ᠪᠢᠴᠢᠭ᠋) ᠰᠠᠶᠢᠨ ᠪᠠᠶᠢᠨᠠ ᠤᠤ?
|
||||
|
||||
Mongolian (монгол хэл) Сайн байна уу?
|
||||
Northern Thai (ᨣᩣᩴᨾᩮᩬᩥᨦ / ᨽᩣᩈᩣᩃ᩶ᩣ᩠ᨶᨶᩣ) ᩈ᩠ᩅᩢᩔ᩠ᨯᩦᨣᩕᩢ᩠ᨸ
|
||||
Norwegian (norsk) Hei / God dag
|
||||
Odia (ଓଡ଼ିଆ) ନମସ୍କାର
|
||||
|
|
|
|||
4981
etc/NEWS.29
4981
etc/NEWS.29
File diff suppressed because it is too large
Load diff
33
etc/PROBLEMS
33
etc/PROBLEMS
|
|
@ -1239,20 +1239,6 @@ you should use an Emacs input method instead.
|
|||
|
||||
* X runtime problems
|
||||
|
||||
** X security problems
|
||||
|
||||
*** Emacs faces trouble when running as an untrusted client.
|
||||
|
||||
When Emacs is running as an untrusted client under X servers with the
|
||||
Security extension, it is unable to use some window manager features
|
||||
but reports them to the window manager anyway. This can lead to
|
||||
constant prompting by the window manager about Emacs being
|
||||
unresponsive. To resolve the problem, place:
|
||||
|
||||
(setq x-detect-server-trust t)
|
||||
|
||||
in your early-init.el.
|
||||
|
||||
** X keyboard problems
|
||||
|
||||
*** `x-focus-frame' fails to activate the frame.
|
||||
|
|
@ -1724,8 +1710,8 @@ which can be carried out at the same time:
|
|||
|
||||
7) If selecting text with the mouse is slow, the main culprit is
|
||||
likely `select-active-regions', coupled with a program monitoring
|
||||
the clipboard or primary selection on the X server you are
|
||||
connected to. Try turning that off.
|
||||
the clipboard on the X server you are connected to. Try turning
|
||||
that off.
|
||||
|
||||
However, over networks with moderate to high latency, with no
|
||||
clipboard monitor running, the bottleneck is likely to be
|
||||
|
|
@ -1735,12 +1721,6 @@ which can be carried out at the same time:
|
|||
cause Emacs features that relies on accurate mouse position
|
||||
reporting to stop working reliably.
|
||||
|
||||
8) If creating or resizing frames is slow, turn off
|
||||
`frame-resize-pixelwise' (this will not take effect until you
|
||||
create a new frame); then, enable `x-lax-frame-positioning'. This
|
||||
means frame placement will be less accurate, but makes frame
|
||||
creation, movement, and resize visibly faster.
|
||||
|
||||
*** Emacs gives the error, Couldn't find per display information.
|
||||
|
||||
This can result if the X server runs out of memory because Emacs uses
|
||||
|
|
@ -2708,15 +2688,6 @@ Emacs so that it isn't compiled with '-O5'.
|
|||
We list bugs in current versions here. See also the section on legacy
|
||||
systems.
|
||||
|
||||
*** On Solaris 10, running 'configure' with "/bin/sh" produces errors.
|
||||
The "/bin/sh" shell on Solaris is an ancient and non-POSIX shell, so
|
||||
we recommend not to use it. The Emacs 'configure' script should find
|
||||
an appropriate shell and re-exec itself with that shell, unless you
|
||||
force it to use "/bin/sh" by using "CONFIG_SHELL=/bin/sh" on the
|
||||
'configure' command line. So either don't use CONFIG_SHELL, or, if
|
||||
you'd rather pick the shell yourself, choose "/bin/bash" or "/bin/ksh"
|
||||
or "/usr/xpg4/bin/sh" instead.
|
||||
|
||||
*** On Solaris 10 sparc, Emacs crashes during the build while saving state.
|
||||
This was observed for Emacs 28.1 on Solaris 10 32-bit sparc, with
|
||||
Oracle Developer Studio 12.6 (Sun C 5.15). The failure was intermittent,
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
This directory contains icons for some inline symbols.
|
||||
|
||||
COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
|
||||
|
||||
Files: *.svg
|
||||
Author: Yuan Fu <casouri@gmail.com>
|
||||
Copyright (C) 2023 Free Software Foundation, Inc.
|
||||
License: GNU General Public License version 3 or later (see COPYING)
|
||||
|
||||
How I made these icons: I made them with Figma, and exported them into
|
||||
SVG. I made the shapes with vectors (SVG paths) rather than strokes,
|
||||
merged all the shapes into a single shape with union operation, and
|
||||
stripped filling attributes from the SVG files. This way the icons can
|
||||
be colored like normal text! I'm not exactly sure how it works, but as
|
||||
long as the icon uses SVG path, and there is only one path in the
|
||||
file, and there is no filling attributes, the icons can be colored as
|
||||
text.
|
||||
|
||||
FWIW, this is the command I used to strip filling attributes:
|
||||
|
||||
sed -i 's/fill="none"//g' <file>
|
||||
sed -i 's/fill="black"//g' <file>
|
||||
|
||||
Naming: Use underscore to separate styles, dash are considered normal
|
||||
character so you can use it for names. End with the intended optical
|
||||
size for the icon.
|
||||
|
||||
There should also be an order for all the keywords. Right now we have
|
||||
directions (left/right), circle, fill, and optical size. Among them,
|
||||
the order should be
|
||||
|
||||
1. direction
|
||||
2. circle
|
||||
3. fill
|
||||
4. size
|
||||
|
||||
E.g., arrow_right_circle_fill_16.
|
||||
|
||||
|
||||
|
||||
Every time you modify the SVG icons, please use the ImageMagick
|
||||
`convert' utility to convert them to PBM icons, for the sake of
|
||||
Emacsen that cannot display SVG images.
|
||||
Binary file not shown.
|
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6.58449 9.82778L3.75736 6.99807L2.3425 8.41164L6.58321 12.6562L13.6575 5.58837L12.2439 4.17351L6.58449 9.82778Z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 218 B |
Binary file not shown.
|
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14 4.5L14 7L8 12L2 7L2 4.5L8 9.5L14 4.5Z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 147 B |
Binary file not shown.
|
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11 3.05H8.5L4 8.00001L8.5 13H11L6.5 8.00001L11 3.05Z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 159 B |
Binary file not shown.
|
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.95455 3H7.45455L12 8L7.45455 13H4.95455L9.5 8L4.95455 3Z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 165 B |
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue