mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Merge from 'savannah/master'
This commit is contained in:
commit
7cf4f61fc5
610 changed files with 19301 additions and 8003 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -203,6 +203,11 @@ test/manual/indent/*.new
|
|||
test/lisp/gnus/mml-sec-resources/random_seed
|
||||
test/lisp/play/fortune-resources/fortunes.dat
|
||||
test/**/*.xml
|
||||
test/infra/android/**/*.class
|
||||
test/infra/android/**/*.dex
|
||||
test/infra/android/**/*.zip
|
||||
test/infra/android/**/*.jar
|
||||
test/infra/android/bin/build.sh
|
||||
|
||||
# ctags, etags.
|
||||
TAGS
|
||||
|
|
|
|||
43
ChangeLog.4
43
ChangeLog.4
|
|
@ -1,3 +1,44 @@
|
|||
2025-02-23 Stefan Kangas <stefankangas@gmail.com>
|
||||
|
||||
Mention CVE-2025-1244 in NEWS
|
||||
|
||||
* etc/NEWS: Document CVE-2025-1244.
|
||||
|
||||
For anyone looking to backport this, the fix is in commit
|
||||
820f0793f0b46448928905552726c1f1b999062f.
|
||||
|
||||
2025-02-23 Yuan Fu <casouri@gmail.com>
|
||||
|
||||
Use character position for ranges in treesit_sync_visible_region
|
||||
|
||||
* src/treesit.c (treesit_sync_visible_region): Use character position
|
||||
instead of byte position when comparing to ranges, because the
|
||||
ranges are in character position.
|
||||
|
||||
2025-02-21 Po Lu <luangruo@yahoo.com>
|
||||
|
||||
Fix reported Haiku build error in emacs-30.1-rc1
|
||||
|
||||
* src/haiku_support.cc (keysym_from_raw_char): Don't define
|
||||
duplicate cases on the previous release.
|
||||
|
||||
2025-02-20 Stefan Kangas <stefankangas@gmail.com>
|
||||
|
||||
Bump Emacs version to 30.1
|
||||
|
||||
* README:
|
||||
* configure.ac:
|
||||
* exec/configure.ac:
|
||||
* msdos/sed2v2.inp:
|
||||
* nt/README.W32: Bump Emacs version to 30.1.
|
||||
|
||||
2025-02-20 Stefan Kangas <stefankangas@gmail.com>
|
||||
|
||||
Update files for Emacs 30.1
|
||||
|
||||
* ChangeLog.4:
|
||||
* etc/AUTHORS: Update for Emacs 30.1.
|
||||
|
||||
2025-02-19 Po Lu <luangruo@yahoo.com>
|
||||
|
||||
Fix remaining Android bugs reported over the past months
|
||||
|
|
@ -203580,7 +203621,7 @@
|
|||
|
||||
This file records repository revisions from
|
||||
commit f2ae39829812098d8269eafbc0fcb98959ee5bb7 (exclusive) to
|
||||
commit 375c3622e2dac090c62d99baaaac1314f6c9c5e7 (inclusive).
|
||||
commit 1cda0967b4d3c815fc610794ad6a8fc2b913a3c5 (inclusive).
|
||||
See ChangeLog.3 for earlier changes.
|
||||
|
||||
;; Local Variables:
|
||||
|
|
|
|||
29
ChangeLog.5
Normal file
29
ChangeLog.5
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
2025-02-23 Stefan Kangas <stefankangas@gmail.com>
|
||||
|
||||
* Version 30.1 released.
|
||||
|
||||
This file records repository revisions from
|
||||
commit 1cda0967b4d3c815fc610794ad6a8fc2b913a3c5 (exclusive) to
|
||||
commit bcba098505e4f80eef41e4be9726f1f9868223f3 (inclusive).
|
||||
See ChangeLog.4 for earlier changes.
|
||||
|
||||
;; Local Variables:
|
||||
;; coding: utf-8
|
||||
;; End:
|
||||
|
||||
Copyright (C) 2025 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/>.
|
||||
19
INSTALL
19
INSTALL
|
|
@ -10,7 +10,7 @@ instructions in this file should be sufficient. For other
|
|||
configurations, we have additional specialized files:
|
||||
|
||||
. INSTALL.REPO if you build from a Git checkout
|
||||
. nt/INSTALL if you build for MS-Windows
|
||||
. nt/INSTALL if you build a native (non-Cygwin) Emacs for MS-Windows
|
||||
. nextstep/INSTALL if you build for GNUstep/macOS
|
||||
. java/INSTALL if you build for Android
|
||||
. msdos/INSTALL if you build for MS-DOS
|
||||
|
|
@ -294,12 +294,20 @@ Lisp code even if your system satisfies the build requirements, use the
|
|||
|
||||
DETAILED BUILDING AND INSTALLATION:
|
||||
|
||||
(This is for a Unix or Unix-like system. For GNUstep and macOS,
|
||||
see nextstep/INSTALL. For non-ancient versions of MS Windows, see
|
||||
the file nt/INSTALL. For MS-DOS and MS Windows 3.X, see msdos/INSTALL.)
|
||||
(This is for a Unix or Unix-like system (including Cygwin on
|
||||
MS-Windows). For GNUstep and macOS, see nextstep/INSTALL. For building
|
||||
a native Windows Emacs for non-ancient versions of MS Windows, see the
|
||||
file nt/INSTALL. For MS-DOS and MS Windows 3.X, see msdos/INSTALL.)
|
||||
|
||||
1) See BASIC INSTALLATION above for getting and configuring Emacs.
|
||||
|
||||
1a) For ordinary production builds, if you want to specify non-default
|
||||
compiler options via CFLAGS variable, we recommend against using
|
||||
optimization options -O3 or -Os, and also recommend not to use the
|
||||
compiler option -fsanitize=undefined. These are known to sometimes cause
|
||||
problems with the generated code, and we recommend using them only in
|
||||
debugging builds or for testing specific problems in Emacs.
|
||||
|
||||
2) In the unlikely event that 'configure' does not detect your system
|
||||
type correctly, consult './etc/MACHINES' to see what --host, --build
|
||||
options you should pass to 'configure'. That file also offers hints
|
||||
|
|
@ -534,6 +542,9 @@ to look in '/bar/mylib' for libraries, pass the -Og optimization
|
|||
switch to the compiler, and link against libfoo and libbar
|
||||
libraries in addition to the standard ones.
|
||||
|
||||
For ordinary production builds, we recommend against using -O3 and -Os
|
||||
in CFLAGS, and also against using -fsanitize=undefined compiler option.
|
||||
|
||||
For some libraries, like Gtk+, fontconfig and ALSA, 'configure' uses
|
||||
pkg-config to find where those libraries are installed.
|
||||
If you want pkg-config to look in special directories, you have to set
|
||||
|
|
|
|||
26
Makefile.in
26
Makefile.in
|
|
@ -160,7 +160,7 @@ sharedstatedir=@sharedstatedir@
|
|||
# a subdirectory of this.
|
||||
libexecdir=@libexecdir@
|
||||
|
||||
# Currently only used for the systemd service file.
|
||||
# Where to install object code libraries. Used for ELN_DESTDIR.
|
||||
libdir=@libdir@
|
||||
|
||||
# Where to install emacs-module.h.
|
||||
|
|
@ -207,15 +207,7 @@ desktopdir=$(datarootdir)/applications
|
|||
metainfodir=$(datarootdir)/metainfo
|
||||
|
||||
# Where the etc/emacs.service file is to be installed.
|
||||
# The system value (typically /usr/lib/systemd/user) can be
|
||||
# obtained with: pkg-config --variable=systemduserunitdir systemd
|
||||
# but that does not respect configure's prefix.
|
||||
# It is not clear where we should install this file when
|
||||
# prefix != /usr (or /usr/local?) (eg for non-root installs).
|
||||
# Other options include ~/.config/systemd/user/,
|
||||
# $XDG_RUNTIME_DIR/systemd/user/
|
||||
# It seems the user may end up having to make a manual link...
|
||||
systemdunitdir=$(libdir)/systemd/user
|
||||
systemduserunitdir=@systemduserunitdir@
|
||||
|
||||
# Where the etc/images/icons/hicolor directory is to be installed.
|
||||
icondir=$(datarootdir)/icons
|
||||
|
|
@ -886,14 +878,16 @@ install-etc:
|
|||
${srcdir}/etc/emacs.metainfo.xml > $${tmp}; \
|
||||
${INSTALL_DATA} $${tmp} "$(DESTDIR)${metainfodir}/${EMACS_NAME}.metainfo.xml"; \
|
||||
rm -f $${tmp}
|
||||
umask 022; $(MKDIR_P) "$(DESTDIR)$(systemdunitdir)"
|
||||
ifneq ($(systemduserunitdir),)
|
||||
umask 022; $(MKDIR_P) "$(DESTDIR)$(systemduserunitdir)"
|
||||
tmp=etc/emacs.tmpservice; rm -f $${tmp}; \
|
||||
sed -e '/^##/d' \
|
||||
-e "/^Documentation/ s/emacs(1)/${EMACS_NAME}(1)/" \
|
||||
-e "/^ExecStart/ s|emacs|${bindir}/${EMACS}|" \
|
||||
${srcdir}/etc/emacs.service > $${tmp}; \
|
||||
$(INSTALL_DATA) $${tmp} "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service"; \
|
||||
$(INSTALL_DATA) $${tmp} "$(DESTDIR)$(systemduserunitdir)/${EMACS_NAME}.service"; \
|
||||
rm -f $${tmp}
|
||||
endif
|
||||
thisdir=`pwd -P`; \
|
||||
cd ${iconsrcdir} || exit 1; umask 022 ; \
|
||||
for dir in */*/apps */*/mimetypes; do \
|
||||
|
|
@ -909,7 +903,7 @@ install-etc:
|
|||
done ; \
|
||||
done
|
||||
|
||||
### Install native compiled Lisp files.
|
||||
### Install native-compiled Lisp files.
|
||||
install-eln: lisp
|
||||
ifeq ($(HAVE_NATIVE_COMP),yes)
|
||||
umask 022 ; \
|
||||
|
|
@ -977,7 +971,9 @@ uninstall: uninstall-$(NTDIR) uninstall-doc uninstall-gsettings-schemas
|
|||
fi)
|
||||
-rm -f "$(DESTDIR)${desktopdir}/${EMACS_NAME}.desktop"
|
||||
-rm -f "$(DESTDIR)${metainfodir}/${EMACS_NAME}.metainfo.xml"
|
||||
-rm -f "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service"
|
||||
ifneq ($(systemduserunitdir),)
|
||||
-rm -f "$(DESTDIR)$(systemduserunitdir)/${EMACS_NAME}.service"
|
||||
endif
|
||||
ifneq (,$(use_gamedir))
|
||||
for file in snake-scores tetris-scores; do \
|
||||
file="$(DESTDIR)${gamedir}/$${file}"; \
|
||||
|
|
@ -1307,7 +1303,7 @@ emacslog = build-aux/gitlog-to-emacslog
|
|||
# The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ...,
|
||||
# ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX). $(CHANGELOG_N) stands for
|
||||
# the newest (highest-numbered) ChangeLog history file.
|
||||
CHANGELOG_HISTORY_INDEX_MAX = 4
|
||||
CHANGELOG_HISTORY_INDEX_MAX = 5
|
||||
CHANGELOG_N = ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX)
|
||||
|
||||
# Convert git commit log to ChangeLog file. make-dist uses this.
|
||||
|
|
|
|||
|
|
@ -28,12 +28,19 @@
|
|||
|
||||
(defvar add-log-time-format) ; in add-log
|
||||
|
||||
(defun admin--read-root-directory ()
|
||||
(read-directory-name "Emacs root directory: "
|
||||
source-directory nil t))
|
||||
|
||||
(defun admin--read-version ()
|
||||
(read-string "Version number: " emacs-version))
|
||||
|
||||
(defun add-release-logs (root version &optional date)
|
||||
"Add \"Version VERSION released.\" change log entries in ROOT.
|
||||
Also update the etc/HISTORY file.
|
||||
Root must be the root of an Emacs source tree.
|
||||
Optional argument DATE is the release date, default today."
|
||||
(interactive (list (read-directory-name "Emacs root directory: ")
|
||||
(interactive (list (admin--read-root-directory)
|
||||
(read-string "Version number: "
|
||||
(format "%s.%s" emacs-major-version
|
||||
emacs-minor-version))
|
||||
|
|
@ -91,12 +98,15 @@ Optional argument DATE is the release date, default today."
|
|||
(defvar admin-git-command (executable-find "git")
|
||||
"The `git' program to use.")
|
||||
|
||||
(defvar admin-android-version-code-regexp
|
||||
"\\bAuto-incrementing version code\\(?:.\\|\n\\)*\\([[:digit:]]\\{9\\}\\)$"
|
||||
"Regexp with which to detect the version code in AndroidManifest.xml.")
|
||||
|
||||
(defun set-version (root version)
|
||||
"Set Emacs version to VERSION in relevant files under ROOT.
|
||||
Root must be the root of an Emacs source tree."
|
||||
(interactive (list
|
||||
(read-directory-name "Emacs root directory: " source-directory)
|
||||
(read-string "Version number: " emacs-version)))
|
||||
(interactive (list (admin--read-root-directory)
|
||||
(admin--read-version)))
|
||||
(unless (file-exists-p (expand-file-name "src/emacs.c" root))
|
||||
(user-error "%s doesn't seem to be the root of an Emacs source tree" root))
|
||||
(unless admin-git-command
|
||||
|
|
@ -116,6 +126,11 @@ Root must be the root of an Emacs source tree."
|
|||
(rx (and "AC_INIT" (1+ (not (in ?,)))
|
||||
?, (0+ space) ?\[
|
||||
(submatch (1+ (in "0-9."))))))
|
||||
(set-version-in-file root "java/AndroidManifest.xml.in"
|
||||
(apply #'format "%02d%02d%02d000"
|
||||
(mapcar #'string-to-number
|
||||
(split-string version "\\.")))
|
||||
admin-android-version-code-regexp)
|
||||
(set-version-in-file root "nt/README.W32" version
|
||||
(rx (and "version" (1+ space)
|
||||
(submatch (1+ (in "0-9."))))))
|
||||
|
|
@ -213,9 +228,9 @@ Documentation changes might not have been completed!"))))
|
|||
(dolist (s '("Installation Changes" "Startup Changes" "Changes"
|
||||
"Editing Changes"
|
||||
"Changes in Specialized Modes and Packages"
|
||||
"New Modes and Packages"
|
||||
"Incompatible Lisp Changes"
|
||||
"Lisp Changes"))
|
||||
"New Modes and Packages"
|
||||
"Incompatible Lisp Changes"
|
||||
"Lisp Changes"))
|
||||
(insert (format "\n\n* %s in Emacs %s\n" s newshort)))
|
||||
(insert (format "\n\n* Changes in Emacs %s on \
|
||||
Non-Free Operating Systems\n" newshort)))
|
||||
|
|
@ -230,7 +245,7 @@ Non-Free Operating Systems\n" newshort)))
|
|||
"Set Emacs short copyright to COPYRIGHT in relevant files under ROOT.
|
||||
Root must be the root of an Emacs source tree."
|
||||
(interactive (list
|
||||
(read-directory-name "Emacs root directory: " nil nil t)
|
||||
(admin--read-root-directory)
|
||||
(read-string
|
||||
"Short copyright string: "
|
||||
(format "Copyright (C) %s Free Software Foundation, Inc."
|
||||
|
|
@ -289,8 +304,7 @@ Optional argument TYPE is type of output (nil means all)."
|
|||
(if noninteractive
|
||||
(or (pop command-line-args-left)
|
||||
default-directory)
|
||||
(read-directory-name "Emacs root directory: "
|
||||
source-directory nil t))))
|
||||
(admin--read-root-directory))))
|
||||
(list root
|
||||
(if current-prefix-arg
|
||||
(completing-read
|
||||
|
|
@ -772,8 +786,7 @@ Optional argument TYPE is type of output (nil means all)."
|
|||
(if noninteractive
|
||||
(or (pop command-line-args-left)
|
||||
default-directory)
|
||||
(read-directory-name "Emacs root directory: "
|
||||
source-directory nil t))))
|
||||
(admin--read-root-directory))))
|
||||
(list root
|
||||
(if current-prefix-arg
|
||||
(completing-read
|
||||
|
|
@ -861,8 +874,7 @@ $Date: %s $
|
|||
(if noninteractive
|
||||
(or (pop command-line-args-left)
|
||||
default-directory)
|
||||
(read-directory-name "Emacs root directory: "
|
||||
source-directory nil t))))
|
||||
(admin--read-root-directory))))
|
||||
(list root
|
||||
(read-string "Major version number: "
|
||||
(number-to-string emacs-major-version)))))
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ files.")
|
|||
("Rodney J. Whitby" "Rod Whitby")
|
||||
("Roland B. Roberts" "Roland B Roberts" "Roland Roberts")
|
||||
("Ron Schnell" "Ronnie Schnell")
|
||||
("Rudolf Schlatte" "Rudi Schlatte")
|
||||
("Rui-Tao Dong" "Rui-Tao Dong ~{6-HpLN~}")
|
||||
("Ryan Thompson" "Ryan .*rct@thompsonclan")
|
||||
(nil "rvs314")
|
||||
|
|
|
|||
|
|
@ -311,4 +311,3 @@ gen-clean:
|
|||
rm -f ${CHARSETS} ${SED_SCRIPT} ${TRANS_TABLE} ${srcdir}/charsets.stamp
|
||||
|
||||
maintainer-clean: gen-clean distclean
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,18 @@ eval 'exec perl -S $0 "$@"' # Portability kludge
|
|||
# Author: Martin Buchholz
|
||||
# This program is in the public domain.
|
||||
|
||||
# NOTE ADDED 2025-02-22:
|
||||
#
|
||||
# This is an old script that doesn't necessarily work very well with
|
||||
# today's sources. If anyone wants to fix it up, it might be worth the
|
||||
# effort, as it could help catch some mistakes that we have overlooked.
|
||||
#
|
||||
# If you want to work on this, consider fundamentally rethinking the
|
||||
# approach. Instead of flagging anything that *might* be an error,
|
||||
# maybe it should flag only things that we are *sure* are an error.
|
||||
# That would make it possible to run this as a matter of routine, just
|
||||
# as we already do with codespell (see "admin/run-codespell").
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use POSIX;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,16 @@
|
|||
Instructions to create pretest or release tarballs. -*- coding: utf-8 -*-
|
||||
-- originally written by Gerd Moellmann, amended by Francesco Potortì
|
||||
-- originally written by Gerd Möllmann, amended by Francesco Potortì
|
||||
with the initial help of Eli Zaretskii
|
||||
|
||||
|
||||
Preparations:
|
||||
|
||||
0. In order to upload to the GNU FTP server, you must be registered as
|
||||
an Emacs maintainer and have your GPG key acknowledged by the FTP
|
||||
people. Do this as soon as possible to avoid lead time. For
|
||||
instructions, see:
|
||||
<https://www.gnu.org/prep/maintain/html_node/Automated-Upload-Registration.html>.
|
||||
|
||||
Steps to take before starting on the first pretest in any release sequence:
|
||||
|
||||
0. The release branch (e.g. emacs-28) should already have been made
|
||||
|
|
@ -18,7 +26,7 @@ Steps to take before starting on the first pretest in any release sequence:
|
|||
the release branch, see admin/release-branch.txt, but it can't
|
||||
hurt to double check its value.) Commit cus-edit.el if changed.
|
||||
|
||||
3. Remove any old pretests from https://alpha.gnu.org/gnu/emacs/pretest.
|
||||
3. Remove any old pretests from <https://alpha.gnu.org/gnu/emacs/pretest>.
|
||||
You can use 'gnupload --delete' (see below for more gnupload details).
|
||||
(We currently don't bother with this.)
|
||||
|
||||
|
|
@ -224,12 +232,12 @@ General steps (for each step, check for possible errors):
|
|||
against the previous release (if this is the first pretest) or the
|
||||
previous pretest. If you did not make the previous pretest
|
||||
yourself, find it at <https://alpha.gnu.org/gnu/emacs/pretest>.
|
||||
Releases are of course at <https://ftp.gnu.org/pub/gnu/emacs/>.
|
||||
Releases are at <https://ftp.gnu.org/pub/gnu/emacs/>.
|
||||
|
||||
./admin/diff-tar-files emacs-OLD.tar emacs-NEW.tar
|
||||
|
||||
Alternatively, if you want to use the compressed tarballs (which
|
||||
diff-tar-files doesn't understand):
|
||||
Alternatively, if you want to do this manually using the compressed
|
||||
tarballs:
|
||||
|
||||
tar tJf emacs-OLD.tar.xz | sed -e 's,^[^/]*,,' | sort > old_tmp
|
||||
tar tJf emacs-NEW.tar.xz | sed -e 's,^[^/]*,,' | sort > new_tmp
|
||||
|
|
@ -289,14 +297,12 @@ General steps (for each step, check for possible errors):
|
|||
xz -c emacs-NEW.tar > emacs-NEW.tar.xz
|
||||
For pretests, just xz is probably fine (saves bandwidth).
|
||||
|
||||
Now you should upload the files to the GNU ftp server. In order to
|
||||
do that, you must be registered as an Emacs maintainer and have your
|
||||
GPG key acknowledged by the ftp people. For instructions, see
|
||||
https://www.gnu.org/prep/maintain/html_node/Automated-Upload-Registration.html
|
||||
The simplest method to upload is to use the gnulib
|
||||
Now you should upload the files to the GNU FTP server; your
|
||||
GPG key must already be accepted as described above.
|
||||
The simplest method of uploading is with the gnulib
|
||||
<https://www.gnu.org/s/gnulib/> script "build-aux/gnupload":
|
||||
|
||||
For a pretest:
|
||||
For a pretest or release candidate:
|
||||
gnupload [--user your@gpg.key.email] --to alpha.gnu.org:emacs/pretest \
|
||||
FILE.gz FILE.xz ...
|
||||
|
||||
|
|
@ -325,11 +331,11 @@ General steps (for each step, check for possible errors):
|
|||
FILE.sig, FILE.directive.asc.
|
||||
For a release, place the files in the /incoming/ftp directory.
|
||||
For a pretest, place the files in /incoming/alpha instead, so that
|
||||
they appear on https://alpha.gnu.org/.
|
||||
they appear on <https://alpha.gnu.org/>.
|
||||
|
||||
11. After five minutes, verify that the files are visible at
|
||||
https://alpha.gnu.org/gnu/emacs/pretest/ for a pretest, or
|
||||
https://ftp.gnu.org/gnu/emacs/ for a release.
|
||||
<https://alpha.gnu.org/gnu/emacs/pretest/> for a pretest, or
|
||||
<https://ftp.gnu.org/gnu/emacs/> for a release.
|
||||
|
||||
Download them and check the signatures and SHA1/SHA256 checksums.
|
||||
Check they build (./configure --with-native-compilation).
|
||||
|
|
@ -353,7 +359,7 @@ General steps (for each step, check for possible errors):
|
|||
sha1sum emacs-NEW.tar.xz
|
||||
sha256sum emacs-NEW.tar.xz
|
||||
|
||||
You can optionally sign the announcement email, preferably using
|
||||
You can optionally sign the announcement email using
|
||||
the same PGP key that you used for signing the tarball.
|
||||
(Use e.g. `M-x mml-secure-message-sign' in `message-mode' to sign
|
||||
an email.)
|
||||
|
|
@ -371,7 +377,7 @@ General steps (for each step, check for possible errors):
|
|||
UPDATING THE EMACS WEB PAGES AFTER A RELEASE
|
||||
|
||||
As soon as possible after a release, the Emacs web pages at
|
||||
https://www.gnu.org/software/emacs/ should be updated.
|
||||
<https://www.gnu.org/software/emacs/> should be updated.
|
||||
(See admin/notes/www for general information.)
|
||||
|
||||
The pages to update are:
|
||||
|
|
|
|||
77
admin/notes/jargon
Normal file
77
admin/notes/jargon
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
Glossary of Abbreviations, Acronyms, and Jargon
|
||||
|
||||
This document provides a list of common abbreviations, acronyms, and
|
||||
jargon used on emacs-devel@gnu.org. This is a non-exhaustive list.
|
||||
Feel free to expand as needed.
|
||||
|
||||
See also (info "(emacs) Glossary").
|
||||
|
||||
|
||||
## Glossary
|
||||
|
||||
bikeshedding – excessive discussion over minor details rather than
|
||||
focusing on the main issue
|
||||
bitrot – gradual deterioration of software due to changes in
|
||||
its environment or dependencies
|
||||
cockpit error - user error
|
||||
code smell – an indication that a section of code may have
|
||||
underlying issues or could be improved
|
||||
foo, bar, baz – generic placeholder names used in examples and
|
||||
documentation
|
||||
gross – an inelegant, messy, or overly complicated solution
|
||||
that works but is suboptimal; describes necessary
|
||||
workarounds or code that should ideally be improved
|
||||
hysterical raisins - historical reasons
|
||||
install on <foo> - push to Git branch <foo> in repository
|
||||
notabug - an issue reported as a bug but deemed to be
|
||||
expected behavior
|
||||
paper cut – a minor but annoying issue that should be easy to fix
|
||||
pilot error - user error
|
||||
yak shaving – engaging in a series of seemingly unrelated tasks
|
||||
to accomplish an initial goal
|
||||
wontfix – an issue reported as a bug but that won't be fixed,
|
||||
often due to design decisions or low priority
|
||||
|
||||
|
||||
## Abbreviations
|
||||
|
||||
AFAICT - as far as I can tell
|
||||
AFAIK - as far as I know
|
||||
AFAIR - as far as I remember
|
||||
AFAIU - as far as I understand
|
||||
AFK - away from keyboard
|
||||
AKA - also known as
|
||||
ASAP - as soon as possible
|
||||
BTW - by the way
|
||||
CL - Common Lisp
|
||||
DTRT - do the right thing
|
||||
DWIM - do what I mean
|
||||
ENOPATCH - no patch is attached
|
||||
FTR - for the record
|
||||
FWIW - for what it's worth
|
||||
FYI - for your information
|
||||
GNU - GNU is not Unix
|
||||
HTH - hope this helps
|
||||
IANAL - I am not a lawyer
|
||||
ICYMI - in case you missed it
|
||||
IIRC - if I recall correctly
|
||||
IIUC - if I understand correctly
|
||||
IMHO - in my humble opinion
|
||||
IMNSHO - in my not so humble opinion
|
||||
IMO - in my opinion
|
||||
IOW - in other words
|
||||
LGTM - looks good to me
|
||||
LMK - let me know
|
||||
OOO - out of office
|
||||
OOTB - out of the box
|
||||
OTOH - on the other hand
|
||||
SNAFU - situation normal, all fouled up
|
||||
TBD - to be determined
|
||||
TBH - to be honest
|
||||
TIA - thanks in advance
|
||||
TL;DR - too long; didn't read
|
||||
TRT - the right thing
|
||||
WFM - works for me
|
||||
WIP - work in progress
|
||||
WRT - with respect to
|
||||
YMMV - your mileage may vary
|
||||
|
|
@ -205,6 +205,7 @@ Emacs 22 translators:
|
|||
LANG Translator Status
|
||||
cs Pavel Janík
|
||||
de Sven Joachim
|
||||
es Elias Gabriel Perez
|
||||
fr Eric Jacoboni
|
||||
pl Włodek Bzyl
|
||||
pt-br Rodrigo Real
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@
|
|||
(insert "|\n||")
|
||||
(setq x 0))
|
||||
do (insert (symbol-name child) " ")
|
||||
do (cl-incf x (1+ child-len)) )
|
||||
do (incf x (1+ child-len)) )
|
||||
do (insert "\n")))
|
||||
(require 'org-table)
|
||||
(declare-function org-table-align "org")
|
||||
|
|
|
|||
|
|
@ -1004,7 +1004,7 @@ Property value is a symbol `o' (Open), `c' (Close), or `n' (None)."
|
|||
(dotimes (i (length vec))
|
||||
(dolist (elt (aref vec i))
|
||||
(if (symbolp elt)
|
||||
(cl-incf (alist-get elt (cdr word-list) 0)))))
|
||||
(incf (alist-get elt (cdr word-list) 0)))))
|
||||
(set-char-table-range table (cons start limit) vec))))))
|
||||
(setq word-list (sort (cdr word-list)
|
||||
#'(lambda (x y) (> (cdr x) (cdr y)))))
|
||||
|
|
|
|||
132
configure.ac
132
configure.ac
|
|
@ -481,6 +481,24 @@ AC_SUBST([HAVE_PDUMPER])
|
|||
DUMPING=$with_dumping
|
||||
AC_SUBST([DUMPING])
|
||||
|
||||
dnl Where the etc/emacs.service file is to be installed.
|
||||
dnl We use $(prefix)/lib/systemd/user as default, but this may not be
|
||||
dnl in systemd's search path when prefix is neither /usr nor /usr/local.
|
||||
dnl In that case (e.g. for non-root installs) the location can be
|
||||
dnl specified with the configure option.
|
||||
dnl See https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#id-1.8.5
|
||||
dnl for documentation of systemd's unit file load path.
|
||||
AC_ARG_WITH([systemduserunitdir],
|
||||
[AS_HELP_STRING([--with-systemduserunitdir=DIR],
|
||||
[directory for systemd user unit file;
|
||||
default 'PREFIX/usr/lib/systemd/user'])],
|
||||
[systemduserunitdir=${withval}],
|
||||
[systemduserunitdir='${prefix}/lib/systemd/user'])
|
||||
if test "${systemduserunitdir}" = "no"; then
|
||||
systemduserunitdir=''
|
||||
fi
|
||||
AC_SUBST([systemduserunitdir])
|
||||
|
||||
dnl FIXME currently it is not the last.
|
||||
dnl This should be the last --with option, because --with-x is
|
||||
dnl added later on when we find the file name of X, and it's best to
|
||||
|
|
@ -3233,8 +3251,68 @@ AC_CACHE_CHECK(
|
|||
fi])
|
||||
doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
|
||||
|
||||
AC_CHECK_ALIGNOF([int])
|
||||
AC_CHECK_ALIGNOF([long])
|
||||
AC_CHECK_ALIGNOF([long long])
|
||||
AC_CHECK_SIZEOF([long])
|
||||
|
||||
AC_CACHE_CHECK([for struct alignment],
|
||||
[emacs_cv_struct_alignment],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <stddef.h>
|
||||
struct s { char c; } __attribute__ ((aligned (8)));
|
||||
struct t { char c; struct s s; };
|
||||
char verify[offsetof (struct t, s) == 8 ? 1 : -1];
|
||||
]])],
|
||||
[emacs_cv_struct_alignment=yes],
|
||||
[emacs_cv_struct_alignment=no])])
|
||||
if test "$emacs_cv_struct_alignment" = yes; then
|
||||
AC_DEFINE([HAVE_STRUCT_ATTRIBUTE_ALIGNED], [1],
|
||||
[Define to 1 if 'struct __attribute__ ((aligned (N)))' aligns the
|
||||
structure to an N-byte boundary.])
|
||||
fi
|
||||
|
||||
system_malloc=yes
|
||||
|
||||
# If it appears as if the system malloc can't be trusted to return
|
||||
# adequately positioned memory, enable the GNU malloc, which more
|
||||
# consistently provides allocations at low addresses, as is required for
|
||||
# the pdumper to load dump files at a representable location.
|
||||
AS_IF([test "$with_pdumper" = "yes" && test "$with_wide_int" != "yes"],
|
||||
AC_CHECK_HEADERS([stdalign.h])
|
||||
[AC_CACHE_CHECK([whether alignas is required yet unavailable],
|
||||
[emacs_cv_alignas_unavailable],
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#ifdef HAVE_STDALIGN_H
|
||||
#include <stdalign.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
]], [[
|
||||
#define IDEAL_GCALIGNMENT 8
|
||||
#if INTPTR_MAX <= INT_MAX && !defined WIDE_EMACS_INT
|
||||
# define ALIGNOF_EMACS_INT ALIGNOF_INT
|
||||
# elif INTPTR_MAX <= LONG_MAX && !defined WIDE_EMACS_INT
|
||||
# define ALIGNOF_EMACS_INT ALIGNOF_LONG
|
||||
# elif INTPTR_MAX <= LLONG_MAX
|
||||
# define ALIGNOF_EMACS_INT ALIGNOF_LONG_LONG
|
||||
# else
|
||||
# error "INTPTR_MAX too large"
|
||||
#endif
|
||||
|
||||
#if (ALIGNOF_EMACS_INT < IDEAL_GCALIGNMENT && !defined alignas \
|
||||
&& !defined HAVE_STRUCT_ATTRIBUTE_ALIGNED \
|
||||
&& !defined __alignas_is_defined \
|
||||
&& __STDC_VERSION__ < 202311 && __cplusplus < 201103)
|
||||
#error "!USE_LSB_TAG required"
|
||||
#endif
|
||||
]])], [emacs_cv_alignas_unavailable=no],
|
||||
[emacs_cv_alignas_unavailable=yes])])
|
||||
AS_IF([test "$emacs_cv_alignas_unavailable" = "yes"],
|
||||
[system_malloc=no
|
||||
AC_MSG_WARN([The GNU memory manager will be enabled as your system
|
||||
does not guarantee that the portable dumper can allocate memory at a suitably
|
||||
low address.])])])
|
||||
|
||||
dnl This must be before the test of $ac_cv_func_sbrk below.
|
||||
AC_CHECK_FUNCS_ONCE([sbrk])
|
||||
|
||||
|
|
@ -4441,6 +4519,7 @@ fi
|
|||
### End of font-backend (under any platform) section.
|
||||
|
||||
### Start of font-backend (under X11) section.
|
||||
is_xft_version_outdated=no
|
||||
if test "${HAVE_X11}" = "yes"; then
|
||||
if test $HAVE_CAIRO = yes; then
|
||||
dnl Strict linkers fail with
|
||||
|
|
@ -4489,7 +4568,20 @@ if test "${HAVE_X11}" = "yes"; then
|
|||
|
||||
if test "${HAVE_XFT}" = "yes"; then
|
||||
AC_DEFINE([HAVE_XFT], [1], [Define to 1 if you have the Xft library.])
|
||||
AC_SUBST([XFT_LIBS])
|
||||
AC_SUBST([XFT_LIBS])
|
||||
AC_CACHE_CHECK([whether libXft is not recent enough to support color fonts],
|
||||
[emacs_cv_is_xft_version_outdated],
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xft/Xft.h>
|
||||
#if XftVersion < 20306
|
||||
#error "Xft < 2.3.6"
|
||||
#endif /* XftVersion < 20306 */
|
||||
]], [])],
|
||||
[emacs_cv_is_xft_version_outdated=no],
|
||||
[emacs_cv_is_xft_version_outdated=yes])])
|
||||
is_xft_version_outdated=$emacs_cv_is_xft_version_outdated
|
||||
C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
|
||||
fi # "${HAVE_XFT}" = "yes"
|
||||
CPPFLAGS=$OLD_CPPFLAGS
|
||||
|
|
@ -5033,16 +5125,16 @@ AC_DEFUN([libgccjit_smoke_test], [
|
|||
}]])])
|
||||
|
||||
AC_DEFUN([libgccjit_not_found_err], [
|
||||
AC_MSG_ERROR([ELisp native compiler was requested, but libgccjit was not found.
|
||||
AC_MSG_ERROR([Lisp native compiler was requested, but libgccjit was not found.
|
||||
Please try installing libgccjit or a similar package.
|
||||
If you are sure you want Emacs be compiled without ELisp native compiler,
|
||||
If you are sure you want Emacs be compiled without the Lisp native compiler,
|
||||
pass the --without-native-compilation option to configure.])])
|
||||
|
||||
AC_DEFUN([libgccjit_dev_not_found_err], [
|
||||
AC_MSG_ERROR([ELisp native compiler was requested, but libgccjit header files were
|
||||
AC_MSG_ERROR([Lisp native compiler was requested, but libgccjit header files were
|
||||
not found.
|
||||
Please try installing libgccjit-dev or a similar package.
|
||||
If you are sure you want Emacs be compiled without ELisp native compiler,
|
||||
If you are sure you want Emacs be compiled without the Lisp native compiler,
|
||||
pass the --without-native-compilation option to configure.])])
|
||||
|
||||
AC_DEFUN([libgccjit_broken_err], [
|
||||
|
|
@ -5194,7 +5286,7 @@ if test "${with_native_compilation}" != "no"; then
|
|||
LIBS=$SAVE_LIBS
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([NATIVE_ELISP_SUFFIX], [".eln"],
|
||||
[System extension for native compiled elisp])
|
||||
[System extension for native-compiled elisp])
|
||||
AC_SUBST([HAVE_NATIVE_COMP])
|
||||
AC_SUBST([LIBGCCJIT_CFLAGS])
|
||||
AC_SUBST([LIBGCCJIT_LIBS])
|
||||
|
|
@ -5887,7 +5979,6 @@ AC_SUBST([HAVE_LIBSECCOMP])
|
|||
AC_SUBST([LIBSECCOMP_LIBS])
|
||||
AC_SUBST([LIBSECCOMP_CFLAGS])
|
||||
|
||||
AC_CHECK_SIZEOF([long])
|
||||
SIZEOF_LONG="$ac_cv_sizeof_long"
|
||||
AC_SUBST([SIZEOF_LONG])
|
||||
|
||||
|
|
@ -7250,22 +7341,6 @@ else
|
|||
fi
|
||||
AC_SUBST([LIBXMENU])
|
||||
|
||||
AC_CACHE_CHECK([for struct alignment],
|
||||
[emacs_cv_struct_alignment],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <stddef.h>
|
||||
struct s { char c; } __attribute__ ((aligned (8)));
|
||||
struct t { char c; struct s s; };
|
||||
char verify[offsetof (struct t, s) == 8 ? 1 : -1];
|
||||
]])],
|
||||
[emacs_cv_struct_alignment=yes],
|
||||
[emacs_cv_struct_alignment=no])])
|
||||
if test "$emacs_cv_struct_alignment" = yes; then
|
||||
AC_DEFINE([HAVE_STRUCT_ATTRIBUTE_ALIGNED], [1],
|
||||
[Define to 1 if 'struct __attribute__ ((aligned (N)))' aligns the
|
||||
structure to an N-byte boundary.])
|
||||
fi
|
||||
|
||||
AC_C_RESTRICT
|
||||
AC_C_TYPEOF
|
||||
|
||||
|
|
@ -7885,12 +7960,11 @@ you can continue to support by using '$0 --with-pop'.])
|
|||
esac
|
||||
fi
|
||||
|
||||
if test "${HAVE_XFT}" = yes; then
|
||||
AC_MSG_WARN([This configuration uses libXft, which has a number of
|
||||
font rendering issues, and is being considered for removal in the
|
||||
next release of Emacs. Please consider using Cairo graphics +
|
||||
HarfBuzz text shaping instead (they are auto-detected if the
|
||||
relevant development headers are installed).])
|
||||
if test "${HAVE_XFT}" = yes && test "$is_xft_version_outdated" = "yes"; then
|
||||
AC_MSG_WARN([This configuration uses a version of libXft earlier than 2.3.6,
|
||||
which is impacted by a number of rendering issues up to and including
|
||||
crashes. Please consider using Cairo graphics instead (they are
|
||||
auto-detected if the relevant development headers are installed).])
|
||||
fi
|
||||
|
||||
if test "${HAVE_CAIRO}" = "yes" && test "${HAVE_HARFBUZZ}" = no; then
|
||||
|
|
|
|||
|
|
@ -145,8 +145,8 @@ attempts to open the file with the wrapper will fail.
|
|||
@cindex /content/by-authority directory, android
|
||||
@cindex /content/by-authority-named directory, android
|
||||
Some files are given to Emacs as ``content identifiers'' that the
|
||||
system provides access to outside the normal filesystem APIs. Emacs
|
||||
uses pseudo-directories named @file{/content/by-authority} and
|
||||
system provides access to independently of the normal filesystem APIs.
|
||||
Emacs uses pseudo-directories named @file{/content/by-authority} and
|
||||
@file{/content/by-authority-named} to access those files. Do not make
|
||||
any assumptions about the contents of these directories, or try to open
|
||||
files in it yourself.
|
||||
|
|
@ -227,9 +227,9 @@ system settings.
|
|||
|
||||
@item
|
||||
Directories provided by @dfn{document providers} on Android 5.0 and
|
||||
later. These directories exist outside the normal Unix filesystem,
|
||||
containing files provided by external programs (@pxref{Android
|
||||
Document Providers}.)
|
||||
later. These directories exist independently of the Unix virtual
|
||||
filesystem, containing files provided by external programs
|
||||
(@pxref{Android Document Providers}.)
|
||||
@end itemize
|
||||
|
||||
Despite ordinary installations of Android not having files within
|
||||
|
|
@ -324,9 +324,8 @@ its name to the command @code{android-relinquish-directory-access}.
|
|||
The same limitations applied to the @file{/assets} directory
|
||||
(@pxref{Android File System}) are applied when creating sub-processes
|
||||
within those directories, because they do not exist within the Unix
|
||||
file-system. In addition, although Emacs can normally write and
|
||||
create files inside these directories, it cannot create symlinks or
|
||||
hard links.
|
||||
file-system. In addition, although Emacs can normally write and create
|
||||
files inside these directories, it cannot create symlinks or hard links.
|
||||
|
||||
Since document providers are allowed to perform expensive network
|
||||
operations to obtain file contents, a file access operation within one
|
||||
|
|
@ -1204,3 +1203,45 @@ installation within Emacs's home directory.
|
|||
In addition to the projects mentioned above, statically linked
|
||||
binaries for most Linux kernel-based systems can also be run on
|
||||
Android.
|
||||
|
||||
@cindex XDG MIME database, Android
|
||||
@cindex displaying SVG images with embeds, Android
|
||||
Emacs can be configured with support for viewing SVG image files by
|
||||
means of the @code{librsvg} library. In SVG files, there may be
|
||||
references to other images on the file-system, whose format
|
||||
@code{librsvg} cannot detect by default, and which will be rendered as
|
||||
blank squares unless an XDG-compliant @dfn{MIME database} is installed
|
||||
into the directory @file{.local/share/mime} within your home directory.
|
||||
|
||||
As the XDG @code{shared-mime-info} tools must be available to generate
|
||||
such a database, it is recommended to produce this database in a
|
||||
temporary directory on a GNU/Linux or Unix system, before transferring
|
||||
the same to the recipient Android device. With the latest release of
|
||||
@code{shared-mime-info} installed, create a temporary directory in which
|
||||
to generate the MIME database, copy the default
|
||||
@file{freedesktop.org.in} MIME catalog to a directory named
|
||||
@file{packages}, and execute @code{update-mime-info} to generate the
|
||||
database:
|
||||
|
||||
@example
|
||||
$ mkdir -p my-mime-database/packages
|
||||
$ cp /usr/share/mime/packages/freedesktop.org.xml my-mime-database/packages
|
||||
$ update-mime-info my-mime-database
|
||||
@end example
|
||||
|
||||
This may print a series of notices stating that the MIME database
|
||||
specified is not in the search path on your host system, which are of no
|
||||
consequence. Proceed by transferring the contents of the MIME database
|
||||
to the recipient system, e.g., to
|
||||
@file{/sdcard/Download/my-mime-database.tar.gz}:
|
||||
|
||||
@example
|
||||
$ cd; mkdir -p .local/share
|
||||
$ tar xfz /sdcard/Download/my-mime-database.tar.gz
|
||||
$ mv my-mime-database .local/share/mime
|
||||
$ rm /sdcard/Download/my-mime-database.tar.gz
|
||||
@end example
|
||||
|
||||
If your Emacs session has already attempted to display an SVG image with
|
||||
embeds, Emacs must be restarted before the new MIME database will enter
|
||||
into effect.
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ Here is an example of a buffer list:
|
|||
|
||||
@smallexample
|
||||
CRM Buffer Size Mode File
|
||||
. * .emacs 3294 ELisp/l ~/.emacs
|
||||
. * .emacs 3294 Elisp/l ~/.emacs
|
||||
% *Help* 101 Help
|
||||
search.c 86055 C ~/cvs/emacs/src/search.c
|
||||
% src 20959 Dired by name ~/cvs/emacs/src/
|
||||
|
|
|
|||
|
|
@ -1580,7 +1580,7 @@ Emacs Lisp Reference Manual}.
|
|||
@cindex native compilation
|
||||
Emacs Lisp code can also be compiled into @dfn{native code}: machine
|
||||
code not unlike the one produced by a C or Fortran compiler. Native
|
||||
code runs even faster than byte-code. Natively-compiled Emacs Lisp
|
||||
code runs even faster than byte-code. Natively compiled Emacs Lisp
|
||||
code is stored in files whose names end in @samp{.eln}. @xref{Native
|
||||
Compilation,, Native Compilation, elisp, the Emacs Lisp Reference Manual}.
|
||||
|
||||
|
|
@ -1660,7 +1660,7 @@ way, you don't need to modify the default value of @code{load-path}.
|
|||
|
||||
@vindex native-comp-eln-load-path
|
||||
Similarly to @code{load-path}, the list of directories where Emacs
|
||||
looks for @file{*.eln} files with natively-compiled Lisp code is
|
||||
looks for @file{*.eln} files with native-compiled Lisp code is
|
||||
specified by the variable @code{native-comp-eln-load-path}.
|
||||
|
||||
@cindex autoload
|
||||
|
|
|
|||
|
|
@ -460,6 +460,15 @@ View the file described on the current line, with View mode
|
|||
(@code{dired-view-file}). View mode provides convenient commands to
|
||||
navigate the buffer but forbids changing it; @xref{View Mode}.
|
||||
|
||||
@item @@
|
||||
@kindex @@ @r{(Dired)}
|
||||
@findex tramp-dired-find-file-with-sudo
|
||||
Open the file described on the current line, with superuser, or root,
|
||||
permissions (@code{tramp-dired-find-file-with-sudo}). If called with a
|
||||
@kbd{C-u} prefix argument, it prompts for another Tramp method to use
|
||||
other than the default, @option{sudo}. @xref{Ad-hoc multi-hops, Tramp,,
|
||||
tramp, The Tramp Manual}.
|
||||
|
||||
@item ^
|
||||
@kindex ^ @r{(Dired)}
|
||||
@findex dired-up-directory
|
||||
|
|
@ -1860,8 +1869,9 @@ names of the marked (or next @var{n}) files into the kill ring, as if
|
|||
you had killed them with @kbd{C-w}. The names are separated by a
|
||||
space.
|
||||
|
||||
With a zero prefix argument, this uses the absolute file name of
|
||||
each marked file. With just @kbd{C-u} as the prefix argument, it uses
|
||||
With a zero prefix argument, this uses the absolute file name of each
|
||||
marked file. With prefix value 1, it uses names relative to the
|
||||
project root. With just @kbd{C-u} as the prefix argument, it uses
|
||||
file names relative to the Dired buffer's default directory. (This
|
||||
can still contain slashes if in a subdirectory.) As a special case,
|
||||
if point is on a directory header line, @kbd{w} gives you the absolute
|
||||
|
|
|
|||
|
|
@ -1174,6 +1174,17 @@ the major mode actually turned on as result of reverting a buffer
|
|||
depends on mode remapping, and could be different from the original mode
|
||||
if you customized @code{major-mode-remap-alist} in-between.
|
||||
|
||||
@cindex reverting with superuser permissions
|
||||
@cindex reverting with root permissions
|
||||
@findex tramp-revert-buffer-with-sudo
|
||||
@kindex C-x x @@
|
||||
The @kbd{C-x x @@} keystroke is bound to the
|
||||
@code{tramp-revert-buffer-with-sudo} command. This visits the file
|
||||
again, but with superuser, or root, permissions. If called with a
|
||||
@kbd{C-u} prefix argument, it prompts for another Tramp method to use
|
||||
other than the default, @option{sudo}. @xref{Ad-hoc multi-hops, Tramp,,
|
||||
tramp, The Tramp Manual}.
|
||||
|
||||
@node Auto Revert
|
||||
@section Auto Revert: Keeping buffers automatically up-to-date
|
||||
@cindex Global Auto Revert mode
|
||||
|
|
@ -1784,7 +1795,9 @@ confirm you really want to revert and kill the hunk. You can customize
|
|||
@findex diff-apply-buffer
|
||||
@item C-c @key{RET} a
|
||||
Apply all the hunks in the buffer (@code{diff-apply-buffer}). If the
|
||||
diffs were applied successfully, save the changed buffers.
|
||||
region is active, apply all hunks that the region overlaps; otherwise,
|
||||
apply all hunks. With a prefix argument, reverse-apply the hunks.
|
||||
If the diffs were applied successfully, save the changed buffers.
|
||||
|
||||
@findex diff-delete-other-hunks
|
||||
@item C-c @key{RET} n
|
||||
|
|
|
|||
|
|
@ -964,6 +964,9 @@ select. For example, in Rmail mode, the speedbar shows a list of Rmail
|
|||
files, and lets you move the current message to another Rmail file by
|
||||
clicking on its @samp{<M>} box.
|
||||
|
||||
The speedbar can optionally be displayed as a window rather than a
|
||||
separate frame, in both terminal and graphics mode.
|
||||
|
||||
For more details on using and programming the speedbar, @xref{Top,
|
||||
Speedbar,,speedbar, Speedbar Manual}.
|
||||
|
||||
|
|
|
|||
|
|
@ -2041,6 +2041,15 @@ the available projects. @kbd{M-x project-forget-project}
|
|||
prompts you to choose one of the available projects, and then removes
|
||||
it from the file.
|
||||
|
||||
@vindex project-list-exclude
|
||||
The user option @code{project-list-exclude} may be set to always
|
||||
ignore certain projects from being remembered and saved to
|
||||
@code{project-list-file}. It is a list of regular expressions and
|
||||
predicate functions for project roots and objects. The regexp is
|
||||
matched against the project root, and the predicate should take the
|
||||
project object as the only argument and return non-@code{nil} if the
|
||||
project should @emph{not} be saved to @code{project-list-file}.
|
||||
|
||||
@node Change Log
|
||||
@section Change Logs
|
||||
|
||||
|
|
|
|||
|
|
@ -773,6 +773,7 @@ See the Eshell Info manual, which is distributed with Emacs.
|
|||
* Shell Prompts:: Two ways to recognize shell prompts.
|
||||
* History: Shell History. Repeating previous commands in a shell buffer.
|
||||
* Directory Tracking:: Keeping track when the subshell changes directory.
|
||||
* Shell Bookmarks:: Save and restore local and remote shell buffers.
|
||||
* Options: Shell Options. Options for customizing Shell mode.
|
||||
* Terminal emulator:: An Emacs window as a terminal emulator.
|
||||
* Term Mode:: Special Emacs commands used in Term mode.
|
||||
|
|
@ -1199,7 +1200,7 @@ subshell:
|
|||
|
||||
By default, Shell mode handles common @acronym{ANSI} escape codes (for
|
||||
instance, for changing the color of text). Emacs also optionally
|
||||
supports some extend escape codes, like some of the @acronym{OSC}
|
||||
supports some extended escape codes, like some of the @acronym{OSC}
|
||||
(Operating System Codes) if you put the following in your init file:
|
||||
|
||||
@lisp
|
||||
|
|
@ -1503,6 +1504,51 @@ working directory; see the documentation of the variable
|
|||
dirtrack-mode} in the Shell buffer, or add @code{dirtrack-mode} to
|
||||
@code{shell-mode-hook} (@pxref{Hooks}).
|
||||
|
||||
@node Shell Bookmarks
|
||||
@subsection Shell Bookmarks
|
||||
@cindex shell bookmarks
|
||||
|
||||
Shell mode buffers can be bookmarked, and both local and remote
|
||||
(@pxref{Remote Files}) shell buffers are supported. @xref{Bookmarks}.
|
||||
|
||||
Opening, or ``jumping'' to, a bookmarked shell restores its buffer
|
||||
name, its current directory, and will create a remote connection, as
|
||||
necessary, using the shell command you used to create the remote buffer.
|
||||
|
||||
@vindex shell-bookmark-name-function
|
||||
@findex shell-bookmark-name-from-default-directory
|
||||
@findex shell-bookmark-name-from-buffer-name
|
||||
The option @code{shell-bookmark-name-function} can be customized to
|
||||
suit your preferences. It defaults to the function
|
||||
@code{shell-bookmark-name-from-default-directory} which uses the final
|
||||
component of the buffer's @code{default-directory}. An alternate
|
||||
function, @code{shell-bookmark-name-from-buffer-name}, uses the buffer's
|
||||
name with its @code{rename-uniquely} suffix brackets "<>" stripped. You
|
||||
can bind this option to your own function.
|
||||
|
||||
You can inhibit remote connections when you open a remote shell
|
||||
bookmark. This is useful when you restore sessions with
|
||||
@code{desktop-load}, or via another session-management package, to avoid
|
||||
time delays establishing connections. You can establish a connection on
|
||||
an unconnected remote buffer using the command @kbd{C-x C-v}
|
||||
(@code{find-alternate-file}). To inhibit a connection interactively,
|
||||
give a prefix argument before invoking the open/jump bookmark menu item,
|
||||
or before invoking the command @code{bookmark-jump}. @footnote{To
|
||||
inhibit a connection programmatically, refer to the documentation for
|
||||
the variable @code{shell-bookmark-jump-non-essential}.} @footnote{To
|
||||
properly handle multi-hop remote connections, refer to the documentation
|
||||
for the function @code{shell-bookmark-jump}.}
|
||||
|
||||
Note: Before creating ad-hoc multi-hop remote connections, customize
|
||||
either or both:
|
||||
@code{tramp-save-ad-hoc-proxies} to non-@code{nil} to persist proxy
|
||||
routes.
|
||||
@code{tramp-show-ad-hoc-proxies} to non-@code{nil} to ensure connections
|
||||
are fully qualified. This is helpful if you use the same persisted
|
||||
bookmarks file on multiple hosts.
|
||||
|
||||
@xref{Ad-hoc multi-hops,,, tramp, The Tramp Manual}.
|
||||
|
||||
@node Shell Options
|
||||
@subsection Shell Mode Options
|
||||
|
||||
|
|
|
|||
|
|
@ -573,7 +573,7 @@ not when you are in the minibuffer).
|
|||
function that you add to the hook variable @code{quail-activate-hook}.
|
||||
@xref{Hooks}. For example, you can redefine some of the input
|
||||
method's keys by defining key bindings in the keymap returned by the
|
||||
function @code{quail-translation-keymap}, using @code{define-key}.
|
||||
function @code{quail-translation-keymap}, using @code{keymap-set}.
|
||||
@xref{Init Rebinding}.
|
||||
|
||||
Input methods are inhibited when the text in the buffer is read-only
|
||||
|
|
|
|||
|
|
@ -1535,7 +1535,10 @@ This is equivalent to specifying the @samp{file} protocol:
|
|||
absolute file name of the @command{movemail} executable. If it is
|
||||
@code{nil}, Rmail searches for @command{movemail} in the directories
|
||||
listed in @code{rmail-movemail-search-path}, then in @code{exec-path}
|
||||
(@pxref{Shell}), then in @code{exec-directory}.
|
||||
(@pxref{Shell}), then in @code{exec-directory}. This variable should be
|
||||
customized before starting Rmail; if you customize it after starting
|
||||
Rmail, you will need to set @code{rmail-movemail-variant-in-use} to the
|
||||
@code{nil} value, and then restart Rmail.
|
||||
|
||||
@node Remote Mailboxes
|
||||
@section Retrieving Mail from Remote Mailboxes
|
||||
|
|
|
|||
|
|
@ -1494,9 +1494,10 @@ the Emacs Lisp Reference Manual
|
|||
@subsection Coding Standards
|
||||
@cindex coding standards for Emacs submissions
|
||||
|
||||
Contributed code should follow the GNU Coding Standards
|
||||
@url{https://www.gnu.org/prep/standards/}. This may also be available
|
||||
in info on your system.
|
||||
Contributed code should follow the GNU Coding Standards. This manual
|
||||
is available online at @url{https://www.gnu.org/prep/standards/}. It
|
||||
may also be available locally in Info on your system, see @pxref{Top,,,
|
||||
standards, GNU Coding Standards}.
|
||||
|
||||
If it doesn't, we'll need to find someone to fix the code before we
|
||||
can use it.
|
||||
|
|
|
|||
|
|
@ -17873,10 +17873,10 @@ problem recently.)
|
|||
@smallexample
|
||||
@group
|
||||
;; Translate 'C-h' to <DEL>.
|
||||
; (keyboard-translate ?\C-h ?\C-?)
|
||||
; (key-translate "C-h" "C-?")
|
||||
|
||||
;; Translate <DEL> to 'C-h'.
|
||||
(keyboard-translate ?\C-? ?\C-h)
|
||||
(key-translate "C-?" "C-h")
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
|
|
|
|||
|
|
@ -1675,8 +1675,8 @@ The buffer position of the character clicked on in the text area; or,
|
|||
if the event was outside the text area, the window area where it
|
||||
occurred. It is one of the symbols @code{mode-line},
|
||||
@code{header-line}, @code{tab-line}, @code{vertical-line},
|
||||
@code{left-margin}, @code{right-margin}, @code{left-fringe}, or
|
||||
@code{right-fringe}.
|
||||
@code{left-margin}, @code{right-margin}, @code{left-fringe},
|
||||
or @code{right-fringe}.
|
||||
|
||||
In one special case, @var{pos-or-area} is a list containing a symbol
|
||||
(one of the symbols listed above) instead of just the symbol. This
|
||||
|
|
@ -1791,17 +1791,18 @@ handle), @code{up} (the up arrow at one end of the scroll bar), or
|
|||
@c The 'top', 'bottom', and 'end-scroll' codes don't seem to be used.
|
||||
@end table
|
||||
|
||||
For clicks on the frame's internal border (@pxref{Frame Layout}),
|
||||
the frame's tool bar (@pxref{Tool Bar}) or tab bar, @var{position}
|
||||
has this form:
|
||||
For clicks on the frame's internal border (@pxref{Frame Layout}), the
|
||||
frame's tool bar (@pxref{Tool Bar}) or tab bar or menu bar,
|
||||
@var{position} has this form:
|
||||
|
||||
@example
|
||||
(@var{frame} @var{part} (@var{X} . @var{Y}) @var{timestamp})
|
||||
(@var{frame} @var{part} (@var{X} . @var{Y}) @var{timestamp} @var{object})
|
||||
@end example
|
||||
|
||||
@table @asis
|
||||
@item @var{frame}
|
||||
The frame whose internal border or tool bar or tab bar was clicked on.
|
||||
The frame whose internal border or tool bar or tab bar or menu bar was
|
||||
clicked on.
|
||||
|
||||
@item @var{part}
|
||||
The part of the frame which was clicked on. This can be one
|
||||
|
|
@ -1816,6 +1817,13 @@ The frame has a tool bar, and the event was in the tool-bar area.
|
|||
@item tab-bar
|
||||
The frame has a tab bar, and the event was in the tab-bar area.
|
||||
|
||||
@cindex menu-bar mouse events
|
||||
@item menu-bar
|
||||
The event was on the frame's menu bar area. This kind of click event
|
||||
can happen only on text-only frames or on X frames in a non-toolkit
|
||||
build of Emacs. (In toolkit builds of Emacs, menu-bar clicks are
|
||||
handled by the toolkit, and are not visible to Emacs as click events.)
|
||||
|
||||
@item left-edge
|
||||
@itemx top-edge
|
||||
@itemx right-edge
|
||||
|
|
@ -1837,6 +1845,9 @@ the frame doesn't have its @code{drag-internal-border} parameter
|
|||
(@pxref{Mouse Dragging Parameters}) set to a non-@code{nil} value.
|
||||
@end table
|
||||
|
||||
@item @var{object}
|
||||
This member is present only for clicks on the tab bar, and it is the
|
||||
propertized string with information about the clicked button.
|
||||
@end table
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -764,32 +764,32 @@ you to be able to native-compile Lisp code.
|
|||
|
||||
@vindex native-compile@r{, a Lisp feature}
|
||||
To determine whether the current Emacs process can produce and load
|
||||
natively-compiled Lisp code, call
|
||||
natively compiled Lisp code, call
|
||||
@code{native-comp-available-p} (@pxref{Native-Compilation Functions}).
|
||||
|
||||
Unlike byte-compiled code, natively-compiled Lisp code is executed
|
||||
Unlike byte-compiled code, native-compiled Lisp code is executed
|
||||
directly by the machine's hardware, and therefore runs at full speed
|
||||
that the host CPU can provide. The resulting speedup generally
|
||||
depends on what the Lisp code does, but is usually 2.5 to 5 times
|
||||
faster than the corresponding byte-compiled code.
|
||||
|
||||
Since native code is generally incompatible between different
|
||||
systems, the natively-compiled code is @emph{not} transportable from
|
||||
systems, the native-compiled code is @emph{not} transportable from
|
||||
one machine to another, it can only be used on the same machine where
|
||||
it was produced or on very similar ones (having the same CPU and
|
||||
run-time libraries). The transportability of natively-compiled code
|
||||
run-time libraries). The transportability of native-compiled code
|
||||
is the same as that of shared libraries (@file{.so} or @file{.dll}
|
||||
files).
|
||||
|
||||
Libraries of natively-compiled code include crucial dependencies on
|
||||
Libraries of native-compiled code include crucial dependencies on
|
||||
Emacs Lisp primitives (@pxref{What Is a Function}) and their calling
|
||||
conventions, and thus Emacs usually won't load natively-compiled code
|
||||
conventions, and thus Emacs usually won't load native-compiled code
|
||||
produced by earlier or later Emacs versions; native compilation of the
|
||||
same Lisp code by a different Emacs version will usually produce a
|
||||
natively-compiled library under a unique file name that only that
|
||||
natively compiled library under a unique file name that only that
|
||||
version of Emacs will be able to load. However, the use of unique
|
||||
file names enables several versions of the same Lisp library
|
||||
natively-compiled by several different versions of Emacs to be placed
|
||||
natively compiled by several different versions of Emacs to be placed
|
||||
within the same directory.
|
||||
|
||||
@vindex no-native-compile
|
||||
|
|
@ -882,7 +882,7 @@ non-@code{nil}, tells the function to place the resulting @file{.eln}
|
|||
files in the last directory mentioned in
|
||||
@code{native-comp-eln-load-path} (@pxref{Library Search}); this is
|
||||
meant to be used as part of building an Emacs source tarball for the
|
||||
first time, when the natively-compiled files, which are absent from
|
||||
first time, when the native-compiled files, which are absent from
|
||||
the source tarball, should be generated in the build tree instead of
|
||||
the user's cache directory.
|
||||
@end defun
|
||||
|
|
@ -891,7 +891,7 @@ Native compilation can be run entirely asynchronously, in a subprocess
|
|||
of the main Emacs process. This leaves the main Emacs process free to
|
||||
use while the compilation runs in the background. This is the method
|
||||
used by Emacs to natively-compile any Lisp file or byte-compiled Lisp
|
||||
file that is loaded into Emacs, when no natively-compiled file for it
|
||||
file that is loaded into Emacs, when no native-compiled file for it
|
||||
is available. Note that because of this use of a subprocess, native
|
||||
compilation may produce warning and errors which byte-compilation does
|
||||
not, and Lisp code may thus need to be modified to work correctly. See
|
||||
|
|
@ -938,7 +938,7 @@ in any of the directories mentioned in the
|
|||
@deffn Command emacs-lisp-native-compile
|
||||
This command compiles the file visited by the current buffer into
|
||||
native code, if the file was changed since the last time it was
|
||||
natively-compiled.
|
||||
natively compiled.
|
||||
@end deffn
|
||||
|
||||
@deffn Command emacs-lisp-native-compile-and-load
|
||||
|
|
@ -1125,13 +1125,13 @@ control this, use a separate variable, described below.
|
|||
This variable controls generation of trampolines. A trampoline is a
|
||||
small piece of native code required to allow calling Lisp primitives,
|
||||
which were advised or redefined, from Lisp code that was
|
||||
natively-compiled with @code{native-comp-speed} set to 2 or greater.
|
||||
natively compiled with @code{native-comp-speed} set to 2 or greater.
|
||||
Emacs stores the generated trampolines on separate @file{*.eln} files.
|
||||
By default, this variable's value is @code{t}, which enables the
|
||||
generation of trampoline files; setting it to @code{nil} disables the
|
||||
generation of trampolines. Note that if a trampoline needed for
|
||||
advising or redefining a primitive is not available and cannot be
|
||||
generated, calls to that primitive from natively-compiled Lisp will
|
||||
generated, calls to that primitive from native-compiled Lisp will
|
||||
ignore redefinitions and advices, and will behave as if the primitive
|
||||
was called directly from C. Therefore, we don't recommend disabling
|
||||
the trampoline generation, unless you know that all the trampolines
|
||||
|
|
|
|||
|
|
@ -2841,6 +2841,19 @@ Test @var{condition} at macro-expansion time. If its value is
|
|||
non-@code{nil}, expand the macro to @var{then-form}, otherwise expand
|
||||
it to @var{else-forms} enclosed in a @code{progn}. @var{else-forms}
|
||||
may be empty.
|
||||
@end defmac
|
||||
|
||||
@defmac static-when condition body...
|
||||
Test @var{condition} at macro-expansion time. If its value is
|
||||
non-@code{nil}, expand the macro to evaluate all @var{body} forms
|
||||
sequentially and return the value of the last one, or @code{nil} if there
|
||||
are none.
|
||||
@end defmac
|
||||
|
||||
@defmac static-unless condition body...
|
||||
Test @var{condition} at macro-expansion time. If its value is @code{nil},
|
||||
expand the macro to evaluate all @var{body} forms sequentially and return
|
||||
the value of the last one, or @code{nil} if there are none.
|
||||
|
||||
Here is an example of its use from CC Mode, which prevents a
|
||||
@code{defadvice} form being compiled in newer versions of Emacs:
|
||||
|
|
|
|||
|
|
@ -1210,6 +1210,12 @@ The function is called with two arguments: the first is the overlay, and
|
|||
the second is @code{nil} to make the overlay visible, or @code{t} to
|
||||
make it invisible again.
|
||||
|
||||
@cindex invisible text, and display properties
|
||||
The @code{invisible} property is ignored in text that is covered by a
|
||||
@dfn{replacing} @code{display} property, because such @code{display}
|
||||
properties skip the text without processing its properties.
|
||||
@xref{Replacing Specs}.
|
||||
|
||||
@node Selective Display
|
||||
@section Selective Display
|
||||
@c @cindex selective display Duplicates selective-display
|
||||
|
|
@ -1918,7 +1924,9 @@ same as in the unhighlighted text.
|
|||
This property activates various features that change the
|
||||
way text is displayed. For example, it can make text appear taller
|
||||
or shorter, higher or lower, wider or narrower, or replaced with an image.
|
||||
@xref{Display Property}.
|
||||
@xref{Display Property}. Note that, if the @code{display} property is a
|
||||
@dfn{replacing} one (@pxref{Replacing Specs}), the @code{invisible}
|
||||
property of the same overlay will be ignored.
|
||||
|
||||
@kindex help-echo @r{(overlay property)}
|
||||
@item help-echo
|
||||
|
|
@ -1981,8 +1989,11 @@ conventions are the same as for the @code{modification-hooks} functions.
|
|||
@kindex invisible @r{(overlay property)}
|
||||
@item invisible
|
||||
The @code{invisible} property can make the text in the overlay
|
||||
invisible, which means that it does not appear on the screen.
|
||||
@xref{Invisible Text}, for details.
|
||||
invisible, which means that it does not appear on the screen. However,
|
||||
if the text covered by the overlay has a @dfn{replacing} @code{display}
|
||||
property, the @code{invisible} property will be ignored, because a
|
||||
replacing @code{display} property skips the text without examining its
|
||||
properties. @xref{Invisible Text}, for details.
|
||||
|
||||
@kindex intangible @r{(overlay property)}
|
||||
@item intangible
|
||||
|
|
@ -2377,7 +2388,7 @@ though when this function is run from an idle timer with a delay of zero
|
|||
seconds.
|
||||
@end defun
|
||||
|
||||
@defun buffer-text-pixel-size &optional buffer-or-name window from to x-limit y-limit
|
||||
@defun buffer-text-pixel-size &optional buffer-or-name window x-limit y-limit
|
||||
This is much like @code{window-text-pixel-size}, but can be used when
|
||||
the buffer isn't shown in a window. (@code{window-text-pixel-size} is
|
||||
faster when it is, so this function shouldn't be used in that case.)
|
||||
|
|
@ -2388,10 +2399,14 @@ live window and defaults to the selected one; the function will
|
|||
compute the text dimensions as if @var{buffer} is displayed in
|
||||
@var{window}. The return value is a cons of the maximum pixel-width
|
||||
of any text line and the pixel-height of all the text lines of the
|
||||
buffer specified by @var{buffer-or-name}.
|
||||
accessible portion of the buffer specified by @var{buffer-or-name}.
|
||||
|
||||
The optional arguments @var{x-limit} and @var{y-limit} have the same
|
||||
meaning as with @code{window-text-pixel-size}.
|
||||
|
||||
If you want to measure dimensions of some part of the buffer text,
|
||||
narrow the buffer to that part before calling this function
|
||||
(@pxref{Narrowing}).
|
||||
@end defun
|
||||
|
||||
@defun string-pixel-width string &optional buffer
|
||||
|
|
@ -5307,10 +5322,15 @@ instead of the text that has the property. These are called
|
|||
to interactively move point into the middle of buffer text that is
|
||||
replaced in this way.
|
||||
|
||||
@cindex display properties, and invisible text
|
||||
@cindex composition property, and replacing display specs
|
||||
If a list of display specifications includes more than one replacing
|
||||
display specification, the first overrides the rest. Replacing
|
||||
display specifications make most other display specifications
|
||||
irrelevant, since those don't apply to the replacement.
|
||||
irrelevant, since those don't apply to the replacement. In addition,
|
||||
any @code{invisible} and @code{composition} properties of the text that
|
||||
is replaced are ignored, because the replaced text is skipped and its
|
||||
properties are not processed.
|
||||
|
||||
For replacing display specifications, @dfn{the text that has the
|
||||
property} means all the consecutive characters that have the same
|
||||
|
|
@ -7606,15 +7626,7 @@ This function causes the browser widget specified by @var{xwidget} to
|
|||
execute the specified JavaScript @code{script}.
|
||||
@end defun
|
||||
|
||||
@defun xwidget-webkit-execute-script-rv xwidget script &optional default
|
||||
This function executes the specified @var{script} like
|
||||
@code{xwidget-webkit-execute-script} does, but it also returns the
|
||||
script's return value as a string. If @var{script} doesn't return a
|
||||
value, this function returns @var{default}, or @code{nil} if
|
||||
@var{default} was omitted.
|
||||
@end defun
|
||||
|
||||
@defun xwidget-webkit-get-title xwidget
|
||||
@defun xwidget-webkit-title xwidget
|
||||
This function returns the title of @var{xwidget} as a string.
|
||||
@end defun
|
||||
|
||||
|
|
@ -8585,6 +8597,7 @@ The newline character (character code 10) has a special effect: it
|
|||
ends the preceding line and starts a new line.
|
||||
|
||||
@cindex ASCII control characters
|
||||
@cindex non-printable ASCII characters
|
||||
@item
|
||||
The non-printable @dfn{@acronym{ASCII} control characters}---character
|
||||
codes 0 through 31, as well as the @key{DEL} character (character code
|
||||
|
|
|
|||
|
|
@ -1388,7 +1388,7 @@ Parsing Program Source
|
|||
* Pattern Matching:: Pattern matching with query patterns.
|
||||
* Multiple Languages:: Parse text written in multiple languages.
|
||||
* Tree-sitter Major Modes:: Develop major modes using tree-sitter.
|
||||
* Tree-sitter C API:: Compare the C API and the ELisp API.
|
||||
* Tree-sitter C API:: Compare the C API and the Lisp API.
|
||||
|
||||
Syntax Descriptors
|
||||
|
||||
|
|
|
|||
|
|
@ -1234,11 +1234,22 @@ immediately after running @code{window-size-change-functions} for
|
|||
@cindex implied resizing of frame
|
||||
|
||||
By default, Emacs tries to keep the number of lines and columns of a
|
||||
frame's text area unaltered when, for example, toggling its menu or
|
||||
tool bar, changing its default font or setting the width of any of its
|
||||
scroll bars. This means that in such case Emacs must ask the window
|
||||
manager to resize the frame's window in order to accommodate the size
|
||||
change.
|
||||
frame's text area (@pxref{Frame Layout}) unaltered when, for example,
|
||||
toggling the menu or tool bar, changing the default font or setting the
|
||||
default width of scroll bars on that frame. When any of these
|
||||
decorations is drawn by a toolkit, this usually means that Emacs has to
|
||||
work against that toolkit because the latter usually tries to keep the
|
||||
outer frame size unaltered when the size of a decoration changes, thus
|
||||
implicitly changing the size of the frame's text area.
|
||||
|
||||
In practice this means that whenever Emacs issues a request to add or
|
||||
remove such a decoration, it will issue a second request with the
|
||||
intention to restore the original size of the frame's text area. When
|
||||
any of these decorations is drawn by Emacs itself (like the tool bar
|
||||
with the Lucid or MS-Windows builds or the tab bar), Emacs may still
|
||||
have to alter the size of the native frame accordingly and issue a
|
||||
resize request because these decorations should not be accounted for by
|
||||
the text area of the frame.
|
||||
|
||||
Occasionally, such @dfn{implied frame resizing} may be unwanted, for
|
||||
example, when a frame has been maximized or made full-screen (where
|
||||
|
|
@ -1249,16 +1260,29 @@ resizing with the following option:
|
|||
If this option is @code{nil}, changing a frame's font, menu bar, tool
|
||||
bar, internal borders, fringes or scroll bars may resize its outer frame
|
||||
in order to keep the number of columns or lines of its text area
|
||||
unaltered. If this option is @code{t}, no such resizing happens once a
|
||||
frame has obtained its initial size. If the value is the symbol
|
||||
@code{force}, no implicit resizing happens whenever a new frame is made.
|
||||
The latter can be useful with tiling window managers where the initial
|
||||
size of a frame is determined by external means.
|
||||
unaltered.
|
||||
|
||||
If this option is @code{t}, Emacs will not resize a frame in any of
|
||||
these cases once it has agreed with the window manager on the final
|
||||
initial size of that frame. More precisely, this means that Emacs may
|
||||
resize a frame implicitly until all of its decorations have been taken
|
||||
into account and it has been given the initial size requested by the
|
||||
user. Any further changes of decorations will not cause an implied
|
||||
resizing of the frame.
|
||||
|
||||
If this option equals the symbol @code{force}, Emacs will not perform
|
||||
any implied resizing of a frame even before it has agreed with the
|
||||
window manager on the final initial size of that frame. As a
|
||||
consequence, the initial size of a frame's text area may not necessarily
|
||||
reflect the one specified by the user. This value can be useful with
|
||||
tiling window managers where the initial size of a frame is determined
|
||||
by external means.
|
||||
|
||||
The value of this option can be also a list of frame parameters. In
|
||||
that case, implied resizing is inhibited for the change of the
|
||||
parameters that appear in this list. Parameters currently handled by
|
||||
this option are @code{font}, @code{font-backend},
|
||||
that case, implied resizing of a frame is inhibited for the change of
|
||||
any parameters that appears in this list once Emacs has agreed with the
|
||||
window manager on the final initial size of that frame. Parameters
|
||||
currently handled by this option are @code{font}, @code{font-backend},
|
||||
@code{internal-border-width}, @code{menu-bar-lines} and
|
||||
@code{tool-bar-lines}.
|
||||
|
||||
|
|
@ -1288,11 +1312,11 @@ even if this option is non-@code{nil}.
|
|||
Note also that window managers usually do not ask for resizing a frame
|
||||
when they change the number of lines occupied by an external menu or
|
||||
tool bar. Typically, such ``wrappings'' occur when a user shrinks a
|
||||
frame horizontally, making it impossible to display all elements of
|
||||
its menu or tool bar. They may also result from a change of the major
|
||||
mode altering the number of items of a menu or tool bar. Any such
|
||||
wrappings may implicitly alter the number of lines of a frame's text
|
||||
area and are unaffected by the setting of this option.
|
||||
frame horizontally, making it impossible to display all elements of its
|
||||
menu or tool bar. They may also result from a change of the major mode
|
||||
altering the number of items of a menu or tool bar. Any such wrappings
|
||||
may implicitly alter the number of lines of a frame's text area and are
|
||||
unaffected by the setting of this option.
|
||||
@end defopt
|
||||
|
||||
|
||||
|
|
@ -4137,8 +4161,14 @@ programs. It takes two optional arguments, @var{type} and
|
|||
|
||||
The @var{data-type} argument specifies the form of data conversion to
|
||||
use, to convert the raw data obtained from another program into Lisp
|
||||
data. @xref{X Selections}, for an enumeration of data types valid under
|
||||
X, and @pxref{Other Selections} for those elsewhere.
|
||||
data. It defaults to @code{STRING}. @xref{X Selections}, for an
|
||||
enumeration of data types valid on X, and @pxref{Other Selections} for
|
||||
those elsewhere. On X Window system, we recommend to always specify a
|
||||
particular @var{data-type}, especially if the selection is expected to
|
||||
be non-ASCII text (in which case Lisp programs should prefer
|
||||
@code{UTF8_STRING} as the value of @var{data-type}). This is because
|
||||
the default @var{data-type} value, @code{STRING}, can only support
|
||||
Latin-1 text, which in many cases is nowadays inadequate.
|
||||
@end defun
|
||||
|
||||
@defopt selection-coding-system
|
||||
|
|
|
|||
|
|
@ -219,11 +219,11 @@ function. For example:
|
|||
|
||||
@defun compiled-function-p object
|
||||
This function returns @code{t} if @var{object} is a function object
|
||||
that is not in the form of ELisp source code but something like
|
||||
that is not in the form of Lisp source code but something like
|
||||
machine code or byte code instead. More specifically it returns
|
||||
@code{t} if the function is built-in (a.k.a.@: ``primitive'',
|
||||
@pxref{What Is a Function}), or byte-compiled (@pxref{Byte
|
||||
Compilation}), or natively-compiled (@pxref{Native Compilation}), or
|
||||
Compilation}), or native-compiled (@pxref{Native Compilation}), or
|
||||
a function loaded from a dynamic module (@pxref{Dynamic Modules}).
|
||||
@end defun
|
||||
|
||||
|
|
@ -1055,7 +1055,17 @@ The result is a new function that accepts the rest of
|
|||
arguments and calls the original function with all the arguments
|
||||
combined.
|
||||
|
||||
Here's how to do partial application in Emacs Lisp:
|
||||
In Emacs Lisp, this is best done with an anonymous function. For
|
||||
example, if you have a function @samp{my-function} that takes two
|
||||
arguments, you could do something like this:
|
||||
|
||||
@example
|
||||
(mapcar (lambda (x) (my-function 123 x)) @dots{})
|
||||
@end example
|
||||
|
||||
You can also do partial application using the function
|
||||
@code{apply-partially}. However, this will be slower than using an
|
||||
anonymous function with @code{lambda}.
|
||||
|
||||
@defun apply-partially func &rest args
|
||||
This function returns a new function which, when called, will call
|
||||
|
|
@ -2868,7 +2878,7 @@ For description of additional types, see @ref{Lisp Data Types}).
|
|||
|
||||
Declaring a function with an incorrect type produces undefined behavior
|
||||
and could lead to unexpected results or might even crash Emacs when
|
||||
natively-compiled code is loaded, if it was compiled with
|
||||
native-compiled code is loaded, if it was compiled with
|
||||
@code{compilation-safety} level of zero (@pxref{compilation-safety}).
|
||||
Note also that when redefining (or advising) a type-declared function,
|
||||
the replacement should respect the original signature to avoid such
|
||||
|
|
|
|||
|
|
@ -2076,7 +2076,11 @@ error symbol in @code{*@var{symbol}} and the error data in
|
|||
tag symbol in @code{*@var{symbol}} and the @code{throw} value in
|
||||
@code{*@var{data}}. The function doesn't store anything in memory
|
||||
pointed by these arguments when the return value is
|
||||
@code{emacs_funcall_exit_return}.
|
||||
@code{emacs_funcall_exit_return}. If the function fails to allocate
|
||||
storage for @var{symbol} or @var{data}, it stores a value representing
|
||||
the symbol @code{module-out-of-memory} in @code{*@var{symbol}}, stores a
|
||||
value representing @code{nil} in @code{*@var{data}}, and returns
|
||||
@code{emacs_funcall_exit_signal}.
|
||||
@end deftypefn
|
||||
|
||||
You should check nonlocal exit conditions where it matters: before you
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ used to look up the next input event; this continues until a command
|
|||
is found. The whole process is called @dfn{key lookup}.
|
||||
|
||||
@menu
|
||||
* Key Sequences:: Key sequences as Lisp objects.
|
||||
* Keymap Basics:: Basic concepts of keymaps.
|
||||
* Changing Key Bindings:: Redefining a key in a keymap.
|
||||
* Format of Keymaps:: What a keymap looks like as a Lisp object.
|
||||
* Creating Keymaps:: Functions to create and copy keymaps.
|
||||
* Inheritance and Keymaps:: How one keymap can inherit the bindings
|
||||
|
|
@ -29,7 +29,7 @@ is found. The whole process is called @dfn{key lookup}.
|
|||
A minor mode can also override them.
|
||||
* Key Lookup:: Finding a key's binding in one keymap.
|
||||
* Functions for Key Lookup:: How to request key lookup.
|
||||
* Changing Key Bindings:: Redefining a key in a keymap.
|
||||
* Key Sequences:: Key sequences as Lisp objects.
|
||||
* Low-Level Key Binding:: Legacy key syntax description.
|
||||
* Remapping Commands:: A keymap can translate one command to another.
|
||||
* Translation Keymaps:: Keymaps for translating sequences of events.
|
||||
|
|
@ -38,72 +38,6 @@ is found. The whole process is called @dfn{key lookup}.
|
|||
* Menu Keymaps:: Defining a menu as a keymap.
|
||||
@end menu
|
||||
|
||||
@node Key Sequences
|
||||
@section Key Sequences
|
||||
@cindex key
|
||||
@cindex keystroke
|
||||
@cindex key sequence
|
||||
|
||||
A @dfn{key sequence}, or @dfn{key} for short, is a sequence of one
|
||||
or more input events that form a unit. Input events include
|
||||
characters, function keys, mouse actions, or system events external to
|
||||
Emacs, such as @code{iconify-frame} (@pxref{Input Events}).
|
||||
The Emacs Lisp representation for a key sequence is a string or
|
||||
vector. Unless otherwise stated, any Emacs Lisp function that accepts
|
||||
a key sequence as an argument can handle both representations.
|
||||
|
||||
In the string representation, alphanumeric characters ordinarily
|
||||
stand for themselves; for example, @code{"a"} represents @kbd{a}
|
||||
and @code{"2"} represents @kbd{2}. Control character events are
|
||||
prefixed by the substring @code{"\C-"}, and meta characters by
|
||||
@code{"\M-"}; for example, @code{"\C-x"} represents the key @kbd{C-x}.
|
||||
In addition, the @key{TAB}, @key{RET}, @key{ESC}, and @key{DEL} events
|
||||
are represented by @code{"\t"}, @code{"\r"}, @code{"\e"}, and
|
||||
@code{"\d"} respectively. The string representation of a complete key
|
||||
sequence is the concatenation of the string representations of the
|
||||
constituent events; thus, @code{"\C-xl"} represents the key sequence
|
||||
@kbd{C-x l}.
|
||||
|
||||
Key sequences containing function keys, mouse button events, system
|
||||
events, or non-@acronym{ASCII} characters such as @kbd{C-=} or
|
||||
@kbd{H-a} cannot be represented as strings; they have to be
|
||||
represented as vectors.
|
||||
|
||||
In the vector representation, each element of the vector represents
|
||||
an input event, in its Lisp form. @xref{Input Events}. For example,
|
||||
the vector @code{[?\C-x ?l]} represents the key sequence @kbd{C-x l}.
|
||||
|
||||
For examples of key sequences written in string and vector
|
||||
representations, @ref{Init Rebinding,,, emacs, The GNU Emacs Manual}.
|
||||
|
||||
@defun kbd keyseq-text
|
||||
This function converts the text @var{keyseq-text} (a string constant)
|
||||
into a key sequence (a string or vector constant). The contents of
|
||||
@var{keyseq-text} should use the same syntax as in the buffer invoked
|
||||
by the @kbd{C-x C-k @key{RET}} (@code{kmacro-edit-macro}) command; in
|
||||
particular, you must surround function key names with
|
||||
@samp{<@dots{}>}. @xref{Edit Keyboard Macro,,, emacs, The GNU Emacs
|
||||
Manual}.
|
||||
|
||||
@example
|
||||
(kbd "C-x") @result{} "\C-x"
|
||||
(kbd "C-x C-f") @result{} "\C-x\C-f"
|
||||
(kbd "C-x 4 C-f") @result{} "\C-x4\C-f"
|
||||
(kbd "X") @result{} "X"
|
||||
(kbd "RET") @result{} "^M"
|
||||
(kbd "C-c SPC") @result{} "\C-c@ "
|
||||
(kbd "<f1> SPC") @result{} [f1 32]
|
||||
(kbd "C-M-<down>") @result{} [C-M-down]
|
||||
@end example
|
||||
|
||||
@findex key-valid-p
|
||||
The @code{kbd} function is very permissive, and will try to return
|
||||
something sensible even if the syntax used isn't completely
|
||||
conforming. To check whether the syntax is actually valid, use the
|
||||
@code{key-valid-p} function.
|
||||
@end defun
|
||||
|
||||
|
||||
@node Keymap Basics
|
||||
@section Keymap Basics
|
||||
@cindex key binding
|
||||
|
|
@ -156,6 +90,280 @@ precedence over) the corresponding global bindings. The minor mode
|
|||
keymaps shadow both local and global keymaps. @xref{Active Keymaps},
|
||||
for details.
|
||||
|
||||
@node Changing Key Bindings
|
||||
@section Changing Key Bindings
|
||||
@cindex changing key bindings
|
||||
@cindex rebinding
|
||||
|
||||
The way to rebind a key is to change its entry in a keymap. If you
|
||||
change a binding in the global keymap, the change is effective in all
|
||||
buffers (though it has no direct effect in buffers that shadow the
|
||||
global binding with a local one). If you change the current buffer's
|
||||
local map, that usually affects all buffers using the same major mode.
|
||||
The @code{keymap-global-set} and @code{keymap-local-set} functions are
|
||||
convenient interfaces for these operations (@pxref{Key Binding
|
||||
Commands}). You can also use @code{keymap-set}, a more general
|
||||
function; then you must explicitly specify the map to change.
|
||||
|
||||
When choosing the key sequences for Lisp programs to rebind, please
|
||||
follow the Emacs conventions for use of various keys (@pxref{Key
|
||||
Binding Conventions}).
|
||||
|
||||
The functions below signal an error if @var{keymap} is not a keymap,
|
||||
or if @var{key} is not a valid key.
|
||||
|
||||
@var{key} is a string representing a single key or a series of key
|
||||
strokes, and must satisfy @code{key-valid-p}. Key strokes are
|
||||
separated by a single space character.
|
||||
|
||||
Each key stroke is either a single character, or the name of an
|
||||
event, surrounded by angle brackets. In addition, any key stroke
|
||||
may be preceded by one or more modifier keys. Finally, a limited
|
||||
number of characters have a special shorthand syntax. Here's some
|
||||
example key sequences:
|
||||
|
||||
@table @kbd
|
||||
@item f
|
||||
The key @kbd{f}.
|
||||
|
||||
@item S o m
|
||||
A three key sequence of the keys @kbd{S}, @kbd{o} and @kbd{m}.
|
||||
|
||||
@item C-c o
|
||||
A two key sequence of the keys @kbd{c} with the control modifier and
|
||||
then the key @kbd{o}
|
||||
|
||||
@item H-<left>
|
||||
The key named @kbd{left} with the hyper modifier.
|
||||
|
||||
@item M-RET
|
||||
The @kbd{return} key with a meta modifier.
|
||||
|
||||
@item C-M-<space>
|
||||
The @kbd{space} key with both the control and meta modifiers.
|
||||
@end table
|
||||
|
||||
The only keys that have a special shorthand syntax are @kbd{NUL},
|
||||
@kbd{RET}, @kbd{TAB}, @kbd{LFD}, @kbd{ESC}, @kbd{SPC} and @kbd{DEL}.
|
||||
|
||||
The modifiers have to be specified in alphabetical order:
|
||||
@samp{A-C-H-M-S-s}, which is @samp{Alt-Control-Hyper-Meta-Shift-super}.
|
||||
|
||||
@findex keymap-set
|
||||
@defun keymap-set keymap key binding
|
||||
This function sets the binding for @var{key} in @var{keymap}. (If
|
||||
@var{key} is more than one event long, the change is actually made
|
||||
in another keymap reached from @var{keymap}.) The argument
|
||||
@var{binding} can be any Lisp object, but only certain types are
|
||||
meaningful. (For a list of meaningful types, see @ref{Key Lookup}.)
|
||||
The value returned by @code{keymap-set} is @var{binding}.
|
||||
|
||||
If @var{key} is @kbd{<t>}, this sets the default binding in
|
||||
@var{keymap}. When an event has no binding of its own, the Emacs
|
||||
command loop uses the keymap's default binding, if there is one.
|
||||
|
||||
@cindex invalid prefix key error
|
||||
@cindex key sequence error
|
||||
Every prefix of @var{key} must be a prefix key (i.e., bound to a keymap)
|
||||
or undefined; otherwise an error is signaled. If some prefix of
|
||||
@var{key} is undefined, then @code{keymap-set} defines it as a prefix
|
||||
key so that the rest of @var{key} can be defined as specified.
|
||||
|
||||
If there was previously no binding for @var{key} in @var{keymap}, the
|
||||
new binding is added at the beginning of @var{keymap}. The order of
|
||||
bindings in a keymap makes no difference for keyboard input, but it
|
||||
does matter for menu keymaps (@pxref{Menu Keymaps}).
|
||||
@end defun
|
||||
|
||||
@findex keymap-unset
|
||||
@defun keymap-unset keymap key &optional remove
|
||||
This function is the inverse of @code{keymap-set}, it unsets the
|
||||
binding for @var{key} in @var{keymap}, which is the same as setting
|
||||
the binding to @code{nil}. In order to instead remove the binding
|
||||
completely, specify @var{remove} as non-@code{nil}. This only makes a
|
||||
difference if @var{keymap} has a parent keymap: if you just unset a key
|
||||
in a child map, it will still shadow the same key in the parent
|
||||
keymap; using @var{remove} instead will allow the key in the parent keymap
|
||||
to be used.
|
||||
@end defun
|
||||
|
||||
Note: using @code{keymap-unset} with @var{remove} non-@code{nil} is
|
||||
intended for users to put in their init file; Emacs packages should
|
||||
avoid using it if possible, since they have complete control over
|
||||
their own keymaps anyway, and they should not be altering other
|
||||
packages' keymaps.
|
||||
|
||||
This example creates a sparse keymap and makes a number of
|
||||
bindings in it:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
(setq map (make-sparse-keymap))
|
||||
@result{} (keymap)
|
||||
@end group
|
||||
@group
|
||||
(keymap-set map "C-f" 'forward-char)
|
||||
@result{} forward-char
|
||||
@end group
|
||||
@group
|
||||
map
|
||||
@result{} (keymap (6 . forward-char))
|
||||
@end group
|
||||
|
||||
@group
|
||||
;; @r{Build sparse submap for @kbd{C-x} and bind @kbd{f} in that.}
|
||||
(keymap-set map "C-x f" 'forward-word)
|
||||
@result{} forward-word
|
||||
@end group
|
||||
@group
|
||||
map
|
||||
@result{} (keymap
|
||||
(24 keymap ; @kbd{C-x}
|
||||
(102 . forward-word)) ; @kbd{f}
|
||||
(6 . forward-char)) ; @kbd{C-f}
|
||||
@end group
|
||||
|
||||
@group
|
||||
;; @r{Bind @kbd{C-p} to the @code{ctl-x-map}.}
|
||||
(keymap-set map "C-p" ctl-x-map)
|
||||
;; @code{ctl-x-map}
|
||||
@result{} [nil @dots{} find-file @dots{} backward-kill-sentence]
|
||||
@end group
|
||||
|
||||
@group
|
||||
;; @r{Bind @kbd{C-f} to @code{foo} in the @code{ctl-x-map}.}
|
||||
(keymap-set map "C-p C-f" 'foo)
|
||||
@result{} 'foo
|
||||
@end group
|
||||
@group
|
||||
map
|
||||
@result{} (keymap ; @r{Note @code{foo} in @code{ctl-x-map}.}
|
||||
(16 keymap [nil @dots{} foo @dots{} backward-kill-sentence])
|
||||
(24 keymap
|
||||
(102 . forward-word))
|
||||
(6 . forward-char))
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
Note that storing a new binding for @kbd{C-p C-f} actually works by
|
||||
changing an entry in @code{ctl-x-map}, and this has the effect of
|
||||
changing the bindings of both @kbd{C-p C-f} and @kbd{C-x C-f} in the
|
||||
default global map.
|
||||
|
||||
@code{keymap-set} is the general work horse for defining a key in a
|
||||
keymap. When writing modes, however, you frequently have to bind a
|
||||
large number of keys at once, and using @code{keymap-set} on them all
|
||||
can be tedious and error-prone. Instead you can use
|
||||
@code{define-keymap}, which creates a keymap and binds a number of
|
||||
keys. @xref{Creating Keymaps}, for details.
|
||||
|
||||
The function @code{substitute-key-definition} scans a keymap for
|
||||
keys that have a certain binding and rebinds them with a different
|
||||
binding. Another feature which is cleaner and can often produce the
|
||||
same results is to remap one command into another (@pxref{Remapping
|
||||
Commands}).
|
||||
|
||||
@defun substitute-key-definition olddef newdef keymap &optional oldmap
|
||||
@cindex replace bindings
|
||||
This function replaces @var{olddef} with @var{newdef} for any keys in
|
||||
@var{keymap} that were bound to @var{olddef}. In other words,
|
||||
@var{olddef} is replaced with @var{newdef} wherever it appears. The
|
||||
function returns @code{nil}.
|
||||
|
||||
For example, this redefines @kbd{C-x C-f}, if you do it in an Emacs with
|
||||
standard bindings:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
(substitute-key-definition
|
||||
'find-file 'find-file-read-only (current-global-map))
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
If @var{oldmap} is non-@code{nil}, that changes the behavior of
|
||||
@code{substitute-key-definition}: the bindings in @var{oldmap} determine
|
||||
which keys to rebind. The rebindings still happen in @var{keymap}, not
|
||||
in @var{oldmap}. Thus, you can change one map under the control of the
|
||||
bindings in another. For example,
|
||||
|
||||
@smallexample
|
||||
(substitute-key-definition
|
||||
'delete-backward-char 'my-funny-delete
|
||||
my-map global-map)
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
puts the special deletion command in @code{my-map} for whichever keys
|
||||
are globally bound to the standard deletion command.
|
||||
|
||||
Here is an example showing a keymap before and after substitution:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
(setq map (list 'keymap
|
||||
(cons ?1 olddef-1)
|
||||
(cons ?2 olddef-2)
|
||||
(cons ?3 olddef-1)))
|
||||
@result{} (keymap (49 . olddef-1) (50 . olddef-2) (51 . olddef-1))
|
||||
@end group
|
||||
|
||||
@group
|
||||
(substitute-key-definition 'olddef-1 'newdef map)
|
||||
@result{} nil
|
||||
@end group
|
||||
@group
|
||||
map
|
||||
@result{} (keymap (49 . newdef) (50 . olddef-2) (51 . newdef))
|
||||
@end group
|
||||
@end smallexample
|
||||
@end defun
|
||||
|
||||
@defun suppress-keymap keymap &optional nodigits
|
||||
@cindex @code{self-insert-command} override
|
||||
This function changes the contents of the full keymap @var{keymap} by
|
||||
remapping @code{self-insert-command} to the command @code{undefined}
|
||||
(@pxref{Remapping Commands}). This has the effect of undefining all
|
||||
printing characters, thus making ordinary insertion of text impossible.
|
||||
@code{suppress-keymap} returns @code{nil}.
|
||||
|
||||
If @var{nodigits} is @code{nil}, then @code{suppress-keymap} defines
|
||||
digits to run @code{digit-argument}, and @kbd{-} to run
|
||||
@code{negative-argument}. Otherwise it makes them undefined like the
|
||||
rest of the printing characters.
|
||||
|
||||
@cindex yank suppression
|
||||
@cindex @code{quoted-insert} suppression
|
||||
The @code{suppress-keymap} function does not make it impossible to
|
||||
modify a buffer, as it does not suppress commands such as @code{yank}
|
||||
and @code{quoted-insert}. To prevent any modification of a buffer, make
|
||||
it read-only (@pxref{Read Only Buffers}).
|
||||
|
||||
Since this function modifies @var{keymap}, you would normally use it
|
||||
on a newly created keymap. Operating on an existing keymap
|
||||
that is used for some other purpose is likely to cause trouble; for
|
||||
example, suppressing @code{global-map} would make it impossible to use
|
||||
most of Emacs.
|
||||
|
||||
This function can be used to initialize the local keymap of a major
|
||||
mode for which insertion of text is not desirable. But usually such a
|
||||
mode should be derived from @code{special-mode} (@pxref{Basic Major
|
||||
Modes}); then its keymap will automatically inherit from
|
||||
@code{special-mode-map}, which is already suppressed. Here is how
|
||||
@code{special-mode-map} is defined:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
(defvar special-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(suppress-keymap map)
|
||||
(keymap-set map "q" 'quit-window)
|
||||
@dots{}
|
||||
map))
|
||||
@end group
|
||||
@end smallexample
|
||||
@end defun
|
||||
|
||||
@node Format of Keymaps
|
||||
@section Format of Keymaps
|
||||
@cindex format of keymaps
|
||||
|
|
@ -1428,278 +1636,69 @@ for other kinds of input events. Thus, @kbd{M-@key{F1}}, a function
|
|||
key, is not converted into @kbd{@key{ESC} @key{F1}}.
|
||||
@end defopt
|
||||
|
||||
@node Changing Key Bindings
|
||||
@section Changing Key Bindings
|
||||
@cindex changing key bindings
|
||||
@cindex rebinding
|
||||
@node Key Sequences
|
||||
@section Key Sequences
|
||||
@cindex key
|
||||
@cindex keystroke
|
||||
@cindex key sequence
|
||||
|
||||
The way to rebind a key is to change its entry in a keymap. If you
|
||||
change a binding in the global keymap, the change is effective in all
|
||||
buffers (though it has no direct effect in buffers that shadow the
|
||||
global binding with a local one). If you change the current buffer's
|
||||
local map, that usually affects all buffers using the same major mode.
|
||||
The @code{keymap-global-set} and @code{keymap-local-set} functions are
|
||||
convenient interfaces for these operations (@pxref{Key Binding
|
||||
Commands}). You can also use @code{keymap-set}, a more general
|
||||
function; then you must explicitly specify the map to change.
|
||||
A @dfn{key sequence}, or @dfn{key} for short, is a sequence of one
|
||||
or more input events that form a unit. Input events include
|
||||
characters, function keys, mouse actions, or system events external to
|
||||
Emacs, such as @code{iconify-frame} (@pxref{Input Events}).
|
||||
The Emacs Lisp representation for a key sequence is a string or
|
||||
vector. Unless otherwise stated, any Emacs Lisp function that accepts
|
||||
a key sequence as an argument can handle both representations.
|
||||
|
||||
When choosing the key sequences for Lisp programs to rebind, please
|
||||
follow the Emacs conventions for use of various keys (@pxref{Key
|
||||
Binding Conventions}).
|
||||
In the string representation, alphanumeric characters ordinarily
|
||||
stand for themselves; for example, @code{"a"} represents @kbd{a}
|
||||
and @code{"2"} represents @kbd{2}. Control character events are
|
||||
prefixed by the substring @code{"\C-"}, and meta characters by
|
||||
@code{"\M-"}; for example, @code{"\C-x"} represents the key @kbd{C-x}.
|
||||
In addition, the @key{TAB}, @key{RET}, @key{ESC}, and @key{DEL} events
|
||||
are represented by @code{"\t"}, @code{"\r"}, @code{"\e"}, and
|
||||
@code{"\d"} respectively. The string representation of a complete key
|
||||
sequence is the concatenation of the string representations of the
|
||||
constituent events; thus, @code{"\C-xl"} represents the key sequence
|
||||
@kbd{C-x l}.
|
||||
|
||||
The functions below signal an error if @var{keymap} is not a keymap,
|
||||
or if @var{key} is not a valid key.
|
||||
Key sequences containing function keys, mouse button events, system
|
||||
events, or non-@acronym{ASCII} characters such as @kbd{C-=} or
|
||||
@kbd{H-a} cannot be represented as strings; they have to be
|
||||
represented as vectors.
|
||||
|
||||
@var{key} is a string representing a single key or a series of key
|
||||
strokes, and must satisfy @code{key-valid-p}. Key strokes are
|
||||
separated by a single space character.
|
||||
In the vector representation, each element of the vector represents
|
||||
an input event, in its Lisp form. @xref{Input Events}. For example,
|
||||
the vector @code{[?\C-x ?l]} represents the key sequence @kbd{C-x l}.
|
||||
|
||||
Each key stroke is either a single character, or the name of an
|
||||
event, surrounded by angle brackets. In addition, any key stroke
|
||||
may be preceded by one or more modifier keys. Finally, a limited
|
||||
number of characters have a special shorthand syntax. Here's some
|
||||
example key sequences:
|
||||
For examples of key sequences written in string and vector
|
||||
representations, @ref{Init Rebinding,,, emacs, The GNU Emacs Manual}.
|
||||
|
||||
@table @kbd
|
||||
@item f
|
||||
The key @kbd{f}.
|
||||
@defun kbd keyseq-text
|
||||
This function converts the text @var{keyseq-text} (a string constant)
|
||||
into a key sequence (a string or vector constant). The contents of
|
||||
@var{keyseq-text} should use the same syntax as in the buffer invoked
|
||||
by the @kbd{C-x C-k @key{RET}} (@code{kmacro-edit-macro}) command; in
|
||||
particular, you must surround function key names with
|
||||
@samp{<@dots{}>}. @xref{Edit Keyboard Macro,,, emacs, The GNU Emacs
|
||||
Manual}.
|
||||
|
||||
@item S o m
|
||||
A three key sequence of the keys @kbd{S}, @kbd{o} and @kbd{m}.
|
||||
@example
|
||||
(kbd "C-x") @result{} "\C-x"
|
||||
(kbd "C-x C-f") @result{} "\C-x\C-f"
|
||||
(kbd "C-x 4 C-f") @result{} "\C-x4\C-f"
|
||||
(kbd "X") @result{} "X"
|
||||
(kbd "RET") @result{} "^M"
|
||||
(kbd "C-c SPC") @result{} "\C-c@ "
|
||||
(kbd "<f1> SPC") @result{} [f1 32]
|
||||
(kbd "C-M-<down>") @result{} [C-M-down]
|
||||
@end example
|
||||
|
||||
@item C-c o
|
||||
A two key sequence of the keys @kbd{c} with the control modifier and
|
||||
then the key @kbd{o}
|
||||
|
||||
@item H-<left>
|
||||
The key named @kbd{left} with the hyper modifier.
|
||||
|
||||
@item M-RET
|
||||
The @kbd{return} key with a meta modifier.
|
||||
|
||||
@item C-M-<space>
|
||||
The @kbd{space} key with both the control and meta modifiers.
|
||||
@end table
|
||||
|
||||
The only keys that have a special shorthand syntax are @kbd{NUL},
|
||||
@kbd{RET}, @kbd{TAB}, @kbd{LFD}, @kbd{ESC}, @kbd{SPC} and @kbd{DEL}.
|
||||
|
||||
The modifiers have to be specified in alphabetical order:
|
||||
@samp{A-C-H-M-S-s}, which is @samp{Alt-Control-Hyper-Meta-Shift-super}.
|
||||
|
||||
@findex keymap-set
|
||||
@defun keymap-set keymap key binding
|
||||
This function sets the binding for @var{key} in @var{keymap}. (If
|
||||
@var{key} is more than one event long, the change is actually made
|
||||
in another keymap reached from @var{keymap}.) The argument
|
||||
@var{binding} can be any Lisp object, but only certain types are
|
||||
meaningful. (For a list of meaningful types, see @ref{Key Lookup}.)
|
||||
The value returned by @code{keymap-set} is @var{binding}.
|
||||
|
||||
If @var{key} is @kbd{<t>}, this sets the default binding in
|
||||
@var{keymap}. When an event has no binding of its own, the Emacs
|
||||
command loop uses the keymap's default binding, if there is one.
|
||||
|
||||
@cindex invalid prefix key error
|
||||
@cindex key sequence error
|
||||
Every prefix of @var{key} must be a prefix key (i.e., bound to a keymap)
|
||||
or undefined; otherwise an error is signaled. If some prefix of
|
||||
@var{key} is undefined, then @code{keymap-set} defines it as a prefix
|
||||
key so that the rest of @var{key} can be defined as specified.
|
||||
|
||||
If there was previously no binding for @var{key} in @var{keymap}, the
|
||||
new binding is added at the beginning of @var{keymap}. The order of
|
||||
bindings in a keymap makes no difference for keyboard input, but it
|
||||
does matter for menu keymaps (@pxref{Menu Keymaps}).
|
||||
@end defun
|
||||
|
||||
@findex keymap-unset
|
||||
@defun keymap-unset keymap key &optional remove
|
||||
This function is the inverse of @code{keymap-set}, it unsets the
|
||||
binding for @var{key} in @var{keymap}, which is the same as setting
|
||||
the binding to @code{nil}. In order to instead remove the binding
|
||||
completely, specify @var{remove} as non-@code{nil}. This only makes a
|
||||
difference if @var{keymap} has a parent keymap: if you just unset a key
|
||||
in a child map, it will still shadow the same key in the parent
|
||||
keymap; using @var{remove} instead will allow the key in the parent keymap
|
||||
to be used.
|
||||
@end defun
|
||||
|
||||
Note: using @code{keymap-unset} with @var{remove} non-@code{nil} is
|
||||
intended for users to put in their init file; Emacs packages should
|
||||
avoid using it if possible, since they have complete control over
|
||||
their own keymaps anyway, and they should not be altering other
|
||||
packages' keymaps.
|
||||
|
||||
This example creates a sparse keymap and makes a number of
|
||||
bindings in it:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
(setq map (make-sparse-keymap))
|
||||
@result{} (keymap)
|
||||
@end group
|
||||
@group
|
||||
(keymap-set map "C-f" 'forward-char)
|
||||
@result{} forward-char
|
||||
@end group
|
||||
@group
|
||||
map
|
||||
@result{} (keymap (6 . forward-char))
|
||||
@end group
|
||||
|
||||
@group
|
||||
;; @r{Build sparse submap for @kbd{C-x} and bind @kbd{f} in that.}
|
||||
(keymap-set map "C-x f" 'forward-word)
|
||||
@result{} forward-word
|
||||
@end group
|
||||
@group
|
||||
map
|
||||
@result{} (keymap
|
||||
(24 keymap ; @kbd{C-x}
|
||||
(102 . forward-word)) ; @kbd{f}
|
||||
(6 . forward-char)) ; @kbd{C-f}
|
||||
@end group
|
||||
|
||||
@group
|
||||
;; @r{Bind @kbd{C-p} to the @code{ctl-x-map}.}
|
||||
(keymap-set map "C-p" ctl-x-map)
|
||||
;; @code{ctl-x-map}
|
||||
@result{} [nil @dots{} find-file @dots{} backward-kill-sentence]
|
||||
@end group
|
||||
|
||||
@group
|
||||
;; @r{Bind @kbd{C-f} to @code{foo} in the @code{ctl-x-map}.}
|
||||
(keymap-set map "C-p C-f" 'foo)
|
||||
@result{} 'foo
|
||||
@end group
|
||||
@group
|
||||
map
|
||||
@result{} (keymap ; @r{Note @code{foo} in @code{ctl-x-map}.}
|
||||
(16 keymap [nil @dots{} foo @dots{} backward-kill-sentence])
|
||||
(24 keymap
|
||||
(102 . forward-word))
|
||||
(6 . forward-char))
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
Note that storing a new binding for @kbd{C-p C-f} actually works by
|
||||
changing an entry in @code{ctl-x-map}, and this has the effect of
|
||||
changing the bindings of both @kbd{C-p C-f} and @kbd{C-x C-f} in the
|
||||
default global map.
|
||||
|
||||
@code{keymap-set} is the general work horse for defining a key in a
|
||||
keymap. When writing modes, however, you frequently have to bind a
|
||||
large number of keys at once, and using @code{keymap-set} on them all
|
||||
can be tedious and error-prone. Instead you can use
|
||||
@code{define-keymap}, which creates a keymap and binds a number of
|
||||
keys. @xref{Creating Keymaps}, for details.
|
||||
|
||||
The function @code{substitute-key-definition} scans a keymap for
|
||||
keys that have a certain binding and rebinds them with a different
|
||||
binding. Another feature which is cleaner and can often produce the
|
||||
same results is to remap one command into another (@pxref{Remapping
|
||||
Commands}).
|
||||
|
||||
@defun substitute-key-definition olddef newdef keymap &optional oldmap
|
||||
@cindex replace bindings
|
||||
This function replaces @var{olddef} with @var{newdef} for any keys in
|
||||
@var{keymap} that were bound to @var{olddef}. In other words,
|
||||
@var{olddef} is replaced with @var{newdef} wherever it appears. The
|
||||
function returns @code{nil}.
|
||||
|
||||
For example, this redefines @kbd{C-x C-f}, if you do it in an Emacs with
|
||||
standard bindings:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
(substitute-key-definition
|
||||
'find-file 'find-file-read-only (current-global-map))
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
If @var{oldmap} is non-@code{nil}, that changes the behavior of
|
||||
@code{substitute-key-definition}: the bindings in @var{oldmap} determine
|
||||
which keys to rebind. The rebindings still happen in @var{keymap}, not
|
||||
in @var{oldmap}. Thus, you can change one map under the control of the
|
||||
bindings in another. For example,
|
||||
|
||||
@smallexample
|
||||
(substitute-key-definition
|
||||
'delete-backward-char 'my-funny-delete
|
||||
my-map global-map)
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
puts the special deletion command in @code{my-map} for whichever keys
|
||||
are globally bound to the standard deletion command.
|
||||
|
||||
Here is an example showing a keymap before and after substitution:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
(setq map (list 'keymap
|
||||
(cons ?1 olddef-1)
|
||||
(cons ?2 olddef-2)
|
||||
(cons ?3 olddef-1)))
|
||||
@result{} (keymap (49 . olddef-1) (50 . olddef-2) (51 . olddef-1))
|
||||
@end group
|
||||
|
||||
@group
|
||||
(substitute-key-definition 'olddef-1 'newdef map)
|
||||
@result{} nil
|
||||
@end group
|
||||
@group
|
||||
map
|
||||
@result{} (keymap (49 . newdef) (50 . olddef-2) (51 . newdef))
|
||||
@end group
|
||||
@end smallexample
|
||||
@end defun
|
||||
|
||||
@defun suppress-keymap keymap &optional nodigits
|
||||
@cindex @code{self-insert-command} override
|
||||
This function changes the contents of the full keymap @var{keymap} by
|
||||
remapping @code{self-insert-command} to the command @code{undefined}
|
||||
(@pxref{Remapping Commands}). This has the effect of undefining all
|
||||
printing characters, thus making ordinary insertion of text impossible.
|
||||
@code{suppress-keymap} returns @code{nil}.
|
||||
|
||||
If @var{nodigits} is @code{nil}, then @code{suppress-keymap} defines
|
||||
digits to run @code{digit-argument}, and @kbd{-} to run
|
||||
@code{negative-argument}. Otherwise it makes them undefined like the
|
||||
rest of the printing characters.
|
||||
|
||||
@cindex yank suppression
|
||||
@cindex @code{quoted-insert} suppression
|
||||
The @code{suppress-keymap} function does not make it impossible to
|
||||
modify a buffer, as it does not suppress commands such as @code{yank}
|
||||
and @code{quoted-insert}. To prevent any modification of a buffer, make
|
||||
it read-only (@pxref{Read Only Buffers}).
|
||||
|
||||
Since this function modifies @var{keymap}, you would normally use it
|
||||
on a newly created keymap. Operating on an existing keymap
|
||||
that is used for some other purpose is likely to cause trouble; for
|
||||
example, suppressing @code{global-map} would make it impossible to use
|
||||
most of Emacs.
|
||||
|
||||
This function can be used to initialize the local keymap of a major
|
||||
mode for which insertion of text is not desirable. But usually such a
|
||||
mode should be derived from @code{special-mode} (@pxref{Basic Major
|
||||
Modes}); then its keymap will automatically inherit from
|
||||
@code{special-mode-map}, which is already suppressed. Here is how
|
||||
@code{special-mode-map} is defined:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
(defvar special-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(suppress-keymap map)
|
||||
(keymap-set map "q" 'quit-window)
|
||||
@dots{}
|
||||
map))
|
||||
@end group
|
||||
@end smallexample
|
||||
@findex key-valid-p
|
||||
The @code{kbd} function is very permissive, and will try to return
|
||||
something sensible even if the syntax used isn't completely
|
||||
conforming. To check whether the syntax is actually valid, use the
|
||||
@code{key-valid-p} function.
|
||||
@end defun
|
||||
|
||||
@node Low-Level Key Binding
|
||||
|
|
@ -1845,6 +1844,8 @@ local keymap, or @code{nil} if it is undefined there.
|
|||
|
||||
The argument @var{accept-defaults} controls checking for default bindings,
|
||||
as in @code{lookup-key} (above).
|
||||
|
||||
Use @code{keymap-local-lookup} instead of this function.
|
||||
@end defun
|
||||
|
||||
@defun global-key-binding key &optional accept-defaults
|
||||
|
|
@ -1853,6 +1854,8 @@ current global keymap, or @code{nil} if it is undefined there.
|
|||
|
||||
The argument @var{accept-defaults} controls checking for default bindings,
|
||||
as in @code{lookup-key} (above).
|
||||
|
||||
Use @code{keymap-global-lookup} instead of this function.
|
||||
@end defun
|
||||
|
||||
@defun event-convert-list list
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ If the option @code{load-prefer-newer} is non-@code{nil}, then when
|
|||
searching suffixes, @code{load} selects whichever version of a file
|
||||
(@samp{.elc}, @samp{.el}, etc.)@: has been modified most recently.
|
||||
In this case, @code{load} doesn't load the @samp{.eln}
|
||||
natively-compiled file even if it exists.
|
||||
native-compiled file even if it exists.
|
||||
|
||||
If @var{filename} is a relative file name, such as @file{foo} or
|
||||
@file{baz/foo.bar}, @code{load} searches for the file using the variable
|
||||
|
|
@ -161,7 +161,7 @@ during compilation. @xref{Compiling Macros}.
|
|||
|
||||
Messages like @samp{Loading foo...} and @samp{Loading foo...done} appear
|
||||
in the echo area during loading unless @var{nomessage} is
|
||||
non-@code{nil}. If a natively-compiled @samp{.eln} file is loaded,
|
||||
non-@code{nil}. If a native-compiled @samp{.eln} file is loaded,
|
||||
the message says so.
|
||||
|
||||
@cindex load errors
|
||||
|
|
@ -462,13 +462,13 @@ the shadowed files as a string.
|
|||
(@pxref{Native Compilation}), then when a @samp{.elc} byte-compiled
|
||||
file is found by searching @code{load-path}, Emacs will try to look
|
||||
for a corresponding @samp{.eln} file holding the corresponding
|
||||
natively-compiled code. The natively-compiled files are looked up in
|
||||
native-compiled code. The native-compiled files are looked up in
|
||||
the directories listed by the @code{native-comp-eln-load-path}.
|
||||
|
||||
@vindex comp-native-version-dir
|
||||
@defvar native-comp-eln-load-path
|
||||
This variable holds a list of directories where Emacs looks for
|
||||
natively-compiled @samp{.eln} files. File names in the list that are
|
||||
native-compiled @samp{.eln} files. File names in the list that are
|
||||
not absolute are interpreted as relative to @code{invocation-directory}
|
||||
(@pxref{System Environment}). The last directory in the list is the
|
||||
system directory, i.e.@: the directory with @samp{.eln} files
|
||||
|
|
@ -659,8 +659,8 @@ and @code{define-overloadable-function} (see the commentary in
|
|||
|
||||
@item Definitions for major or minor modes:
|
||||
@code{define-minor-mode}, @code{define-globalized-minor-mode},
|
||||
@code{define-generic-mode}, @code{define-derived-mode},
|
||||
@code{define-compilation-mode}, and @code{define-global-minor-mode}.
|
||||
@code{define-generic-mode}, @code{define-derived-mode}, and
|
||||
@code{define-compilation-mode}.
|
||||
|
||||
@item Other definition types:
|
||||
@code{defcustom}, @code{defgroup}, @code{deftheme}, @code{defclass}
|
||||
|
|
|
|||
|
|
@ -754,7 +754,10 @@ each character in columns that it will occupy on the screen.
|
|||
The value of this variable is a char-table that specifies, for each
|
||||
character, whether it is printable or not. That is, if evaluating
|
||||
@code{(aref printable-chars char)} results in @code{t}, the character
|
||||
is printable, and if it results in @code{nil}, it is not.
|
||||
is printable, and if it results in @code{nil}, it is not. The
|
||||
definition of what is a printable character is the same as for the
|
||||
@samp{[:print:]} character class in regular expressions, @pxref{Char
|
||||
Classes}.
|
||||
@end defvar
|
||||
|
||||
@node Character Sets
|
||||
|
|
|
|||
|
|
@ -927,13 +927,13 @@ reproducing the same pattern moved over.
|
|||
|
||||
The bitwise operations in Emacs Lisp apply only to integers.
|
||||
|
||||
@defun ash integer1 count
|
||||
@defun ash integer count
|
||||
@cindex arithmetic shift
|
||||
@code{ash} (@dfn{arithmetic shift}) shifts the bits in @var{integer1}
|
||||
@code{ash} (@dfn{arithmetic shift}) shifts the bits in @var{integer}
|
||||
to the left @var{count} places, or to the right if @var{count} is
|
||||
negative. Left shifts introduce zero bits on the right; right shifts
|
||||
discard the rightmost bits. Considered as an integer operation,
|
||||
@code{ash} multiplies @var{integer1} by
|
||||
@code{ash} multiplies @var{integer} by
|
||||
@ifnottex
|
||||
2**@var{count},
|
||||
@end ifnottex
|
||||
|
|
@ -1002,20 +1002,20 @@ Here are examples of shifting left or right by two bits:
|
|||
@end smallexample
|
||||
@end defun
|
||||
|
||||
@defun lsh integer1 count
|
||||
@defun lsh integer count
|
||||
@cindex logical shift
|
||||
@code{lsh}, which is an abbreviation for @dfn{logical shift}, shifts the
|
||||
bits in @var{integer1} to the left @var{count} places, or to the right
|
||||
bits in @var{integer} to the left @var{count} places, or to the right
|
||||
if @var{count} is negative, bringing zeros into the vacated bits. If
|
||||
@var{count} is negative, then @var{integer1} must be either a fixnum
|
||||
@var{count} is negative, then @var{integer} must be either a fixnum
|
||||
or a positive bignum, and @code{lsh} treats a negative fixnum as if it
|
||||
were unsigned by subtracting twice @code{most-negative-fixnum} before
|
||||
shifting, producing a nonnegative result. This quirky behavior dates
|
||||
back to when Emacs supported only fixnums; nowadays @code{ash} is a
|
||||
better choice.
|
||||
|
||||
As @code{lsh} behaves like @code{ash} except when @var{integer1} and
|
||||
@var{count1} are both negative, the following examples focus on these
|
||||
As @code{lsh} behaves like @code{ash} except when @var{integer} and
|
||||
@var{count} are both negative, the following examples focus on these
|
||||
exceptional cases. These examples assume 30-bit fixnums.
|
||||
|
||||
@smallexample
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ them using a cryptographic key. If you have generated a
|
|||
private/public gpg key pair, you can use gpg to sign the package like
|
||||
this:
|
||||
|
||||
@c FIXME EasyPG / package-x way to do this.
|
||||
@c FIXME EasyPG way to do this.
|
||||
@example
|
||||
gpg -ba -o @var{file}.sig @var{file}
|
||||
@end example
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ source files that mix multiple programming languages.
|
|||
* User-defined Things:: User-defined ``Things'' and Navigation.
|
||||
* Multiple Languages:: Parse text written in multiple languages.
|
||||
* Tree-sitter Major Modes:: Develop major modes using tree-sitter.
|
||||
* Tree-sitter C API:: Compare the C API and the ELisp API.
|
||||
* Tree-sitter C API:: Compare the C API and the Lisp API.
|
||||
@end menu
|
||||
|
||||
@node Language Grammar
|
||||
|
|
@ -1225,7 +1225,7 @@ example, the capture name @code{biexp}:
|
|||
@cindex query functions, tree-sitter
|
||||
Now we can introduce the @dfn{query functions}.
|
||||
|
||||
@defun treesit-query-capture node query &optional beg end node-only
|
||||
@defun treesit-query-capture node query &optional beg end node-only grouped
|
||||
This function matches patterns in @var{query} within @var{node}. The
|
||||
argument @var{query} can be either an s-expression, a string, or a
|
||||
compiled query object. For now, we focus on the s-expression syntax;
|
||||
|
|
@ -1247,6 +1247,11 @@ matching node whose span overlaps with the region between @var{beg}
|
|||
and @var{end} is captured; it doesn't have to be completely contained
|
||||
in the region.
|
||||
|
||||
If @var{grouped} is non-@code{nil}, this function returns a grouped list
|
||||
of lists of captured nodes. The grouping is determined by @var{query}.
|
||||
Captures in the same match of a pattern in @var{query} are grouped
|
||||
together.
|
||||
|
||||
@vindex treesit-query-error
|
||||
@findex treesit-query-validate
|
||||
This function raises the @code{treesit-query-error} error if
|
||||
|
|
@ -1284,7 +1289,7 @@ For example, it could have two top-level patterns:
|
|||
@group
|
||||
(setq query
|
||||
'((binary_expression) @@biexp
|
||||
(number_literal) @@number @@biexp)
|
||||
(number_literal) @@number)
|
||||
@end group
|
||||
@end example
|
||||
|
||||
|
|
@ -2300,8 +2305,8 @@ Null nodes are converted to @code{nil}.
|
|||
@end itemize
|
||||
|
||||
Below is the correspondence between all C API functions and their
|
||||
ELisp counterparts. Sometimes one ELisp function corresponds to
|
||||
multiple C functions, and many C functions don't have an ELisp
|
||||
Lisp counterparts. Sometimes one Lisp function corresponds to
|
||||
multiple C functions, and many C functions don't have a Lisp
|
||||
counterpart.
|
||||
|
||||
@example
|
||||
|
|
|
|||
|
|
@ -622,6 +622,7 @@ This matches any character whose code is in the range 0--31.
|
|||
@item [:digit:]
|
||||
This matches @samp{0} through @samp{9}. Thus, @samp{[-+[:digit:]]}
|
||||
matches any digit, as well as @samp{+} and @samp{-}.
|
||||
@cindex graphic characters
|
||||
@item [:graph:]
|
||||
This matches graphic characters---everything except spaces,
|
||||
@acronym{ASCII} and non-@acronym{ASCII} control characters,
|
||||
|
|
@ -638,6 +639,7 @@ one.
|
|||
This matches any multibyte character (@pxref{Text Representations}).
|
||||
@item [:nonascii:]
|
||||
This matches any non-@acronym{ASCII} character.
|
||||
@cindex printable characters
|
||||
@item [:print:]
|
||||
This matches any printing character---either spaces or graphic
|
||||
characters matched by @samp{[:graph:]}.
|
||||
|
|
|
|||
|
|
@ -4291,7 +4291,7 @@ bind it within the link text, using the @code{keymap} text property
|
|||
|
||||
@example
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [mouse-2] 'operate-this-button)
|
||||
(keymap-set map "<mouse-2>" 'operate-this-button)
|
||||
(put-text-property link-start link-end 'keymap map))
|
||||
@end example
|
||||
|
||||
|
|
|
|||
|
|
@ -1649,7 +1649,7 @@ on having separate values in separate buffers, then using
|
|||
@code{make-variable-buffer-local} can be the best solution.
|
||||
@end deffn
|
||||
|
||||
@defmac defvar-local variable value &optional docstring
|
||||
@defmac defvar-local variable &optional value docstring
|
||||
This macro defines @var{variable} as a variable with initial value
|
||||
@var{value} and @var{docstring}, and marks it as automatically
|
||||
buffer-local. It is equivalent to calling @code{defvar} followed by
|
||||
|
|
@ -2015,14 +2015,21 @@ function does not look for the @samp{mode:} local variable in the
|
|||
@w{@samp{-*-}} line. @code{set-auto-mode} does that, also taking
|
||||
@code{enable-local-variables} into account (@pxref{Auto Major Mode}).
|
||||
|
||||
This function works by walking the alist stored in
|
||||
@code{file-local-variables-alist} and applying each local variable in
|
||||
turn. It calls @code{before-hack-local-variables-hook} and
|
||||
This function also puts into effect directory-local variables as
|
||||
specified in @file{.dir-locals.el}. If the buffer is not visiting any
|
||||
file, then the directory-local variables that apply are those which
|
||||
would be applicable to files in the @code{default-directory}
|
||||
(@pxref{Directory Local Variables}).
|
||||
|
||||
This function works by walking the alists stored in
|
||||
@code{file-local-variables-alist} and @code{dir-local-variables-alist}
|
||||
and applying each local variable in turn. It calls
|
||||
@code{before-hack-local-variables-hook} and
|
||||
@code{hack-local-variables-hook} before and after applying the
|
||||
variables, respectively. It only calls the before-hook if the alist
|
||||
is non-@code{nil}; it always calls the other hook. This
|
||||
function ignores a @samp{mode} element if it specifies the same major
|
||||
mode as the buffer already has.
|
||||
variables, respectively. It only calls the before-hook if
|
||||
@code{file-local-variables-alist} is non-@code{nil}; it always calls the
|
||||
other hook. This function ignores a @samp{mode} element if it specifies
|
||||
the same major mode as the buffer already has.
|
||||
|
||||
If the optional argument @var{handle-mode} is @code{t}, then all this
|
||||
function does is return a symbol specifying the major mode, if the
|
||||
|
|
@ -2295,6 +2302,17 @@ modification times of the associated directory local variables file
|
|||
updates this list.
|
||||
@end defvar
|
||||
|
||||
@defvar dir-local-variables-alist
|
||||
This buffer-local variable holds the alist of directory-local variable
|
||||
settings. Each element of the alist is of the form @w{@code{(@var{var}
|
||||
. @var{value})}}, where @var{var} is a symbol of the local variable and
|
||||
@var{value} is its value (this is the same structure as that of
|
||||
@code{file-local-variables-alist}, @pxref{File Local Variables}). When
|
||||
Emacs visits a file, it collects all the directory-local variables into
|
||||
this alist, and then the @code{hack-local-variables} function applies
|
||||
them one by one (again, @pxref{File Local Variables}).
|
||||
@end defvar
|
||||
|
||||
@defvar hack-dir-local-get-variables-functions
|
||||
This special hook holds the functions that gather the directory-local
|
||||
variables to use for a given buffer. By default it contains just the
|
||||
|
|
|
|||
|
|
@ -2697,7 +2697,37 @@ Ordering}). This function may be changed in a future version of Emacs
|
|||
to eliminate this discrepancy.
|
||||
@end defun
|
||||
|
||||
@defun get-buffer-window-list &optional buffer-or-name minibuf all-frames
|
||||
The following function can tell for a specific window whether its buffer
|
||||
shares the text of some other buffer (@pxref{Indirect Buffers}).
|
||||
|
||||
@defun window-indirect-buffer-p &optional window buffer-or-name
|
||||
This function returns non-@code{nil} if @var{window} is indirectly
|
||||
related to @var{buffer-or-name}. @var{window} must be a live window and
|
||||
defaults to the selected window. @var{buffer-or-name} may be a buffer
|
||||
or the name of an existing buffer and defaults to the current buffer.
|
||||
|
||||
@var{window} is indirectly related to @var{buffer-or-name} if one of the
|
||||
following conditions hold:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
@var{buffer-or-name} specifies an indirect buffer and @var{window}'s
|
||||
buffer is its base buffer.
|
||||
|
||||
@item
|
||||
@var{window}'s buffer is an indirect buffer whose base buffer is the
|
||||
buffer specified by @var{buffer-or-name}.
|
||||
|
||||
@item
|
||||
Both, @var{window}'s buffer and the buffer specified by
|
||||
@var{buffer-or-name}, are indirect buffer's sharing the same base
|
||||
buffer.
|
||||
@end itemize
|
||||
|
||||
It returns @code{nil} if none of the above holds.
|
||||
@end defun
|
||||
|
||||
@defun get-buffer-window-list &optional buffer-or-name minibuf all-frames indirect
|
||||
This function returns a list of all windows currently displaying
|
||||
@var{buffer-or-name}. @var{buffer-or-name} should be a buffer or the
|
||||
name of an existing buffer. If omitted or @code{nil}, it defaults to
|
||||
|
|
@ -2709,6 +2739,13 @@ The arguments @var{minibuf} and @var{all-frames} have the same
|
|||
meanings as in the function @code{next-window} (@pxref{Cyclic Window
|
||||
Ordering}). Note that the @var{all-frames} argument does @emph{not}
|
||||
behave exactly like in @code{get-buffer-window}.
|
||||
|
||||
The optional argument @var{indirect} non-@code{nil} means to append to
|
||||
the list of windows showing @var{buffer-or-name} a list of all windows
|
||||
that are indirectly related to @var{buffer-or-name}, that is, windows
|
||||
for which @code{window-indirect-buffer-p} (see above) with the window
|
||||
and the buffer specified by @var{buffer-or-name} as arguments returns
|
||||
non-@code{nil}.
|
||||
@end defun
|
||||
|
||||
@deffn Command replace-buffer-in-windows &optional buffer-or-name
|
||||
|
|
@ -3165,6 +3202,17 @@ searches just the selected frame.
|
|||
If this function chooses a window on another frame, it makes that
|
||||
frame visible and, unless @var{alist} contains an
|
||||
@code{inhibit-switch-frame} entry, raises that frame if necessary.
|
||||
|
||||
If @var{alist} has a non-@code{nil} @code{reuse-indirect} entry and no
|
||||
window showing @var{buffer} has been found, this function tries to find
|
||||
a window that is indirectly related to @var{buffer}---a window for which
|
||||
@code{window-indirect-buffer-p} (@pxref{Buffers and Windows}) with the
|
||||
window and @var{buffer} as arguments returns non-@code{nil}. If such a
|
||||
window has been found and the @sc{cdr} of the @code{reuse-indirect}
|
||||
entry equals the symbol @code{buffer}, it does not replace the buffer of
|
||||
that window with @var{buffer} but returns the window with its old buffer
|
||||
in place. Otherwise, it puts @var{buffer} into that window and returns
|
||||
that window.
|
||||
@end defun
|
||||
|
||||
@defun display-buffer-reuse-mode-window buffer alist
|
||||
|
|
|
|||
|
|
@ -32370,7 +32370,7 @@ has the advantage that it is quietly ignored if @code{calc-check-defines}
|
|||
is not yet defined because Calc has not yet been loaded.
|
||||
|
||||
Examples of things that ought to be enclosed in a @code{calc-define}
|
||||
property are @code{defmath} calls, @code{define-key} calls that modify
|
||||
property are @code{defmath} calls, @code{keymap-set} calls that modify
|
||||
the Calc key map, and any calls that redefine things defined inside Calc.
|
||||
Ordinary @code{defun}s need not be enclosed with @code{calc-define}.
|
||||
|
||||
|
|
@ -32478,7 +32478,7 @@ there.
|
|||
@vindex calc-Y-help-msgs
|
||||
Calc reserves a special prefix key, shift-@kbd{Y}, for user-written
|
||||
extensions to Calc. There are no built-in commands that work with
|
||||
this prefix key; you must call @code{define-key} from Lisp (probably
|
||||
this prefix key; you must call @code{keymap-set} from Lisp (probably
|
||||
from inside a @code{calc-define} property) to add to it. Initially only
|
||||
@kbd{Y ?} is defined; it takes help messages from a list of strings
|
||||
(initially @code{nil}) in the variable @code{calc-Y-help-msgs}. All
|
||||
|
|
@ -32512,9 +32512,9 @@ decreases the precision.
|
|||
|
||||
(put 'calc-define 'inc-prec '(progn
|
||||
|
||||
(define-key calc-mode-map (format "Y%sI" inc-prec-base-key)
|
||||
(keymap-set calc-mode-map (format "Y %s I" inc-prec-base-key)
|
||||
'calc-increase-precision)
|
||||
(define-key calc-mode-map (format "Y%sD" inc-prec-base-key)
|
||||
(keymap-set calc-mode-map (format "Y %s D" inc-prec-base-key)
|
||||
'calc-decrease-precision)
|
||||
|
||||
(setq calc-Y-help-msgs
|
||||
|
|
@ -35297,7 +35297,7 @@ The usual prefix for Calc is the key sequence @kbd{C-x *}. If you wish
|
|||
to use a different prefix, you can put
|
||||
|
||||
@example
|
||||
(global-set-key "NEWPREFIX" 'calc-dispatch)
|
||||
(keymap-global-set "NEWPREFIX" 'calc-dispatch)
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ modify this GNU manual.''
|
|||
* Predicates:: Type predicates and equality predicates.
|
||||
* Control Structure:: Assignment, conditionals, blocks, looping.
|
||||
* Macros:: Destructuring, compiler macros.
|
||||
* Declarations:: @code{cl-proclaim}, @code{cl-declare}, etc.
|
||||
* Declarations:: @code{cl-proclaim}, @code{cl-declaim}, etc.
|
||||
* Symbols:: Property lists, creating symbols.
|
||||
* Numbers:: Predicates, functions, random numbers.
|
||||
* Sequences:: Mapping, functions, searching, sorting.
|
||||
|
|
@ -611,7 +611,7 @@ For example:
|
|||
|
||||
@example
|
||||
(cl-defmacro dolist ((var listform &optional resultform)
|
||||
&rest body)
|
||||
&rest body)
|
||||
@dots{})
|
||||
@end example
|
||||
|
||||
|
|
@ -1370,7 +1370,7 @@ expansion of another macro:
|
|||
|
||||
@example
|
||||
(cl-defmacro my-dolist ((x list) &rest body)
|
||||
(let ((var (cl-gensym)))
|
||||
(cl-with-gensyms (var)
|
||||
(list 'cl-loop 'for var 'on list 'do
|
||||
(cl-list* 'cl-symbol-macrolet
|
||||
(list (list x (list 'car var)))
|
||||
|
|
@ -2652,8 +2652,7 @@ mechanism that allows you to give the compiler special hints
|
|||
about the types of data that will be stored in particular variables,
|
||||
and about the ways those variables and functions will be used. This
|
||||
package defines versions of all the Common Lisp declaration forms:
|
||||
@code{declare}, @code{locally}, @code{proclaim}, @code{declaim},
|
||||
and @code{the}.
|
||||
@code{proclaim}, @code{declaim}, and @code{the}.
|
||||
|
||||
Most of the Common Lisp declarations are not currently useful in Emacs
|
||||
Lisp. For example, the byte-code system provides little
|
||||
|
|
@ -2683,15 +2682,6 @@ compiler treats the rest of the file that contains the @code{cl-declaim}
|
|||
form.)
|
||||
@end defmac
|
||||
|
||||
@defmac cl-declare decl-specs@dots{}
|
||||
This macro is used to make declarations within functions and other
|
||||
code. Common Lisp allows declarations in various locations, generally
|
||||
at the beginning of any of the many ``implicit @code{progn}s''
|
||||
throughout Lisp syntax, such as function bodies, @code{let} bodies,
|
||||
etc. Currently the only declaration understood by @code{cl-declare}
|
||||
is @code{special}.
|
||||
@end defmac
|
||||
|
||||
@defmac cl-the type form
|
||||
@code{cl-the} returns the value of @code{form}, first checking (if
|
||||
optimization settings permit) that it is of type @code{type}. Future
|
||||
|
|
@ -2707,8 +2697,8 @@ For now, Emacs Lisp will treat the above code as exactly equivalent
|
|||
to @code{(mapcar 'car foo)}.
|
||||
@end defmac
|
||||
|
||||
Each @var{decl-spec} in a @code{cl-proclaim}, @code{cl-declaim}, or
|
||||
@code{cl-declare} should be a list beginning with a symbol that says
|
||||
Each @var{decl-spec} in a @code{cl-proclaim} or @code{cl-declaim}
|
||||
should be a list beginning with a symbol that says
|
||||
what kind of declaration it is. This package currently understands
|
||||
@code{special}, @code{inline}, @code{notinline}, @code{optimize},
|
||||
and @code{warn} declarations. (The @code{warn} declaration is an
|
||||
|
|
@ -2726,9 +2716,6 @@ bound in the body of the function. The compiler normally emits
|
|||
warnings for such references, since they could be typographical
|
||||
errors for references to local variables.
|
||||
|
||||
The declaration @code{(cl-declare (special @var{var1} @var{var2}))} is
|
||||
equivalent to @code{(defvar @var{var1}) (defvar @var{var2})}.
|
||||
|
||||
In top-level contexts, it is generally better to write
|
||||
@code{(defvar @var{var})} than @code{(cl-declaim (special @var{var}))},
|
||||
since @code{defvar} makes your intentions clearer.
|
||||
|
|
@ -2760,12 +2747,6 @@ request that a function you have defined should be inlined,
|
|||
but it is impolite to use it to request inlining of an external
|
||||
function.
|
||||
|
||||
In Common Lisp, it is possible to use @code{(declare (inline @dots{}))}
|
||||
before a particular call to a function to cause just that call to
|
||||
be inlined; the current byte compilers provide no way to implement
|
||||
this, so @code{(cl-declare (inline @dots{}))} is currently ignored by
|
||||
this package.
|
||||
|
||||
@item notinline
|
||||
The @code{notinline} declaration lists functions which should
|
||||
not be inlined after all; it cancels a previous @code{inline}
|
||||
|
|
@ -2800,12 +2781,7 @@ Emacs itself, Emacs will not crash with a segmentation fault
|
|||
just because of an error in a fully-optimized Lisp program.
|
||||
|
||||
The @code{optimize} declaration is normally used in a top-level
|
||||
@code{cl-proclaim} or @code{cl-declaim} in a file; Common Lisp allows
|
||||
it to be used with @code{declare} to set the level of optimization
|
||||
locally for a given form, but this will not work correctly with the
|
||||
current byte-compiler. (The @code{cl-declare}
|
||||
will set the new optimization level, but that level will not
|
||||
automatically be unset after the enclosing form is done.)
|
||||
@code{cl-proclaim} or @code{cl-declaim} in a file.
|
||||
|
||||
@item warn
|
||||
This declaration controls what sorts of warnings are generated
|
||||
|
|
@ -2828,7 +2804,7 @@ missing from Emacs Lisp.
|
|||
|
||||
@menu
|
||||
* Property Lists:: @code{cl-get}, @code{cl-remprop}, @code{cl-getf}, @code{cl-remf}.
|
||||
* Creating Symbols:: @code{cl-gensym}, @code{cl-gentemp}.
|
||||
* Creating Symbols:: @code{cl-gentemp}.
|
||||
@end menu
|
||||
|
||||
@node Property Lists
|
||||
|
|
@ -2916,30 +2892,10 @@ out the property and value cells.
|
|||
@section Creating Symbols
|
||||
@cindex gensym
|
||||
|
||||
@noindent
|
||||
These functions create unique symbols, typically for use as
|
||||
temporary variables.
|
||||
|
||||
@defun cl-gensym &optional x
|
||||
This function creates a new, uninterned symbol (using @code{make-symbol})
|
||||
with a unique name. (The name of an uninterned symbol is relevant
|
||||
only if the symbol is printed.) By default, the name is generated
|
||||
from an increasing sequence of numbers, @samp{G1000}, @samp{G1001},
|
||||
@samp{G1002}, etc. If the optional argument @var{x} is a string, that
|
||||
string is used as a prefix instead of @samp{G}. Uninterned symbols
|
||||
are used in macro expansions for temporary variables, to ensure that
|
||||
their names will not conflict with ``real'' variables in the user's
|
||||
code.
|
||||
|
||||
(Internally, the variable @code{cl--gensym-counter} holds the counter
|
||||
used to generate names. It is initialized with zero and incremented
|
||||
after each use.)
|
||||
@end defun
|
||||
|
||||
@defun cl-gentemp &optional x
|
||||
This function is like @code{cl-gensym}, except that it produces a new
|
||||
@emph{interned} symbol. If the symbol that is generated already
|
||||
exists, the function keeps incrementing the counter and trying
|
||||
This function is like the built-in @code{gensym}, except that it
|
||||
produces a new @emph{interned} symbol. If the symbol that is generated
|
||||
already exists, the function keeps incrementing the counter and trying
|
||||
again until a new symbol is generated.
|
||||
@end defun
|
||||
|
||||
|
|
@ -4443,18 +4399,18 @@ an expansion similar to:
|
|||
@example
|
||||
(cl-block nil
|
||||
(let* ((x 0)
|
||||
(G1004 nil))
|
||||
(g1004 nil))
|
||||
(while (< x 10)
|
||||
(setq G1004 (cons x G1004))
|
||||
(setq g1004 (cons x g1004))
|
||||
(setq x (+ x 1)))
|
||||
(nreverse G1004)))
|
||||
(nreverse g1004)))
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
will be inserted into the buffer. (The @code{cl-block} macro is
|
||||
expanded differently in the interpreter and compiler, so
|
||||
@code{cl-prettyexpand} just leaves it alone. The temporary
|
||||
variable @code{G1004} was created by @code{cl-gensym}.)
|
||||
variable @code{g1004} was created by @code{gensym}.)
|
||||
|
||||
If the optional argument @var{full} is true, then @emph{all}
|
||||
macros are expanded, including @code{cl-block}, @code{cl-eval-when},
|
||||
|
|
@ -5181,7 +5137,7 @@ temporary variables. In the setf-methods generated by
|
|||
@code{defsetf}, the second return value is simply the list of
|
||||
arguments in the place form, and the first return value is a
|
||||
list of a corresponding number of temporary variables generated
|
||||
by @code{cl-gensym}.
|
||||
by @code{gensym}.
|
||||
@end defmac
|
||||
|
||||
@node GNU Free Documentation License
|
||||
|
|
|
|||
|
|
@ -71,14 +71,22 @@ modify this GNU manual.''
|
|||
@top EDE
|
||||
@comment node-name, next, previous, up
|
||||
|
||||
@ede{} is the Emacs Development Environment: an Emacs extension that
|
||||
simplifies building and debugging programs in Emacs. It attempts to
|
||||
emulate a typical IDE (Integrated Development Environment). @ede{}
|
||||
@ede{} (Emacs Development Environment) is an Emacs extension that
|
||||
simplifies building and debugging programs in Emacs. @ede{}
|
||||
can manage or create your makefiles and other building environment
|
||||
duties, allowing you to concentrate on writing code rather than
|
||||
support files. It aims to make it much easier for new programmers to
|
||||
learn and adopt GNU ways of doing things.
|
||||
|
||||
In contrast to Emacs's built-in ``project'' support (@pxref{Projects,,,
|
||||
emacs, GNU Emacs Manual}), which provides lightweight project management
|
||||
features focused on file navigation and search, @ede{} offers a
|
||||
structured approach to managing build systems, configuration files, and
|
||||
project metadata. While built-in projects are well-suited to
|
||||
general-purpose workflows, @ede{} is useful for projects using tools
|
||||
like @samp{make}, @samp{automake}, or @samp{autoconf}, or that involve
|
||||
managing multiple targets, include paths, and build configurations.
|
||||
|
||||
@ifnottex
|
||||
@insertcopying
|
||||
@end ifnottex
|
||||
|
|
|
|||
|
|
@ -943,7 +943,7 @@ Emacs has been ported to the Android operating system. See the file
|
|||
to build it.
|
||||
|
||||
@item
|
||||
New user option @code{trusted-contents} to allow potentially dangerous
|
||||
New user option @code{trusted-content} to allow potentially dangerous
|
||||
Emacs features which could execute arbitrary Lisp code. Use this
|
||||
variable to list files and directories whose contents Emacs should
|
||||
trust, thus allowing those potentially dangerous features when those
|
||||
|
|
@ -2622,7 +2622,7 @@ parenthesis, it simply inserts a % like normal.
|
|||
@lisp
|
||||
;; By an unknown contributor
|
||||
|
||||
(global-set-key "%" 'match-paren)
|
||||
(keymap-global-set "%" 'match-paren)
|
||||
|
||||
(defun match-paren (arg)
|
||||
"Go to the matching paren if on a paren; otherwise insert %."
|
||||
|
|
@ -3012,8 +3012,8 @@ new definition to the appropriate keymap. Adding a @samp{Forward Word}
|
|||
item to the @samp{Edit} menu thus requires the following Lisp code:
|
||||
|
||||
@lisp
|
||||
(define-key global-map
|
||||
[menu-bar edit forward]
|
||||
(keymap-set global-map
|
||||
"<menu-bar> <edit> <forward>"
|
||||
'("Forward word" . forward-word))
|
||||
@end lisp
|
||||
|
||||
|
|
@ -3035,7 +3035,7 @@ To add a new menu, rather than a new option to an existing menu, we must
|
|||
define an entirely new keymap:
|
||||
|
||||
@lisp
|
||||
(define-key global-map [menu-bar words]
|
||||
(keymap-set global-map "<menu-bar> <words>"
|
||||
(cons "Words" (make-sparse-keymap "Words")))
|
||||
@end lisp
|
||||
|
||||
|
|
@ -3045,8 +3045,8 @@ The above code creates a new sparse keymap, gives it the name
|
|||
following code:
|
||||
|
||||
@lisp
|
||||
(define-key global-map
|
||||
[menu-bar words forward]
|
||||
(keymap-set global-map
|
||||
"<menu-bar> <words> <forward>"
|
||||
'("Forward word" . forward-word))
|
||||
@end lisp
|
||||
|
||||
|
|
@ -3057,26 +3057,26 @@ define menu options @samp{foo}, @samp{bar}, and @samp{baz} (in that
|
|||
order), the menu option @samp{baz} would appear at the top, and
|
||||
@samp{foo} would be at the bottom.
|
||||
|
||||
One way to avoid this problem is to use the function @code{define-key-after},
|
||||
which works the same as @code{define-key}, but lets you modify where items
|
||||
One way to avoid this problem is to use the function @code{keymap-set-after},
|
||||
which works the same as @code{keymap-set}, but lets you modify where items
|
||||
appear. The following Lisp code would insert the @samp{Forward Word}
|
||||
item in the @samp{Edit} menu immediately following the @samp{Undo} item:
|
||||
|
||||
@lisp
|
||||
(define-key-after
|
||||
(lookup-key global-map [menu-bar edit])
|
||||
[forward]
|
||||
(keymap-set-after
|
||||
(keymap-lookup global-map "<menu-bar> <edit>")
|
||||
"<forward>"
|
||||
'("Forward word" . forward-word)
|
||||
'undo)
|
||||
@end lisp
|
||||
|
||||
Note how the second and third arguments to @code{define-key-after} are
|
||||
different from those of @code{define-key}, and that we have added a new
|
||||
Note how the second and third arguments to @code{keymap-set-after} are
|
||||
different from those of @code{keymap-set}, and that we have added a new
|
||||
(final) argument, the function after which our new key should be
|
||||
defined.
|
||||
|
||||
To move a menu option from one position to another, simply evaluate
|
||||
@code{define-key-after} with the appropriate final argument.
|
||||
@code{keymap-set-after} with the appropriate final argument.
|
||||
|
||||
More detailed information---and more examples of how to create and
|
||||
modify menu options---are in the @cite{Emacs Lisp Reference Manual}, under
|
||||
|
|
@ -3093,7 +3093,7 @@ For example, to delete the @samp{Words} menu (@pxref{Modifying pull-down
|
|||
menus}), use:
|
||||
|
||||
@lisp
|
||||
(define-key global-map [menu-bar words] nil)
|
||||
(keymap-set global-map "<menu-bar> <words>" nil)
|
||||
@end lisp
|
||||
|
||||
Similarly, removing a menu option requires redefining a keymap entry to
|
||||
|
|
@ -3102,7 +3102,7 @@ from the @samp{Edit} menu (we added it in @ref{Modifying pull-down
|
|||
menus}), use:
|
||||
|
||||
@lisp
|
||||
(define-key global-map [menu-bar edit forward] nil)
|
||||
(keymap-set global-map "<menu-bar> <edit> <forward>" nil)
|
||||
@end lisp
|
||||
|
||||
@node Turning on syntax highlighting
|
||||
|
|
@ -4083,11 +4083,11 @@ information is available from
|
|||
|
||||
Keys can be bound to commands either interactively or in your init
|
||||
file (@pxref{Setting up a customization file}). To interactively bind
|
||||
keys for all modes, type @kbd{M-x global-set-key @key{RET} @var{key}
|
||||
keys for all modes, type @kbd{M-x keymap-global-set @key{RET} @var{key}
|
||||
@var{cmd} @key{RET}}.
|
||||
|
||||
To bind a key just in the current major mode, type @kbd{M-x
|
||||
local-set-key @key{RET} @var{key} @var{cmd} @key{RET}}.
|
||||
keymap-local-set @key{RET} @var{key} @var{cmd} @key{RET}}.
|
||||
|
||||
@xref{Key Bindings,,, emacs, The GNU Emacs Manual}.
|
||||
|
||||
|
|
@ -4099,7 +4099,7 @@ init file. If the key binding is global, no changes to the
|
|||
command are required. For example,
|
||||
|
||||
@lisp
|
||||
(global-set-key [f1] 'help-for-help)
|
||||
(keymap-global-set "<f1>" 'help-for-help)
|
||||
@end lisp
|
||||
|
||||
@noindent
|
||||
|
|
@ -4110,7 +4110,7 @@ function. For example, in TeX mode, a local binding might be
|
|||
@lisp
|
||||
(add-hook 'tex-mode-hook
|
||||
(lambda ()
|
||||
(local-set-key [f1] 'help-for-help)))
|
||||
(keymap-local-set "<f1>" 'help-for-help)))
|
||||
@end lisp
|
||||
|
||||
|
||||
|
|
@ -4128,8 +4128,8 @@ bound as a complete key, then you must unbind it before the new
|
|||
binding. For example, if @kbd{ESC @{} is previously bound:
|
||||
|
||||
@lisp
|
||||
(global-unset-key [?\e ?@{]) ;; or
|
||||
(local-unset-key [?\e ?@{])
|
||||
(keymap-global-unset "M-@{") ;; or
|
||||
(keymap-local-unset "M-@{")
|
||||
@end lisp
|
||||
|
||||
@item
|
||||
|
|
@ -4137,8 +4137,8 @@ Aside from commands and ``lambda lists,'' a vector or string also
|
|||
can be bound to a key and thus treated as a macro. For example:
|
||||
|
||||
@lisp
|
||||
(global-set-key [f10] [?\C-x?\e?\e?\C-a?\C-k?\C-g]) ;; or
|
||||
(global-set-key [f10] "\C-x\e\e\C-a\C-k\C-g")
|
||||
(keymap-global-set "<f10>" [?\C-x?\e?\e?\C-a?\C-k?\C-g]) ;; or
|
||||
(keymap-global-set "<f10>" "\C-x\e\e\C-a\C-k\C-g")
|
||||
@end lisp
|
||||
|
||||
@end itemize
|
||||
|
|
@ -4154,12 +4154,11 @@ character in the key sequence has been misspecified (e.g., @samp{C-f}
|
|||
used instead of @samp{\C-f} within a Lisp expression). In the other
|
||||
case, a @dfn{prefix key} in the keystroke sequence you were trying to bind
|
||||
was already bound as a @dfn{complete key}. Historically, the @samp{ESC [}
|
||||
prefix was usually the problem, in which case you should evaluate either
|
||||
of these forms before attempting to bind the key sequence:
|
||||
prefix was usually the problem, in which case you should evaluate this
|
||||
form before attempting to bind the key sequence:
|
||||
|
||||
@lisp
|
||||
(global-unset-key [?\e ?[]) ;; or
|
||||
(global-unset-key "\e[")
|
||||
(keymap-global-unset "M-[")
|
||||
@end lisp
|
||||
|
||||
@node Terminal setup code works after Emacs has begun
|
||||
|
|
@ -4183,7 +4182,7 @@ newer). For example,
|
|||
(lambda ()
|
||||
(when (string-match "\\`vt220" (or (getenv "TERM") ""))
|
||||
;; Make vt220's "Do" key behave like M-x:
|
||||
(global-set-key [do] 'execute-extended-command))))
|
||||
(keymap-global-set "<do>" 'execute-extended-command))))
|
||||
@end lisp
|
||||
|
||||
For information on what Emacs does every time it is started, see the
|
||||
|
|
@ -4280,7 +4279,7 @@ It is possible to swap the @key{Backspace} and @key{DEL} keys inside
|
|||
Emacs:
|
||||
|
||||
@lisp
|
||||
(keyboard-translate ?\C-h ?\C-?)
|
||||
(key-translate "C-h" "C-?")
|
||||
@end lisp
|
||||
|
||||
@noindent
|
||||
|
|
@ -4292,20 +4291,20 @@ Similarly, you could remap @key{DEL} to act as @kbd{C-d}, which by
|
|||
default deletes forward:
|
||||
|
||||
@lisp
|
||||
(keyboard-translate ?\C-? ?\C-d)
|
||||
(key-translate "C-?" "C-d")
|
||||
@end lisp
|
||||
|
||||
@xref{Swapping keys}, for further details about @code{keyboard-translate}.
|
||||
@xref{Swapping keys}, for further details about @code{key-translate}.
|
||||
|
||||
@item
|
||||
Another approach is to switch key bindings and put help on @kbd{C-x h}
|
||||
instead:
|
||||
|
||||
@lisp
|
||||
(global-set-key "\C-h" 'delete-backward-char)
|
||||
(keymap-global-set "C-h" 'delete-backward-char)
|
||||
|
||||
;; overrides mark-whole-buffer
|
||||
(global-set-key "\C-xh" 'help-command)
|
||||
(keymap-global-set "C-x h" 'help-command)
|
||||
@end lisp
|
||||
|
||||
@noindent
|
||||
|
|
@ -4313,7 +4312,7 @@ This method is not recommended, though: it only solves the problem for
|
|||
those modes which bind @key{DEL} to @code{delete-backward-char}. Modes
|
||||
which bind @key{DEL} to something else, such as @code{view-mode}, will
|
||||
not work as you expect when you press the @key{Backspace} key. For this
|
||||
reason, we recommend the @code{keyboard-translate} method, shown
|
||||
reason, we recommend the @code{key-translate} method, shown
|
||||
above.
|
||||
|
||||
Other popular key bindings for help are @kbd{M-?} and @kbd{C-x ?}.
|
||||
|
|
@ -4336,15 +4335,15 @@ Manual}.
|
|||
@section How do I swap two keys?
|
||||
@cindex Swapping keys
|
||||
@cindex Keys, swapping
|
||||
@cindex @code{keyboard-translate}
|
||||
@cindex @code{key-translate}
|
||||
|
||||
You can swap two keys (or key sequences) by using the
|
||||
@code{keyboard-translate} function. For example, to turn @kbd{C-h}
|
||||
@code{key-translate} function. For example, to turn @kbd{C-h}
|
||||
into @key{DEL} and @key{DEL} to @kbd{C-h}, use
|
||||
|
||||
@lisp
|
||||
(keyboard-translate ?\C-h ?\C-?) ; translate 'C-h' to DEL
|
||||
(keyboard-translate ?\C-? ?\C-h) ; translate DEL to 'C-h'.
|
||||
(key-translate "C-h" "C-?") ; translate 'C-h' to DEL
|
||||
(key-translate "C-?" "C-h") ; translate DEL to 'C-h'.
|
||||
@end lisp
|
||||
|
||||
@noindent
|
||||
|
|
@ -4354,7 +4353,7 @@ keymaps.
|
|||
|
||||
However, in the specific case of @kbd{C-h} and @key{DEL}, you should
|
||||
toggle @code{normal-erase-is-backspace-mode} instead of calling
|
||||
@code{keyboard-translate}.
|
||||
@code{key-translate}.
|
||||
@xref{DEL Does Not Delete,,, emacs, The GNU Emacs Manual}.
|
||||
|
||||
Keyboard translations are not the same as key bindings in keymaps.
|
||||
|
|
@ -4426,7 +4425,7 @@ generates @key{ESC}. If not, the following form can be used to bind it:
|
|||
|
||||
@lisp
|
||||
;; F11 is the documented ESC replacement on DEC terminals.
|
||||
(define-key function-key-map [f11] [?\e])
|
||||
(keymap-set function-key-map "<f11>" [?\e])
|
||||
@end lisp
|
||||
|
||||
@node Compose Character
|
||||
|
|
@ -4450,7 +4449,7 @@ prefixes to the function key symbol. For example (from the Emacs
|
|||
documentation):
|
||||
|
||||
@lisp
|
||||
(global-set-key [?\C-x right] 'forward-page)
|
||||
(keymap-global-set "C-x <right>" 'forward-page)
|
||||
@end lisp
|
||||
|
||||
@noindent
|
||||
|
|
@ -4463,7 +4462,7 @@ represent these modifiers, prepend the strings @samp{C-}, @samp{M-},
|
|||
is how to make @kbd{H-M-RIGHT} move forward a word:
|
||||
|
||||
@lisp
|
||||
(global-set-key [H-M-right] 'forward-word)
|
||||
(keymap-global-set "H-M-<right>" 'forward-word)
|
||||
@end lisp
|
||||
|
||||
@itemize @bullet
|
||||
|
|
@ -4821,8 +4820,8 @@ best fix I've been able to come up with:
|
|||
|
||||
(add-hook 'rmail-mode-hook
|
||||
(lambda ()
|
||||
(define-key rmail-mode-map "r" 'rmail-reply-t)
|
||||
(define-key rmail-mode-map "R" 'rmail-reply)))
|
||||
(keymap-set rmail-mode-map "r" 'rmail-reply-t)
|
||||
(keymap-set rmail-mode-map "R" 'rmail-reply)))
|
||||
@end lisp
|
||||
|
||||
@node Automatically starting a mail or news reader
|
||||
|
|
|
|||
|
|
@ -958,8 +958,7 @@ point. Value is a list of symbols, more than one can be specified:
|
|||
@code{eldoc-hint}: ElDoc is used to hint about at-point actions.
|
||||
@item
|
||||
@code{margin}: A special indicator appears in the margin of the line
|
||||
that point is currently on. This indicator is not interactive (you
|
||||
cannot click on it with the mouse).
|
||||
that point is currently on.
|
||||
@item
|
||||
@code{nearby}: An interactive special indicator appears near point.
|
||||
@item
|
||||
|
|
|
|||
|
|
@ -46,15 +46,17 @@ modify this GNU manual.''
|
|||
@insertcopying
|
||||
|
||||
ERT is a tool for automated testing in Emacs Lisp. Its main features
|
||||
are facilities for defining tests, running them and reporting the
|
||||
results, and for debugging test failures interactively.
|
||||
are facilities for defining and running tests, reporting results, and
|
||||
debugging test failures interactively. Tests are written in Emacs Lisp,
|
||||
just like the code under test, making it easy to write expressive and
|
||||
concise test cases.
|
||||
|
||||
ERT is similar to tools for other environments such as JUnit, but has
|
||||
unique features that take advantage of the dynamic and interactive
|
||||
nature of Emacs. Despite its name, it works well both for test-driven
|
||||
development (see
|
||||
@url{https://en.wikipedia.org/wiki/Test-driven_development}) and for
|
||||
traditional software development methods.
|
||||
ERT has unique features that take advantage of the dynamic and
|
||||
interactive nature of Emacs. It is unopinionated about when or how
|
||||
tests are written: you can use it to verify newly written code,
|
||||
reproduce known bugs, prevent regressions, or explore the behavior of
|
||||
complex systems. It can be used for both unit tests and larger
|
||||
integration tests.
|
||||
|
||||
@menu
|
||||
* Introduction:: A simple example of an ERT test.
|
||||
|
|
@ -535,6 +537,7 @@ help ERT find the defining call to the macro by putting the property
|
|||
* Useful Techniques:: Some examples.
|
||||
* erts files:: Files containing many buffer tests.
|
||||
* Syntax Highlighting Tests:: Tests for face assignment.
|
||||
* Helpers for Buffers:: Dealing with buffers during tests.
|
||||
* Helper Functions:: Various helper functions.
|
||||
@end menu
|
||||
|
||||
|
|
@ -962,7 +965,7 @@ checking face assignment. Test assertions are included in code-level
|
|||
comments directly and can be read either from inline strings or files.
|
||||
The parser expects the input string to contain at least one assertion.
|
||||
|
||||
Test assertion parser extracts tests from comment-only lines. Every
|
||||
The test assertion parser extracts tests from comment-only lines. Every
|
||||
comment assertion line starts either with a caret (@samp{^}) or an arrow
|
||||
(@samp{<-}). A single caret/arrow or carets should be followed
|
||||
immediately by the name of a face or a list of faces to be checked
|
||||
|
|
@ -984,7 +987,7 @@ var variable = 11;
|
|||
@end example
|
||||
|
||||
Both symbol-only @code{:face} property values and assertion face values
|
||||
are normalized to single element lists so assertions below are
|
||||
are normalized to single element lists so the assertions below are
|
||||
equivalent:
|
||||
|
||||
@example
|
||||
|
|
@ -1061,7 +1064,7 @@ definition:
|
|||
|
||||
@lisp
|
||||
(ert-font-lock-deftest test-macro-test--inline
|
||||
emacs-lisp-mode
|
||||
emacs-lisp-mode
|
||||
"
|
||||
(defun fun ())
|
||||
;; ^ font-lock-keyword-face
|
||||
|
|
@ -1075,28 +1078,36 @@ file:
|
|||
|
||||
@lisp
|
||||
(ert-font-lock-deftest-file test-macro-test--file
|
||||
"Test reading correct assertions from a file"
|
||||
"Test reading correct assertions from a file."
|
||||
javascript-mode
|
||||
"correct.js")
|
||||
@end lisp
|
||||
|
||||
The @code{ert-font-lock-deftest} and @code{ert-font-lock-deftest-file}
|
||||
macros accept the same keyword parameters as @code{ert-deftest} i.e.,
|
||||
macros accept the same keyword arguments as @code{ert-deftest}, i.e.,
|
||||
@code{:tag} and @code{:expected-result}.
|
||||
|
||||
|
||||
@node Helper Functions
|
||||
@section Various Helper Functions
|
||||
@node Helpers for Buffers
|
||||
@section Handling Buffers during tests
|
||||
|
||||
The package @file{ert-x.el} contains some macros and functions useful
|
||||
for writing tests.
|
||||
ERT comes with some macros for dealing with buffers used when testing.
|
||||
|
||||
@subsection Test Buffers
|
||||
@subsection Creating temporary buffers
|
||||
|
||||
@defmac ert-with-test-buffer ((&key ((:name name-form))) &body body)
|
||||
@findex ert-kill-all-test-buffers
|
||||
The @code{ert-with-test-buffer} macro can be used to create a temporary
|
||||
buffer during a test, which is cleaned up automatically if the test is
|
||||
successful. But if the test fails, the buffer stays around so that you
|
||||
can more easily investigate the test failure. When you are done, you
|
||||
can use the command @code{ert-kill-all-test-buffers} to kill all test
|
||||
buffers that have been created by this macro.
|
||||
|
||||
@defmac ert-with-test-buffer ((&key ((:name name-form :selected select-form))) &body body)
|
||||
This macro creates a test buffer and runs @var{body} in that buffer. If
|
||||
@var{body} finishes successfully, the test buffer is killed; if there is
|
||||
an error, the test buffer is kept around for further inspection.
|
||||
an error, the test buffer is kept around for further inspection. The
|
||||
return value is the last form in @var{body}.
|
||||
|
||||
The test buffer name is derived from the name of the ERT test and the
|
||||
result of @var{NAME-FORM}. Example:
|
||||
|
|
@ -1109,6 +1120,16 @@ result of @var{NAME-FORM}. Example:
|
|||
|
||||
This uses the test buffer @file{*Test buffer
|
||||
(backtrace-tests--variables): variables*}.
|
||||
|
||||
If @var{select-form} is non-nil, select the buffer after creating it.
|
||||
This has the same effect as combining @code{ert-with-test-buffer} with
|
||||
@code{ert-with-buffer-selected}. Example:
|
||||
|
||||
@lisp
|
||||
(ert-deftest whitespace-tests--global ()
|
||||
(ert-with-test-buffer (:name "global" :selected t)
|
||||
@dots{}))
|
||||
@end lisp
|
||||
@end defmac
|
||||
|
||||
@defmac ert-with-buffer-selected (buffer &body body)
|
||||
|
|
@ -1133,26 +1154,7 @@ value is the last form in @var{body}. Example:
|
|||
This displays a temporary buffer like @file{ *temp*-739785*}.
|
||||
@end defmac
|
||||
|
||||
@defmac ert-with-test-buffer-selected ((&key name) &body body)
|
||||
This creates a test buffer, switches to it, and runs @var{body}.
|
||||
|
||||
It combines @code{ert-with-test-buffer} and
|
||||
@code{ert-with-buffer-selected}. The return value is the last form in
|
||||
@var{body}. Example:
|
||||
|
||||
@lisp
|
||||
(ert-deftest whitespace-tests--global ()
|
||||
(ert-with-test-buffer-selected (:name "global")
|
||||
@dots{}))
|
||||
@end lisp
|
||||
|
||||
This displays the test buffer @file{*Test buffer
|
||||
(whitespace-tests--global): global*}.
|
||||
@end defmac
|
||||
|
||||
@defun ert-kill-all-test-buffers ()
|
||||
It kills all test buffers that are still live.
|
||||
@end defun
|
||||
@subsection Protecting buffers
|
||||
|
||||
@defmac ert-with-buffer-renamed ((buffer-name-form) &body body)
|
||||
This macro protects the buffer @var{buffer-name} from side-effects and
|
||||
|
|
@ -1169,6 +1171,13 @@ buffer with a fixed name such as @file{*Messages*}. Example:
|
|||
@end lisp
|
||||
@end defmac
|
||||
|
||||
|
||||
@node Helper Functions
|
||||
@section Various Helper Functions
|
||||
|
||||
The package @file{ert-x.el} contains some macros and functions useful
|
||||
for writing tests.
|
||||
|
||||
@defmac ert-with-message-capture (var &rest body)
|
||||
This macro executes @var{body} while collecting messages in @var{var}.
|
||||
It captures messages issued by Lisp code and concatenates them separated
|
||||
|
|
|
|||
|
|
@ -257,9 +257,9 @@ email composition buffers (@pxref{Inline Query Expansion})
|
|||
|
||||
@lisp
|
||||
(with-eval-after-load "message"
|
||||
(define-key message-mode-map [(control ?c) (tab)] 'eudc-expand-try-all))
|
||||
(keymap-set message-mode-map "C-c <tab>" 'eudc-expand-try-all))
|
||||
(with-eval-after-load "sendmail"
|
||||
(define-key mail-mode-map [(control ?c) (tab)] 'eudc-expand-try-all))
|
||||
(keymap-set mail-mode-map "C-c <tab>" 'eudc-expand-try-all))
|
||||
@end lisp
|
||||
|
||||
@menu
|
||||
|
|
@ -355,7 +355,7 @@ LDAP:
|
|||
@vindex ldap-host-parameters-alist
|
||||
@lisp
|
||||
(with-eval-after-load "message"
|
||||
(define-key message-mode-map (kbd "TAB") 'eudc-expand-try-all))
|
||||
(keymap-set message-mode-map "TAB" 'eudc-expand-try-all))
|
||||
(setopt eudc-server-hotlist
|
||||
'(("" . bbdb)
|
||||
("ldaps://ldap.gnu.org" . ldap)))
|
||||
|
|
@ -412,7 +412,7 @@ configure EUDC for LDAP:
|
|||
@vindex ldap-host-parameters-alist
|
||||
@lisp
|
||||
(with-eval-after-load "message"
|
||||
(define-key message-mode-map (kbd "TAB") 'eudc-expand-try-all))
|
||||
(keymap-set message-mode-map "TAB" 'eudc-expand-try-all))
|
||||
(setopt eudc-server-hotlist
|
||||
'(("" . bbdb)
|
||||
("ldaps://ldap.gnu.org" . ldap)))
|
||||
|
|
@ -442,7 +442,7 @@ and the @file{.emacs} expressions become:
|
|||
@vindex ldap-host-parameters-alist
|
||||
@lisp
|
||||
(with-eval-after-load "message"
|
||||
(define-key message-mode-map (kbd "TAB") 'eudc-expand-try-all))
|
||||
(keymap-set message-mode-map "TAB" 'eudc-expand-try-all))
|
||||
(setopt eudc-server-hotlist
|
||||
'(("" . bbdb) ("" . ldap)))
|
||||
(setopt ldap-host-parameters-alist
|
||||
|
|
|
|||
|
|
@ -874,7 +874,6 @@ Thwarting Email Spam
|
|||
* The problem of spam:: Some background, and some solutions
|
||||
* Anti-Spam Basics:: Simple steps to reduce the amount of spam.
|
||||
* SpamAssassin:: How to use external anti-spam tools.
|
||||
* Hashcash:: Reduce spam by burning CPU time.
|
||||
|
||||
Spam Package
|
||||
|
||||
|
|
@ -892,7 +891,6 @@ Spam Back Ends
|
|||
* Blacklists and Whitelists::
|
||||
* BBDB Whitelists::
|
||||
* Gmane Spam Reporting::
|
||||
* Anti-spam Hashcash Payments::
|
||||
* Blackholes::
|
||||
* Regular Expressions Header Matching::
|
||||
* Bogofilter::
|
||||
|
|
@ -3313,7 +3311,7 @@ following is added to a group parameter
|
|||
|
||||
@lisp
|
||||
(gnus-summary-prepared-hook
|
||||
(lambda nil (local-set-key "d" (local-key-binding "n"))))
|
||||
(lambda nil (keymap-local-set "d" (local-key-binding "n"))))
|
||||
@end lisp
|
||||
|
||||
when the group is entered, the 'd' key will not mark the article as
|
||||
|
|
@ -4531,7 +4529,7 @@ The key @kbd{v} is reserved for users. You can bind it to some
|
|||
command or better use it as a prefix key. For example:
|
||||
|
||||
@lisp
|
||||
(define-key gnus-group-mode-map (kbd "v j d")
|
||||
(keymap-set gnus-group-mode-map "v j d"
|
||||
(lambda ()
|
||||
(interactive)
|
||||
(gnus-group-jump-to-group "nndraft:drafts")))
|
||||
|
|
@ -4884,7 +4882,7 @@ customize-apropos @key{RET} gnus-summary-tool-bar}.
|
|||
The key @kbd{v} is reserved for users. You can bind it to some
|
||||
command or better use it as a prefix key. For example:
|
||||
@lisp
|
||||
(define-key gnus-summary-mode-map (kbd "v -") "LrS") ;; lower subthread
|
||||
(keymap-set gnus-summary-mode-map "v -" "LrS") ;; lower subthread
|
||||
@end lisp
|
||||
|
||||
@menu
|
||||
|
|
@ -6656,7 +6654,7 @@ article, you could say something like:
|
|||
@group
|
||||
(add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
|
||||
(defun my-alter-summary-map ()
|
||||
(local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
|
||||
(keymap-local-set "!" 'gnus-summary-put-mark-as-ticked-next))
|
||||
@end group
|
||||
@end lisp
|
||||
|
||||
|
|
@ -6665,7 +6663,7 @@ or
|
|||
|
||||
@lisp
|
||||
(defun my-alter-summary-map ()
|
||||
(local-set-key "!" "MM!n"))
|
||||
(keymap-local-set "!" "MM!n"))
|
||||
@end lisp
|
||||
|
||||
|
||||
|
|
@ -17487,8 +17485,7 @@ summary buffer.
|
|||
(gnus-summary-scroll-up arg))))
|
||||
|
||||
(with-eval-after-load "gnus"
|
||||
(define-key gnus-summary-mode-map
|
||||
(kbd "<RET>") 'browse-nnrss-url))
|
||||
(keymap-set gnus-summary-mode-map "RET" 'browse-nnrss-url))
|
||||
(add-to-list 'nnmail-extra-headers nnrss-url-field)
|
||||
@end lisp
|
||||
|
||||
|
|
@ -22500,7 +22497,7 @@ I use the following to check for mails:
|
|||
(nnmairix-update-groups "mairixsearch" t t)
|
||||
(gnus-group-list-groups))
|
||||
|
||||
(define-key gnus-group-mode-map "g" 'my-check-mail-mairix-update)
|
||||
(keymap-set gnus-group-mode-map "g" 'my-check-mail-mairix-update)
|
||||
@end lisp
|
||||
|
||||
Instead of @samp{"mairixsearch"} use the name of your @code{nnmairix}
|
||||
|
|
@ -24318,7 +24315,6 @@ This is annoying. Here's what you can do about it.
|
|||
* The problem of spam:: Some background, and some solutions
|
||||
* Anti-Spam Basics:: Simple steps to reduce the amount of spam.
|
||||
* SpamAssassin:: How to use external anti-spam tools.
|
||||
* Hashcash:: Reduce spam by burning CPU time.
|
||||
@end menu
|
||||
|
||||
@node The problem of spam
|
||||
|
|
@ -24540,81 +24536,6 @@ spam. And here is the nifty function:
|
|||
(gnus-summary-mark-as-expirable 1))
|
||||
@end lisp
|
||||
|
||||
@node Hashcash
|
||||
@subsection Hashcash
|
||||
@cindex hashcash
|
||||
|
||||
One technique to fight spam is to require senders to do something
|
||||
costly and demonstrably unique for each message they send. This has
|
||||
the obvious drawback that you cannot rely on everyone in the world
|
||||
using this technique, since it is not part of the Internet standards,
|
||||
but it may be useful in smaller communities.
|
||||
|
||||
While the tools in the previous section work well in practice, they
|
||||
work only because the tools are constantly maintained and updated as
|
||||
new form of spam appears. This means that a small percentage of spam
|
||||
will always get through. It also means that somewhere, someone needs
|
||||
to read lots of spam to update these tools. Hashcash avoids that, but
|
||||
instead prefers that everyone you contact through e-mail supports the
|
||||
scheme. You can view the two approaches as pragmatic vs dogmatic.
|
||||
The approaches have their own advantages and disadvantages, but as
|
||||
often in the real world, a combination of them is stronger than either
|
||||
one of them separately.
|
||||
|
||||
@cindex X-Hashcash
|
||||
The ``something costly'' is to burn CPU time, more specifically to
|
||||
compute a hash collision up to a certain number of bits. The
|
||||
resulting hashcash cookie is inserted in a @samp{X-Hashcash:} header.
|
||||
For more details, and for the external application @code{hashcash} you
|
||||
need to install to use this feature, see
|
||||
@uref{http://www.hashcash.org/}.
|
||||
|
||||
If you wish to generate hashcash for each message you send, you can
|
||||
customize @code{message-generate-hashcash} (@pxref{Mail Headers, ,Mail
|
||||
Headers,message, The Message Manual}), as in:
|
||||
|
||||
@lisp
|
||||
(setq message-generate-hashcash t)
|
||||
@end lisp
|
||||
|
||||
You will need to set up some additional variables as well:
|
||||
|
||||
@table @code
|
||||
|
||||
@item hashcash-default-payment
|
||||
@vindex hashcash-default-payment
|
||||
This variable indicates the default number of bits the hash collision
|
||||
should consist of. By default this is 20. Suggested useful values
|
||||
include 17 to 29.
|
||||
|
||||
@item hashcash-payment-alist
|
||||
@vindex hashcash-payment-alist
|
||||
Some receivers may require you to spend burn more CPU time than the
|
||||
default. This variable contains a list of @samp{(@var{addr}
|
||||
@var{amount})} cells, where @var{addr} is the receiver (email address
|
||||
or newsgroup) and @var{amount} is the number of bits in the collision
|
||||
that is needed. It can also contain @samp{(@var{addr} @var{string}
|
||||
@var{amount})} cells, where the @var{string} is the string to use
|
||||
(normally the email address or newsgroup name is used).
|
||||
|
||||
@item hashcash-program
|
||||
@vindex hashcash-program
|
||||
Where the @code{hashcash} binary is installed. This variable should
|
||||
be automatically set by @code{executable-find}, but if it's @code{nil}
|
||||
(usually because the @code{hashcash} binary is not in your path)
|
||||
you'll get a warning when you check hashcash payments and an error
|
||||
when you generate hashcash payments.
|
||||
|
||||
@end table
|
||||
|
||||
Gnus can verify hashcash cookies, although this can also be done by
|
||||
hand customized mail filtering scripts. To verify a hashcash cookie
|
||||
in a message, use the @code{mail-check-payment} function in the
|
||||
@code{hashcash.el} library. You can also use the @code{spam.el}
|
||||
package with the @code{spam-use-hashcash} back end to validate hashcash
|
||||
cookies in incoming mail and filter mail accordingly (@pxref{Anti-spam
|
||||
Hashcash Payments}).
|
||||
|
||||
@node Spam Package
|
||||
@section Spam Package
|
||||
@cindex spam filtering
|
||||
|
|
@ -25245,7 +25166,6 @@ Processors}).
|
|||
* Blacklists and Whitelists::
|
||||
* BBDB Whitelists::
|
||||
* Gmane Spam Reporting::
|
||||
* Anti-spam Hashcash Payments::
|
||||
* Blackholes::
|
||||
* Regular Expressions Header Matching::
|
||||
* Bogofilter::
|
||||
|
|
@ -25441,23 +25361,6 @@ default is @code{user-mail-address}.
|
|||
|
||||
@end defvar
|
||||
|
||||
@node Anti-spam Hashcash Payments
|
||||
@subsubsection Anti-spam Hashcash Payments
|
||||
@cindex spam filtering
|
||||
@cindex hashcash, spam filtering
|
||||
@cindex spam
|
||||
|
||||
@defvar spam-use-hashcash
|
||||
|
||||
Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
|
||||
Whitelists}), but uses hashcash tokens for whitelisting messages
|
||||
instead of the sender address. Messages without a hashcash payment
|
||||
token will be sent to the next spam-split rule. This is an explicit
|
||||
filter, meaning that unless a hashcash token is found, the messages
|
||||
are not assumed to be spam or ham.
|
||||
|
||||
@end defvar
|
||||
|
||||
@node Blackholes
|
||||
@subsubsection Blackholes
|
||||
@cindex spam filtering
|
||||
|
|
@ -26008,8 +25911,7 @@ such a back end.
|
|||
|
||||
This function will install a back end that can only check incoming mail
|
||||
for spam contents. It can't register or unregister messages.
|
||||
@code{spam-use-blackholes} and @code{spam-use-hashcash} are such
|
||||
back ends.
|
||||
@code{spam-use-blackholes} is such a back end.
|
||||
|
||||
@item
|
||||
@code{spam-install-statistical-checkonly-backend}
|
||||
|
|
@ -26369,7 +26271,7 @@ etc.@: backends.
|
|||
@item
|
||||
Store arbitrary data
|
||||
|
||||
Through a simple ELisp API, the registry can remember any data for a
|
||||
Through a simple Lisp API, the registry can remember any data for a
|
||||
message. A built-in inverse map, when activated, allows quick lookups
|
||||
of all messages matching a particular set of criteria.
|
||||
@end enumerate
|
||||
|
|
@ -28621,8 +28523,7 @@ enjoy the power of @acronym{MML}.
|
|||
|
||||
The line below enables BBDB in resending a message:
|
||||
@lisp
|
||||
(define-key message-minibuffer-local-map [(tab)]
|
||||
'bbdb-complete-name)
|
||||
(keymap-set message-minibuffer-local-map "TAB" 'bbdb-complete-name)
|
||||
@end lisp
|
||||
|
||||
@item
|
||||
|
|
@ -29060,8 +28961,6 @@ that are accessible from the article buffer.
|
|||
nnfolder archives.
|
||||
|
||||
@item Gnus now supports the ``hashcash'' client puzzle anti-spam mechanism.
|
||||
Use @code{(setq message-generate-hashcash t)} to enable.
|
||||
@xref{Hashcash}.
|
||||
|
||||
@item You can now drag and drop attachments to the Message buffer.
|
||||
See @code{mml-dnd-protocol-alist} and @code{mml-dnd-attach-options}.
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ To modify the key bindings, use the @code{ido-setup-hook}. For example:
|
|||
|
||||
(defun ido-my-keys ()
|
||||
"Add my key bindings for Ido."
|
||||
(define-key ido-completion-map " " 'ido-next-match))
|
||||
(keymap-set ido-completion-map "SPC" 'ido-next-match))
|
||||
@end example
|
||||
|
||||
@c @defopt ido-setup-hook
|
||||
|
|
|
|||
|
|
@ -199,15 +199,15 @@ might or might not collide with some other modes. Simply include them
|
|||
in your @file{.emacs} and adapt to your needs:
|
||||
|
||||
@lisp
|
||||
(global-set-key (kbd "C-c C-o m") 'mairix-search)
|
||||
(global-set-key (kbd "C-c C-o w") 'mairix-widget-search)
|
||||
(global-set-key (kbd "C-c C-o u") 'mairix-update-database)
|
||||
(global-set-key (kbd "C-c C-o f") 'mairix-search-from-this-article)
|
||||
(global-set-key (kbd "C-c C-o t") 'mairix-search-thread-this-article)
|
||||
(global-set-key (kbd "C-c C-o b") 'mairix-widget-search-based-on-article)
|
||||
(global-set-key (kbd "C-c C-o s") 'mairix-save-search)
|
||||
(global-set-key (kbd "C-c C-o i") 'mairix-use-saved-search)
|
||||
(global-set-key (kbd "C-c C-o e") 'mairix-edit-saved-searches)
|
||||
(keymap-global-set "C-c C-o m" 'mairix-search)
|
||||
(keymap-global-set "C-c C-o w" 'mairix-widget-search)
|
||||
(keymap-global-set "C-c C-o u" 'mairix-update-database)
|
||||
(keymap-global-set "C-c C-o f" 'mairix-search-from-this-article)
|
||||
(keymap-global-set "C-c C-o t" 'mairix-search-thread-this-article)
|
||||
(keymap-global-set "C-c C-o b" 'mairix-widget-search-based-on-article)
|
||||
(keymap-global-set "C-c C-o s" 'mairix-save-search)
|
||||
(keymap-global-set "C-c C-o i" 'mairix-use-saved-search)
|
||||
(keymap-global-set "C-c C-o e" 'mairix-edit-saved-searches)
|
||||
@end lisp
|
||||
|
||||
Here's a description of the available interactive functions:
|
||||
|
|
|
|||
|
|
@ -1908,13 +1908,6 @@ Regexp of headers to be removed before mailing. The default is@*
|
|||
This string is inserted at the end of the headers in all message
|
||||
buffers that are initialized as mail.
|
||||
|
||||
@item message-generate-hashcash
|
||||
@vindex message-generate-hashcash
|
||||
Variable that indicates whether @samp{X-Hashcash} headers
|
||||
should be computed for the message. @xref{Hashcash, ,Hashcash,gnus,
|
||||
The Gnus Manual}. If @code{opportunistic}, only generate the headers
|
||||
when it doesn't lead to the user having to wait.
|
||||
|
||||
@end table
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2646,7 +2646,7 @@ browser when clicked with @kbd{S-mouse-2}. This binding works in any
|
|||
buffer, including HTML buffers.
|
||||
|
||||
@smalllisp
|
||||
(global-set-key [S-mouse-2] 'browse-url-at-mouse)
|
||||
(keymap-global-set "S-<mouse-2>" 'browse-url-at-mouse)
|
||||
@end smalllisp
|
||||
|
||||
@node Digests
|
||||
|
|
@ -3112,7 +3112,7 @@ electric-buffer-list} to see what I mean.
|
|||
|
||||
Before we leave this section, I'll include a function that I use as a
|
||||
front end to MH-E@footnote{Stephen Gildea's favorite binding is
|
||||
@kbd{(global-set-key "\C-cr" 'mh-rmail)}.}. It toggles between your
|
||||
@kbd{(keymap-global-set "C-c r" 'mh-rmail)}.}. It toggles between your
|
||||
working window configuration, which may be quite involved---windows
|
||||
filled with source, compilation output, man pages, and other
|
||||
documentation---and your MH-E window configuration. Like the rest of
|
||||
|
|
@ -3153,7 +3153,7 @@ when going into mail."
|
|||
(set-window-configuration my-normal-screen)
|
||||
nil)))) ; @r{set my-mh-screen-saved to nil}
|
||||
|
||||
(global-set-key "\C-x\r" 'my-mh-rmail) ;@r{ call with C-x @key{RET}}
|
||||
(keymap-global-set "C-x RET" 'my-mh-rmail) ;@r{ call with C-x @key{RET}}
|
||||
|
||||
@i{Starting MH-E}
|
||||
|
||||
|
|
@ -3447,11 +3447,10 @@ bindings, for example:
|
|||
|
||||
(defun my-mh-folder-mode-hook ()
|
||||
"Hook to set key bindings in MH-Folder mode."
|
||||
(if (not my-mh-init-done) ; @r{only need to bind the keys once }
|
||||
(progn
|
||||
(local-set-key "//" 'my-search-msg)
|
||||
(local-set-key "b" 'mh-burst-digest) ; @r{better use of @kbd{b}}
|
||||
(setq my-mh-init-done t))))
|
||||
(unless my-mh-init-done ; @r{only need to bind the keys once }
|
||||
(keymap-local-set "/ /" 'my-search-msg)
|
||||
(keymap-local-set "b" 'mh-burst-digest) ; @r{better use of @kbd{b}}
|
||||
(setq my-mh-init-done t)))
|
||||
|
||||
(add-hook 'mh-folder-mode-hook 'my-mh-folder-mode-hook)
|
||||
|
||||
|
|
@ -3983,8 +3982,8 @@ you would rather preserve the window layout. You may find adding the
|
|||
following key bindings to @file{~/.emacs} useful:
|
||||
|
||||
@smalllisp
|
||||
(global-set-key "\C-xm" 'mh-smail)
|
||||
(global-set-key "\C-x4m" 'mh-smail-other-window)
|
||||
(keymap-global-set "C-x m" 'mh-smail)
|
||||
(keymap-global-set "C-x 4 m" 'mh-smail-other-window)
|
||||
@end smalllisp
|
||||
|
||||
@cindex draft folder
|
||||
|
|
@ -4054,13 +4053,13 @@ this hook.
|
|||
(defun my-mh-letter-mode-hook ()
|
||||
"Prepare letter for editing."
|
||||
(when (not letter-mode-init-done) ; @r{only need to bind the keys once}
|
||||
(local-set-key "\C-ctb" 'add-enriched-text)
|
||||
(local-set-key "\C-cti" 'add-enriched-text)
|
||||
(local-set-key "\C-ctf" 'add-enriched-text)
|
||||
(local-set-key "\C-cts" 'add-enriched-text)
|
||||
(local-set-key "\C-ctB" 'add-enriched-text)
|
||||
(local-set-key "\C-ctu" 'add-enriched-text)
|
||||
(local-set-key "\C-ctc" 'add-enriched-text)
|
||||
(keymap-local-set "C-c t b" 'add-enriched-text)
|
||||
(keymap-local-set "C-c t i" 'add-enriched-text)
|
||||
(keymap-local-set "C-c t f" 'add-enriched-text)
|
||||
(keymap-local-set "C-c t s" 'add-enriched-text)
|
||||
(keymap-local-set "C-c t B" 'add-enriched-text)
|
||||
(keymap-local-set "C-c t u" 'add-enriched-text)
|
||||
(keymap-local-set "C-c t c" 'add-enriched-text)
|
||||
(setq letter-mode-init-done t))
|
||||
(save-excursion
|
||||
(goto-char (point-max)) ; @r{go to end of message to}
|
||||
|
|
|
|||
|
|
@ -374,9 +374,9 @@ add
|
|||
@lisp
|
||||
(add-hook 'inferior-octave-mode-hook
|
||||
(lambda ()
|
||||
(define-key inferior-octave-mode-map [up]
|
||||
(keymap-set inferior-octave-mode-map "<up>"
|
||||
'comint-previous-input)
|
||||
(define-key inferior-octave-mode-map [down]
|
||||
(keymap-set inferior-octave-mode-map "<down>"
|
||||
'comint-next-input)))
|
||||
@end lisp
|
||||
@noindent
|
||||
|
|
|
|||
|
|
@ -50,4 +50,3 @@
|
|||
# The "kbd" macro turns KBD into @kbd{KBD}. Additionally, it
|
||||
# encloses case-sensitive special keys (SPC, RET...) within @key{...}.
|
||||
#+macro: kbd (eval (org-texinfo-kbd-macro $1))
|
||||
|
||||
|
|
|
|||
|
|
@ -2050,7 +2050,7 @@ binding for @code{reftex-cite-format}.
|
|||
|
||||
@lisp
|
||||
(add-hook 'mail-setup-hook
|
||||
(lambda () (define-key mail-mode-map "\C-c["
|
||||
(lambda () (keymap-set mail-mode-map "C-c ["
|
||||
(lambda ()
|
||||
(interactive)
|
||||
(let ((reftex-cite-format 'locally))
|
||||
|
|
|
|||
|
|
@ -211,8 +211,8 @@ Here is one way to map the remember functions in your init file
|
|||
Manual}) to very accessible keystrokes facilities using the mode:
|
||||
|
||||
@lisp
|
||||
(define-key global-map (kbd "<f9> r") 'remember)
|
||||
(define-key global-map (kbd "<f9> R") 'remember-region)
|
||||
(keymap-set global-map "<f9> r" 'remember)
|
||||
(keymap-set global-map "<f9> R" 'remember-region)
|
||||
@end lisp
|
||||
|
||||
@cindex annotation
|
||||
|
|
|
|||
|
|
@ -870,7 +870,7 @@ event @var{event}. This command is meant to be bound to a mouse
|
|||
command, like this:
|
||||
|
||||
@example
|
||||
(global-set-key '[(S-mouse-1)] semantic-ia-fast-mouse-jump)
|
||||
(keymap-global-set "S-<mouse-1>" 'semantic-ia-fast-mouse-jump)
|
||||
@end example
|
||||
@end defun
|
||||
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ information related to the current buffer. Its original inspiration
|
|||
is the ``explorer'' often used in modern development environments, office
|
||||
packages, and web browsers.
|
||||
|
||||
Speedbar displays a narrow frame in which a tree view is shown. This
|
||||
tree view defaults to containing a list of files and directories. Files
|
||||
can be ``expanded'' to list tags inside. Directories can be expanded to
|
||||
list the files within them. Each file or tag can be jumped to
|
||||
immediately.
|
||||
Speedbar displays a narrow frame or a narrow window in which a tree view
|
||||
is shown. This tree view defaults to containing a list of files and
|
||||
directories. Files can be ``expanded'' to list tags inside.
|
||||
Directories can be expanded to list the files within them. Each file or
|
||||
tag can be jumped to immediately.
|
||||
|
||||
Speedbar expands upon ``explorer'' windows by maintaining context with the
|
||||
user. For example, when using the file view, the current buffer's file
|
||||
|
|
@ -114,6 +114,21 @@ The function to use when switching between frames using the keyboard is
|
|||
@code{speedbar-get-focus}. This function will toggle between frames, and
|
||||
it's useful to bind it to a key in terminal mode. @xref{Customizing}.
|
||||
|
||||
@cindex @code{speedbar-window}
|
||||
Optionally, the speedbar can be displayed as a window, splitting the
|
||||
windows of the selected frame, in both terminal and graphics modes.
|
||||
Only one speedbar window can be open at a time.
|
||||
|
||||
It is possible to switch from displaying the speedbar in a separate
|
||||
frame to displaying it in a window and vice versa simply by using the
|
||||
@kbd{M-x speedbar-window @key{RET}} or
|
||||
@kbd{M-x speedbar-frame@key{RET}} command.
|
||||
|
||||
@cindex @code{speedbar-prefer-window}
|
||||
The user option @code{speedbar-prefer-window} changes the behavior of
|
||||
the @code{speedbar} command: if set to @code{t}, the @code{speedbar}
|
||||
command will display the speedbar in a window instead of in a frame.
|
||||
|
||||
@node Basic Navigation
|
||||
@chapter Basic Navigation
|
||||
|
||||
|
|
@ -138,10 +153,11 @@ These key bindings are common across all modes:
|
|||
@table @kbd
|
||||
@item Q
|
||||
@cindex quitting speedbar
|
||||
Quit speedbar, and kill the frame.
|
||||
Quit speedbar, and kill the frame. This is only available for
|
||||
@code{speed-frame}.
|
||||
@item q
|
||||
Quit speedbar, and hide the frame. This makes it faster to restore the
|
||||
speedbar frame, than if you press @kbd{Q}.
|
||||
Quit speedbar, and hide the frame or close the window. This makes it
|
||||
faster to restore the speedbar frame, than if you press @kbd{Q}.
|
||||
@item g
|
||||
@cindex refresh speedbar display
|
||||
Refresh whatever contents are in speedbar.
|
||||
|
|
@ -658,14 +674,14 @@ Customize speedbar's many colors and fonts.
|
|||
@end table
|
||||
|
||||
@menu
|
||||
* Frames and Faces:: Visible behaviors.
|
||||
* Tag Hierarchy Methods:: Customizing how tags are displayed.
|
||||
* Version Control:: Adding new VC detection modes.
|
||||
* Hooks:: The many hooks you can use.
|
||||
* Frames Windows and Faces:: Visible behaviors.
|
||||
* Tag Hierarchy Methods:: Customizing how tags are displayed.
|
||||
* Version Control:: Adding new VC detection modes.
|
||||
* Hooks:: The many hooks you can use.
|
||||
@end menu
|
||||
|
||||
@node Frames and Faces
|
||||
@section Frames and Faces
|
||||
@node Frames Windows and Faces
|
||||
@section Frames, Windows and Faces
|
||||
@cindex faces
|
||||
@cindex frame parameters
|
||||
|
||||
|
|
@ -701,6 +717,26 @@ the alist @code{speedbar-frame-parameters}. This variable is used to
|
|||
set up initial details. Height is also automatically added when
|
||||
speedbar is created, though you can override it.
|
||||
|
||||
@cindex @code{speedbar-window-side}
|
||||
If the speedbar is displayed in a window, you can also customize the
|
||||
side on which the @code{speedbar-window} is displayed by changing the
|
||||
@code{speedbar-window-side} option.
|
||||
|
||||
@cindex @code{speedbar-window-default-width}
|
||||
@cindex @code{speedbar-window-max-width}
|
||||
The size of the @code{speedbar-window}, when opened on the left or right
|
||||
side, can be defined by changing the
|
||||
@code{speedbar-window-default-width} option, which defines the default
|
||||
window size. The width of the speedbar window can be greater than
|
||||
@code{speedbar-window-max-width}, but if it is closed and later
|
||||
reopened, the width will be equal to @code{speedbar-window-max-width}.
|
||||
|
||||
@cindex @code{speedbar-window-dedicated-window}
|
||||
By default, @code{speedbar-window} is displayed in a dedicated window,
|
||||
so @code{display-buffer} will never use this window. Setting
|
||||
@code{speedbar-window-dedicated-window} to @code{nil} changes this
|
||||
behavior.
|
||||
|
||||
@node Tag Hierarchy Methods
|
||||
@section Tag Hierarchy Methods
|
||||
@cindex tag hierarchy
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ For the developer:
|
|||
* GNU Free Documentation License:: The license for this documentation.
|
||||
* Function Index:: @value{tramp} functions.
|
||||
* Variable Index:: User options and variables.
|
||||
* Key Index:: Key bindings for @value{tramp} commands.
|
||||
* Concept Index:: An item for each concept.
|
||||
|
||||
@detailmenu
|
||||
|
|
@ -3798,7 +3799,18 @@ completion lists. If you want to suppress this completion because
|
|||
there are invalid entries in the persistency file, for example if the
|
||||
host configuration changes often, or if you plug your laptop to
|
||||
different networks frequently, you can set the user option
|
||||
@code{tramp-completion-use-cache} to @code{nil}.
|
||||
@code{tramp-completion-use-cache} to @code{nil}. This is set per
|
||||
default for all container-based methods, like @option{docker} or
|
||||
@option{podman}. If you want to suppress this for other connections,
|
||||
you can use the connection property @t{"completion-use-cache"},
|
||||
@xref{Predefined connection information}. Example:
|
||||
|
||||
@lisp
|
||||
@group
|
||||
(add-to-list 'tramp-connection-properties
|
||||
(list "^/sshfs:" "completion-use-cache" nil))
|
||||
@end group
|
||||
@end lisp
|
||||
|
||||
After remote host name completion comes completion of file names on
|
||||
the remote host. It works the same as with local host file completion
|
||||
|
|
@ -3917,23 +3929,30 @@ containers on the remote host.
|
|||
|
||||
A common use case for ad-hoc specifications is to visit a file or a
|
||||
directory with proper permissions, for example with the @option{sudo}
|
||||
method. The command @code{tramp-revert-buffer-with-sudo} supports
|
||||
this.
|
||||
method. The commands @code{tramp-revert-buffer-with-sudo} (@kbd{C-x x
|
||||
@@}), and @code{tramp-dired-find-file-with-sudo} (@kbd{@@} in
|
||||
@code{dired-mode}) support this.
|
||||
|
||||
@kindex C-x x @@
|
||||
@deffn Command tramp-revert-buffer-with-sudo
|
||||
This command shows the current buffer with @option{sudo} permissions.
|
||||
The buffer must either visit a file, or a directory
|
||||
(@code{dired-mode}).
|
||||
This command visits the current buffer with @option{sudo} permissions.
|
||||
The buffer must either visit a file, or a directory in @code{dired-mode}.
|
||||
@end deffn
|
||||
|
||||
@kindex @@ @r{(in dired})
|
||||
@deffn Command tramp-dired-find-file-with-sudo
|
||||
In @code{dired-mode}, visit the file or directory named on this line.
|
||||
This is performed with @option{sudo} permissions.
|
||||
@end deffn
|
||||
|
||||
@defopt tramp-file-name-with-method
|
||||
The method @code{tramp-revert-buffer-with-sudo} shows an alternate
|
||||
buffer. It defaults to @option{sudo}, other valid methods are
|
||||
@option{su}, @option{doas}, @option{run0}, and @option{ksu}.
|
||||
The method used in @code{tramp-revert-buffer-with-sudo} and
|
||||
@code{tramp-dired-find-file-with-sudo}. It defaults to @option{sudo},
|
||||
other valid methods are @option{su}, @option{doas}, @option{run0}, and
|
||||
@option{ksu}.
|
||||
|
||||
@lisp
|
||||
(customize-set-variable 'tramp-file-name-with-method "doas")
|
||||
@end lisp
|
||||
If a command is called with a prefix argument @kbd{C-u}, the option's
|
||||
value is read interactively.
|
||||
@end defopt
|
||||
|
||||
These methods apply the user @samp{root} as default. If another user
|
||||
|
|
@ -4783,13 +4802,13 @@ proxy definitions (@pxref{Ad-hoc multi-hops}).
|
|||
|
||||
@deffn Command tramp-cleanup-all-buffers
|
||||
Just as for @code{tramp-cleanup-all-connections}, all remote
|
||||
connections and ad-hoc proxy definition are cleaned up in addition to
|
||||
connections and ad-hoc proxy definitions 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,
|
||||
connections and ad-hoc proxy definitions 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
|
||||
|
|
@ -4801,6 +4820,18 @@ 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
|
||||
|
||||
@deffn Command tramp-cleanup-bufferless-connections
|
||||
Similar to @code{tramp-cleanup-all-connections}, remote connections and
|
||||
ad-hoc proxy definitions are flushed, but limited to those connections
|
||||
for which no associated buffers exist (except for Tramp internal
|
||||
buffers).
|
||||
|
||||
This command is helpful to prune connections after you close remote-file
|
||||
buffers without having to either cherry pick via
|
||||
@code{tramp-cleanup-connection} or clear them all via
|
||||
@code{tramp-cleanup-all-connections}.
|
||||
@end deffn
|
||||
|
||||
|
||||
@node Renaming remote files
|
||||
@section Renaming remote files
|
||||
|
|
@ -6780,6 +6811,11 @@ maintainers, analyzing the remote commands for performance analysis.
|
|||
@printindex vr
|
||||
|
||||
|
||||
@node Key Index
|
||||
@unnumbered Key Index
|
||||
@printindex ky
|
||||
|
||||
|
||||
@node Concept Index
|
||||
@unnumbered Concept Index
|
||||
@printindex cp
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ General Public License for more details.
|
|||
@finalout
|
||||
@titlepage
|
||||
@title Transient User and Developer Manual
|
||||
@subtitle for version 0.8.4
|
||||
@subtitle for version 0.8.6
|
||||
@author Jonas Bernoulli
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
|
|
@ -53,7 +53,7 @@ resource to get over that hurdle is Psionic K's interactive tutorial,
|
|||
available at @uref{https://github.com/positron-solutions/transient-showcase}.
|
||||
|
||||
@noindent
|
||||
This manual is for Transient version 0.8.4.
|
||||
This manual is for Transient version 0.8.6.
|
||||
|
||||
@insertcopying
|
||||
@end ifnottex
|
||||
|
|
@ -777,6 +777,11 @@ This displays the window at the bottom of the selected frame.
|
|||
For alternatives see @ref{Buffer Display Action Functions,,,elisp,},
|
||||
and @xref{Buffer Display Action Alists,,,elisp,}.
|
||||
|
||||
When you switch to a different ACTION, you should keep the ALIST
|
||||
entries for @code{dedicated} and @code{inhibit-same-window} in most cases.
|
||||
Do not drop them because you are unsure whether they are needed;
|
||||
if you are unsure, then keep them.
|
||||
|
||||
Note that the buffer that was current before the transient buffer
|
||||
is shown should remain the current buffer. Many suffix commands
|
||||
act on the thing at point, if appropriate, and if the transient
|
||||
|
|
@ -1019,8 +1024,10 @@ that multiple suffix commands can be bound to the same key, provided
|
|||
they are never active at the same time, see @ref{Predicate Slots}.
|
||||
|
||||
Unfortunately both false-positives and false-negatives are possible.
|
||||
To deal with the former use non-@code{nil} @var{KEEP-OTHER@.} To deal with the
|
||||
latter remove the conflicting binding explicitly.
|
||||
To deal with the former use non-@code{nil} @var{KEEP-OTHER@.} The symbol @code{always}
|
||||
prevents the removal of a false-positive in some cases where other
|
||||
non-@code{nil} values would fail. To deal with false-negatives remove the
|
||||
conflicting binding separately, using @code{transient-remove-suffix}.
|
||||
@end defun
|
||||
|
||||
@defun transient-replace-suffix prefix loc suffix
|
||||
|
|
@ -1880,16 +1887,9 @@ the suffix's @code{transient} slot.
|
|||
@item
|
||||
While a sub-prefix is active we nearly always want @kbd{C-g} to take the
|
||||
user back to the ``super-prefix'', even when the other suffixes don't
|
||||
do that. However, in rare cases this may not be desirable, and that
|
||||
makes the following complication necessary:
|
||||
|
||||
For @code{transient-suffix} objects the @code{transient} slot is unbound. We can
|
||||
ignore that for the most part because @code{nil} and the slot being unbound
|
||||
are treated as equivalent, and mean ``do exit''. That isn't actually
|
||||
true for suffixes that are sub-prefixes though. For such suffixes
|
||||
unbound means ``do exit but allow going back'', which is the default,
|
||||
while @code{nil} means ``do exit permanently'', which requires that slot to
|
||||
be explicitly set to that value.
|
||||
do that. However, in rare cases this may not be desirable, in which
|
||||
case @code{replace} can be used as the value of the sub-prefix's @code{transient}
|
||||
slot.
|
||||
@end itemize
|
||||
|
||||
@anchor{Pre-commands for Infixes}
|
||||
|
|
@ -1933,7 +1933,7 @@ predicate is automatically picked based on the value of the @code{transient}
|
|||
slot for the sub-prefix itself.
|
||||
|
||||
@defun transient--do-recurse
|
||||
Call the transient prefix command, preparing for return to active
|
||||
Call the transient prefix command, preparing for return to outer
|
||||
transient.
|
||||
|
||||
Whether we actually return to the parent transient is ultimately
|
||||
|
|
|
|||
|
|
@ -1172,6 +1172,35 @@ Specifying @code{:continue} @emph{forces} setting the
|
|||
@end group
|
||||
@end lisp
|
||||
|
||||
@findex :continue-only@r{, inside} :repeat-map@r{ and} :bind
|
||||
@cindex binding commands that only continue repeat series
|
||||
Specifying @code{:continue-only} inside the scope of @code{:repeat-map}
|
||||
will make commands continue an active repeating sequence, but never
|
||||
initiate it. This is done by setting the @code{repeat-continue}
|
||||
property of each command with the keymap, but not the @code{repeat-map}
|
||||
property. This is useful for commands that should be available while
|
||||
repeating a sequence, but not initiate the repeat map themselves.
|
||||
Example:
|
||||
|
||||
@lisp
|
||||
@group
|
||||
(use-package emacs
|
||||
:bind
|
||||
(:repeat-map
|
||||
paragraph-repeat-map
|
||||
("@}" . forward-paragraph)
|
||||
("@{" . backward-paragraph)
|
||||
("]" . forward-paragraph)
|
||||
("[" . backward-paragraph)
|
||||
:continue-only
|
||||
("h" . mark-paragraph)
|
||||
("w" . kill-region)
|
||||
("M-w" . kill-ring-save)
|
||||
("k" . kill-paragraph)
|
||||
("y" . yank)))
|
||||
@end group
|
||||
@end lisp
|
||||
|
||||
@node Displaying keybindings
|
||||
@subsection Displaying personal keybindings
|
||||
@cindex display your keybindings
|
||||
|
|
|
|||
|
|
@ -1968,8 +1968,8 @@ Under the X Window System, every keyboard key emits its preferred form,
|
|||
so you can just type
|
||||
|
||||
@lisp
|
||||
(global-set-key [f11] 'calendar) ; L1, Stop
|
||||
(global-set-key [f14] 'undo) ; L4, Undo
|
||||
(keymap-global-set "<f11>" 'calendar) ; L1, Stop
|
||||
(keymap-global-set "<f14>" 'undo) ; L4, Undo
|
||||
@end lisp
|
||||
|
||||
@noindent
|
||||
|
|
@ -2885,7 +2885,7 @@ the standard Emacs mechanism for binding function keys to commands.
|
|||
For instance,
|
||||
|
||||
@example
|
||||
(global-set-key [f13] 'repeat-complex-command)
|
||||
(keymap-global-set "<f13>" 'repeat-complex-command)
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
|
|
@ -2932,7 +2932,7 @@ say, @kbd{f12 \3} like this:
|
|||
|
||||
Note that even though the macro uses the function key @kbd{f12}, the key is
|
||||
actually free and can still be bound to some Emacs function via
|
||||
@code{define-key} or @code{global-set-key}.
|
||||
@code{define-key} or @code{keymap-global-set}.
|
||||
|
||||
|
||||
Viper allows the user to define macro names that are prefixes of other macros.
|
||||
|
|
|
|||
|
|
@ -1333,6 +1333,9 @@ modifications.
|
|||
Function that takes a widget and makes it inactive for user
|
||||
modifications.
|
||||
|
||||
If you modify a widget that is not active, you should make sure the
|
||||
:deactivate function gets called again after the modifications.
|
||||
|
||||
@vindex action@r{ keyword}
|
||||
@item :action
|
||||
Function that takes a widget and optionally an event, and handles a
|
||||
|
|
@ -3085,8 +3088,8 @@ Example:
|
|||
@group
|
||||
(defvar widget-ranged-integer-map
|
||||
(let ((map (copy-keymap widget-keymap)))
|
||||
(define-key map [up] #'widget-ranged-integer-increase)
|
||||
(define-key map [down] #'widget-ranged-integer-decrease)
|
||||
(keymap-set map "<up>" #'widget-ranged-integer-increase)
|
||||
(keymap-set map "<down>" #'widget-ranged-integer-decrease)
|
||||
map))
|
||||
@end group
|
||||
|
||||
|
|
|
|||
|
|
@ -473,11 +473,11 @@ e.g., this key binding for @kbd{C-c w} runs WoMan on the topic at
|
|||
point without seeking confirmation:
|
||||
|
||||
@lisp
|
||||
(global-set-key "\C-cw"
|
||||
(lambda ()
|
||||
(interactive)
|
||||
(let ((woman-use-topic-at-point t))
|
||||
(woman))))
|
||||
(keymap-global-set "C-c w"
|
||||
(lambda ()
|
||||
(interactive)
|
||||
(let ((woman-use-topic-at-point t))
|
||||
(woman))))
|
||||
@end lisp
|
||||
|
||||
|
||||
|
|
|
|||
21
etc/DEBUG
21
etc/DEBUG
|
|
@ -260,7 +260,7 @@ from a shell prompt, like this:
|
|||
|
||||
where Emacs-PID is the process ID of Emacs being debugged. Other
|
||||
useful signals to send are SIGUSR1 and SIGUSR2; see "Error Debugging"
|
||||
in the ELisp manual for how to use those.
|
||||
in the Elisp manual for how to use those.
|
||||
|
||||
When Emacs is displaying on a text terminal, it is useful to have a
|
||||
separate terminal for the debug session. This can be done by starting
|
||||
|
|
@ -805,7 +805,7 @@ not exit when it should.
|
|||
On GNU and Unix systems, you can also try sending Emacs SIGUSR2,
|
||||
which, if 'debug-on-event' has its default value, will cause Emacs to
|
||||
attempt to break out of its current loop and enter the Lisp
|
||||
debugger. (See the node "Debugging" in the ELisp manual for the
|
||||
debugger. (See the node "Debugging" in the Elisp manual for the
|
||||
details about the Lisp debugger.) This feature is useful when a
|
||||
C-level debugger is not conveniently available.
|
||||
|
||||
|
|
@ -1010,14 +1010,16 @@ program.
|
|||
** Running Emacs with address sanitization
|
||||
|
||||
Building Emacs with address sanitization can help debug memory-use
|
||||
problems, such as freeing the same object twice. To use
|
||||
AddressSanitizer with GCC and similar compilers, append
|
||||
problems, such as freeing the same object twice. It does, however,
|
||||
require special care to ensure that Emacs's garbage collection continues
|
||||
working. To use AddressSanitizer with GCC and similar compilers, append
|
||||
'-fsanitize=address' to CFLAGS, either when running 'configure' or
|
||||
running 'make'. Configure, build and run Emacs with
|
||||
ASAN_OPTIONS='detect_leaks=0' in the environment to suppress
|
||||
diagnostics of minor memory leaks in Emacs. For example:
|
||||
running 'make'. When running Emacs, ensure the ASAN_OPTIONS environment
|
||||
variable is set and includes 'detect_stack_use_after_return=0' (to keep
|
||||
GC working) and 'detect_leaks=0' (to avoid noisy diagnostics about minor
|
||||
memory leaks in Emacs). For example:
|
||||
|
||||
export ASAN_OPTIONS='detect_leaks=0'
|
||||
export ASAN_OPTIONS='detect_leaks=0,detect_stack_use_after_return=0'
|
||||
./configure CFLAGS='-O0 -g3 -fsanitize=address'
|
||||
make
|
||||
src/emacs
|
||||
|
|
@ -1034,8 +1036,7 @@ will let you gain control when an error is detected and before
|
|||
AddressSanitizer outputs to stderr or terminates the program.
|
||||
|
||||
Address sanitization is incompatible with undefined-behavior
|
||||
sanitization, unfortunately. Address sanitization is also
|
||||
incompatible with the --with-dumping=unexec option of 'configure'.
|
||||
sanitization, unfortunately.
|
||||
|
||||
*** Address poisoning/unpoisoning
|
||||
|
||||
|
|
|
|||
|
|
@ -777,4 +777,3 @@ bug-reference-bug-regexp: "\\(\\(github\\|bug\\)#\\([0-9]+\\)\\)"
|
|||
bug-reference-url-format: eglot--debbugs-or-github-bug-uri
|
||||
paragraph-separate: "[ ]"
|
||||
End:
|
||||
|
||||
|
|
|
|||
|
|
@ -239,6 +239,8 @@ GNU Emacs 29.3 (2024-03-24) emacs-29.3
|
|||
|
||||
GNU Emacs 29.4 (2024-06-22) emacs-29.4
|
||||
|
||||
GNU Emacs 30.1 (2025-02-23) emacs-30.1
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
This file is part of GNU Emacs.
|
||||
|
|
|
|||
374
etc/NEWS
374
etc/NEWS
|
|
@ -29,6 +29,7 @@ applies, and please also update docstrings as needed.
|
|||
The traditional unexec dumper, deprecated since Emacs 27, has been
|
||||
removed.
|
||||
|
||||
---
|
||||
** Changed GCC default options on 32-bit x86 systems.
|
||||
When using GCC 4 or later to build Emacs on 32-bit x86 systems,
|
||||
'configure' now defaults to using the GCC options '-mfpmath=sse' (if the
|
||||
|
|
@ -36,6 +37,11 @@ host system supports SSE2) or '-fno-tree-sra' (if not). These GCC
|
|||
options work around GCC bug 58416, which can cause Emacs to behave
|
||||
incorrectly in rare cases.
|
||||
|
||||
---
|
||||
** New configure option '--with-systemduserunitdir'.
|
||||
This allows to specify the directory where the user unit file for
|
||||
systemd is installed; default is '${prefix}/usr/lib/systemd/user'.
|
||||
|
||||
|
||||
* Startup Changes in Emacs 31.1
|
||||
|
||||
|
|
@ -134,6 +140,9 @@ usual minibuffer history commands. Each command has a separate history.
|
|||
|
||||
---
|
||||
** New minor mode 'find-function-mode' replaces 'find-function-setup-keys'.
|
||||
The new minor mode defines the keys at a higher precedence level than
|
||||
the old function, one more usual for a minor mode. To restore the old
|
||||
behavior, customize 'find-function-mode-lower-precedence' to non-nil.
|
||||
|
||||
** Minibuffer and Completions
|
||||
|
||||
|
|
@ -184,6 +193,17 @@ accepts a comma-separated list. The prompt format can include the
|
|||
separator description and the separator string, which are both stored as
|
||||
text properties of the 'crm-separator' regular expression.
|
||||
|
||||
---
|
||||
*** New user option 'completion-preview-sort-function'.
|
||||
This option controls how Completion Preview mode sorts completion
|
||||
candidates. If you use this mode together with an in-buffer completion
|
||||
popup interface, such as the interfaces that the GNU ELPA packages Corfu
|
||||
and Company provide, you can set this option to the same sort function
|
||||
that your popup interface uses for a more integrated experience.
|
||||
|
||||
Note: 'completion-preview-sort-function' was present also in Emacs 30.1,
|
||||
albeit as a variable, not a user option.
|
||||
|
||||
** Windows
|
||||
|
||||
+++
|
||||
|
|
@ -193,6 +213,14 @@ Several functions to modify the window layout have been added:
|
|||
'flip-window-layout-vertically', 'flip-window-layout-horizontally',
|
||||
'transpose-window-layout', 'rotate-windows', and 'rotate-windows-back'.
|
||||
|
||||
+++
|
||||
*** Windmove commands now move to skipped windows if invoked twice in a row.
|
||||
The new user option 'windmove-allow-repeated-command-override' controls
|
||||
this behavior: if it's non-nil, invoking the same windmove command twice
|
||||
overrides the 'no-other-window' property, allowing navigation to windows
|
||||
that would normally be skipped. The default is t; customize it to nil
|
||||
if you want the old behavior.
|
||||
|
||||
+++
|
||||
*** New hook 'window-deletable-functions'.
|
||||
This abnormal hook gives its client a way to save a window from getting
|
||||
|
|
@ -247,6 +275,16 @@ landscape shape for instance, Emacs could split horizontally before
|
|||
splitting vertically. The default setting preserves Emacs historical
|
||||
behavior to try to split vertically first.
|
||||
|
||||
+++
|
||||
*** New argument INDIRECT for 'get-buffer-window-list'.
|
||||
With this argument non-nil, 'get-buffer-window-list' will include in the
|
||||
return value windows whose buffers share their text with BUFFER-OR-NAME.
|
||||
|
||||
+++
|
||||
*** New 'display-buffer' action alist entry 'reuse-indirect'.
|
||||
With such an entry, 'display-buffer-reuse-window' may also choose a
|
||||
window whose buffer shares text with the buffer to display.
|
||||
|
||||
** Frames
|
||||
|
||||
+++
|
||||
|
|
@ -255,7 +293,7 @@ Calling this function before 'delete-frame' is useful to avoid that the
|
|||
latter throws an error when the argument FRAME cannot be deleted.
|
||||
|
||||
+++
|
||||
*** New value 'force' for option `frame-inhibit-implied-resize'.
|
||||
*** New value 'force' for user option 'frame-inhibit-implied-resize'.
|
||||
This will inhibit implied resizing while a new frame is made and can be
|
||||
useful on tiling window managers where the initial frame size should be
|
||||
specified by external means.
|
||||
|
|
@ -266,6 +304,12 @@ specified by external means.
|
|||
*** New abnormal hook 'tab-bar-auto-width-functions'.
|
||||
This hook allows you to control which tab-bar tabs are auto-resized.
|
||||
|
||||
---
|
||||
*** 'mouse-face' properties are now supported on the 'tab-bar'.
|
||||
'tab-bar' tab "buttons" are now highlighted when the mouse pointer
|
||||
hovers over them. You can customize the new face
|
||||
'tab-bar-tab-highlight'.
|
||||
|
||||
---
|
||||
*** New abnormal hook 'tab-bar-post-undo-close-tab-functions'.
|
||||
This hook allows you to operate on a reopened tab.
|
||||
|
|
@ -313,6 +357,15 @@ It can be used when switching between projects with similar file trees
|
|||
(such as Git worktrees of the same repository). It supports being
|
||||
invoked standalone or from the 'project-switch-commands' dispatch menu.
|
||||
|
||||
+++
|
||||
*** New user option 'project-list-exclude'.
|
||||
This user option describes projects that should always be skipped by
|
||||
'project-remember-project'.
|
||||
|
||||
---
|
||||
*** New command 'project-save-some-buffers' bound to 'C-x p C-x s'.
|
||||
This is like 'C-x s', but only for this project's buffers.
|
||||
|
||||
** Registers
|
||||
|
||||
*** New functions 'buffer-to-register' and 'file-to-register'.
|
||||
|
|
@ -339,6 +392,22 @@ Setting this variable to a non-nil value reduces performance and leads
|
|||
to wrong results in some cases. We believe that it is no longer useful;
|
||||
please contact us if you still need it for some reason.
|
||||
|
||||
---
|
||||
** 'byte-compile-cond-use-jump-table' is now obsolete.
|
||||
|
||||
---
|
||||
** Modified settings for an enabled theme now apply immediately.
|
||||
Evaluating a 'custom-theme-set-faces' or 'custom-theme-set-variables'
|
||||
call for an enabled theme causes the settings to apply immediately,
|
||||
without a need to re-load the theme.
|
||||
|
||||
---
|
||||
** 'describe-variable' now automatically says if 'setopt' is needed.
|
||||
If a user option has a defcustom ':set' function, users will normally
|
||||
need to set it with 'setopt' for it to take an effect. If the docstring
|
||||
doesn't already mention 'setopt', the 'describe-variable' command will
|
||||
now add a note about this automatically.
|
||||
|
||||
|
||||
* Editing Changes in Emacs 31.1
|
||||
|
||||
|
|
@ -419,9 +488,26 @@ useful for enabling or disabling the features of 'delete-selection-mode'
|
|||
based on the state of the buffer, such as for the different states of
|
||||
modal editing packages.
|
||||
|
||||
** New user variable 'exchange-point-and-mark-highlight-region'.
|
||||
When set to nil, this modifies `exchange-point-and-mark' so that it doesn't
|
||||
activate the mark if it is not already active.
|
||||
The default value is t, which retains the old behavior.
|
||||
This variable has no effect when Transient Mark mode is off.
|
||||
|
||||
|
||||
* Changes in Specialized Modes and Packages in Emacs 31.1
|
||||
|
||||
---
|
||||
** Text mode
|
||||
|
||||
*** New commands to convert between ASCII and full-width characters.
|
||||
New commands 'fullwidth-region' and 'fullwidth-word' convert ASCII
|
||||
characters in region or in the word at point to the corresponding
|
||||
full-width characters, which are customarily used instead of ASCII
|
||||
characters in CJK texts. For example, 'A' is converted to 'A', '1' is
|
||||
converted to '1', etc. Companion commands 'halfwidth-region' and
|
||||
'halfwidth-word' perform the opposite conversion.
|
||||
|
||||
---
|
||||
** ASM mode
|
||||
|
||||
|
|
@ -455,6 +541,20 @@ content.
|
|||
When non-nil, buffer sizes are shown in human readable format. The
|
||||
default is nil, which retains the old format.
|
||||
|
||||
** Term
|
||||
|
||||
*** The terminal emulator now supports auto-margins control.
|
||||
Term mode now handles DECAWM escape sequences that control whether text
|
||||
automatically wraps at the right margin:
|
||||
|
||||
- \e[?7h enables auto-margins (default)
|
||||
- \e[?7l disables auto-margins
|
||||
|
||||
When auto-margins is disabled, characters that would go beyond the right margin
|
||||
are discarded, which matches the behavior of physical terminals and other
|
||||
terminal emulators. Control sequences and escape sequences are still processed
|
||||
correctly regardless of margin position.
|
||||
|
||||
** Smerge
|
||||
|
||||
*** New command 'smerge-extend' extends a conflict over surrounding lines.
|
||||
|
|
@ -505,12 +605,13 @@ Emacs 25.1), and gnudoit (obsolete since Emacs 25.1).
|
|||
*** Some cl-lib functions and macros are now built-in.
|
||||
These functions or macros have been added to Emacs Lisp, and the old
|
||||
names are now aliases for the built-in equivalents:
|
||||
- 'cl-incf' renamed to 'incf'
|
||||
- 'cl-decf' renamed to 'decf'
|
||||
- 'cl-oddp' renamed to 'oddp'
|
||||
- 'cl-evenp' renamed to 'evenp'
|
||||
- 'cl-plusp' renamed to 'plusp'
|
||||
- 'cl-minusp' renamed to 'minusp'
|
||||
|
||||
- 'cl-incf' renamed to 'incf'
|
||||
- 'cl-decf' renamed to 'decf'
|
||||
- 'cl-oddp' renamed to 'oddp'
|
||||
- 'cl-evenp' renamed to 'evenp'
|
||||
- 'cl-plusp' renamed to 'plusp'
|
||||
- 'cl-minusp' renamed to 'minusp'
|
||||
|
||||
The old names are considered deprecated, and will be marked as obsolete
|
||||
in some future release.
|
||||
|
|
@ -526,6 +627,12 @@ Such bindings make it possible to compute which function to bind to FUNC.
|
|||
*** 'cl-locally' is now obsolete.
|
||||
It is an alias for the 'progn' special-form.
|
||||
|
||||
+++
|
||||
*** 'cl-declare' is now obsolete; use 'defvar' instead.
|
||||
|
||||
+++
|
||||
*** 'cl-gensym' is now obsolete; use 'gensym' instead.
|
||||
|
||||
** Whitespace
|
||||
|
||||
---
|
||||
|
|
@ -582,6 +689,15 @@ were also dynamically accumulated in minibuffer history during
|
|||
minibuffer use, they are now saved only once in the file specified by
|
||||
'savehist-file'. Previously, they were saved twice.
|
||||
|
||||
** Rectangle Mark
|
||||
|
||||
---
|
||||
*** New user option to control whether empty rectangle selections are shown.
|
||||
The new user option 'rectangle-indicate-zero-width-rectangle' can be
|
||||
used to disable the default display of empty rectangular selections.
|
||||
The default is t; set it to nil to disable the indication (which causes
|
||||
a horizontal shift of text on display, and thus could be annoying).
|
||||
|
||||
** Message
|
||||
|
||||
---
|
||||
|
|
@ -592,6 +708,11 @@ behavior included additional information about the originating message.
|
|||
The new variable 'message-header-use-obsolete-in-reply-to', nil by
|
||||
default, can be set to a non-nil value to restore the previous behavior.
|
||||
|
||||
+++
|
||||
*** Hashcash support has been removed.
|
||||
It is believed to no longer be useful as a method to fight spam. The
|
||||
'message-generate-hashcash' option is now obsolete and has no effect.
|
||||
|
||||
** Gnus
|
||||
|
||||
---
|
||||
|
|
@ -600,6 +721,11 @@ When called with a prefix argument, accepting, declining, or tentatively
|
|||
accepting an icalendar event will prompt for a comment to add to the
|
||||
response.
|
||||
|
||||
+++
|
||||
*** Hashcash support has been removed.
|
||||
It is believed to no longer be useful as a method to fight spam. The
|
||||
'spam-use-hashcash' hook is now obsolete and has no effect.
|
||||
|
||||
** Sieve
|
||||
|
||||
+++
|
||||
|
|
@ -618,6 +744,15 @@ It removes all the buttons in the specified region.
|
|||
|
||||
** Shell
|
||||
|
||||
+++
|
||||
*** Shell buffers now support bookmarks.
|
||||
You can now bookmark local and remote shell buffers using the bookmark
|
||||
menu 'bookmark-bmenu-list', or by using the command 'bookmark-set'.
|
||||
Shell bookmarks can be loaded via the menu and by using the command
|
||||
'bookmark-jump', which open a bookmarked shell, restore its buffer name,
|
||||
its current directory, and create a remote connection, if necessary.
|
||||
You can customize 'shell-bookmark-name-function'.
|
||||
|
||||
*** New command to complete the shell history.
|
||||
'comint-complete-input-ring' ('C-x <up>') is like 'minibuffer-complete-history'
|
||||
but completes on comint inputs.
|
||||
|
|
@ -845,6 +980,11 @@ are highlighted like other comments. When non-nil, Doxygen comment
|
|||
blocks are syntax-highlighted if the Doxygen grammar library is
|
||||
available.
|
||||
|
||||
---
|
||||
*** New user option 'java-ts-mode-method-chaining-indent-offset'.
|
||||
Now method chaining is indented by 8 spaces rather than 4, and this
|
||||
variable controls how much is indented for method chaining.
|
||||
|
||||
** Emacs Lisp mode
|
||||
|
||||
---
|
||||
|
|
@ -865,6 +1005,11 @@ those versions can't install packages where that line is missing.
|
|||
This change affects both 'M-x checkdoc' and the corresponding flymake
|
||||
backend.
|
||||
|
||||
---
|
||||
*** New user option 'checkdoc-arguments-missing-flag'.
|
||||
Set this to nil to disable warnings for function arguments that are not
|
||||
documented in docstrings.
|
||||
|
||||
---
|
||||
*** Checkdoc will now flag incorrect formatting in warnings.
|
||||
This affects calls to 'warn', 'lwarn', 'display-warning', and
|
||||
|
|
@ -880,6 +1025,14 @@ for docstrings where symbols 'nil' and 't' are in quotes.
|
|||
In most cases, having it enabled leads to a large amount of false
|
||||
positives.
|
||||
|
||||
** IELM
|
||||
|
||||
---
|
||||
*** IELM input history is now saved also when the IELM process is killed.
|
||||
When you kill the IELM process with 'C-c C-c', the input history is now
|
||||
saved to the file specified by 'ielm-history-file-name', just like when
|
||||
you exit the Emacs session or kill the IELM buffer.
|
||||
|
||||
** DocView
|
||||
|
||||
---
|
||||
|
|
@ -921,8 +1074,32 @@ allows idle timers and other code to run during this delay period. We
|
|||
consider making this behavior the default in a future Emacs version, so
|
||||
we invite Flyspell users to enable this new option and report issues.
|
||||
|
||||
---
|
||||
*** 'turn-on-flyspell' and 'turn-off-flyspell' are obsolete.
|
||||
To unconditionally enable 'flyspell-mode' from a hook, use this instead:
|
||||
|
||||
(add-hook 'text-mode-hook #'flyspell-mode)
|
||||
|
||||
** Tramp
|
||||
|
||||
+++
|
||||
*** New command 'tramp-cleanup-bufferless-connections'.
|
||||
Connection-related objects for which no associated buffers exist, except
|
||||
for Tramp internal buffers, are flushed. This is helpful to prune
|
||||
connections after you close remote-file buffers without having to either
|
||||
cherry pick via 'tramp-cleanup-connection' or clear them all via
|
||||
'tramp-cleanup-all-connections'.
|
||||
|
||||
+++
|
||||
*** New command 'tramp-dired-find-file-with-sudo'.
|
||||
This command, bound to '@' in Dired, visits the file or directory on the
|
||||
recent Dired line with superuser, or root, permissions.
|
||||
|
||||
+++
|
||||
*** 'C-x x @' is now bound to 'tramp-revert-buffer-with-sudo'.
|
||||
You can use 'C-u C-x x @' to select a Tramp method other than the
|
||||
default, 'sudo'.
|
||||
|
||||
+++
|
||||
*** Connection method "kubernetes" supports now optional namespace.
|
||||
The host name for Kubernetes connections can be of kind
|
||||
|
|
@ -1043,6 +1220,10 @@ Without 'dired-hide-details-hide-absolute-location':
|
|||
When 'dired-make-directory-clickable' is non-nil, clicking on the base
|
||||
name of the directory now reverts the Dired buffer.
|
||||
|
||||
*** 'dired-copy-filename-as-kill' supports project-relative names.
|
||||
With a new value of the prefix argument (1), this command copies file
|
||||
names relative to the root directory of the current project.
|
||||
|
||||
** Grep
|
||||
|
||||
+++
|
||||
|
|
@ -1218,6 +1399,35 @@ the directory into which the repository was cloned.
|
|||
*** 'C-x v u' ('vc-revert') now works on directories listed in VC Directory.
|
||||
Reverting a directory means reverting changes to all files inside it.
|
||||
|
||||
*** New command 'log-edit-done-strip-cvs-lines'.
|
||||
This command strips all lines beginning with "CVS:" from the buffer.
|
||||
It is intended to be added to the 'log-edit-done-hook' so that
|
||||
'vc-cvs-checkin' behaves like invoking 'cvs commit [files...]' from the
|
||||
command line.
|
||||
|
||||
---
|
||||
*** New user options 'vc-resolve-conflicts' and 'vc-*-resolve-conflicts'.
|
||||
Control whether to mark a conflicted file as resolved when saving.
|
||||
You can now control it globally, with 'vc-resolve-conflicts' or for
|
||||
specific backends with 'vc-bzr-resolve-conflicts',
|
||||
'vc-hg-resolve-conflicts' and 'vc-svn-resolve-conflicts'.
|
||||
|
||||
---
|
||||
*** New value for 'vc-git-resolve-conflicts'.
|
||||
The option now accepts the symbol 'default' as a value, which is
|
||||
its default value. Effectively, the default value hasn't changed,
|
||||
since 'vc-resolve-conflicts' defaults to t, the previous default value
|
||||
for 'vc-git-resolve-conflicts'.
|
||||
|
||||
** Diff mode
|
||||
|
||||
+++
|
||||
*** 'diff-apply-buffer' now considers the region and can reverse-apply.
|
||||
If the region is active, this command now applies all hunks that the
|
||||
region overlaps; otherwise, it applies all hunks.
|
||||
With a prefix argument, it now reverse-applies the hunks.
|
||||
This matches the existing prefix argument to 'diff-apply-hunk'.
|
||||
|
||||
** Package
|
||||
|
||||
+++
|
||||
|
|
@ -1244,6 +1454,10 @@ will not prompt the user for confirmation before installing packages.
|
|||
Refreshing the package index will no longer block when invoked
|
||||
interactively.
|
||||
|
||||
---
|
||||
*** 'package-upgrade' no longer accepts a string argument.
|
||||
When called from Lisp, it now only accepts a symbol.
|
||||
|
||||
+++
|
||||
*** package-x.el is now obsolete.
|
||||
|
||||
|
|
@ -1276,13 +1490,13 @@ runs its body, and removes the current buffer from
|
|||
** Strokes
|
||||
|
||||
--
|
||||
** 'strokes-mode' no longer demands the presence of a mouse.
|
||||
*** 'strokes-mode' no longer demands the presence of a mouse.
|
||||
'strokes-mode' now permits itself to be enabled if no mouse is
|
||||
connected, to facilitate enabling 'strokes-mode' in sessions where the
|
||||
availability of a mouse device varies during execution (as is frequently
|
||||
observed on Android).
|
||||
|
||||
** Yank media
|
||||
** Yank Media
|
||||
|
||||
+++
|
||||
*** 'yank-media' now auto-selects the most preferred MIME type.
|
||||
|
|
@ -1290,11 +1504,96 @@ Major-mode authors can customize the variables
|
|||
'yank-media-autoselect-function' and/or 'yank-media-preferred-types' to
|
||||
change the selection rules.
|
||||
|
||||
** Remember
|
||||
|
||||
---
|
||||
*** Remember mode is now a minor mode.
|
||||
The 'remember' command enables the major mode set in
|
||||
'remember-initial-major-mode' and then the 'remember-mode' minor mode in
|
||||
the 'remember-buffer'. This allows users to customize the major mode
|
||||
used to write notes.
|
||||
|
||||
---
|
||||
*** New handler that appends remember data in directory.
|
||||
The 'remember-append-in-data-directory' handler appends remember data in
|
||||
a file, that file being choosen by the user through the minibuffer.
|
||||
|
||||
---
|
||||
*** New prefix map for remember commands.
|
||||
Meant to be given a global binding convenient to the user. Example:
|
||||
|
||||
(keymap-global-set "C-c r" 'remember-prefix-map)
|
||||
|
||||
** Speedbar
|
||||
|
||||
+++
|
||||
*** The new command 'speedbar-window-mode' opens Speedbar in a window
|
||||
instead of a frame.
|
||||
|
||||
+++
|
||||
*** New command 'speedbar-window' is an alias for 'speedbar-window-mode'.
|
||||
|
||||
+++
|
||||
*** The new user option 'speedbar-prefer-window', tells 'speedbar' to
|
||||
open a side window instead of a frame.
|
||||
|
||||
+++
|
||||
*** The new user option ‘speedbar-dedicated-window’ defines whether the
|
||||
‘speedbar’ is displayed in a dedicated window.
|
||||
|
||||
+++
|
||||
*** The new user option 'speedbar-window-default-width' defines the
|
||||
initial width of the 'speedbar-window'
|
||||
|
||||
+++
|
||||
*** The new user option 'speedbar-window-max-width' defines the maximum
|
||||
width of the 'speedbar-window' when it is closed and then restored.
|
||||
|
||||
---
|
||||
*** 'speedbar-easymenu-definition-trailer' is now a function.
|
||||
|
||||
** Miscellaneous
|
||||
|
||||
---
|
||||
*** 'tooltip-mode' now shows tooltips after delay on TTY frames.
|
||||
Display of tooltips on text-only terminals now happens after
|
||||
'tooltip-delay' as it does on GUI terminals. To get back the old
|
||||
behavior, customize the value of 'tooltip-delay' to zero.
|
||||
|
||||
---
|
||||
*** New user option 'follow-mode-prefix-key'.
|
||||
This user option replaces 'follow-mode-prefix', which had to be set
|
||||
before loading Follow mode. This new option allows you to change the
|
||||
prefix even after it was loaded, using 'customize-option' or 'setopt'.
|
||||
|
||||
---
|
||||
*** cdl.el is now obsolete.
|
||||
Use 'shell-command' and 'shell-command-on-region' instead.
|
||||
|
||||
---
|
||||
*** echistory.el is now obsolete.
|
||||
|
||||
---
|
||||
*** hashcash.el is now obsolete.
|
||||
It is believed to no longer be useful as a method to fight spam.
|
||||
|
||||
---
|
||||
*** kermit.el is now obsolete.
|
||||
|
||||
---
|
||||
*** New user option 'ns-click-through' on Nextstep (GNUstep/Mac OS).
|
||||
This controls whether activation clicks are passed through to Emacs
|
||||
commands. When nil, clicking on an inactive Emacs frame will only
|
||||
activate it. When t (the default), the click will both activate the
|
||||
frame and be interpreted as a command.
|
||||
|
||||
---
|
||||
*** New user option 'display-fill-column-indicator-warning'.
|
||||
Customize it to a non-nil value to have the fill-column indicators
|
||||
change their face if the current line exceeds the 'fill-column'. The
|
||||
new face 'display-fill-column-indicator-warning-face' is used to
|
||||
highlight the fill-column indicators. By default this is disabled.
|
||||
|
||||
|
||||
* New Modes and Packages in Emacs 31.1
|
||||
|
||||
|
|
@ -1364,22 +1663,28 @@ restore the old behavior, you can set 'eshell-pwd-convert-function' to
|
|||
'identity'.
|
||||
|
||||
---
|
||||
** The rx 'eval' form now uses the current elisp dialect for evaluation.
|
||||
** The rx 'eval' form now uses the current Elisp dialect for evaluation.
|
||||
Previously, its argument was always evaluated using dynamic binding.
|
||||
|
||||
|
||||
* Lisp Changes in Emacs 31.1
|
||||
|
||||
+++
|
||||
** New macros 'static-when' and 'static-unless'.
|
||||
Like 'static-if', these macros evaluate their condition at
|
||||
macro-expansion time and are useful for writing code that can work
|
||||
across different Emacs versions.
|
||||
|
||||
---
|
||||
** You can change the default value of 'lexical-binding'.
|
||||
While the default is still the use dynamic binding dialect of ELisp
|
||||
While the default is still the use of dynamic binding dialect of Elisp
|
||||
in those places that don't explicitly set 'lexical-binding' you can
|
||||
change it globally with:
|
||||
|
||||
(set-default-toplevel-value 'lexical-binding t)
|
||||
|
||||
+++
|
||||
*** New macros 'incf' and 'decf'.
|
||||
** New macros 'incf' and 'decf'.
|
||||
They increment or decrement the value stored in a variable (a symbol),
|
||||
or in a generalized variable.
|
||||
|
||||
|
|
@ -1393,6 +1698,23 @@ and signal an error if they are given a non-number.
|
|||
They return non-nil if an integer is odd or even, respectively, and
|
||||
signal an error if they are given a non-integer.
|
||||
|
||||
+++
|
||||
** The 'defvar-local' macro second argument is now optional.
|
||||
This means that you can now call it with just one argument, like
|
||||
'defvar', to declare a variable both special, and buffer-local.
|
||||
|
||||
** ERT
|
||||
|
||||
*** Some experimental ERT macros are now considered stable.
|
||||
The following macros, previously only available in the experimental
|
||||
'ert-x' module, are now considered stable and have been moved to 'ert':
|
||||
|
||||
- ert-with-test-buffer
|
||||
- ert-with-buffer-selected
|
||||
- ert-with-buffer-renamed
|
||||
|
||||
See "(ert) Helper Functions" node in the ERT manual for more information.
|
||||
|
||||
** Time & Date
|
||||
|
||||
+++
|
||||
|
|
@ -1405,8 +1727,8 @@ strings in a variety of formats, for example "6 months 3 weeks" or "5m
|
|||
** The function 'purecopy' is now an obsolete alias for 'identity'.
|
||||
|
||||
** New function 'native-compile-directory'.
|
||||
This function natively-compiles all Lisp files in a directory and in its
|
||||
sub-directories, recursively, which were not already natively-compiled.
|
||||
This function natively compiles all Lisp files in a directory and in its
|
||||
sub-directories, recursively, which were not already natively compiled.
|
||||
|
||||
---
|
||||
** New function 'color-blend'.
|
||||
|
|
@ -1599,8 +1921,9 @@ will be calculated based on the window width.
|
|||
A command with this symbol property whose value is a list of repeat
|
||||
maps will not activate the repeat map in 'repeat-mode'. It will only
|
||||
continue the already activated repeating sequence. Also 'defvar-keymap'
|
||||
supports a new keyword ':continue' with a list of commands that
|
||||
only continue the active repeating sequence.
|
||||
supports a new keyword ':continue' with a list of commands that only
|
||||
continue the active repeating sequence, and the 'use-package' and
|
||||
'bind-keys' macros support a similar keyword ':continue-only'.
|
||||
|
||||
** New function 'completion-table-with-metadata'.
|
||||
It offers a more concise way to create a completion table with metadata.
|
||||
|
|
@ -1629,6 +1952,10 @@ This function inserts the special EVENT into the input event queue.
|
|||
This event is sent when the device running Emacs enters or leaves the
|
||||
sleep state.
|
||||
|
||||
** Function aliases obsolete since Emacs 23.2 have been removed:
|
||||
'advertised-undo', 'advertised-widget-backward', and
|
||||
'dired-advertised-find-file'.
|
||||
|
||||
|
||||
* Changes in Emacs 31.1 on Non-Free Operating Systems
|
||||
|
||||
|
|
@ -1638,6 +1965,12 @@ The run-time performance of subprocesses on recent Android releases,
|
|||
where a userspace executable loader is required, has been optimized on
|
||||
systems featuring Linux 3.5.0 and above.
|
||||
|
||||
---
|
||||
** It is now possible to read GUI events from non-main Lisp threads on Android.
|
||||
Put differently, this enables input events to be read and recursive
|
||||
editing sessions to be started from non-main threads. The only platform
|
||||
where this remains unsupported is Nextstep (GNUstep or Mac OS).
|
||||
|
||||
---
|
||||
** 'NSSpeechRecognitionUsageDescription' now included in "Info.plist" (macOS).
|
||||
Should Emacs (or any built-in shell) invoke a process using macOS speech
|
||||
|
|
@ -1647,6 +1980,9 @@ allowing Emacs users access to speech recognition utilities.
|
|||
Note: Accepting this permission allows the use of system APIs, which may
|
||||
send user data to Apple’s speech recognition servers.
|
||||
|
||||
+++
|
||||
** On Mac OS X, stipples now render with color.
|
||||
|
||||
---
|
||||
** Emacs on MS-Windows now supports GUI dialogs and message boxes better.
|
||||
In particular, it is now possible to show text with embedded newlines in
|
||||
|
|
@ -1677,6 +2013,12 @@ current buffer, if the major mode supports it. (Support for
|
|||
'yank-media' will be unavailable on MS-Windows if Emacs was configured
|
||||
'--without-native-image-api'.)
|
||||
|
||||
---
|
||||
** Emacs on MS-Windows now supports up to 1024 sub-processes.
|
||||
Changes in implementation of monitoring sub-processes allow Emacs on
|
||||
MS-Windows to start up to 1024 sub-processes, similar to GNU/Linux and
|
||||
other free systems.
|
||||
|
||||
---
|
||||
** Images on MS-Windows now support the ':transform-smoothing' flag.
|
||||
Transformed images are smoothed using the bilinear interpolation by
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ to produce its authentication key.
|
|||
*** Successive single-char deletions are collapsed in the undo-log just like
|
||||
successive char insertions. Which commands invoke this behavior is
|
||||
controlled by the new 'undo-auto-amalgamate' function. See the node
|
||||
"Undo" in the ELisp manual for more details.
|
||||
"Undo" in the Elisp manual for more details.
|
||||
|
||||
*** The heuristic used to insert 'undo-boundary' after each command
|
||||
has changed, so that if a command causes changes in more than just the
|
||||
|
|
@ -1418,10 +1418,10 @@ continued to the next line.
|
|||
** New macro 'define-advice'.
|
||||
|
||||
** Emacs Lisp now supports generators.
|
||||
See the "Generators" section of the ELisp manual for the details.
|
||||
See the "Generators" section of the Elisp manual for the details.
|
||||
|
||||
** New finalizer facility for running code when objects become unreachable.
|
||||
See the "Finalizer Type" subsection in the ELisp manual for the
|
||||
See the "Finalizer Type" subsection in the Elisp manual for the
|
||||
details.
|
||||
|
||||
** Lexical closures can use '(:documentation FORM)' to build their docstring.
|
||||
|
|
|
|||
22
etc/NEWS.26
22
etc/NEWS.26
|
|
@ -309,7 +309,7 @@ explicitly yields. Global variables are shared among all threads, but
|
|||
a 'let' binding is thread-local. Each thread also has its own current
|
||||
buffer and its own match data.
|
||||
|
||||
See the chapter "(elisp) Threads" in the ELisp manual for full
|
||||
See the chapter "(elisp) Threads" in the Elisp manual for full
|
||||
documentation of these facilities.
|
||||
|
||||
** The new user variable 'electric-quote-chars' provides a list
|
||||
|
|
@ -471,7 +471,7 @@ See the doc string of 'dir-locals-file' for more information.
|
|||
|
||||
** Connection-local variables can be used to specify local variables
|
||||
with a value depending on the connected remote server. For details,
|
||||
see the node "(elisp) Connection Local Variables" in the ELisp manual.
|
||||
see the node "(elisp) Connection Local Variables" in the Elisp manual.
|
||||
|
||||
** International domain names (IDNA) are now encoded via the new
|
||||
puny.el library, so that one can visit Web sites with non-ASCII URLs.
|
||||
|
|
@ -946,7 +946,7 @@ rotation, as well as saving the image to a file. These commands are
|
|||
also available in 'image-mode'.
|
||||
|
||||
*** A new library for creating and manipulating SVG images has been
|
||||
added. See the "(elisp) SVG Images" section in the ELisp reference
|
||||
added. See the "(elisp) SVG Images" section in the Elisp reference
|
||||
manual for details.
|
||||
|
||||
*** New setf-able function to access and set image parameters is
|
||||
|
|
@ -1106,7 +1106,7 @@ environments or ANTLR programs with embedded Python code.
|
|||
A major mode can provide indentation context for a sub-mode. To
|
||||
support this, modes should use 'prog-first-column' instead of a
|
||||
literal zero and avoid calling 'widen' in their indentation functions.
|
||||
See the node "(elisp) Mode-Specific Indent" in the ELisp manual for
|
||||
See the node "(elisp) Mode-Specific Indent" in the Elisp manual for
|
||||
more details.
|
||||
|
||||
** ERC
|
||||
|
|
@ -1441,7 +1441,7 @@ It has been renamed as internal function 'window--make-major-side-window',
|
|||
however applications should instead call 'display-buffer-in-side-window'
|
||||
(passing the SIDE and SLOT parameters as elements of ALIST). This approach
|
||||
is backwards-compatible with versions of Emacs in which the old function
|
||||
exists. See the node "Displaying Buffers in Side Windows" in the ELisp
|
||||
exists. See the node "Displaying Buffers in Side Windows" in the Elisp
|
||||
manual for more details.
|
||||
|
||||
* Lisp Changes in Emacs 26.1
|
||||
|
|
@ -1493,13 +1493,13 @@ range of indentation.
|
|||
|
||||
** New function 'secure-hash-algorithms' to list the algorithms that
|
||||
'secure-hash' supports.
|
||||
See the node "(elisp) Checksum/Hash" in the ELisp manual for details.
|
||||
See the node "(elisp) Checksum/Hash" in the Elisp manual for details.
|
||||
|
||||
** Emacs now exposes the GnuTLS cryptographic API with the functions
|
||||
'gnutls-macs' and 'gnutls-hash-mac'; 'gnutls-digests' and
|
||||
'gnutls-hash-digest'; 'gnutls-ciphers' and 'gnutls-symmetric-encrypt'
|
||||
and 'gnutls-symmetric-decrypt'.
|
||||
See the node "(elisp) GnuTLS Cryptography" in the ELisp manual for details.
|
||||
See the node "(elisp) GnuTLS Cryptography" in the Elisp manual for details.
|
||||
|
||||
** The function 'gnutls-available-p' now returns a list of capabilities
|
||||
supported by the GnuTLS library used by Emacs.
|
||||
|
|
@ -1707,7 +1707,7 @@ frame's outer border.
|
|||
frame.
|
||||
|
||||
**** 'parent-frame' makes a frame the child frame of another Emacs
|
||||
frame. The section "(elisp) Child Frames" in the ELisp manual
|
||||
frame. The section "(elisp) Child Frames" in the Elisp manual
|
||||
describes the intrinsics of that relationship.
|
||||
|
||||
**** 'delete-before' triggers deletion of one frame before that of
|
||||
|
|
@ -1782,12 +1782,12 @@ function 'display-buffer-in-side-window' will display its buffer in a
|
|||
side window. Functions for toggling all side windows on a frame,
|
||||
changing and reversing the layout of side windows and returning the
|
||||
main (major non-side) window of a frame are provided. For details
|
||||
consult the section "(elisp) Side Windows" in the ELisp manual.
|
||||
consult the section "(elisp) Side Windows" in the Elisp manual.
|
||||
|
||||
*** Support for atomic windows - rectangular compositions of windows
|
||||
treated by 'split-window', 'delete-window' and 'delete-other-windows'
|
||||
like a single live window - is now official. For details consult the
|
||||
section "(elisp) Atomic Windows" in the ELisp manual.
|
||||
section "(elisp) Atomic Windows" in the Elisp manual.
|
||||
|
||||
*** New 'display-buffer' alist entry 'window-parameters' allows the
|
||||
assignment of window parameters to the window used for displaying the
|
||||
|
|
@ -1826,7 +1826,7 @@ window's body.
|
|||
|
||||
*** The semantics of 'mouse-autoselect-window' has changed slightly.
|
||||
For details see the section "(elisp) Mouse Window Auto-selection" in
|
||||
the ELisp manual.
|
||||
the Elisp manual.
|
||||
|
||||
*** 'select-frame-by-name' now may return a frame on another display
|
||||
if it does not find a suitable one on the current display.
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ It is no longer enough to specify 'bindir=DIRECTORY' on the command
|
|||
line of the "make install" command.
|
||||
|
||||
The reason for this new requirement is that Emacs needs to locate at
|
||||
startup the directory with its "*.eln" natively-compiled files for the
|
||||
startup the directory with its "*.eln" natively compiled files for the
|
||||
preloaded Lisp packages, and the relative name of that directory needs
|
||||
therefore to be recorded in the executable as part of the build.
|
||||
|
||||
|
|
@ -3906,7 +3906,7 @@ support these coding-systems.
|
|||
This new system is provided by the new macro 'bindat-type' and
|
||||
obsoletes the old data layout specifications. It supports
|
||||
arbitrary-size integers, recursive types, and more. See the Info node
|
||||
"(elisp) Byte Packing" in the ELisp manual for more details.
|
||||
"(elisp) Byte Packing" in the Elisp manual for more details.
|
||||
|
||||
** New macro 'with-environment-variables'.
|
||||
This macro allows setting environment variables temporarily when
|
||||
|
|
|
|||
|
|
@ -3487,7 +3487,7 @@ These are like 'line-end-position' and 'line-beginning-position'
|
|||
|
||||
** New function 'compiled-function-p'.
|
||||
This returns non-nil if its argument is either a built-in, or a
|
||||
byte-compiled, or a natively-compiled function object, or a function
|
||||
byte-compiled, or a native-compiled function object, or a function
|
||||
loaded from a dynamic module.
|
||||
|
||||
** 'deactivate-mark' can have new value 'dont-save'.
|
||||
|
|
@ -3580,7 +3580,7 @@ things to be saved.
|
|||
** New function 'string-equal-ignore-case'.
|
||||
This compares strings ignoring case differences.
|
||||
|
||||
** 'symbol-file' can now report natively-compiled ".eln" files.
|
||||
** 'symbol-file' can now report native-compiled ".eln" files.
|
||||
If Emacs was built with native-compilation enabled, Lisp programs can
|
||||
now call 'symbol-file' with the new optional 3rd argument non-nil to
|
||||
request the name of the ".eln" file which defined a given symbol.
|
||||
|
|
|
|||
32
etc/NEWS.30
32
etc/NEWS.30
|
|
@ -15,6 +15,33 @@ in older Emacs versions.
|
|||
You can narrow news to a specific version by calling 'view-emacs-news'
|
||||
with a prefix argument or by typing 'C-u C-h C-n'.
|
||||
|
||||
|
||||
* Installation Changes in Emacs 30.2
|
||||
|
||||
|
||||
* Startup Changes in Emacs 30.2
|
||||
|
||||
|
||||
* Changes in Emacs 30.2
|
||||
|
||||
|
||||
* Editing Changes in Emacs 30.2
|
||||
|
||||
|
||||
* Changes in Specialized Modes and Packages in Emacs 30.2
|
||||
|
||||
|
||||
* New Modes and Packages in Emacs 30.2
|
||||
|
||||
|
||||
* Incompatible Lisp Changes in Emacs 30.2
|
||||
|
||||
|
||||
* Lisp Changes in Emacs 30.2
|
||||
|
||||
|
||||
* Changes in Emacs 30.2 on Non-Free Operating Systems
|
||||
|
||||
|
||||
* Installation Changes in Emacs 30.1
|
||||
|
||||
|
|
@ -184,6 +211,9 @@ expectations.
|
|||
|
||||
* Changes in Emacs 30.1
|
||||
|
||||
** Fix shell injection vulnerability in man.el (CVE-2025-1244).
|
||||
We urge all users to upgrade immediately.
|
||||
|
||||
** New user option 'trusted-content' to allow potentially dangerous features.
|
||||
This option lists those files and directories whose content Emacs should
|
||||
consider as sufficiently trusted to run any part of the code contained
|
||||
|
|
@ -2360,7 +2390,7 @@ This line typically looks something like
|
|||
|
||||
;;; My little pony mode -*- lexical-binding: t -*-
|
||||
|
||||
It is needed to inform the compiler about which dialect of ELisp
|
||||
It is needed to inform the compiler about which dialect of Elisp
|
||||
your code is using: the modern dialect with lexical binding or
|
||||
the old dialect with only dynamic binding.
|
||||
|
||||
|
|
|
|||
26
etc/PROBLEMS
26
etc/PROBLEMS
|
|
@ -3484,6 +3484,22 @@ for further discussion.
|
|||
|
||||
* Runtime problems specific to macOS
|
||||
|
||||
** Spurious warnings on macOS 15.
|
||||
|
||||
When starting Emacs from the terminal, the following warnings are
|
||||
displayed:
|
||||
|
||||
2024-09-20 14:24:58.583 emacs[23293:150402] +[IMKClient subclass]: chose IMKClient_Legacy
|
||||
2024-09-20 14:24:58.583 emacs[23293:150402] +[IMKInputSession subclass]:chose IMKInputSession_Legacy
|
||||
|
||||
As far as we can tell, this is harmless, and affects other software too.
|
||||
Our understanding is that this is a bug in macOS 15, and should be
|
||||
reported to and fixed by Apple.
|
||||
|
||||
For more information, see:
|
||||
https://discussions.apple.com/thread/255761734?sortBy=rank
|
||||
|
||||
|
||||
** Error message about malicious software when opening Emacs on macOS
|
||||
|
||||
When opening Emacs, you may see an error message saying something like
|
||||
|
|
@ -3814,6 +3830,16 @@ executing:
|
|||
|
||||
$ adb shell appops set --uid org.gnu.emacs MANAGE_EXTERNAL_STORAGE allow
|
||||
|
||||
** Images embedded in SVG files are invisible.
|
||||
|
||||
This is a product of librsvg's failing to locate a suitable MIME
|
||||
database enabling it automatically to detect image file formats. The
|
||||
procedure by which to obtain such a database is documented in the node
|
||||
'(emacs)Android Software' in the Emacs manual; you may also download a
|
||||
pre-compiled MIME database from this SourceForge repository:
|
||||
|
||||
https://sourceforge.net/projects/android-ports-for-gnu-emacs/files/mime-database.tar.gz/download
|
||||
|
||||
* Build-time problems
|
||||
|
||||
** Configuration
|
||||
|
|
|
|||
39
etc/TODO
39
etc/TODO
|
|
@ -105,7 +105,7 @@ longer)."
|
|||
|
||||
** Do interactive mode tagging for commands
|
||||
Change "(interactive)" to "(interactive nil foo-mode)" for command
|
||||
completion purposes. Pick a major mode or ELisp library, and check
|
||||
completion purposes. Pick a major mode or Lisp library, and check
|
||||
all interactive commands to see if they are only relevant in one
|
||||
particular mode. This requires care as some commands might be useful
|
||||
outside of the mode they were written for.
|
||||
|
|
@ -222,6 +222,31 @@ https://lists.gnu.org/r/emacs-devel/2008-08/msg00456.html
|
|||
|
||||
* Important features
|
||||
|
||||
** Make it easier to contribute
|
||||
|
||||
*** New script to catch common mistakes in patches.
|
||||
Examples of things to catch are missing or malformed ChangeLog, style
|
||||
issues in C, Lisp, and Texinfo, etc. There is no need to be overly
|
||||
ambitious in a first draft, making a start is better than nothing. It
|
||||
could draw inspiration from checkpatch.pl used by the Linux kernel.
|
||||
|
||||
*** New make target or script to run tests for changed files.
|
||||
This might require some kind of data structure mapping a source file to
|
||||
the tests which exercise some of the code in that source file. The
|
||||
first approximation is to run FOO-tests when you modify a file FOO, but
|
||||
some FOO's get used in many places in the test suite, so this is not a
|
||||
simple 1:1 relation. Then we could ask contributors to run the relevant
|
||||
tests as part of the submission process.
|
||||
|
||||
*** Automated emails to contributors when their commits make tests fail
|
||||
Having EMBA or something similar email the guilty parties in case of
|
||||
new test failures (or maybe even warnings) would be great.
|
||||
|
||||
*** Automated testing of patches submitted to the bug tracker
|
||||
Create a bot that can run the above "check patch" script, and perhaps
|
||||
even run unit tests, for every patch submitted to the bug tracker, and
|
||||
then send an automated email with the results. Can EMBA help with this?
|
||||
|
||||
** Speed up Elisp execution
|
||||
|
||||
*** Speed up function calls
|
||||
|
|
@ -705,9 +730,9 @@ H-S-C-M-s-double-wheel-up, ...
|
|||
|
||||
*** Support for the $ (paired delimiter) in parse-partial-sexp
|
||||
|
||||
*** Support for hook-chars whose effect is specified by ELisp code
|
||||
*** Support for hook-chars whose effect is specified by Lisp
|
||||
Hook-chars could have their effect on the parsing-state specified by
|
||||
ELisp code. Thus a character could both close a string and open a
|
||||
Lisp code. Thus a character could both close a string and open a
|
||||
comment at the same time and do it in a context-sensitive way.
|
||||
|
||||
*** Ability to add mode-specific data to the partial-parse-state
|
||||
|
|
@ -835,7 +860,7 @@ for completeness, but some may be worth documenting.
|
|||
|
||||
Here's a list which is probably not complete/correct: align, allout,
|
||||
artist, ansi-color, array, calculator, cdl, cmuscheme, completion,
|
||||
delim-col, dirtrack, double, echistory, elide-head, easymenu, expand,
|
||||
delim-col, dirtrack, double, elide-head, easymenu, expand,
|
||||
flow-ctrl, format [format-alist], generic/generic-x [various modes],
|
||||
kermit, log-edit, makesum, midnight [other than in Kill Buffer node],
|
||||
mouse-copy [?], mouse-drag, mouse-sel, net-utils, snmp-mode
|
||||
|
|
@ -1781,12 +1806,6 @@ https://lists.gnu.org/r/emacs-devel/2012-06/msg00354.html
|
|||
It wouldn't have to be a complete replacement, just enough
|
||||
for vc-rcs-update-changelog.
|
||||
|
||||
** Allow Emacs to use the bottom-right corner of a TTY
|
||||
Emacs doesn't use the bottom-right corner of a TTY when terminfo
|
||||
capability "am" (auto_right_margin) is defined. It could use the
|
||||
bottom-right corner nonetheless when certain other capabilities are
|
||||
defined. See bug#57607.
|
||||
|
||||
** Replace tramp-archive.el by a native libarchive(3) implementation.
|
||||
The former is based on the GVFS archive backend, which makes it
|
||||
available on GNU/Linux only. That implementation has further
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@ version. If it is necessary, use:
|
|||
|
||||
tic -o ../ ./eterm-color.ti
|
||||
|
||||
(Sometimes tic puts output in etc/65 instead of etc/e. Move it to etc/e
|
||||
yourself if it does that.)
|
||||
|
||||
The compiled files are used by lisp/term.el, so if they are moved,
|
||||
term.el needs to be changed. terminfo requires them to be stored in
|
||||
an 'e' subdirectory (the first character of the file name).
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -4,8 +4,8 @@ eterm-color|Emacs term.el terminal emulator term-protocol-version 0.96,
|
|||
# copyright, constituting the only possible expression of the algorithm
|
||||
# in this format.
|
||||
#
|
||||
# When updating this file, etc/e/eterm-color should be regenerated by
|
||||
# running "make e/eterm-color" in the etc directory.
|
||||
# When updating this file, etc/e/eterm-color should be regenerated by
|
||||
# following the instructions in etc/e/README.
|
||||
# Any change to this file should be done at the same time with a
|
||||
# corresponding change to the TERMCAP environment variable in term.el.
|
||||
# Comments in term.el specify where each of these capabilities is implemented.
|
||||
|
|
@ -80,6 +80,8 @@ eterm-color|Emacs term.el terminal emulator term-protocol-version 0.96,
|
|||
u7=\E[6n,
|
||||
smcup=\E[47h,
|
||||
rmcup=\E[47l,
|
||||
smam=\E[?7h,
|
||||
rmam=\E[?7l,
|
||||
# rs2 may need to be added
|
||||
|
||||
eterm-direct|Emacs term.el with direct-color indexing term-protocol-version 0.96,
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -83,6 +83,7 @@ Emacs images and their source in the GNOME icons stock/ directory:
|
|||
lock-ok.xpm data/stock_lock-ok
|
||||
lock.xpm data/stock_lock
|
||||
next-page.xpm navigation/stock_next-page
|
||||
last-page.xpm mirrored from navigation/stock_next-page
|
||||
redo.xpm generic/stock_redo
|
||||
refresh.xpm generic/stock_refresh
|
||||
search-replace.xpm slightly modified generic/stock_search-and-replace
|
||||
|
|
|
|||
|
|
@ -54,8 +54,14 @@ PDF_SLOVAKIAN = \
|
|||
sk-refcard.pdf \
|
||||
sk-survival.pdf
|
||||
|
||||
PDF_SPANISH = \
|
||||
es-dired-ref.pdf \
|
||||
es-refcard.pdf \
|
||||
es-survival.pdf
|
||||
|
||||
PDF_TARGETS = $(PDF_ENGLISH) $(PDF_CZECH) $(PDF_FRENCH) $(PDF_GERMAN) \
|
||||
$(PDF_POLISH) $(PDF_PORTUGUESE) $(PDF_RUSSIAN) $(PDF_SLOVAKIAN)
|
||||
$(PDF_POLISH) $(PDF_PORTUGUESE) $(PDF_RUSSIAN) $(PDF_SLOVAKIAN) \
|
||||
$(PDF_SPANISH)
|
||||
|
||||
PS_ENGLISH = $(PDF_ENGLISH:.pdf=.ps)
|
||||
PS_CZECH = $(PDF_CZECH:.pdf=.ps)
|
||||
|
|
@ -65,6 +71,7 @@ PS_POLISH = $(PDF_POLISH:.pdf=.ps)
|
|||
PS_PORTUGUESE = $(PDF_PORTUGUESE:.pdf=.ps)
|
||||
PS_RUSSIAN = $(PDF_RUSSIAN:.pdf=.ps)
|
||||
PS_SLOVAKIAN = $(PDF_SLOVAKIAN:.pdf=.ps)
|
||||
PS_SPANISH = $(PDF_SPANISH:.pdf=.ps)
|
||||
|
||||
PS_TARGETS = $(PDF_TARGETS:.pdf=.ps)
|
||||
|
||||
|
|
@ -80,7 +87,7 @@ pdf: $(PDF_TARGETS)
|
|||
ps: $(PS_TARGETS)
|
||||
|
||||
|
||||
.PHONY: english czech french german polish portuguese russian slovakian
|
||||
.PHONY: english czech french german polish portuguese russian slovakian spanish
|
||||
english: $(PDF_ENGLISH)
|
||||
czech: $(PDF_CZECH)
|
||||
french: $(PDF_FRENCH)
|
||||
|
|
@ -89,6 +96,7 @@ polish: $(PDF_POLISH)
|
|||
portuguese: $(PDF_PORTUGUESE)
|
||||
russian: $(PDF_RUSSIAN)
|
||||
slovakian: $(PDF_SLOVAKIAN)
|
||||
spanish: $(PDF_SPANISH)
|
||||
|
||||
.PHONY: english-ps czech-ps french-ps german-ps polish-ps portuguese-ps russian-ps slovakian-ps
|
||||
english-ps: $(PS_ENGLISH)
|
||||
|
|
@ -99,6 +107,7 @@ polish-ps: $(PS_POLISH)
|
|||
portuguese-ps: $(PS_PORTUGUESE)
|
||||
russian-ps: $(PS_RUSSIAN)
|
||||
slovakian-ps: $(PS_SLOVAKIAN)
|
||||
spanish-ps: $(PS_SPANISH)
|
||||
|
||||
|
||||
## Default for file that do not use a different paper size.
|
||||
|
|
@ -289,6 +298,31 @@ sk-survival.dvi: $(sk_survival_deps)
|
|||
sk-survival.ps: sk-survival.dvi
|
||||
dvips -t a4 -o $@ sk-survival.dvi
|
||||
|
||||
es_dired_ref_deps = es-dired-ref.tex emacsver.tex pdflayout.sty
|
||||
es-dired-ref.pdf: $(es_dired_ref_deps)
|
||||
input=es-dired-ref.tex; $(make_cs)
|
||||
es-dired-ref.dvi: $(es_dired_ref_deps)
|
||||
$(ENVADD) csplain es-dired-ref.tex
|
||||
es-dired-ref.ps: es-dired-ref.dvi
|
||||
dvips -t a4 -o $@ es-dired-ref.dvi
|
||||
|
||||
es_refcard_deps = es-refcard.tex emacsver.tex pdflayout.sty
|
||||
es-refcard.pdf: $(es_refcard_deps)
|
||||
input=es-refcard.tex; $(make_cs)
|
||||
es-refcard.dvi: $(es_refcard_deps)
|
||||
$(ENVADD) csplain es-refcard.tex
|
||||
es-refcard.ps: es-refcard.dvi
|
||||
dvips -t a4 -o $@ es-refcard.dvi
|
||||
|
||||
es_survival_deps = es-survival.tex emacsver.tex pdflayout.sty
|
||||
es-survival.pdf: $(es_survival_deps)
|
||||
input=es-survival.tex; $(make_cs)
|
||||
es-survival.dvi: $(es_survival_deps)
|
||||
$(ENVADD) csplain es-survival.tex
|
||||
es-survival.ps: es-survival.dvi
|
||||
dvips -t a4 -o $@ es-survival.dvi
|
||||
|
||||
|
||||
survival_deps = survival.tex emacsver.tex pdflayout.sty
|
||||
survival.pdf: $(survival_deps)
|
||||
$(ENVADD) pdftex survival.tex
|
||||
|
|
|
|||
|
|
@ -68,6 +68,12 @@ Slovak
|
|||
sk-refcard.pdf Emacs Reference Card (sk)
|
||||
sk-survival.pdf Emacs Survival Card (sk)
|
||||
|
||||
Spanish
|
||||
|
||||
es-dired-ref.pdf Dired Reference Card (es)
|
||||
es-refcard.pdf Emacs Reference Card (es)
|
||||
es-survival.pdf Emacs Survival Card (es)
|
||||
|
||||
|
||||
COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
|
||||
|
||||
|
|
|
|||
426
etc/refcards/es-dired-ref.tex
Normal file
426
etc/refcards/es-dired-ref.tex
Normal file
|
|
@ -0,0 +1,426 @@
|
|||
% Reference Card for Dired
|
||||
|
||||
% Copyright (C) 2025 Free Software Foundation, Inc.
|
||||
|
||||
% Author: Evgeny Roubinchtein <eroubinc@u.washington.edu>
|
||||
% Spanish translation: Elias Gabriel Perez <eg642616@gmail.com>
|
||||
|
||||
% This document 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.
|
||||
|
||||
% As a special additional permission, you may distribute reference cards
|
||||
% printed, or formatted for printing, with the notice "Released under
|
||||
% the terms of the GNU General Public License version 3 or later"
|
||||
% instead of the usual distributed-under-the-GNU-GPL notice, and without
|
||||
% a copy of the GPL itself.
|
||||
|
||||
% This document 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/>.
|
||||
|
||||
|
||||
% This file is intended to be processed by plain TeX (TeX82).
|
||||
|
||||
% This is a bit of a dirty hack on the GNU Emacs reference card
|
||||
% to produce a Dired reference card instead.
|
||||
|
||||
% I put this together because I wanted a Dired reference card, but
|
||||
% couldn't find anything on the 'net. Based mostly off Dired's
|
||||
% describe-mode.
|
||||
|
||||
% Thanks to Cecilio Pardo, Mauro Aranda and Stephen Berman for
|
||||
% the suggestions.
|
||||
|
||||
%**start of header
|
||||
\newcount\columnsperpage
|
||||
|
||||
% This file can be printed with 1, 2, or 3 columns per page.
|
||||
% Specify how many you want here.
|
||||
% The reference card looks OK with 2 columns per page, portrait mode.
|
||||
% I haven't tried it with 3 columns per page.
|
||||
\columnsperpage=2
|
||||
|
||||
% PDF output layout. 0 for A4, 1 for letter (US), a `l' is added for
|
||||
% a landscape layout.
|
||||
\input pdflayout.sty
|
||||
\pdflayout=(1)
|
||||
|
||||
\input emacsver.tex
|
||||
|
||||
% Nothing else needs to be changed.
|
||||
|
||||
\def\shortcopyrightnotice{\vskip 1ex plus 2 fill
|
||||
\centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
|
||||
Permissions on back.}}
|
||||
|
||||
\def\copyrightnotice{
|
||||
\vskip 1ex plus 2 fill\begingroup\small
|
||||
\centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.}
|
||||
\centerline{For GNU Emacs version \versionemacs}
|
||||
\centerline{Originally written May 2000 by Evgeny Roubinchtein,}
|
||||
\centerline{using refcard layout designed by Stephen Gildea.}
|
||||
\centerline{Translated by Elias Gabriel P{\'e}rez.}
|
||||
|
||||
Released under the terms of the GNU General Public License version 3 or later.
|
||||
|
||||
For more Emacs documentation, and the \TeX{} source for this card,
|
||||
see the Emacs distribution, or {\tt https://www.gnu.org/software/emacs}
|
||||
\endgroup}
|
||||
|
||||
% make \bye not \outer so that the \def\bye in the \else clause below
|
||||
% can be scanned without complaint.
|
||||
\def\bye{\par\vfill\supereject\end}
|
||||
|
||||
\newdimen\intercolumnskip %horizontal space between columns
|
||||
\newbox\columna %boxes to hold columns already built
|
||||
\newbox\columnb
|
||||
|
||||
\def\ncolumns{\the\columnsperpage}
|
||||
|
||||
\message{[\ncolumns\space
|
||||
column\if 1\ncolumns\else s\fi\space per page]}
|
||||
|
||||
\def\scaledmag#1{ scaled \magstep #1}
|
||||
|
||||
% This multi-way format was designed by Stephen Gildea October 1986.
|
||||
% Note that the 1-column format is fontfamily-independent.
|
||||
\if 1\ncolumns %one-column format uses normal size
|
||||
\hsize 4in
|
||||
\vsize 10in
|
||||
\voffset -.7in
|
||||
\font\titlefont=\fontname\tenbf \scaledmag3
|
||||
\font\headingfont=\fontname\tenbf \scaledmag2
|
||||
\font\smallfont=\fontname\sevenrm
|
||||
\font\smallsy=\fontname\sevensy
|
||||
|
||||
\footline{\hss\folio}
|
||||
\def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}
|
||||
\else %2 or 3 columns uses prereduced size
|
||||
\hsize 3.4in
|
||||
\vsize 9.2in
|
||||
\hoffset -.75in
|
||||
\voffset -.745in
|
||||
\font\titlefont=cmbx10 \scaledmag2
|
||||
\font\headingfont=cmbx10 \scaledmag1
|
||||
\font\smallfont=cmr6
|
||||
\font\smallsy=cmsy6
|
||||
\font\eightrm=cmr8
|
||||
\font\eightbf=cmbx8
|
||||
\font\eightit=cmti8
|
||||
\font\eighttt=cmtt8
|
||||
\font\eightmi=cmmi8
|
||||
\font\eightsy=cmsy8
|
||||
\textfont0=\eightrm
|
||||
\textfont1=\eightmi
|
||||
\textfont2=\eightsy
|
||||
\def\rm{\eightrm}
|
||||
\def\bf{\eightbf}
|
||||
\def\it{\eightit}
|
||||
\def\tt{\eighttt}
|
||||
\normalbaselineskip=.8\normalbaselineskip
|
||||
\normallineskip=.8\normallineskip
|
||||
\normallineskiplimit=.8\normallineskiplimit
|
||||
\normalbaselines\rm %make definitions take effect
|
||||
|
||||
\if 2\ncolumns
|
||||
\let\maxcolumn=b
|
||||
\footline{\hss\rm\folio\hss}
|
||||
\def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
|
||||
\else \if 3\ncolumns
|
||||
\let\maxcolumn=c
|
||||
\nopagenumbers
|
||||
\else
|
||||
\errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
|
||||
\errmessage{Illegal number of columns per page}
|
||||
\fi\fi
|
||||
|
||||
\intercolumnskip=.46in
|
||||
\def\abc{a}
|
||||
\output={% %see The TeXbook page 257
|
||||
% This next line is useful when designing the layout.
|
||||
%\immediate\write16{Column \folio\abc\space starts with \firstmark}
|
||||
\if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
|
||||
\else\if a\abc
|
||||
\global\setbox\columna\columnbox \global\def\abc{b}
|
||||
%% in case we never use \columnb (two-column mode)
|
||||
\global\setbox\columnb\hbox to -\intercolumnskip{}
|
||||
\else
|
||||
\global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
|
||||
\def\multicolumnformat{\shipout\vbox{\makeheadline
|
||||
\hbox{\box\columna\hskip\intercolumnskip
|
||||
\box\columnb\hskip\intercolumnskip\columnbox}
|
||||
\makefootline}\advancepageno}
|
||||
\def\columnbox{\leftline{\pagebody}}
|
||||
|
||||
\def\bye{\par\vfill\supereject
|
||||
\if a\abc \else\null\vfill\eject\fi
|
||||
\if a\abc \else\null\vfill\eject\fi
|
||||
\end}
|
||||
\fi
|
||||
|
||||
% we won't be using math mode much, so redefine some of the characters
|
||||
% we might want to talk about
|
||||
\catcode`\^=12
|
||||
\catcode`\_=12
|
||||
|
||||
\chardef\\=`\\
|
||||
\chardef\{=`\{
|
||||
\chardef\}=`\}
|
||||
|
||||
\hyphenation{mini-buf-fer}
|
||||
\hyphenation{de-le-tion}
|
||||
|
||||
\parindent 0pt
|
||||
\parskip 1ex plus .5ex minus .5ex
|
||||
|
||||
\def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
|
||||
|
||||
% newcolumn - force a new column. Use sparingly, probably only for
|
||||
% the first column of a page, which should have a title anyway.
|
||||
\outer\def\newcolumn{\vfill\eject}
|
||||
|
||||
% title - page title. Argument is title text.
|
||||
\outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}
|
||||
|
||||
% section - new major section. Argument is section name.
|
||||
\outer\def\section#1{\par\filbreak
|
||||
\vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}%
|
||||
\vskip 2ex plus 1ex minus 1.5ex}
|
||||
|
||||
\newdimen\keyindent
|
||||
|
||||
% beginindentedkeys...endindentedkeys - key definitions will be
|
||||
% indented, but running text, typically used as headings to group
|
||||
% definitions, will not.
|
||||
\def\beginindentedkeys{\keyindent=1em}
|
||||
\def\endindentedkeys{\keyindent=0em}
|
||||
\endindentedkeys
|
||||
|
||||
% paralign - begin paragraph containing an alignment.
|
||||
% If an \halign is entered while in vertical mode, a parskip is never
|
||||
% inserted. Using \paralign instead of \halign solves this problem.
|
||||
\def\paralign{\vskip\parskip\halign}
|
||||
|
||||
% \<...> - surrounds a variable name in a code example
|
||||
\def\<#1>{{\it #1\/}}
|
||||
|
||||
% kbd - argument is characters typed literally. Like the Texinfo command.
|
||||
\def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows
|
||||
|
||||
% beginexample...endexample - surrounds literal text, such a code example.
|
||||
% typeset in a typewriter font with line breaks preserved
|
||||
\def\beginexample{\par\leavevmode\begingroup
|
||||
\obeylines\obeyspaces\parskip0pt\tt}
|
||||
{\obeyspaces\global\let =\ }
|
||||
\def\endexample{\endgroup}
|
||||
|
||||
% key - definition of a key.
|
||||
% \key{description of key}{key-name}
|
||||
% prints the description left-justified, and the key-name in a \kbd
|
||||
% form near the right margin.
|
||||
\def\key#1#2{\leavevmode\hbox to \hsize{\vtop
|
||||
{\hsize=.75\hsize\rightskip=1em
|
||||
\hskip\keyindent\relax#1}\kbd{#2}\hfil}}
|
||||
|
||||
\newbox\metaxbox
|
||||
\setbox\metaxbox\hbox{\kbd{M-x }}
|
||||
\newdimen\metaxwidth
|
||||
\metaxwidth=\wd\metaxbox
|
||||
|
||||
% metax - definition of a M-x command.
|
||||
% \metax{description of command}{M-x command-name}
|
||||
% Tries to justify the beginning of the command name at the same place
|
||||
% as \key starts the key name. (The "M-x " sticks out to the left.)
|
||||
\def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
|
||||
{\hskip\keyindent\relax#1\hfil}%
|
||||
\hskip -\metaxwidth minus 1fil
|
||||
\kbd{#2}\hfil}}
|
||||
|
||||
% threecol - like "key" but with two key names.
|
||||
% for example, one for doing the action backward, and one for forward.
|
||||
\def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\hfil\quad
|
||||
&\kbd{#3}\hfil\quad\cr}
|
||||
|
||||
% I cannot figure out how to make all dired-x
|
||||
% commands fit on a page in two-column format
|
||||
\def\dx{{\bf (DX)}}
|
||||
|
||||
\nopagenumbers
|
||||
|
||||
%**end of header
|
||||
|
||||
|
||||
\title{Tarjeta de referencia de Dired}
|
||||
|
||||
\centerline{(basado en Dired de la version \versionemacs{} de GNU Emacs)}
|
||||
\centerline{Los comandos marcados con \dx{} requieren de dired-x}
|
||||
|
||||
% trim this down to fit everything on one page
|
||||
% \section{General}
|
||||
% In dired, you can edit a list of the files in a directory (and optionally
|
||||
% its subdirectories in the `ls -lR' format).
|
||||
|
||||
% Editing a directory means that you can visit, rename, copy, compress,
|
||||
% load, byte-compile files. You can change files' attributes, run shell
|
||||
% commands on files, or insert subdirectories into the edit buffer. You can
|
||||
% "flag" files for deletion or "mark" files for later commands, either one
|
||||
% file at a time or by all files matching certain criteria (e.g., files that
|
||||
% match a certain regexp).
|
||||
|
||||
% You move throughout the buffer using the usual cursor motion commands.
|
||||
% Letters no longer insert themselves, but execute commands instead. The
|
||||
% digits (0-9) are prefix arguments.
|
||||
|
||||
% Most commands operate either on all marked files or on the current file if
|
||||
% no files are marked. Use a numeric prefix argument to operate on the next
|
||||
% ARG files (or previous ARG if ARG $<$ 0). Use the prefix argument `1' to
|
||||
% operate on the current file only. Prefix arguments override marks. Commands
|
||||
% which run a sub-process on a group of files will display a list of files
|
||||
% for which the sub-process failed. Typing y will try to tell
|
||||
% you what went wrong.
|
||||
|
||||
% When editing several directories in one buffer, each directory acts as a
|
||||
% page, so C-x [ and C-x ] can be used to move between directories.
|
||||
|
||||
\section{Entrando y Saliendo de Dired}
|
||||
|
||||
\key{ejecutar dired}{C-x d}
|
||||
\key{entrar con dired al directorio del archivo que est{\'a}s editando}{C-x C-j \dx}
|
||||
\key{salir de dired}{q}
|
||||
|
||||
\section{Comandos de movimiento}
|
||||
|
||||
\key{subir a la l{\'i}nea anterior}{p}
|
||||
\key{bajar a la siguiente l{\'i}nea}{n}
|
||||
\key{subir a la l{\'i}nea de la carpeta anterior}{<}
|
||||
\key{bajar a la l{\'i}nea de la siguiente carpeta}{>}
|
||||
\key{subir al anterior archivo marcado}{M-\{}
|
||||
\key{bajar al siguiente archivo marcado}{M-\}}
|
||||
\key{subir al subdirectorio anterior}{M-C-p}
|
||||
\key{bajar al siguiente subdirectorio}{M-C-n}
|
||||
\key{moverse al directorio principal}{^}
|
||||
\key{moverse al primer subdirectorio secundario}{M-C-d}
|
||||
|
||||
\section{Comandos para el Rat{\'o}n (Mouse)}
|
||||
\metax{visitar archivo o directorio}{Mouse_Button_2 (bot{\'o}n central)}
|
||||
|
||||
\section{Acciones inmediatas sobre los archivos}
|
||||
|
||||
\key{abrir archivo actual}{f}
|
||||
\key{ver archivo actual}{v}
|
||||
\key{abrir archivo actual en otra ventana}{o}
|
||||
%% Huh?
|
||||
%% \key{visit current file in other frame}{w}
|
||||
%% Huh?
|
||||
%%\key{display current file}{C-u o}
|
||||
\key{crear un subdirectorio nuevo}{+}
|
||||
\key{comparar archivo del cursor con el otro marcado}{=}
|
||||
|
||||
\section{Seleccionar y Deseleccionar Archivos}
|
||||
|
||||
\key{seleccionar un archivo o subdirectorio para comandos posteriores}{m}
|
||||
\key{deseleccionar un archivo o todos los archivos de un subdirectorio}{u}
|
||||
\key{deseleccionar todos los archivos seleccionados en un buffer}{M-delete}
|
||||
\key{seleccionar archivos con una extensi{\'o}n determinada}{* .}
|
||||
\key{seleccionar todos los directorios}{* /}
|
||||
\key{seleccionar todos los enlaces simb{\'o}licos}{* @}
|
||||
\key{seleccionar todos los ejecutables}{* *}
|
||||
\key{invertir selecci{\'o}n}{t}
|
||||
\key{seleccionar todos los archivos en el subdirectorio actual}{* s}
|
||||
\key{seleccionar los nombres de archivos que coinciden con una expresi{\'o}n regular}{* \%}
|
||||
\key{cambiar las selecciones a un car{\'a}cter diferente}{* c}
|
||||
\key{seleccionar archivos para los cuales la expresi{\'o}n Elisp retorne t}{* ( \dx}
|
||||
|
||||
\shortcopyrightnotice
|
||||
\section{Modificaci{\'o}n del buffer Dired}
|
||||
|
||||
\key{insertar un subdirectorio en este buffer}{i}
|
||||
\key{eliminar archivos seleccionados}{k}
|
||||
\key{eliminar un archivo o directorio inmediatamente}{C-u k}
|
||||
\key{volver a leer todos los directorios (conserva todas las selecciones)}{g}
|
||||
\key{alternar el orden del subdirectorio actual por nombre/fecha}{s}
|
||||
\key{editar los argumentos de ls}{C-u s}
|
||||
\key{deshacer acci{\'o}n (restaurar selecci{\'o}n, l{\'i}neas ocultas
|
||||
y dem{\'a}s)}{C-_}
|
||||
\key{ocultar todos los subdirectorios}{M-\$}
|
||||
\key{mostrar u ocultar subdirectorio}{\$}
|
||||
|
||||
\section{Comandos en Archivos Marcados o especificados por el Prefijo}
|
||||
|
||||
\key{copiar archivo(s)}{C}
|
||||
\key{cambiar nombre a archivo o moverlo a otro directorio}{R}
|
||||
\key{cambiar propiedad del(los) archivo(s)}{O}
|
||||
\key{cambiar el grupo del(los) archivo(s)}{G}
|
||||
\key{cambiar el modo del(los) archivo(s)}{M}
|
||||
\key{imprimir archivo(s)}{P}
|
||||
\key{convertir nombre del(los) archivo(s)}{\% l}
|
||||
\key{a min{\'u}sculas}{}
|
||||
\key{convertir nombre del(los) archivo(s)}{\% u}
|
||||
\key{a may{\'u}sculas}{}
|
||||
\key{eliminar archivo(s) seleccionado(s) (en contraposici{\'o}n a marcados
|
||||
para eliminaci{\'o}n)}{D}
|
||||
%% Huh?
|
||||
%%\key{uuencode or uudecode file(s)}{U}
|
||||
\key{comprimir o descomprimir archivo(s)}{Z}
|
||||
%% Only uses the current file.
|
||||
\key{ejecutar info en archivo}{I \dx}
|
||||
\key{crear enlace(s) simb{\'o}lico(s)}{S}
|
||||
\key{crear enlace(s) simb{\'o}lico(s) relativos}{Y}
|
||||
\key{crear enlace(s) duro(s) (hard link)}{H}
|
||||
\key{buscar archivos con una expresi{\'o}n regular}{A}
|
||||
\key{buscar y remplazar con una expresi{\'o}n regular sobre los archivos
|
||||
seleccionados}{Q}
|
||||
\key{compilar a bytes este archivo(s)}{B}
|
||||
\key{cargar archivo(s)}{L}
|
||||
\key{ejecutar comando de shell en este archivo(s)}{!}
|
||||
\key{ejecutar asincr{\'o}nicamente comando de shell en este(estos) archivo(s)}{\&}
|
||||
|
||||
\section{Marcar archivos para Eliminaci{\'o}n}
|
||||
\leftline{\bf Los comandos de deselecci{\'o}n remueve las marcas de eliminaci{\'o}n}
|
||||
\key{marcar archivo para eliminaci{\'o}n}{d}
|
||||
%% Huh?
|
||||
%%\key{backup and remove deletion flag}{delete}
|
||||
\key{marcar todos los archivos de respaldo (los nombres de archivos que
|
||||
terminan en \~{})}{\~{}}
|
||||
\key{marcar los archivos de guardado autom{\'a}tico}{\#}
|
||||
\key{marcar varios archivos intermedios}{\% \&}
|
||||
\key{marcar archivos de respaldo num{\'e}ricos (terminando en .\~{}1\~{}, .\~{}2\~{}, etc.)}{.}
|
||||
\key{eliminar todos los archivos marcados para eliminaci{\'o}n}{x}
|
||||
\key{marcar archivos que coinciden con la expresi{\'o}n regular}{\% d}
|
||||
|
||||
\section{Comandos de Expresiones Regulares}
|
||||
|
||||
\key{seleccionar nombres de archivos que coinciden con una expresi{\'o}n
|
||||
regular}{\% m}
|
||||
\key{copiar archivos seleccionados por una expresi{\'o}n regular}{\% C}
|
||||
\key{renombrar archivos marcados por una expresi{\'o}n regular}{\% R}
|
||||
\key{hacer un enlace duro (hardlink)}{\% H}
|
||||
\key{hacer un enlace simb{\'o}lico}{\% S}
|
||||
\key{hacer un enlace simb{\'o}lico, con rutas relativas}{\% Y}
|
||||
\key{seleccionar para eliminar}{\% d}
|
||||
|
||||
\newcolumn
|
||||
\title{Tarjeta de referencia de Dired}
|
||||
|
||||
\section{Dired y Find}
|
||||
\metax{encontrar con find archivo(s) cuyo}{M-x find-name-dired}
|
||||
\key{nombre coincida con un patr{\'o}n}{}
|
||||
\metax{encontrar con find archivo(s) cuyo}{M-x find-grep-dired}
|
||||
\key{nombre contenga un patr{\'o}n}{}
|
||||
\metax{encontrar con find archivo(s) basado}{M-x find-dired}
|
||||
\key{en la salida de \kbd{find}}{}
|
||||
|
||||
\section{Obtener Ayuda}
|
||||
|
||||
\key{ayuda de dired}{h}
|
||||
\key{resumen de instrucciones (ayuda breve) y registro de errores}{?}
|
||||
|
||||
\copyrightnotice
|
||||
|
||||
\bye
|
||||
716
etc/refcards/es-refcard.tex
Normal file
716
etc/refcards/es-refcard.tex
Normal file
|
|
@ -0,0 +1,716 @@
|
|||
% Reference Card for GNU Emacs
|
||||
|
||||
% Copyright (C) 2025 Free Software Foundation, Inc.
|
||||
|
||||
% Author: Stephen Gildea <stepheng+emacs@gildea.com>
|
||||
% Spanish translation: Elias Gabriel Perez <eg642616@gmail.com>
|
||||
|
||||
% This document 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.
|
||||
|
||||
% As a special additional permission, you may distribute reference cards
|
||||
% printed, or formatted for printing, with the notice "Released under
|
||||
% the terms of the GNU General Public License version 3 or later"
|
||||
% instead of the usual distributed-under-the-GNU-GPL notice, and without
|
||||
% a copy of the GPL itself.
|
||||
|
||||
% This document 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/>.
|
||||
|
||||
|
||||
% This file is intended to be processed by plain TeX (TeX82).
|
||||
%
|
||||
% The final reference card has six columns, three on each side.
|
||||
% This file can be used to produce it in any of three ways:
|
||||
% 1 column per page
|
||||
% produces six separate pages, each of which needs to be reduced to 80%.
|
||||
% This gives the best resolution.
|
||||
% 2 columns per page
|
||||
% produces three already-reduced pages.
|
||||
% You will still need to cut and paste.
|
||||
% 3 columns per page
|
||||
% produces two pages which must be printed sideways to make a
|
||||
% ready-to-use 8.5 x 11 inch reference card.
|
||||
% For this you need a dvi device driver that can print sideways.
|
||||
% Which mode to use is controlled by setting \columnsperpage.
|
||||
%
|
||||
% To compile and print this document:
|
||||
% tex refcard.tex
|
||||
% dvips -t landscape refcard.dvi
|
||||
|
||||
% Thanks to Cecilio Pardo, Mauro Aranda and Stephen Berman for
|
||||
% the suggestions.
|
||||
|
||||
%**start of header
|
||||
\newcount\columnsperpage
|
||||
\newcount\letterpaper
|
||||
|
||||
% This file can be printed with 1, 2, or 3 columns per page.
|
||||
% Specify how many you want here.
|
||||
\columnsperpage=3
|
||||
|
||||
% Set letterpaper to 0 for A4 paper, 1 for letter (US) paper. Useful
|
||||
% only when columnsperpage is 2 or 3.
|
||||
\letterpaper=1
|
||||
|
||||
% PDF output layout. 0 for A4, 1 for letter (US), a `l' is added for
|
||||
% a landscape layout.
|
||||
\input pdflayout.sty
|
||||
\pdflayout=(1l)
|
||||
|
||||
% Nothing else needs to be changed below this line.
|
||||
|
||||
\input emacsver.tex
|
||||
|
||||
\def\shortcopyrightnotice{\vskip 1ex plus 2 fill
|
||||
\centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
|
||||
Permissions on back.}}
|
||||
|
||||
\def\copyrightnotice{
|
||||
\vskip 1ex plus 2 fill\begingroup\small
|
||||
\centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.}
|
||||
\centerline{For GNU Emacs version \versionemacs}
|
||||
\centerline{Designed by Stephen Gildea}
|
||||
\centerline{Translated by Elias Gabriel P{\'e}rez}
|
||||
|
||||
Released under the terms of the GNU General Public License version 3 or later.
|
||||
|
||||
For more Emacs documentation, and the \TeX{} source for this card,
|
||||
see the Emacs distribution, or {\tt https://www.gnu.org/software/emacs}
|
||||
\endgroup}
|
||||
|
||||
% make \bye not \outer so that the \def\bye in the \else clause below
|
||||
% can be scanned without complaint.
|
||||
\def\bye{\par\vfill\supereject\end}
|
||||
|
||||
\newdimen\intercolumnskip %horizontal space between columns
|
||||
\newbox\columna %boxes to hold columns already built
|
||||
\newbox\columnb
|
||||
|
||||
\def\ncolumns{\the\columnsperpage}
|
||||
|
||||
\message{[\ncolumns\space
|
||||
column\if 1\ncolumns\else s\fi\space per page]}
|
||||
|
||||
\def\scaledmag#1{ scaled \magstep #1}
|
||||
|
||||
% This multi-way format was designed by Stephen Gildea October 1986.
|
||||
% Note that the 1-column format is fontfamily-independent.
|
||||
\if 1\ncolumns %one-column format uses normal size
|
||||
\hsize 4in
|
||||
\vsize 10in
|
||||
\voffset -.7in
|
||||
\font\titlefont=\fontname\tenbf \scaledmag3
|
||||
\font\headingfont=\fontname\tenbf \scaledmag2
|
||||
\font\smallfont=\fontname\sevenrm
|
||||
\font\smallsy=\fontname\sevensy
|
||||
|
||||
\footline{\hss\folio}
|
||||
\def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}
|
||||
\else %2 or 3 columns uses prereduced size
|
||||
\hsize 3.2in
|
||||
\if 1\the\letterpaper
|
||||
\vsize 7.95in
|
||||
\else
|
||||
\vsize 7.65in
|
||||
\fi
|
||||
\hoffset -.75in
|
||||
\voffset -.745in
|
||||
\font\titlefont=cmbx10 \scaledmag2
|
||||
\font\headingfont=cmbx10 \scaledmag1
|
||||
\font\smallfont=cmr6
|
||||
\font\smallsy=cmsy6
|
||||
\font\eightrm=cmr8
|
||||
\font\eightbf=cmbx8
|
||||
\font\eightit=cmti8
|
||||
\font\eighttt=cmtt8
|
||||
\font\eightmi=cmmi8
|
||||
\font\eightsy=cmsy8
|
||||
\textfont0=\eightrm
|
||||
\textfont1=\eightmi
|
||||
\textfont2=\eightsy
|
||||
\def\rm{\eightrm}
|
||||
\def\bf{\eightbf}
|
||||
\def\it{\eightit}
|
||||
\def\tt{\eighttt}
|
||||
\if 1\the\letterpaper
|
||||
\normalbaselineskip=.8\normalbaselineskip
|
||||
\else
|
||||
\normalbaselineskip=.7\normalbaselineskip
|
||||
\fi
|
||||
\normallineskip=.8\normallineskip
|
||||
\normallineskiplimit=.8\normallineskiplimit
|
||||
\normalbaselines\rm %make definitions take effect
|
||||
|
||||
\if 2\ncolumns
|
||||
\let\maxcolumn=b
|
||||
\footline{\hss\rm\folio\hss}
|
||||
\def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
|
||||
\else \if 3\ncolumns
|
||||
\let\maxcolumn=c
|
||||
\nopagenumbers
|
||||
\else
|
||||
\errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
|
||||
\errmessage{Illegal number of columns per page}
|
||||
\fi\fi
|
||||
|
||||
\intercolumnskip=.46in
|
||||
\def\abc{a}
|
||||
\output={% %see The TeXbook page 257
|
||||
% This next line is useful when designing the layout.
|
||||
%\immediate\write16{Column \folio\abc\space starts with \firstmark}
|
||||
\if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
|
||||
\else\if a\abc
|
||||
\global\setbox\columna\columnbox \global\def\abc{b}
|
||||
%% in case we never use \columnb (two-column mode)
|
||||
\global\setbox\columnb\hbox to -\intercolumnskip{}
|
||||
\else
|
||||
\global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
|
||||
\def\multicolumnformat{\shipout\vbox{\makeheadline
|
||||
\hbox{\box\columna\hskip\intercolumnskip
|
||||
\box\columnb\hskip\intercolumnskip\columnbox}
|
||||
\makefootline}\advancepageno}
|
||||
\def\columnbox{\leftline{\pagebody}}
|
||||
|
||||
\def\bye{\par\vfill\supereject
|
||||
\if a\abc \else\null\vfill\eject\fi
|
||||
\if a\abc \else\null\vfill\eject\fi
|
||||
\end}
|
||||
\fi
|
||||
|
||||
% we won't be using math mode much, so redefine some of the characters
|
||||
% we might want to talk about
|
||||
\catcode`\^=12
|
||||
\catcode`\_=12
|
||||
|
||||
\chardef\\=`\\
|
||||
\chardef\{=`\{
|
||||
\chardef\}=`\}
|
||||
|
||||
\hyphenation{mini-buf-fer}
|
||||
|
||||
\parindent 0pt
|
||||
\parskip 1ex plus .5ex minus .5ex
|
||||
|
||||
\def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
|
||||
|
||||
% newcolumn - force a new column. Use sparingly, probably only for
|
||||
% the first column of a page, which should have a title anyway.
|
||||
\outer\def\newcolumn{\vfill\eject}
|
||||
|
||||
% title - page title. Argument is title text.
|
||||
\outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}
|
||||
|
||||
% section - new major section. Argument is section name.
|
||||
\outer\def\section#1{\par\filbreak
|
||||
\vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}%
|
||||
\vskip 2ex plus 1ex minus 1.5ex}
|
||||
|
||||
\newdimen\keyindent
|
||||
|
||||
% beginindentedkeys...endindentedkeys - key definitions will be
|
||||
% indented, but running text, typically used as headings to group
|
||||
% definitions, will not.
|
||||
\def\beginindentedkeys{\keyindent=1em}
|
||||
\def\endindentedkeys{\keyindent=0em}
|
||||
\endindentedkeys
|
||||
|
||||
% paralign - begin paragraph containing an alignment.
|
||||
% If an \halign is entered while in vertical mode, a parskip is never
|
||||
% inserted. Using \paralign instead of \halign solves this problem.
|
||||
\def\paralign{\vskip\parskip\halign}
|
||||
|
||||
% \<...> - surrounds a variable name in a code example
|
||||
\def\<#1>{{\it #1\/}}
|
||||
|
||||
% kbd - argument is characters typed literally. Like the Texinfo command.
|
||||
\def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows
|
||||
|
||||
% beginexample...endexample - surrounds literal text, such a code example.
|
||||
% typeset in a typewriter font with line breaks preserved
|
||||
\def\beginexample{\par\leavevmode\begingroup
|
||||
\obeylines\obeyspaces\parskip0pt\tt}
|
||||
{\obeyspaces\global\let =\ }
|
||||
\def\endexample{\endgroup}
|
||||
|
||||
% key - definition of a key.
|
||||
% \key{description of key}{key-name}
|
||||
% prints the description left-justified, and the key-name in a \kbd
|
||||
% form near the right margin.
|
||||
\def\key#1#2{\leavevmode\hbox to \hsize{\vtop
|
||||
{\hsize=.75\hsize\rightskip=1em
|
||||
\hskip\keyindent\relax#1}\kbd{#2}\hfil}}
|
||||
|
||||
\newbox\metaxbox
|
||||
\setbox\metaxbox\hbox{\kbd{M-x }}
|
||||
\newdimen\metaxwidth
|
||||
\metaxwidth=\wd\metaxbox
|
||||
|
||||
% metax - definition of a M-x command.
|
||||
% \metax{description of command}{M-x command-name}
|
||||
% Tries to justify the beginning of the command name at the same place
|
||||
% as \key starts the key name. (The "M-x " sticks out to the left.)
|
||||
\def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
|
||||
{\hskip\keyindent\relax#1\hfil}%
|
||||
\hskip -\metaxwidth minus 1fil
|
||||
\kbd{#2}\hfil}}
|
||||
|
||||
% threecol - like "key" but with two key names.
|
||||
% for example, one for doing the action backward, and one for forward.
|
||||
\def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\hfil\quad
|
||||
&\kbd{#3}\hfil\quad\cr}
|
||||
|
||||
%**end of header
|
||||
|
||||
|
||||
\title{GNU Emacs: Tarjeta de referencia}
|
||||
|
||||
\centerline{(para la versi{\'o}n: \versionemacs)}
|
||||
|
||||
\section{Notaci{\'o}n de combinaciones de teclas}
|
||||
|
||||
Las notaciones de combinaciones de teclas en Emacs, \kbd{C-x}
|
||||
es \kbd{Ctrl+X}; \kbd{M-x} es usualmente \kbd{Alt+X}; \kbd{S-x} es
|
||||
\kbd{Shift+X}; y \kbd{C-M-x} es \kbd{Ctrl+Alt+X}, etc.
|
||||
|
||||
\section{Saliendo de Emacs}
|
||||
|
||||
\key{minimizar (o suspender en la terminal)}{C-z}
|
||||
\key{cerrar Emacs}{C-x C-c}
|
||||
|
||||
\section{Archivos}
|
||||
|
||||
\key{{\bf abrir} un archivo en Emacs}{C-x C-f}
|
||||
\key{{\bf guardar} un archivo (en el disco)}{C-x C-s}
|
||||
\key{guardar {\bf todos} los archivos}{C-x s}
|
||||
\key{{\bf insertar} contenidos de otro archivo en este buffer}{C-x i}
|
||||
\key{remplazar archivo por otro}{C-x C-v}
|
||||
\key{guardar buffer a un archivo en especifico}{C-x C-w}
|
||||
\key{alternar el estado de solo-lectura del buffer}{C-x C-q}
|
||||
|
||||
\section{Obtener Ayuda}
|
||||
|
||||
El sistema de ayuda es simple. Teclee \kbd{C-h} (o \kbd{F1}) y siga
|
||||
las opciones. Si est{\'a} usted empezando, teclee \kbd{C-h t} para ir al
|
||||
{\bf tutorial}.
|
||||
|
||||
\key{quitar ventana de ayuda}{C-x 1}
|
||||
\key{desplazarse por la ventana de ayuda}{C-M-v}
|
||||
|
||||
\key{apropos: mostrar comandos que coinciden con una cadena caracteres (string)}{C-h a}
|
||||
\key{describir la funci{\'o}n asociada a una tecla}{C-h k}
|
||||
\key{describir una funci{\'o}n}{C-h f}
|
||||
\key{obtener informaci{\'o}n espec{\'i}fica del modo}{C-h m}
|
||||
|
||||
\section{Recuperaci{\'o}n de errores}
|
||||
|
||||
\key{{\bf abortar} acci{\'o}n o un comando ejecut{\'a}ndose}{C-g}
|
||||
\metax{{\bf recuperar} archivos perdidos}{M-x recover-session}
|
||||
\key{por cierre inesperado}{}
|
||||
\metax{{\bf deshacer} un cambio no deseado}{C-x u, C-_ {\rm o} C-/}
|
||||
\metax{restaurar buffer a su contenido actual}{M-x revert-buffer}
|
||||
\key{recentrar pantalla}{C-l}
|
||||
|
||||
\section{B{\'u}squeda incremental}
|
||||
|
||||
\key{buscar hacia adelante}{C-s}
|
||||
\key{buscar hacia atr{\'a}s}{C-r}
|
||||
\key{buscar una expresi{\'o}n regular}{C-M-s}
|
||||
\key{buscar inversamente una expresi{\'o}n regular}{C-M-r}
|
||||
|
||||
\key{seleccionar anterior cadena de caracteres de la b{\'u}squeda}{M-p}
|
||||
\key{seleccionar siguiente cadena de caracteres de la b{\'u}squeda}{M-n}
|
||||
\key{salir de la b{\'u}squeda incremental}{RET}
|
||||
\key{deshacer efecto del {\'u}ltimo car{\'a}cter}{DEL}
|
||||
\key{abortar b{\'u}squeda actual}{C-g}
|
||||
|
||||
Usa \kbd{C-s} o \kbd{C-r} de nuevo para repetir la b{\'u}squeda en cualquier posici{\'o}n.
|
||||
Si Emacs sigue buscando, \kbd{C-g} cancela solo la parte no coincidente.
|
||||
|
||||
\shortcopyrightnotice
|
||||
|
||||
\newcolumn
|
||||
\section{Movimiento}
|
||||
|
||||
\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
|
||||
\threecol{{\bf entidad a trasladar}}{{\bf atr{\'a}s}}{{\bf adelante}}
|
||||
\threecol{car{\'a}cter}{C-b}{C-f}
|
||||
\threecol{palabra}{M-b}{M-f}
|
||||
\threecol{l{\'i}nea}{C-p}{C-n}
|
||||
\threecol{ir al comienzo de la l{\'i}nea (o hacia al final)}{C-a}{C-e}
|
||||
\threecol{oraci{\'o}n}{M-a}{M-e}
|
||||
\threecol{p{\'a}rrafo}{M-\{}{M-\}}
|
||||
\threecol{p{\'a}gina}{C-x [}{C-x ]}
|
||||
\threecol{expresi{\'o}n s (sexp)}{C-M-b}{C-M-f}
|
||||
\threecol{funci{\'o}n}{C-M-a}{C-M-e}
|
||||
\threecol{ir al comienzo del buffer (o hacia al final)}{M-<}{M->}
|
||||
}
|
||||
|
||||
\key{desplazarse hacia la siguiente pantalla}{C-v}
|
||||
\key{desplazarse hacia la anterior pantalla}{M-v}
|
||||
\key{desplazarse hacia la izquierda}{C-x <}
|
||||
\key{desplazarse hacia la derecha}{C-x >}
|
||||
\key{desplazar l{\'i}nea actual hacia el centro, arriba o abajo}{C-l}
|
||||
|
||||
\key{ir hacia una l{\'i}nea}{M-g g}
|
||||
\key{ir hacia un car{\'a}cter}{M-g c}
|
||||
\key{volver a la sangr{\'i}a}{M-m}
|
||||
|
||||
\section{Cortar y Eliminar}
|
||||
|
||||
\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
|
||||
\threecol{{\bf entidad a cortar}}{{\bf hacia atr{\'a}s}}{{\bf hacia adelante}}
|
||||
\threecol{car{\'a}cter (eliminar, no cortar)}{DEL}{C-d}
|
||||
\threecol{palabra}{M-DEL}{M-d}
|
||||
\threecol{l{\'i}nea (hasta el final)}{M-0 C-k}{C-k}
|
||||
\threecol{sentencia}{C-x DEL}{M-k}
|
||||
\threecol{expresi{\'o}n s (sexp)}{M-- C-M-k}{C-M-k}
|
||||
}
|
||||
|
||||
\key{cortar {\bf regi{\'o}n}}{C-w}
|
||||
\key{copiar regi{\'o}n}{M-w}
|
||||
\key{cortar a la siguiente ocurrencia del {\it car{\'a}cter}}{M-z {\it car{\'a}cter}}
|
||||
|
||||
\key{pegar de nuevo lo {\'u}ltimo que se cort{\'o}}{C-y}
|
||||
\key{remplazar pegado reci{\'e}n con lo {\'u}ltimo que se cort{\'o}}{M-y}
|
||||
|
||||
\section{Selecci{\'o}n}
|
||||
|
||||
\key{poner selecci{\'o}n aqu{\'i}}{C-@ {\rm o} C-SPC}
|
||||
\key{intercambiar la posici{\'o}n del cursor y de la selecci{\'o}n}{C-x C-x}
|
||||
|
||||
\key{poner selecci{\'o}n {\it arg\/} {\bf palabras} delante}{M-@}
|
||||
\key{seleccionar {\bf p{\'a}rrafo}}{M-h}
|
||||
\key{seleccionar {\bf p{\'a}gina}}{C-x C-p}
|
||||
\key{seleccionar {\bf sexp}}{C-M-@}
|
||||
\key{seleccionar {\bf funci{\'o}n}}{C-M-h}
|
||||
\key{seleccionar todo el {\bf buffer}}{C-x h}
|
||||
|
||||
\section{Buscar y Reemplazar}
|
||||
|
||||
\key{remplazar interactivamente un texto (string)}{M-\%}
|
||||
% query-replace-regexp is bound to C-M-% but that can't be typed on
|
||||
% consoles.
|
||||
\metax{usando expresiones regulares}{M-x query-replace-regexp}
|
||||
|
||||
Las respuestas v{\'a}lidas en el modo query-replace son:
|
||||
|
||||
\key{{\bf remplazar} este, ve hacia el siguiente}{SPC {\rm o} y}
|
||||
\key{remplazar este, no te muevas}{,}
|
||||
\key{{\bf saltar} al siguiente sin remplazar}{DEL {\rm or} n}
|
||||
\key{remplazar todas las coincidencias restantes}{!}
|
||||
\key{{\bf volver} a la coincidencia anterior}{^}
|
||||
\key{{\bf salir} de query-replace}{RET}
|
||||
\key{editar recursivamente(\kbd{C-M-c} para salir)}{C-r}
|
||||
|
||||
\newcolumn
|
||||
\section{M{\'u}ltiple Ventanas}
|
||||
|
||||
Cuando dos comandos son mostrados, el segundo es un comando similar para
|
||||
un frame que para una ventana.
|
||||
|
||||
{\setbox0=\hbox{\kbd{0}}\advance\hsize by 0\wd0
|
||||
\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
|
||||
\threecol{eliminar todas las otras ventanas}{C-x 1\ \ \ \ }{C-x 5 1}
|
||||
\threecol{dividir ventana, por debajo y encima}{C-x 2\ \ \ \ }{C-x 5 2}
|
||||
\threecol{eliminar esta ventana}{C-x 0\ \ \ \ }{C-x 5 0}
|
||||
}}
|
||||
\key{dividir ventana a la mitad}{C-x 3}
|
||||
|
||||
\key{desplazar otra ventana}{C-M-v}
|
||||
|
||||
{\setbox0=\hbox{\kbd{0}}\advance\hsize by 0\wd0
|
||||
\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
|
||||
\threecol{cambiar cursor a otra ventana}{C-x o}{C-x 5 o}
|
||||
|
||||
\threecol{seleccionar buffer en otra ventana}{C-x 4 b}{C-x 5 b}
|
||||
\threecol{mostrar buffer en otra ventana}{C-x 4 C-o}{C-x 5 C-o}
|
||||
\threecol{buscar archivo en otra ventana}{C-x 4 f}{C-x 5 f}
|
||||
\threecol{buscar archivo de solo-lectura}{C-x 4 r}{C-x 5 r}
|
||||
\threecol{en otra ventana}{}{}
|
||||
\threecol{abrir Dired en otra ventana}{C-x 4 d}{C-x 5 d}
|
||||
\threecol{buscar etiqueta en otra ventana}{C-x 4 .}{C-x 5 .}
|
||||
}}
|
||||
|
||||
\key{hacer la ventana m{\'a}s alta}{C-x ^}
|
||||
\key{hacer la ventana m{\'a}s estrecha}{C-x \{}
|
||||
\key{hacer la ventana m{\'a}s ancha}{C-x \}}
|
||||
|
||||
\section{Formato y Sangr{\'i}as}
|
||||
|
||||
\key{sangrar {\bf l{\'i}nea} actual (dependiente del modo)}{TAB}
|
||||
\key{sangrar {\bf regi{\'o}n} (dependiente del modo)}{C-M-\\}
|
||||
\key{sangrar {\bf sexp} (dependiente del modo)}{C-M-q}
|
||||
\key{sangrar regi{\'o}n r{\'i}gidamente en {\it arg\/} columnas}{C-x TAB}
|
||||
\key{sangrar para comentar}{M-;}
|
||||
|
||||
\key{insertar una nueva l{\'i}nea delante del cursor}{C-o}
|
||||
\key{mover resto de la l{\'i}nea verticalmente hacia abajo}{C-M-o}
|
||||
\key{eliminar l{\'i}neas en blanco alrededor del cursor}{C-x C-o}
|
||||
\key{unir l{\'i}nea con la anterior (con arg, next)}{M-^}
|
||||
\key{eliminar todos los espacios en blanco alrededor del cursor}{M-\\}
|
||||
\key{poner exactamente un espacio en el cursor}{M-SPC}
|
||||
|
||||
\key{rellenar p{\'a}rrafo}{M-q}
|
||||
\key{establecer la columna de relleno en {\it arg}}{C-x f}
|
||||
\key{establecer el prefijo con el que comienza cada l{\'i}nea}{C-x .}
|
||||
|
||||
\section{Cambio de Case}
|
||||
|
||||
\key{poner la palabra en may{\'u}sculas}{M-u}
|
||||
\key{poner la palabra en min{\'u}sculas}{M-l}
|
||||
\key{poner la palabra con may{\'u}scula inicial}{M-c}
|
||||
|
||||
\key{poner la regi{\'o}n en may{\'u}sculas}{C-x C-u}
|
||||
\key{poner la regi{\'o}n en min{\'u}sculas}{C-x C-l}
|
||||
|
||||
\newcolumn
|
||||
\title{GNU Emacs: Tarjeta de referencia}
|
||||
|
||||
\section{El Minibuffer}
|
||||
|
||||
Las siguientes teclas est{\'a}n definidas en el minibuffer.
|
||||
|
||||
\key{completar tanto sea posible}{TAB}
|
||||
\key{completar hasta una palabra}{SPC}
|
||||
\key{completar y ejecutar}{RET}
|
||||
\key{mostrar posibles candidatos}{?}
|
||||
\key{recuperar la entrada anterior del minibuffer}{M-p}
|
||||
\key{recuperar la entrada posterior del minibuffer o la predeterminada}{M-n}
|
||||
\key{buscar hacia atr{\'a}s con regexp a trav{\'e}s del historial}{M-r}
|
||||
\key{buscar hacia adelante con regexp a trav{\'e}s del historial}{M-s}
|
||||
\key{abortar comando}{C-g}
|
||||
|
||||
Presiona \kbd{C-x ESC ESC} para editar y repetir el {\'u}ltimo comando que us{\'o}
|
||||
el minibuffer. Presiona \kbd{F10} para activar los elementos de la barra del
|
||||
men{\'u} en terminales de texto.
|
||||
|
||||
\section{buffers}
|
||||
|
||||
\key{seleccionar otro buffer}{C-x b}
|
||||
\key{listar todos los buffers}{C-x C-b}
|
||||
\key{eliminar un buffer}{C-x k}
|
||||
|
||||
\section{Transponiendo}
|
||||
|
||||
\key{transponer {\bf caracteres}}{C-t}
|
||||
\key{transponer {\bf palabras}}{M-t}
|
||||
\key{transponer {\bf l{\'i}neas}}{C-x C-t}
|
||||
\key{transponer {\bf sexps}}{C-M-t}
|
||||
|
||||
\section{Revisi{\'o}n ortogr{\'a}fica}
|
||||
|
||||
\key{comprobar ortograf{\'i}a de la presente palabra}{M-\$}
|
||||
\metax{comprobar ortograf{\'i}a de todas}{M-x ispell-region}
|
||||
\metax{las palabras en la regi{\'o}n}{}
|
||||
\metax{comprobar la ortograf{\'i}a de todo el buffer}{M-x ispell-buffer}
|
||||
\metax{alternar la revisi{\'o}n ortogr{\'a}fica}{M-x flyspell-mode}
|
||||
|
||||
\section{Etiquetas (Tags)}
|
||||
|
||||
\key{buscar una etiqueta (una definici{\'o}n)}{M-.}
|
||||
\metax{especificar un nuevo archivo}{M-x visit-tags-table}
|
||||
\metax{de etiquetas}{}
|
||||
|
||||
\metax{buscar con regexp en todos los}{M-x tags-search}
|
||||
\metax{archivos de la tabla de etiquetas}{}
|
||||
\metax{ejecutar query-replace en}{M-x tags-query-replace}
|
||||
\metax{todos los archivos}{}
|
||||
|
||||
\shortcopyrightnotice
|
||||
|
||||
\section{Shells}
|
||||
|
||||
\key{ejecutar un comando de shell}{M-!}
|
||||
\key{ejecutar un comando de shell}{M-\&}
|
||||
\key{asincr{\'o}nicamente}{}
|
||||
\key{ejecutar un comando de shell en la regi{\'o}n}{M-|}
|
||||
\key{filtrar regi{\'o}n a trav{\'e}s de un comando de shell}{C-u M-|}
|
||||
\key{iniciar un shell en una ventana \kbd{*shell*}}{M-x shell}
|
||||
|
||||
\section{Rect{\'a}ngulos}
|
||||
|
||||
\key{copiar rect{\'a}ngulo al registro}{C-x r r}
|
||||
\key{cortar rect{\'a}ngulo}{C-x r k}
|
||||
\key{pegar rect{\'a}ngulo}{C-x r y}
|
||||
\key{abrir rect{\'a}ngulo, desplazando el texto hacia la derecha}{C-x r o}
|
||||
\key{poner rect{\'a}ngulo en blanco}{C-x r c}
|
||||
\key{anteponer una cadena (string) a cada l{\'i}nea}{C-x r t}
|
||||
|
||||
\section{Abreviaturas (Abbrevs)}
|
||||
|
||||
\key{a{\~n}adir abreviatura global}{C-x a g}
|
||||
\key{a{\~n}adir abreviatura local del modo}{C-x a l}
|
||||
\key{a{\~n}adir expansi{\'o}n global}{C-x a i g}
|
||||
\key{para esta abreviatura}{}
|
||||
\key{a{\~n}adir expansi{\'o}n local del modo para est{\'a} abreviatura}{C-x a i l}
|
||||
\key{expl{\'i}citamente expandir abreviatura}{C-x a e}
|
||||
|
||||
\key{expandir palabra anterior din{\'a}micamente}{M-/}
|
||||
|
||||
\section{Miscel{\'a}neos}
|
||||
|
||||
\key{inserci{\'o}n num{\'e}rica}{C-u {\it num}}
|
||||
\key{inserci{\'o}n negativa}{M--}
|
||||
\key{inserci{\'o}n citada}{C-q {\it car}}
|
||||
|
||||
\section{Expresiones regulares}
|
||||
|
||||
\key{cualquier {\'u}nico c{\'a}racter excepto una nueva l{\'i}nea}{. {\rm(dot)}}
|
||||
\key{ninguna o m{\'a}s repeticiones}{*}
|
||||
\key{una o m{\'a}s repeticiones}{+}
|
||||
\key{ninguna o una repetici{\'o}n}{?}
|
||||
\key{proteger car{\'a}cteres especiales}{\\}
|
||||
\key{proteger car{\'a}cter especial de expresi{\'o}n regular {\it c\/}}{\\{\it c}}
|
||||
\key{alternativos (``or'')}{\\|}
|
||||
\key{agrupar}{\\( {\rm$\ldots$} \\)}
|
||||
\key{agrupaci{\'o}n t{\'i}mida}{\\(?: {\rm$\ldots$} \\)}
|
||||
\key{agrupaci{\'o}n numerada expl{\'i}cita}{\\(?NUM: {\rm$\ldots$} \\)}
|
||||
\key{mismo texto del grupo n{\'u}mero {\it n\/}}{\\{\it n}}
|
||||
\key{en el salto de palabra}{\\b}
|
||||
\key{no en el salto de palabra}{\\B}
|
||||
|
||||
\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
|
||||
\threecol{{\bf entidad}}{{\bf comienzo}}{{\bf final}}
|
||||
\threecol{l{\'i}nea}{^}{\$}
|
||||
\threecol{palabra}{\\<}{\\>}
|
||||
\threecol{s{\'i}mbolo}{\\_<}{\\_>}
|
||||
\threecol{buffer}{\\`}{\\'}
|
||||
%% FIXME: "`" and "'" isn't displayed correctly in the output PDF file
|
||||
|
||||
\threecol{{\bf clase del c{\'a}racter}}{{\bf {\'e}stas}}{{\bf otras}}
|
||||
\threecol{establecer expl{\'i}citamente}{[ {\rm$\ldots$} ]}{[^ {\rm$\ldots$} ]}
|
||||
\threecol{car{\'a}cter de sintaxis de palabra}{\\w}{\\W}
|
||||
\threecol{car{\'a}cter con sintaxis {\it c}}{\\s{\it c}}{\\S{\it c}}
|
||||
\threecol{car{\'a}cter con categor{\'i}a {\it c}}{\\c{\it c}}{\\C{\it c}}
|
||||
}
|
||||
|
||||
\section{Caracteres internacionales}
|
||||
|
||||
\key{especificar idioma principal}{C-x RET l}
|
||||
\metax{mostrar todos los m{\'e}todos}{M-x list-input-methods}
|
||||
\key{de entrada}{}
|
||||
\key{activar o desactivar el m{\'e}todo de entrada}{C-\\}
|
||||
\key{establecer el sistema de codificaci{\'o}n para el siguiente comando}{C-x RET c}
|
||||
\metax{mostrar todos los sistemas}{M-x list-coding-systems}
|
||||
\key{de codificaci{\'o}n}{}
|
||||
\metax{elegir el sistema de codificaci{\'o}n preferido}{M-x prefer-coding-system}
|
||||
|
||||
\newcolumn
|
||||
\title{GNU Emacs: Tarjeta de referencia}
|
||||
\section{Info}
|
||||
|
||||
\key{entrar al lector de documentaci{\'o}n de Info}{C-h i}
|
||||
\key{buscar funci{\'o}n o variable especificada en Info}{C-h S}
|
||||
\beginindentedkeys
|
||||
|
||||
Moverse dentro de un nodo:
|
||||
|
||||
\key{desplazarse hacia adelante}{SPC}
|
||||
\key{desplazarse en reversa}{DEL}
|
||||
\key{comienzo del nodo}{b}
|
||||
|
||||
Moverse entre nodos:
|
||||
|
||||
\key{{\bf siguiente} nodo}{n}
|
||||
\key{nodo {\bf anterior}}{p}
|
||||
\key{moverse por {\bf arriba}}{u}
|
||||
\key{seleccionar un elemento del men{\'u}}{m}
|
||||
\key{por el nombre}{}
|
||||
\key{seleccionar el elemento {\it n\/} del men{\'u}}{{\it n}}
|
||||
\key{por n{\'u}mero (1--9)}{}
|
||||
\key{seguir referencia cruzada (regresar con \kbd{l})}{f}
|
||||
\key{regresar al {\'u}ltimo nodo que viste}{l}
|
||||
\key{volver al nodo de directorio}{d}
|
||||
\key{ir al nodo superior del archivo Info}{t}
|
||||
\key{ir a cualquier nodo por nombre}{g}
|
||||
|
||||
Otros:
|
||||
|
||||
\key{ir al {\bf tutorial} de Info}{h}
|
||||
\key{buscar un tema en los {\'i}ndices}{i}
|
||||
\key{buscar nodos para expresiones regulares}{s}
|
||||
\key{{\bf salir} de Info}{q}
|
||||
\endindentedkeys
|
||||
|
||||
\section{Registros}
|
||||
|
||||
\key{guardar regi{\'o}n en el registro}{C-x r s}
|
||||
\key{insertar contenidos del registro al buffer}{C-x r i}
|
||||
|
||||
\key{guardar valor del cursor en el registro}{C-x r SPC}
|
||||
\key{saltar al punto guardado en el registro}{C-x r j}
|
||||
|
||||
\section{Macros del teclado}
|
||||
|
||||
\key{{\bf comenzar} a definir una macro}{C-x (}
|
||||
\key{{\bf terminar} la definici{\'o}n de la macro}{C-x )}
|
||||
\key{{\bf ejecutar} {\'u}ltima macro definida}{C-x e}
|
||||
\key{a{\~n}adir a la {\'u}ltima macro definida}{C-u C-x (}
|
||||
\metax{nombrar {\'u}ltima macro definida}{M-x name-last-kbd-macro}
|
||||
\metax{insertar macro como c{\'o}digo Lisp}{M-x insert-kbd-macro}
|
||||
\key{en el buffer}{}
|
||||
|
||||
\copyrightnotice
|
||||
\newcolumn
|
||||
\section{Comandos para Emacs Lisp}
|
||||
|
||||
\key{evaluar {\bf sexp} antes del cursor}{C-x C-e}
|
||||
\key{evaluar funci{\'o}n ({\bf defun}) actual}{C-M-x}
|
||||
\metax{evaluar toda la {\bf regi{\'o}n}}{M-x eval-region}
|
||||
\key{leer y evaluar en minibuffer}{M-:}
|
||||
\metax{cargar una librer{\'i}a Lisp}{M-x load-library}
|
||||
\key{desde {\bf load-path}}{}
|
||||
|
||||
\section{Personalizaci{\'o}n sencilla}
|
||||
|
||||
\metax{personalizar variables y caras}{M-x customize}
|
||||
|
||||
% The intended audience here is the person who wants to make simple
|
||||
% customizations and knows Lisp syntax.
|
||||
|
||||
Creaci{\'o}n de combinaciones de teclas globales en Emacs Lisp (ejemplos):
|
||||
|
||||
\beginexample%
|
||||
(global-set-key (kbd "C-c g") 'search-forward)
|
||||
(global-set-key (kbd "M-\#") 'query-replace-regexp)
|
||||
\endexample
|
||||
|
||||
\section{Escribiendo Comandos}
|
||||
|
||||
\beginexample%
|
||||
(defun \<nombre-del-comando> (\<args>)
|
||||
"\<documentaci{\'o}n>"
|
||||
(interactive "\<plantilla>")
|
||||
\<cuerpo-de-la-funci{\'o}n>)
|
||||
\endexample
|
||||
|
||||
Un ejemplo:
|
||||
|
||||
\beginexample%
|
||||
(defun mover-l{\'i}nea-a-la-parte-superior (l{\'i}nea)
|
||||
"Reubicar l{\'i}nea a la parte superior de la ventana.
|
||||
Con el argumento de prefijo L{\'I}NEA,
|
||||
colocar el cursor en L{\'I}NEA."
|
||||
(interactive "P")
|
||||
(recenter (if (null l{\'i}nea)
|
||||
0
|
||||
(prefix-numeric-value l{\'i}nea))))
|
||||
\endexample
|
||||
|
||||
La especificaci{\'o}n \kbd{interactive} dice como leer argumentos de
|
||||
forma interactiva.
|
||||
Presiona \kbd{C-h f interactive RET} para m{\'a}s detalles.
|
||||
|
||||
\bye
|
||||
|
||||
% Local variables:
|
||||
% compile-command: "pdftex refcard"
|
||||
% End:
|
||||
425
etc/refcards/es-survival.tex
Normal file
425
etc/refcards/es-survival.tex
Normal file
|
|
@ -0,0 +1,425 @@
|
|||
%&tex
|
||||
% Title: GNU Emacs Survival Card
|
||||
|
||||
% Copyright (C) 2025 Free Software Foundation, Inc.
|
||||
|
||||
% Author: Włodek Bzyl <matwb@univ.gda.pl>
|
||||
% Spanish translation: Elias Gabriel Perez <eg642616@gmail.com>
|
||||
|
||||
% This document 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.
|
||||
|
||||
% As a special additional permission, you may distribute reference cards
|
||||
% printed, or formatted for printing, with the notice "Released under
|
||||
% the terms of the GNU General Public License version 3 or later"
|
||||
% instead of the usual distributed-under-the-GNU-GPL notice, and without
|
||||
% a copy of the GPL itself.
|
||||
|
||||
% This document 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/>.
|
||||
|
||||
% Thanks to Cecilio Pardo, Mauro Aranda and Stephen Berman for
|
||||
% the suggestions.
|
||||
|
||||
%**start of header
|
||||
|
||||
% User interface is `plain.tex' and macros described below
|
||||
%
|
||||
% \title{CARD TITLE}{for version 23}
|
||||
% \section{NAME}
|
||||
% optional paragraphs separated with \askip amount of vertical space
|
||||
% \key{KEY-NAME} description of key or
|
||||
% \mkey{M-x LONG-LISP-NAME} description of Elisp function
|
||||
%
|
||||
% \kbd{ARG} -- argument is typed literally
|
||||
|
||||
\def\plainfmtname{plain}
|
||||
\ifx\fmtname\plainfmtname
|
||||
\else
|
||||
\errmessage{This file requires `plain' format to be typeset correctly}
|
||||
\endinput
|
||||
\fi
|
||||
|
||||
% PDF output layout. 0 for A4, 1 for letter (US), a `l' is added for
|
||||
% a landscape layout.
|
||||
\input pdflayout.sty
|
||||
\pdflayout=(1)
|
||||
|
||||
\input emacsver.tex
|
||||
|
||||
\def\copyrightnotice{\penalty-1\vfill
|
||||
\vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter
|
||||
Copyright \copyright\ \year\ Free Software Foundation, Inc.\break
|
||||
For GNU Emacs version \versionemacs\break
|
||||
Author W{\l}odek Bzyl (matwb@univ.gda.pl)
|
||||
Translated by Elias Gabriel P{\'e}rez
|
||||
|
||||
Released under the terms of the GNU General Public License
|
||||
version 3 or later.
|
||||
|
||||
For more Emacs documentation, and the \TeX{} source for this card,
|
||||
see the Emacs distribution,
|
||||
or {\tt https://www.gnu.org/software/emacs}\par}}
|
||||
|
||||
\hsize 3.2in
|
||||
\vsize 7.95in
|
||||
\font\titlefont=cmss10 scaled 1200
|
||||
\font\headingfont=cmss10
|
||||
\font\smallfont=cmr6
|
||||
\font\smallsy=cmsy6
|
||||
\font\eightrm=cmr8
|
||||
\font\eightbf=cmbx8
|
||||
\font\eightit=cmti8
|
||||
\font\eighttt=cmtt8
|
||||
\font\eightmi=cmmi8
|
||||
\font\eightsy=cmsy8
|
||||
\font\eightss=cmss8
|
||||
\textfont0=\eightrm
|
||||
\textfont1=\eightmi
|
||||
\textfont2=\eightsy
|
||||
\def\rm{\eightrm} \rm
|
||||
\def\bf{\eightbf}
|
||||
\def\it{\eightit}
|
||||
\def\tt{\eighttt}
|
||||
\def\ss{\eightss}
|
||||
\baselineskip=0.8\baselineskip
|
||||
|
||||
\newdimen\intercolumnskip % horizontal space between columns
|
||||
\intercolumnskip=0.5in
|
||||
|
||||
% The TeXbook, p. 257
|
||||
\let\lr=L \newbox\leftcolumn
|
||||
\output={\if L\lr
|
||||
\global\setbox\leftcolumn\columnbox \global\let\lr=R
|
||||
\else
|
||||
\doubleformat \global\let\lr=L\fi}
|
||||
\def\doubleformat{\shipout\vbox{\makeheadline
|
||||
\leftline{\box\leftcolumn\hskip\intercolumnskip\columnbox}
|
||||
\makefootline}
|
||||
\advancepageno}
|
||||
\def\columnbox{\leftline{\pagebody}}
|
||||
|
||||
\def\newcolumn{\vfil\eject}
|
||||
|
||||
\def\bye{\par\vfil\supereject
|
||||
\if R\lr \null\vfil\eject\fi
|
||||
\end}
|
||||
|
||||
\outer\def\title#1#2{{\titlefont\centerline{#1}}\vskip 1ex plus 0.5ex
|
||||
\centerline{\ss#2}
|
||||
\vskip2\baselineskip}
|
||||
|
||||
\outer\def\section#1{\filbreak
|
||||
\bskip
|
||||
\leftline{\headingfont #1}
|
||||
\askip}
|
||||
\def\bskip{\vskip 2.5ex plus 0.25ex }
|
||||
\def\askip{\vskip 0.75ex plus 0.25ex}
|
||||
|
||||
\newdimen\defwidth \defwidth=0.25\hsize
|
||||
\def\hang{\hangindent\defwidth}
|
||||
|
||||
\def\textindent#1{\noindent\llap{\hbox to \defwidth{\tt#1\hfil}}\ignorespaces}
|
||||
\def\key{\par\hangafter=0\hang\textindent}
|
||||
|
||||
\def\mtextindent#1{\noindent\hbox{\tt#1\quad}\ignorespaces}
|
||||
\def\mkey{\par\hangafter=1\hang\mtextindent}
|
||||
|
||||
\def\kbd#{\bgroup\tt \let\next= }
|
||||
|
||||
\newdimen\raggedstretch
|
||||
\newskip\raggedparfill \raggedparfill=0pt plus 1fil
|
||||
\def\nohyphens
|
||||
{\hyphenpenalty10000\exhyphenpenalty10000\pretolerance10000}
|
||||
\def\raggedspaces
|
||||
{\spaceskip=0.3333em\relax
|
||||
\xspaceskip=0.5em\relax}
|
||||
\def\raggedright
|
||||
{\raggedstretch=6em
|
||||
\nohyphens
|
||||
\rightskip=0pt plus \raggedstretch
|
||||
\raggedspaces
|
||||
\parfillskip=\raggedparfill
|
||||
\relax}
|
||||
\def\raggedcenter
|
||||
{\raggedstretch=6em
|
||||
\nohyphens
|
||||
\rightskip=0pt plus \raggedstretch
|
||||
\leftskip=\rightskip
|
||||
\raggedspaces
|
||||
\parfillskip=0pt
|
||||
\relax}
|
||||
|
||||
\chardef\\=`\\
|
||||
|
||||
\raggedright
|
||||
\nopagenumbers
|
||||
\parindent 0pt
|
||||
\interlinepenalty=10000
|
||||
\hoffset -0.2in
|
||||
%\voffset 0.2in
|
||||
|
||||
%**end of header
|
||||
|
||||
|
||||
\title{Tarjeta\ de\ Supervivencia\ para\ GNU\ \ Emacs}{para la versi{\'o}n \versionemacs}
|
||||
|
||||
A continuaci{\'o}n, \kbd{C-z} significa presionar la tecla `\kbd{z}' mientras
|
||||
mantienes presionada la tecla {\it Ctrl}. \kbd{M-z} significa
|
||||
presionar la tecla `\kbd{z}' mientras mantienes presionada la tecla
|
||||
{\it Meta\/} (tambi{\'e}n llamada {\it Alt\/} en algunos teclados)
|
||||
o despu{\'e}s de presionar la tecla {\it Esc\/}.
|
||||
|
||||
\section{Abrir Emacs}
|
||||
|
||||
Para Abrir GNU Emacs, solo escriba su nombre: \kbd{emacs}.
|
||||
Emacs divide sus marcos en varias {\'a}reas:
|
||||
la barra del men{\'u},
|
||||
el {\'a}rea del buffer donde se edita el texto,
|
||||
la barra modal (mode-line) describiendo el buffer en la ventana que est{\'a} encima de {\'e}l,
|
||||
y en la {\'u}ltima l{\'i}nea el {\'a}rea del minibuffer o de mensajes.
|
||||
\askip
|
||||
\key{C-x C-c} salir de Emacs
|
||||
\key{C-x C-f} editar archivo; este comando usa el minibuffer para leer
|
||||
el nombre del archivo; usa este para crear nuevos archivos con tan solo
|
||||
escribir el nombre del nuevo archivo que desee.
|
||||
\key{C-x C-s} guardar archivo
|
||||
\key{C-x k} eliminar un buffer
|
||||
\key{C-g} en la mayor{\'i}a de los casos: cancela, detiene, aborta parcialmente
|
||||
algo escrito o un comando ejecut{\'a}ndose
|
||||
\key{C-x u} deshacer
|
||||
|
||||
\section{Moverse}
|
||||
|
||||
\key{C-l} desplazar l{\'i}nea actual al centro de la ventana
|
||||
\key{C-x b} cambiar a otro buffer
|
||||
\key{M-<} ir al comienzo del buffer
|
||||
\key{M->} ir al final del buffer
|
||||
\key{M-g M-g} ir a un n{\'u}mero de l{\'i}nea dado
|
||||
|
||||
\section{M{\'u}ltiples Ventanas}
|
||||
|
||||
\key{C-x 0} remover la ventana actual
|
||||
\key{C-x 1} hacer que la ventana activa sea la {\'u}nica
|
||||
\key{C-x 2} dividir ventana horizontalmente
|
||||
\key{C-x 3} dividir ventana verticalmente
|
||||
\key{C-x o} ir a otra ventana
|
||||
|
||||
\section{Regiones}
|
||||
|
||||
Emacs define una `regi{\'o}n' como el espacio entre la selecci{\'o}n y el
|
||||
punto. Una selecci{\'o}n se establece con \kbd{C-{\it espacio}}.
|
||||
El punto esta en la posici{\'o}n del cursor.
|
||||
\askip
|
||||
\key{M-h} seleccionar p{\'a}rrafo
|
||||
\key{C-x h} seleccionar todo el buffer
|
||||
|
||||
\section{Cortar y Pegar}
|
||||
|
||||
\key{C-w} cortar regi{\'o}n
|
||||
\key{M-w} copiar regi{\'o}n (al kill-ring)
|
||||
\key{C-k} cortar desde el cursor hasta el final de la l{\'i}nea
|
||||
\key{M-DEL} cortar palabra
|
||||
\key{C-y} volver a pegar lo {\'u}ltimo que se cort{\'o} (\kbd{C-w C-y} la
|
||||
combinaci{\'o}n podr{\'i}a usarse
|
||||
para mover el texto)
|
||||
\key{M-y} remplazar {\'u}ltimo pegado con la cortada anterior
|
||||
|
||||
\section{Buscar}
|
||||
|
||||
\key{C-s} buscar un texto
|
||||
\key{C-r} buscar hacia atr{\'a}s un texto
|
||||
\key{RET} salir de la b{\'u}squeda
|
||||
\key{M-C-s} buscar con una expresi{\'o}n regular
|
||||
\key{M-C-r} buscar hacia atr{\'a}s con una expresi{\'o}n regular
|
||||
\askip
|
||||
Usa otra vez \kbd{C-s} o \kbd{C-r} para repetir la b{\'u}squeda en
|
||||
cualquier direcci{\'o}n.
|
||||
|
||||
\section{Etiquetas}
|
||||
|
||||
La tabla de etiquetas guarda la localizaci{\'o}n de funciones y definiciones
|
||||
de procedimientos, variables globales, tipos de datos y cualquier otra
|
||||
cosa conveniente. Para crear un archivo de tablas de etiquetas, escriba
|
||||
`{\tt etags} {\it archivos\_a\_ingresar}' como un comando de shell.
|
||||
\askip
|
||||
\key{M-.} encontrar una definici{\'o}n
|
||||
\key{M-,} volver a donde \kbd{M-.} fue invocado por {\'u}ltima vez
|
||||
\mkey{M-x tags-query-replace} ejecutar query-replace en todos los archivos
|
||||
registrados en la tabla de etiquetas
|
||||
|
||||
\section{Compilar}
|
||||
|
||||
\key{M-x compile} compilar c{\'o}digo en la ventana activa
|
||||
\key{C-c C-c} ir al siguiente error del compilador, cuando est{\'e}
|
||||
en la ventana de compilaci{\'o}n o
|
||||
\key{C-x `} cuando est{\'e} en la ventana con el c{\'o}digo fuente
|
||||
|
||||
\section{Dired, El Editor de Directorios}
|
||||
|
||||
\key{C-x d} invocar Dired
|
||||
\key{d} marcar este archivo para eliminaci{\'o}n
|
||||
\key{\~{}} marcar todos los archivos de respaldo para eliminaci{\'o}n
|
||||
\key{u} quitar marca de eliminaci{\'o}n
|
||||
\key{x} eliminar los archivos marcados para eliminaci{\'o}n
|
||||
\key{C} copiar archivo
|
||||
\key{g} actualizar el buffer de Dired
|
||||
\key{f} abrir el archivo descrito en la l{\'i}nea actual
|
||||
\key{s} cambiar entre el orden alfab{\'e}tico de fecha y hora
|
||||
|
||||
\section{Lectura y env{\'i}o de correo electr{\'o}nico}
|
||||
|
||||
\key{M-x rmail} empezar a leer el correo
|
||||
\key{q} dejar de leer el correo
|
||||
\key{h} mostrar encabezados
|
||||
\key{d} marcar el mensaje actual para eliminaci{\'o}n
|
||||
\key{x} eliminar todos los mensajes marcados para eliminaci{\'o}n
|
||||
|
||||
\key{C-x m} redactar un mensaje
|
||||
\key{C-c C-c} enviar el mensaje y cambiar a otro buffer
|
||||
\key{C-c C-f C-c} ir al campo de encabezado 'Cc' y crea uno
|
||||
si no hay ninguno
|
||||
|
||||
\section{Miscel{\'a}neos}
|
||||
|
||||
\key{M-q} rellenar p{\'a}rrafo
|
||||
\key{M-/} expandir la palabra anterior din{\'a}micamente
|
||||
\key{C-z} minimizar (suspender) Emacs cuando se est{\'a} ejecutando
|
||||
gr{\'a}ficamente o en terminal, respectivamente
|
||||
\mkey{M-x revert-buffer} actualizar texto del buffer acorde al archivo
|
||||
guardado
|
||||
|
||||
\section{Buscar y Remplazar}
|
||||
|
||||
\key{M-\%} buscar y remplazar de forma interactiva
|
||||
\key{M-C-\%} buscar usando expresiones regulares
|
||||
\askip
|
||||
Las respuestas v{\'a}lidas en query-replace son
|
||||
\askip
|
||||
\key{SPC} remplazar este y pasa al siguiente
|
||||
\key{,} remplazar este pero no te muevas
|
||||
\key{DEL} saltar al siguiente sin remplazar
|
||||
\key{!} remplazar todas las coincidencias restantes
|
||||
\key{\^{}} volver a la coincidencia anterior
|
||||
\key{RET} salir de query-replace
|
||||
\key{C-r} entrar a la edici{\'o}n recursiva (\kbd{M-C-c} para salir)
|
||||
|
||||
\section{Expresiones regulares}
|
||||
|
||||
\key{. {\rm(dot)}} cualquier car{\'a}cter individual excepto una nueva l{\'i}nea
|
||||
\key{*} cero o m{\'a}s repeticiones
|
||||
\key{+} una o m{\'a}s repeticiones
|
||||
\key{?} cero o una repetici{\'o}n
|
||||
\key{[$\ldots$]} denota una clase de car{\'a}cter a coincidir
|
||||
\key{[\^{}$\ldots$]} niega la clase
|
||||
|
||||
\key{\\{\it c}} mantener caracteres que de otra manera tendr{\'i}an un
|
||||
significado especial en expresiones regulares
|
||||
|
||||
\key{$\ldots$\\|$\ldots$\\|$\ldots$} coincide con una de las
|
||||
alternativas (``or'')
|
||||
\key{\\( $\ldots$ \\)} agrupa una serie de patrones de elementos a un
|
||||
solo elemento
|
||||
\key{\\{\it n}} mismo texto como del grupo n{\'u}mero {\it n\/}
|
||||
|
||||
\key{\^{}} coincidencias con el inicio de la l{\'i}nea
|
||||
\key{\$} coincidencias al final de la l{\'i}nea
|
||||
|
||||
\key{\\w} encuentra un car{\'a}cter de una palabra
|
||||
\key{\\W} encuentra un car{\'a}cter de una palabra
|
||||
\key{\\<} encuentra al comienzo de una palabra
|
||||
\key{\\>} encuentra al final de una palabra
|
||||
\key{\\b} encuentra en el salto de palabra
|
||||
\key{\\B} encuentra en un no salto de palabra
|
||||
|
||||
\section{Registros}
|
||||
|
||||
\key{C-x r s} guardar selecci{\'o}n en el registro
|
||||
\key{C-x r i} insertar el contenido del registro en el buffer
|
||||
|
||||
\key{C-x r SPC} guardar el valor del cursor en el registro
|
||||
\key{C-x r j} saltar al punto guardado en el registro
|
||||
|
||||
\section{Rect{\'a}ngulos}
|
||||
|
||||
\key{C-x r r} copiar rect{\'a}ngulo al registro
|
||||
\key{C-x r k} cortar rect{\'a}ngulo
|
||||
\key{C-x r y} pegar rect{\'a}ngulo
|
||||
\key{C-x r t} a{\~n}adir un prefijo a cada l{\'i}nea con un texto
|
||||
|
||||
\key{C-x r o} abrir rect{\'a}ngulo, desplazar el texto hacia la derecha
|
||||
\key{C-x r c} dejar rect{\'a}ngulo en blanco
|
||||
|
||||
\section{Shells}
|
||||
|
||||
\key{M-x shell} iniciar un shell dentro de Emacs
|
||||
\key{M-!} ejecutar un comando de shell dentro de Emacs
|
||||
\key{M-|} ejecutar un comando de shell de una regi{\'o}n
|
||||
\key{C-u M-|} filtrar regi{\'o}n a trav{\'e}s de un comando de shell
|
||||
|
||||
\section{Revisi{\'o}n Ortogr{\'a}fica}
|
||||
|
||||
\key{M-\$} comprobar la ortograf{\'i}a de la palabra en el cursor
|
||||
\mkey{M-x ispell-region} comprobar la ortograf{\'i}a de todas las palabras de
|
||||
la selecci{\'o}n
|
||||
\mkey{M-x ispell-buffer} comprobar la ortograf{\'i}a de todo el buffer
|
||||
|
||||
\section{Caracteres Internacionales}
|
||||
|
||||
\key{C-x RET C-\\} seleccionar y activar el m{\'e}todo de entrada para el
|
||||
buffer actual
|
||||
\key{C-\\} activar o desactivar el m{\'e}todo de entrada
|
||||
\mkey{M-x list-input-methods} mostrar todos los m{\'e}todos de entrada
|
||||
\mkey{M-x set-language-environment} especificar idioma principal
|
||||
|
||||
\key{C-x RET c} establecer el sistema de codificaci{\'o}n para el siguiente comando
|
||||
\mkey{M-x find-file-literally} abrir archivo sin conversi{\'o}n
|
||||
de ning{\'u}n tipo
|
||||
|
||||
\mkey{M-x list-coding-systems} mostrar todos los sistemas de codificaci{\'o}n
|
||||
\mkey{M-x prefer-coding-system} escoger el sistema de codificaci{\'o}n preferido
|
||||
|
||||
\section{Macros del teclado}
|
||||
|
||||
\key{C-x (} empezar a definir una macro
|
||||
\key{C-x )} terminar de definir la macro
|
||||
\key{C-x e} ejecutar la {\'u}ltima macro definida
|
||||
\key{C-u C-x (} a{\~n}adir a la {\'u}ltima macro definida
|
||||
\mkey{M-x name-last-kbd-macro} nombrar {\'u}ltima macro definida
|
||||
|
||||
\section{Personalizaci{\'o}n sencilla}
|
||||
|
||||
\key{M-x customize} personalizar variables y caras
|
||||
|
||||
\section{Obtener Ayuda}
|
||||
|
||||
Emacs completa los comandos por usted. Escribiendo \kbd{M-x}
|
||||
{\it tab\/} o {\it espacio\/} proporciona una lista de comandos de Emacs.
|
||||
\askip
|
||||
\key{C-h} ayuda de Emacs
|
||||
\key{C-h t} ejecutar el tutorial de Emacs
|
||||
\key{C-h i} entrar a Info, el navegador de documentaci{\'o}n
|
||||
\key{C-h a} mostrar comandos que coinciden con una string (apropos)
|
||||
\key{C-h k} mostrar documentaci{\'o}n de la funci{\'o}n invocada por la
|
||||
pulsaci{\'o}n de tecla
|
||||
\askip
|
||||
Emacs se mete en diferentes {\it modos}, cada uno de los cuales personaliza
|
||||
Emacs para editar texto de un tipo particular. La l{\'i}nea modal (mode-line)
|
||||
contiene los nombres de los modos actuales, entre par{\'e}ntesis.
|
||||
\askip
|
||||
\key{C-h m} obtener informaci{\'o}n espec{\'i}fica del modo
|
||||
|
||||
\copyrightnotice
|
||||
|
||||
\bye
|
||||
|
||||
% Local variables:
|
||||
% compile-command: "pdftex survival"
|
||||
% End:
|
||||
|
|
@ -10,7 +10,11 @@
|
|||
|
||||
(
|
||||
("29.1" fun plistp)
|
||||
("29.1" fun help-key)
|
||||
("28.1" fun always)
|
||||
("27.1" fun project-files)
|
||||
("26.1" fun flymake--diag-region)
|
||||
("26.1" fun flymake-make-diagnostic)
|
||||
("26.1" fun when-let*)
|
||||
("26.1" fun and-let*)
|
||||
("26.1" fun if-let*)
|
||||
|
|
@ -39,6 +43,7 @@
|
|||
("26.1" fun cdddar)
|
||||
("26.1" fun cddddr)
|
||||
("24.4" fun set-transient-map)
|
||||
("24.3" fun cl-defun)
|
||||
("22.1" fun clear-string)
|
||||
("22.1" fun version=)
|
||||
("22.1" fun version<)
|
||||
|
|
@ -53,8 +58,9 @@
|
|||
;; damaged. See
|
||||
;; https://github.com/larsbrinkhoff/emacs-history/tree/sources/decuslib.com/decus/vax85b/gnuemax
|
||||
|
||||
("19.7" fun defsubst)
|
||||
("19.34" fun make-directory)
|
||||
("19.7" fun defsubst)
|
||||
("18.59" fun current-global-map)
|
||||
("18.59" fun mark)
|
||||
("13.8" fun nthcdr)
|
||||
("13.8" fun nreverse)
|
||||
|
|
|
|||
|
|
@ -338,3 +338,18 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. -->
|
|||
android:label="GNU Emacs service"/>
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
<!-- Auto-incrementing version code.
|
||||
|
||||
This comment contains an Android version code
|
||||
(https://developer.android.com/studio/publish/versioning#versioningsettings)
|
||||
corresponding to the current Emacs version. The version code in
|
||||
AndroidManifest.xml.in is hard-coded to a fixed value to facilitate
|
||||
package downgrades. Some automated systems employed by Android package
|
||||
repositories require an incrementing numeric version code to detect
|
||||
upgrades, which is provided here and is altered by admin/admin.el.
|
||||
Refer to e.g. https://forum.f-droid.org/t/emacs-packaging/30424/25.
|
||||
|
||||
Version-code: 310050000
|
||||
|
||||
-->
|
||||
|
|
|
|||
0
java/incrementing-version-code
Normal file
0
java/incrementing-version-code
Normal file
|
|
@ -24,10 +24,11 @@
|
|||
import android.text.InputType;
|
||||
|
||||
import android.view.ContextMenu;
|
||||
import android.view.ContextThemeWrapper;
|
||||
import android.view.DragEvent;
|
||||
import android.view.View;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.view.WindowInsets;
|
||||
|
|
@ -127,32 +128,36 @@ public final class EmacsView extends ViewGroup
|
|||
public
|
||||
EmacsView (EmacsWindow window)
|
||||
{
|
||||
super (EmacsService.SERVICE);
|
||||
/* This is required to guarantee that popup menus respect the
|
||||
default style. */
|
||||
super (new ContextThemeWrapper (EmacsService.SERVICE,
|
||||
R.style.EmacsStyle));
|
||||
{
|
||||
Object tem;
|
||||
Context context;
|
||||
|
||||
Object tem;
|
||||
Context context;
|
||||
this.window = window;
|
||||
this.damageRegion = new Region ();
|
||||
|
||||
this.window = window;
|
||||
this.damageRegion = new Region ();
|
||||
setFocusable (true);
|
||||
setFocusableInTouchMode (true);
|
||||
|
||||
setFocusable (true);
|
||||
setFocusableInTouchMode (true);
|
||||
/* Create the surface view. */
|
||||
this.surfaceView = new EmacsSurfaceView (this);
|
||||
addView (this.surfaceView);
|
||||
|
||||
/* Create the surface view. */
|
||||
this.surfaceView = new EmacsSurfaceView (this);
|
||||
addView (this.surfaceView);
|
||||
/* Get rid of the default focus highlight. */
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.O)
|
||||
setDefaultFocusHighlightEnabled (false);
|
||||
|
||||
/* Get rid of the default focus highlight. */
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.O)
|
||||
setDefaultFocusHighlightEnabled (false);
|
||||
/* Obtain the input method manager. */
|
||||
context = getContext ();
|
||||
tem = context.getSystemService (Context.INPUT_METHOD_SERVICE);
|
||||
imManager = (InputMethodManager) tem;
|
||||
|
||||
/* Obtain the input method manager. */
|
||||
context = getContext ();
|
||||
tem = context.getSystemService (Context.INPUT_METHOD_SERVICE);
|
||||
imManager = (InputMethodManager) tem;
|
||||
|
||||
/* Add this view as its own global layout listener. */
|
||||
getViewTreeObserver ().addOnGlobalLayoutListener (this);
|
||||
/* Add this view as its own global layout listener. */
|
||||
getViewTreeObserver ().addOnGlobalLayoutListener (this);
|
||||
}
|
||||
}
|
||||
|
||||
private void
|
||||
|
|
@ -702,6 +707,8 @@ else if (child.getVisibility () != GONE)
|
|||
popupMenu (EmacsContextMenu menu, int xPosition,
|
||||
int yPosition, boolean force)
|
||||
{
|
||||
ContextThemeWrapper context;
|
||||
|
||||
if (popupActive && !force)
|
||||
return false;
|
||||
|
||||
|
|
@ -715,6 +722,16 @@ else if (child.getVisibility () != GONE)
|
|||
contextMenu = menu;
|
||||
popupActive = true;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM)
|
||||
{
|
||||
context = (ContextThemeWrapper) getContext ();
|
||||
/* It is necessary to reload the current theme before attempting
|
||||
to display a new popup menu, or any previously applied system
|
||||
theme will continue to apply to it. */
|
||||
context.setTheme (R.style.EmacsStyleOpen);
|
||||
context.setTheme (R.style.EmacsStyle);
|
||||
}
|
||||
|
||||
/* Use showContextMenu (float, float) on N to get actual popup
|
||||
behavior. */
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ else if (parent == null)
|
|||
/* Otherwise accept the new position offered by the toolkit. FIXME:
|
||||
isn't there a potential race condition here if the toolkit lays
|
||||
out EmacsView after a child frame's rect is set but before it
|
||||
calls onLayout to read the modifies rect? */
|
||||
calls onLayout to read the modified rect? */
|
||||
else
|
||||
{
|
||||
rect.left = left;
|
||||
|
|
|
|||
30
java/res/values-v20/style.xml
Normal file
30
java/res/values-v20/style.xml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<!-- Style resources for GNU Emacs on Android.
|
||||
|
||||
Copyright (C) 2025 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/>. -->
|
||||
|
||||
<resources>
|
||||
<!-- Style used for popup menus and relatives between Android 4.4 W
|
||||
and Android 10. -->
|
||||
<style name="EmacsStyle"
|
||||
parent="@android:style/Theme.DeviceDefault.NoActionBar">
|
||||
<!-- Suppress the swipe-to-dismiss gesture enabled on certain
|
||||
systems. -->
|
||||
<item name="android:windowSwipeToDismiss">false</item>
|
||||
</style>
|
||||
<style name="EmacsStyleOpen" parent="@android:style/Theme.DeviceDefault"/>
|
||||
</resources>
|
||||
|
|
@ -18,14 +18,18 @@
|
|||
along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. -->
|
||||
|
||||
<resources>
|
||||
<!-- Style used for popup menus and relatives from Android 10.0
|
||||
onwards-->
|
||||
<!-- Style used for popup menus and relatives from Android 10.0 to
|
||||
14.0. -->
|
||||
<style name="EmacsStyle" parent="@android:style/Theme.DeviceDefault.DayNight">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
|
||||
<!-- Required to make sure the status bar text remains legible. -->
|
||||
<item name="android:statusBarColor">@android:color/black</item>
|
||||
|
||||
<!-- Suppress the swipe-to-dismiss gesture enabled on certain
|
||||
systems. -->
|
||||
<item name="android:windowSwipeToDismiss">false</item>
|
||||
</style>
|
||||
<style name="EmacsStyleOpen"
|
||||
parent="@android:style/Theme.DeviceDefault.DayNight"/>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@
|
|||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowLightStatusBar">?android:attr/isLightTheme</item>
|
||||
<!-- Suppress the swipe-to-dismiss gesture enabled on certain
|
||||
systems. -->
|
||||
<item name="android:windowSwipeToDismiss">false</item>
|
||||
</style>
|
||||
<style name="EmacsStyleOpen"
|
||||
parent="@android:style/Theme.DeviceDefault.DayNight"/>
|
||||
|
|
@ -700,7 +700,7 @@ The following OPTIONS are accepted:\n\
|
|||
", "\
|
||||
-F ALIST, --frame-parameters=ALIST\n\
|
||||
Set the parameters of a new frame\n\
|
||||
-e, --eval Evaluate the FILE arguments as ELisp expressions\n\
|
||||
-e, --eval Evaluate the FILE arguments as Elisp expressions\n\
|
||||
-n, --no-wait Don't wait for the server to return\n\
|
||||
-w, --timeout=SECONDS Seconds to wait before timing out\n\
|
||||
-q, --quiet Don't display messages on success\n\
|
||||
|
|
|
|||
|
|
@ -444,7 +444,6 @@ be added."
|
|||
;; Let mouse-1 follow the link.
|
||||
(define-key map [follow-link] 'mouse-face)
|
||||
|
||||
(define-key map [remap advertised-undo] #'archive-undo)
|
||||
(define-key map [remap undo] #'archive-undo)
|
||||
|
||||
(define-key map [mouse-2] 'archive-extract)
|
||||
|
|
@ -1692,7 +1691,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
|
|||
(t (+ (string-width uid) (string-width gid) 1)))))
|
||||
(if (> len maxidlen) (setq maxidlen len))))
|
||||
(let ((size (archive--file-desc-size desc)))
|
||||
(cl-incf totalsize size)
|
||||
(incf totalsize size)
|
||||
(if (> size maxsize) (setq maxsize size))))
|
||||
(let* ((sizelen (length (number-to-string maxsize)))
|
||||
(dash
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue