mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 10:27:41 +00:00
Merge from trunk.
This commit is contained in:
commit
6e6c82a4e6
300 changed files with 11948 additions and 8491 deletions
44
ChangeLog
44
ChangeLog
|
|
@ -1,3 +1,47 @@
|
|||
2012-02-05 Christoph Scholtes <cschol2112@googlemail.com>
|
||||
|
||||
* make-dist (README.W32): Include file in source tarball. (Bug#9750)
|
||||
|
||||
* lib/makefile.w32-in (PRAGMA_SYSTEM_HEADER): Move to platform
|
||||
specific makefiles to support getopt_.h generation with MSVC.
|
||||
|
||||
2012-02-04 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (uninstall):
|
||||
Handle compressed info files and man pages. (Bug#10718)
|
||||
|
||||
2012-02-02 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* configure.in [HAVE_NS]:
|
||||
Error if use --without-toolkit-scroll-bars. (Bug#10673)
|
||||
|
||||
2012-02-01 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Port to older Solaris 10 versions (Bug#10677).
|
||||
Bug reported by Chong Yidong for SunOS 5.10 Generic_127111-11 sparc.
|
||||
I cannot reproduce it on SunOS 5.10 Generic_141444-09 sparc but
|
||||
possibly this is because Sun fixed the 'stat' bug in my version.
|
||||
* Makefile.in (GNULIB_TOOL_FLAGS): Do not avoid the pathmax module.
|
||||
* lib/pathmax.h, m4/pathmax.m4: New files, from gnulib.
|
||||
* lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
|
||||
These changes are based on gnulib version
|
||||
4f11d6bebc3098c64ffde27079ab0d0cecfd0cdc dated 2011-10-07 20:59:10,
|
||||
because Emacs is in feature freeze and we do not want to merge any
|
||||
more-recent changes from gnulib.
|
||||
|
||||
2012-01-31 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* configure.in: Throw an explicit error if Motif toolkit was
|
||||
requested but requirements could not be found.
|
||||
|
||||
* configure.in: Allow Emacs to actually be built with xaw scroll-bars.
|
||||
|
||||
2012-01-30 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* lib/makefile.w32-in ($(BLD)/sha1.$(O) $(BLD)/sha256.$(O)
|
||||
$(BLD)/sha512.$(O)): Depend on stamp_BLD. Fixes a build failure
|
||||
with "make -j3".
|
||||
|
||||
2012-01-16 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* .bzrignore: Ignore etc/__pycache__.
|
||||
|
|
|
|||
11
Makefile.in
11
Makefile.in
|
|
@ -341,7 +341,7 @@ GNULIB_MODULES = \
|
|||
mktime pthread_sigmask readlink \
|
||||
socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
|
||||
GNULIB_TOOL_FLAGS = \
|
||||
--avoid=msvc-inval --avoid=msvc-nothrow --avoid=pathmax \
|
||||
--avoid=msvc-inval --avoid=msvc-nothrow \
|
||||
--avoid=raise --avoid=threadlib \
|
||||
--conditional-dependencies --import --no-changelog --no-vc-files \
|
||||
--makefile-name=gnulib.mk
|
||||
|
|
@ -727,11 +727,16 @@ uninstall:
|
|||
(cd $(DESTDIR)${infodir} && \
|
||||
for elt in $(INFO_FILES); do \
|
||||
$(INSTALL_INFO) --remove --info-dir=. $$elt; \
|
||||
for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
|
||||
if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
|
||||
ext=.gz; else ext=; fi; \
|
||||
for f in `ls $$elt$$ext $$elt-[1-9]$$ext $$elt-[1-9][0-9]$$ext 2>/dev/null`; do \
|
||||
rm -f $$f; \
|
||||
done; \
|
||||
done;)
|
||||
(cd $(DESTDIR)${man1dir} && rm -f $(MAN_PAGES))
|
||||
(if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
|
||||
ext=.gz; else ext=; fi; \
|
||||
cd $(DESTDIR)${man1dir} && for page in ${MAN_PAGES}; do \
|
||||
rm -f $$page$$ext; done )
|
||||
(cd $(DESTDIR)${bindir} && rm -f $(EMACSFULL) $(EMACS))
|
||||
(cd $(DESTDIR)${icondir} && rm -f hicolor/*x*/apps/emacs.png hicolor/*x*/apps/emacs22.png hicolor/scalable/apps/emacs.svg hicolor/scalable/mimetypes/emacs-document.svg )
|
||||
-rm -f $(DESTDIR)${desktopdir}/emacs.desktop
|
||||
|
|
|
|||
2
README
2
README
|
|
@ -2,7 +2,7 @@ Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
|||
See the end of the file for license conditions.
|
||||
|
||||
|
||||
This directory tree holds version 24.0.92 of GNU Emacs, the extensible,
|
||||
This directory tree holds version 24.0.93 of GNU Emacs, the extensible,
|
||||
customizable, self-documenting real-time display editor.
|
||||
|
||||
The file INSTALL in this directory says how to build and install GNU
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
2012-01-19 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* bzrmerge.el (bzrmerge-missing): Allow a definitive "no" answer to the
|
||||
"skip?" question, since there can be multiple such for any revision.
|
||||
|
||||
2012-01-14 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* FOR-RELEASE (Check the Emacs Tutorial): Mark TUTORIAL.he as
|
||||
|
|
|
|||
|
|
@ -100,10 +100,10 @@ names of the people who have checked it.
|
|||
SECTION READERS
|
||||
----------------------------------
|
||||
TUTORIAL cyd
|
||||
TUTORIAL.bg
|
||||
TUTORIAL.bg ogi
|
||||
TUTORIAL.cn
|
||||
TUTORIAL.cs
|
||||
TUTORIAL.de
|
||||
TUTORIAL.de wl
|
||||
TUTORIAL.eo
|
||||
TUTORIAL.es
|
||||
TUTORIAL.fr
|
||||
|
|
@ -111,14 +111,14 @@ TUTORIAL.he eliz
|
|||
TUTORIAL.it
|
||||
TUTORIAL.ja
|
||||
TUTORIAL.ko
|
||||
TUTORIAL.nl
|
||||
TUTORIAL.nl Pieter Schoenmakers
|
||||
TUTORIAL.pl
|
||||
TUTORIAL.pt_BR
|
||||
TUTORIAL.ro
|
||||
TUTORIAL.ru
|
||||
TUTORIAL.ru Alex Ott
|
||||
TUTORIAL.sk
|
||||
TUTORIAL.sl
|
||||
TUTORIAL.sv
|
||||
TUTORIAL.sl Primoz PETERLIN
|
||||
TUTORIAL.sv Mats Lidell
|
||||
TUTORIAL.th
|
||||
TUTORIAL.zh
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ TUTORIAL.zh
|
|||
|
||||
abbrevs.texi cyd
|
||||
ack.texi
|
||||
anti.texi
|
||||
anti.texi cyd
|
||||
arevert-xtra.texi cyd
|
||||
basic.texi cyd
|
||||
buffers.texi cyd
|
||||
|
|
@ -180,60 +180,59 @@ xresources.texi cyd
|
|||
** Check the Lisp manual.
|
||||
|
||||
abbrevs.texi
|
||||
advice.texi
|
||||
advice.texi cyd
|
||||
anti.texi
|
||||
back.texi
|
||||
backups.texi
|
||||
buffers.texi
|
||||
commands.texi
|
||||
compile.texi
|
||||
control.texi
|
||||
customize.texi
|
||||
compile.texi cyd
|
||||
control.texi cyd
|
||||
customize.texi cyd
|
||||
debugging.texi
|
||||
display.texi
|
||||
edebug.texi
|
||||
elisp.texi
|
||||
errors.texi
|
||||
eval.texi
|
||||
eval.texi cyd
|
||||
files.texi
|
||||
frames.texi
|
||||
functions.texi
|
||||
hash.texi
|
||||
functions.texi cyd
|
||||
hash.texi cyd
|
||||
help.texi
|
||||
hooks.texi
|
||||
index.texi
|
||||
internals.texi
|
||||
intro.texi
|
||||
intro.texi cyd
|
||||
keymaps.texi
|
||||
lists.texi
|
||||
loading.texi
|
||||
lists.texi cyd
|
||||
loading.texi cyd
|
||||
locals.texi
|
||||
macros.texi
|
||||
macros.texi cyd
|
||||
maps.texi
|
||||
markers.texi
|
||||
minibuf.texi
|
||||
modes.texi
|
||||
nonascii.texi
|
||||
numbers.texi
|
||||
objects.texi
|
||||
numbers.texi cyd
|
||||
objects.texi cyd
|
||||
os.texi
|
||||
package.texi
|
||||
positions.texi
|
||||
processes.texi
|
||||
searching.texi
|
||||
sequences.texi
|
||||
sequences.texi cyd
|
||||
streams.texi
|
||||
strings.texi
|
||||
symbols.texi
|
||||
strings.texi cyd
|
||||
symbols.texi cyd
|
||||
syntax.texi
|
||||
text.texi
|
||||
tips.texi
|
||||
variables.texi
|
||||
variables.texi cyd
|
||||
windows.texi
|
||||
|
||||
* PLANNED ADDITIONS
|
||||
|
||||
** pov-mode (probably not for Emacs-23: waiting for a Free POV-Ray).
|
||||
* pov-mode (probably not for Emacs-23: waiting for a Free POV-Ray).
|
||||
** gas-mode ?
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -133,9 +133,23 @@ are both lists of revnos, in oldest-first order."
|
|||
(setq str (substring str (match-end 0))))
|
||||
(when (string-match "[.!;, ]+\\'" str)
|
||||
(setq str (substring str 0 (match-beginning 0))))
|
||||
(if (save-excursion (y-or-n-p (concat str ": Skip? ")))
|
||||
(setq skip t))))
|
||||
(if skip
|
||||
(let ((help-form "\
|
||||
Type `y' to skip this revision,
|
||||
`N' to include it and go on to the next revision,
|
||||
`n' to not skip, but continue to search this log entry for skip regexps,
|
||||
`q' to quit merging."))
|
||||
(case (save-excursion
|
||||
(read-char-choice
|
||||
(format "%s: Skip (y/n/N/q/%s)? " str
|
||||
(key-description (vector help-char)))
|
||||
'(?y ?n ?N ?q)))
|
||||
(?y (setq skip t))
|
||||
(?q (keyboard-quit))
|
||||
;; A single log entry can match skip-regexp multiple
|
||||
;; times. If you are sure you don't want to skip it,
|
||||
;; you don't want to be asked multiple times.
|
||||
(?N (setq skip 'no))))))
|
||||
(if (eq skip t)
|
||||
(push revno skipped)
|
||||
(push revno revnos)))))
|
||||
(delete-region (point) (point-max)))
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
;;; python.wy -- LALR grammar for Python
|
||||
|
||||
;; Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001-2010 Python Software Foundation
|
||||
;; Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||
;; 2009, 2010 Python Software Foundation; All Rights Reserved
|
||||
|
||||
;; Author: Richard Kim <ryk@dspwiz.com>
|
||||
;; Maintainer: Richard Kim <ryk@dspwiz.com>
|
||||
|
|
|
|||
|
|
@ -470,13 +470,13 @@ Menu items are appended to the common grammar menu.")
|
|||
"srecode/srt-wy")
|
||||
("wisent-javascript-jv-wy.el"
|
||||
"semantic/wisent/js-wy"
|
||||
"Copyright (C) 1998-2011 Ecma International"
|
||||
"Copyright (C) 1998-2011 Ecma International."
|
||||
,wisent-make-parsers--ecmascript-license)
|
||||
("wisent-java-tags-wy.el"
|
||||
"semantic/wisent/javat-wy")
|
||||
("wisent-python-wy.el"
|
||||
"semantic/wisent/python-wy"
|
||||
"Copyright (C) 2001-2010 Python Software Foundation"
|
||||
"Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved."
|
||||
,wisent-make-parsers--python-license)))
|
||||
|
||||
(defun wisent-make-parsers ()
|
||||
|
|
|
|||
|
|
@ -102,3 +102,6 @@ For each step, check for possible errors.
|
|||
13. For a pretest, announce it on emacs-devel and BCC the pretesters.
|
||||
For a release, announce it on info-gnu@gnu.org,
|
||||
info-gnu-emacs@gnu.org, and emacs-devel.
|
||||
|
||||
14. For a release, update the Emacs homepage in the web repository.
|
||||
Also add the new NEWS file as NEWS.xx.y.
|
||||
|
|
|
|||
|
|
@ -640,3 +640,14 @@ I think you also have to add them to 'tags' and 'tags_single_letter'
|
|||
in /usr/share/perl5/Debbugs/Config.pm.
|
||||
And update /var/www/Developer.html with a description of what the tag means.
|
||||
And the "valid tags" list in /var/www/index.html.
|
||||
|
||||
** Backups
|
||||
|
||||
The FSF sysadmins handle multi-generational backups of the filesystem
|
||||
on debbugs.gnu.org. But if you really want to have your own backup of
|
||||
the bug database, you can use rsync (this requires login access to
|
||||
debbugs.gnu.org):
|
||||
|
||||
rsync -azvv -e ssh USER@debbugs.gnu.org:/var/lib/debbugs/ DEST
|
||||
|
||||
Note that this occupies well over 1G of disk space.
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ See the end of the file for license conditions.
|
|||
* Status Key
|
||||
- -- as yet unknown
|
||||
n/a -- not applicable (internal, uninteresting, etc)
|
||||
obsolete -- an obsolete feature, to be removed in future
|
||||
todo -- not documented but should be
|
||||
NODE -- documented in or under info node NODE
|
||||
|
||||
|
|
@ -26,7 +27,6 @@ See the end of the file for license conditions.
|
|||
bytecomp (elisp) Compilation Functions
|
||||
checkdoc (elisp) Documentation Tips
|
||||
cl (cl)
|
||||
cl-19 n/a
|
||||
cl-compat n/a
|
||||
cl-specs n/a
|
||||
copyright -
|
||||
|
|
@ -47,13 +47,12 @@ See the end of the file for license conditions.
|
|||
generic (elisp) Generic Modes
|
||||
gulp n/a
|
||||
helper -
|
||||
levents -
|
||||
levents obsolete
|
||||
lisp-float-type -
|
||||
lisp-mnt -
|
||||
lisp-mode n/a
|
||||
lmenu -
|
||||
lselect -
|
||||
lucid -
|
||||
lmenu obsolete
|
||||
lucid obsolete
|
||||
macroexp (elisp) Expansion
|
||||
pp (emacs) Program Indent
|
||||
re-builder -
|
||||
|
|
@ -62,7 +61,7 @@ See the end of the file for license conditions.
|
|||
ring (elisp) Rings
|
||||
rx -
|
||||
shadow -
|
||||
sregex -
|
||||
sregex obsolete
|
||||
syntax (elisp) Position Parse
|
||||
testcover -
|
||||
timer (elisp) Timers
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
# the same distribution terms as the rest of that program.
|
||||
#
|
||||
# Generated by gnulib-tool.
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=pathmax --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
|
|
@ -72,7 +72,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
|
|||
$(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/longlong.m4 \
|
||||
$(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/md5.m4 \
|
||||
$(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \
|
||||
$(top_srcdir)/m4/nocrash.m4 \
|
||||
$(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/pathmax.m4 \
|
||||
$(top_srcdir)/m4/pthread_sigmask.m4 \
|
||||
$(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/sha1.m4 \
|
||||
$(top_srcdir)/m4/sha256.m4 $(top_srcdir)/m4/sha512.m4 \
|
||||
|
|
@ -795,8 +795,8 @@ EXTRA_DIST = alloca.in.h allocator.h careadlinkat.h md5.h sha1.h \
|
|||
sha256.h sha512.h dosname.h ftoastr.c ftoastr.h dup2.c \
|
||||
filemode.h getloadavg.c getopt.c getopt.in.h getopt1.c \
|
||||
getopt_int.h ignore-value.h intprops.h inttypes.in.h lstat.c \
|
||||
mktime-internal.h mktime.c pthread_sigmask.c readlink.c \
|
||||
signal.in.h sigprocmask.c \
|
||||
mktime-internal.h mktime.c pathmax.h pthread_sigmask.c \
|
||||
readlink.c signal.in.h sigprocmask.c \
|
||||
$(top_srcdir)/build-aux/snippet/_Noreturn.h \
|
||||
$(top_srcdir)/build-aux/snippet/arg-nonnull.h \
|
||||
$(top_srcdir)/build-aux/snippet/c++defs.h \
|
||||
|
|
|
|||
1
autogen/aclocal.m4
vendored
1
autogen/aclocal.m4
vendored
|
|
@ -1003,6 +1003,7 @@ m4_include([m4/md5.m4])
|
|||
m4_include([m4/mktime.m4])
|
||||
m4_include([m4/multiarch.m4])
|
||||
m4_include([m4/nocrash.m4])
|
||||
m4_include([m4/pathmax.m4])
|
||||
m4_include([m4/pthread_sigmask.m4])
|
||||
m4_include([m4/readlink.m4])
|
||||
m4_include([m4/sha1.m4])
|
||||
|
|
|
|||
62
autogen/configure
vendored
62
autogen/configure
vendored
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.65 for emacs 24.0.92.
|
||||
# Generated by GNU Autoconf 2.65 for emacs 24.0.93.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
|
|
@ -549,8 +549,8 @@ MAKEFLAGS=
|
|||
# Identity of this package.
|
||||
PACKAGE_NAME='emacs'
|
||||
PACKAGE_TARNAME='emacs'
|
||||
PACKAGE_VERSION='24.0.92'
|
||||
PACKAGE_STRING='emacs 24.0.92'
|
||||
PACKAGE_VERSION='24.0.93'
|
||||
PACKAGE_STRING='emacs 24.0.93'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
|
|
@ -620,6 +620,8 @@ gl_GNULIB_ENABLED_stat_FALSE
|
|||
gl_GNULIB_ENABLED_stat_TRUE
|
||||
gl_GNULIB_ENABLED_sigprocmask_FALSE
|
||||
gl_GNULIB_ENABLED_sigprocmask_TRUE
|
||||
gl_GNULIB_ENABLED_pathmax_FALSE
|
||||
gl_GNULIB_ENABLED_pathmax_TRUE
|
||||
gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
|
||||
gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
|
||||
gl_GNULIB_ENABLED_dosname_FALSE
|
||||
|
|
@ -1885,7 +1887,7 @@ if test "$ac_init_help" = "long"; then
|
|||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures emacs 24.0.92 to adapt to many kinds of systems.
|
||||
\`configure' configures emacs 24.0.93 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
|
|
@ -1959,7 +1961,7 @@ fi
|
|||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of emacs 24.0.92:";;
|
||||
short | recursive ) echo "Configuration of emacs 24.0.93:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
|
|
@ -2122,7 +2124,7 @@ fi
|
|||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
emacs configure 24.0.92
|
||||
emacs configure 24.0.93
|
||||
generated by GNU Autoconf 2.65
|
||||
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
|
|
@ -2844,7 +2846,7 @@ cat >config.log <<_ACEOF
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by emacs $as_me 24.0.92, which was
|
||||
It was created by emacs $as_me 24.0.93, which was
|
||||
generated by GNU Autoconf 2.65. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
|
@ -3677,7 +3679,7 @@ fi
|
|||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='emacs'
|
||||
VERSION='24.0.92'
|
||||
VERSION='24.0.93'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
|
|
@ -6959,6 +6961,7 @@ esac
|
|||
# Code from module mktime:
|
||||
# Code from module multiarch:
|
||||
# Code from module nocrash:
|
||||
# Code from module pathmax:
|
||||
# Code from module pthread_sigmask:
|
||||
# Code from module readlink:
|
||||
# Code from module signal-h:
|
||||
|
|
@ -9835,6 +9838,10 @@ ns_frag=/dev/null
|
|||
NS_OBJ=
|
||||
NS_OBJC_OBJ=
|
||||
if test "${HAVE_NS}" = yes; then
|
||||
if test "$with_toolkit_scroll_bars" = "no"; then
|
||||
as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
|
||||
fi
|
||||
|
||||
window_system=nextstep
|
||||
with_xft=no
|
||||
# set up packaging dirs
|
||||
|
|
@ -12190,6 +12197,14 @@ $as_echo "$emacs_cv_lesstif" >&6; }
|
|||
CPPFLAGS=$OLD_CPPFLAGS
|
||||
fi
|
||||
fi
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
|
||||
|
||||
else
|
||||
as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -12201,7 +12216,7 @@ if test "${with_toolkit_scroll_bars}" != "no"; then
|
|||
|
||||
HAVE_XAW3D=no
|
||||
USE_TOOLKIT_SCROLL_BARS=yes
|
||||
elif test "${HAVE_XAW3D}" = "yes"; then
|
||||
elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
|
||||
$as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
|
||||
|
||||
USE_TOOLKIT_SCROLL_BARS=yes
|
||||
|
|
@ -21802,6 +21817,7 @@ $as_echo "$gl_cv_next_unistd_h" >&6; }
|
|||
|
||||
gl_gnulib_enabled_dosname=false
|
||||
gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
|
||||
gl_gnulib_enabled_pathmax=false
|
||||
gl_gnulib_enabled_sigprocmask=false
|
||||
gl_gnulib_enabled_stat=false
|
||||
gl_gnulib_enabled_strtoll=false
|
||||
|
|
@ -21821,6 +21837,15 @@ $as_echo "$gl_cv_next_unistd_h" >&6; }
|
|||
gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
|
||||
fi
|
||||
}
|
||||
func_gl_gnulib_m4code_pathmax ()
|
||||
{
|
||||
if ! $gl_gnulib_enabled_pathmax; then
|
||||
|
||||
|
||||
|
||||
gl_gnulib_enabled_pathmax=true
|
||||
fi
|
||||
}
|
||||
func_gl_gnulib_m4code_sigprocmask ()
|
||||
{
|
||||
if ! $gl_gnulib_enabled_sigprocmask; then
|
||||
|
|
@ -21999,6 +22024,9 @@ fi
|
|||
if test $REPLACE_STAT = 1; then
|
||||
func_gl_gnulib_m4code_dosname
|
||||
fi
|
||||
if test $REPLACE_STAT = 1; then
|
||||
func_gl_gnulib_m4code_pathmax
|
||||
fi
|
||||
if test $REPLACE_STAT = 1; then
|
||||
func_gl_gnulib_m4code_verify
|
||||
fi
|
||||
|
|
@ -22158,6 +22186,14 @@ else
|
|||
gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
|
||||
fi
|
||||
|
||||
if $gl_gnulib_enabled_pathmax; then
|
||||
gl_GNULIB_ENABLED_pathmax_TRUE=
|
||||
gl_GNULIB_ENABLED_pathmax_FALSE='#'
|
||||
else
|
||||
gl_GNULIB_ENABLED_pathmax_TRUE='#'
|
||||
gl_GNULIB_ENABLED_pathmax_FALSE=
|
||||
fi
|
||||
|
||||
if $gl_gnulib_enabled_sigprocmask; then
|
||||
gl_GNULIB_ENABLED_sigprocmask_TRUE=
|
||||
gl_GNULIB_ENABLED_sigprocmask_FALSE='#'
|
||||
|
|
@ -22656,6 +22692,10 @@ if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test
|
|||
as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
|
||||
as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${gl_GNULIB_ENABLED_sigprocmask_TRUE}" && test -z "${gl_GNULIB_ENABLED_sigprocmask_FALSE}"; then
|
||||
as_fn_error "conditional \"gl_GNULIB_ENABLED_sigprocmask\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
|
@ -23116,7 +23156,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by emacs $as_me 24.0.92, which was
|
||||
This file was extended by emacs $as_me 24.0.93, which was
|
||||
generated by GNU Autoconf 2.65. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
|
|
@ -23182,7 +23222,7 @@ _ACEOF
|
|||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
emacs config.status 24.0.92
|
||||
emacs config.status 24.0.93
|
||||
configured by $0, generated by GNU Autoconf 2.65,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
|
|
|||
10
configure.in
10
configure.in
|
|
@ -22,7 +22,7 @@ dnl You should have received a copy of the GNU General Public License
|
|||
dnl along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_PREREQ(2.65)
|
||||
AC_INIT(emacs, 24.0.92)
|
||||
AC_INIT(emacs, 24.0.93)
|
||||
AC_CONFIG_HEADER(src/config.h:src/config.in)
|
||||
AC_CONFIG_SRCDIR(src/lisp.h)
|
||||
AC_CONFIG_AUX_DIR(build-aux)
|
||||
|
|
@ -1568,6 +1568,10 @@ ns_frag=/dev/null
|
|||
NS_OBJ=
|
||||
NS_OBJC_OBJ=
|
||||
if test "${HAVE_NS}" = yes; then
|
||||
if test "$with_toolkit_scroll_bars" = "no"; then
|
||||
AC_MSG_ERROR([Non-toolkit scroll bars are not implemented for Nextstep.])
|
||||
fi
|
||||
|
||||
window_system=nextstep
|
||||
with_xft=no
|
||||
# set up packaging dirs
|
||||
|
|
@ -2234,6 +2238,8 @@ Motif version prior to 2.1.
|
|||
CPPFLAGS=$OLD_CPPFLAGS
|
||||
fi
|
||||
fi
|
||||
AC_CHECK_HEADER([Xm/BulletinB.h], [],
|
||||
[AC_MSG_ERROR([Motif toolkit requested but requirements not found.])])
|
||||
fi
|
||||
|
||||
dnl Use toolkit scroll bars if configured for GTK or X toolkit and either
|
||||
|
|
@ -2249,7 +2255,7 @@ if test "${with_toolkit_scroll_bars}" != "no"; then
|
|||
AC_DEFINE(USE_TOOLKIT_SCROLL_BARS)
|
||||
HAVE_XAW3D=no
|
||||
USE_TOOLKIT_SCROLL_BARS=yes
|
||||
elif test "${HAVE_XAW3D}" = "yes"; then
|
||||
elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
|
||||
AC_DEFINE(USE_TOOLKIT_SCROLL_BARS)
|
||||
USE_TOOLKIT_SCROLL_BARS=yes
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,3 +1,72 @@
|
|||
2012-02-10 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* mini.texi (Minibuffer Edit): Mention minibuffer-inactive-mode.
|
||||
|
||||
* programs.texi (Misc for Programs): Mention electric-layout-mode.
|
||||
|
||||
2012-02-09 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* buffers.texi (Misc Buffer): M-x info does not seem to require a
|
||||
buffer switch after M-x rename-uniquely.
|
||||
|
||||
* trouble.texi (Checklist): Mention C-c m in report-emacs-bug.
|
||||
|
||||
2012-02-09 Jay Belanger <jay.p.belanger@gmail.com>
|
||||
|
||||
* text.texi (Org Mode): Fix typo.
|
||||
|
||||
2012-02-08 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* ack.texi (Acknowledgments): Update emacs-lock info.
|
||||
|
||||
* rmail.texi (Rmail Display): Mention rmail-epa-decrypt.
|
||||
|
||||
* text.texi (LaTeX Editing): Mention latex-electric-env-pair-mode.
|
||||
|
||||
2012-02-07 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* files.texi (File Conveniences): Mention ImageMagick images.
|
||||
|
||||
2012-02-05 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* trouble.texi (Checklist): Mention debug-on-event.
|
||||
|
||||
* maintaining.texi (Maintaining): Add cross-ref to ERT.
|
||||
|
||||
2012-02-04 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* macos.texi (Customization options specific to Mac OS / GNUstep):
|
||||
New subsection.
|
||||
|
||||
* display.texi (Colors): Mention list-colors-sort.
|
||||
|
||||
* files.texi (File Conveniences): Mention image animation.
|
||||
|
||||
2012-01-31 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* windows.texi (Split Window): C-mouse-2 doesn't work on GTK+
|
||||
scroll bars (Bug#10666).
|
||||
|
||||
2012-01-28 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* files.texi (Filesets): Fix typos.
|
||||
|
||||
* display.texi (Faces): Add xref to Colors node.
|
||||
|
||||
2012-01-27 Dani Moncayo <dmoncayo@gmail.com>
|
||||
|
||||
* buffers.texi (Select Buffer): Clarify explanation of switching
|
||||
to new buffers. Fix description of next-buffer and
|
||||
previous-buffer (Bug#10334).
|
||||
(Misc Buffer): Add xref to View Mode.
|
||||
|
||||
* text.texi (Fill Commands): Fix description of
|
||||
sentence-end-double-space.
|
||||
|
||||
2012-01-23 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* anti.texi (Antinews): Add Emacs 23 antinews.
|
||||
|
||||
2012-01-16 Volker Sobek <reklov@live.com> (tiny change)
|
||||
|
||||
* programs.texi (Comment Commands): Typo (bug#10514).
|
||||
|
|
|
|||
|
|
@ -79,6 +79,12 @@ individual buffers; and @file{macroexp.el} for macro-expansion.
|
|||
David Bakhash wrote @file{strokes.el}, a mode for controlling Emacs by
|
||||
moving the mouse in particular patterns.
|
||||
|
||||
@item
|
||||
Juanma Barranquero wrote @file{emacs-lock.el} (based on the original
|
||||
version by Tom Wurgler), which makes it harder to exit with valuable
|
||||
buffers unsaved. He also made many other contributions to other
|
||||
areas, including MS Windows support.
|
||||
|
||||
@item
|
||||
Eli Barzilay wrote @file{calculator.el}, a desktop calculator for
|
||||
Emacs.
|
||||
|
|
@ -1340,10 +1346,6 @@ merging two versions of a file.
|
|||
Francis J.@: Wright wrote @file{woman.el}, a package for browsing
|
||||
manual pages without the @code{man} command.
|
||||
|
||||
@item
|
||||
Tom Wurgler wrote @file{emacs-lock.el}, which makes it harder
|
||||
to exit with valuable buffers unsaved.
|
||||
|
||||
@item
|
||||
Masatake Yamato wrote @file{ld-script.el}, an editing mode for GNU
|
||||
linker scripts, and contributed subword handling in CC mode.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,100 @@ greater simplicity that results from the absence of many Emacs
|
|||
|
||||
@itemize @bullet
|
||||
@item
|
||||
FIXME
|
||||
Support for displaying and editing ``bidirectional'' text has been
|
||||
removed. Text is now always displayed on the screen in a single
|
||||
consistent direction---left to right---regardless of the underlying
|
||||
script. Similarly, @kbd{C-f} and @kbd{C-b} always move the text
|
||||
cursor to the right and left respectively. Also, @key{right} and
|
||||
@key{left} are now equivalent to @kbd{C-f} and @kbd{C-b}, as you might
|
||||
expect, rather than moving forward or backward based on the underlying
|
||||
``paragraph direction''.
|
||||
|
||||
Users of ``right-to-left'' languages, like Arabic and Hebrew, may
|
||||
adapt by reading and/or editing text in left-to-right order.
|
||||
|
||||
@item
|
||||
The Emacs Lisp package manager has been removed. Instead of using a
|
||||
``user interface'' (@kbd{M-x list-packages}), additional Lisp packages
|
||||
must now be installed by hand, which is the most flexible and
|
||||
``Lispy'' method anyway. Typically, this just involves editing your
|
||||
init file to add the package installation directory to the load path
|
||||
and defining some autoloads; see each package's commentary section
|
||||
and/or README file for details.
|
||||
|
||||
@item
|
||||
The option @code{delete-active-region} has been deleted. When the
|
||||
region is active, typing @key{DEL} or @key{delete} no longer deletes
|
||||
the text in the region; it deletes a single character instead.
|
||||
|
||||
@item
|
||||
We have reworked how Emacs handles the clipboard and the X primary
|
||||
selection. Commands for killing and yanking, like @kbd{C-w} and
|
||||
@kbd{C-y}, use the primary selection and not the clipboard, so you can
|
||||
use these commands without interfering with ``cutting'' or ``pasting''
|
||||
in other programs. The @samp{Cut}/@samp{Copy}/@samp{Paste} menu items
|
||||
are bound to separate clipboard commands, not to the same commands as
|
||||
@kbd{C-w}/@kbd{M-w}/@kbd{C-y}.
|
||||
|
||||
Selecting text by dragging with the mouse now puts the text in the
|
||||
kill ring, in addition to the primary selection. But note that
|
||||
selecting an active region with @kbd{C-@key{SPC}} does @emph{not}
|
||||
alter the kill ring nor the primary selection, even though the text
|
||||
highlighting is visually identical.
|
||||
|
||||
@item
|
||||
In Isearch, @kbd{C-y} and @kbd{M-y} are no longer bound to
|
||||
@code{isearch-yank-kill} and @code{isearch-yank-pop} respectively.
|
||||
Instead, @kbd{C-y} yanks the rest of the current line into the search
|
||||
string (@code{isearch-yank-line}), whereas @kbd{M-y} does
|
||||
@code{isearch-yank-kill}. The mismatch with the usual meanings of
|
||||
@kbd{C-y} and @kbd{M-y} is unintended.
|
||||
|
||||
@item
|
||||
Various completion features have been simplified. The options
|
||||
@code{completion-cycle-threshold} and
|
||||
@code{completion-category-overrides} have been removed. Due to the
|
||||
latter removal, Emacs uses a single consistent scheme to generate
|
||||
completions, instead of using a separate scheme for (say) buffer name
|
||||
completion. Several major modes, such as Shell mode, now implement
|
||||
their own inline completion commands instead of using
|
||||
@code{completion-at-point}.
|
||||
|
||||
@item
|
||||
We have removed various options for controlling how windows are used,
|
||||
e.g.@: @code{display-buffer-base-action}, @code{display-buffer-alist},
|
||||
@code{window-combination-limit}, and @code{window-combination-resize}.
|
||||
|
||||
@item
|
||||
The command @kbd{M-x customize-themes} has been removed. Emacs no
|
||||
longer comes with pre-defined themes (you can write your own).
|
||||
|
||||
@item
|
||||
Emacs no longer adapts various aspects of its display to GTK+
|
||||
settings, opting instead for a uniform toolkit-independent look. GTK+
|
||||
scroll bars are placed on the left, the same position as non-GTK+ X
|
||||
scroll bars. Emacs no longer refers to GTK+ to set the default
|
||||
@code{region} face, nor for drawing tooltips.
|
||||
|
||||
@item
|
||||
Setting the option @code{delete-by-moving-to-trash} to a
|
||||
non-@code{nil} now causes all file deletions to use the system trash,
|
||||
even temporary files created by Lisp programs; furthermore, the
|
||||
@kbd{M-x delete-file} and @kbd{M-x delete-directory} commands no
|
||||
longer accept prefix arguments to force true deletion.
|
||||
|
||||
@item
|
||||
On GNU/Linux and Unix, the default method for sending mail (as
|
||||
specified by @code{send-mail-function}) is to use the
|
||||
@command{sendmail} program. Emacs no longer asks for a delivery
|
||||
method the first time you try to send mail, trusting instead that the
|
||||
system is configured for mail delivery, as it ought to be.
|
||||
|
||||
@item
|
||||
Several VC features have been removed, including the @kbd{C-x v +} and
|
||||
@kbd{C-x v m} commands for pulling and merging on distributed version
|
||||
control systems, and the ability to view inline log entries in the log
|
||||
buffers made by @kbd{C-x v L}.
|
||||
|
||||
@item
|
||||
To keep up with decreasing computer memory capacity and disk space, many
|
||||
|
|
|
|||
|
|
@ -90,9 +90,7 @@ selected buffer other than the current buffer.
|
|||
name using the minibuffer. Then it makes that buffer current, and
|
||||
displays it in the currently-selected window. An empty input
|
||||
specifies the buffer that was current most recently among those not
|
||||
now displayed in any window. If you specify a buffer that does not
|
||||
exist, @kbd{C-x b} creates a new, empty buffer that is not visiting
|
||||
any file, and selects it for editing.
|
||||
now displayed in any window.
|
||||
|
||||
While entering the buffer name, you can use the usual completion and
|
||||
history commands (@pxref{Minibuffer}). Note that @kbd{C-x b}, and
|
||||
|
|
@ -102,21 +100,24 @@ completing up to a nonexistent buffer name, Emacs prints
|
|||
@samp{[Confirm]} and you must type a second @key{RET} to submit that
|
||||
buffer name. @xref{Completion Exit}, for details.
|
||||
|
||||
One reason to create a new buffer is to use it for making temporary
|
||||
notes. If you try to save it, Emacs asks for the file name to use.
|
||||
The default value of the variable @code{major-mode} determines the new
|
||||
buffer's major mode; the default value is Fundamental mode. @xref{Major
|
||||
Modes}.
|
||||
If you specify a buffer that does not exist, @kbd{C-x b} creates a
|
||||
new, empty buffer that is not visiting any file, and selects it for
|
||||
editing. The default value of the variable @code{major-mode}
|
||||
determines the new buffer's major mode; the default value is
|
||||
Fundamental mode. @xref{Major Modes}. One reason to create a new
|
||||
buffer is to use it for making temporary notes. If you try to save
|
||||
it, Emacs asks for the file name to use.
|
||||
|
||||
@kindex C-x @key{LEFT}
|
||||
@kindex C-x @key{RIGHT}
|
||||
@findex next-buffer
|
||||
@findex previous-buffer
|
||||
For conveniently switching between a few buffers, use the commands
|
||||
@kbd{C-x @key{LEFT}} and @kbd{C-x @key{RIGHT}}. @kbd{C-x @key{RIGHT}}
|
||||
(@code{previous-buffer}) selects the previous buffer (following the order
|
||||
of most recent selection in the current frame), while @kbd{C-x @key{LEFT}}
|
||||
(@code{next-buffer}) moves through buffers in the reverse direction.
|
||||
@kbd{C-x @key{LEFT}} and @kbd{C-x @key{RIGHT}}. @kbd{C-x @key{LEFT}}
|
||||
(@code{previous-buffer}) selects the previous buffer (following the
|
||||
order of most recent selection in the current frame), while @kbd{C-x
|
||||
@key{RIGHT}} (@code{next-buffer}) moves through buffers in the reverse
|
||||
direction.
|
||||
|
||||
@kindex C-x 4 b
|
||||
@findex switch-to-buffer-other-window
|
||||
|
|
@ -215,7 +216,7 @@ Change the name of the current buffer.
|
|||
@item M-x rename-uniquely
|
||||
Rename the current buffer by adding @samp{<@var{number}>} to the end.
|
||||
@item M-x view-buffer @key{RET} @var{buffer} @key{RET}
|
||||
Scroll through buffer @var{buffer}.
|
||||
Scroll through buffer @var{buffer}. @xref{View Mode}.
|
||||
@end table
|
||||
|
||||
@kindex C-x C-q
|
||||
|
|
@ -251,13 +252,13 @@ do @kbd{M-x shell} again, it makes a new shell buffer named
|
|||
under its new name. This method is also good for mail buffers,
|
||||
compilation buffers, and most Emacs features that create special
|
||||
buffers with particular names. (With some of these features, such as
|
||||
@kbd{M-x compile}, @kbd{M-x grep} an @kbd{M-x info}, you need to
|
||||
switch to some other buffer before using the command, in order for it
|
||||
to make a different buffer.)
|
||||
@kbd{M-x compile}, @kbd{M-x grep}, you need to switch to some other
|
||||
buffer before using the command again, otherwise it will reuse the
|
||||
current buffer despite the name change.)
|
||||
|
||||
The commands @kbd{M-x append-to-buffer} and @kbd{M-x insert-buffer}
|
||||
can be used to copy text from one buffer to another. @xref{Accumulating
|
||||
Text}.
|
||||
can also be used to copy text from one buffer to another.
|
||||
@xref{Accumulating Text}.
|
||||
|
||||
@node Kill Buffer
|
||||
@section Killing Buffers
|
||||
|
|
|
|||
|
|
@ -493,7 +493,7 @@ attribute is taken from the face named @code{default}.
|
|||
|
||||
The @code{default} face is the default for displaying text, and all
|
||||
of its attributes are specified. Its background color is also used as
|
||||
the frame's background color.
|
||||
the frame's background color. @xref{Colors}.
|
||||
|
||||
@cindex cursor face
|
||||
Another special face is the @code{cursor} face. On graphical
|
||||
|
|
@ -524,16 +524,18 @@ specify a color for a face---for instance, when customizing the face
|
|||
or an @dfn{RGB triplet}.
|
||||
|
||||
@findex list-colors-display
|
||||
@vindex list-colors-sort
|
||||
A color name is a pre-defined name, such as @samp{dark orange} or
|
||||
@samp{medium sea green}. To view a list of color names, type @kbd{M-x
|
||||
list-colors-display}. If you run this command on a graphical display,
|
||||
it shows the full range of color names known to Emacs (these are the
|
||||
standard X11 color names, defined in X's @file{rgb.txt} file). If you
|
||||
run the command on a text-only terminal, it shows only a small subset
|
||||
of colors that can be safely displayed on such terminals. However,
|
||||
Emacs understands X11 color names even on text-only terminals; if a
|
||||
face is given a color specified by an X11 color name, it is displayed
|
||||
using the closest-matching terminal color.
|
||||
list-colors-display}. To control the order in which colors are shown,
|
||||
customize @code{list-colors-sort}. If you run this command on a
|
||||
graphical display, it shows the full range of color names known to Emacs
|
||||
(these are the standard X11 color names, defined in X's @file{rgb.txt}
|
||||
file). If you run the command on a text-only terminal, it shows only a
|
||||
small subset of colors that can be safely displayed on such terminals.
|
||||
However, Emacs understands X11 color names even on text-only terminals;
|
||||
if a face is given a color specified by an X11 color name, it is
|
||||
displayed using the closest-matching terminal color.
|
||||
|
||||
An RGB triplet is a string of the form @samp{#RRGGBB}. Each of the
|
||||
R, G, and B components is a hexadecimal number specifying the
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@c It would be nicer to generate this using configure and @version@.
|
||||
@c However, that would mean emacsver.texi would always be newer
|
||||
@c then the info files in release tarfiles.
|
||||
@set EMACSVER 24.0.92
|
||||
@set EMACSVER 24.0.93
|
||||
|
|
|
|||
|
|
@ -1907,15 +1907,26 @@ point. Partial Completion mode offers other features extending
|
|||
|
||||
@findex image-mode
|
||||
@findex image-toggle-display
|
||||
@findex image-toggle-animation
|
||||
@cindex images, viewing
|
||||
@cindex image animation
|
||||
@cindex animated images
|
||||
Visiting image files automatically selects Image mode. This major
|
||||
mode allows you to toggle between displaying the file as an image in
|
||||
the Emacs buffer, and displaying its underlying text representation,
|
||||
using the command @kbd{C-c C-c} (@code{image-toggle-display}). This
|
||||
works only when Emacs can display the specific image type. If the
|
||||
displayed image is wider or taller than the frame, the usual point
|
||||
motion keys (@kbd{C-f}, @kbd{C-p}, and so forth) cause different parts
|
||||
of the image to be displayed.
|
||||
works only when Emacs can display the specific image type@footnote{If
|
||||
your Emacs was compiled with ImageMagick support, then after using
|
||||
@code{imagemagick-register-types}, you can view in Image mode any
|
||||
image type that ImageMagick supports; @pxref{ImageMagick Images,,,
|
||||
elisp, The Emacs Lisp Reference Manual}}. If the displayed image is wider
|
||||
or taller than the frame, the usual point motion keys (@kbd{C-f},
|
||||
@kbd{C-p}, and so forth) cause different parts of the image to be
|
||||
displayed. If the image can be animated, then the command @kbd{RET}
|
||||
(@code{image-toggle-animation}), will start (or stop) animating it.
|
||||
Animation plays once, unless the option @code{image-animate-loop} is
|
||||
non-@code{nil}. Currently, Emacs only supports animated GIF files
|
||||
(@pxref{Animated Images,,, elisp, The Emacs Lisp Reference Manual}).
|
||||
|
||||
@findex thumbs-mode
|
||||
@findex mode, thumbs
|
||||
|
|
@ -1936,20 +1947,20 @@ adds a @samp{Filesets} menu to the menu bar.
|
|||
|
||||
@findex filesets-add-buffer
|
||||
@findex filesets-remove-buffer
|
||||
The simplest way to define a fileset is by adding files to it one
|
||||
at a time. To add a file to fileset @var{name}, visit the file and
|
||||
type @kbd{M-x filesets-add-buffer @kbd{RET} @var{name} @kbd{RET}}. If
|
||||
The simplest way to define a fileset is by adding files to it one at
|
||||
a time. To add a file to fileset @var{name}, visit the file and type
|
||||
@kbd{M-x filesets-add-buffer @kbd{RET} @var{name} @kbd{RET}}. If
|
||||
there is no fileset @var{name}, this creates a new one, which
|
||||
initially creates only the current file. The command @kbd{M-x
|
||||
initially contains only the current file. The command @kbd{M-x
|
||||
filesets-remove-buffer} removes the current file from a fileset.
|
||||
|
||||
You can also edit the list of filesets directly, with @kbd{M-x
|
||||
filesets-edit} (or by choosing @samp{Edit Filesets} from the
|
||||
@samp{Filesets} menu). The editing is performed in a Customize buffer
|
||||
(@pxref{Easy Customization}). Filesets need not be a simple list of
|
||||
files---you can also define filesets using regular expression matching
|
||||
file names. Some examples of these more complicated filesets are
|
||||
shown in the Customize buffer. Remember to select @samp{Save for
|
||||
(@pxref{Easy Customization}). Normally, a fileset is a simple list of
|
||||
files, but you can also define a fileset as a regular expression
|
||||
matching file names. Some examples of these more complicated filesets
|
||||
are shown in the Customize buffer. Remember to select @samp{Save for
|
||||
future sessions} if you want to use the same filesets in future Emacs
|
||||
sessions.
|
||||
|
||||
|
|
|
|||
|
|
@ -370,7 +370,6 @@ side-by-side windows with the boundary running through the click
|
|||
position (@pxref{Split Window}).
|
||||
@end table
|
||||
|
||||
@kindex C-Mouse-2 @r{(scroll bar)}
|
||||
@kindex Mouse-1 @r{(scroll bar)}
|
||||
Furthermore, by clicking and dragging @kbd{Mouse-1} on the divider
|
||||
between two side-by-side mode lines, you can move the vertical
|
||||
|
|
|
|||
|
|
@ -130,6 +130,18 @@ open the dragged files in the current frame use the following line:
|
|||
@end lisp
|
||||
|
||||
|
||||
@subsection Customization options specific to Mac OS / GNUstep
|
||||
|
||||
The following customization options are specific to the Nextstep port.
|
||||
|
||||
@table @code
|
||||
@item ns-auto-hide-menu-bar
|
||||
Non-nil means the menu-bar is hidden by default, but appears if you
|
||||
move the mouse pointer over it. (Requires OS X 10.6 or later.)
|
||||
|
||||
@end table
|
||||
|
||||
|
||||
@node Mac / GNUstep Events, GNUstep Support, Mac / GNUstep Customization, Mac OS / GNUstep
|
||||
@section Windowing System Events under Mac OS / GNUstep
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@
|
|||
@chapter Maintaining Large Programs
|
||||
|
||||
This chapter describes Emacs features for maintaining large
|
||||
programs.
|
||||
programs. If you are maintaining a large Lisp program, then in
|
||||
addition to the features described here, you may find
|
||||
the @file{ERT} (``Emacs Lisp Regression Testing'') library useful
|
||||
(@pxref{Top,,ERT,ert, Emacs Lisp Regression Testing}).
|
||||
|
||||
@menu
|
||||
* Version Control:: Using version control systems.
|
||||
|
|
|
|||
|
|
@ -195,6 +195,12 @@ possible completions. @xref{Other Window}.
|
|||
the minibuffer is active. To allow such commands in the minibuffer,
|
||||
set the variable @code{enable-recursive-minibuffers} to @code{t}.
|
||||
|
||||
@findex minibuffer-inactive-mode
|
||||
When not active, the minibuffer is in @code{minibuffer-inactive-mode},
|
||||
and clicking @kbd{Mouse-1} there shows the @samp{*Messages*} buffer.
|
||||
If you use a dedicated frame for minibuffers, Emacs also recognizes
|
||||
certain keys there, for example @kbd{n} to make a new frame.
|
||||
|
||||
@node Completion
|
||||
@section Completion
|
||||
@c This node is referenced in the tutorial. When renaming or deleting
|
||||
|
|
|
|||
|
|
@ -1415,6 +1415,12 @@ paragraph commands to work on. Auto Fill mode, if enabled in a
|
|||
programming language major mode, indents the new lines which it
|
||||
creates.
|
||||
|
||||
@findex electric-layout-mode
|
||||
Electric Layout mode (@kbd{M-x electric-layout-mode}) is a global
|
||||
minor mode that automatically inserts newlines when you type certain
|
||||
characters; for example, @samp{@{}, @samp{@}} and @samp{;} in Javascript
|
||||
mode.
|
||||
|
||||
Apart from Hideshow mode (@pxref{Hideshow}), another way to
|
||||
selectively display parts of a program is to use the selective display
|
||||
feature (@pxref{Selective Display}). Programming modes often also
|
||||
|
|
|
|||
|
|
@ -1118,7 +1118,7 @@ buffer before sorting it.
|
|||
@section Display of Messages
|
||||
|
||||
This section describes how Rmail displays mail headers,
|
||||
@acronym{MIME} sections and attachments, and URLs.
|
||||
@acronym{MIME} sections and attachments, URLs, and encrypted messages.
|
||||
|
||||
@table @kbd
|
||||
@item t
|
||||
|
|
@ -1209,6 +1209,12 @@ variable @code{rmail-enable-mime} to @code{nil}. When this is the
|
|||
case, the @kbd{v} (@code{rmail-mime}) command instead creates a
|
||||
temporary buffer to display the current @acronym{MIME} message.
|
||||
|
||||
@findex rmail-epa-decrypt
|
||||
@cindex encrypted mails (reading in Rmail)
|
||||
If the current message is an encrypted one, use the command @kbd{M-x
|
||||
rmail-epa-decrypt} to decrypt it, using the EasyPG library
|
||||
(@pxref{Top,,, epa, EasyPG Assistant User's Manual}).
|
||||
|
||||
You can highlight and activate URLs in the Rmail buffer using Goto
|
||||
Address mode:
|
||||
|
||||
|
|
|
|||
|
|
@ -546,11 +546,11 @@ made by Text mode and is available only in that and related modes
|
|||
newline as the end of a sentence; a period followed by just one space
|
||||
indicates an abbreviation, not the end of a sentence. Accordingly,
|
||||
the fill commands will not break a line after a period followed by
|
||||
just one space. If you change the variable
|
||||
@code{sentence-end-double-space} to a non-@code{nil} value, the fill
|
||||
commands will break a line after a period followed by one space, and
|
||||
put just one space after each period. @xref{Sentences}, for other
|
||||
effects and possible drawbacks of this.
|
||||
just one space. If you set the variable
|
||||
@code{sentence-end-double-space} to @code{nil}, the fill commands will
|
||||
break a line after a period followed by one space, and put just one
|
||||
space after each period. @xref{Sentences}, for other effects and
|
||||
possible drawbacks of this.
|
||||
|
||||
@vindex colon-double-space
|
||||
If the variable @code{colon-double-space} is non-@code{nil}, the
|
||||
|
|
@ -1302,7 +1302,7 @@ lines but no body lines, and (iii) showing everything.
|
|||
body lines and subtree (if any), by typing @kbd{M-<up>}
|
||||
(@code{org-metaup}) or @kbd{M-<down>} (@code{org-metadown}) on the
|
||||
heading line. Similarly, you can promote or demote a heading line
|
||||
with @kbd{M-<left>} (@code{org-metaleft}) and @kbd{M-<left>}
|
||||
with @kbd{M-<left>} (@code{org-metaleft}) and @kbd{M-<right>}
|
||||
(@code{org-metaright}). These commands execute their global bindings
|
||||
if invoked on a body line.
|
||||
|
||||
|
|
@ -1591,12 +1591,15 @@ variable @code{latex-block-names}.
|
|||
|
||||
@findex tex-close-latex-block
|
||||
@kindex C-c C-e @r{(La@TeX{} mode)}
|
||||
@findex latex-electric-env-pair-mode
|
||||
In La@TeX{} input, @samp{\begin} and @samp{\end} tags must balance.
|
||||
You can use @kbd{C-c C-e} (@code{tex-close-latex-block}) to insert an
|
||||
@samp{\end} tag which matches the last unmatched @samp{\begin}. It
|
||||
also indents the @samp{\end} to match the corresponding @samp{\begin},
|
||||
and inserts a newline after the @samp{\end} tag if point is at the
|
||||
beginning of a line.
|
||||
beginning of a line. The minor mode @code{latex-electric-env-pair-mode}
|
||||
automatically inserts an @samp{\end} or @samp{\begin} tag for you
|
||||
when you type the corresponding one.
|
||||
|
||||
@node TeX Print
|
||||
@subsection @TeX{} Printing Commands
|
||||
|
|
|
|||
|
|
@ -592,9 +592,10 @@ When you have finished writing your report, type @kbd{C-c C-c} and it
|
|||
will be sent to the Emacs maintainers at @email{bug-gnu-emacs@@gnu.org}.
|
||||
(If you want to suggest an improvement or new feature, use the same
|
||||
address.) If you cannot send mail from inside Emacs, you can copy the
|
||||
text of your report to your normal mail client and send it to that
|
||||
address. Or you can simply send an email to that address describing
|
||||
the problem.
|
||||
text of your report to your normal mail client (if your system
|
||||
supports it, you can type @kbd{C-c m} to have Emacs do this for you)
|
||||
and send it to that address. Or you can simply send an email to that
|
||||
address describing the problem.
|
||||
|
||||
Your report will be sent to the @samp{bug-gnu-emacs} mailing list, and
|
||||
stored in the GNU Bug Tracker at @url{http://debbugs.gnu.org}. Please
|
||||
|
|
@ -784,6 +785,12 @@ non-@code{nil} will start the Lisp debugger and show a backtrace.
|
|||
This backtrace is useful for debugging such long loops, so if you can
|
||||
produce it, copy it into the bug report.
|
||||
|
||||
@vindex debug-on-event
|
||||
If you cannot get Emacs to respond to @kbd{C-g} (e.g., because
|
||||
@code{inhibit-quit} is set), then you can try sending the signal
|
||||
specified by @code{debug-on-event} (default SIGUSR2) from outside
|
||||
Emacs to cause it to enter the debugger.
|
||||
|
||||
@item
|
||||
Check whether any programs you have loaded into the Lisp world,
|
||||
including your initialization file, set any variables that may affect
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ Split the selected window into two windows, one above the other
|
|||
Split the selected window into two windows, positioned side by side
|
||||
(@code{split-window-right}).
|
||||
@item C-Mouse-2
|
||||
In the mode line or scroll bar of a window, split that window.
|
||||
In the mode line of a window, split that window.
|
||||
@end table
|
||||
|
||||
@kindex C-x 2
|
||||
|
|
@ -125,11 +125,14 @@ lines in every partial-width window regardless of its width.
|
|||
On text terminals, side-by-side windows are separated by a vertical
|
||||
divider which is drawn using the @code{vertical-border} face.
|
||||
|
||||
@kindex C-Mouse-2 @r{(mode line)}
|
||||
@kindex C-Mouse-2 @r{(scroll bar)}
|
||||
You can also split a window horizontally or vertically by clicking
|
||||
@kbd{C-Mouse-2} in the mode line or the scroll bar. If you click on
|
||||
the mode line, that puts the vertical divider where you click; if you
|
||||
click in the scroll bar, that puts the new mode-line where you click.
|
||||
If you click @kbd{C-Mouse-2} in the mode line of a window, that
|
||||
splits the window, putting a vertical divider where you click.
|
||||
Depending on how Emacs is compiled, you can also split a window by
|
||||
clicking @kbd{C-Mouse-2} in the scroll bar, which puts a horizontal
|
||||
divider where you click (this feature does not work when Emacs uses
|
||||
GTK+ scroll bars).
|
||||
|
||||
@node Other Window
|
||||
@section Using Other Windows
|
||||
|
|
|
|||
|
|
@ -1,3 +1,17 @@
|
|||
2012-01-28 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* emacs-lisp-intro.texi (Top): Move setting of COUNT-WORDS outside
|
||||
of @menu. (Bug#10628)
|
||||
|
||||
2012-01-19 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* emacs-lisp-intro.texi (count-words-in-defun):
|
||||
Add missing parenthesis (bug#10544).
|
||||
|
||||
2012-01-17 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* emacs-lisp-intro.texi (re-search-forward): Fix typo.
|
||||
|
||||
2011-11-24 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* makefile.w32-in: Update dependencies.
|
||||
|
|
|
|||
|
|
@ -334,6 +334,9 @@ every node in every chapter.
|
|||
@c global@pageno = -11
|
||||
@c end iftex
|
||||
|
||||
@set COUNT-WORDS count-words-example
|
||||
@c Length of variable name chosen so that things still line up when expanded.
|
||||
|
||||
@menu
|
||||
* Preface:: What to look for.
|
||||
* List Processing:: What is Lisp?
|
||||
|
|
@ -702,8 +705,6 @@ Regular Expression Searches
|
|||
* fwd-para while:: The forward motion @code{while} loop.
|
||||
|
||||
Counting: Repetition and Regexps
|
||||
@set COUNT-WORDS count-words-example
|
||||
@c Length of variable name chosen so that things still line up when expanded.
|
||||
|
||||
* Why Count Words::
|
||||
* @value{COUNT-WORDS}:: Use a regexp, but find a problem.
|
||||
|
|
@ -12607,7 +12608,7 @@ four arguments:
|
|||
@enumerate
|
||||
@item
|
||||
The first argument is the regular expression that the function searches
|
||||
for. The regular expression will be a string between quotations marks.
|
||||
for. The regular expression will be a string between quotation marks.
|
||||
|
||||
@item
|
||||
The optional second argument limits how far the function will search; it is a
|
||||
|
|
@ -15012,7 +15013,7 @@ expression for this (@pxref{Syntax}), so the loop is straightforward:
|
|||
@group
|
||||
(while (and (< (point) end)
|
||||
(re-search-forward
|
||||
"\\(\\w\\|\\s_\\)+[^ \t\n]*[ \t\n]*" end t)
|
||||
"\\(\\w\\|\\s_\\)+[^ \t\n]*[ \t\n]*" end t))
|
||||
(setq count (1+ count)))
|
||||
@end group
|
||||
@end smallexample
|
||||
|
|
|
|||
|
|
@ -1,3 +1,321 @@
|
|||
2012-02-10 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* control.texi (Handling Errors): Change condition-case-no-debug
|
||||
to condition-case-unless-debug.
|
||||
|
||||
2012-02-10 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* advice.texi (Defining Advice): Clarify ad-unadvise.
|
||||
(Activation of Advice): Specifying the ACTIVATE flag in defadvice
|
||||
is not abnormal.
|
||||
(Advising Primitives): Node deleted; ad-define-subr-args has been
|
||||
removed.
|
||||
|
||||
* compile.texi (Speed of Byte-Code): Use float-time in example.
|
||||
(Compilation Functions): Note that the log uses Compilation mode.
|
||||
Don't discuss the contents of byte-code function object here.
|
||||
(Compilation Functions): De-document internal function byte-code.
|
||||
(Docs and Compilation): Minor clarifications.
|
||||
|
||||
* objects.texi (Byte-Code Type): Add xref to Byte-Code Function
|
||||
Objects.
|
||||
|
||||
2012-02-10 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* text.texi (Checksum/Hash): Rename node from MD5 Checksum.
|
||||
Mention secure-hash.
|
||||
* elisp.texi, vol1.texi, vol2.texi: Update menu entry.
|
||||
|
||||
2012-02-10 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* loading.texi (Loading): Don't emphasize "library" terminology.
|
||||
(Library Search): load-path is not a user option. Mention role of
|
||||
-L option and packages. Improve examples.
|
||||
(Loading Non-ASCII): Don't mention unibyte Emacs, which is
|
||||
obsolete.
|
||||
(Autoload): Minor clarifications.
|
||||
|
||||
2012-02-10 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* files.texi (Magic File Names): Tweak remote-file-name-inhibit-cache.
|
||||
|
||||
* modes.texi (Basic Major Modes): Mention tabulated-list-mode.
|
||||
|
||||
2012-02-08 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* loading.texi (Named Features): Update the require example.
|
||||
|
||||
2012-02-07 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* modes.texi (Defining Minor Modes):
|
||||
Expand on args of defined minor modes.
|
||||
|
||||
2012-02-07 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* variables.texi (Creating Buffer-Local): Minor clarification
|
||||
to buffer-local-variables doc (Bug#10715).
|
||||
|
||||
2012-02-07 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* display.texi (ImageMagick Images): General update.
|
||||
Move most details of imagemagick-render-type to the variable's doc.
|
||||
|
||||
2012-02-06 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* keymaps.texi (Tool Bar): Mention separators.
|
||||
(Inheritance and Keymaps):
|
||||
Mention make-composed-keymap and multiple inheritance.
|
||||
|
||||
* modes.texi (Running Hooks): Mention run-hook-wrapped.
|
||||
|
||||
* control.texi (Handling Errors):
|
||||
Mention condition-case-no-debug and with-demoted-errors.
|
||||
|
||||
2012-02-05 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* customize.texi (Common Keywords): Minor clarifications.
|
||||
Document custom-unlispify-remove-prefixes.
|
||||
(Variable Definitions): Backquotes in defcustom seem to work fine
|
||||
now. Various other copyedits.
|
||||
(Simple Types): Copyedits. Document color selector.
|
||||
(Composite Types): Copyedits.
|
||||
(Splicing into Lists): Clarifications.
|
||||
|
||||
* eval.texi (Backquote): Move from macros.texi.
|
||||
|
||||
* macros.texi (Expansion): Minor clarification.
|
||||
(Backquote): Move node to eval.texi.
|
||||
(Defining Macros): Move an example from Backquote node.
|
||||
(Argument Evaluation): No need to mention Pascal.
|
||||
(Indenting Macros): Add xref to Defining Macros.
|
||||
|
||||
2012-02-05 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* debugging.texi (Error Debugging): Mention debug-on-event default.
|
||||
|
||||
2012-02-04 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* backups.texi (Reverting): Mention revert-buffer-in-progress-p.
|
||||
|
||||
* debugging.texi (Error Debugging): Mention debug-on-event.
|
||||
* commands.texi (Misc Events): Mention sigusr1,2 and debugging.
|
||||
|
||||
* modes.texi (Running Hooks): Try to clarify with-wrapper-hook.
|
||||
|
||||
* text.texi (Buffer Contents):
|
||||
Update filter-buffer-substring description.
|
||||
|
||||
2012-02-04 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* functions.texi (What Is a Function): Add closures. Mention
|
||||
"return value" terminology. Add xref for command-execute. Remove
|
||||
unused "keystroke command" terminology.
|
||||
(Lambda Expressions): Give a different example than in the
|
||||
following subsection. Add xref to Anonymous Functions.
|
||||
(Function Documentation): Remove gratuitous markup.
|
||||
(Function Names): Move introductory text to `What Is a Function'.
|
||||
(Defining Functions): Fix defun argument spec.
|
||||
(Anonymous Functions): Document lambda macro explicitly. Mention
|
||||
effects on lexical binding.
|
||||
(Function Cells): Downplay direct usage of fset.
|
||||
(Closures): New node.
|
||||
(Inline Functions): Remove "open-code" terminology.
|
||||
(Declaring Functions): Minor tweak; .m is not C code.
|
||||
|
||||
* variables.texi (Variables): Don't refer to "global value".
|
||||
(Local Variables, Void Variables): Copyedits.
|
||||
(Lexical Binding): Minor clarification of example.
|
||||
(File Local Variables): Mention :safe and :risky defcustom args.
|
||||
(Lexical Binding): Add xref to Closures node.
|
||||
|
||||
2012-02-04 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* minibuf.texi (High-Level Completion): Updates for read-color.
|
||||
|
||||
2012-02-03 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* display.texi (GIF Images): Mention animation.
|
||||
Remove commented-out old example of animation.
|
||||
(Animated Images): New subsection.
|
||||
* elisp.texi (Top):
|
||||
* vol1.texi (Top):
|
||||
* vol2.texi (Top): Add Animated Images menu entry.
|
||||
|
||||
* display.texi (Image Formats): Remove oddly specific information
|
||||
on versions of image libraries.
|
||||
(GIF Images, TIFF Images): Minor rephrasing.
|
||||
|
||||
2012-02-02 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* processes.texi (Synchronous Processes):
|
||||
Mention call-process's :file gets overwritten.
|
||||
|
||||
* commands.texi (Reading One Event):
|
||||
* help.texi (Help Functions): Document read-char-choice.
|
||||
|
||||
* hooks.texi (Standard Hooks):
|
||||
* modes.texi (Keymaps and Minor Modes):
|
||||
* text.texi (Commands for Insertion): Document post-self-insert-hook.
|
||||
|
||||
* hooks.texi (Standard Hooks): Add prog-mode-hook.
|
||||
|
||||
* hooks.texi (Standard Hooks):
|
||||
* modes.texi (Major Mode Conventions, Mode Hooks):
|
||||
Document change-major-mode-after-body-hook.
|
||||
|
||||
2012-02-01 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* modes.texi (Defining Minor Modes):
|
||||
Mention disabling global minor modes on a per-major-mode basis.
|
||||
|
||||
2012-01-31 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* syntax.texi (Parsing Expressions): Clarify intro (Bug#10657).
|
||||
(Parser State): Remove unnecessary statement (Bug#10661).
|
||||
|
||||
* eval.texi (Intro Eval): Add footnote about "sexp" terminology.
|
||||
|
||||
2012-01-31 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* modes.texi (Defining Minor Modes):
|
||||
Document define-minor-mode's new :variable keyword.
|
||||
|
||||
2012-01-29 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* syntax.texi (Syntax Class Table): Tweak description of newline
|
||||
char syntax (Bug#9619).
|
||||
|
||||
* numbers.texi (Predicates on Numbers): Fix wholenump/natnump
|
||||
description (Bug#10189).
|
||||
|
||||
2012-01-29 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* files.texi (Changing Files): Document SELinux support.
|
||||
|
||||
* windows.texi (Window Sizes): Fix typo.
|
||||
|
||||
2012-01-28 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* display.texi (Fringe Indicators): Clarify fringe-indicator-alist
|
||||
doc (Bug#8568).
|
||||
|
||||
* frames.texi (Input Focus): Add NORECORD arg to
|
||||
select-frame-set-input-focus. Clarify its role in select-frame.
|
||||
|
||||
* text.texi (Transposition): We don't use transpose-region as an
|
||||
internal subroutine (Bug#3249).
|
||||
|
||||
* modes.texi (Example Major Modes): Update Lisp example code to
|
||||
current sources. Delete the old non-derived-major-mode example,
|
||||
which has diverged badly from current sources.
|
||||
|
||||
2012-01-27 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* makefile.w32-in (texinputdir): Fix (presumed) typo.
|
||||
(VERSION, manual): Remove, unused.
|
||||
|
||||
2012-01-27 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* commands.texi (Command Overview): Minor clarification (Bug#10384).
|
||||
|
||||
2012-01-26 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* searching.texi (String Search): Document negative repeat count
|
||||
(Bug#10507).
|
||||
|
||||
2012-01-26 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* variables.texi (Using Lexical Binding):
|
||||
Mention that lexical-binding should be set in the first line.
|
||||
|
||||
2012-01-26 Lars Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* macros.texi (Defining Macros): Don't claim that `declare' only
|
||||
affects Edebug and indentation.
|
||||
|
||||
2012-01-25 Lars Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* macros.texi (Defining Macros): Slight `declare' fixup.
|
||||
|
||||
2012-01-25 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* makefile.w32-in (texinputdir):
|
||||
* Makefile.in (ENVADD): Add $emacsdir. (Bug#10603)
|
||||
|
||||
2012-01-24 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* variables.texi (Variables, Local Variables, Void Variables):
|
||||
Edit to make the descriptions less specific to dynamic binding.
|
||||
(Local Variables): Default max-specpdl-size is now 1300.
|
||||
(Defining Variables): Edits for lexical scoping. Delete
|
||||
information about starting docstrings with *. De-document
|
||||
user-variable-p.
|
||||
(Tips for Defining): Remove an unimportant discussion of quitting
|
||||
in the middle of a load.
|
||||
(Accessing Variables, Setting Variables): Discuss lexical binding.
|
||||
(Variable Scoping): Rewrite.
|
||||
(Scope, Extent, Impl of Scope): Nodes deleted.
|
||||
(Dynamic Binding): New node, with material from Scope, Extent, and
|
||||
Impl of Scope nodes.
|
||||
(Dynamic Binding Tips): Rename from Using Scoping.
|
||||
(Lexical Binding): Rewrite.
|
||||
(Using Lexical Binding): Rename from Converting to Lexical
|
||||
Binding. Convert to subsection.
|
||||
|
||||
* customize.texi (Variable Definitions): Add custom-variable-p.
|
||||
Move user-variable-p documentation here.
|
||||
|
||||
2012-01-23 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* strings.texi (Text Comparison): Minor qualification.
|
||||
|
||||
* lists.texi (Cons Cells): Copyedits.
|
||||
(List Elements): Mention push.
|
||||
(List Variables): Mention pop.
|
||||
(Rings): Move to sequences.texi.
|
||||
|
||||
* sequences.texi (Sequence Functions): Don't repeat the
|
||||
introduction already given in the parent.
|
||||
(Vectors): Copyedits.
|
||||
(Rings): Move from lists.texi. Note that this is specific to the
|
||||
ring package.
|
||||
|
||||
* symbols.texi (Definitions, Symbol Components): Mention variable
|
||||
scoping issues.
|
||||
(Plists and Alists): Copyedits.
|
||||
|
||||
* eval.texi (Intro Eval, Symbol Forms): Minor tweaks for
|
||||
correctness with lexical scoping.
|
||||
(Eval): Copyedits.
|
||||
|
||||
2012-01-21 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* intro.texi (A Sample Function Description): Special notation
|
||||
used for macros too.
|
||||
|
||||
* objects.texi (Ctl-Char Syntax, Other Char Bits): Copyedits.
|
||||
(Symbol Type): Add xref for keyword symbols.
|
||||
(Sequence Type): Clarify differences between sequence types.
|
||||
(Cons Cell Type): Add "linked list" index entry.
|
||||
(Non-ASCII in Strings): Copyedits.
|
||||
(Equality Predicates): Symbols with same name need not be eq.
|
||||
|
||||
* numbers.texi (Float Basics): Document isnan, copysign, frexp and
|
||||
ldexp. Move float-e and float-pi to Math Functions node.
|
||||
|
||||
2012-01-21 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* modes.texi (Auto Major Mode):
|
||||
* variables.texi (File Local Variables):
|
||||
Mention inhibit-local-variables-regexps.
|
||||
|
||||
2012-01-19 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* windows.texi (Window Configurations): Rewrite references to
|
||||
persistent window parameters.
|
||||
(Window Parameters): Fix description of persistent window
|
||||
parameters.
|
||||
|
||||
2012-01-16 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* windows.texi (Window Parameters): Use @pxref.
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ TEXI2DVI = texi2dvi
|
|||
TEXI2PDF = texi2pdf
|
||||
DVIPS = dvips
|
||||
|
||||
ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
|
||||
ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \
|
||||
MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
|
||||
|
||||
# List of all the texinfo files in the manual:
|
||||
|
|
|
|||
|
|
@ -13,30 +13,35 @@ for a library to customize functions defined within Emacs---cleaner
|
|||
than redefining the whole function.
|
||||
|
||||
@cindex piece of advice
|
||||
Each function can have multiple @dfn{pieces of advice}, separately
|
||||
defined. Each defined piece of advice can be @dfn{enabled} or
|
||||
@dfn{disabled} explicitly. All the enabled pieces of advice for any given
|
||||
function actually take effect when you @dfn{activate} advice for that
|
||||
Each function can have multiple @dfn{pieces of advice}, each of
|
||||
which can be separately defined and then @dfn{enabled} or
|
||||
@dfn{disabled}. All the enabled pieces of advice for any given
|
||||
function actually take effect when you @dfn{activate advice} for that
|
||||
function, or when you define or redefine the function. Note that
|
||||
enabling a piece of advice and activating advice for a function
|
||||
are not the same thing.
|
||||
enabling a piece of advice and activating advice for a function are
|
||||
not the same thing.
|
||||
|
||||
@strong{Usage Note:} Advice is useful for altering the behavior of
|
||||
existing calls to an existing function. If you want the new behavior
|
||||
for new calls, or for key bindings, you should define a new function
|
||||
(or a new command) which uses the existing function.
|
||||
Advice is useful for altering the behavior of existing calls to an
|
||||
existing function. If you want the new behavior for new function
|
||||
calls or new key bindings, you should define a new function or
|
||||
command, and have it use the existing function as a subroutine.
|
||||
|
||||
@strong{Usage note:} Advising a function can cause confusion in
|
||||
debugging, since people who debug calls to the original function may
|
||||
not notice that it has been modified with advice. Therefore, if you
|
||||
have the possibility to change the code of that function (or ask
|
||||
someone to do so) to run a hook, please solve the problem that way.
|
||||
Advice should be reserved for the cases where you cannot get the
|
||||
function changed.
|
||||
Advising a function can cause confusion in debugging, since people
|
||||
who debug calls to the original function may not notice that it has
|
||||
been modified with advice. Therefore, if you have the possibility to
|
||||
change the code of that function to run a hook, please solve the
|
||||
problem that way. Advice should be reserved for the cases where you
|
||||
cannot get the function changed. In particular, Emacs' own source
|
||||
files should not put advice on functions in Emacs. There are
|
||||
currently a few exceptions to this convention, but we aim to correct
|
||||
them.
|
||||
|
||||
In particular, this means that a file in Emacs should not put advice
|
||||
on a function in Emacs. There are currently a few exceptions to this
|
||||
convention, but we aim to correct them.
|
||||
Unless you know what you are doing, do @emph{not} advise a primitive
|
||||
(@pxref{What Is a Function}). Some primitives are used by the advice
|
||||
mechanism; advising them could cause an infinite recursion. Also,
|
||||
many primitives are called directly from C code. Calls to the
|
||||
primitive from Lisp code will take note of the advice, but calls from
|
||||
C code will ignore the advice.
|
||||
|
||||
@menu
|
||||
* Simple Advice:: A simple example to explain the basics of advice.
|
||||
|
|
@ -48,7 +53,6 @@ convention, but we aim to correct them.
|
|||
* Preactivation:: Preactivation is a way of speeding up the
|
||||
loading of compiled advice.
|
||||
* Argument Access in Advice:: How advice can access the function's arguments.
|
||||
* Advising Primitives:: Accessing arguments when advising a primitive.
|
||||
* Combined Definition:: How advice is implemented.
|
||||
@end menu
|
||||
|
||||
|
|
@ -258,7 +262,7 @@ All subroutines used by the advice need to be available when the byte
|
|||
compiler expands the macro.
|
||||
|
||||
@deffn Command ad-unadvise function
|
||||
This command deletes the advice from @var{function}.
|
||||
This command deletes all pieces of advice from @var{function}.
|
||||
@end deffn
|
||||
|
||||
@deffn Command ad-unadvise-all
|
||||
|
|
@ -355,13 +359,13 @@ replaced with the new one.
|
|||
@cindex advice, activating
|
||||
|
||||
By default, advice does not take effect when you define it---only when
|
||||
you @dfn{activate} advice for the function that was advised. However,
|
||||
the advice will be activated automatically if you define or redefine
|
||||
the function later. You can request the activation of advice for a
|
||||
function when you define the advice, by specifying the @code{activate}
|
||||
flag in the @code{defadvice}. But normally you activate the advice
|
||||
for a function by calling the function @code{ad-activate} or one of
|
||||
the other activation commands listed below.
|
||||
you @dfn{activate} advice for the function. However, the advice will
|
||||
be activated automatically if you define or redefine the function
|
||||
later. You can request the activation of advice for a function when
|
||||
you define the advice, by specifying the @code{activate} flag in the
|
||||
@code{defadvice}; or you can activate the advice separately by calling
|
||||
the function @code{ad-activate} or one of the other activation
|
||||
commands listed below.
|
||||
|
||||
Separating the activation of advice from the act of defining it permits
|
||||
you to add several pieces of advice to one function efficiently, without
|
||||
|
|
@ -680,39 +684,6 @@ will be 3, and @var{r} will be @code{(2 1 0)} inside the body of
|
|||
These argument constructs are not really implemented as Lisp macros.
|
||||
Instead they are implemented specially by the advice mechanism.
|
||||
|
||||
@node Advising Primitives
|
||||
@section Advising Primitives
|
||||
@cindex advising primitives
|
||||
|
||||
Advising a primitive function (@pxref{What Is a Function}) is risky.
|
||||
Some primitive functions are used by the advice mechanism; advising
|
||||
them could cause an infinite recursion. Also, many primitive
|
||||
functions are called directly from C code. Calls to the primitive
|
||||
from Lisp code will take note of the advice, but calls from C code
|
||||
will ignore the advice.
|
||||
|
||||
When the advice facility constructs the combined definition, it needs
|
||||
to know the argument list of the original function. This is not
|
||||
always possible for primitive functions. When advice cannot determine
|
||||
the argument list, it uses @code{(&rest ad-subr-args)}, which always
|
||||
works but is inefficient because it constructs a list of the argument
|
||||
values. You can use @code{ad-define-subr-args} to declare the proper
|
||||
argument names for a primitive function:
|
||||
|
||||
@defun ad-define-subr-args function arglist
|
||||
This function specifies that @var{arglist} should be used as the
|
||||
argument list for function @var{function}.
|
||||
@end defun
|
||||
|
||||
For example,
|
||||
|
||||
@example
|
||||
(ad-define-subr-args 'fset '(sym newdef))
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
specifies the argument list for the function @code{fset}.
|
||||
|
||||
@node Combined Definition
|
||||
@section The Combined Definition
|
||||
|
||||
|
|
|
|||
|
|
@ -696,6 +696,9 @@ operation, reverting preserves all the markers. If they are not
|
|||
identical, reverting does change the buffer; in that case, it preserves
|
||||
the markers in the unchanged text (if any) at the beginning and end of
|
||||
the buffer. Preserving any additional markers would be problematical.
|
||||
|
||||
This command binds @code{revert-buffer-in-progress-p} to a
|
||||
non-@code{nil} value while it operates.
|
||||
@end deffn
|
||||
|
||||
You can customize how @code{revert-buffer} does its work by setting
|
||||
|
|
|
|||
|
|
@ -75,18 +75,22 @@ function yourself (@pxref{Keyboard Macros}).
|
|||
character causes @dfn{quitting} (@pxref{Quitting}).
|
||||
|
||||
@defvar pre-command-hook
|
||||
The editor command loop runs this normal hook before each command. At
|
||||
that time, @code{this-command} contains the command that is about to
|
||||
run, and @code{last-command} describes the previous command.
|
||||
@xref{Command Loop Info}.
|
||||
This normal hook is run by the editor command loop before it executes
|
||||
each command. At that time, @code{this-command} contains the command
|
||||
that is about to run, and @code{last-command} describes the previous
|
||||
command. @xref{Command Loop Info}.
|
||||
@end defvar
|
||||
|
||||
@defvar post-command-hook
|
||||
The editor command loop runs this normal hook after each command
|
||||
(including commands terminated prematurely by quitting or by errors),
|
||||
and also when the command loop is first entered. At that time,
|
||||
@code{this-command} refers to the command that just ran, and
|
||||
@code{last-command} refers to the command before that.
|
||||
This normal hook is run by the editor command loop after it executes
|
||||
each command (including commands terminated prematurely by quitting or
|
||||
by errors). At that time, @code{this-command} refers to the command
|
||||
that just ran, and @code{last-command} refers to the command before
|
||||
that.
|
||||
|
||||
This hook is also run when Emacs first enters the command loop (at
|
||||
which point @code{this-command} and @code{last-command} are both
|
||||
@code{nil}).
|
||||
@end defvar
|
||||
|
||||
Quitting is suppressed while running @code{pre-command-hook} and
|
||||
|
|
@ -1692,6 +1696,7 @@ parameters are used to display the help-echo text are described in
|
|||
These events are generated when the Emacs process receives
|
||||
the signals @code{SIGUSR1} and @code{SIGUSR2}. They contain no
|
||||
additional data because signals do not carry additional information.
|
||||
They can be useful for debugging (@pxref{Error Debugging}).
|
||||
|
||||
To catch a user signal, bind the corresponding event to an interactive
|
||||
command in the @code{special-event-map} (@pxref{Active Keymaps}).
|
||||
|
|
@ -2468,6 +2473,17 @@ The argument @var{prompt} is either a string to be displayed in the
|
|||
echo area as a prompt, or @code{nil}, meaning not to display a prompt.
|
||||
@end defun
|
||||
|
||||
@defun read-char-choice prompt chars &optional inhibit-quit
|
||||
This function uses @code{read-key} to read and return a single
|
||||
character. It ignores any input that is not a member of @var{chars},
|
||||
a list of accepted characters. Optionally, it will also ignore
|
||||
keyboard-quit events while it is waiting for valid input. If you bind
|
||||
@code{help-form} (@pxref{Help Functions}) to a non-@code{nil} value
|
||||
while calling @code{read-char-choice}, then pressing @code{help-char}
|
||||
causes it to evaluate @code{help-form} and display the result. It
|
||||
then continues to wait for a valid input character, or keyboard-quit.
|
||||
@end defun
|
||||
|
||||
@node Event Mod
|
||||
@subsection Modifying and Translating Input Events
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@ variable binding for @code{no-byte-compile} into it, like this:
|
|||
;; -*-no-byte-compile: t; -*-
|
||||
@end example
|
||||
|
||||
@xref{Compilation Errors}, for how to investigate errors occurring in
|
||||
byte compilation.
|
||||
|
||||
@menu
|
||||
* Speed of Byte-Code:: An example of speedup from byte compilation.
|
||||
* Compilation Functions:: Byte compilation functions.
|
||||
|
|
@ -56,18 +53,16 @@ Here is an example:
|
|||
@example
|
||||
@group
|
||||
(defun silly-loop (n)
|
||||
"Return time before and after N iterations of a loop."
|
||||
(let ((t1 (current-time-string)))
|
||||
(while (> (setq n (1- n))
|
||||
0))
|
||||
(list t1 (current-time-string))))
|
||||
"Return the time, in seconds, to run N iterations of a loop."
|
||||
(let ((t1 (float-time)))
|
||||
(while (> (setq n (1- n)) 0))
|
||||
(- (float-time) t1)))
|
||||
@result{} silly-loop
|
||||
@end group
|
||||
|
||||
@group
|
||||
(silly-loop 50000000)
|
||||
@result{} ("Wed Mar 11 21:10:19 2009"
|
||||
"Wed Mar 11 21:10:41 2009") ; @r{22 seconds}
|
||||
@result{} 10.235304117202759
|
||||
@end group
|
||||
|
||||
@group
|
||||
|
|
@ -77,18 +72,17 @@ Here is an example:
|
|||
|
||||
@group
|
||||
(silly-loop 50000000)
|
||||
@result{} ("Wed Mar 11 21:12:26 2009"
|
||||
"Wed Mar 11 21:12:32 2009") ; @r{6 seconds}
|
||||
@result{} 3.705854892730713
|
||||
@end group
|
||||
@end example
|
||||
|
||||
In this example, the interpreted code required 22 seconds to run,
|
||||
whereas the byte-compiled code required 6 seconds. These results are
|
||||
representative, but actual results will vary greatly.
|
||||
In this example, the interpreted code required 10 seconds to run,
|
||||
whereas the byte-compiled code required less than 4 seconds. These
|
||||
results are representative, but actual results may vary.
|
||||
|
||||
@node Compilation Functions
|
||||
@comment node-name, next, previous, up
|
||||
@section The Compilation Functions
|
||||
@section Byte-Compilation Functions
|
||||
@cindex compilation functions
|
||||
|
||||
You can byte-compile an individual function or macro definition with
|
||||
|
|
@ -96,43 +90,36 @@ the @code{byte-compile} function. You can compile a whole file with
|
|||
@code{byte-compile-file}, or several files with
|
||||
@code{byte-recompile-directory} or @code{batch-byte-compile}.
|
||||
|
||||
The byte compiler produces error messages and warnings about each file
|
||||
in a buffer called @samp{*Compile-Log*}. These report things in your
|
||||
program that suggest a problem but are not necessarily erroneous.
|
||||
Sometimes, the byte compiler produces warning and/or error messages
|
||||
(@pxref{Compiler Errors}, for details). These messages are recorded
|
||||
in a buffer called @samp{*Compile-Log*}, which uses Compilation mode.
|
||||
@xref{Compilation Mode,,,emacs, The GNU Emacs Manual}.
|
||||
|
||||
@cindex macro compilation
|
||||
Be careful when writing macro calls in files that you may someday
|
||||
byte-compile. Macro calls are expanded when they are compiled, so the
|
||||
macros must already be defined for proper compilation. For more
|
||||
details, see @ref{Compiling Macros}. If a program does not work the
|
||||
same way when compiled as it does when interpreted, erroneous macro
|
||||
definitions are one likely cause (@pxref{Problems with Macros}).
|
||||
Inline (@code{defsubst}) functions are less troublesome; if you
|
||||
Be careful when writing macro calls in files that you intend to
|
||||
byte-compile. Since macro calls are expanded when they are compiled,
|
||||
the macros need to be loaded into Emacs or the byte compiler will not
|
||||
do the right thing. The usual way to handle this is with
|
||||
@code{require} forms which specify the files containing the needed
|
||||
macro definitions (@pxref{Named Features}). Normally, the
|
||||
byte compiler does not evaluate the code that it is compiling, but it
|
||||
handles @code{require} forms specially, by loading the specified
|
||||
libraries. To avoid loading the macro definition files when someone
|
||||
@emph{runs} the compiled program, write @code{eval-when-compile}
|
||||
around the @code{require} calls (@pxref{Eval During Compile}). For
|
||||
more details, @xref{Compiling Macros}.
|
||||
|
||||
Inline (@code{defsubst}) functions are less troublesome; if you
|
||||
compile a call to such a function before its definition is known, the
|
||||
call will still work right, it will just run slower.
|
||||
|
||||
Normally, compiling a file does not evaluate the file's contents or
|
||||
load the file. But it does execute any @code{require} calls at top
|
||||
level in the file. One way to ensure that necessary macro definitions
|
||||
are available during compilation is to require the file that defines
|
||||
them (@pxref{Named Features}). To avoid loading the macro definition files
|
||||
when someone @emph{runs} the compiled program, write
|
||||
@code{eval-when-compile} around the @code{require} calls (@pxref{Eval
|
||||
During Compile}).
|
||||
|
||||
@defun byte-compile symbol
|
||||
This function byte-compiles the function definition of @var{symbol},
|
||||
replacing the previous definition with the compiled one. The function
|
||||
definition of @var{symbol} must be the actual code for the function;
|
||||
i.e., the compiler does not follow indirection to another symbol.
|
||||
@code{byte-compile} returns the new, compiled definition of
|
||||
@var{symbol}.
|
||||
|
||||
If @var{symbol}'s definition is a byte-code function object,
|
||||
@code{byte-compile} does nothing and returns @code{nil}. Lisp records
|
||||
only one function definition for any symbol, and if that is already
|
||||
compiled, non-compiled code is not available anywhere. So there is no
|
||||
way to ``compile the same definition again.''
|
||||
@code{byte-compile} does not handle function indirection. The return
|
||||
value is the byte-code function object which is the compiled
|
||||
definition of @var{symbol} (@pxref{Byte-Code Objects}).
|
||||
|
||||
@example
|
||||
@group
|
||||
|
|
@ -153,16 +140,15 @@ way to ``compile the same definition again.''
|
|||
@end group
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
The result is a byte-code function object. The string it contains is
|
||||
the actual byte-code; each character in it is an instruction or an
|
||||
operand of an instruction. The vector contains all the constants,
|
||||
variable names and function names used by the function, except for
|
||||
certain primitives that are coded as special instructions.
|
||||
If @var{symbol}'s definition is a byte-code function object,
|
||||
@code{byte-compile} does nothing and returns @code{nil}. It does not
|
||||
``compile the symbol's definition again'', since the original
|
||||
(non-compiled) code has already been replaced in the symbol's function
|
||||
cell by the byte-compiled code.
|
||||
|
||||
If the argument to @code{byte-compile} is a @code{lambda} expression,
|
||||
it returns the corresponding compiled code, but does not store
|
||||
it anywhere.
|
||||
The argument to @code{byte-compile} can also be a @code{lambda}
|
||||
expression. In that case, the function returns the corresponding
|
||||
compiled code but does not store it anywhere.
|
||||
@end defun
|
||||
|
||||
@deffn Command compile-defun &optional arg
|
||||
|
|
@ -252,19 +238,6 @@ files that have an up-to-date @samp{.elc} file.
|
|||
@end example
|
||||
@end defun
|
||||
|
||||
@defun byte-code code-string data-vector max-stack
|
||||
@cindex byte-code interpreter
|
||||
This function actually interprets byte-code. A byte-compiled function
|
||||
is actually defined with a body that calls @code{byte-code}. Don't call
|
||||
this function yourself---only the byte compiler knows how to generate
|
||||
valid calls to this function.
|
||||
|
||||
In Emacs version 18, byte-code was always executed by way of a call to
|
||||
the function @code{byte-code}. Nowadays, byte-code is usually executed
|
||||
as part of a byte-code function object, and only rarely through an
|
||||
explicit call to @code{byte-code}.
|
||||
@end defun
|
||||
|
||||
@node Docs and Compilation
|
||||
@section Documentation Strings and Compilation
|
||||
@cindex dynamic loading of documentation
|
||||
|
|
@ -290,33 +263,11 @@ then further access to documentation strings in this file will
|
|||
probably give nonsense results.
|
||||
@end itemize
|
||||
|
||||
If your site installs Emacs following the usual procedures, these
|
||||
problems will never normally occur. Installing a new version uses a new
|
||||
directory with a different name; as long as the old version remains
|
||||
installed, its files will remain unmodified in the places where they are
|
||||
expected to be.
|
||||
|
||||
However, if you have built Emacs yourself and use it from the
|
||||
directory where you built it, you will experience this problem
|
||||
occasionally if you edit and recompile Lisp files. When it happens, you
|
||||
can cure the problem by reloading the file after recompiling it.
|
||||
|
||||
You can turn off this feature at compile time by setting
|
||||
@code{byte-compile-dynamic-docstrings} to @code{nil}; this is useful
|
||||
mainly if you expect to change the file, and you want Emacs processes
|
||||
that have already loaded it to keep working when the file changes.
|
||||
You can do this globally, or for one source file by specifying a
|
||||
file-local binding for the variable. One way to do that is by adding
|
||||
this string to the file's first line:
|
||||
|
||||
@example
|
||||
-*-byte-compile-dynamic-docstrings: nil;-*-
|
||||
@end example
|
||||
|
||||
@defvar byte-compile-dynamic-docstrings
|
||||
If this is non-@code{nil}, the byte compiler generates compiled files
|
||||
that are set up for dynamic loading of documentation strings.
|
||||
@end defvar
|
||||
@noindent
|
||||
These problems normally occur only if you build Emacs yourself and use
|
||||
it from the directory where you built it, and you happen to edit
|
||||
and/or recompile the Lisp source files. They can be easily cured by
|
||||
reloading each file after recompiling it.
|
||||
|
||||
@cindex @samp{#@@@var{count}}
|
||||
@cindex @samp{#$}
|
||||
|
|
@ -328,6 +279,23 @@ string.'' It is usually best not to use these constructs in Lisp source
|
|||
files, since they are not designed to be clear to humans reading the
|
||||
file.
|
||||
|
||||
You can disable the dynamic documentation string feature at compile
|
||||
time by setting @code{byte-compile-dynamic-docstrings} to @code{nil};
|
||||
this is useful mainly if you expect to change the file, and you want
|
||||
Emacs processes that have already loaded it to keep working when the
|
||||
file changes. You can do this globally, or for one source file by
|
||||
specifying a file-local binding for the variable. One way to do that
|
||||
is by adding this string to the file's first line:
|
||||
|
||||
@example
|
||||
-*-byte-compile-dynamic-docstrings: nil;-*-
|
||||
@end example
|
||||
|
||||
@defvar byte-compile-dynamic-docstrings
|
||||
If this is non-@code{nil}, the byte compiler generates compiled files
|
||||
that are set up for dynamic loading of documentation strings.
|
||||
@end defvar
|
||||
|
||||
@node Dynamic Loading
|
||||
@section Dynamic Loading of Individual Functions
|
||||
|
||||
|
|
@ -541,17 +509,16 @@ one you intend to suppress.
|
|||
@cindex byte-code function
|
||||
|
||||
Byte-compiled functions have a special data type: they are
|
||||
@dfn{byte-code function objects}.
|
||||
@dfn{byte-code function objects}. Whenever such an object appears as
|
||||
a function to be called, Emacs uses the byte-code interpreter to
|
||||
execute the byte-code.
|
||||
|
||||
Internally, a byte-code function object is much like a vector;
|
||||
however, the evaluator handles this data type specially when it appears
|
||||
as a function to be called. The printed representation for a byte-code
|
||||
function object is like that for a vector, with an additional @samp{#}
|
||||
before the opening @samp{[}.
|
||||
|
||||
A byte-code function object must have at least four elements; there is
|
||||
no maximum number, but only the first six elements have any normal use.
|
||||
They are:
|
||||
Internally, a byte-code function object is much like a vector; its
|
||||
elements can be accessed using @code{aref}. Its printed
|
||||
representation is like that for a vector, with an additional @samp{#}
|
||||
before the opening @samp{[}. It must have at least four elements;
|
||||
there is no maximum number, but only the first six elements have any
|
||||
normal use. They are:
|
||||
|
||||
@table @var
|
||||
@item arglist
|
||||
|
|
@ -588,7 +555,7 @@ representation. It is the definition of the command
|
|||
[arg 1 forward-sexp]
|
||||
2
|
||||
254435
|
||||
"p"]
|
||||
"^p"]
|
||||
@end example
|
||||
|
||||
The primitive way to create a byte-code object is with
|
||||
|
|
@ -604,10 +571,6 @@ function yourself, because if they are inconsistent, Emacs may crash
|
|||
when you call the function. Always leave it to the byte compiler to
|
||||
create these objects; it makes the elements consistent (we hope).
|
||||
|
||||
You can access the elements of a byte-code object using @code{aref};
|
||||
you can also use @code{vconcat} to create a vector with the same
|
||||
elements.
|
||||
|
||||
@node Disassembly
|
||||
@section Disassembled Byte-Code
|
||||
@cindex disassembled byte-code
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@
|
|||
@cindex special forms for control structures
|
||||
@cindex control structures
|
||||
|
||||
A Lisp program consists of expressions or @dfn{forms} (@pxref{Forms}).
|
||||
We control the order of execution of these forms by enclosing them in
|
||||
@dfn{control structures}. Control structures are special forms which
|
||||
control when, whether, or how many times to execute the forms they
|
||||
contain.
|
||||
A Lisp program consists of a set of @dfn{expressions}, or
|
||||
@dfn{forms} (@pxref{Forms}). We control the order of execution of
|
||||
these forms by enclosing them in @dfn{control structures}. Control
|
||||
structures are special forms which control when, whether, or how many
|
||||
times to execute the forms they contain.
|
||||
|
||||
@cindex textual order
|
||||
The simplest order of execution is sequential execution: first form
|
||||
|
|
@ -891,9 +891,8 @@ establishing an error handler, with the special form
|
|||
|
||||
@noindent
|
||||
This deletes the file named @var{filename}, catching any error and
|
||||
returning @code{nil} if an error occurs@footnote{
|
||||
Actually, you should use @code{ignore-errors} in such a simple case;
|
||||
see below.}.
|
||||
returning @code{nil} if an error occurs. (You can use the macro
|
||||
@code{ignore-errors} for a simple case like this; see below.)
|
||||
|
||||
The @code{condition-case} construct is often used to trap errors that
|
||||
are predictable, such as failure to open a file in a call to
|
||||
|
|
@ -949,6 +948,13 @@ The effect of @code{debug} here is only to prevent
|
|||
given error will invoke the debugger only if @code{debug-on-error} and
|
||||
the other usual filtering mechanisms say it should. @xref{Error Debugging}.
|
||||
|
||||
@defmac condition-case-unless-debug var protected-form handlers@dots{}
|
||||
The macro @code{condition-case-unless-debug} provides another way to
|
||||
handle debugging of such forms. It behaves exactly like
|
||||
@code{condition-case}, unless the variable @code{debug-on-error} is
|
||||
non-@code{nil}, in which case it does not handle any errors at all.
|
||||
@end defmac
|
||||
|
||||
Once Emacs decides that a certain handler handles the error, it
|
||||
returns control to that handler. To do so, Emacs unbinds all variable
|
||||
bindings made by binding constructs that are being exited, and
|
||||
|
|
@ -1122,6 +1128,13 @@ Here's the example at the beginning of this subsection rewritten using
|
|||
@end smallexample
|
||||
@end defmac
|
||||
|
||||
@defmac with-demoted-errors body@dots{}
|
||||
This macro is like a milder version of @code{ignore-errors}. Rather
|
||||
than suppressing errors altogether, it converts them into messages.
|
||||
Use this form around code that is not expected to signal errors, but
|
||||
should be robust if one does occur. Note that this macro uses
|
||||
@code{condition-case-unless-debug} rather than @code{condition-case}.
|
||||
@end defmac
|
||||
|
||||
@node Error Symbols
|
||||
@subsubsection Error Symbols and Condition Names
|
||||
|
|
|
|||
|
|
@ -24,9 +24,10 @@ definitions---as well as face definitions (@pxref{Defining Faces}).
|
|||
@section Common Item Keywords
|
||||
|
||||
@cindex customization keywords
|
||||
All kinds of customization declarations (for variables and groups, and
|
||||
for faces) accept keyword arguments for specifying various information.
|
||||
This section describes some keywords that apply to all kinds.
|
||||
The customization declarations that we will describe in the next few
|
||||
sections (@code{defcustom}, @code{defgroup}, etc.) all accept keyword
|
||||
arguments for specifying various information. This section describes
|
||||
keywords that apply to all types of customization declarations.
|
||||
|
||||
All of these keywords, except @code{:tag}, can be used more than once
|
||||
in a given item. Each use of the keyword has an independent effect.
|
||||
|
|
@ -108,8 +109,7 @@ You can specify the text to use in the customization buffer by adding
|
|||
for example, @code{(info-link :tag "foo" "(emacs)Top")} makes a link to
|
||||
the Emacs manual which appears in the buffer as @samp{foo}.
|
||||
|
||||
An item can have more than one external link; however, most items have
|
||||
none at all.
|
||||
You can use this keyword more than once, to add multiple links.
|
||||
|
||||
@item :load @var{file}
|
||||
@kindex load@r{, customization keyword}
|
||||
|
|
@ -136,14 +136,13 @@ version. The value @var{version} must be a string.
|
|||
@kindex package-version@r{, customization keyword}
|
||||
This keyword specifies that the item was first introduced in
|
||||
@var{package} version @var{version}, or that its meaning or default
|
||||
value was changed in that version. The value of @var{package} is a
|
||||
symbol and @var{version} is a string.
|
||||
value was changed in that version. This keyword takes priority over
|
||||
@code{:version}.
|
||||
|
||||
This keyword takes priority over @code{:version}.
|
||||
|
||||
@var{package} should be the official name of the package, such as MH-E
|
||||
or Gnus. If the package @var{package} is released as part of Emacs,
|
||||
@var{package} and @var{version} should appear in the value of
|
||||
@var{package} should be the official name of the package, as a symbol
|
||||
(e.g.@: @code{MH-E}). @var{version} should be a string. If the
|
||||
package @var{package} is released as part of Emacs, @var{package} and
|
||||
@var{version} should appear in the value of
|
||||
@code{customize-package-emacs-version-alist}.
|
||||
@end table
|
||||
|
||||
|
|
@ -226,47 +225,31 @@ also use this keyword in @code{defgroup}:
|
|||
@table @code
|
||||
@item :prefix @var{prefix}
|
||||
@kindex prefix@r{, @code{defgroup} keyword}
|
||||
If the name of an item in the group starts with @var{prefix}, then the
|
||||
tag for that item is constructed (by default) by omitting @var{prefix}.
|
||||
|
||||
One group can have any number of prefixes.
|
||||
If the name of an item in the group starts with @var{prefix}, and the
|
||||
customizable variable @code{custom-unlispify-remove-prefixes} is
|
||||
non-@code{nil}, the item's tag will omit @var{prefix}. A group can
|
||||
have any number of prefixes.
|
||||
@end table
|
||||
@end defmac
|
||||
|
||||
The prefix-discarding feature is currently turned off, which means
|
||||
that @code{:prefix} currently has no effect. We did this because we
|
||||
found that discarding the specified prefixes often led to confusing
|
||||
names for options. This happened because the people who wrote the
|
||||
@code{defgroup} definitions for various groups added @code{:prefix}
|
||||
keywords whenever they make logical sense---that is, whenever the
|
||||
variables in the library have a common prefix.
|
||||
@defopt custom-unlispify-remove-prefixes
|
||||
If this variable is non-@code{nil}, the prefixes specified by a
|
||||
group's @code{:prefix} keyword are omitted from tag names, whenever
|
||||
the user customizes the group.
|
||||
|
||||
In order to obtain good results with @code{:prefix}, it would be
|
||||
necessary to check the specific effects of discarding a particular
|
||||
prefix, given the specific items in a group and their names and
|
||||
documentation. If the resulting text is not clear, then @code{:prefix}
|
||||
should not be used in that case.
|
||||
|
||||
It should be possible to recheck all the customization groups, delete
|
||||
the @code{:prefix} specifications which give unclear results, and then
|
||||
turn this feature back on, if someone would like to do the work.
|
||||
The default value is @code{nil}, i.e.@: the prefix-discarding feature
|
||||
is disabled. This is because discarding prefixes often leads to
|
||||
confusing names for options and faces.
|
||||
@end defopt
|
||||
|
||||
@node Variable Definitions
|
||||
@section Defining Customization Variables
|
||||
@cindex define customization options
|
||||
@cindex customization variables, how to define
|
||||
|
||||
Use @code{defcustom} to declare user-customizable variables.
|
||||
|
||||
@defmac defcustom option standard doc [keyword value]@dots{}
|
||||
This macro declares @var{option} as a customizable @dfn{user option}.
|
||||
You should not quote @var{option}.
|
||||
|
||||
This causes the function @code{user-variable-p} to return @code{t}
|
||||
when given @var{option} as an argument. @xref{Defining Variables}.
|
||||
The argument @var{doc} specifies the documentation string for the
|
||||
variable. (Note that there is no need to start @var{doc} with a
|
||||
@samp{*}.)
|
||||
This macro declares @var{option} as a user option (i.e.@: a
|
||||
customizable variable). You should not quote @var{option}.
|
||||
|
||||
The argument @var{standard} is an expression that specifies the
|
||||
standard value for @var{option}. Evaluating the @code{defcustom} form
|
||||
|
|
@ -281,28 +264,25 @@ cases applies, @code{defcustom} installs the result of evaluating
|
|||
The expression @var{standard} can be evaluated at various other times,
|
||||
too---whenever the customization facility needs to know @var{option}'s
|
||||
standard value. So be sure to use an expression which is harmless to
|
||||
evaluate at any time. We recommend avoiding backquotes in
|
||||
@var{standard}, because they are not expanded when editing the value,
|
||||
so list values will appear to have the wrong structure.
|
||||
evaluate at any time.
|
||||
|
||||
The argument @var{doc} specifies the documentation string for the
|
||||
variable.
|
||||
|
||||
Every @code{defcustom} should specify @code{:group} at least once.
|
||||
|
||||
If you specify the @code{:set} keyword, to make the variable take other
|
||||
special actions when set through the customization buffer, the
|
||||
variable's documentation string should tell the user specifically how
|
||||
to do the same job in hand-written Lisp code.
|
||||
|
||||
When you evaluate a @code{defcustom} form with @kbd{C-M-x} in Emacs Lisp
|
||||
mode (@code{eval-defun}), a special feature of @code{eval-defun}
|
||||
arranges to set the variable unconditionally, without testing whether
|
||||
its value is void. (The same feature applies to @code{defvar}.)
|
||||
@xref{Defining Variables}.
|
||||
|
||||
If you put a @code{defcustom} in a file that is preloaded at dump time
|
||||
(@pxref{Building Emacs}), and the standard value installed for the
|
||||
variable at that time might not be correct, use
|
||||
If you put a @code{defcustom} in a pre-loaded Emacs Lisp file
|
||||
(@pxref{Building Emacs}), the standard value installed at dump time
|
||||
might be incorrect, e.g.@: because another variable that it depends on
|
||||
has not been assigned the right value yet. In that case, use
|
||||
@code{custom-reevaluate-setting}, described below, to re-evaluate the
|
||||
standard value during or after Emacs startup.
|
||||
standard value after Emacs starts up.
|
||||
@end defmac
|
||||
|
||||
@code{defcustom} accepts the following additional keywords:
|
||||
|
|
@ -333,6 +313,9 @@ the value properly for this option (which may not mean simply setting
|
|||
the option as a Lisp variable). The default for @var{setfunction} is
|
||||
@code{set-default}.
|
||||
|
||||
If you specify this keyword, the variable's documentation string
|
||||
should describe how to do the same job in hand-written Lisp code.
|
||||
|
||||
@item :get @var{getfunction}
|
||||
@kindex get@r{, @code{defcustom} keyword}
|
||||
Specify @var{getfunction} as the way to extract the value of this
|
||||
|
|
@ -344,7 +327,7 @@ value). The default is @code{default-value}.
|
|||
You have to really understand the workings of Custom to use
|
||||
@code{:get} correctly. It is meant for values that are treated in
|
||||
Custom as variables but are not actually stored in Lisp variables. It
|
||||
is almost surely a mistake to specify @code{getfunction} for a value
|
||||
is almost surely a mistake to specify @var{getfunction} for a value
|
||||
that really is stored in a Lisp variable.
|
||||
|
||||
@item :initialize @var{function}
|
||||
|
|
@ -383,16 +366,15 @@ already set or has been customized; otherwise, just use
|
|||
These functions behave like @code{custom-initialize-set}
|
||||
(@code{custom-initialize-default}, respectively), but catch errors.
|
||||
If an error occurs during initialization, they set the variable to
|
||||
@code{nil} using @code{set-default}, and throw no error.
|
||||
@code{nil} using @code{set-default}, and signal no error.
|
||||
|
||||
These two functions are only meant for options defined in pre-loaded
|
||||
files, where some variables or functions used to compute the option's
|
||||
value may not yet be defined. The option normally gets updated in
|
||||
@file{startup.el}, ignoring the previously computed value. Because of
|
||||
this typical usage, the value which these two functions compute
|
||||
normally only matters when, after startup, one unsets the option's
|
||||
value and then reevaluates the defcustom. By that time, the necessary
|
||||
variables and functions will be defined, so there will not be an error.
|
||||
These functions are meant for options defined in pre-loaded files,
|
||||
where the @var{standard} expression may signal an error because some
|
||||
required variable or function is not yet defined. The value normally
|
||||
gets updated in @file{startup.el}, ignoring the value computed by
|
||||
@code{defcustom}. After startup, if one unsets the value and
|
||||
reevaluates the @code{defcustom}, the @var{standard} expression can be
|
||||
evaluated without error.
|
||||
@end table
|
||||
|
||||
@item :risky @var{value}
|
||||
|
|
@ -460,18 +442,32 @@ is an expression that evaluates to the value.
|
|||
|
||||
@defun custom-reevaluate-setting symbol
|
||||
This function re-evaluates the standard value of @var{symbol}, which
|
||||
should be a user option declared via @code{defcustom}. (If the
|
||||
should be a user option declared via @code{defcustom}. If the
|
||||
variable was customized, this function re-evaluates the saved value
|
||||
instead.) This is useful for customizable options that are defined
|
||||
before their value could be computed correctly, such as variables
|
||||
defined in packages that are loaded at dump time, but depend on the
|
||||
run-time information. For example, the value could be a file whose
|
||||
precise name depends on the hierarchy of files when Emacs runs, or a
|
||||
name of a program that needs to be searched at run time.
|
||||
instead. Then it sets the user option to that value (using the
|
||||
option's @code{:set} property if that is defined).
|
||||
|
||||
A good place to put calls to this function is in the function
|
||||
@code{command-line} that is run during startup (@pxref{Startup Summary})
|
||||
or in the various hooks it calls.
|
||||
This is useful for customizable options that are defined before their
|
||||
value could be computed correctly. For example, during startup Emacs
|
||||
calls this function for some user options that were defined in
|
||||
pre-loaded Emacs Lisp files, but whose initial values depend on
|
||||
information available only at run-time.
|
||||
@end defun
|
||||
|
||||
@defun custom-variable-p arg
|
||||
This function returns non-@code{nil} if @var{arg} is a customizable
|
||||
variable. A customizable variable is either a variable that has a
|
||||
@code{standard-value} or @code{custom-autoload} property (usually
|
||||
meaning it was declared with @code{defcustom}), or an alias for
|
||||
another customizable variable.
|
||||
@end defun
|
||||
|
||||
@defun user-variable-p arg
|
||||
This function is like @code{custom-variable-p}, except it also returns
|
||||
@code{t} if the first character of the variable's documentation string
|
||||
is the character @samp{*}. That is an obsolete way of indicating a
|
||||
user option, so for most purposes you may consider
|
||||
@code{user-variable-p} as equivalent to @code{custom-variable-p}.
|
||||
@end defun
|
||||
|
||||
@node Customization Types
|
||||
|
|
@ -523,30 +519,28 @@ Introduction, widget, The Emacs Widget Library}, for details.
|
|||
@node Simple Types
|
||||
@subsection Simple Types
|
||||
|
||||
This section describes all the simple customization types.
|
||||
This section describes all the simple customization types. For
|
||||
several of these customization types, the customization widget
|
||||
provides inline completion with @kbd{C-M-i} or @kbd{M-@key{TAB}}.
|
||||
|
||||
@table @code
|
||||
@item sexp
|
||||
The value may be any Lisp object that can be printed and read back. You
|
||||
can use @code{sexp} as a fall-back for any option, if you don't want to
|
||||
take the time to work out a more specific type to use.
|
||||
The value may be any Lisp object that can be printed and read back.
|
||||
You can use @code{sexp} as a fall-back for any option, if you don't
|
||||
want to take the time to work out a more specific type to use.
|
||||
|
||||
@item integer
|
||||
The value must be an integer, and is represented textually
|
||||
in the customization buffer.
|
||||
The value must be an integer.
|
||||
|
||||
@item number
|
||||
The value must be a number (floating point or integer), and is
|
||||
represented textually in the customization buffer.
|
||||
The value must be a number (floating point or integer).
|
||||
|
||||
@item float
|
||||
The value must be a floating point number, and is represented
|
||||
textually in the customization buffer.
|
||||
The value must be a floating point number.
|
||||
|
||||
@item string
|
||||
The value must be a string, and the customization buffer shows just the
|
||||
contents, with no delimiting @samp{"} characters and no quoting with
|
||||
@samp{\}.
|
||||
The value must be a string. The customization buffer shows the string
|
||||
without delimiting @samp{"} characters or @samp{\} quotes.
|
||||
|
||||
@item regexp
|
||||
Like @code{string} except that the string must be a valid regular
|
||||
|
|
@ -558,39 +552,35 @@ integer, but this type shows the value by inserting the character in the
|
|||
buffer, rather than by showing the number.
|
||||
|
||||
@item file
|
||||
The value must be a file name, and you can do completion with
|
||||
@kbd{M-@key{TAB}}.
|
||||
The value must be a file name. The widget provides completion.
|
||||
|
||||
@item (file :must-match t)
|
||||
The value must be a file name for an existing file, and you can do
|
||||
completion with @kbd{M-@key{TAB}}.
|
||||
The value must be a file name for an existing file. The widget
|
||||
provides completion.
|
||||
|
||||
@item directory
|
||||
The value must be a directory name, and you can do completion with
|
||||
@kbd{M-@key{TAB}}.
|
||||
The value must be a directory name. The widget provides completion.
|
||||
|
||||
@item hook
|
||||
The value must be a list of functions (or a single function, but that is
|
||||
obsolete usage). This customization type is used for hook variables.
|
||||
You can use the @code{:options} keyword in a hook variable's
|
||||
@code{defcustom} to specify a list of functions recommended for use in
|
||||
the hook; see @ref{Variable Definitions}.
|
||||
The value must be a list of functions. This customization type is
|
||||
used for hook variables. You can use the @code{:options} keyword in a
|
||||
hook variable's @code{defcustom} to specify a list of functions
|
||||
recommended for use in the hook; @xref{Variable Definitions}.
|
||||
|
||||
@item symbol
|
||||
The value must be a symbol. It appears in the customization buffer as
|
||||
the name of the symbol.
|
||||
the symbol name. The widget provides completion.
|
||||
|
||||
@item function
|
||||
The value must be either a lambda expression or a function name. When
|
||||
it is a function name, you can do completion with @kbd{M-@key{TAB}}.
|
||||
The value must be either a lambda expression or a function name. The
|
||||
widget provides completion for function names.
|
||||
|
||||
@item variable
|
||||
The value must be a variable name, and you can do completion with
|
||||
@kbd{M-@key{TAB}}.
|
||||
The value must be a variable name. The widget provides completion.
|
||||
|
||||
@item face
|
||||
The value must be a symbol which is a face name, and you can do
|
||||
completion with @kbd{M-@key{TAB}}.
|
||||
The value must be a symbol which is a face name. The widget provides
|
||||
completion.
|
||||
|
||||
@item boolean
|
||||
The value is boolean---either @code{nil} or @code{t}. Note that by
|
||||
|
|
@ -604,8 +594,10 @@ The value must be a coding-system name, and you can do completion with
|
|||
@kbd{M-@key{TAB}}.
|
||||
|
||||
@item color
|
||||
The value must be a valid color name, and you can do completion with
|
||||
@kbd{M-@key{TAB}}. A sample is provided.
|
||||
The value must be a valid color name. The widget provides completion
|
||||
for color names, as well as a sample and a button for selecting a
|
||||
color name from a list of color names shown in a @samp{*Colors*}
|
||||
buffer.
|
||||
@end table
|
||||
|
||||
@node Composite Types
|
||||
|
|
@ -639,9 +631,8 @@ its @sc{cdr} must fit @var{cdr-type}. For example, @code{(cons string
|
|||
symbol)} is a customization type which matches values such as
|
||||
@code{("foo" . foo)}.
|
||||
|
||||
In the customization buffer, the @sc{car} and the @sc{cdr} are
|
||||
displayed and edited separately, each according to the type
|
||||
that you specify for it.
|
||||
In the customization buffer, the @sc{car} and @sc{cdr} are displayed
|
||||
and edited separately, each according to their specified type.
|
||||
|
||||
@item (list @var{element-types}@dots{})
|
||||
The value must be a list with exactly as many elements as the
|
||||
|
|
@ -684,7 +675,7 @@ specified by the @code{:options} keyword argument.
|
|||
|
||||
The argument to the @code{:options} keywords should be a list of
|
||||
specifications for reasonable keys in the alist. Ordinarily, they are
|
||||
simply atoms, which stand for themselves as. For example:
|
||||
simply atoms, which stand for themselves. For example:
|
||||
|
||||
@smallexample
|
||||
:options '("foo" "bar" "baz")
|
||||
|
|
@ -757,14 +748,6 @@ key, using variations of this trick:
|
|||
"Alist of basic info about people.
|
||||
Each element has the form (NAME AGE MALE-FLAG)."
|
||||
:type '(alist :value-type (group integer boolean)))
|
||||
|
||||
(defcustom pets '(("brian")
|
||||
("dorith" "dog" "guppy")
|
||||
("ken" "cat"))
|
||||
"Alist of people's pets.
|
||||
In an element (KEY . VALUE), KEY is the person's name,
|
||||
and the VALUE is a list of that person's pets."
|
||||
:type '(alist :value-type (repeat string)))
|
||||
@end smallexample
|
||||
|
||||
@item (plist :key-type @var{key-type} :value-type @var{value-type})
|
||||
|
|
@ -774,9 +757,8 @@ that (i) the information is stored as a property list,
|
|||
defaults to @code{symbol} rather than @code{sexp}.
|
||||
|
||||
@item (choice @var{alternative-types}@dots{})
|
||||
The value must fit at least one of @var{alternative-types}.
|
||||
For example, @code{(choice integer string)} allows either an
|
||||
integer or a string.
|
||||
The value must fit one of @var{alternative-types}. For example,
|
||||
@code{(choice integer string)} allows either an integer or a string.
|
||||
|
||||
In the customization buffer, the user selects an alternative
|
||||
using a menu, and can then edit the value in the usual way for that
|
||||
|
|
@ -968,20 +950,18 @@ whatever follows the last keyword-value pair.
|
|||
@subsection Splicing into Lists
|
||||
|
||||
The @code{:inline} feature lets you splice a variable number of
|
||||
elements into the middle of a list or vector. You use it in a
|
||||
@code{set}, @code{choice} or @code{repeat} type which appears among the
|
||||
element-types of a @code{list} or @code{vector}.
|
||||
elements into the middle of a @code{list} or @code{vector}
|
||||
customization type. You use it by adding @code{:inline t} to a type
|
||||
specification which is contained in a @code{list} or @code{vector}
|
||||
specification.
|
||||
|
||||
Normally, each of the element-types in a @code{list} or @code{vector}
|
||||
describes one and only one element of the list or vector. Thus, if an
|
||||
element-type is a @code{repeat}, that specifies a list of unspecified
|
||||
length which appears as one element.
|
||||
|
||||
But when the element-type uses @code{:inline}, the value it matches is
|
||||
merged directly into the containing sequence. For example, if it
|
||||
matches a list with three elements, those become three elements of the
|
||||
overall sequence. This is analogous to using @samp{,@@} in the backquote
|
||||
construct.
|
||||
Normally, each entry in a @code{list} or @code{vector} type
|
||||
specification describes a single element type. But when an entry
|
||||
contains @code{:inline t}, the value it matches is merged directly
|
||||
into the containing sequence. For example, if the entry matches a
|
||||
list with three elements, those become three elements of the overall
|
||||
sequence. This is analogous to @samp{,@@} in a backquote construct
|
||||
(@pxref{Backquote}).
|
||||
|
||||
For example, to specify a list whose first element must be @code{baz}
|
||||
and whose remaining arguments should be zero or more of @code{foo} and
|
||||
|
|
|
|||
|
|
@ -146,6 +146,15 @@ enter the debugger.
|
|||
|
||||
@strong{Warning:} @code{debug-on-signal} has no effect when
|
||||
@code{debug-on-error} is @code{nil}.
|
||||
@end defopt
|
||||
|
||||
@defopt debug-on-event
|
||||
If you set @code{debug-on-event} to a special event (@pxref{Special
|
||||
Events}), Emacs will try to enter the debugger as soon as it receives
|
||||
this event, bypassing @code{special-event-map}. At present, the only
|
||||
supported values correspond to the signals @code{SIGUSR1} and
|
||||
@code{SIGUSR2} (this is the default). This can be helpful when
|
||||
@code{inhibit-quit} is set and Emacs is not otherwise responding.
|
||||
@end defopt
|
||||
|
||||
To debug an error that happens during loading of the init
|
||||
|
|
|
|||
|
|
@ -3367,54 +3367,48 @@ fringe, and no arrow bitmaps, use @code{((top . left) (bottom . left))}.
|
|||
|
||||
@defvar fringe-indicator-alist
|
||||
This buffer-local variable specifies the mapping from logical fringe
|
||||
indicators to the actual bitmaps displayed in the window fringes.
|
||||
indicators to the actual bitmaps displayed in the window fringes. The
|
||||
value is an alist of elements @code{(@var{indicator}
|
||||
. @var{bitmaps})}, where @var{indicator} specifies a logical indicator
|
||||
type and @var{bitmaps} specifies the fringe bitmaps to use for that
|
||||
indicator.
|
||||
|
||||
These symbols identify the logical fringe indicators:
|
||||
Each @var{indicator} should be one of the following symbols:
|
||||
|
||||
@table @asis
|
||||
@item Truncation and continuation line indicators:
|
||||
@code{truncation}, @code{continuation}.
|
||||
@item @code{truncation}, @code{continuation}.
|
||||
Used for truncation and continuation lines.
|
||||
|
||||
@item Buffer position indicators:
|
||||
@code{up}, @code{down},
|
||||
@code{top}, @code{bottom},
|
||||
@code{top-bottom}.
|
||||
@item @code{up}, @code{down}, @code{top}, @code{bottom}, @code{top-bottom}
|
||||
Used to indicate buffer boundaries when
|
||||
@code{indicate-buffer-boundaries} is non-@code{nil}: @code{up} and
|
||||
@code{down} indicate a buffer boundary lying above or below the window
|
||||
edge; @code{top} and @code{bottom} indicate the topmost and bottommost
|
||||
buffer text line; and @code{top-bottom} indicates where there is just
|
||||
one line of text in the buffer.
|
||||
|
||||
@item Empty line indicator:
|
||||
@code{empty-line}.
|
||||
@item @code{empty-line}
|
||||
Used to indicate empty lines when @code{indicate-empty-lines} is
|
||||
non-@code{nil}.
|
||||
|
||||
@item Overlay arrow indicator:
|
||||
@code{overlay-arrow}.
|
||||
|
||||
@item Unknown bitmap indicator:
|
||||
@code{unknown}.
|
||||
@item @code{overlay-arrow}
|
||||
Used for overlay arrows (@pxref{Overlay Arrow}).
|
||||
@c Is this used anywhere?
|
||||
@c @item Unknown bitmap indicator:
|
||||
@c @code{unknown}.
|
||||
@end table
|
||||
|
||||
The value is an alist where each element @code{(@var{indicator} . @var{bitmaps})}
|
||||
specifies the fringe bitmaps used to display a specific logical
|
||||
fringe indicator.
|
||||
Each @var{bitmaps} value may be a list of symbols @code{(@var{left}
|
||||
@var{right} [@var{left1} @var{right1}])}. The @var{left} and
|
||||
@var{right} symbols specify the bitmaps shown in the left and/or right
|
||||
fringe, for the specific indicator. @var{left1} and @var{right1} are
|
||||
specific to the @code{bottom} and @code{top-bottom} indicators, and
|
||||
are used to indicate that the last text line has no final newline.
|
||||
Alternatively, @var{bitmaps} may be a single symbol which is used in
|
||||
both left and right fringes.
|
||||
|
||||
Here, @var{indicator} specifies the logical indicator type, and
|
||||
@var{bitmaps} is list of symbols @code{(@var{left} @var{right}
|
||||
[@var{left1} @var{right1}])} which specifies the actual bitmap shown
|
||||
in the left or right fringe for the logical indicator.
|
||||
The standard symbols for fringe bitmaps are:
|
||||
|
||||
The @var{left} and @var{right} symbols specify the bitmaps shown in
|
||||
the left and/or right fringe for the specific indicator. The
|
||||
@var{left1} or @var{right1} bitmaps are used only for the `bottom' and
|
||||
`top-bottom indicators when the last (only) line in has no final
|
||||
newline. Alternatively, @var{bitmaps} may be a single symbol which is
|
||||
used in both left and right fringes.
|
||||
|
||||
When @code{fringe-indicator-alist} has a buffer-local value, and there
|
||||
is no bitmap defined for a logical indicator, or the bitmap is
|
||||
@code{t}, the corresponding value from the default value of
|
||||
@code{fringe-indicator-alist} is used.
|
||||
|
||||
To completely hide a specific indicator, set the bitmap to @code{nil}.
|
||||
@end defvar
|
||||
|
||||
Standard fringe bitmaps for indicators:
|
||||
@example
|
||||
left-arrow right-arrow up-arrow down-arrow
|
||||
left-curly-arrow right-curly-arrow
|
||||
|
|
@ -3428,6 +3422,16 @@ vertical-bar horizontal-bar
|
|||
empty-line question-mark
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
In addition, @code{nil} represents the empty bitmap (i.e.@: an
|
||||
indicator that is not shown).
|
||||
|
||||
When @code{fringe-indicator-alist} has a buffer-local value, and
|
||||
there is no bitmap defined for a logical indicator, or the bitmap is
|
||||
@code{t}, the corresponding value from the default value of
|
||||
@code{fringe-indicator-alist} is used.
|
||||
@end defvar
|
||||
|
||||
@node Fringe Cursors
|
||||
@subsection Fringe Cursors
|
||||
@cindex fringe cursors
|
||||
|
|
@ -4130,6 +4134,7 @@ displayed (@pxref{Display Feature Testing}).
|
|||
* Other Image Types:: Various other formats are supported.
|
||||
* Defining Images:: Convenient ways to define an image for later use.
|
||||
* Showing Images:: Convenient ways to display an image once it is defined.
|
||||
* Animated Images:: Some image formats can be animated.
|
||||
* Image Cache:: Internal mechanisms of image display.
|
||||
@end menu
|
||||
|
||||
|
|
@ -4147,12 +4152,10 @@ names for these dynamic libraries (though it is not possible to add
|
|||
new image formats). Note that image types @code{pbm} and @code{xbm}
|
||||
do not depend on external libraries and are always available in Emacs.
|
||||
|
||||
The supported image formats include XBM, XPM (this requires the
|
||||
libraries @code{libXpm} version 3.4k and @code{libz}), GIF (requiring
|
||||
@code{libungif} 4.1.0), PostScript, PBM, JPEG (requiring the
|
||||
@code{libjpeg} library version v6a), TIFF (requiring @code{libtiff}
|
||||
v3.4), PNG (requiring @code{libpng} 1.0.2), and SVG (requiring
|
||||
@code{librsvg} 2.0.0).
|
||||
The supported image formats (and the necessary library files)
|
||||
include XBM, XPM (@code{libXpm} and @code{libz}), GIF (@code{libgif}
|
||||
or @code{libungif}), PostScript, PBM, JPEG (@code{libjpeg}), TIFF
|
||||
(@code{libtiff}), PNG (@code{libpng}), and SVG (@code{librsvg}).
|
||||
|
||||
You specify one of these formats with an image type symbol. The image
|
||||
type symbols are @code{xbm}, @code{xpm}, @code{gif}, @code{postscript},
|
||||
|
|
@ -4467,33 +4470,13 @@ specifies the actual color to use for displaying that name.
|
|||
|
||||
@table @code
|
||||
@item :index @var{index}
|
||||
You can use @code{:index} to specify one image from a GIF file that
|
||||
contains more than one image. This property specifies use of image
|
||||
number @var{index} from the file. If the GIF file doesn't contain an
|
||||
image with index @var{index}, the image displays as a hollow box.
|
||||
You can use @code{:index} to specify image number @var{index} from a
|
||||
GIF file that contains more than one image. If the GIF file doesn't
|
||||
contain an image with the specified index, the image displays as a
|
||||
hollow box. GIF files with more than one image can be animated,
|
||||
@pxref{Animated Images}.
|
||||
@end table
|
||||
|
||||
@ignore
|
||||
This could be used to implement limited support for animated GIFs.
|
||||
For example, the following function displays a multi-image GIF file
|
||||
at point-min in the current buffer, switching between sub-images
|
||||
every 0.1 seconds.
|
||||
|
||||
(defun show-anim (file max)
|
||||
"Display multi-image GIF file FILE which contains MAX subimages."
|
||||
(display-anim (current-buffer) file 0 max t))
|
||||
|
||||
(defun display-anim (buffer file idx max first-time)
|
||||
(when (= idx max)
|
||||
(setq idx 0))
|
||||
(let ((img (create-image file nil :image idx)))
|
||||
(with-current-buffer buffer
|
||||
(goto-char (point-min))
|
||||
(unless first-time (delete-char 1))
|
||||
(insert-image img))
|
||||
(run-with-timer 0.1 nil 'display-anim buffer file (1+ idx) max nil)))
|
||||
@end ignore
|
||||
|
||||
@node TIFF Images
|
||||
@subsection TIFF Images
|
||||
@cindex TIFF
|
||||
|
|
@ -4502,10 +4485,10 @@ every 0.1 seconds.
|
|||
|
||||
@table @code
|
||||
@item :index @var{index}
|
||||
You can use @code{:index} to specify one image from a TIFF file that
|
||||
contains more than one image. This property specifies use of image
|
||||
number @var{index} from the file. If the TIFF file doesn't contain an
|
||||
image with index @var{index}, the image displays as a hollow box.
|
||||
You can use @code{:index} to specify image number @var{index} from a
|
||||
TIFF file that contains more than one image. If the TIFF file doesn't
|
||||
contain an image with the specified index, the image displays as a
|
||||
hollow box.
|
||||
@end table
|
||||
|
||||
@node PostScript Images
|
||||
|
|
@ -4544,30 +4527,51 @@ specifying the bounding box of the PostScript image, analogous to the
|
|||
support, you can use the ImageMagick library to load many image formats.
|
||||
|
||||
@findex imagemagick-types
|
||||
@findex imagemagick-register-types
|
||||
The function @code{imagemagick-types} returns a list of image file
|
||||
extensions that your installation of ImageMagick supports. To enable
|
||||
support, you must call the function @code{imagemagick-register-types}.
|
||||
This enables Emacs to visit these file types in @code{image-mode}
|
||||
(@pxref{File Conveniences,,, emacs, The GNU Emacs Manual}).
|
||||
If your Emacs was not compiled with ImageMagick support, then
|
||||
@code{imagemagick-types} will be undefined and
|
||||
@code{imagemagick-register-types} will do nothing.
|
||||
|
||||
@vindex imagemagick-types-inhibit
|
||||
The variable @code{imagemagick-types-inhibit} specifies a list of
|
||||
image types that you do @emph{not} want ImageMagick to handle. There
|
||||
may be overlap between image loaders in your Emacs installation, and
|
||||
you may prefer to use a different one for a given image type (which
|
||||
@c FIXME how is this priority determined?
|
||||
loader will be used in practice depends on the priority of the loaders).
|
||||
@c FIXME why are these uppercase when image-types is lower-case?
|
||||
@c FIXME what are the possible options? Are these actually file extensions?
|
||||
For example, if you never want to use the ImageMagick loader to use
|
||||
image types that you do @emph{not} want ImageMagick to handle. It is
|
||||
a list of symbols, each of which has the same name as one of the
|
||||
format tags used internally by ImageMagick (i.e., as
|
||||
@code{imagemagick-types} returns). ImageMagick has a very broad
|
||||
definition of what an image is, for example it includes such file
|
||||
types as C files and HTML files. It is not appropriate to treat these
|
||||
as images in Emacs. You can add any other ImageMagick type that you
|
||||
wish to this list.
|
||||
@ignore
|
||||
@c I don't know what this means. I suspect it means eg loading jpg
|
||||
@c images via libjpeg or ImageMagick. But it doesn't work.
|
||||
@c If you don't have libjpeg support compiled in, you cannot
|
||||
@c view jpeg images, even if you have imagemagick support:
|
||||
@c http://debbugs.gnu.org/9045
|
||||
@c And if you have both compiled in, then you always get
|
||||
@c the libjpeg version:
|
||||
@c http://debbugs.gnu.org/10746
|
||||
There may be overlap between image loaders in your Emacs installation,
|
||||
and you may prefer to use a different one for a given image type
|
||||
(which loader will be used in practice depends on the priority of the
|
||||
loaders).
|
||||
For example, if you never want to use the ImageMagick loader to view
|
||||
JPEG files, add @code{JPG} to this list.
|
||||
@end ignore
|
||||
Note that ImageMagick often distinguishes between several different
|
||||
types of a particular format (e.g., @code{JPG}, @code{JPEG},
|
||||
@code{PJPEG}, etc.), and you may need to add all versions to this
|
||||
list.
|
||||
|
||||
@c Not sure this should even be in the manual at all.
|
||||
@vindex imagemagick-render-type
|
||||
You can set the variable @code{imagemagick-render-type} to choose
|
||||
between screen render methods for the ImageMagick loader. The options
|
||||
are: @code{0}, a conservative method which works with older
|
||||
@c FIXME details of this "newer method"?
|
||||
@c Presumably it is faster but may be less "robust"?
|
||||
ImageMagick versions (it is a bit slow, but robust); and @code{1},
|
||||
a newer ImageMagick method.
|
||||
If you wish to experiment with the performance of the ImageMagick
|
||||
loader, see the variable @code{imagemagick-render-type}.
|
||||
|
||||
Images loaded with ImageMagick support a few new display specifications:
|
||||
|
||||
|
|
@ -4582,10 +4586,11 @@ aspect ratio may not be preserved.
|
|||
Specifies a rotation angle in degrees.
|
||||
|
||||
@item :index
|
||||
Specifies which image to view inside an image bundle file format, such
|
||||
as TIFF or DJVM. You can use the @code{image-metadata} function to
|
||||
retrieve the total number of images in an image bundle (this is
|
||||
similar to how GIF files work).
|
||||
@c Doesn't work: http://debbugs.gnu.org/7978
|
||||
This has the same meaning as it does for GIF images (@pxref{GIF Images}),
|
||||
i.e. it specifies which image to view inside an image bundle file format
|
||||
such as DJVM. You can use the @code{image-metadata} function to
|
||||
retrieve the total number of images in an image bundle.
|
||||
@end table
|
||||
|
||||
|
||||
|
|
@ -4853,6 +4858,39 @@ cache, it can always be displayed, even if the value of
|
|||
@var{max-image-size} is subsequently changed (@pxref{Image Cache}).
|
||||
@end defvar
|
||||
|
||||
@node Animated Images
|
||||
@subsection Animated Images
|
||||
|
||||
@cindex animation
|
||||
@cindex image animation
|
||||
Some image files can contain more than one image. This can be used to
|
||||
create animation. Currently, Emacs only supports animated GIF files.
|
||||
The following functions related to animated images are available.
|
||||
|
||||
@defun image-animated-p image
|
||||
This function returns non-nil if @var{image} can be animated.
|
||||
The actual return value is a cons @code{(@var{nimages} . @var{delay})},
|
||||
where @var{nimages} is the number of frames and @var{delay} is the
|
||||
delay in seconds between them.
|
||||
@end defun
|
||||
|
||||
@defun image-animate image &optional index limit
|
||||
This function animates @var{image}. The optional integer @var{index}
|
||||
specifies the frame from which to start (default 0). The optional
|
||||
argument @var{limit} controls the length of the animation. If omitted
|
||||
or @code{nil}, the image animates once only; if @code{t} it loops
|
||||
forever; if a number animation stops after that many seconds.
|
||||
@end defun
|
||||
|
||||
@noindent Animation operates by means of a timer. Note that Emacs imposes a
|
||||
minimum frame delay of 0.01 seconds.
|
||||
|
||||
@defun image-animate-timer image
|
||||
This function returns the timer responsible for animating @var{image},
|
||||
if there is one.
|
||||
@end defun
|
||||
|
||||
|
||||
@node Image Cache
|
||||
@subsection Image Cache
|
||||
@cindex image cache
|
||||
|
|
|
|||
|
|
@ -326,7 +326,6 @@ Lists
|
|||
* Modifying Lists:: Storing new pieces into an existing list.
|
||||
* Sets And Lists:: A list can represent a finite mathematical set.
|
||||
* Association Lists:: A list can represent a finite relation or mapping.
|
||||
* Rings:: Managing a fixed-size ring of objects.
|
||||
|
||||
Modifying Existing List Structure
|
||||
|
||||
|
|
@ -344,6 +343,7 @@ Sequences, Arrays, and Vectors
|
|||
* Vector Functions:: Functions specifically for vectors.
|
||||
* Char-Tables:: How to work with char-tables.
|
||||
* Bool-Vectors:: How to work with bool-vectors.
|
||||
* Rings:: Managing a fixed-size ring of objects.
|
||||
|
||||
Hash Tables
|
||||
|
||||
|
|
@ -374,6 +374,7 @@ Evaluation
|
|||
* Forms:: How various sorts of objects are evaluated.
|
||||
* Quoting:: Avoiding evaluation (to put constants in
|
||||
the program).
|
||||
* Backquote:: Easier construction of list structure.
|
||||
* Eval:: How to invoke the Lisp interpreter explicitly.
|
||||
|
||||
Kinds of Forms
|
||||
|
|
@ -436,12 +437,10 @@ Variables
|
|||
|
||||
Scoping Rules for Variable Bindings
|
||||
|
||||
* Scope:: Scope means where in the program a value
|
||||
is visible. Comparison with other languages.
|
||||
* Extent:: Extent means how long in time a value exists.
|
||||
* Impl of Scope:: Two ways to implement dynamic scoping.
|
||||
* Using Scoping:: How to use dynamic scoping carefully and
|
||||
avoid problems.
|
||||
* Dynamic Binding:: The default for binding local variables in Emacs.
|
||||
* Dynamic Binding Tips:: Avoiding problems with dynamic binding.
|
||||
* Lexical Binding:: A different type of local variable binding.
|
||||
* Using Lexical Binding:: How to enable lexical binding.
|
||||
|
||||
Buffer-Local Variables
|
||||
|
||||
|
|
@ -461,6 +460,7 @@ Functions
|
|||
* Anonymous Functions:: Lambda expressions are functions with no names.
|
||||
* Function Cells:: Accessing or setting the function definition
|
||||
of a symbol.
|
||||
* Closures:: Functions that enclose a lexical environment.
|
||||
* Obsolete Functions:: Declaring functions obsolete.
|
||||
* Inline Functions:: Defining functions that the compiler
|
||||
will open code.
|
||||
|
|
@ -483,7 +483,6 @@ Macros
|
|||
* Expansion:: How, when and why macros are expanded.
|
||||
* Compiling Macros:: How macros are expanded by the compiler.
|
||||
* Defining Macros:: How to write a macro definition.
|
||||
* Backquote:: Easier construction of list structure.
|
||||
* Problems with Macros:: Don't evaluate the macro arguments too many times.
|
||||
Don't hide the user's variables.
|
||||
* Indenting Macros:: Specifying how to indent macro calls.
|
||||
|
|
@ -549,7 +548,6 @@ Advising Emacs Lisp Functions
|
|||
* Preactivation:: Preactivation is a way of speeding up the
|
||||
loading of compiled advice.
|
||||
* Argument Access in Advice:: How advice can access the function's arguments.
|
||||
* Advising Primitives:: Accessing arguments when advising a primitive.
|
||||
* Combined Definition:: How advice is implemented.
|
||||
|
||||
Debugging Lisp Programs
|
||||
|
|
@ -1062,7 +1060,7 @@ Text
|
|||
* Registers:: How registers are implemented. Accessing
|
||||
the text or position stored in a register.
|
||||
* Base 64:: Conversion to or from base 64 encoding.
|
||||
* MD5 Checksum:: Compute the MD5 "message digest"/"checksum".
|
||||
* Checksum/Hash:: Computing "message digests"/"checksums"/"hashes".
|
||||
* Atomic Changes:: Installing several buffer changes "atomically".
|
||||
* Change Hooks:: Supplying functions to be run when text is changed.
|
||||
|
||||
|
|
@ -1353,6 +1351,7 @@ Images
|
|||
* Defining Images:: Convenient ways to define an image for later use.
|
||||
* Showing Images:: Convenient ways to display an image once
|
||||
it is defined.
|
||||
* Animated Images:: Some image formats can be animated.
|
||||
* Image Cache:: Internal mechanisms of image display.
|
||||
|
||||
Buttons
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ function @code{eval}.
|
|||
* Intro Eval:: Evaluation in the scheme of things.
|
||||
* Forms:: How various sorts of objects are evaluated.
|
||||
* Quoting:: Avoiding evaluation (to put constants in the program).
|
||||
* Backquote:: Easier construction of list structure.
|
||||
* Eval:: How to invoke the Lisp interpreter explicitly.
|
||||
@end menu
|
||||
|
||||
|
|
@ -39,12 +40,15 @@ interpreter.
|
|||
|
||||
@cindex form
|
||||
@cindex expression
|
||||
A Lisp object that is intended for evaluation is called an
|
||||
@dfn{expression} or a @dfn{form}. The fact that forms are data
|
||||
objects and not merely text is one of the fundamental differences
|
||||
between Lisp-like languages and typical programming languages. Any
|
||||
object can be evaluated, but in practice only numbers, symbols, lists
|
||||
and strings are evaluated very often.
|
||||
@cindex S-expression
|
||||
A Lisp object that is intended for evaluation is called a @dfn{form}
|
||||
or @dfn{expression}@footnote{It is sometimes also referred to as an
|
||||
@dfn{S-expression} or @dfn{sexp}, but we generally do not use this
|
||||
terminology in this manual.}. The fact that forms are data objects
|
||||
and not merely text is one of the fundamental differences between
|
||||
Lisp-like languages and typical programming languages. Any object can
|
||||
be evaluated, but in practice only numbers, symbols, lists and strings
|
||||
are evaluated very often.
|
||||
|
||||
In subsequent sections, we will describe the details of what
|
||||
evaluation means for each kind of form.
|
||||
|
|
@ -64,8 +68,8 @@ evaluate a @dfn{function call} form such as @code{(car x)}, Emacs
|
|||
first evaluates the argument (the subform @code{x}). After evaluating
|
||||
the argument, Emacs @dfn{executes} the function (@code{car}), and if
|
||||
the function is written in Lisp, execution works by evaluating the
|
||||
@dfn{body} of the function. (In this example, however, @code{car} is
|
||||
not a Lisp function; it is a primitive function implemented in C.)
|
||||
@dfn{body} of the function (in this example, however, @code{car} is
|
||||
not a Lisp function; it is a primitive function implemented in C).
|
||||
@xref{Functions}, for more information about functions and function
|
||||
calls.
|
||||
|
||||
|
|
@ -77,9 +81,8 @@ variables (@pxref{Variables}).@footnote{This definition of
|
|||
that can affect the result of a program.} Whenever a form refers to a
|
||||
variable without creating a new binding for it, the variable evaluates
|
||||
to the value given by the current environment. Evaluating a form may
|
||||
create a new environment for recursive evaluation, by binding
|
||||
variables (@pxref{Local Variables}). Such environments are temporary,
|
||||
and vanish when the evaluation of the form is complete.
|
||||
also temporarily alter the environment by binding variables
|
||||
(@pxref{Local Variables}).
|
||||
|
||||
@cindex side effect
|
||||
Evaluating a form may also make changes that persist; these changes
|
||||
|
|
@ -97,12 +100,12 @@ interpretation. @xref{Command Loop}.
|
|||
@node Forms
|
||||
@section Kinds of Forms
|
||||
|
||||
A Lisp object that is intended to be evaluated is called a @dfn{form}.
|
||||
How Emacs evaluates a form depends on its data type. Emacs has three
|
||||
different kinds of form that are evaluated differently: symbols, lists,
|
||||
and ``all other types.'' This section describes all three kinds, one by
|
||||
one, starting with the ``all other types'' which are self-evaluating
|
||||
forms.
|
||||
A Lisp object that is intended to be evaluated is called a
|
||||
@dfn{form} (or an @dfn{expression}). How Emacs evaluates a form
|
||||
depends on its data type. Emacs has three different kinds of form
|
||||
that are evaluated differently: symbols, lists, and ``all other
|
||||
types.'' This section describes all three kinds, one by one, starting
|
||||
with the ``all other types'' which are self-evaluating forms.
|
||||
|
||||
@menu
|
||||
* Self-Evaluating Forms:: Forms that evaluate to themselves.
|
||||
|
|
@ -177,9 +180,9 @@ program. Here is an example:
|
|||
@cindex symbol evaluation
|
||||
|
||||
When a symbol is evaluated, it is treated as a variable. The result
|
||||
is the variable's value, if it has one. If it has none (if its value
|
||||
cell is void), an error is signaled. For more information on the use of
|
||||
variables, see @ref{Variables}.
|
||||
is the variable's value, if it has one. If the symbol has no value as
|
||||
a variable, the Lisp interpreter signals an error. For more
|
||||
information on the use of variables, see @ref{Variables}.
|
||||
|
||||
In the following example, we set the value of a symbol with
|
||||
@code{setq}. Then we evaluate the symbol, and get back the value that
|
||||
|
|
@ -577,6 +580,96 @@ Functions}), which causes an anonymous lambda expression written in Lisp
|
|||
to be compiled, and @samp{`} (@pxref{Backquote}), which is used to quote
|
||||
only part of a list, while computing and substituting other parts.
|
||||
|
||||
@node Backquote
|
||||
@section Backquote
|
||||
@cindex backquote (list substitution)
|
||||
@cindex ` (list substitution)
|
||||
@findex `
|
||||
|
||||
@dfn{Backquote constructs} allow you to quote a list, but
|
||||
selectively evaluate elements of that list. In the simplest case, it
|
||||
is identical to the special form @code{quote}
|
||||
@iftex
|
||||
@end iftex
|
||||
@ifnottex
|
||||
(described in the previous section; @pxref{Quoting}).
|
||||
@end ifnottex
|
||||
For example, these two forms yield identical results:
|
||||
|
||||
@example
|
||||
@group
|
||||
`(a list of (+ 2 3) elements)
|
||||
@result{} (a list of (+ 2 3) elements)
|
||||
@end group
|
||||
@group
|
||||
'(a list of (+ 2 3) elements)
|
||||
@result{} (a list of (+ 2 3) elements)
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@findex , @r{(with backquote)}
|
||||
The special marker @samp{,} inside of the argument to backquote
|
||||
indicates a value that isn't constant. The Emacs Lisp evaluator
|
||||
evaluates the argument of @samp{,}, and puts the value in the list
|
||||
structure:
|
||||
|
||||
@example
|
||||
@group
|
||||
`(a list of ,(+ 2 3) elements)
|
||||
@result{} (a list of 5 elements)
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Substitution with @samp{,} is allowed at deeper levels of the list
|
||||
structure also. For example:
|
||||
|
||||
@example
|
||||
@group
|
||||
`(1 2 (3 ,(+ 4 5)))
|
||||
@result{} (1 2 (3 9))
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@findex ,@@ @r{(with backquote)}
|
||||
@cindex splicing (with backquote)
|
||||
You can also @dfn{splice} an evaluated value into the resulting list,
|
||||
using the special marker @samp{,@@}. The elements of the spliced list
|
||||
become elements at the same level as the other elements of the resulting
|
||||
list. The equivalent code without using @samp{`} is often unreadable.
|
||||
Here are some examples:
|
||||
|
||||
@example
|
||||
@group
|
||||
(setq some-list '(2 3))
|
||||
@result{} (2 3)
|
||||
@end group
|
||||
@group
|
||||
(cons 1 (append some-list '(4) some-list))
|
||||
@result{} (1 2 3 4 2 3)
|
||||
@end group
|
||||
@group
|
||||
`(1 ,@@some-list 4 ,@@some-list)
|
||||
@result{} (1 2 3 4 2 3)
|
||||
@end group
|
||||
|
||||
@group
|
||||
(setq list '(hack foo bar))
|
||||
@result{} (hack foo bar)
|
||||
@end group
|
||||
@group
|
||||
(cons 'use
|
||||
(cons 'the
|
||||
(cons 'words (append (cdr list) '(as elements)))))
|
||||
@result{} (use the words foo bar as elements)
|
||||
@end group
|
||||
@group
|
||||
`(use the words ,@@(cdr list) as elements)
|
||||
@result{} (use the words foo bar as elements)
|
||||
@end group
|
||||
@end example
|
||||
|
||||
|
||||
@node Eval
|
||||
@section Eval
|
||||
|
||||
|
|
@ -602,12 +695,13 @@ functions provides the ability to pass information to them as
|
|||
arguments.
|
||||
|
||||
@defun eval form &optional lexical
|
||||
This is the basic function evaluating an expression. It evaluates
|
||||
This is the basic function for evaluating an expression. It evaluates
|
||||
@var{form} in the current environment and returns the result. How the
|
||||
evaluation proceeds depends on the type of the object (@pxref{Forms}).
|
||||
@var{lexical} if non-nil means to evaluate @var{form} using lexical scoping
|
||||
rules (@pxref{Lexical Binding}) instead of the default dynamic scoping used
|
||||
historically in Emacs Lisp.
|
||||
|
||||
The argument @var{lexical}, if non-@code{nil}, means to evaluate
|
||||
@var{form} using lexical scoping rules for variables, instead of the
|
||||
default dynamic scoping rules. @xref{Lexical Binding}.
|
||||
|
||||
Since @code{eval} is a function, the argument expression that appears
|
||||
in a call to @code{eval} is evaluated twice: once as preparation before
|
||||
|
|
|
|||
|
|
@ -1480,7 +1480,7 @@ with @code{add-name-to-file} and then deleting @var{filename} has the
|
|||
same effect as renaming, aside from momentary intermediate states.
|
||||
@end deffn
|
||||
|
||||
@deffn Command copy-file oldname newname &optional ok-if-exists time preserve-uid-gid
|
||||
@deffn Command copy-file oldname newname &optional ok-if-exists time preserve-uid-gid preserve-selinux
|
||||
This command copies the file @var{oldname} to @var{newname}. An
|
||||
error is signaled if @var{oldname} does not exist. If @var{newname}
|
||||
names a directory, it copies @var{oldname} into that directory,
|
||||
|
|
@ -1501,6 +1501,16 @@ usually set to the user running Emacs). If @var{preserve-uid-gid} is
|
|||
non-@code{nil}, we attempt to copy the user and group ownership of the
|
||||
file. This works only on some operating systems, and only if you have
|
||||
the correct permissions to do so.
|
||||
|
||||
@cindex SELinux
|
||||
If the optional argument @var{preserve-selinux} is non-@code{nil}, we
|
||||
attempt to copy the SELinux@footnote{@samp{Security-Enhanced Linux}
|
||||
is a kernel feature that allows for finer access controls to be set on
|
||||
files, and a system security policy to define who can access what.
|
||||
The functions @code{file-selinux-context} and @code{set-file-selinux-context}
|
||||
get and set, respectively, the SELinux properties of a file.}
|
||||
context of the file. For this to work, Emacs must have been built
|
||||
with libselinux support.
|
||||
@end deffn
|
||||
|
||||
@deffn Command make-symbolic-link filename newname &optional ok-if-exists
|
||||
|
|
@ -2852,24 +2862,21 @@ is a good way to come up with one.
|
|||
@end defun
|
||||
|
||||
@defopt remote-file-name-inhibit-cache
|
||||
Whether to use the remote file-name cache for read access.
|
||||
|
||||
File attributes of remote files are cached for better performance. If
|
||||
they are changed out of Emacs' control, the cached values become
|
||||
The attributes of remote files can be cached for better performance. If
|
||||
they are changed outside of Emacs's control, the cached values become
|
||||
invalid, and must be reread.
|
||||
|
||||
When set to @code{nil}, cached values are always used. This shall be
|
||||
set with care. When set to @code{t}, cached values are never used.
|
||||
ALthough this is the safest value, it could result in performance
|
||||
degradation.
|
||||
When this variable is set to @code{nil}, cached values are never
|
||||
expired. Use this setting with caution, only if you are sure nothing
|
||||
other than Emacs ever changes the remote files. If it is set to
|
||||
@code{t}, cached values are never used. This is the safest value, but
|
||||
could result in performance degradation.
|
||||
|
||||
A compromise is to set it to a positive number. This means that
|
||||
cached values are used for that amount of seconds since they were
|
||||
cached.
|
||||
|
||||
In case a remote file is checked regularly, it might be reasonable to
|
||||
let-bind this variable to a value less then the time period between
|
||||
two checks. Example:
|
||||
cached. If a remote file is checked regularly, it might be a good
|
||||
idea to let-bind this variable to a value less than the time period
|
||||
between consecutive checks. For example:
|
||||
|
||||
@example
|
||||
(defun display-time-file-nonempty-p (file)
|
||||
|
|
|
|||
|
|
@ -1377,15 +1377,15 @@ remains selected until a subsequent call to @code{select-frame}. Each
|
|||
terminal frame has a number which appears in the mode line before the
|
||||
buffer name (@pxref{Mode Line Variables}).
|
||||
|
||||
@defun select-frame-set-input-focus frame
|
||||
@defun select-frame-set-input-focus frame &optional norecord
|
||||
This function selects @var{frame}, raises it (should it happen to be
|
||||
obscured by other frames) and tries to give it the X server's focus. On
|
||||
a text-only terminal, the next redisplay displays the new frame on the
|
||||
entire terminal screen. The return value of this function is not
|
||||
significant.
|
||||
obscured by other frames) and tries to give it the X server's focus.
|
||||
On a text-only terminal, the next redisplay displays the new frame on
|
||||
the entire terminal screen. The optional argument @var{norecord} has
|
||||
the same meaning as for @code{select-frame} (see below). The return
|
||||
value of this function is not significant.
|
||||
@end defun
|
||||
|
||||
@c ??? This is not yet implemented properly.
|
||||
@defun select-frame frame &optional norecord
|
||||
This function selects frame @var{frame}, temporarily disregarding the
|
||||
focus of the X server if any. The selection of @var{frame} lasts until
|
||||
|
|
@ -1395,18 +1395,20 @@ window system, the previously selected frame may be restored as the
|
|||
selected frame after return to the command loop, because it still may
|
||||
have the window system's input focus.)
|
||||
|
||||
The specified @var{frame} becomes the selected frame, as explained
|
||||
above, and the terminal that @var{frame} is on becomes the selected
|
||||
terminal. The window selected within @var{frame} becomes the selected
|
||||
window. This function returns @var{frame}, or @code{nil} if @var{frame}
|
||||
has been deleted.
|
||||
The specified @var{frame} becomes the selected frame, and its terminal
|
||||
becomes the selected terminal. This function then calls
|
||||
@code{select-window} as a subroutine, passing the window selected
|
||||
within @var{frame} as its first argument and @var{norecord} as its
|
||||
second argument (hence, if @var{norecord} is non-@code{nil}, this
|
||||
avoids changing the order of recently selected windows nor the buffer
|
||||
list). @xref{Selecting Windows}.
|
||||
|
||||
Optional argument @var{norecord} non-@code{nil} means to neither change
|
||||
the order of recently selected windows nor the buffer list. @xref{The
|
||||
Buffer List}.
|
||||
This function returns @var{frame}, or @code{nil} if @var{frame} has
|
||||
been deleted.
|
||||
|
||||
In general, you should never use @code{select-frame} in a way that could
|
||||
switch to a different terminal without switching back when you're done.
|
||||
In general, you should never use @code{select-frame} in a way that
|
||||
could switch to a different terminal without switching back when
|
||||
you're done.
|
||||
@end defun
|
||||
|
||||
Emacs cooperates with the window system by arranging to select frames as
|
||||
|
|
|
|||
|
|
@ -21,8 +21,9 @@ define them.
|
|||
* Anonymous Functions:: Lambda expressions are functions with no names.
|
||||
* Function Cells:: Accessing or setting the function definition
|
||||
of a symbol.
|
||||
* Closures:: Functions that enclose a lexical environment.
|
||||
* Obsolete Functions:: Declaring functions obsolete.
|
||||
* Inline Functions:: Defining functions that the compiler will open code.
|
||||
* Inline Functions:: Functions that the compiler will expand inline.
|
||||
* Declaring Functions:: Telling the compiler that a function is defined.
|
||||
* Function Safety:: Determining whether a function is safe to call.
|
||||
* Related Topics:: Cross-references to specific Lisp primitives
|
||||
|
|
@ -32,104 +33,117 @@ define them.
|
|||
@node What Is a Function
|
||||
@section What Is a Function?
|
||||
|
||||
In a general sense, a function is a rule for carrying on a computation
|
||||
given several values called @dfn{arguments}. The result of the
|
||||
computation is called the value of the function. The computation can
|
||||
also have side effects: lasting changes in the values of variables or
|
||||
the contents of data structures.
|
||||
@cindex return value
|
||||
@cindex value of function
|
||||
@cindex argument
|
||||
In a general sense, a function is a rule for carrying out a
|
||||
computation given input values called @dfn{arguments}. The result of
|
||||
the computation is called the @dfn{value} or @dfn{return value} of the
|
||||
function. The computation can also have side effects, such as lasting
|
||||
changes in the values of variables or the contents of data structures.
|
||||
|
||||
Here are important terms for functions in Emacs Lisp and for other
|
||||
function-like objects.
|
||||
In most computer languages, every function has a name. But in Lisp,
|
||||
a function in the strictest sense has no name: it is an object which
|
||||
can @emph{optionally} be associated with a symbol (e.g.@: @code{car})
|
||||
that serves as the function name. @xref{Function Names}. When a
|
||||
function has been given a name, we usually also refer to that symbol
|
||||
as a ``function'' (e.g.@: we refer to ``the function @code{car}'').
|
||||
In this manual, the distinction between a function name and the
|
||||
function object itself is usually unimportant, but we will take note
|
||||
wherever it is relevant.
|
||||
|
||||
Certain function-like objects, called @dfn{special forms} and
|
||||
@dfn{macros}, also accept arguments to carry out computations.
|
||||
However, as explained below, these are not considered functions in
|
||||
Emacs Lisp.
|
||||
|
||||
Here are important terms for functions and function-like objects:
|
||||
|
||||
@table @dfn
|
||||
@item function
|
||||
@cindex function
|
||||
In Emacs Lisp, a @dfn{function} is anything that can be applied to
|
||||
arguments in a Lisp program. In some cases, we use it more
|
||||
specifically to mean a function written in Lisp. Special forms and
|
||||
macros are not functions.
|
||||
@item lambda expression
|
||||
A function (in the strict sense, i.e.@: a function object) which is
|
||||
written in Lisp. These are described in the following section.
|
||||
@ifnottex
|
||||
@xref{Lambda Expressions}.
|
||||
@end ifnottex
|
||||
|
||||
@item primitive
|
||||
@cindex primitive
|
||||
@cindex subr
|
||||
@cindex built-in function
|
||||
A @dfn{primitive} is a function callable from Lisp that is written in C,
|
||||
such as @code{car} or @code{append}. These functions are also called
|
||||
@dfn{built-in functions}, or @dfn{subrs}. (Special forms are also
|
||||
considered primitives.)
|
||||
A function which is callable from Lisp but is actually written in C.
|
||||
Primitives are also called @dfn{built-in functions}, or @dfn{subrs}.
|
||||
Examples include functions like @code{car} and @code{append}. In
|
||||
addition, all special forms (see below) are also considered
|
||||
primitives.
|
||||
|
||||
Usually the reason we implement a function as a primitive is either
|
||||
because it is fundamental, because it provides a low-level interface
|
||||
to operating system services, or because it needs to run fast.
|
||||
Primitives can be modified or added only by changing the C sources and
|
||||
recompiling the editor. See @ref{Writing Emacs Primitives}.
|
||||
|
||||
@item lambda expression
|
||||
A @dfn{lambda expression} is a function written in Lisp.
|
||||
These are described in the following section.
|
||||
@ifnottex
|
||||
@xref{Lambda Expressions}.
|
||||
@end ifnottex
|
||||
Usually, a function is implemented as a primitive because it is a
|
||||
fundamental part of Lisp (e.g.@: @code{car}), or because it provides a
|
||||
low-level interface to operating system services, or because it needs
|
||||
to run fast. Unlike functions defined in Lisp, primitives can be
|
||||
modified or added only by changing the C sources and recompiling
|
||||
Emacs. See @ref{Writing Emacs Primitives}.
|
||||
|
||||
@item special form
|
||||
A @dfn{special form} is a primitive that is like a function but does not
|
||||
evaluate all of its arguments in the usual way. It may evaluate only
|
||||
some of the arguments, or may evaluate them in an unusual order, or
|
||||
several times. Many special forms are described in @ref{Control
|
||||
Structures}.
|
||||
A primitive that is like a function but does not evaluate all of its
|
||||
arguments in the usual way. It may evaluate only some of the
|
||||
arguments, or may evaluate them in an unusual order, or several times.
|
||||
Examples include @code{if}, @code{and}, and @code{while}.
|
||||
@xref{Special Forms}.
|
||||
|
||||
@item macro
|
||||
@cindex macro
|
||||
A @dfn{macro} is a construct defined in Lisp by the programmer. It
|
||||
differs from a function in that it translates a Lisp expression that you
|
||||
write into an equivalent expression to be evaluated instead of the
|
||||
original expression. Macros enable Lisp programmers to do the sorts of
|
||||
things that special forms can do. @xref{Macros}, for how to define and
|
||||
use macros.
|
||||
A construct defined in Lisp, which differs from a function in that it
|
||||
translates a Lisp expression into another expression which is to be
|
||||
evaluated instead of the original expression. Macros enable Lisp
|
||||
programmers to do the sorts of things that special forms can do.
|
||||
@xref{Macros}.
|
||||
|
||||
@item command
|
||||
@cindex command
|
||||
A @dfn{command} is an object that @code{command-execute} can invoke; it
|
||||
is a possible definition for a key sequence. Some functions are
|
||||
commands; a function written in Lisp is a command if it contains an
|
||||
interactive declaration (@pxref{Defining Commands}). Such a function
|
||||
can be called from Lisp expressions like other functions; in this case,
|
||||
the fact that the function is a command makes no difference.
|
||||
An object which can be invoked via the @code{command-execute}
|
||||
primitive, usually due to the user typing in a key sequence
|
||||
@dfn{bound} to that command. @xref{Interactive Call}. A command is
|
||||
usually a function; if the function is written in Lisp, it is made
|
||||
into a command by an @code{interactive} form in the function
|
||||
definition (@pxref{Defining Commands}). Commands that are functions
|
||||
can also be called from Lisp expressions, just like other functions.
|
||||
|
||||
Keyboard macros (strings and vectors) are commands also, even though
|
||||
they are not functions. A symbol is a command if its function
|
||||
definition is a command; such symbols can be invoked with @kbd{M-x}.
|
||||
The symbol is a function as well if the definition is a function.
|
||||
@xref{Interactive Call}.
|
||||
they are not functions. @xref{Keyboard Macros}. We say that a symbol
|
||||
is a command if its function cell contains a command (@pxref{Symbol
|
||||
Components}); such a @dfn{named command} can be invoked with
|
||||
@kbd{M-x}.
|
||||
|
||||
@item keystroke command
|
||||
@cindex keystroke command
|
||||
A @dfn{keystroke command} is a command that is bound to a key sequence
|
||||
(typically one to three keystrokes). The distinction is made here
|
||||
merely to avoid confusion with the meaning of ``command'' in non-Emacs
|
||||
editors; for Lisp programs, the distinction is normally unimportant.
|
||||
@item closure
|
||||
A function object that is much like a lambda expression, except that
|
||||
it also encloses an ``environment'' of lexical variable bindings.
|
||||
@xref{Closures}.
|
||||
|
||||
@item byte-code function
|
||||
A @dfn{byte-code function} is a function that has been compiled by the
|
||||
byte compiler. @xref{Byte-Code Type}.
|
||||
A function that has been compiled by the byte compiler.
|
||||
@xref{Byte-Code Type}.
|
||||
|
||||
@item autoload object
|
||||
@cindex autoload object
|
||||
An @dfn{autoload object} is a place-holder for a real function. If
|
||||
the autoload object is called, it will make Emacs load the file
|
||||
containing the definition of the real function, and then call the real
|
||||
function instead.
|
||||
A place-holder for a real function. If the autoload object is called,
|
||||
Emacs loads the file containing the definition of the real function,
|
||||
and then calls the real function. @xref{Autoload}.
|
||||
@end table
|
||||
|
||||
You can use the function @code{functionp} to test if an object is a
|
||||
function:
|
||||
|
||||
@defun functionp object
|
||||
This function returns @code{t} if @var{object} is any kind of
|
||||
function, i.e.@: can be passed to @code{funcall}. Note that
|
||||
@code{functionp} returns @code{nil} for special forms (@pxref{Special
|
||||
Forms}).
|
||||
@code{functionp} returns @code{t} for symbols that are function names,
|
||||
and returns @code{nil} for special forms.
|
||||
@end defun
|
||||
|
||||
Unlike @code{functionp}, the next three functions do @emph{not}
|
||||
treat a symbol as its function definition.
|
||||
@noindent
|
||||
Unlike @code{functionp}, the next three functions do @emph{not} treat
|
||||
a symbol as its function definition.
|
||||
|
||||
@defun subrp object
|
||||
This function returns @code{t} if @var{object} is a built-in function
|
||||
|
|
@ -172,21 +186,26 @@ function with @code{&rest} arguments, or the symbol @code{unevalled} if
|
|||
@section Lambda Expressions
|
||||
@cindex lambda expression
|
||||
|
||||
A function written in Lisp is a list that looks like this:
|
||||
A lambda expression is a function object written in Lisp. Here is
|
||||
an example:
|
||||
|
||||
@example
|
||||
(lambda (@var{arg-variables}@dots{})
|
||||
@r{[}@var{documentation-string}@r{]}
|
||||
@r{[}@var{interactive-declaration}@r{]}
|
||||
@var{body-forms}@dots{})
|
||||
(lambda (x)
|
||||
"Return the hyperbolic cosine of X."
|
||||
(* 0.5 (+ (exp x) (exp (- x)))))
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Such a list is called a @dfn{lambda expression}. In Emacs Lisp, it
|
||||
actually is valid as an expression---it evaluates to itself. In some
|
||||
other Lisp dialects, a lambda expression is not a valid expression at
|
||||
all. In either case, its main use is not to be evaluated as an
|
||||
expression, but to be called as a function.
|
||||
In Emacs Lisp, such a list is valid as an expression---it evaluates to
|
||||
itself. But its main use is not to be evaluated as an expression, but
|
||||
to be called as a function.
|
||||
|
||||
A lambda expression, by itself, has no name; it is an @dfn{anonymous
|
||||
function}. Although lambda expressions can be used this way
|
||||
(@pxref{Anonymous Functions}), they are more commonly associated with
|
||||
symbols to make @dfn{named functions} (@pxref{Function Names}).
|
||||
Before going into these details, the following subsections describe
|
||||
the components of a lambda expression and what they do.
|
||||
|
||||
@menu
|
||||
* Lambda Components:: The parts of a lambda expression.
|
||||
|
|
@ -198,10 +217,7 @@ expression, but to be called as a function.
|
|||
@node Lambda Components
|
||||
@subsection Components of a Lambda Expression
|
||||
|
||||
@ifnottex
|
||||
|
||||
A function written in Lisp (a ``lambda expression'') is a list that
|
||||
looks like this:
|
||||
A lambda expression is a list that looks like this:
|
||||
|
||||
@example
|
||||
(lambda (@var{arg-variables}@dots{})
|
||||
|
|
@ -209,7 +225,6 @@ looks like this:
|
|||
[@var{interactive-declaration}]
|
||||
@var{body-forms}@dots{})
|
||||
@end example
|
||||
@end ifnottex
|
||||
|
||||
@cindex lambda list
|
||||
The first element of a lambda expression is always the symbol
|
||||
|
|
@ -243,9 +258,9 @@ code to do the work of the function (or, as a Lisp programmer would say,
|
|||
function is the value returned by the last element of the body.
|
||||
|
||||
@node Simple Lambda
|
||||
@subsection A Simple Lambda-Expression Example
|
||||
@subsection A Simple Lambda Expression Example
|
||||
|
||||
Consider for example the following function:
|
||||
Consider the following example:
|
||||
|
||||
@example
|
||||
(lambda (a b c) (+ a b c))
|
||||
|
|
@ -283,18 +298,15 @@ This evaluates the arguments @code{1}, @code{(* 2 3)}, and @code{(- 5
|
|||
4)} from left to right. Then it applies the lambda expression to the
|
||||
argument values 1, 6 and 1 to produce the value 8.
|
||||
|
||||
It is not often useful to write a lambda expression as the @sc{car} of
|
||||
a form in this way. You can get the same result, of making local
|
||||
variables and giving them values, using the special form @code{let}
|
||||
(@pxref{Local Variables}). And @code{let} is clearer and easier to use.
|
||||
In practice, lambda expressions are either stored as the function
|
||||
definitions of symbols, to produce named functions, or passed as
|
||||
arguments to other functions (@pxref{Anonymous Functions}).
|
||||
|
||||
However, calls to explicit lambda expressions were very useful in the
|
||||
old days of Lisp, before the special form @code{let} was invented. At
|
||||
that time, they were the only way to bind and initialize local
|
||||
variables.
|
||||
As these examples show, you can use a form with a lambda expression
|
||||
as its @sc{car} to make local variables and give them values. In the
|
||||
old days of Lisp, this technique was the only way to bind and
|
||||
initialize local variables. But nowadays, it is clearer to use the
|
||||
special form @code{let} for this purpose (@pxref{Local Variables}).
|
||||
Lambda expressions are mainly used as anonymous functions for passing
|
||||
as arguments to other functions (@pxref{Anonymous Functions}), or
|
||||
stored as symbol function definitions to produce named functions
|
||||
(@pxref{Function Names}).
|
||||
|
||||
@node Argument List
|
||||
@subsection Other Features of Argument Lists
|
||||
|
|
@ -405,12 +417,12 @@ after a @code{&rest} argument.
|
|||
@subsection Documentation Strings of Functions
|
||||
@cindex documentation of function
|
||||
|
||||
A lambda expression may optionally have a @dfn{documentation string} just
|
||||
after the lambda list. This string does not affect execution of the
|
||||
function; it is a kind of comment, but a systematized comment which
|
||||
actually appears inside the Lisp world and can be used by the Emacs help
|
||||
facilities. @xref{Documentation}, for how the @var{documentation-string} is
|
||||
accessed.
|
||||
A lambda expression may optionally have a @dfn{documentation string}
|
||||
just after the lambda list. This string does not affect execution of
|
||||
the function; it is a kind of comment, but a systematized comment
|
||||
which actually appears inside the Lisp world and can be used by the
|
||||
Emacs help facilities. @xref{Documentation}, for how the
|
||||
documentation string is accessed.
|
||||
|
||||
It is a good idea to provide documentation strings for all the
|
||||
functions in your program, even those that are called only from within
|
||||
|
|
@ -463,55 +475,45 @@ way users think of the parts of the macro call.
|
|||
@cindex named function
|
||||
@cindex function name
|
||||
|
||||
In most computer languages, every function has a name; the idea of a
|
||||
function without a name is nonsensical. In Lisp, a function in the
|
||||
strictest sense has no name. It is simply a list whose first element is
|
||||
@code{lambda}, a byte-code function object, or a primitive subr-object.
|
||||
A symbol can serve as the name of a function. This happens when the
|
||||
symbol's @dfn{function cell} (@pxref{Symbol Components}) contains a
|
||||
function object (e.g.@: a lambda expression). Then the symbol itself
|
||||
becomes a valid, callable function, equivalent to the function object
|
||||
in its function cell.
|
||||
|
||||
However, a symbol can serve as the name of a function. This happens
|
||||
when you put the function in the symbol's @dfn{function cell}
|
||||
(@pxref{Symbol Components}). Then the symbol itself becomes a valid,
|
||||
callable function, equivalent to the list or subr-object that its
|
||||
function cell refers to. The contents of the function cell are also
|
||||
called the symbol's @dfn{function definition}. The procedure of using a
|
||||
symbol's function definition in place of the symbol is called
|
||||
@dfn{symbol function indirection}; see @ref{Function Indirection}.
|
||||
The contents of the function cell are also called the symbol's
|
||||
@dfn{function definition}. The procedure of using a symbol's function
|
||||
definition in place of the symbol is called @dfn{symbol function
|
||||
indirection}; see @ref{Function Indirection}. If you have not given a
|
||||
symbol a function definition, its function cell is said to be
|
||||
@dfn{void}, and it cannot be used as a function.
|
||||
|
||||
In practice, nearly all functions are given names in this way and
|
||||
referred to through their names. For example, the symbol @code{car} works
|
||||
as a function and does what it does because the primitive subr-object
|
||||
@code{#<subr car>} is stored in its function cell.
|
||||
In practice, nearly all functions have names, and are referred to by
|
||||
their names. You can create a named Lisp function by defining a
|
||||
lambda expression and putting it in a function cell (@pxref{Function
|
||||
Cells}). However, it is more common to use the @code{defun} special
|
||||
form, described in the next section.
|
||||
@ifnottex
|
||||
@xref{Defining Functions}.
|
||||
@end ifnottex
|
||||
|
||||
We give functions names because it is convenient to refer to them by
|
||||
their names in Lisp expressions. For primitive subr-objects such as
|
||||
@code{#<subr car>}, names are the only way you can refer to them: there
|
||||
is no read syntax for such objects. For functions written in Lisp, the
|
||||
name is more convenient to use in a call than an explicit lambda
|
||||
expression. Also, a function with a name can refer to itself---it can
|
||||
be recursive. Writing the function's name in its own definition is much
|
||||
more convenient than making the function definition point to itself
|
||||
(something that is not impossible but that has various disadvantages in
|
||||
practice).
|
||||
their names in Lisp expressions. Also, a named Lisp function can
|
||||
easily refer to itself---it can be recursive. Furthermore, primitives
|
||||
can only be referred to textually by their names, since primitive
|
||||
function objects (@pxref{Primitive Function Type}) have no read
|
||||
syntax.
|
||||
|
||||
We often identify functions with the symbols used to name them. For
|
||||
example, we often speak of ``the function @code{car},'' not
|
||||
distinguishing between the symbol @code{car} and the primitive
|
||||
subr-object that is its function definition. For most purposes, the
|
||||
distinction is not important.
|
||||
A function need not have a unique name. A given function object
|
||||
@emph{usually} appears in the function cell of only one symbol, but
|
||||
this is just a convention. It is easy to store it in several symbols
|
||||
using @code{fset}; then each of the symbols is a valid name for the
|
||||
same function.
|
||||
|
||||
Even so, keep in mind that a function need not have a unique name. While
|
||||
a given function object @emph{usually} appears in the function cell of only
|
||||
one symbol, this is just a matter of convenience. It is easy to store
|
||||
it in several symbols using @code{fset}; then each of the symbols is
|
||||
equally well a name for the same function.
|
||||
|
||||
A symbol used as a function name may also be used as a variable; these
|
||||
two uses of a symbol are independent and do not conflict. (Some Lisp
|
||||
dialects, such as Scheme, do not distinguish between a symbol's value
|
||||
and its function definition; a symbol's value as a variable is also its
|
||||
function definition.) If you have not given a symbol a function
|
||||
definition, you cannot use it as a function; whether the symbol has a
|
||||
value as a variable makes no difference to this.
|
||||
Note that a symbol used as a function name may also be used as a
|
||||
variable; these two uses of a symbol are independent and do not
|
||||
conflict. (This is not the case in some dialects of Lisp, like
|
||||
Scheme.)
|
||||
|
||||
@node Defining Functions
|
||||
@section Defining Functions
|
||||
|
|
@ -521,7 +523,7 @@ value as a variable makes no difference to this.
|
|||
is called @dfn{defining a function}, and it is done with the
|
||||
@code{defun} special form.
|
||||
|
||||
@defspec defun name argument-list body-forms
|
||||
@defspec defun name argument-list body-forms...
|
||||
@code{defun} is the usual way to define new Lisp functions. It
|
||||
defines the symbol @var{name} as a function that looks like this:
|
||||
|
||||
|
|
@ -534,14 +536,9 @@ defines the symbol @var{name} as a function that looks like this:
|
|||
value.
|
||||
|
||||
As described previously, @var{argument-list} is a list of argument
|
||||
names and may include the keywords @code{&optional} and @code{&rest}
|
||||
(@pxref{Lambda Expressions}). Also, the first two of the
|
||||
@var{body-forms} may be a documentation string and an interactive
|
||||
declaration.
|
||||
|
||||
There is no conflict if the same symbol @var{name} is also used as a
|
||||
variable, since the symbol's value cell is independent of the function
|
||||
cell. @xref{Symbol Components}.
|
||||
names and may include the keywords @code{&optional} and @code{&rest}.
|
||||
Also, the first two of the @var{body-forms} may be a documentation
|
||||
string and an interactive declaration. @xref{Lambda Components}.
|
||||
|
||||
Here are some examples:
|
||||
|
||||
|
|
@ -575,7 +572,7 @@ Here are some examples:
|
|||
|
||||
@group
|
||||
(defun capitalize-backwards ()
|
||||
"Upcase the last letter of a word."
|
||||
"Upcase the last letter of the word at point."
|
||||
(interactive)
|
||||
(backward-word 1)
|
||||
(forward-word 1)
|
||||
|
|
@ -587,9 +584,10 @@ Here are some examples:
|
|||
|
||||
Be careful not to redefine existing functions unintentionally.
|
||||
@code{defun} redefines even primitive functions such as @code{car}
|
||||
without any hesitation or notification. Redefining a function already
|
||||
defined is often done deliberately, and there is no way to distinguish
|
||||
deliberate redefinition from unintentional redefinition.
|
||||
without any hesitation or notification. Emacs does not prevent you
|
||||
from doing this, because redefining a function is sometimes done
|
||||
deliberately, and there is no way to distinguish deliberate
|
||||
redefinition from unintentional redefinition.
|
||||
@end defspec
|
||||
|
||||
@cindex function aliases
|
||||
|
|
@ -626,7 +624,8 @@ call the primitive's C definition directly, so changing the symbol's
|
|||
definition will have no effect on them.
|
||||
|
||||
See also @code{defsubst}, which defines a function like @code{defun}
|
||||
and tells the Lisp compiler to open-code it. @xref{Inline Functions}.
|
||||
and tells the Lisp compiler to perform inline expansion on it.
|
||||
@xref{Inline Functions}.
|
||||
|
||||
@node Calling Functions
|
||||
@section Calling Functions
|
||||
|
|
@ -790,11 +789,10 @@ This function returns @var{arg} and has no side effects.
|
|||
This function ignores any arguments and returns @code{nil}.
|
||||
@end defun
|
||||
|
||||
Emacs Lisp functions can also be user-visible @dfn{commands}. A
|
||||
command is a function that has an @dfn{interactive} specification.
|
||||
You may want to call these functions as if they were called
|
||||
interactively. See @ref{Interactive Call} for details on how to do
|
||||
that.
|
||||
Some functions are user-visible @dfn{commands}, which can be called
|
||||
interactively (usually by a key sequence). It is possible to invoke
|
||||
such a command exactly as though it was called interactively, by using
|
||||
the @code{call-interactively} function. @xref{Interactive Call}.
|
||||
|
||||
@node Mapping Functions
|
||||
@section Mapping Functions
|
||||
|
|
@ -802,12 +800,12 @@ that.
|
|||
|
||||
A @dfn{mapping function} applies a given function (@emph{not} a
|
||||
special form or macro) to each element of a list or other collection.
|
||||
Emacs Lisp has several such functions; @code{mapcar} and
|
||||
@code{mapconcat}, which scan a list, are described here.
|
||||
@xref{Definition of mapatoms}, for the function @code{mapatoms} which
|
||||
maps over the symbols in an obarray. @xref{Definition of maphash},
|
||||
for the function @code{maphash} which maps over key/value associations
|
||||
in a hash table.
|
||||
Emacs Lisp has several such functions; this section describes
|
||||
@code{mapcar}, @code{mapc}, and @code{mapconcat}, which map over a
|
||||
list. @xref{Definition of mapatoms}, for the function @code{mapatoms}
|
||||
which maps over the symbols in an obarray. @xref{Definition of
|
||||
maphash}, for the function @code{maphash} which maps over key/value
|
||||
associations in a hash table.
|
||||
|
||||
These mapping functions do not allow char-tables because a char-table
|
||||
is a sparse array whose nominal range of indices is very large. To map
|
||||
|
|
@ -898,47 +896,66 @@ bool-vector, or a string.
|
|||
@section Anonymous Functions
|
||||
@cindex anonymous function
|
||||
|
||||
In Lisp, a function is a list that starts with @code{lambda}, a
|
||||
byte-code function compiled from such a list, or alternatively a
|
||||
primitive subr-object; names are ``extra.'' Although functions are
|
||||
usually defined with @code{defun} and given names at the same time, it
|
||||
is occasionally more concise to use an explicit lambda expression---an
|
||||
anonymous function. Such a list is valid wherever a function name is.
|
||||
Although functions are usually defined with @code{defun} and given
|
||||
names at the same time, it is sometimes convenient to use an explicit
|
||||
lambda expression---an @dfn{anonymous function}. Anonymous functions
|
||||
are valid wherever function names are. They are often assigned as
|
||||
variable values, or as arguments to functions; for instance, you might
|
||||
pass one as the @var{function} argument to @code{mapcar}, which
|
||||
applies that function to each element of a list (@pxref{Mapping
|
||||
Functions}). @xref{describe-symbols example}, for a realistic example
|
||||
of this.
|
||||
|
||||
Any method of creating such a list makes a valid function. Even this:
|
||||
When defining a lambda expression that is to be used as an anonymous
|
||||
function, you can in principle use any method to construct the list.
|
||||
But typically you should use the @code{lambda} macro, or the
|
||||
@code{function} special form, or the @code{#'} read syntax:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
(setq silly (append '(lambda (x)) (list (list '+ (* 3 4) 'x))))
|
||||
@result{} (lambda (x) (+ 12 x))
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
This computes a list that looks like @code{(lambda (x) (+ 12 x))} and
|
||||
makes it the value (@emph{not} the function definition!) of
|
||||
@code{silly}.
|
||||
|
||||
Here is how we might call this function:
|
||||
@defmac lambda args body...
|
||||
This macro returns an anonymous function with argument list @var{args}
|
||||
and body forms given by @var{body}. In effect, this macro makes
|
||||
@code{lambda} forms ``self-quoting'': evaluating a form whose @sc{car}
|
||||
is @code{lambda} yields the form itself:
|
||||
|
||||
@example
|
||||
@group
|
||||
(funcall silly 1)
|
||||
@result{} 13
|
||||
@end group
|
||||
(lambda (x) (* x x))
|
||||
@result{} (lambda (x) (* x x))
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
It does @emph{not} work to write @code{(silly 1)}, because this
|
||||
function is not the @emph{function definition} of @code{silly}. We
|
||||
have not given @code{silly} any function definition, just a value as a
|
||||
variable.
|
||||
The @code{lambda} form has one other effect: it tells the Emacs
|
||||
evaluator and byte-compiler that its argument is a function, by using
|
||||
@code{function} as a subroutine (see below).
|
||||
@end defmac
|
||||
|
||||
Most of the time, anonymous functions are constants that appear in
|
||||
your program. For instance, you might want to pass one as an argument
|
||||
to the function @code{mapcar}, which applies any given function to
|
||||
each element of a list (@pxref{Mapping Functions}).
|
||||
@xref{describe-symbols example}, for a realistic example of this.
|
||||
@defspec function function-object
|
||||
@cindex function quoting
|
||||
This special form returns @var{function-object} without evaluating it.
|
||||
In this, it is similar to @code{quote} (@pxref{Quoting}). But unlike
|
||||
@code{quote}, it also serves as a note to the Emacs evaluator and
|
||||
byte-compiler that @var{function-object} is intended to be used as a
|
||||
function. Assuming @var{function-object} is a valid lambda
|
||||
expression, this has two effects:
|
||||
|
||||
@itemize
|
||||
@item
|
||||
When the code is byte-compiled, @var{function-object} is compiled into
|
||||
a byte-code function object (@pxref{Byte Compilation}).
|
||||
|
||||
@item
|
||||
When lexical binding is enabled, @var{function-object} is converted
|
||||
into a closure. @xref{Closures}.
|
||||
@end itemize
|
||||
@end defspec
|
||||
|
||||
@cindex @samp{#'} syntax
|
||||
The read syntax @code{#'} is a short-hand for using @code{function}.
|
||||
The following forms are all equivalent:
|
||||
|
||||
@example
|
||||
(lambda (x) (* x x))
|
||||
(function (lambda (x) (* x x)))
|
||||
#'(lambda (x) (* x x))
|
||||
@end example
|
||||
|
||||
In the following example, we define a @code{change-property}
|
||||
function that takes a function as its third argument, followed by a
|
||||
|
|
@ -959,15 +976,11 @@ function that takes a function as its third argument, followed by a
|
|||
@end example
|
||||
|
||||
@noindent
|
||||
In the @code{double-property} function, we did not quote the
|
||||
@code{lambda} form. This is permissible, because a @code{lambda} form
|
||||
is @dfn{self-quoting}: evaluating the form yields the form itself.
|
||||
Note that we do not quote the @code{lambda} form.
|
||||
|
||||
Whether or not you quote a @code{lambda} form makes a difference if
|
||||
you compile the code (@pxref{Byte Compilation}). If the @code{lambda}
|
||||
form is unquoted, as in the above example, the anonymous function is
|
||||
also compiled. Suppose, however, that we quoted the @code{lambda}
|
||||
form:
|
||||
If you compile the above code, the anonymous function is also
|
||||
compiled. This would not happen if, say, you had constructed the
|
||||
anonymous function by quoting it as a list:
|
||||
|
||||
@example
|
||||
@group
|
||||
|
|
@ -977,52 +990,10 @@ form:
|
|||
@end example
|
||||
|
||||
@noindent
|
||||
If you compile this, the argument passed to @code{change-property} is
|
||||
the precise list shown:
|
||||
|
||||
@example
|
||||
(lambda (x) (* x 2))
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
The Lisp compiler cannot assume this list is a function, even though
|
||||
it looks like one, since it does not know what @code{change-property}
|
||||
will do with the list. Perhaps it will check whether the @sc{car} of
|
||||
the third element is the symbol @code{*}!
|
||||
|
||||
@findex function
|
||||
The @code{function} special form explicitly tells the byte-compiler
|
||||
that its argument is a function:
|
||||
|
||||
@defspec function function-object
|
||||
@cindex function quoting
|
||||
This special form returns @var{function-object} without evaluating it.
|
||||
In this, it is equivalent to @code{quote}. However, it serves as a
|
||||
note to the Emacs Lisp compiler that @var{function-object} is intended
|
||||
to be used only as a function, and therefore can safely be compiled.
|
||||
Contrast this with @code{quote}, in @ref{Quoting}.
|
||||
@end defspec
|
||||
|
||||
@cindex @samp{#'} syntax
|
||||
The read syntax @code{#'} is a short-hand for using @code{function}.
|
||||
Generally, it is not necessary to use either @code{#'} or
|
||||
@code{function}; just use an unquoted @code{lambda} form instead.
|
||||
(Actually, @code{lambda} is a macro defined using @code{function}.)
|
||||
The following forms are all equivalent:
|
||||
|
||||
@example
|
||||
#'(lambda (x) (* x x))
|
||||
(function (lambda (x) (* x x)))
|
||||
(lambda (x) (* x x))
|
||||
@end example
|
||||
|
||||
We sometimes write @code{function} instead of @code{quote} when
|
||||
quoting the name of a function, but this usage is just a sort of
|
||||
comment:
|
||||
|
||||
@example
|
||||
(function @var{symbol}) @equiv{} (quote @var{symbol}) @equiv{} '@var{symbol}
|
||||
@end example
|
||||
In that case, the anonymous function is kept as a lambda expression in
|
||||
the compiled code. The byte-compiler cannot assume this list is a
|
||||
function, even though it looks like one, since it does not know that
|
||||
@code{change-property} intends to use it as a function.
|
||||
|
||||
@node Function Cells
|
||||
@section Accessing Function Cell Contents
|
||||
|
|
@ -1118,77 +1089,60 @@ This function stores @var{definition} in the function cell of
|
|||
this is not checked. The argument @var{symbol} is an ordinary evaluated
|
||||
argument.
|
||||
|
||||
There are three normal uses of this function:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Copying one symbol's function definition to another---in other words,
|
||||
making an alternate name for a function. (If you think of this as the
|
||||
definition of the new name, you should use @code{defalias} instead of
|
||||
@code{fset}; see @ref{Definition of defalias}.)
|
||||
|
||||
@item
|
||||
Giving a symbol a function definition that is not a list and therefore
|
||||
cannot be made with @code{defun}. For example, you can use @code{fset}
|
||||
to give a symbol @code{s1} a function definition which is another symbol
|
||||
@code{s2}; then @code{s1} serves as an alias for whatever definition
|
||||
@code{s2} presently has. (Once again use @code{defalias} instead of
|
||||
@code{fset} if you think of this as the definition of @code{s1}.)
|
||||
|
||||
@item
|
||||
In constructs for defining or altering functions. If @code{defun}
|
||||
were not a primitive, it could be written in Lisp (as a macro) using
|
||||
@code{fset}.
|
||||
@end itemize
|
||||
|
||||
Here are examples of these uses:
|
||||
The primary use of this function is as a subroutine by constructs that
|
||||
define or alter functions, like @code{defadvice} (@pxref{Advising
|
||||
Functions}). (If @code{defun} were not a primitive, it could be
|
||||
written as a Lisp macro using @code{fset}.) You can also use it to
|
||||
give a symbol a function definition that is not a list, e.g.@: a
|
||||
keyboard macro (@pxref{Keyboard Macros}):
|
||||
|
||||
@example
|
||||
@group
|
||||
;; @r{Save @code{foo}'s definition in @code{old-foo}.}
|
||||
(fset 'old-foo (symbol-function 'foo))
|
||||
@end group
|
||||
|
||||
@group
|
||||
;; @r{Make the symbol @code{car} the function definition of @code{xfirst}.}
|
||||
;; @r{(Most likely, @code{defalias} would be better than @code{fset} here.)}
|
||||
(fset 'xfirst 'car)
|
||||
@result{} car
|
||||
@end group
|
||||
@group
|
||||
(xfirst '(1 2 3))
|
||||
@result{} 1
|
||||
@end group
|
||||
@group
|
||||
(symbol-function 'xfirst)
|
||||
@result{} car
|
||||
@end group
|
||||
@group
|
||||
(symbol-function (symbol-function 'xfirst))
|
||||
@result{} #<subr car>
|
||||
@end group
|
||||
|
||||
@group
|
||||
;; @r{Define a named keyboard macro.}
|
||||
(fset 'kill-two-lines "\^u2\^k")
|
||||
@result{} "\^u2\^k"
|
||||
@end group
|
||||
|
||||
@group
|
||||
;; @r{Here is a function that alters other functions.}
|
||||
(defun copy-function-definition (new old)
|
||||
"Define NEW with the same function definition as OLD."
|
||||
(fset new (symbol-function old)))
|
||||
@end group
|
||||
@end example
|
||||
|
||||
It you wish to use @code{fset} to make an alternate name for a
|
||||
function, consider using @code{defalias} instead. @xref{Definition of
|
||||
defalias}.
|
||||
@end defun
|
||||
|
||||
@code{fset} is sometimes used to save the old definition of a
|
||||
function before redefining it. That permits the new definition to
|
||||
invoke the old definition. But it is unmodular and unclean for a Lisp
|
||||
file to redefine a function defined elsewhere. If you want to modify
|
||||
a function defined by another package, it is cleaner to use
|
||||
@code{defadvice} (@pxref{Advising Functions}).
|
||||
@node Closures
|
||||
@section Closures
|
||||
|
||||
As explained in @ref{Variable Scoping}, Emacs can optionally enable
|
||||
lexical binding of variables. When lexical binding is enabled, any
|
||||
named function that you create (e.g.@: with @code{defun}), as well as
|
||||
any anonymous function that you create using the @code{lambda} macro
|
||||
or the @code{function} special form or the @code{#'} syntax
|
||||
(@pxref{Anonymous Functions}), is automatically converted into a
|
||||
closure.
|
||||
|
||||
A closure is a function that also carries a record of the lexical
|
||||
environment that existed when the function was defined. When it is
|
||||
invoked, any lexical variable references within its definition use the
|
||||
retained lexical environment. In all other respects, closures behave
|
||||
much like ordinary functions; in particular, they can be called in the
|
||||
same way as ordinary functions.
|
||||
|
||||
@xref{Lexical Binding}, for an example of using a closure.
|
||||
|
||||
Currently, an Emacs Lisp closure object is represented by a list
|
||||
with the symbol @code{closure} as the first element, a list
|
||||
representing the lexical environment as the second element, and the
|
||||
argument list and body forms as the remaining elements:
|
||||
|
||||
@example
|
||||
;; @r{lexical binding is enabled.}
|
||||
(lambda (x) (* x x))
|
||||
@result{} (closure (t) (x) (* x x))
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
However, the fact that the internal structure of a closure is
|
||||
``exposed'' to the rest of the Lisp world is considered an internal
|
||||
implementation detail. For this reason, we recommend against directly
|
||||
examining or altering the structure of closure objects.
|
||||
|
||||
@node Obsolete Functions
|
||||
@section Declaring Functions Obsolete
|
||||
|
|
@ -1254,41 +1208,46 @@ this:
|
|||
@section Inline Functions
|
||||
@cindex inline functions
|
||||
|
||||
@findex defsubst
|
||||
You can define an @dfn{inline function} by using @code{defsubst} instead
|
||||
of @code{defun}. An inline function works just like an ordinary
|
||||
function except for one thing: when you compile a call to the function,
|
||||
the function's definition is open-coded into the caller.
|
||||
@defmac defsubst name argument-list body-forms...
|
||||
Define an inline function. The syntax is exactly the same as
|
||||
@code{defun} (@pxref{Defining Functions}).
|
||||
@end defmac
|
||||
|
||||
Making a function inline makes explicit calls run faster. But it also
|
||||
has disadvantages. For one thing, it reduces flexibility; if you
|
||||
change the definition of the function, calls already inlined still use
|
||||
the old definition until you recompile them.
|
||||
You can define an @dfn{inline function} by using @code{defsubst}
|
||||
instead of @code{defun}. An inline function works just like an
|
||||
ordinary function except for one thing: when you byte-compile a call
|
||||
to the function (@pxref{Byte Compilation}), the function's definition
|
||||
is expanded into the caller.
|
||||
|
||||
Another disadvantage is that making a large function inline can increase
|
||||
the size of compiled code both in files and in memory. Since the speed
|
||||
advantage of inline functions is greatest for small functions, you
|
||||
generally should not make large functions inline.
|
||||
Making a function inline often makes its function calls run faster.
|
||||
But it also has disadvantages. For one thing, it reduces flexibility;
|
||||
if you change the definition of the function, calls already inlined
|
||||
still use the old definition until you recompile them.
|
||||
|
||||
Also, inline functions do not behave well with respect to debugging,
|
||||
Another disadvantage is that making a large function inline can
|
||||
increase the size of compiled code both in files and in memory. Since
|
||||
the speed advantage of inline functions is greatest for small
|
||||
functions, you generally should not make large functions inline.
|
||||
|
||||
Also, inline functions do not behave well with respect to debugging,
|
||||
tracing, and advising (@pxref{Advising Functions}). Since ease of
|
||||
debugging and the flexibility of redefining functions are important
|
||||
features of Emacs, you should not make a function inline, even if it's
|
||||
small, unless its speed is really crucial, and you've timed the code
|
||||
to verify that using @code{defun} actually has performance problems.
|
||||
|
||||
It's possible to define a macro to expand into the same code that an
|
||||
inline function would execute. (@xref{Macros}.) But the macro would be
|
||||
limited to direct use in expressions---a macro cannot be called with
|
||||
@code{apply}, @code{mapcar} and so on. Also, it takes some work to
|
||||
convert an ordinary function into a macro. To convert it into an inline
|
||||
function is very easy; simply replace @code{defun} with @code{defsubst}.
|
||||
Since each argument of an inline function is evaluated exactly once, you
|
||||
needn't worry about how many times the body uses the arguments, as you
|
||||
do for macros. (@xref{Argument Evaluation}.)
|
||||
It's possible to define a macro to expand into the same code that an
|
||||
inline function would execute (@pxref{Macros}). But the macro would
|
||||
be limited to direct use in expressions---a macro cannot be called
|
||||
with @code{apply}, @code{mapcar} and so on. Also, it takes some work
|
||||
to convert an ordinary function into a macro. To convert it into an
|
||||
inline function is easy; just replace @code{defun} with
|
||||
@code{defsubst}. Since each argument of an inline function is
|
||||
evaluated exactly once, you needn't worry about how many times the
|
||||
body uses the arguments, as you do for macros.
|
||||
|
||||
Inline functions can be used and open-coded later on in the same file,
|
||||
following the definition, just like macros.
|
||||
After an inline function is defined, its inline expansion can be
|
||||
performed later on in the same file, just like macros.
|
||||
|
||||
@node Declaring Functions
|
||||
@section Telling the Compiler that a Function is Defined
|
||||
|
|
@ -1352,12 +1311,10 @@ definition using @code{locate-library}; if that finds no file, they
|
|||
expand the definition file name relative to the directory of the file
|
||||
that contains the @code{declare-function} call.
|
||||
|
||||
You can also say that a function is defined by C code by specifying a
|
||||
file name ending in @samp{.c} or @samp{.m}. @code{check-declare-file}
|
||||
looks for these files in the C source code directory. This is useful
|
||||
only when you call a function that is defined only on certain systems.
|
||||
Most of the primitive functions of Emacs are always defined so they will
|
||||
never give you a warning.
|
||||
You can also say that a function is a primitive by specifying a file
|
||||
name ending in @samp{.c} or @samp{.m}. This is useful only when you
|
||||
call a primitive that is defined only on certain systems. Most
|
||||
primitives are always defined, so they will never give you a warning.
|
||||
|
||||
Sometimes a file will optionally use functions from an external package.
|
||||
If you prefix the filename in the @code{declare-function} statement with
|
||||
|
|
|
|||
|
|
@ -582,11 +582,12 @@ If this variable is non-@code{nil}, its value is a form to evaluate
|
|||
whenever the character @code{help-char} is read. If evaluating the form
|
||||
produces a string, that string is displayed.
|
||||
|
||||
A command that calls @code{read-event} or @code{read-char} probably
|
||||
should bind @code{help-form} to a non-@code{nil} expression while it
|
||||
does input. (The time when you should not do this is when @kbd{C-h} has
|
||||
some other meaning.) Evaluating this expression should result in a
|
||||
string that explains what the input is for and how to enter it properly.
|
||||
A command that calls @code{read-event}, @code{read-char-choice}, or
|
||||
@code{read-char} probably should bind @code{help-form} to a
|
||||
non-@code{nil} expression while it does input. (The time when you
|
||||
should not do this is when @kbd{C-h} has some other meaning.)
|
||||
Evaluating this expression should result in a string that explains
|
||||
what the input is for and how to enter it properly.
|
||||
|
||||
Entry to the minibuffer binds this variable to the value of
|
||||
@code{minibuffer-help-form} (@pxref{Definition of minibuffer-help-form}).
|
||||
|
|
|
|||
|
|
@ -127,6 +127,9 @@ not exactly a hook, but does a similar job.
|
|||
@xref{Calendar Customizing,,, emacs}.
|
||||
@end ifnottex
|
||||
|
||||
@item change-major-mode-after-body-hook
|
||||
@xref{Mode Hooks}.
|
||||
|
||||
@item change-major-mode-hook
|
||||
@xref{Creating Buffer-Local}.
|
||||
|
||||
|
|
@ -292,9 +295,15 @@ Manual}.
|
|||
@item post-command-hook
|
||||
@xref{Command Overview}.
|
||||
|
||||
@item post-self-insert-hook
|
||||
@xref{Keymaps and Minor Modes}.
|
||||
|
||||
@item pre-command-hook
|
||||
@xref{Command Overview}.
|
||||
|
||||
@item prog-mode-hook
|
||||
@xref{Basic Major Modes}.
|
||||
|
||||
@item resume-tty-functions
|
||||
@xref{Suspending Emacs}.
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ being described, are formatted like this: @var{first-number}.
|
|||
|
||||
@cindex @code{nil}
|
||||
@cindex false
|
||||
In Lisp, the symbol @code{nil} has three separate meanings: it
|
||||
In Emacs Lisp, the symbol @code{nil} has three separate meanings: it
|
||||
is a symbol with the name @samp{nil}; it is the logical truth value
|
||||
@var{false}; and it is the empty list---the list of zero elements.
|
||||
When used as a variable, @code{nil} always has the value @code{nil}.
|
||||
|
|
@ -396,13 +396,14 @@ Form', respectively. Commands are simply functions that may be called
|
|||
interactively; macros process their arguments differently from functions
|
||||
(the arguments are not evaluated), but are presented the same way.
|
||||
|
||||
Special form descriptions use a more complex notation to specify
|
||||
optional and repeated arguments because they can break the argument
|
||||
list down into separate arguments in more complicated ways.
|
||||
@samp{@r{[}@var{optional-arg}@r{]}} means that @var{optional-arg} is
|
||||
optional and @samp{@var{repeated-args}@dots{}} stands for zero or more
|
||||
arguments. Parentheses are used when several arguments are grouped into
|
||||
additional levels of list structure. Here is an example:
|
||||
The descriptions of macros and special forms use a more complex
|
||||
notation to specify optional and repeated arguments, because they can
|
||||
break the argument list down into separate arguments in more
|
||||
complicated ways. @samp{@r{[}@var{optional-arg}@r{]}} means that
|
||||
@var{optional-arg} is optional and @samp{@var{repeated-args}@dots{}}
|
||||
stands for zero or more arguments. Parentheses are used when several
|
||||
arguments are grouped into additional levels of list structure. Here
|
||||
is an example:
|
||||
|
||||
@defspec count-loop (@var{var} [@var{from} @var{to} [@var{inc}]]) @var{body}@dots{}
|
||||
This imaginary special form implements a loop that executes the
|
||||
|
|
@ -485,9 +486,9 @@ giving a prefix argument makes @var{here} non-@code{nil}.
|
|||
@end deffn
|
||||
|
||||
@defvar emacs-build-time
|
||||
The value of this variable indicates the time at which Emacs was built
|
||||
at the local site. It is a list of three integers, like the value
|
||||
of @code{current-time} (@pxref{Time of Day}).
|
||||
The value of this variable indicates the time at which Emacs was
|
||||
built. It is a list of three integers, like the value of
|
||||
@code{current-time} (@pxref{Time of Day}).
|
||||
|
||||
@example
|
||||
@group
|
||||
|
|
|
|||
|
|
@ -432,6 +432,34 @@ for every numeric character code without modifier bits, even if it is
|
|||
@code{nil}, so these character's bindings are never inherited from
|
||||
the parent keymap.
|
||||
|
||||
@cindex keymap inheritance from multiple maps
|
||||
Sometimes you want to make a keymap that inherits from more than one
|
||||
map. You can use the function @code{make-composed-keymap} for this.
|
||||
|
||||
@defun make-composed-keymap maps &optional parent
|
||||
This function returns a new keymap composed of the existing keymap(s)
|
||||
@var{maps}, and optionally inheriting from a parent keymap
|
||||
@var{parent}. @var{maps} can be a single keymap or a list of more
|
||||
than one. When looking up a key in the resulting new map, Emacs
|
||||
searches in each of the @var{maps}, and then in @var{parent}, stopping
|
||||
at the first match. A @code{nil} binding in any one of @var{maps}
|
||||
overrides any binding in @var{parent}, but not a non-@code{nil} binding
|
||||
in any other of the @var{maps}.
|
||||
@end defun
|
||||
|
||||
@noindent For example, here is how Emacs sets the parent of
|
||||
@code{help-mode-map}, such that it inherits from both
|
||||
@code{button-buffer-map} and @code{special-mode-map}:
|
||||
|
||||
@example
|
||||
(defvar help-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map (make-composed-keymap button-buffer-map
|
||||
special-mode-map))
|
||||
... map) ... )
|
||||
@end example
|
||||
|
||||
|
||||
@node Prefix Keys
|
||||
@section Prefix Keys
|
||||
@cindex prefix key
|
||||
|
|
@ -2318,7 +2346,7 @@ The various toolkits with which you can build Emacs do not all support
|
|||
the same set of features for menus. Some code works as expected with
|
||||
one toolkit, but not under another.
|
||||
|
||||
One example is menu actions or buttons in a top-level menu-bar. The
|
||||
One example is menu actions or buttons in a top-level menu bar. The
|
||||
following works with the Lucid toolkit or on MS Windows, but not with
|
||||
GTK or Nextstep, where clicking on the item has no effect.
|
||||
|
||||
|
|
@ -2658,6 +2686,15 @@ The @code{:rtl} property specifies an alternative image to use for
|
|||
right-to-left languages. Only the Gtk+ version of Emacs supports this
|
||||
at present.
|
||||
|
||||
Like the menu bar, the tool bar can display separators (@pxref{Menu
|
||||
Separators}). Tool bar separators are vertical rather than
|
||||
horizontal, though, and only a single style is supported. Separators
|
||||
are represented in the tool bar keymap in the same way as for the
|
||||
menu bar, i.e. using a @code{(menu-item "--"}) entry. The Gtk+ and
|
||||
Nextstep tool bars render separators natively, otherwise Emacs selects
|
||||
a separator image that is appropriate for the display. Note that tool
|
||||
bar separators do not support any properties, such as @code{:visible}.
|
||||
|
||||
The default tool bar is defined so that items specific to editing do not
|
||||
appear for major modes whose command symbol has a @code{mode-class}
|
||||
property of @code{special} (@pxref{Major Mode Conventions}). Major
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ the whole list.
|
|||
* Modifying Lists:: Storing new pieces into an existing list.
|
||||
* Sets And Lists:: A list can represent a finite mathematical set.
|
||||
* Association Lists:: A list can represent a finite relation or mapping.
|
||||
* Rings:: Managing a fixed-size ring of objects.
|
||||
@end menu
|
||||
|
||||
@node Cons Cells
|
||||
|
|
@ -31,61 +30,56 @@ the whole list.
|
|||
@cindex lists and cons cells
|
||||
|
||||
Lists in Lisp are not a primitive data type; they are built up from
|
||||
@dfn{cons cells}. A cons cell is a data object that represents an
|
||||
ordered pair. That is, it has two slots, and each slot @dfn{holds}, or
|
||||
@dfn{refers to}, some Lisp object. One slot is known as the @sc{car},
|
||||
and the other is known as the @sc{cdr}. (These names are traditional;
|
||||
see @ref{Cons Cell Type}.) @sc{cdr} is pronounced ``could-er.''
|
||||
@dfn{cons cells} (@pxref{Cons Cell Type}). A cons cell is a data
|
||||
object that represents an ordered pair. That is, it has two slots,
|
||||
and each slot @dfn{holds}, or @dfn{refers to}, some Lisp object. One
|
||||
slot is known as the @sc{car}, and the other is known as the @sc{cdr}.
|
||||
(These names are traditional; see @ref{Cons Cell Type}.) @sc{cdr} is
|
||||
pronounced ``could-er.''
|
||||
|
||||
We say that ``the @sc{car} of this cons cell is'' whatever object
|
||||
its @sc{car} slot currently holds, and likewise for the @sc{cdr}.
|
||||
|
||||
A list is a series of cons cells ``chained together,'' so that each
|
||||
cell refers to the next one. There is one cons cell for each element of
|
||||
the list. By convention, the @sc{car}s of the cons cells hold the
|
||||
elements of the list, and the @sc{cdr}s are used to chain the list: the
|
||||
@sc{cdr} slot of each cons cell refers to the following cons cell. The
|
||||
@sc{cdr} of the last cons cell is @code{nil}. This asymmetry between
|
||||
the @sc{car} and the @sc{cdr} is entirely a matter of convention; at the
|
||||
level of cons cells, the @sc{car} and @sc{cdr} slots have the same
|
||||
characteristics.
|
||||
cell refers to the next one. There is one cons cell for each element
|
||||
of the list. By convention, the @sc{car}s of the cons cells hold the
|
||||
elements of the list, and the @sc{cdr}s are used to chain the list
|
||||
(this asymmetry between @sc{car} and @sc{cdr} is entirely a matter of
|
||||
convention; at the level of cons cells, the @sc{car} and @sc{cdr}
|
||||
slots have similar properties). Hence, the @sc{cdr} slot of each cons
|
||||
cell in a list refers to the following cons cell.
|
||||
|
||||
@cindex true list
|
||||
Since @code{nil} is the conventional value to put in the @sc{cdr} of
|
||||
the last cons cell in the list, we call that case a @dfn{true list}.
|
||||
|
||||
In Lisp, we consider the symbol @code{nil} a list as well as a
|
||||
symbol; it is the list with no elements. For convenience, the symbol
|
||||
Also by convention, the @sc{cdr} of the last cons cell in a list is
|
||||
@code{nil}. We call such a @code{nil}-terminated structure a
|
||||
@dfn{true list}. In Emacs Lisp, the symbol @code{nil} is both a
|
||||
symbol and a list with no elements. For convenience, the symbol
|
||||
@code{nil} is considered to have @code{nil} as its @sc{cdr} (and also
|
||||
as its @sc{car}). Therefore, the @sc{cdr} of a true list is always a
|
||||
true list.
|
||||
as its @sc{car}).
|
||||
|
||||
Hence, the @sc{cdr} of a true list is always a true list. The
|
||||
@sc{cdr} of a nonempty true list is a true list containing all the
|
||||
elements except the first.
|
||||
|
||||
@cindex dotted list
|
||||
@cindex circular list
|
||||
If the @sc{cdr} of a list's last cons cell is some other value,
|
||||
neither @code{nil} nor another cons cell, we call the structure a
|
||||
@dfn{dotted list}, since its printed representation would use
|
||||
@samp{.}. There is one other possibility: some cons cell's @sc{cdr}
|
||||
could point to one of the previous cons cells in the list. We call
|
||||
that structure a @dfn{circular list}.
|
||||
If the @sc{cdr} of a list's last cons cell is some value other than
|
||||
@code{nil}, we call the structure a @dfn{dotted list}, since its
|
||||
printed representation would use dotted pair notation (@pxref{Dotted
|
||||
Pair Notation}). There is one other possibility: some cons cell's
|
||||
@sc{cdr} could point to one of the previous cons cells in the list.
|
||||
We call that structure a @dfn{circular list}.
|
||||
|
||||
For some purposes, it does not matter whether a list is true,
|
||||
circular or dotted. If the program doesn't look far enough down the
|
||||
circular or dotted. If a program doesn't look far enough down the
|
||||
list to see the @sc{cdr} of the final cons cell, it won't care.
|
||||
However, some functions that operate on lists demand true lists and
|
||||
signal errors if given a dotted list. Most functions that try to find
|
||||
the end of a list enter infinite loops if given a circular list.
|
||||
|
||||
@cindex list structure
|
||||
Because most cons cells are used as part of lists, the phrase
|
||||
@dfn{list structure} has come to mean any structure made out of cons
|
||||
cells.
|
||||
|
||||
The @sc{cdr} of any nonempty true list @var{l} is a list containing all the
|
||||
elements of @var{l} except the first.
|
||||
|
||||
@xref{Cons Cell Type}, for the read and print syntax of cons cells and
|
||||
lists, and for ``box and arrow'' illustrations of lists.
|
||||
Because most cons cells are used as part of lists, we refer to any
|
||||
structure made out of cons cells as a @dfn{list structure}.
|
||||
|
||||
@node List-related Predicates
|
||||
@section Predicates on Lists
|
||||
|
|
@ -257,6 +251,10 @@ x
|
|||
x
|
||||
@result{} (b c)
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
For the @code{pop} macro, which removes an element from a list,
|
||||
@xref{List Variables}.
|
||||
@end defmac
|
||||
|
||||
@defun nth n list
|
||||
|
|
@ -695,6 +693,10 @@ This macro provides an alternative way to write
|
|||
l
|
||||
@result{} (c a b)
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
For the @code{pop} macro, which removes the first element from a list,
|
||||
@xref{List Elements}.
|
||||
@end defmac
|
||||
|
||||
Two functions modify lists that are the values of variables.
|
||||
|
|
@ -1800,90 +1802,3 @@ often modifies the original list structure of @var{alist}.
|
|||
compares the @sc{cdr} of each @var{alist} association instead of the
|
||||
@sc{car}.
|
||||
@end defun
|
||||
|
||||
@node Rings
|
||||
@section Managing a Fixed-Size Ring of Objects
|
||||
|
||||
@cindex ring data structure
|
||||
This section describes functions for operating on rings. A
|
||||
@dfn{ring} is a fixed-size data structure that supports insertion,
|
||||
deletion, rotation, and modulo-indexed reference and traversal.
|
||||
|
||||
@defun make-ring size
|
||||
This returns a new ring capable of holding @var{size} objects.
|
||||
@var{size} should be an integer.
|
||||
@end defun
|
||||
|
||||
@defun ring-p object
|
||||
This returns @code{t} if @var{object} is a ring, @code{nil} otherwise.
|
||||
@end defun
|
||||
|
||||
@defun ring-size ring
|
||||
This returns the maximum capacity of the @var{ring}.
|
||||
@end defun
|
||||
|
||||
@defun ring-length ring
|
||||
This returns the number of objects that @var{ring} currently contains.
|
||||
The value will never exceed that returned by @code{ring-size}.
|
||||
@end defun
|
||||
|
||||
@defun ring-elements ring
|
||||
This returns a list of the objects in @var{ring}, in order, newest first.
|
||||
@end defun
|
||||
|
||||
@defun ring-copy ring
|
||||
This returns a new ring which is a copy of @var{ring}.
|
||||
The new ring contains the same (@code{eq}) objects as @var{ring}.
|
||||
@end defun
|
||||
|
||||
@defun ring-empty-p ring
|
||||
This returns @code{t} if @var{ring} is empty, @code{nil} otherwise.
|
||||
@end defun
|
||||
|
||||
The newest element in the ring always has index 0. Higher indices
|
||||
correspond to older elements. Indices are computed modulo the ring
|
||||
length. Index @minus{}1 corresponds to the oldest element, @minus{}2
|
||||
to the next-oldest, and so forth.
|
||||
|
||||
@defun ring-ref ring index
|
||||
This returns the object in @var{ring} found at index @var{index}.
|
||||
@var{index} may be negative or greater than the ring length. If
|
||||
@var{ring} is empty, @code{ring-ref} signals an error.
|
||||
@end defun
|
||||
|
||||
@defun ring-insert ring object
|
||||
This inserts @var{object} into @var{ring}, making it the newest
|
||||
element, and returns @var{object}.
|
||||
|
||||
If the ring is full, insertion removes the oldest element to
|
||||
make room for the new element.
|
||||
@end defun
|
||||
|
||||
@defun ring-remove ring &optional index
|
||||
Remove an object from @var{ring}, and return that object. The
|
||||
argument @var{index} specifies which item to remove; if it is
|
||||
@code{nil}, that means to remove the oldest item. If @var{ring} is
|
||||
empty, @code{ring-remove} signals an error.
|
||||
@end defun
|
||||
|
||||
@defun ring-insert-at-beginning ring object
|
||||
This inserts @var{object} into @var{ring}, treating it as the oldest
|
||||
element. The return value is not significant.
|
||||
|
||||
If the ring is full, this function removes the newest element to make
|
||||
room for the inserted element.
|
||||
@end defun
|
||||
|
||||
@cindex fifo data structure
|
||||
If you are careful not to exceed the ring size, you can
|
||||
use the ring as a first-in-first-out queue. For example:
|
||||
|
||||
@lisp
|
||||
(let ((fifo (make-ring 5)))
|
||||
(mapc (lambda (obj) (ring-insert fifo obj))
|
||||
'(0 one "two"))
|
||||
(list (ring-remove fifo) t
|
||||
(ring-remove fifo) t
|
||||
(ring-remove fifo)))
|
||||
@result{} (0 t one t "two")
|
||||
@end lisp
|
||||
|
|
|
|||
|
|
@ -10,9 +10,10 @@
|
|||
@cindex library
|
||||
@cindex Lisp library
|
||||
|
||||
Loading a file of Lisp code means bringing its contents into the Lisp
|
||||
environment in the form of Lisp objects. Emacs finds and opens the
|
||||
file, reads the text, evaluates each form, and then closes the file.
|
||||
Loading a file of Lisp code means bringing its contents into the
|
||||
Lisp environment in the form of Lisp objects. Emacs finds and opens
|
||||
the file, reads the text, evaluates each form, and then closes the
|
||||
file. Such a file is also called a @dfn{Lisp library}.
|
||||
|
||||
The load functions evaluate all the expressions in a file just
|
||||
as the @code{eval-buffer} function evaluates all the
|
||||
|
|
@ -29,11 +30,6 @@ into a buffer and evaluated there. (Indeed, most code is tested this
|
|||
way.) Most often, the forms are function definitions and variable
|
||||
definitions.
|
||||
|
||||
A file containing Lisp code is often called a @dfn{library}. Thus,
|
||||
the ``Rmail library'' is a file containing code for Rmail mode.
|
||||
Similarly, a ``Lisp library directory'' is a directory of files
|
||||
containing Lisp code.
|
||||
|
||||
@menu
|
||||
* How Programs Do Loading:: The @code{load} function and others.
|
||||
* Load Suffixes:: Details about the suffixes that @code{load} tries.
|
||||
|
|
@ -88,8 +84,8 @@ this case, you must specify the precise file name you want, except
|
|||
that, if Auto Compression mode is enabled, @code{load} will still use
|
||||
@code{jka-compr-load-suffixes} to find compressed versions. By
|
||||
specifying the precise file name and using @code{t} for
|
||||
@var{nosuffix}, you can prevent perverse file names such as
|
||||
@file{foo.el.el} from being tried.
|
||||
@var{nosuffix}, you can prevent file names like @file{foo.el.el} from
|
||||
being tried.
|
||||
|
||||
If the optional argument @var{must-suffix} is non-@code{nil}, then
|
||||
@code{load} insists that the file name used must end in either
|
||||
|
|
@ -238,73 +234,37 @@ it skips the latter group.
|
|||
When Emacs loads a Lisp library, it searches for the library
|
||||
in a list of directories specified by the variable @code{load-path}.
|
||||
|
||||
@defopt load-path
|
||||
@defvar load-path
|
||||
@cindex @code{EMACSLOADPATH} environment variable
|
||||
The value of this variable is a list of directories to search when
|
||||
loading files with @code{load}. Each element is a string (which must be
|
||||
a directory name) or @code{nil} (which stands for the current working
|
||||
directory).
|
||||
@end defopt
|
||||
@end defvar
|
||||
|
||||
The value of @code{load-path} is initialized from the environment
|
||||
variable @code{EMACSLOADPATH}, if that exists; otherwise its default
|
||||
value is specified in @file{emacs/src/epaths.h} when Emacs is built.
|
||||
Then the list is expanded by adding subdirectories of the directories
|
||||
in the list.
|
||||
|
||||
The syntax of @code{EMACSLOADPATH} is the same as used for @code{PATH};
|
||||
@samp{:} (or @samp{;}, according to the operating system) separates
|
||||
directory names, and @samp{.} is used for the current default directory.
|
||||
Here is an example of how to set your @code{EMACSLOADPATH} variable from
|
||||
a @code{csh} @file{.login} file:
|
||||
|
||||
@smallexample
|
||||
setenv EMACSLOADPATH .:/user/bil/emacs:/usr/local/share/emacs/20.3/lisp
|
||||
@end smallexample
|
||||
|
||||
Here is how to set it using @code{sh}:
|
||||
Each time Emacs starts up, it sets up the value of @code{load-path}
|
||||
in several steps. First, it initializes @code{load-path} to the
|
||||
directories specified by the environment variable @env{EMACSLOADPATH},
|
||||
if that exists. The syntax of @env{EMACSLOADPATH} is the same as used
|
||||
for @code{PATH}; directory names are separated by @samp{:} (or
|
||||
@samp{;}, on some operating systems), and @samp{.} stands for the
|
||||
current default directory. Here is an example of how to set
|
||||
@env{EMACSLOADPATH} variable from @command{sh}:
|
||||
|
||||
@smallexample
|
||||
export EMACSLOADPATH
|
||||
EMACSLOADPATH=.:/user/bil/emacs:/usr/local/share/emacs/20.3/lisp
|
||||
EMACSLOADPATH=/home/foo/.emacs.d/lisp:/opt/emacs/lisp
|
||||
@end smallexample
|
||||
|
||||
Here is an example of code you can place in your init file (@pxref{Init
|
||||
File}) to add several directories to the front of your default
|
||||
@code{load-path}:
|
||||
@noindent
|
||||
Here is how to set it from @code{csh}:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
(setq load-path
|
||||
(append (list nil "/user/bil/emacs"
|
||||
"/usr/local/lisplib"
|
||||
"~/emacs")
|
||||
load-path))
|
||||
@end group
|
||||
setenv EMACSLOADPATH /home/foo/.emacs.d/lisp:/opt/emacs/lisp
|
||||
@end smallexample
|
||||
|
||||
@c Wordy to rid us of an overfull hbox. --rjc 15mar92
|
||||
@noindent
|
||||
In this example, the path searches the current working directory first,
|
||||
followed then by the @file{/user/bil/emacs} directory, the
|
||||
@file{/usr/local/lisplib} directory, and the @file{~/emacs} directory,
|
||||
which are then followed by the standard directories for Lisp code.
|
||||
|
||||
Dumping Emacs uses a special value of @code{load-path}. If the value of
|
||||
@code{load-path} at the end of dumping is unchanged (that is, still the
|
||||
same special value), the dumped Emacs switches to the ordinary
|
||||
@code{load-path} value when it starts up, as described above. But if
|
||||
@code{load-path} has any other value at the end of dumping, that value
|
||||
is used for execution of the dumped Emacs also.
|
||||
|
||||
Therefore, if you want to change @code{load-path} temporarily for
|
||||
loading a few libraries in @file{site-init.el} or @file{site-load.el},
|
||||
you should bind @code{load-path} locally with @code{let} around the
|
||||
calls to @code{load}.
|
||||
|
||||
The default value of @code{load-path}, when running an Emacs which has
|
||||
been installed on the system, includes two special directories (and
|
||||
their subdirectories as well):
|
||||
If @env{EMACSLOADPATH} is not set (which is usually the case), Emacs
|
||||
initializes @code{load-path} with the following two directories:
|
||||
|
||||
@smallexample
|
||||
"/usr/local/share/emacs/@var{version}/site-lisp"
|
||||
|
|
@ -319,33 +279,42 @@ and
|
|||
|
||||
@noindent
|
||||
The first one is for locally installed packages for a particular Emacs
|
||||
version; the second is for locally installed packages meant for use with
|
||||
all installed Emacs versions.
|
||||
|
||||
There are several reasons why a Lisp package that works well in one
|
||||
Emacs version can cause trouble in another. Sometimes packages need
|
||||
updating for incompatible changes in Emacs; sometimes they depend on
|
||||
undocumented internal Emacs data that can change without notice;
|
||||
sometimes a newer Emacs version incorporates a version of the package,
|
||||
and should be used only with that version.
|
||||
|
||||
Emacs finds these directories' subdirectories and adds them to
|
||||
@code{load-path} when it starts up. Both immediate subdirectories and
|
||||
subdirectories multiple levels down are added to @code{load-path}.
|
||||
|
||||
Not all subdirectories are included, though. Subdirectories whose
|
||||
names do not start with a letter or digit are excluded. Subdirectories
|
||||
named @file{RCS} or @file{CVS} are excluded. Also, a subdirectory which
|
||||
contains a file named @file{.nosearch} is excluded. You can use these
|
||||
methods to prevent certain subdirectories of the @file{site-lisp}
|
||||
directories from being searched.
|
||||
version; the second is for locally installed packages meant for use
|
||||
with all installed Emacs versions.
|
||||
|
||||
If you run Emacs from the directory where it was built---that is, an
|
||||
executable that has not been formally installed---then @code{load-path}
|
||||
normally contains two additional directories. These are the @code{lisp}
|
||||
and @code{site-lisp} subdirectories of the main build directory. (Both
|
||||
executable that has not been formally installed---Emacs puts two more
|
||||
directories in @code{load-path}. These are the @code{lisp} and
|
||||
@code{site-lisp} subdirectories of the main build directory. (Both
|
||||
are represented as absolute file names.)
|
||||
|
||||
Next, Emacs ``expands'' the initial list of directories in
|
||||
@code{load-path} by adding the subdirectories of those directories.
|
||||
Both immediate subdirectories and subdirectories multiple levels down
|
||||
are added. But it excludes subdirectories whose names do not start
|
||||
with a letter or digit, and subdirectories named @file{RCS} or
|
||||
@file{CVS}, and subdirectories containing a file named
|
||||
@file{.nosearch}.
|
||||
|
||||
Next, Emacs adds any extra load directory that you specify using the
|
||||
@samp{-L} command-line option (@pxref{Action Arguments,,,emacs, The
|
||||
GNU Emacs Manual}). It also adds the directories where optional
|
||||
packages are installed, if any (@pxref{Packaging Basics}).
|
||||
|
||||
It is common to add code to one's init file (@pxref{Init File}) to
|
||||
add one or more directories to @code{load-path}. For example:
|
||||
|
||||
@smallexample
|
||||
(push "~/.emacs.d/lisp" load-path)
|
||||
@end smallexample
|
||||
|
||||
Dumping Emacs uses a special value of @code{load-path}. If the
|
||||
value of @code{load-path} at the end of dumping is unchanged (that is,
|
||||
still the same special value), the dumped Emacs switches to the
|
||||
ordinary @code{load-path} value when it starts up, as described above.
|
||||
But if @code{load-path} has any other value at the end of dumping,
|
||||
that value is used for execution of the dumped Emacs also.
|
||||
|
||||
@deffn Command locate-library library &optional nosuffix path interactive-call
|
||||
This command finds the precise file name for library @var{library}. It
|
||||
searches for the library in the same way @code{load} does, and the
|
||||
|
|
@ -401,30 +370,26 @@ example) is read without decoding, the text of the program will be
|
|||
unibyte text, and its string constants will be unibyte strings.
|
||||
@xref{Coding Systems}.
|
||||
|
||||
The reason Emacs is designed this way is so that Lisp programs give
|
||||
predictable results, regardless of how Emacs was started. In addition,
|
||||
this enables programs that depend on using multibyte text to work even
|
||||
in a unibyte Emacs.
|
||||
|
||||
In most Emacs Lisp programs, the fact that non-@acronym{ASCII} strings are
|
||||
multibyte strings should not be noticeable, since inserting them in
|
||||
unibyte buffers converts them to unibyte automatically. However, if
|
||||
this does make a difference, you can force a particular Lisp file to be
|
||||
interpreted as unibyte by writing @samp{-*-unibyte: t;-*-} in a
|
||||
comment on the file's first line. With that designator, the file will
|
||||
unconditionally be interpreted as unibyte, even in an ordinary
|
||||
multibyte Emacs session. This can matter when making keybindings to
|
||||
non-@acronym{ASCII} characters written as @code{?v@var{literal}}.
|
||||
In most Emacs Lisp programs, the fact that non-@acronym{ASCII}
|
||||
strings are multibyte strings should not be noticeable, since
|
||||
inserting them in unibyte buffers converts them to unibyte
|
||||
automatically. However, if this does make a difference, you can force
|
||||
a particular Lisp file to be interpreted as unibyte by writing
|
||||
@samp{-*-unibyte: t;-*-} in a comment on the file's first line. With
|
||||
that designator, the file will unconditionally be interpreted as
|
||||
unibyte, even in an ordinary multibyte Emacs session. This can matter
|
||||
when making keybindings to non-@acronym{ASCII} characters written as
|
||||
@code{?v@var{literal}}.
|
||||
|
||||
@node Autoload
|
||||
@section Autoload
|
||||
@cindex autoload
|
||||
|
||||
The @dfn{autoload} facility allows you to make a function or macro
|
||||
known in Lisp, but put off loading the file that defines it. The first
|
||||
call to the function automatically reads the proper file to install the
|
||||
real definition and other associated code, then runs the real definition
|
||||
as if it had been loaded all along.
|
||||
The @dfn{autoload} facility allows you to register the existence of
|
||||
a function or macro, but put off loading the file that defines it.
|
||||
The first call to the function automatically reads the proper file, in
|
||||
order to install the real definition and other associated code, then
|
||||
runs the real definition as if it had been loaded all along.
|
||||
|
||||
There are two ways to set up an autoloaded function: by calling
|
||||
@code{autoload}, and by writing a special ``magic'' comment in the
|
||||
|
|
@ -696,23 +661,29 @@ already. If not, it loads the feature from the appropriate file. This
|
|||
file should call @code{provide} at the top level to add the feature to
|
||||
@code{features}; if it fails to do so, @code{require} signals an error.
|
||||
|
||||
For example, in @file{emacs/lisp/prolog.el},
|
||||
the definition for @code{run-prolog} includes the following code:
|
||||
For example, in @file{idlwave.el}, the definition for
|
||||
@code{idlwave-complete-filename} includes the following code:
|
||||
|
||||
@smallexample
|
||||
(defun run-prolog ()
|
||||
"Run an inferior Prolog process, with I/O via buffer *prolog*."
|
||||
(interactive)
|
||||
(require 'comint)
|
||||
(switch-to-buffer (make-comint "prolog" prolog-program-name))
|
||||
(inferior-prolog-mode))
|
||||
(defun idlwave-complete-filename ()
|
||||
"Use the comint stuff to complete a file name."
|
||||
(require 'comint)
|
||||
(let* ((comint-file-name-chars "~/A-Za-z0-9+@:_.$#%=@{@}\\-")
|
||||
(comint-completion-addsuffix nil)
|
||||
...)
|
||||
(comint-dynamic-complete-filename)))
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
The expression @code{(require 'comint)} loads the file @file{comint.el}
|
||||
if it has not yet been loaded. This ensures that @code{make-comint} is
|
||||
defined. Features are normally named after the files that provide them,
|
||||
so that @code{require} need not be given the file name.
|
||||
if it has not yet been loaded, ensuring that
|
||||
@code{comint-dynamic-complete-filename} is defined. Features are
|
||||
normally named after the files that provide them, so that
|
||||
@code{require} need not be given the file name. (Note that it is
|
||||
important that the @code{require} statement be outside the body of the
|
||||
@code{let}. Loading a library while its variables are let-bound can
|
||||
have unintended consequences, namely the variables becoming unbound
|
||||
after the let exits.)
|
||||
|
||||
The @file{comint.el} file contains the following top-level expression:
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ instead. @xref{Inline Functions}.
|
|||
* Expansion:: How, when and why macros are expanded.
|
||||
* Compiling Macros:: How macros are expanded by the compiler.
|
||||
* Defining Macros:: How to write a macro definition.
|
||||
* Backquote:: Easier construction of list structure.
|
||||
* Problems with Macros:: Don't evaluate the macro arguments too many times.
|
||||
Don't hide the user's variables.
|
||||
* Indenting Macros:: Specifying how to indent macro calls.
|
||||
|
|
@ -78,10 +77,9 @@ to the argument values from the macro call, or to a list of them in the
|
|||
case of a @code{&rest} argument. And the macro body executes and
|
||||
returns its value just as a function body does.
|
||||
|
||||
The second crucial difference between macros and functions is that the
|
||||
value returned by the macro body is not the value of the macro call.
|
||||
Instead, it is an alternate expression for computing that value, also
|
||||
known as the @dfn{expansion} of the macro. The Lisp interpreter
|
||||
The second crucial difference between macros and functions is that
|
||||
the value returned by the macro body is an alternate Lisp expression,
|
||||
also known as the @dfn{expansion} of the macro. The Lisp interpreter
|
||||
proceeds to evaluate the expansion as soon as it comes back from the
|
||||
macro.
|
||||
|
||||
|
|
@ -221,14 +219,33 @@ any @code{interactive} declaration is ignored since macros cannot be
|
|||
called interactively.
|
||||
@end defspec
|
||||
|
||||
The body of the macro definition can include a @code{declare} form,
|
||||
Macros often need to construct large list structures from a mixture
|
||||
of constants and nonconstant parts. To make this easier, use the
|
||||
@samp{`} syntax (@pxref{Backquote}). For example:
|
||||
|
||||
@example
|
||||
@example
|
||||
@group
|
||||
(defmacro t-becomes-nil (variable)
|
||||
`(if (eq ,variable t)
|
||||
(setq ,variable nil)))
|
||||
@end group
|
||||
|
||||
@group
|
||||
(t-becomes-nil foo)
|
||||
@equiv{} (if (eq foo t) (setq foo nil))
|
||||
@end group
|
||||
@end example
|
||||
@end example
|
||||
|
||||
The body of a macro definition can include a @code{declare} form,
|
||||
which can specify how @key{TAB} should indent macro calls, and how to
|
||||
step through them for Edebug.
|
||||
|
||||
@defmac declare @var{specs}@dots{}
|
||||
@anchor{Definition of declare}
|
||||
A @code{declare} form is used in a macro definition to specify various
|
||||
additional information about it. Two kinds of specification are
|
||||
additional information about it. The following specifications are
|
||||
currently supported:
|
||||
|
||||
@table @code
|
||||
|
|
@ -257,109 +274,13 @@ without evaluating any @var{specs}.
|
|||
|
||||
No macro absolutely needs a @code{declare} form, because that form
|
||||
has no effect on how the macro expands, on what the macro means in the
|
||||
program. It only affects secondary features: indentation and Edebug.
|
||||
|
||||
@node Backquote
|
||||
@section Backquote
|
||||
@cindex backquote (list substitution)
|
||||
@cindex ` (list substitution)
|
||||
@findex `
|
||||
|
||||
Macros often need to construct large list structures from a mixture of
|
||||
constants and nonconstant parts. To make this easier, use the @samp{`}
|
||||
syntax (usually called @dfn{backquote}).
|
||||
|
||||
Backquote allows you to quote a list, but selectively evaluate
|
||||
elements of that list. In the simplest case, it is identical to the
|
||||
special form @code{quote} (@pxref{Quoting}). For example, these
|
||||
two forms yield identical results:
|
||||
|
||||
@example
|
||||
@group
|
||||
`(a list of (+ 2 3) elements)
|
||||
@result{} (a list of (+ 2 3) elements)
|
||||
@end group
|
||||
@group
|
||||
'(a list of (+ 2 3) elements)
|
||||
@result{} (a list of (+ 2 3) elements)
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@findex , @r{(with backquote)}
|
||||
The special marker @samp{,} inside of the argument to backquote
|
||||
indicates a value that isn't constant. Backquote evaluates the
|
||||
argument of @samp{,} and puts the value in the list structure:
|
||||
|
||||
@example
|
||||
@group
|
||||
(list 'a 'list 'of (+ 2 3) 'elements)
|
||||
@result{} (a list of 5 elements)
|
||||
@end group
|
||||
@group
|
||||
`(a list of ,(+ 2 3) elements)
|
||||
@result{} (a list of 5 elements)
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Substitution with @samp{,} is allowed at deeper levels of the list
|
||||
structure also. For example:
|
||||
|
||||
@example
|
||||
@group
|
||||
(defmacro t-becomes-nil (variable)
|
||||
`(if (eq ,variable t)
|
||||
(setq ,variable nil)))
|
||||
@end group
|
||||
|
||||
@group
|
||||
(t-becomes-nil foo)
|
||||
@equiv{} (if (eq foo t) (setq foo nil))
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@findex ,@@ @r{(with backquote)}
|
||||
@cindex splicing (with backquote)
|
||||
You can also @dfn{splice} an evaluated value into the resulting list,
|
||||
using the special marker @samp{,@@}. The elements of the spliced list
|
||||
become elements at the same level as the other elements of the resulting
|
||||
list. The equivalent code without using @samp{`} is often unreadable.
|
||||
Here are some examples:
|
||||
|
||||
@example
|
||||
@group
|
||||
(setq some-list '(2 3))
|
||||
@result{} (2 3)
|
||||
@end group
|
||||
@group
|
||||
(cons 1 (append some-list '(4) some-list))
|
||||
@result{} (1 2 3 4 2 3)
|
||||
@end group
|
||||
@group
|
||||
`(1 ,@@some-list 4 ,@@some-list)
|
||||
@result{} (1 2 3 4 2 3)
|
||||
@end group
|
||||
|
||||
@group
|
||||
(setq list '(hack foo bar))
|
||||
@result{} (hack foo bar)
|
||||
@end group
|
||||
@group
|
||||
(cons 'use
|
||||
(cons 'the
|
||||
(cons 'words (append (cdr list) '(as elements)))))
|
||||
@result{} (use the words foo bar as elements)
|
||||
@end group
|
||||
@group
|
||||
`(use the words ,@@(cdr list) as elements)
|
||||
@result{} (use the words foo bar as elements)
|
||||
@end group
|
||||
@end example
|
||||
program. It only affects the secondary features listed above.
|
||||
|
||||
@node Problems with Macros
|
||||
@section Common Problems Using Macros
|
||||
|
||||
The basic facts of macro expansion have counterintuitive consequences.
|
||||
This section describes some important consequences that can lead to
|
||||
Macro expansion can have counterintuitive consequences. This
|
||||
section describes some important consequences that can lead to
|
||||
trouble, and rules to follow to avoid trouble.
|
||||
|
||||
@menu
|
||||
|
|
@ -407,9 +328,8 @@ program is actually run.
|
|||
|
||||
When defining a macro you must pay attention to the number of times
|
||||
the arguments will be evaluated when the expansion is executed. The
|
||||
following macro (used to facilitate iteration) illustrates the problem.
|
||||
This macro allows us to write a simple ``for'' loop such as one might
|
||||
find in Pascal.
|
||||
following macro (used to facilitate iteration) illustrates the
|
||||
problem. This macro allows us to write a ``for'' loop construct.
|
||||
|
||||
@findex for
|
||||
@smallexample
|
||||
|
|
@ -683,9 +603,9 @@ either.
|
|||
@node Indenting Macros
|
||||
@section Indenting Macros
|
||||
|
||||
You can use the @code{declare} form in the macro definition to
|
||||
specify how to @key{TAB} should indent calls to the macro. You
|
||||
write it like this:
|
||||
Within a macro definition, you can use the @code{declare} form
|
||||
(@pxref{Defining Macros}) to specify how to @key{TAB} should indent
|
||||
calls to the macro. An indentation specifiction is written like this:
|
||||
|
||||
@example
|
||||
(declare (indent @var{indent-spec}))
|
||||
|
|
@ -715,6 +635,7 @@ the line uses the standard pattern.
|
|||
@var{symbol} should be a function name; that function is called to
|
||||
calculate the indentation of a line within this expression. The
|
||||
function receives two arguments:
|
||||
|
||||
@table @asis
|
||||
@item @var{state}
|
||||
The value returned by @code{parse-partial-sexp} (a Lisp primitive for
|
||||
|
|
@ -723,6 +644,7 @@ beginning of this line.
|
|||
@item @var{pos}
|
||||
The position at which the line being indented begins.
|
||||
@end table
|
||||
|
||||
@noindent
|
||||
It should return either a number, which is the number of columns of
|
||||
indentation for that line, or a list whose car is such a number. The
|
||||
|
|
|
|||
|
|
@ -38,14 +38,9 @@ MAKEINFO_OPTS = --force --enable-encoding -I$(srcdir) -I$(emacsdir)
|
|||
# The environment variable and its value to add $(srcdir) to the path
|
||||
# searched for TeX input files.
|
||||
texinputdir = $(srcdir)\..\..\nt\envadd.bat \
|
||||
"TEXINPUTS=$(srcdir);$(texinputdir);$(TEXINPUTS)" \
|
||||
"TEXINPUTS=$(srcdir);$(texinfodir);$(emacsdir);$(TEXINPUTS)" \
|
||||
"MAKEINFO=$(MAKEINFO) $(MAKEINFO_OPTS)" /C
|
||||
|
||||
# The name of the manual:
|
||||
VERSION=2.9
|
||||
## FIXME can this be set by configure, as per Makefile.in?
|
||||
manual = elisp-manual-23-$(VERSION)
|
||||
|
||||
# List of all the texinfo files in the manual:
|
||||
|
||||
srcs = \
|
||||
|
|
|
|||
|
|
@ -1335,19 +1335,19 @@ but uses the predicate @code{user-variable-p} instead of
|
|||
@deffn Command read-color &optional prompt convert allow-empty display
|
||||
This function reads a string that is a color specification, either the
|
||||
color's name or an RGB hex value such as @code{#RRRGGGBBB}. It
|
||||
prompts with @var{prompt} (default: @code{"Color (name or #R+G+B+):"})
|
||||
prompts with @var{prompt} (default: @code{"Color (name or #RGB triplet):"})
|
||||
and provides completion for color names, but not for hex RGB values.
|
||||
In addition to names of standard colors, completion candidates include
|
||||
the foreground and background colors at point.
|
||||
|
||||
Valid RGB values are described in @ref{Color Names}.
|
||||
|
||||
The function's return value is the color name typed by the user in the
|
||||
The function's return value is the string typed by the user in the
|
||||
minibuffer. However, when called interactively or if the optional
|
||||
argument @var{convert} is non-@code{nil}, it converts the name into
|
||||
the color's RGB value and returns that value as a string. If an
|
||||
invalid color name was specified, this function signals an error,
|
||||
except that empty color names are allowed when @code{allow-empty} is
|
||||
argument @var{convert} is non-@code{nil}, it converts any input color
|
||||
name into the corresponding RGB value string and instead returns that.
|
||||
This function requires a valid color specification to be input.
|
||||
Empty color names are allowed when @code{allow-empty} is
|
||||
non-@code{nil} and the user enters null input.
|
||||
|
||||
Interactively, or when @var{display} is non-@code{nil}, the return
|
||||
|
|
|
|||
|
|
@ -135,23 +135,42 @@ This macro runs the abnormal hook @code{hook} as a series of nested
|
|||
``wrapper functions'' around the @var{body} forms. The effect is
|
||||
similar to nested @code{around} advices (@pxref{Around-Advice}).
|
||||
|
||||
Each hook function must accept an argument list consisting of a function
|
||||
Each hook function should accept an argument list consisting of a function
|
||||
@var{fun}, followed by the additional arguments listed in @var{args}.
|
||||
The function @var{fun} passed to the very first hook function in
|
||||
@var{hook} does the same as @var{body}, if it is called with arguments
|
||||
@var{args}. The @var{fun} passed to each successive hook function is
|
||||
The first hook function is passed a function @var{fun} that, if it is
|
||||
called with arguments @var{args}, performs @var{body} (i.e., the default
|
||||
operation). The @var{fun} passed to each successive hook function is
|
||||
constructed from all the preceding hook functions (and @var{body}); if
|
||||
this @var{fun} is called with arguments @var{args}, it does what the
|
||||
@code{with-wrapper-hook} call would if the preceding hook functions were
|
||||
the only ones in @var{hook}.
|
||||
|
||||
In the function definition of the hook function, @var{fun} can be called
|
||||
any number of times (including not calling it at all). This function
|
||||
definition is then used to construct the @var{fun} passed to the next
|
||||
hook function in @var{hook}, if any. The last or ``outermost''
|
||||
@var{fun} is called once to produce the effect.
|
||||
Each hook function may call its @var{fun} argument as many times as it
|
||||
wishes, including never. In that case, such a hook function acts to
|
||||
replace the default definition altogether, and any preceding hook
|
||||
functions. Of course, a subsequent hook function may do the same thing.
|
||||
|
||||
Each hook function definition is used to construct the @var{fun} passed
|
||||
to the next hook function in @var{hook}, if any. The last or
|
||||
``outermost'' @var{fun} is called once to produce the overall effect.
|
||||
|
||||
When might you want to use a wrapper hook? The function
|
||||
@code{filter-buffer-substring} illustrates a common case. There is a
|
||||
basic functionality, performed by @var{body}---in this case, to extract
|
||||
a buffer-substring. Then any number of hook functions can act in
|
||||
sequence to modify that string, before returning the final result.
|
||||
A wrapper-hook also allows for a hook function to completely replace the
|
||||
default definition (by not calling @var{fun}).
|
||||
@end defmac
|
||||
|
||||
@defun run-hook-wrapped hook wrap-function &rest args
|
||||
This function is similar to @code{run-hook-with-args-until-success}.
|
||||
Like that function, it runs the functions on the abnormal hook
|
||||
@code{hook}, stopping at the first one that returns non-@code{nil}.
|
||||
Instead of calling the hook functions directly, though, it actually
|
||||
calls @code{wrap-function} with arguments @code{fun} and @code{args}.
|
||||
@end defun
|
||||
|
||||
@node Setting Hooks
|
||||
@subsection Setting Hooks
|
||||
|
||||
|
|
@ -468,8 +487,9 @@ other packages would interfere with them.
|
|||
@cindex major mode hook
|
||||
Each major mode should have a normal @dfn{mode hook} named
|
||||
@code{@var{modename}-mode-hook}. The very last thing the major mode command
|
||||
should do is to call @code{run-mode-hooks}. This runs the mode hook,
|
||||
and then runs the normal hook @code{after-change-major-mode-hook}.
|
||||
should do is to call @code{run-mode-hooks}. This runs the normal
|
||||
hook @code{change-major-mode-after-body-hook}, the mode hook,
|
||||
and then the normal hook @code{after-change-major-mode-hook}.
|
||||
@xref{Mode Hooks}.
|
||||
|
||||
@item
|
||||
|
|
@ -588,6 +608,18 @@ Chosen, emacs, The GNU Emacs Manual}. If @code{enable-local-variables}
|
|||
is @code{nil}, @code{set-auto-mode} does not check the @w{@samp{-*-}}
|
||||
line, or near the end of the file, for any mode tag.
|
||||
|
||||
@vindex inhibit-local-variables-regexps
|
||||
There are some file types where it is not appropriate to scan the file
|
||||
contents for a mode specifier. For example, a tar archive may happen to
|
||||
contain, near the end of the file, a member file that has a local
|
||||
variables section specifying a mode for that particular file. This
|
||||
should not be applied to the containing tar file. Similarly, a tiff
|
||||
image file might just happen to contain a first line that seems to
|
||||
match the @w{@samp{-*-}} pattern. For these reasons, both these file
|
||||
extensions are members of the list @var{inhibit-local-variables-regexps}.
|
||||
Add patterns to this list to prevent Emacs searching them for local
|
||||
variables of any kind (not just mode specifiers).
|
||||
|
||||
If @var{keep-mode-if-same} is non-@code{nil}, this function does not
|
||||
call the mode command if the buffer is already in the proper major
|
||||
mode. For instance, @code{set-visited-file-name} sets this to
|
||||
|
|
@ -883,6 +915,20 @@ mode, which is used by the @samp{*Buffer List*} buffer. @xref{List
|
|||
Buffers,,Listing Existing Buffers, emacs, The GNU Emacs Manual}.
|
||||
@end deffn
|
||||
|
||||
@cindex tables of data
|
||||
@deffn Command tabulated-list-mode
|
||||
Tabulated List mode is another mode that derives from Special mode. It
|
||||
displays tabulated data, i.e. a series of rows and columns, where each
|
||||
row represents a particular entry, whose properties are displayed in the
|
||||
various columns. It provides a general mechanism for sorting on
|
||||
columns. You can use Tabulated List mode as the basis for other modes
|
||||
that need to display lists. For example, the @samp{*Packages*} buffer
|
||||
uses this (@pxref{Packages,,, emacs, The GNU Emacs Manual}). The
|
||||
documentation of the @code{tabulated-list-mode} function explains what
|
||||
you need to do to use it. At a minimum, specify the column format via
|
||||
the @code{tabulated-list-format} variable.
|
||||
@end deffn
|
||||
|
||||
@node Generic Modes
|
||||
@subsection Generic Modes
|
||||
@cindex generic mode
|
||||
|
|
@ -927,8 +973,9 @@ before it runs the mode hook variable @code{@var{mode}-hook}.
|
|||
@node Mode Hooks
|
||||
@subsection Mode Hooks
|
||||
|
||||
Every major mode command should finish by running its mode hook and
|
||||
the mode-independent normal hook @code{after-change-major-mode-hook}.
|
||||
Every major mode command should finish by running the mode-independent
|
||||
normal hook @code{change-major-mode-after-body-hook}, its mode hook,
|
||||
and the normal hook @code{after-change-major-mode-hook}.
|
||||
It does this by calling @code{run-mode-hooks}. If the major mode is a
|
||||
derived mode, that is if it calls another major mode (the parent mode)
|
||||
in its body, it should do this inside @code{delay-mode-hooks} so that
|
||||
|
|
@ -937,11 +984,12 @@ call to @code{run-mode-hooks} runs the parent's mode hook too.
|
|||
@xref{Major Mode Conventions}.
|
||||
|
||||
Emacs versions before Emacs 22 did not have @code{delay-mode-hooks}.
|
||||
When user-implemented major modes have not been updated to use it,
|
||||
they won't entirely follow these conventions: they may run the
|
||||
parent's mode hook too early, or fail to run
|
||||
@code{after-change-major-mode-hook}. If you encounter such a major
|
||||
mode, please correct it to follow these conventions.
|
||||
Versions before 24 did not have @code{change-major-mode-after-body-hook}.
|
||||
When user-implemented major modes do not use @code{run-mode-hooks} and
|
||||
have not been updated to use these newer features, they won't entirely
|
||||
follow these conventions: they may run the parent's mode hook too early,
|
||||
or fail to run @code{after-change-major-mode-hook}. If you encounter
|
||||
such a major mode, please correct it to follow these conventions.
|
||||
|
||||
When you defined a major mode using @code{define-derived-mode}, it
|
||||
automatically makes sure these conventions are followed. If you
|
||||
|
|
@ -951,6 +999,7 @@ use the following functions to handle these conventions automatically.
|
|||
@defun run-mode-hooks &rest hookvars
|
||||
Major modes should run their mode hook using this function. It is
|
||||
similar to @code{run-hooks} (@pxref{Hooks}), but it also runs
|
||||
@code{change-major-mode-after-body-hook} and
|
||||
@code{after-change-major-mode-hook}.
|
||||
|
||||
When this function is called during the execution of a
|
||||
|
|
@ -970,6 +1019,11 @@ The hooks will actually run during the next call to
|
|||
construct.
|
||||
@end defmac
|
||||
|
||||
@defvar change-major-mode-after-body-hook
|
||||
This is a normal hook run by @code{run-mode-hooks}. It is run before
|
||||
the mode hooks.
|
||||
@end defvar
|
||||
|
||||
@defvar after-change-major-mode-hook
|
||||
This is a normal hook run by @code{run-mode-hooks}. It is run at the
|
||||
very end of every properly-written major mode command.
|
||||
|
|
@ -1000,13 +1054,10 @@ the conventions listed above:
|
|||
(defvar text-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map "\e\t" 'ispell-complete-word)
|
||||
(define-key map "\es" 'center-line)
|
||||
(define-key map "\eS" 'center-paragraph)
|
||||
map)
|
||||
"Keymap for `text-mode'.
|
||||
Many other modes, such as Mail mode, Outline mode
|
||||
and Indented Text mode, inherit all the commands
|
||||
defined in this map.")
|
||||
Many other modes, such as `mail-mode', `outline-mode' and
|
||||
`indented-text-mode', inherit all the commands defined in this map.")
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
|
|
@ -1024,7 +1075,6 @@ Turning on Text mode runs the normal hook `text-mode-hook'."
|
|||
@end group
|
||||
@group
|
||||
(set (make-local-variable 'text-mode-variant) t)
|
||||
;; @r{These two lines are a feature added recently.}
|
||||
(set (make-local-variable 'require-final-newline)
|
||||
mode-require-final-newline)
|
||||
(set (make-local-variable 'indent-line-function) 'indent-relative))
|
||||
|
|
@ -1035,103 +1085,29 @@ Turning on Text mode runs the normal hook `text-mode-hook'."
|
|||
(The last line is redundant nowadays, since @code{indent-relative} is
|
||||
the default value, and we'll delete it in a future version.)
|
||||
|
||||
Here is how it was defined formerly, before
|
||||
@code{define-derived-mode} existed:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
;; @r{This isn't needed nowadays, since @code{define-derived-mode} does it.}
|
||||
(define-abbrev-table 'text-mode-abbrev-table ()
|
||||
"Abbrev table used while in text mode.")
|
||||
@end group
|
||||
|
||||
@group
|
||||
(defun text-mode ()
|
||||
"Major mode for editing text intended for humans to read...
|
||||
Special commands: \\@{text-mode-map@}
|
||||
@end group
|
||||
@group
|
||||
Turning on text-mode runs the hook `text-mode-hook'."
|
||||
(interactive)
|
||||
(kill-all-local-variables)
|
||||
(use-local-map text-mode-map)
|
||||
@end group
|
||||
@group
|
||||
(setq local-abbrev-table text-mode-abbrev-table)
|
||||
(set-syntax-table text-mode-syntax-table)
|
||||
@end group
|
||||
@group
|
||||
;; @r{These four lines are absent from the current version}
|
||||
;; @r{not because this is done some other way, but because}
|
||||
;; @r{nowadays Text mode uses the normal definition of paragraphs.}
|
||||
(set (make-local-variable 'paragraph-start)
|
||||
(concat "[ \t]*$\\|" page-delimiter))
|
||||
(set (make-local-variable 'paragraph-separate) paragraph-start)
|
||||
(set (make-local-variable 'indent-line-function) 'indent-relative-maybe)
|
||||
@end group
|
||||
@group
|
||||
(setq mode-name "Text")
|
||||
(setq major-mode 'text-mode)
|
||||
(run-mode-hooks 'text-mode-hook)) ; @r{Finally, this permits the user to}
|
||||
; @r{customize the mode with a hook.}
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
@cindex @file{lisp-mode.el}
|
||||
The three Lisp modes (Lisp mode, Emacs Lisp mode, and Lisp
|
||||
Interaction mode) have more features than Text mode and the code is
|
||||
correspondingly more complicated. Here are excerpts from
|
||||
@file{lisp-mode.el} that illustrate how these modes are written.
|
||||
The three Lisp modes (Lisp mode, Emacs Lisp mode, and Lisp Interaction
|
||||
mode) have more features than Text mode and the code is correspondingly
|
||||
more complicated. Here are excerpts from @file{lisp-mode.el} that
|
||||
illustrate how these modes are written.
|
||||
|
||||
Here is how the Lisp mode syntax and abbrev tables are defined:
|
||||
|
||||
@cindex syntax table example
|
||||
@smallexample
|
||||
@group
|
||||
;; @r{Create mode-specific table variables.}
|
||||
(defvar lisp-mode-syntax-table nil "")
|
||||
(defvar lisp-mode-abbrev-table nil "")
|
||||
@end group
|
||||
|
||||
@group
|
||||
(defvar emacs-lisp-mode-syntax-table
|
||||
(let ((table (make-syntax-table)))
|
||||
(let ((i 0))
|
||||
@end group
|
||||
|
||||
@group
|
||||
;; @r{Set syntax of chars up to @samp{0} to say they are}
|
||||
;; @r{part of symbol names but not words.}
|
||||
;; @r{(The digit @samp{0} is @code{48} in the @acronym{ASCII} character set.)}
|
||||
(while (< i ?0)
|
||||
(modify-syntax-entry i "_ " table)
|
||||
(setq i (1+ i)))
|
||||
;; @r{@dots{} similar code follows for other character ranges.}
|
||||
@end group
|
||||
@group
|
||||
;; @r{Then set the syntax codes for characters that are special in Lisp.}
|
||||
(modify-syntax-entry ? " " table)
|
||||
(modify-syntax-entry ?\t " " table)
|
||||
(modify-syntax-entry ?\f " " table)
|
||||
(modify-syntax-entry ?\n "> " table)
|
||||
@end group
|
||||
@group
|
||||
;; @r{Give CR the same syntax as newline, for selective-display.}
|
||||
(modify-syntax-entry ?\^m "> " table)
|
||||
(modify-syntax-entry ?\; "< " table)
|
||||
(modify-syntax-entry ?` "' " table)
|
||||
(modify-syntax-entry ?' "' " table)
|
||||
(modify-syntax-entry ?, "' " table)
|
||||
@end group
|
||||
@group
|
||||
;; @r{@dots{}likewise for many other characters@dots{}}
|
||||
(modify-syntax-entry ?\( "() " table)
|
||||
(modify-syntax-entry ?\) ")( " table)
|
||||
(modify-syntax-entry ?\[ "(] " table)
|
||||
(modify-syntax-entry ?\] ")[ " table))
|
||||
table))
|
||||
@end group
|
||||
@group
|
||||
;; @r{Create an abbrev table for lisp-mode.}
|
||||
(defvar lisp-mode-abbrev-table nil)
|
||||
(define-abbrev-table 'lisp-mode-abbrev-table ())
|
||||
|
||||
(defvar lisp-mode-syntax-table
|
||||
(let ((table (copy-syntax-table emacs-lisp-mode-syntax-table)))
|
||||
(modify-syntax-entry ?\[ "_ " table)
|
||||
(modify-syntax-entry ?\] "_ " table)
|
||||
(modify-syntax-entry ?# "' 14" table)
|
||||
(modify-syntax-entry ?| "\" 23bn" table)
|
||||
table)
|
||||
"Syntax table used in `lisp-mode'.")
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
|
|
@ -1140,7 +1116,7 @@ each calls the following function to set various variables:
|
|||
|
||||
@smallexample
|
||||
@group
|
||||
(defun lisp-mode-variables (lisp-syntax)
|
||||
(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive)
|
||||
(when lisp-syntax
|
||||
(set-syntax-table lisp-mode-syntax-table))
|
||||
(setq local-abbrev-table lisp-mode-abbrev-table)
|
||||
|
|
@ -1148,22 +1124,14 @@ each calls the following function to set various variables:
|
|||
@end group
|
||||
@end smallexample
|
||||
|
||||
In Lisp and most programming languages, we want the paragraph
|
||||
commands to treat only blank lines as paragraph separators. And the
|
||||
modes should understand the Lisp conventions for comments. The rest of
|
||||
@code{lisp-mode-variables} sets this up:
|
||||
@noindent
|
||||
Amongst other things, this function sets up the @code{comment-start}
|
||||
variable to handle Lisp comments:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
(set (make-local-variable 'paragraph-start)
|
||||
(concat page-delimiter "\\|$" ))
|
||||
(set (make-local-variable 'paragraph-separate)
|
||||
paragraph-start)
|
||||
@dots{}
|
||||
@end group
|
||||
@group
|
||||
(set (make-local-variable 'comment-indent-function)
|
||||
'lisp-comment-indent))
|
||||
(make-local-variable 'comment-start)
|
||||
(setq comment-start ";")
|
||||
@dots{}
|
||||
@end group
|
||||
@end smallexample
|
||||
|
|
@ -1175,11 +1143,10 @@ common. The following code sets up the common commands:
|
|||
|
||||
@smallexample
|
||||
@group
|
||||
(defvar shared-lisp-mode-map
|
||||
(defvar lisp-mode-shared-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key shared-lisp-mode-map "\e\C-q" 'indent-sexp)
|
||||
(define-key shared-lisp-mode-map "\177"
|
||||
'backward-delete-char-untabify)
|
||||
(define-key map "\e\C-q" 'indent-sexp)
|
||||
(define-key map "\177" 'backward-delete-char-untabify)
|
||||
map)
|
||||
"Keymap for commands shared by all sorts of Lisp modes.")
|
||||
@end group
|
||||
|
|
@ -1191,25 +1158,29 @@ And here is the code to set up the keymap for Lisp mode:
|
|||
@smallexample
|
||||
@group
|
||||
(defvar lisp-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map shared-lisp-mode-map)
|
||||
(let ((map (make-sparse-keymap))
|
||||
(menu-map (make-sparse-keymap "Lisp")))
|
||||
(set-keymap-parent map lisp-mode-shared-map)
|
||||
(define-key map "\e\C-x" 'lisp-eval-defun)
|
||||
(define-key map "\C-c\C-z" 'run-lisp)
|
||||
@dots{}
|
||||
map)
|
||||
"Keymap for ordinary Lisp mode...")
|
||||
"Keymap for ordinary Lisp mode.
|
||||
All commands in `lisp-mode-shared-map' are inherited by this map.")
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
Finally, here is the complete major mode command definition for Lisp
|
||||
mode.
|
||||
@noindent
|
||||
Finally, here is the major mode command for Lisp mode:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
(defun lisp-mode ()
|
||||
(define-derived-mode lisp-mode prog-mode "Lisp"
|
||||
"Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
|
||||
Commands:
|
||||
Delete converts tabs to spaces as it moves back.
|
||||
Blank lines separate paragraphs. Semicolons start comments.
|
||||
|
||||
\\@{lisp-mode-map@}
|
||||
Note that `run-lisp' may be used either to start an inferior Lisp job
|
||||
or to switch back to an existing one.
|
||||
|
|
@ -1218,24 +1189,12 @@ or to switch back to an existing one.
|
|||
@group
|
||||
Entry to this mode calls the value of `lisp-mode-hook'
|
||||
if that value is non-nil."
|
||||
(interactive)
|
||||
(kill-all-local-variables)
|
||||
@end group
|
||||
@group
|
||||
(use-local-map lisp-mode-map) ; @r{Select the mode's keymap.}
|
||||
(setq major-mode 'lisp-mode) ; @r{This is how @code{describe-mode}}
|
||||
; @r{finds out what to describe.}
|
||||
(setq mode-name "Lisp") ; @r{This goes into the mode line.}
|
||||
(lisp-mode-variables t) ; @r{This defines various variables.}
|
||||
(set (make-local-variable 'comment-start-skip)
|
||||
(lisp-mode-variables nil t)
|
||||
(set (make-local-variable 'find-tag-default-function) 'lisp-find-tag-default)
|
||||
(make-local-variable 'comment-start-skip)
|
||||
(setq comment-start-skip
|
||||
"\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
|
||||
(set (make-local-variable 'font-lock-keywords-case-fold-search) t)
|
||||
@end group
|
||||
@group
|
||||
(setq imenu-case-fold-search t)
|
||||
(set-syntax-table lisp-mode-syntax-table)
|
||||
(run-mode-hooks 'lisp-mode-hook)) ; @r{This permits the user to use a}
|
||||
; @r{hook to customize the mode.}
|
||||
(setq imenu-case-fold-search t))
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
|
|
@ -1415,11 +1374,12 @@ alist @code{minor-mode-map-alist}. @xref{Definition of minor-mode-map-alist}.
|
|||
@cindex @code{self-insert-command}, minor modes
|
||||
One use of minor mode keymaps is to modify the behavior of certain
|
||||
self-inserting characters so that they do something else as well as
|
||||
self-insert. In general, this is the only way to do that, since the
|
||||
facilities for customizing @code{self-insert-command} are limited to
|
||||
special cases (designed for abbrevs and Auto Fill mode). (Do not try
|
||||
substituting your own definition of @code{self-insert-command} for the
|
||||
standard one. The editor command loop handles this function specially.)
|
||||
self-insert. (Another way to customize @code{self-insert-command} is
|
||||
through @code{post-self-insert-hook}. Apart from this, the facilities
|
||||
for customizing @code{self-insert-command} are limited to special cases,
|
||||
designed for abbrevs and Auto Fill mode. Do not try substituting your
|
||||
own definition of @code{self-insert-command} for the standard one. The
|
||||
editor command loop handles this function specially.)
|
||||
|
||||
The key sequences bound in a minor mode should consist of @kbd{C-c}
|
||||
followed by one of @kbd{.,/?`'"[]\|~!#$%^&*()-_+=}. (The other
|
||||
|
|
@ -1434,11 +1394,21 @@ implementing a mode in one self-contained definition.
|
|||
@defmac define-minor-mode mode doc [init-value [lighter [keymap]]] keyword-args@dots{} body@dots{}
|
||||
This macro defines a new minor mode whose name is @var{mode} (a
|
||||
symbol). It defines a command named @var{mode} to toggle the minor
|
||||
mode, with @var{doc} as its documentation string. It also defines a
|
||||
variable named @var{mode}, which is set to @code{t} or @code{nil} by
|
||||
enabling or disabling the mode. The variable is initialized to
|
||||
@var{init-value}. Except in unusual circumstances (see below), this
|
||||
value must be @code{nil}.
|
||||
mode, with @var{doc} as its documentation string.
|
||||
|
||||
The toggle command takes one optional (prefix) argument.
|
||||
If called interactively with no argument it toggles the mode on or off.
|
||||
A positive prefix argument enables the mode, any other prefix argument
|
||||
disables it. From Lisp, an argument of @code{toggle} toggles the mode,
|
||||
whereas an omitted or @code{nil} argument enables the mode.
|
||||
This makes it easy to enable the minor mode in a major mode hook, for example.
|
||||
If @var{doc} is nil, the macro supplies a default documentation string
|
||||
explaining the above.
|
||||
|
||||
By default, it also defines a variable named @var{mode}, which is set to
|
||||
@code{t} or @code{nil} by enabling or disabling the mode. The variable
|
||||
is initialized to @var{init-value}. Except in unusual circumstances
|
||||
(see below), this value must be @code{nil}.
|
||||
|
||||
The string @var{lighter} says what to display in the mode line
|
||||
when the mode is enabled; if it is @code{nil}, the mode is not displayed
|
||||
|
|
@ -1493,6 +1463,17 @@ This is equivalent to specifying @var{lighter} positionally.
|
|||
|
||||
@item :keymap @var{keymap}
|
||||
This is equivalent to specifying @var{keymap} positionally.
|
||||
|
||||
@item :variable @var{place}
|
||||
This replaces the default variable @var{mode}, used to store the state
|
||||
of the mode. If you specify this, the @var{mode} variable is not
|
||||
defined, and any @var{init-value} argument is unused. @var{place}
|
||||
can be a different named variable (which you must define yourself), or
|
||||
anything that can be used with the @code{setf} function
|
||||
(@pxref{Generalized Variables,,, cl, Common Lisp Extensions}).
|
||||
@var{place} can also be a cons @code{(@var{get} . @var{set})},
|
||||
where @var{get} is an expression that returns the current state,
|
||||
and @var{set} is a function of one argument (a state) that sets it.
|
||||
@end table
|
||||
|
||||
Any other keyword arguments are passed directly to the
|
||||
|
|
@ -1521,9 +1502,10 @@ for this macro.
|
|||
@smallexample
|
||||
(define-minor-mode hungry-mode
|
||||
"Toggle Hungry mode.
|
||||
With no argument, this command toggles the mode.
|
||||
Non-null prefix argument turns on the mode.
|
||||
Null prefix argument turns off the mode.
|
||||
Interactively with no argument, this command toggles the mode.
|
||||
A positive prefix argument enables the mode, any other prefix
|
||||
argument disables it. From Lisp, argument omitted or nil enables
|
||||
the mode, `toggle' toggles the state.
|
||||
|
||||
When Hungry mode is enabled, the control delete key
|
||||
gobbles all preceding whitespace except the last.
|
||||
|
|
@ -1552,13 +1534,7 @@ minor modes don't need any.
|
|||
@smallexample
|
||||
(define-minor-mode hungry-mode
|
||||
"Toggle Hungry mode.
|
||||
With no argument, this command toggles the mode.
|
||||
Non-null prefix argument turns on the mode.
|
||||
Null prefix argument turns off the mode.
|
||||
|
||||
When Hungry mode is enabled, the control delete key
|
||||
gobbles all preceding whitespace except the last.
|
||||
See the command \\[hungry-electric-delete]."
|
||||
...rest of documentation as before..."
|
||||
;; The initial value.
|
||||
:init-value nil
|
||||
;; The indicator for the mode line.
|
||||
|
|
@ -1593,8 +1569,15 @@ starts, for example by providing a @code{:require} keyword.
|
|||
|
||||
Use @code{:group @var{group}} in @var{keyword-args} to specify the
|
||||
custom group for the mode variable of the global minor mode.
|
||||
|
||||
Generally speaking, when you define a globalized minor mode, you should
|
||||
also define a non-globalized version, so that people can use (or
|
||||
disable) it in individual buffers. This also allows them to disable a
|
||||
globally enabled minor mode in a specific major mode, by using that
|
||||
mode's hook.
|
||||
@end defmac
|
||||
|
||||
|
||||
@node Mode Line Format
|
||||
@section Mode-Line Format
|
||||
@cindex mode line
|
||||
|
|
|
|||
|
|
@ -168,34 +168,37 @@ character codepoint.
|
|||
@node Float Basics
|
||||
@section Floating Point Basics
|
||||
|
||||
@cindex @acronym{IEEE} floating point
|
||||
Floating point numbers are useful for representing numbers that are
|
||||
not integral. The precise range of floating point numbers is
|
||||
machine-specific; it is the same as the range of the C data type
|
||||
@code{double} on the machine you are using.
|
||||
@code{double} on the machine you are using. Emacs uses the
|
||||
@acronym{IEEE} floating point standard where possible (the standard is
|
||||
supported by most modern computers).
|
||||
|
||||
The read-syntax for floating point numbers requires either a decimal
|
||||
The read syntax for floating point numbers requires either a decimal
|
||||
point (with at least one digit following), an exponent, or both. For
|
||||
example, @samp{1500.0}, @samp{15e2}, @samp{15.0e2}, @samp{1.5e3}, and
|
||||
@samp{.15e4} are five ways of writing a floating point number whose
|
||||
value is 1500. They are all equivalent. You can also use a minus sign
|
||||
to write negative floating point numbers, as in @samp{-1.0}.
|
||||
value is 1500. They are all equivalent. You can also use a minus
|
||||
sign to write negative floating point numbers, as in @samp{-1.0}.
|
||||
|
||||
Emacs Lisp treats @code{-0.0} as equal to ordinary zero (with
|
||||
respect to @code{equal} and @code{=}), even though the two are
|
||||
distinguishable in the @acronym{IEEE} floating point standard.
|
||||
|
||||
@cindex @acronym{IEEE} floating point
|
||||
@cindex positive infinity
|
||||
@cindex negative infinity
|
||||
@cindex infinity
|
||||
@cindex NaN
|
||||
Most modern computers support the @acronym{IEEE} floating point standard,
|
||||
which provides for positive infinity and negative infinity as floating point
|
||||
values. It also provides for a class of values called NaN or
|
||||
``not-a-number''; numerical functions return such values in cases where
|
||||
there is no correct answer. For example, @code{(/ 0.0 0.0)} returns a
|
||||
NaN. For practical purposes, there's no significant difference between
|
||||
different NaN values in Emacs Lisp, and there's no rule for precisely
|
||||
which NaN value should be used in a particular case, so Emacs Lisp
|
||||
doesn't try to distinguish them (but it does report the sign, if you
|
||||
print it). Here are the read syntaxes for these special floating
|
||||
point values:
|
||||
The @acronym{IEEE} floating point standard supports positive
|
||||
infinity and negative infinity as floating point values. It also
|
||||
provides for a class of values called NaN or ``not-a-number'';
|
||||
numerical functions return such values in cases where there is no
|
||||
correct answer. For example, @code{(/ 0.0 0.0)} returns a NaN. (NaN
|
||||
values can also carry a sign, but for practical purposes there's no
|
||||
significant difference between different NaN values in Emacs Lisp.)
|
||||
Here are the read syntaxes for these special floating point values:
|
||||
|
||||
@table @asis
|
||||
@item positive infinity
|
||||
|
|
@ -206,16 +209,37 @@ point values:
|
|||
@samp{0.0e+NaN} or @samp{-0.0e+NaN}.
|
||||
@end table
|
||||
|
||||
To test whether a floating point value is a NaN, compare it with
|
||||
itself using @code{=}. That returns @code{nil} for a NaN, and
|
||||
@code{t} for any other floating point value.
|
||||
@defun isnan number
|
||||
This predicate tests whether its argument is NaN, and returns @code{t}
|
||||
if so, @code{nil} otherwise. The argument must be a number.
|
||||
@end defun
|
||||
|
||||
The value @code{-0.0} is distinguishable from ordinary zero in
|
||||
@acronym{IEEE} floating point, but Emacs Lisp @code{equal} and
|
||||
@code{=} consider them equal values.
|
||||
The following functions are specialized for handling floating point
|
||||
numbers:
|
||||
|
||||
You can use @code{logb} to extract the binary exponent of a floating
|
||||
point number (or estimate the logarithm of an integer):
|
||||
@defun frexp x
|
||||
This function returns a cons cell @code{(@var{sig} . @var{exp})},
|
||||
where @var{sig} and @var{exp} are respectively the significand and
|
||||
exponent of the floating point number @var{x}:
|
||||
|
||||
@smallexample
|
||||
@var{x} = @var{sig} * 2^@var{exp}
|
||||
@end smallexample
|
||||
|
||||
@var{sig} is a floating point number between 0.5 (inclusive) and 1.0
|
||||
(exclusive). If @var{x} is zero, the return value is @code{(0 . 0)}.
|
||||
@end defun
|
||||
|
||||
@defun ldexp sig &optional exp
|
||||
This function returns a floating point number corresponding to the
|
||||
significand @var{sig} and exponent @var{exp}.
|
||||
@end defun
|
||||
|
||||
@defun copysign x1 x2
|
||||
This function copies the sign of @var{x2} to the value of @var{x1},
|
||||
and returns the result. @var{x1} and @var{x2} must be floating point
|
||||
numbers.
|
||||
@end defun
|
||||
|
||||
@defun logb number
|
||||
This function returns the binary exponent of @var{number}. More
|
||||
|
|
@ -230,14 +254,6 @@ down to an integer.
|
|||
@end example
|
||||
@end defun
|
||||
|
||||
@defvar float-e
|
||||
The mathematical constant @math{e} (2.71828@dots{}).
|
||||
@end defvar
|
||||
|
||||
@defvar float-pi
|
||||
The mathematical constant @math{pi} (3.14159@dots{}).
|
||||
@end defvar
|
||||
|
||||
@node Predicates on Numbers
|
||||
@section Type Predicates for Numbers
|
||||
@cindex predicates for numbers
|
||||
|
|
@ -266,15 +282,15 @@ This predicate tests whether its argument is a number (either integer or
|
|||
floating point), and returns @code{t} if so, @code{nil} otherwise.
|
||||
@end defun
|
||||
|
||||
@defun wholenump object
|
||||
@defun natnump object
|
||||
@cindex natural numbers
|
||||
The @code{wholenump} predicate (whose name comes from the phrase
|
||||
``whole-number-p'') tests to see whether its argument is a nonnegative
|
||||
integer, and returns @code{t} if so, @code{nil} otherwise. 0 is
|
||||
considered non-negative.
|
||||
This predicate (whose name comes from the phrase ``natural number'')
|
||||
tests to see whether its argument is a nonnegative integer, and
|
||||
returns @code{t} if so, @code{nil} otherwise. 0 is considered
|
||||
non-negative.
|
||||
|
||||
@findex natnump
|
||||
@code{natnump} is an obsolete synonym for @code{wholenump}.
|
||||
@findex wholenump number
|
||||
This is a synonym for @code{natnump}.
|
||||
@end defun
|
||||
|
||||
@defun zerop number
|
||||
|
|
@ -1122,35 +1138,15 @@ angle in radians between the vector @code{[@var{x}, @var{y}]} and the
|
|||
@end defun
|
||||
|
||||
@defun exp arg
|
||||
This is the exponential function; it returns
|
||||
@tex
|
||||
@math{e}
|
||||
@end tex
|
||||
@ifnottex
|
||||
@i{e}
|
||||
@end ifnottex
|
||||
to the power @var{arg}.
|
||||
@tex
|
||||
@math{e}
|
||||
@end tex
|
||||
@ifnottex
|
||||
@i{e}
|
||||
@end ifnottex
|
||||
is a fundamental mathematical constant also called the base of natural
|
||||
logarithms.
|
||||
This is the exponential function; it returns @math{e} to the power
|
||||
@var{arg}.
|
||||
@end defun
|
||||
|
||||
@defun log arg &optional base
|
||||
This function returns the logarithm of @var{arg}, with base @var{base}.
|
||||
If you don't specify @var{base}, the base
|
||||
@tex
|
||||
@math{e}
|
||||
@end tex
|
||||
@ifnottex
|
||||
@i{e}
|
||||
@end ifnottex
|
||||
is used. If @var{arg} is negative, it signals a @code{domain-error}
|
||||
error.
|
||||
This function returns the logarithm of @var{arg}, with base
|
||||
@var{base}. If you don't specify @var{base}, the natural base
|
||||
@math{e} is used. If @var{arg} is negative, it signals a
|
||||
@code{domain-error} error.
|
||||
@end defun
|
||||
|
||||
@ignore
|
||||
|
|
@ -1185,6 +1181,17 @@ This returns the square root of @var{arg}. If @var{arg} is negative,
|
|||
it signals a @code{domain-error} error.
|
||||
@end defun
|
||||
|
||||
In addition, Emacs defines the following common mathematical
|
||||
constants:
|
||||
|
||||
@defvar float-e
|
||||
The mathematical constant @math{e} (2.71828@dots{}).
|
||||
@end defvar
|
||||
|
||||
@defvar float-pi
|
||||
The mathematical constant @math{pi} (3.14159@dots{}).
|
||||
@end defvar
|
||||
|
||||
@node Random Numbers
|
||||
@section Random Numbers
|
||||
@cindex random numbers
|
||||
|
|
@ -1218,7 +1225,6 @@ nonnegative and less than @var{limit}.
|
|||
|
||||
If @var{limit} is @code{t}, it means to choose a new seed based on the
|
||||
current time of day and on Emacs's process @acronym{ID} number.
|
||||
@c "Emacs'" is incorrect usage!
|
||||
|
||||
On some machines, any integer representable in Lisp may be the result
|
||||
of @code{random}. On other machines, the result can never be larger
|
||||
|
|
|
|||
|
|
@ -427,10 +427,10 @@ codes for these non-@acronym{ASCII} control characters include the
|
|||
@ifnottex
|
||||
2**26
|
||||
@end ifnottex
|
||||
bit as well as the code for the corresponding non-control
|
||||
character. Ordinary terminals have no way of generating non-@acronym{ASCII}
|
||||
control characters, but you can generate them straightforwardly using X
|
||||
and other window systems.
|
||||
bit as well as the code for the corresponding non-control character.
|
||||
Ordinary text terminals have no way of generating non-@acronym{ASCII}
|
||||
control characters, but you can generate them straightforwardly using
|
||||
X and other window systems.
|
||||
|
||||
For historical reasons, Emacs treats the @key{DEL} character as
|
||||
the control equivalent of @kbd{?}:
|
||||
|
|
@ -501,10 +501,10 @@ character is upper case or lower case. Emacs uses the
|
|||
@end ifnottex
|
||||
bit to indicate that the shift key was used in typing a control
|
||||
character. This distinction is possible only when you use X terminals
|
||||
or other special terminals; ordinary terminals do not report the
|
||||
distinction to the computer in any way. The Lisp syntax for
|
||||
the shift bit is @samp{\S-}; thus, @samp{?\C-\S-o} or @samp{?\C-\S-O}
|
||||
represents the shifted-control-o character.
|
||||
or other special terminals; ordinary text terminals do not report the
|
||||
distinction. The Lisp syntax for the shift bit is @samp{\S-}; thus,
|
||||
@samp{?\C-\S-o} or @samp{?\C-\S-O} represents the shifted-control-o
|
||||
character.
|
||||
|
||||
@cindex hyper characters
|
||||
@cindex super characters
|
||||
|
|
@ -541,9 +541,9 @@ intended. But you can use one symbol in all of these ways,
|
|||
independently.
|
||||
|
||||
A symbol whose name starts with a colon (@samp{:}) is called a
|
||||
@dfn{keyword symbol}. These symbols automatically act as constants, and
|
||||
are normally used only by comparing an unknown symbol with a few
|
||||
specific alternatives.
|
||||
@dfn{keyword symbol}. These symbols automatically act as constants,
|
||||
and are normally used only by comparing an unknown symbol with a few
|
||||
specific alternatives. @xref{Constant Variables}.
|
||||
|
||||
@cindex @samp{\} in symbols
|
||||
@cindex backslash in symbols
|
||||
|
|
@ -617,26 +617,28 @@ all symbols; @pxref{Creating Symbols}.)
|
|||
@subsection Sequence Types
|
||||
|
||||
A @dfn{sequence} is a Lisp object that represents an ordered set of
|
||||
elements. There are two kinds of sequence in Emacs Lisp, lists and
|
||||
arrays. Thus, an object of type list or of type array is also
|
||||
considered a sequence.
|
||||
elements. There are two kinds of sequence in Emacs Lisp: @dfn{lists}
|
||||
and @dfn{arrays}.
|
||||
|
||||
Arrays are further subdivided into strings, vectors, char-tables and
|
||||
bool-vectors. Vectors can hold elements of any type, but string
|
||||
elements must be characters, and bool-vector elements must be @code{t}
|
||||
or @code{nil}. Char-tables are like vectors except that they are
|
||||
indexed by any valid character code. The characters in a string can
|
||||
have text properties like characters in a buffer (@pxref{Text
|
||||
Properties}), but vectors do not support text properties, even when
|
||||
their elements happen to be characters.
|
||||
Lists are the most commonly-used sequences. A list can hold
|
||||
elements of any type, and its length can be easily changed by adding
|
||||
or removing elements. See the next subsection for more about lists.
|
||||
|
||||
Lists, strings and the other array types are different, but they have
|
||||
important similarities. For example, all have a length @var{l}, and all
|
||||
have elements which can be indexed from zero to @var{l} minus one.
|
||||
Several functions, called sequence functions, accept any kind of
|
||||
sequence. For example, the function @code{elt} can be used to extract
|
||||
an element of a sequence, given its index. @xref{Sequences Arrays
|
||||
Vectors}.
|
||||
Arrays are fixed-length sequences. They are further subdivided into
|
||||
strings, vectors, char-tables and bool-vectors. Vectors can hold
|
||||
elements of any type, whereas string elements must be characters, and
|
||||
bool-vector elements must be @code{t} or @code{nil}. Char-tables are
|
||||
like vectors except that they are indexed by any valid character code.
|
||||
The characters in a string can have text properties like characters in
|
||||
a buffer (@pxref{Text Properties}), but vectors do not support text
|
||||
properties, even when their elements happen to be characters.
|
||||
|
||||
Lists, strings and the other array types also share important
|
||||
similarities. For example, all have a length @var{l}, and all have
|
||||
elements which can be indexed from zero to @var{l} minus one. Several
|
||||
functions, called sequence functions, accept any kind of sequence.
|
||||
For example, the function @code{length} reports the length of any kind
|
||||
of sequence. @xref{Sequences Arrays Vectors}.
|
||||
|
||||
It is generally impossible to read the same sequence twice, since
|
||||
sequences are always created anew upon reading. If you read the read
|
||||
|
|
@ -650,24 +652,27 @@ same object, @code{nil}.
|
|||
@cindex decrement field of register
|
||||
@cindex pointers
|
||||
|
||||
A @dfn{cons cell} is an object that consists of two slots, called the
|
||||
@sc{car} slot and the @sc{cdr} slot. Each slot can @dfn{hold} or
|
||||
@dfn{refer to} any Lisp object. We also say that ``the @sc{car} of
|
||||
this cons cell is'' whatever object its @sc{car} slot currently holds,
|
||||
and likewise for the @sc{cdr}.
|
||||
|
||||
@quotation
|
||||
A note to C programmers: in Lisp, we do not distinguish between
|
||||
``holding'' a value and ``pointing to'' the value, because pointers in
|
||||
Lisp are implicit.
|
||||
@end quotation
|
||||
A @dfn{cons cell} is an object that consists of two slots, called
|
||||
the @sc{car} slot and the @sc{cdr} slot. Each slot can @dfn{hold} any
|
||||
Lisp object. We also say that ``the @sc{car} of this cons cell is''
|
||||
whatever object its @sc{car} slot currently holds, and likewise for
|
||||
the @sc{cdr}.
|
||||
|
||||
@cindex list structure
|
||||
A @dfn{list} is a series of cons cells, linked together so that the
|
||||
@sc{cdr} slot of each cons cell holds either the next cons cell or the
|
||||
empty list. The empty list is actually the symbol @code{nil}.
|
||||
@xref{Lists}, for functions that work on lists. Because most cons
|
||||
cells are used as part of lists, the phrase @dfn{list structure} has
|
||||
come to refer to any structure made out of cons cells.
|
||||
@xref{Lists}, for details. Because most cons cells are used as part
|
||||
of lists, we refer to any structure made out of cons cells as a
|
||||
@dfn{list structure}.
|
||||
|
||||
@cindex linked list
|
||||
@quotation
|
||||
A note to C programmers: a Lisp list thus works as a @dfn{linked list}
|
||||
built up of cons cells. Because pointers in Lisp are implicit, we do
|
||||
not distinguish between a cons cell slot ``holding'' a value versus
|
||||
``pointing to'' the value.
|
||||
@end quotation
|
||||
|
||||
@cindex atoms
|
||||
Because cons cells are so central to Lisp, we also have a word for
|
||||
|
|
@ -1025,40 +1030,40 @@ but the newline is ignored if escaped."
|
|||
@node Non-ASCII in Strings
|
||||
@subsubsection Non-@acronym{ASCII} Characters in Strings
|
||||
|
||||
You can include a non-@acronym{ASCII} international character in a string
|
||||
constant by writing it literally. There are two text representations
|
||||
for non-@acronym{ASCII} characters in Emacs strings (and in buffers): unibyte
|
||||
and multibyte. If the string constant is read from a multibyte source,
|
||||
such as a multibyte buffer or string, or a file that would be visited as
|
||||
multibyte, then the character is read as a multibyte character, and that
|
||||
makes the string multibyte. If the string constant is read from a
|
||||
unibyte source, then the character is read as unibyte and that makes the
|
||||
string unibyte.
|
||||
You can include a non-@acronym{ASCII} international character in a
|
||||
string constant by writing it literally. There are two text
|
||||
representations for non-@acronym{ASCII} characters in Emacs strings
|
||||
(and in buffers): unibyte and multibyte (@pxref{Text
|
||||
Representations}). If the string constant is read from a multibyte
|
||||
source, such as a multibyte buffer or string, or a file that would be
|
||||
visited as multibyte, then Emacs reads the non-@acronym{ASCII}
|
||||
character as a multibyte character and automatically makes the string
|
||||
a multibyte string. If the string constant is read from a unibyte
|
||||
source, then Emacs reads the non-@acronym{ASCII} character as unibyte,
|
||||
and makes the string unibyte.
|
||||
|
||||
You can also represent a multibyte non-@acronym{ASCII} character with its
|
||||
character code: use a hex escape, @samp{\x@var{nnnnnnn}}, with as many
|
||||
digits as necessary. (Multibyte non-@acronym{ASCII} character codes are all
|
||||
greater than 256.) Any character which is not a valid hex digit
|
||||
terminates this construct. If the next character in the string could be
|
||||
interpreted as a hex digit, write @w{@samp{\ }} (backslash and space) to
|
||||
terminate the hex escape---for example, @w{@samp{\xe0\ }} represents
|
||||
one character, @samp{a} with grave accent. @w{@samp{\ }} in a string
|
||||
constant is just like backslash-newline; it does not contribute any
|
||||
character to the string, but it does terminate the preceding hex escape.
|
||||
Instead of writing a non-@acronym{ASCII} character literally into a
|
||||
multibyte string, you can write it as its character code using a hex
|
||||
escape, @samp{\x@var{nnnnnnn}}, with as many digits as necessary.
|
||||
(Multibyte non-@acronym{ASCII} character codes are all greater than
|
||||
256.) You can also specify a character in a multibyte string using
|
||||
the @samp{\u} or @samp{\U} Unicode escape syntax (@pxref{General
|
||||
Escape Syntax}). In either case, any character which is not a valid
|
||||
hex digit terminates the construct. If the next character in the
|
||||
string could be interpreted as a hex digit, write @w{@samp{\ }}
|
||||
(backslash and space) to terminate the hex escape---for example,
|
||||
@w{@samp{\xe0\ }} represents one character, @samp{a} with grave
|
||||
accent. @w{@samp{\ }} in a string constant is just like
|
||||
backslash-newline; it does not contribute any character to the string,
|
||||
but it does terminate the preceding hex escape. Using any hex escape
|
||||
in a string (even for an @acronym{ASCII} character) automatically
|
||||
forces the string to be multibyte.
|
||||
|
||||
You can represent a unibyte non-@acronym{ASCII} character with its
|
||||
character code, which must be in the range from 128 (0200 octal) to
|
||||
255 (0377 octal). If you write all such character codes in octal and
|
||||
the string contains no other characters forcing it to be multibyte,
|
||||
this produces a unibyte string. However, using any hex escape in a
|
||||
string (even for an @acronym{ASCII} character) forces the string to be
|
||||
multibyte.
|
||||
|
||||
You can also specify characters in a string by their numeric values
|
||||
in Unicode, using @samp{\u} and @samp{\U} (@pxref{Character Type}).
|
||||
|
||||
@xref{Text Representations}, for more information about the two
|
||||
text representations.
|
||||
this produces a unibyte string.
|
||||
|
||||
@node Nonprinting Characters
|
||||
@subsubsection Nonprinting Characters in Strings
|
||||
|
|
@ -1318,11 +1323,11 @@ with the name of the subroutine.
|
|||
@node Byte-Code Type
|
||||
@subsection Byte-Code Function Type
|
||||
|
||||
The byte compiler produces @dfn{byte-code function objects}.
|
||||
Internally, a byte-code function object is much like a vector; however,
|
||||
the evaluator handles this data type specially when it appears as a
|
||||
function to be called. @xref{Byte Compilation}, for information about
|
||||
the byte compiler.
|
||||
@dfn{Byte-code function objects} are produced by byte-compiling Lisp
|
||||
code (@pxref{Byte Compilation}). Internally, a byte-code function
|
||||
object is much like a vector; however, the evaluator handles this data
|
||||
type specially when it appears in a function call. @xref{Byte-Code
|
||||
Objects}.
|
||||
|
||||
The printed representation and read syntax for a byte-code function
|
||||
object is like that for a vector, with an additional @samp{#} before the
|
||||
|
|
@ -1790,6 +1795,9 @@ with references to further information.
|
|||
@item consp
|
||||
@xref{List-related Predicates, consp}.
|
||||
|
||||
@item custom-variable-p
|
||||
@xref{Variable Definitions, custom-variable-p}.
|
||||
|
||||
@item display-table-p
|
||||
@xref{Display Tables, display-table-p}.
|
||||
|
||||
|
|
@ -1865,9 +1873,6 @@ with references to further information.
|
|||
@item syntax-table-p
|
||||
@xref{Syntax Tables, syntax-table-p}.
|
||||
|
||||
@item user-variable-p
|
||||
@xref{Defining Variables, user-variable-p}.
|
||||
|
||||
@item vectorp
|
||||
@xref{Vectors, vectorp}.
|
||||
|
||||
|
|
@ -1922,23 +1927,24 @@ This function returns a symbol naming the primitive type of
|
|||
@section Equality Predicates
|
||||
@cindex equality
|
||||
|
||||
Here we describe functions that test for equality between any two
|
||||
objects. Other functions test equality of contents between objects of specific
|
||||
types, e.g., strings. For these predicates, see the appropriate chapter
|
||||
describing the data type.
|
||||
Here we describe functions that test for equality between two
|
||||
objects. Other functions test equality of contents between objects of
|
||||
specific types, e.g.@: strings. For these predicates, see the
|
||||
appropriate chapter describing the data type.
|
||||
|
||||
@defun eq object1 object2
|
||||
This function returns @code{t} if @var{object1} and @var{object2} are
|
||||
the same object, @code{nil} otherwise.
|
||||
the same object, and @code{nil} otherwise.
|
||||
|
||||
@code{eq} returns @code{t} if @var{object1} and @var{object2} are
|
||||
integers with the same value. Also, since symbol names are normally
|
||||
unique, if the arguments are symbols with the same name, they are
|
||||
@code{eq}. For other types (e.g., lists, vectors, strings), two
|
||||
arguments with the same contents or elements are not necessarily
|
||||
@code{eq} to each other: they are @code{eq} only if they are the same
|
||||
object, meaning that a change in the contents of one will be reflected
|
||||
by the same change in the contents of the other.
|
||||
If @var{object1} and @var{object2} are integers with the same value,
|
||||
they are considered to be the same object (i.e.@: @code{eq} returns
|
||||
@code{t}). If @var{object1} and @var{object2} are symbols with the
|
||||
same name, they are normally the same object---but see @ref{Creating
|
||||
Symbols} for exceptions. For other types (e.g.@: lists, vectors,
|
||||
strings), two arguments with the same contents or elements are not
|
||||
necessarily @code{eq} to each other: they are @code{eq} only if they
|
||||
are the same object, meaning that a change in the contents of one will
|
||||
be reflected by the same change in the contents of the other.
|
||||
|
||||
@example
|
||||
@group
|
||||
|
|
@ -1988,6 +1994,7 @@ by the same change in the contents of the other.
|
|||
@end group
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
The @code{make-symbol} function returns an uninterned symbol, distinct
|
||||
from the symbol that is used if you write the name in a Lisp expression.
|
||||
Distinct symbols with the same name are not @code{eq}. @xref{Creating
|
||||
|
|
@ -2003,11 +2010,11 @@ Symbols}.
|
|||
|
||||
@defun equal object1 object2
|
||||
This function returns @code{t} if @var{object1} and @var{object2} have
|
||||
equal components, @code{nil} otherwise. Whereas @code{eq} tests if its
|
||||
arguments are the same object, @code{equal} looks inside nonidentical
|
||||
arguments to see if their elements or contents are the same. So, if two
|
||||
objects are @code{eq}, they are @code{equal}, but the converse is not
|
||||
always true.
|
||||
equal components, and @code{nil} otherwise. Whereas @code{eq} tests
|
||||
if its arguments are the same object, @code{equal} looks inside
|
||||
nonidentical arguments to see if their elements or contents are the
|
||||
same. So, if two objects are @code{eq}, they are @code{equal}, but
|
||||
the converse is not always true.
|
||||
|
||||
@example
|
||||
@group
|
||||
|
|
@ -2059,13 +2066,13 @@ always true.
|
|||
@end example
|
||||
|
||||
Comparison of strings is case-sensitive, but does not take account of
|
||||
text properties---it compares only the characters in the strings. Use
|
||||
@code{equal-including-properties} to also compare text properties. For
|
||||
technical reasons, a unibyte string and a multibyte string are
|
||||
@code{equal} if and only if they contain the same sequence of
|
||||
character codes and all these codes are either in the range 0 through
|
||||
127 (@acronym{ASCII}) or 160 through 255 (@code{eight-bit-graphic}).
|
||||
(@pxref{Text Representations}).
|
||||
text properties---it compares only the characters in the strings.
|
||||
@xref{Text Properties}. Use @code{equal-including-properties} to also
|
||||
compare text properties. For technical reasons, a unibyte string and
|
||||
a multibyte string are @code{equal} if and only if they contain the
|
||||
same sequence of character codes and all these codes are either in the
|
||||
range 0 through 127 (@acronym{ASCII}) or 160 through 255
|
||||
(@code{eight-bit-graphic}). (@pxref{Text Representations}).
|
||||
|
||||
@example
|
||||
@group
|
||||
|
|
|
|||
|
|
@ -300,7 +300,8 @@ MS-DOS doesn't support asynchronous subprocesses, so this option doesn't
|
|||
work there.
|
||||
|
||||
@item @code{(:file @var{file-name})}
|
||||
Send the output to the file name specified.
|
||||
Send the output to the file name specified, overwriting it if it
|
||||
already exists.
|
||||
|
||||
@item @code{(@var{real-destination} @var{error-destination})}
|
||||
Keep the standard output stream separate from the standard error stream;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ This function searches forward from point for an exact match for
|
|||
@var{string}. If successful, it sets point to the end of the occurrence
|
||||
found, and returns the new value of point. If no match is found, the
|
||||
value and side effects depend on @var{noerror} (see below).
|
||||
@c Emacs 19 feature
|
||||
|
||||
In the following example, point is initially at the beginning of the
|
||||
line. Then @code{(search-forward "fox")} moves point after the last
|
||||
|
|
@ -91,18 +90,21 @@ The argument @var{noerror} only affects valid searches which fail to
|
|||
find a match. Invalid arguments cause errors regardless of
|
||||
@var{noerror}.
|
||||
|
||||
If @var{repeat} is supplied (it must be a positive number), then the
|
||||
search is repeated that many times (each time starting at the end of the
|
||||
previous time's match). If these successive searches succeed, the
|
||||
function succeeds, moving point and returning its new value. Otherwise
|
||||
the search fails, with results depending on the value of
|
||||
@var{noerror}, as described above.
|
||||
If @var{repeat} is a positive number @var{n}, it serves as a repeat
|
||||
count: the search is repeated @var{n} times, each time starting at the
|
||||
end of the previous time's match. If these successive searches
|
||||
succeed, the function succeeds, moving point and returning its new
|
||||
value. Otherwise the search fails, with results depending on the
|
||||
value of @var{noerror}, as described above. If @var{repeat} is a
|
||||
negative number -@var{n}, it serves as a repeat count of @var{n} for a
|
||||
search in the opposite (backward) direction.
|
||||
@end deffn
|
||||
|
||||
@deffn Command search-backward string &optional limit noerror repeat
|
||||
This function searches backward from point for @var{string}. It is
|
||||
just like @code{search-forward} except that it searches backwards and
|
||||
leaves point at the beginning of the match.
|
||||
like @code{search-forward}, except that it searches backwards rather
|
||||
than forwards. Backward searches leave point at the beginning of the
|
||||
match.
|
||||
@end deffn
|
||||
|
||||
@deffn Command word-search-forward string &optional limit noerror repeat
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
@chapter Sequences, Arrays, and Vectors
|
||||
@cindex sequence
|
||||
|
||||
Recall that the @dfn{sequence} type is the union of two other Lisp
|
||||
types: lists and arrays. In other words, any list is a sequence, and
|
||||
any array is a sequence. The common property that all sequences have is
|
||||
that each is an ordered collection of elements.
|
||||
The @dfn{sequence} type is the union of two other Lisp types: lists
|
||||
and arrays. In other words, any list is a sequence, and any array is
|
||||
a sequence. The common property that all sequences have is that each
|
||||
is an ordered collection of elements.
|
||||
|
||||
An @dfn{array} is a fixed-length object with a slot for each of its
|
||||
elements. All the elements are accessible in constant time. The four
|
||||
|
|
@ -54,19 +54,17 @@ But it is possible to add elements to the list, or remove elements.
|
|||
* Vector Functions:: Functions specifically for vectors.
|
||||
* Char-Tables:: How to work with char-tables.
|
||||
* Bool-Vectors:: How to work with bool-vectors.
|
||||
* Rings:: Managing a fixed-size ring of objects.
|
||||
@end menu
|
||||
|
||||
@node Sequence Functions
|
||||
@section Sequences
|
||||
|
||||
In Emacs Lisp, a @dfn{sequence} is either a list or an array. The
|
||||
common property of all sequences is that they are ordered collections of
|
||||
elements. This section describes functions that accept any kind of
|
||||
sequence.
|
||||
This section describes functions that accept any kind of sequence.
|
||||
|
||||
@defun sequencep object
|
||||
Returns @code{t} if @var{object} is a list, vector, string,
|
||||
bool-vector, or char-table, @code{nil} otherwise.
|
||||
This function returns @code{t} if @var{object} is a list, vector,
|
||||
string, bool-vector, or char-table, @code{nil} otherwise.
|
||||
@end defun
|
||||
|
||||
@defun length sequence
|
||||
|
|
@ -149,8 +147,9 @@ This function generalizes @code{aref} (@pxref{Array Functions}) and
|
|||
|
||||
@defun copy-sequence sequence
|
||||
@cindex copying sequences
|
||||
Returns a copy of @var{sequence}. The copy is the same type of object
|
||||
as the original sequence, and it has the same elements in the same order.
|
||||
This function returns a copy of @var{sequence}. The copy is the same
|
||||
type of object as the original sequence, and it has the same elements
|
||||
in the same order.
|
||||
|
||||
Storing a new element into the copy does not affect the original
|
||||
@var{sequence}, and vice versa. However, the elements of the new
|
||||
|
|
@ -394,8 +393,8 @@ symbol-lookup tables (@pxref{Creating Symbols}), as part of the
|
|||
representation of a byte-compiled function (@pxref{Byte Compilation}),
|
||||
and more.
|
||||
|
||||
In Emacs Lisp, the indices of the elements of a vector start from zero
|
||||
and count up from there.
|
||||
Like other arrays, vectors use zero-origin indexing: the first
|
||||
element has index 0.
|
||||
|
||||
Vectors are printed with square brackets surrounding the elements.
|
||||
Thus, a vector whose elements are the symbols @code{a}, @code{b} and
|
||||
|
|
@ -728,3 +727,96 @@ bv
|
|||
@noindent
|
||||
These results make sense because the binary codes for control-_ and
|
||||
control-W are 11111 and 10111, respectively.
|
||||
|
||||
@node Rings
|
||||
@section Managing a Fixed-Size Ring of Objects
|
||||
|
||||
@cindex ring data structure
|
||||
A @dfn{ring} is a fixed-size data structure that supports insertion,
|
||||
deletion, rotation, and modulo-indexed reference and traversal. An
|
||||
efficient ring data structure is implemented by the @code{ring}
|
||||
package. It provides the functions listed in this section.
|
||||
|
||||
Note that several ``rings'' in Emacs, like the kill ring and the
|
||||
mark ring, are actually implemented as simple lists, @emph{not} using
|
||||
the @code{ring} package; thus the following functions won't work on
|
||||
them.
|
||||
|
||||
@defun make-ring size
|
||||
This returns a new ring capable of holding @var{size} objects.
|
||||
@var{size} should be an integer.
|
||||
@end defun
|
||||
|
||||
@defun ring-p object
|
||||
This returns @code{t} if @var{object} is a ring, @code{nil} otherwise.
|
||||
@end defun
|
||||
|
||||
@defun ring-size ring
|
||||
This returns the maximum capacity of the @var{ring}.
|
||||
@end defun
|
||||
|
||||
@defun ring-length ring
|
||||
This returns the number of objects that @var{ring} currently contains.
|
||||
The value will never exceed that returned by @code{ring-size}.
|
||||
@end defun
|
||||
|
||||
@defun ring-elements ring
|
||||
This returns a list of the objects in @var{ring}, in order, newest first.
|
||||
@end defun
|
||||
|
||||
@defun ring-copy ring
|
||||
This returns a new ring which is a copy of @var{ring}.
|
||||
The new ring contains the same (@code{eq}) objects as @var{ring}.
|
||||
@end defun
|
||||
|
||||
@defun ring-empty-p ring
|
||||
This returns @code{t} if @var{ring} is empty, @code{nil} otherwise.
|
||||
@end defun
|
||||
|
||||
The newest element in the ring always has index 0. Higher indices
|
||||
correspond to older elements. Indices are computed modulo the ring
|
||||
length. Index @minus{}1 corresponds to the oldest element, @minus{}2
|
||||
to the next-oldest, and so forth.
|
||||
|
||||
@defun ring-ref ring index
|
||||
This returns the object in @var{ring} found at index @var{index}.
|
||||
@var{index} may be negative or greater than the ring length. If
|
||||
@var{ring} is empty, @code{ring-ref} signals an error.
|
||||
@end defun
|
||||
|
||||
@defun ring-insert ring object
|
||||
This inserts @var{object} into @var{ring}, making it the newest
|
||||
element, and returns @var{object}.
|
||||
|
||||
If the ring is full, insertion removes the oldest element to
|
||||
make room for the new element.
|
||||
@end defun
|
||||
|
||||
@defun ring-remove ring &optional index
|
||||
Remove an object from @var{ring}, and return that object. The
|
||||
argument @var{index} specifies which item to remove; if it is
|
||||
@code{nil}, that means to remove the oldest item. If @var{ring} is
|
||||
empty, @code{ring-remove} signals an error.
|
||||
@end defun
|
||||
|
||||
@defun ring-insert-at-beginning ring object
|
||||
This inserts @var{object} into @var{ring}, treating it as the oldest
|
||||
element. The return value is not significant.
|
||||
|
||||
If the ring is full, this function removes the newest element to make
|
||||
room for the inserted element.
|
||||
@end defun
|
||||
|
||||
@cindex fifo data structure
|
||||
If you are careful not to exceed the ring size, you can
|
||||
use the ring as a first-in-first-out queue. For example:
|
||||
|
||||
@lisp
|
||||
(let ((fifo (make-ring 5)))
|
||||
(mapc (lambda (obj) (ring-insert fifo obj))
|
||||
'(0 one "two"))
|
||||
(list (ring-remove fifo) t
|
||||
(ring-remove fifo) t
|
||||
(ring-remove fifo)))
|
||||
@result{} (0 t one t "two")
|
||||
@end lisp
|
||||
|
|
|
|||
|
|
@ -410,8 +410,13 @@ in case if @code{case-fold-search} is non-@code{nil}.
|
|||
@defun string= string1 string2
|
||||
This function returns @code{t} if the characters of the two strings
|
||||
match exactly. Symbols are also allowed as arguments, in which case
|
||||
their print names are used.
|
||||
Case is always significant, regardless of @code{case-fold-search}.
|
||||
the symbol names are used. Case is always significant, regardless of
|
||||
@code{case-fold-search}.
|
||||
|
||||
This function is equivalent to @code{equal} for comparing two strings
|
||||
(@pxref{Equality Predicates}). In particular, the text properties of
|
||||
the two strings are ignored. But if either argument is not a string
|
||||
or symbol, an error is signaled.
|
||||
|
||||
@example
|
||||
(string= "abc" "abc")
|
||||
|
|
@ -422,10 +427,6 @@ Case is always significant, regardless of @code{case-fold-search}.
|
|||
@result{} nil
|
||||
@end example
|
||||
|
||||
The function @code{string=} ignores the text properties of the two
|
||||
strings. When @code{equal} (@pxref{Equality Predicates}) compares two
|
||||
strings, it uses @code{string=}.
|
||||
|
||||
For technical reasons, a unibyte and a multibyte string are
|
||||
@code{equal} if and only if they contain the same sequence of
|
||||
character codes and all these codes are either in the range 0 through
|
||||
|
|
|
|||
|
|
@ -41,62 +41,58 @@ references another object:
|
|||
@table @asis
|
||||
@item Print name
|
||||
@cindex print name cell
|
||||
The @dfn{print name cell} holds a string that names the symbol for
|
||||
reading and printing. See @code{symbol-name} in @ref{Creating Symbols}.
|
||||
The symbol's name.
|
||||
|
||||
@item Value
|
||||
@cindex value cell
|
||||
The @dfn{value cell} holds the current value of the symbol as a
|
||||
variable. When a symbol is used as a form, the value of the form is the
|
||||
contents of the symbol's value cell. See @code{symbol-value} in
|
||||
@ref{Accessing Variables}.
|
||||
The symbol's current value as a variable.
|
||||
|
||||
@item Function
|
||||
@cindex function cell
|
||||
The @dfn{function cell} holds the function definition of the symbol.
|
||||
When a symbol is used as a function, its function definition is used in
|
||||
its place. This cell is also used to make a symbol stand for a keymap
|
||||
or a keyboard macro, for editor command execution. Because each symbol
|
||||
has separate value and function cells, variables names and function names do
|
||||
not conflict. See @code{symbol-function} in @ref{Function Cells}.
|
||||
The symbol's function definition. It can also hold a symbol, a
|
||||
keymap, or a keyboard macro.
|
||||
|
||||
@item Property list
|
||||
@cindex property list cell
|
||||
The @dfn{property list cell} holds the property list of the symbol. See
|
||||
@code{symbol-plist} in @ref{Property Lists}.
|
||||
The symbol's property list.
|
||||
@end table
|
||||
|
||||
The print name cell always holds a string, and cannot be changed. The
|
||||
other three cells can be set individually to any specified Lisp object.
|
||||
@noindent
|
||||
The print name cell always holds a string, and cannot be changed.
|
||||
Each of the other three cells can be set to any Lisp object.
|
||||
|
||||
The print name cell holds the string that is the name of the symbol.
|
||||
Since symbols are represented textually by their names, it is important
|
||||
not to have two symbols with the same name. The Lisp reader ensures
|
||||
this: every time it reads a symbol, it looks for an existing symbol with
|
||||
the specified name before it creates a new one. (In GNU Emacs Lisp,
|
||||
this lookup uses a hashing algorithm and an obarray; see @ref{Creating
|
||||
Symbols}.)
|
||||
The print name cell holds the string that is the name of a symbol.
|
||||
Since symbols are represented textually by their names, it is
|
||||
important not to have two symbols with the same name. The Lisp reader
|
||||
ensures this: every time it reads a symbol, it looks for an existing
|
||||
symbol with the specified name before it creates a new one. To get a
|
||||
symbol's name, use the function @code{symbol-name} (@pxref{Creating
|
||||
Symbols}).
|
||||
|
||||
The value cell holds the symbol's value as a variable
|
||||
(@pxref{Variables}). That is what you get if you evaluate the symbol as
|
||||
a Lisp expression (@pxref{Evaluation}). Any Lisp object is a legitimate
|
||||
value. Certain symbols have values that cannot be changed; these
|
||||
include @code{nil} and @code{t}, and any symbol whose name starts with
|
||||
@samp{:} (those are called @dfn{keywords}). @xref{Constant Variables}.
|
||||
The value cell holds a symbol's value as a variable, which is what
|
||||
you get if the symbol itself is evaluated as a Lisp expression.
|
||||
@xref{Variables}, for details about how values are set and retrieved,
|
||||
including complications such as @dfn{local bindings} and @dfn{scoping
|
||||
rules}. Most symbols can have any Lisp object as a value, but certain
|
||||
special symbols have values that cannot be changed; these include
|
||||
@code{nil} and @code{t}, and any symbol whose name starts with
|
||||
@samp{:} (those are called @dfn{keywords}). @xref{Constant
|
||||
Variables}.
|
||||
|
||||
We often refer to ``the function @code{foo}'' when we really mean
|
||||
the function stored in the function cell of the symbol @code{foo}. We
|
||||
make the distinction explicit only when necessary. In normal
|
||||
usage, the function cell usually contains a function
|
||||
(@pxref{Functions}) or a macro (@pxref{Macros}), as that is what the
|
||||
Lisp interpreter expects to see there (@pxref{Evaluation}). Keyboard
|
||||
macros (@pxref{Keyboard Macros}), keymaps (@pxref{Keymaps}) and
|
||||
autoload objects (@pxref{Autoloading}) are also sometimes stored in
|
||||
the function cells of symbols.
|
||||
The function cell holds a symbol's function definition. Often, we
|
||||
refer to ``the function @code{foo}'' when we really mean the function
|
||||
stored in the function cell of @code{foo}; we make the distinction
|
||||
explicit only when necessary. Typically, the function cell is used to
|
||||
hold a function (@pxref{Functions}) or a macro (@pxref{Macros}).
|
||||
However, it can also be used to hold a symbol (@pxref{Function
|
||||
Indirection}), keyboard macro (@pxref{Keyboard Macros}), keymap
|
||||
(@pxref{Keymaps}), or autoload object (@pxref{Autoloading}). To get
|
||||
the contents of a symbol's function cell, use the function
|
||||
@code{symbol-function} (@pxref{Function Cells}).
|
||||
|
||||
The property list cell normally should hold a correctly formatted
|
||||
property list (@pxref{Property Lists}), as a number of functions expect
|
||||
to see a property list there.
|
||||
property list. To get a symbol's function cell, use the function
|
||||
@code{symbol-plist}. @xref{Property Lists}.
|
||||
|
||||
The function cell or the value cell may be @dfn{void}, which means
|
||||
that the cell does not reference any object. (This is not the same
|
||||
|
|
@ -104,57 +100,43 @@ thing as holding the symbol @code{void}, nor the same as holding the
|
|||
symbol @code{nil}.) Examining a function or value cell that is void
|
||||
results in an error, such as @samp{Symbol's value as variable is void}.
|
||||
|
||||
The four functions @code{symbol-name}, @code{symbol-value},
|
||||
@code{symbol-plist}, and @code{symbol-function} return the contents of
|
||||
the four cells of a symbol. Here as an example we show the contents of
|
||||
the four cells of the symbol @code{buffer-file-name}:
|
||||
Because each symbol has separate value and function cells, variables
|
||||
names and function names do not conflict. For example, the symbol
|
||||
@code{buffer-file-name} has a value (the name of the file being
|
||||
visited in the current buffer) as well as a function definition (a
|
||||
primitive function that returns the name of the file):
|
||||
|
||||
@example
|
||||
(symbol-name 'buffer-file-name)
|
||||
@result{} "buffer-file-name"
|
||||
(symbol-value 'buffer-file-name)
|
||||
buffer-file-name
|
||||
@result{} "/gnu/elisp/symbols.texi"
|
||||
(symbol-function 'buffer-file-name)
|
||||
@result{} #<subr buffer-file-name>
|
||||
(symbol-plist 'buffer-file-name)
|
||||
@result{} (variable-documentation 29529)
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Because this symbol is the variable which holds the name of the file
|
||||
being visited in the current buffer, the value cell contents we see are
|
||||
the name of the source file of this chapter of the Emacs Lisp Manual.
|
||||
The property list cell contains the list @code{(variable-documentation
|
||||
29529)} which tells the documentation functions where to find the
|
||||
documentation string for the variable @code{buffer-file-name} in the
|
||||
@file{DOC-@var{version}} file. (29529 is the offset from the beginning
|
||||
of the @file{DOC-@var{version}} file to where that documentation string
|
||||
begins---see @ref{Documentation Basics}.) The function cell contains
|
||||
the function for returning the name of the file.
|
||||
@code{buffer-file-name} names a primitive function, which has no read
|
||||
syntax and prints in hash notation (@pxref{Primitive Function Type}). A
|
||||
symbol naming a function written in Lisp would have a lambda expression
|
||||
(or a byte-code object) in this cell.
|
||||
|
||||
@node Definitions, Creating Symbols, Symbol Components, Symbols
|
||||
@section Defining Symbols
|
||||
@cindex definitions of symbols
|
||||
|
||||
A @dfn{definition} in Lisp is a special form that announces your
|
||||
intention to use a certain symbol in a particular way. In Emacs Lisp,
|
||||
you can define a symbol as a variable, or define it as a function (or
|
||||
macro), or both independently.
|
||||
|
||||
A definition construct typically specifies a value or meaning for the
|
||||
symbol for one kind of use, plus documentation for its meaning when used
|
||||
in this way. Thus, when you define a symbol as a variable, you can
|
||||
supply an initial value for the variable, plus documentation for the
|
||||
variable.
|
||||
A @dfn{definition} is a special kind of Lisp expression that
|
||||
announces your intention to use a symbol in a particular way. It
|
||||
typically specifies a value or meaning for the symbol for one kind of
|
||||
use, plus documentation for its meaning when used in this way. Thus,
|
||||
when you define a symbol as a variable, you can supply an initial
|
||||
value for the variable, plus documentation for the variable.
|
||||
|
||||
@code{defvar} and @code{defconst} are special forms that define a
|
||||
symbol as a global variable. They are documented in detail in
|
||||
@ref{Defining Variables}. For defining user option variables that can
|
||||
be customized, use @code{defcustom} (@pxref{Customization}).
|
||||
symbol as a @dfn{global variable}---a variable that can be accessed at
|
||||
any point in a Lisp program. @xref{Variables}, for details about
|
||||
variables. To define a customizable variable, use the
|
||||
@code{defcustom} macro, which also calls @code{defvar} as a subroutine
|
||||
(@pxref{Customization}).
|
||||
|
||||
In principle, you can assign a variable value to any symbol with
|
||||
@code{setq}, whether not it has first been defined as a variable.
|
||||
However, you ought to write a variable definition for each global
|
||||
variable that you want to use; otherwise, your Lisp program may not
|
||||
act correctly if it is evaluated with lexical scoping enabled
|
||||
(@pxref{Variable Scoping}).
|
||||
|
||||
@code{defun} defines a symbol as a function, creating a lambda
|
||||
expression and storing it in the function cell of the symbol. This
|
||||
|
|
@ -171,15 +153,14 @@ both macro and function definitions are kept in the function cell, and
|
|||
that cell can hold only one Lisp object at any given time.
|
||||
@xref{Macros}.
|
||||
|
||||
In Emacs Lisp, a definition is not required in order to use a symbol
|
||||
as a variable or function. Thus, you can make a symbol a global
|
||||
variable with @code{setq}, whether you define it first or not. The real
|
||||
purpose of definitions is to guide programmers and programming tools.
|
||||
They inform programmers who read the code that certain symbols are
|
||||
@emph{intended} to be used as variables, or as functions. In addition,
|
||||
utilities such as @file{etags} and @file{make-docfile} recognize
|
||||
definitions, and add appropriate information to tag tables and the
|
||||
@file{DOC-@var{version}} file. @xref{Accessing Documentation}.
|
||||
As previously noted, Emacs Lisp allows the same symbol to be defined
|
||||
both as a variable (e.g.@: with @code{defvar}) and as a function or
|
||||
macro (e.g.@: with @code{defun}). Such definitions do not conflict.
|
||||
|
||||
These definition also act as guides for programming tools. For
|
||||
example, the @kbd{C-h f} and @kbd{C-h v} commands create help buffers
|
||||
containing links to the relevant variable, function, or macro
|
||||
definitions. @xref{Name Help,,, emacs, The GNU Emacs Manual}.
|
||||
|
||||
@node Creating Symbols, Property Lists, Definitions, Symbols
|
||||
@section Creating and Interning Symbols
|
||||
|
|
@ -254,8 +235,8 @@ not work---only @code{intern} can enter a symbol in an obarray properly.
|
|||
|
||||
@cindex CL note---symbol in obarrays
|
||||
@quotation
|
||||
@b{Common Lisp note:} In Common Lisp, a single symbol may be interned in
|
||||
several obarrays.
|
||||
@b{Common Lisp note:} Unlike Common Lisp, Emacs Lisp does not provide
|
||||
for interning a single symbol in several obarrays.
|
||||
@end quotation
|
||||
|
||||
Most of the functions below take a name and sometimes an obarray as
|
||||
|
|
@ -448,12 +429,13 @@ must be distinct.
|
|||
|
||||
Property lists are better than association lists for attaching
|
||||
information to various Lisp function names or variables. If your
|
||||
program keeps all of its associations in one association list, it will
|
||||
program keeps all such information in one association list, it will
|
||||
typically need to search that entire list each time it checks for an
|
||||
association. This could be slow. By contrast, if you keep the same
|
||||
information in the property lists of the function names or variables
|
||||
themselves, each search will scan only the length of one property list,
|
||||
which is usually short. This is why the documentation for a variable is
|
||||
association for a particular Lisp function name or variable, which
|
||||
could be slow. By contrast, if you keep the same information in the
|
||||
property lists of the function names or variables themselves, each
|
||||
search will scan only the length of one property list, which is
|
||||
usually short. This is why the documentation for a variable is
|
||||
recorded in a property named @code{variable-documentation}. The byte
|
||||
compiler likewise uses properties to record those functions needing
|
||||
special treatment.
|
||||
|
|
|
|||
|
|
@ -128,10 +128,10 @@ their meanings, and examples of their use.
|
|||
@deffn {Syntax class} @w{whitespace character}
|
||||
@dfn{Whitespace characters} (designated by @w{@samp{@ }} or @samp{-})
|
||||
separate symbols and words from each other. Typically, whitespace
|
||||
characters have no other syntactic significance, and multiple whitespace
|
||||
characters are syntactically equivalent to a single one. Space, tab,
|
||||
newline and formfeed are classified as whitespace in almost all major
|
||||
modes.
|
||||
characters have no other syntactic significance, and multiple
|
||||
whitespace characters are syntactically equivalent to a single one.
|
||||
Space, tab, and formfeed are classified as whitespace in almost all
|
||||
major modes.
|
||||
@end deffn
|
||||
|
||||
@deffn {Syntax class} @w{word constituent}
|
||||
|
|
@ -606,11 +606,13 @@ expression prefix syntax class, and characters with the @samp{p} flag.
|
|||
@section Parsing Expressions
|
||||
|
||||
This section describes functions for parsing and scanning balanced
|
||||
expressions, also known as @dfn{sexps}. Basically, a sexp is either a
|
||||
balanced parenthetical grouping, a string, or a symbol name (a
|
||||
sequence of characters whose syntax is either word constituent or
|
||||
symbol constituent). However, characters whose syntax is expression
|
||||
prefix are treated as part of the sexp if they appear next to it.
|
||||
expressions. We will refer to such expressions as @dfn{sexps},
|
||||
following the terminology of Lisp, even though these functions can act
|
||||
on languages other than Lisp. Basically, a sexp is either a balanced
|
||||
parenthetical grouping, a string, or a ``symbol'' (i.e.@: a sequence
|
||||
of characters whose syntax is either word constituent or symbol
|
||||
constituent). However, characters whose syntax is expression prefix
|
||||
are treated as part of the sexp if they appear next to it.
|
||||
|
||||
The syntax table controls the interpretation of characters, so these
|
||||
functions can be used for Lisp expressions when in Lisp mode and for C
|
||||
|
|
@ -830,10 +832,6 @@ The value is @code{nil} if @var{state} represents a parse which has
|
|||
arrived at a top level position.
|
||||
@end defun
|
||||
|
||||
We have provided this access function rather than document how the
|
||||
data is represented in the state, because we plan to change the
|
||||
representation in the future.
|
||||
|
||||
@node Low-Level Parsing
|
||||
@subsection Low-Level Parsing
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ the character after point.
|
|||
* Registers:: How registers are implemented. Accessing the text or
|
||||
position stored in a register.
|
||||
* Base 64:: Conversion to or from base 64 encoding.
|
||||
* MD5 Checksum:: Compute the MD5 "message digest"/"checksum".
|
||||
* Checksum/Hash:: Computing "message digests"/"checksums"/"hashes".
|
||||
* Parsing HTML:: Parsing HTML and XML.
|
||||
* Atomic Changes:: Installing several buffer changes "atomically".
|
||||
* Change Hooks:: Supplying functions to be run when text is changed.
|
||||
|
|
@ -218,44 +218,46 @@ This is like @code{buffer-substring}, except that it does not copy text
|
|||
properties, just the characters themselves. @xref{Text Properties}.
|
||||
@end defun
|
||||
|
||||
@defun filter-buffer-substring start end &optional delete noprops
|
||||
@defun filter-buffer-substring start end &optional delete
|
||||
This function passes the buffer text between @var{start} and @var{end}
|
||||
through the filter functions specified by the variable
|
||||
@code{buffer-substring-filters}, and returns the value from the last
|
||||
filter function. If @code{buffer-substring-filters} is @code{nil},
|
||||
the value is the unaltered text from the buffer, what
|
||||
@code{buffer-substring} would return.
|
||||
through the filter functions specified by the wrapper hook
|
||||
@code{filter-buffer-substring-functions}, and returns the final
|
||||
result of applying all filters. The obsolete variable
|
||||
@code{buffer-substring-filters} is also consulted. If both of these
|
||||
variables are @code{nil}, the value is the unaltered text from the
|
||||
buffer, as @code{buffer-substring} would return.
|
||||
|
||||
If @var{delete} is non-@code{nil}, this function deletes the text
|
||||
between @var{start} and @var{end} after copying it, like
|
||||
@code{delete-and-extract-region}.
|
||||
|
||||
If @var{noprops} is non-@code{nil}, the final string returned does not
|
||||
include text properties, while the string passed through the filters
|
||||
still includes text properties from the buffer text.
|
||||
|
||||
Lisp code should use this function instead of @code{buffer-substring},
|
||||
@code{buffer-substring-no-properties},
|
||||
or @code{delete-and-extract-region} when copying into user-accessible
|
||||
data structures such as the kill-ring, X clipboard, and registers.
|
||||
Major and minor modes can add functions to
|
||||
@code{buffer-substring-filters} to alter such text as it is copied out
|
||||
of the buffer.
|
||||
@code{filter-buffer-substring-functions} to alter such text as it is
|
||||
copied out of the buffer.
|
||||
@end defun
|
||||
|
||||
@defvar buffer-substring-filters
|
||||
This variable should be a list of functions that accept a single
|
||||
argument, a string, and return a string.
|
||||
@code{filter-buffer-substring} passes the buffer substring to the
|
||||
first function in this list, and the return value of each function is
|
||||
passed to the next function. The return value of the last function is
|
||||
used as the return value of @code{filter-buffer-substring}.
|
||||
@defvar filter-buffer-substring-functions
|
||||
This variable is a wrapper hook (@pxref{Running Hooks}), whose members
|
||||
should be functions that accept four arguments: @var{fun},
|
||||
@var{start}, @var{end}, and @var{delete}. @var{fun} is a function
|
||||
that takes three arguments (@var{start}, @var{end}, and @var{delete}),
|
||||
and returns a string. In both cases, the @var{start}, @var{end}, and
|
||||
@var{delete} arguments are the same as those of
|
||||
@code{filter-buffer-substring}.
|
||||
|
||||
As a special convention, point is set to the start of the buffer text
|
||||
being operated on (i.e., the @var{start} argument for
|
||||
@code{filter-buffer-substring}) before these functions are called.
|
||||
|
||||
If this variable is @code{nil}, no filtering is performed.
|
||||
The first hook function is passed a @var{fun} that is equivalent to
|
||||
the default operation of @code{filter-buffer-substring}, i.e. it
|
||||
returns the buffer-substring between @var{start} and @var{end}
|
||||
(processed by any @code{buffer-substring-filters}) and optionally
|
||||
deletes the original text from the buffer. In most cases, the hook
|
||||
function will call @var{fun} once, and then do its own processing of
|
||||
the result. The next hook function receives a @var{fun} equivalent to
|
||||
this, and so on. The actual return value is the result of all the
|
||||
hook functions acting in sequence.
|
||||
@end defvar
|
||||
|
||||
@defun buffer-string
|
||||
|
|
@ -500,6 +502,11 @@ syntax. (@xref{Abbrevs}, and @ref{Syntax Class Table}.) It is also
|
|||
responsible for calling @code{blink-paren-function} when the inserted
|
||||
character has close parenthesis syntax (@pxref{Blinking}).
|
||||
|
||||
@vindex post-self-insert-hook
|
||||
The final thing this command does is to run the hook
|
||||
@code{post-self-insert-hook}. You could use this to automatically
|
||||
reindent text as it is typed, for example.
|
||||
|
||||
Do not try substituting your own definition of
|
||||
@code{self-insert-command} for the standard one. The editor command
|
||||
loop handles this function specially.
|
||||
|
|
@ -3991,7 +3998,7 @@ changed in the future.
|
|||
@node Transposition
|
||||
@section Transposition of Text
|
||||
|
||||
This subroutine is used by the transposition commands.
|
||||
This function can be used to transpose stretches of text:
|
||||
|
||||
@defun transpose-regions start1 end1 start2 end2 &optional leave-markers
|
||||
This function exchanges two nonoverlapping portions of the buffer.
|
||||
|
|
@ -4064,9 +4071,11 @@ decoded text.
|
|||
The decoding functions ignore newline characters in the encoded text.
|
||||
@end defun
|
||||
|
||||
@node MD5 Checksum
|
||||
@section MD5 Checksum
|
||||
@node Checksum/Hash
|
||||
@section Checksum/Hash
|
||||
@cindex MD5 checksum
|
||||
@cindex hashing, secure
|
||||
@cindex SHA-1
|
||||
@cindex message digest computation
|
||||
|
||||
MD5 cryptographic checksums, or @dfn{message digests}, are 128-bit
|
||||
|
|
@ -4077,7 +4086,7 @@ RFC@footnote{
|
|||
For an explanation of what is an RFC, see the footnote in @ref{Base
|
||||
64}.
|
||||
}1321. This section describes the Emacs facilities for computing
|
||||
message digests.
|
||||
message digests and other forms of ``secure hash''.
|
||||
|
||||
@defun md5 object &optional start end coding-system noerror
|
||||
This function returns the MD5 message digest of @var{object}, which
|
||||
|
|
@ -4112,6 +4121,16 @@ using the specified or chosen coding system. However, if
|
|||
coding instead.
|
||||
@end defun
|
||||
|
||||
@defun secure-hash algorithm object &optional start end binary
|
||||
This function provides a general interface to a variety of secure
|
||||
hashing algorithms. As well as the MD5 algorithm, it supports SHA-1,
|
||||
SHA-2, SHA-224, SHA-256, SHA-384 and SHA-512. The argument
|
||||
@var{algorithm} is a symbol stating which hash to compute. The
|
||||
arguments @var{object}, @var{start}, and @var{end} are as for the
|
||||
@code{md5} function. If the optional argument @var{binary} is
|
||||
non-@code{nil}, returns a string in binary form.
|
||||
@end defun
|
||||
|
||||
@node Parsing HTML
|
||||
@section Parsing HTML
|
||||
@cindex parsing html
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -390,6 +390,7 @@ Evaluation
|
|||
* Forms:: How various sorts of objects are evaluated.
|
||||
* Quoting:: Avoiding evaluation (to put constants in
|
||||
the program).
|
||||
* Backquote:: Easier construction of list structure.
|
||||
* Eval:: How to invoke the Lisp interpreter explicitly.
|
||||
|
||||
Kinds of Forms
|
||||
|
|
@ -478,6 +479,7 @@ Functions
|
|||
* Anonymous Functions:: Lambda expressions are functions with no names.
|
||||
* Function Cells:: Accessing or setting the function definition
|
||||
of a symbol.
|
||||
* Closures:: Functions that enclose a lexical environment.
|
||||
* Obsolete Functions:: Declaring functions obsolete.
|
||||
* Inline Functions:: Defining functions that the compiler
|
||||
will open code.
|
||||
|
|
@ -500,7 +502,6 @@ Macros
|
|||
* Expansion:: How, when and why macros are expanded.
|
||||
* Compiling Macros:: How macros are expanded by the compiler.
|
||||
* Defining Macros:: How to write a macro definition.
|
||||
* Backquote:: Easier construction of list structure.
|
||||
* Problems with Macros:: Don't evaluate the macro arguments too many times.
|
||||
Don't hide the user's variables.
|
||||
* Indenting Macros:: Specifying how to indent macro calls.
|
||||
|
|
@ -567,7 +568,6 @@ Advising Emacs Lisp Functions
|
|||
* Preactivation:: Preactivation is a way of speeding up the
|
||||
loading of compiled advice.
|
||||
* Argument Access in Advice:: How advice can access the function's arguments.
|
||||
* Advising Primitives:: Accessing arguments when advising a primitive.
|
||||
* Combined Definition:: How advice is implemented.
|
||||
|
||||
Debugging Lisp Programs
|
||||
|
|
@ -1081,7 +1081,7 @@ Text
|
|||
* Registers:: How registers are implemented. Accessing
|
||||
the text or position stored in a register.
|
||||
* Base 64:: Conversion to or from base 64 encoding.
|
||||
* MD5 Checksum:: Compute the MD5 "message digest"/"checksum".
|
||||
* Checksum/Hash:: Computing "message digests"/"checksums"/"hashes".
|
||||
* Atomic Changes:: Installing several buffer changes "atomically".
|
||||
* Change Hooks:: Supplying functions to be run when text is changed.
|
||||
|
||||
|
|
@ -1372,6 +1372,7 @@ Images
|
|||
* Defining Images:: Convenient ways to define an image for later use.
|
||||
* Showing Images:: Convenient ways to display an image once
|
||||
it is defined.
|
||||
* Animated Images:: Some image formats can be animated.
|
||||
* Image Cache:: Internal mechanisms of image display.
|
||||
|
||||
Buttons
|
||||
|
|
|
|||
|
|
@ -389,6 +389,7 @@ Evaluation
|
|||
* Forms:: How various sorts of objects are evaluated.
|
||||
* Quoting:: Avoiding evaluation (to put constants in
|
||||
the program).
|
||||
* Backquote:: Easier construction of list structure.
|
||||
* Eval:: How to invoke the Lisp interpreter explicitly.
|
||||
|
||||
Kinds of Forms
|
||||
|
|
@ -477,6 +478,7 @@ Functions
|
|||
* Anonymous Functions:: Lambda expressions are functions with no names.
|
||||
* Function Cells:: Accessing or setting the function definition
|
||||
of a symbol.
|
||||
* Closures:: Functions that enclose a lexical environment.
|
||||
* Obsolete Functions:: Declaring functions obsolete.
|
||||
* Inline Functions:: Defining functions that the compiler
|
||||
will open code.
|
||||
|
|
@ -499,7 +501,6 @@ Macros
|
|||
* Expansion:: How, when and why macros are expanded.
|
||||
* Compiling Macros:: How macros are expanded by the compiler.
|
||||
* Defining Macros:: How to write a macro definition.
|
||||
* Backquote:: Easier construction of list structure.
|
||||
* Problems with Macros:: Don't evaluate the macro arguments too many times.
|
||||
Don't hide the user's variables.
|
||||
* Indenting Macros:: Specifying how to indent macro calls.
|
||||
|
|
@ -566,7 +567,6 @@ Advising Emacs Lisp Functions
|
|||
* Preactivation:: Preactivation is a way of speeding up the
|
||||
loading of compiled advice.
|
||||
* Argument Access in Advice:: How advice can access the function's arguments.
|
||||
* Advising Primitives:: Accessing arguments when advising a primitive.
|
||||
* Combined Definition:: How advice is implemented.
|
||||
|
||||
Debugging Lisp Programs
|
||||
|
|
@ -1080,7 +1080,7 @@ Text
|
|||
* Registers:: How registers are implemented. Accessing
|
||||
the text or position stored in a register.
|
||||
* Base 64:: Conversion to or from base 64 encoding.
|
||||
* MD5 Checksum:: Compute the MD5 "message digest"/"checksum".
|
||||
* Checksum/Hash:: Computing "message digests"/"checksums"/"hashes".
|
||||
* Atomic Changes:: Installing several buffer changes "atomically".
|
||||
* Change Hooks:: Supplying functions to be run when text is changed.
|
||||
|
||||
|
|
@ -1371,6 +1371,7 @@ Images
|
|||
* Defining Images:: Convenient ways to define an image for later use.
|
||||
* Showing Images:: Convenient ways to display an image once
|
||||
it is defined.
|
||||
* Animated Images:: Some image formats can be animated.
|
||||
* Image Cache:: Internal mechanisms of image display.
|
||||
|
||||
Buttons
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ partially-visible line at the bottom of the text area is not counted.
|
|||
@end defun
|
||||
|
||||
For compatibility with previous versions of Emacs,
|
||||
@code{window-height} is an alias for @code{window-body-height}, and
|
||||
@code{window-height} is an alias for @code{window-total-height}, and
|
||||
@code{window-width} is an alias for @code{window-body-width}. These
|
||||
aliases are considered obsolete and will be removed in the future.
|
||||
|
||||
|
|
@ -3104,9 +3104,9 @@ window configuration; see @ref{Frame Configurations}.
|
|||
@defun current-window-configuration &optional frame
|
||||
This function returns a new object representing @var{frame}'s current
|
||||
window configuration. The default for @var{frame} is the selected
|
||||
frame. This function saves copies of window parameters listed by the
|
||||
variable @code{window-persistent-parameters}, see @ref{Window
|
||||
Parameters} for details.
|
||||
frame. The variable @code{window-persistent-parameters} specifies
|
||||
whether and which window parameters are saved by this function, see
|
||||
@ref{Window Parameters} for details.
|
||||
@end defun
|
||||
|
||||
@defun set-window-configuration configuration
|
||||
|
|
@ -3214,27 +3214,25 @@ to clone the state of a frame into an arbitrary live window
|
|||
(@code{set-window-configuration} effectively clones the windows of a
|
||||
frame into the root window of that very frame only).
|
||||
|
||||
@defun window-state-get &optional window ignore
|
||||
@defun window-state-get &optional window writable
|
||||
This function returns the state of @var{window} as a Lisp object. The
|
||||
argument @var{window} can be any window and defaults to the root window
|
||||
of the selected frame.
|
||||
|
||||
If the optional argument @var{ignore} is non-@code{nil}, this means to
|
||||
If the optional argument @var{writable} is non-@code{nil}, this means to
|
||||
not use markers for sampling positions like @code{window-point} or
|
||||
@code{window-start}. This argument should be non-@code{nil} when the
|
||||
state shall be written on disk and read back in another session.
|
||||
state shall be written to disk and read back in another session.
|
||||
|
||||
The variable @code{window-persistent-parameters} specifies whether and
|
||||
which window parameters are saved by this function, see @ref{Window
|
||||
Parameters} for details.
|
||||
Together, the argument @var{writable} and the variable
|
||||
@code{window-persistent-parameters} specify which window parameters are
|
||||
saved by this function, see @ref{Window Parameters} for details.
|
||||
@end defun
|
||||
|
||||
The value returned by @code{window-state-get} can be converted, using
|
||||
one of the functions defined by Desktop Save Mode (@pxref{Desktop Save
|
||||
Mode}), to an object that can be written to a file. Such objects can be
|
||||
read back and converted to a Lisp object representing the state of the
|
||||
window. That Lisp object can be used as argument for the following
|
||||
function in order to restore the state window in another window.
|
||||
The value returned by @code{window-state-get} can be used in the same
|
||||
session to make a clone of a window in another window. It can be also
|
||||
written to disk and read back in another session. In either case, use
|
||||
the function described next to restore the state of the window.
|
||||
|
||||
@defun window-state-put state &optional window ignore
|
||||
This function puts the window state @var{state} into @var{window}. The
|
||||
|
|
@ -3281,10 +3279,10 @@ states of windows (@pxref{Window Configurations}) do not care about
|
|||
window parameters. This means, that when you change the value of a
|
||||
parameter within the body of a @code{save-window-excursion}, the
|
||||
previous value is not restored upon exit of that macro. It also means
|
||||
that when you clone via @code{window-state-put} a window state saved
|
||||
earlier by @code{window-state-get}, the cloned windows come up with no
|
||||
parameters at all. The following variable allows to override the
|
||||
standard behavior.
|
||||
that when you restore via @code{window-state-put} a window state saved
|
||||
earlier by @code{window-state-get}, all cloned windows have their
|
||||
parameters reset to @code{nil}. The following variable allows to
|
||||
override the standard behavior.
|
||||
|
||||
@defvar window-persistent-parameters
|
||||
This variable is an alist specifying which parameters get saved by
|
||||
|
|
@ -3293,32 +3291,25 @@ subsequently restored by @code{set-window-configuration} and
|
|||
@code{window-state-put}, see @ref{Window Configurations}.
|
||||
|
||||
The @sc{car} of each entry of this alist is the symbol specifying the
|
||||
parameter. The @sc{cdr} must be one of the following:
|
||||
parameter. The @sc{cdr} should be one of the following:
|
||||
|
||||
@table @asis
|
||||
@item @code{state}
|
||||
This value means the parameter is saved by @code{window-state-get}
|
||||
provided its @var{ignore} argument is @code{nil}. The function
|
||||
@code{current-window-configuration} does not save this parameter.
|
||||
|
||||
@item @code{nil}
|
||||
This value specifies that the parameter is saved by
|
||||
@code{current-window-configuration} and, provided its @var{ignore}
|
||||
argument is @code{nil}, by @code{window-state-get}.
|
||||
This value means the parameter is neither saved by
|
||||
@code{window-state-get} nor by @code{current-window-configuration}.
|
||||
|
||||
@item @code{t}
|
||||
This value specifies that the parameter is saved by
|
||||
@code{current-window-configuration} and, provided its @var{writable}
|
||||
argument is @code{nil}, by @code{window-state-get}.
|
||||
|
||||
@item @code{writable}
|
||||
This means that the parameter is saved unconditionally by both
|
||||
@code{current-window-configuration} and @code{window-state-get}. This
|
||||
value should not be used for parameters whose values do not have a read
|
||||
syntax. Otherwise, invoking @code{window-state-put} in another session
|
||||
may fail with an @code{invalid-read-syntax} error.
|
||||
@end table
|
||||
|
||||
Parameters that have been saved are restored to their previous values by
|
||||
@code{set-window-configuration} respectively are installed by
|
||||
@code{window-state-put}. Parameters that have not been saved are left
|
||||
alone by @code{set-window-configuration} respectively are not installed
|
||||
by @code{window-state-put}.
|
||||
@end defvar
|
||||
|
||||
Some functions, notably @code{delete-window},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
.\" See section COPYING for copyright and redistribution information.
|
||||
.TH EMACS 1 "2007 April 13" "GNU Emacs 24.0.92"
|
||||
.TH EMACS 1 "2007 April 13" "GNU Emacs 24.0.93"
|
||||
.
|
||||
.
|
||||
.SH NAME
|
||||
|
|
|
|||
|
|
@ -1,3 +1,38 @@
|
|||
2012-02-10 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* url.texi (Retrieving URLs): Update url-retrieve arguments.
|
||||
Mention url-queue-retrieve.
|
||||
|
||||
2012-02-09 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* sem-user.texi (Semantic mode user commands): Typo fix.
|
||||
|
||||
* info.texi (Create Info buffer): Mention info-display-manual.
|
||||
|
||||
2012-02-07 Lars Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* gnus.texi (Mail Source Specifiers): Add a pop3 via an SSH tunnel
|
||||
example (modified from an example by Michael Albinus).
|
||||
|
||||
2012-01-30 Philipp Haselwarter <philipp.haselwarter@gmx.de> (tiny change)
|
||||
|
||||
* gnus.texi (Agent Basics): Fix outdated description of
|
||||
`gnus-agent-auto-agentize-methods'.
|
||||
|
||||
2012-01-28 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* cc-mode.texi: Always @defindex ss.
|
||||
(Config Basics): Fix argument of @itemize.
|
||||
(Macro Backslashes): Add @code around index entry.
|
||||
|
||||
2012-01-23 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* pcl-cvs.texi (About PCL-CVS): Refer to vc-dir rather than vc-dired.
|
||||
|
||||
2012-01-19 Eric Hanchrow <eric.hanchrow@gmail.com>
|
||||
|
||||
* tramp.texi (File): Tweak wording for the `scpc' option.
|
||||
|
||||
2012-01-06 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* gnus.texi (Group Parameters): Really note precedence.
|
||||
|
|
|
|||
|
|
@ -147,10 +147,7 @@ CC Mode
|
|||
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
@comment Define an index for syntactic symbols.
|
||||
@ifnottex @c In texi2dvi, the @defindex would create an empty cc-mode.ss
|
||||
@c For Info, unlike tex, @syncodeindex needs a matching @defindex.
|
||||
@defindex ss
|
||||
@end ifnottex
|
||||
|
||||
@comment Combine key, syntactic symbol and concept indices into one.
|
||||
@syncodeindex ss cp
|
||||
|
|
@ -2200,7 +2197,7 @@ method, ``Top-level commands or the customization interface''.
|
|||
|
||||
If you make conflicting settings in several of these ways, the way
|
||||
that takes precedence is the one that appears latest in this list:
|
||||
@itemize @asis
|
||||
@itemize @w{}
|
||||
@item
|
||||
@table @asis
|
||||
@item Style
|
||||
|
|
@ -6661,7 +6658,7 @@ these macros properly, see @ref{Macros with ;}.
|
|||
@node Macro Backslashes, Macros with ;, Custom Macros, Custom Macros
|
||||
@comment node-name, next, previous, up
|
||||
@section Customizing Macro Backslashes
|
||||
@cindex #define
|
||||
@cindex @code{#define}
|
||||
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
@ccmode{} provides some tools to help keep the line continuation
|
||||
|
|
|
|||
|
|
@ -14751,6 +14751,18 @@ corresponding keywords.
|
|||
A script to be run before fetching the mail. The syntax is the same as
|
||||
the @code{:program} keyword. This can also be a function to be run.
|
||||
|
||||
One popular way to use this is to set up an SSH tunnel to access the
|
||||
@acronym{POP} server. Here's an example:
|
||||
|
||||
@lisp
|
||||
(pop :server "127.0.0.1"
|
||||
:port 1234
|
||||
:user "foo"
|
||||
:password "secret"
|
||||
:prescript
|
||||
"nohup ssh -f -L 1234:pop.server:110 remote.host sleep 3600 &")
|
||||
@end lisp
|
||||
|
||||
@item :postscript
|
||||
A script to be run after fetching the mail. The syntax is the same as
|
||||
the @code{:program} keyword. This can also be a function to be run.
|
||||
|
|
@ -18236,8 +18248,7 @@ Agent. Go to the server buffer (@kbd{^} in the group buffer) and press
|
|||
@kbd{J a} on the server (or servers) that you wish to have covered by the
|
||||
Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
|
||||
added servers you do not wish to have covered by the Agent. By default,
|
||||
all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
|
||||
@code{gnus-secondary-select-methods} are agentized.
|
||||
no servers are agentized.
|
||||
|
||||
@item
|
||||
Decide on download policy. It's fairly simple once you decide whether
|
||||
|
|
@ -19263,7 +19274,7 @@ to agentize remote back ends. The auto-agentizing has the same effect
|
|||
as running @kbd{J a} on the servers (@pxref{Server Agent Commands}).
|
||||
If the file exist, you must manage the servers manually by adding or
|
||||
removing them, this variable is only applicable the first time you
|
||||
start Gnus. The default is @samp{(nntp nnimap)}.
|
||||
start Gnus. The default is @samp{nil}.
|
||||
|
||||
@end table
|
||||
|
||||
|
|
|
|||
|
|
@ -1142,6 +1142,12 @@ prefix argument for the @kbd{C-h i} command (@code{info}) which
|
|||
switches to the Info buffer with that number. Thus, @kbd{C-u 2 C-h i}
|
||||
switches to the buffer @samp{*info*<2>}, creating it if necessary.
|
||||
|
||||
@findex info-display-manual
|
||||
If you have created many Info buffers in Emacs, you might find it
|
||||
difficult to remember which buffer is showing which manual. You can
|
||||
use the command @kbd{M-x info-display-manual} to show an Info manual
|
||||
by name, reusing an existing buffer if there is one.
|
||||
|
||||
@node Emacs Info Variables, , Create Info buffer, Advanced
|
||||
@comment node-name, next, previous, up
|
||||
@section Emacs Info-mode Variables
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
@c %**end of header
|
||||
|
||||
@copying
|
||||
Copyright @copyright{} 1991-2012
|
||||
Free Software Foundation, Inc.
|
||||
Copyright @copyright{} 1991-2012 Free Software Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
|
|
@ -136,10 +135,9 @@ Customization
|
|||
PCL-CVS is a front-end to CVS versions 1.9 and later.
|
||||
It concisely shows the present status of a checked out module in an
|
||||
Emacs buffer and provides single-key access to the most frequently used CVS
|
||||
commands.
|
||||
For Emacs users accustomed to VC, PCL-CVS can be thought of as a replacement
|
||||
for VC-dired (@pxref{VC Directory Mode, , , emacs, The GNU
|
||||
Emacs Manual}) specifically designed for CVS.
|
||||
commands. Note that the @code{vc-dir} command (@pxref{VC Directory
|
||||
Mode, , , emacs, The GNU Emacs Manual}) provides similar
|
||||
functionality, but for several version control systems, including CVS.
|
||||
|
||||
PCL-CVS was originally written many years ago by Per Cederqvist who
|
||||
proudly maintained it until January 1996, at which point he released the
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ Copy the current tag into a register
|
|||
kill it as well. This allows you to insert or jump to that tag with
|
||||
the usual register commands. @xref{Registers,,,emacs,Emacs manual}.
|
||||
|
||||
@item \C-c , @kbd{up}
|
||||
@item C-c , @kbd{up}
|
||||
Transpose the current tag with the previous one
|
||||
(@code{senator-transpose-tags-up}).
|
||||
|
||||
|
|
|
|||
|
|
@ -866,13 +866,22 @@ Newer versions of @option{ssh} (for example OpenSSH 4) offer an option
|
|||
@option{ControlMaster}. This allows @option{scp} to reuse an existing
|
||||
@option{ssh} channel, which increases performance.
|
||||
|
||||
Before you use this method, you shall check whether your @option{ssh}
|
||||
implementation does support this option. Try from the command line
|
||||
Before you use this method, you should check whether your @option{ssh}
|
||||
implementation supports this option. Try from the command line
|
||||
|
||||
@example
|
||||
ssh localhost -o ControlMaster=yes
|
||||
ssh localhost -o ControlMaster=yes /bin/true
|
||||
@end example
|
||||
|
||||
If that command succeeds silently, then you can use @option{scpc}; but
|
||||
if it fails like
|
||||
|
||||
@example
|
||||
command-line: line 0: Bad configuration option: ControlMaster
|
||||
@end example
|
||||
|
||||
then you cannot use it.
|
||||
|
||||
This method supports the @samp{-p} argument.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -201,13 +201,25 @@ data. @var{url} is either a string or a parsed URL structure. Return
|
|||
info, or mailto URLs that need no further processing).
|
||||
@end defun
|
||||
|
||||
@defun url-retrieve url callback &optional cbargs
|
||||
@defun url-retrieve url callback &optional cbargs silent no-cookies
|
||||
Retrieve @var{url} asynchronously and call @var{callback} with args
|
||||
@var{cbargs} when finished. The callback is called when the object
|
||||
has been completely retrieved, with the current buffer containing the
|
||||
object and any MIME headers associated with it. @var{url} is either a
|
||||
string or a parsed URL structure. Returns the buffer @var{url} will
|
||||
load into, or @code{nil} if the process has already completed.
|
||||
If the optional argument @var{silent} is non-@code{nil}, suppress
|
||||
progress messages. If the optional argument @var{no-cookies} is
|
||||
non-@code{nil}, do not store or send cookies.
|
||||
@end defun
|
||||
|
||||
@vindex url-queue-parallel-processes
|
||||
@vindex url-queue-timeout
|
||||
@defun url-queue-retrieve url callback &optional cbargs silent no-cookies
|
||||
This acts like the @code{url-retrieve} function, but with limits on
|
||||
the degree of parallelism. The option @code{url-queue-parallel-processes}
|
||||
controls the number of concurrent processes, and the option
|
||||
@code{url-queue-timeout} sets a timeout in seconds.
|
||||
@end defun
|
||||
|
||||
@node Supported URL Types
|
||||
|
|
|
|||
279
etc/AUTHORS
279
etc/AUTHORS
|
|
@ -90,7 +90,7 @@ Aleksei Gusev: changed progmodes/compile.el
|
|||
Alex Coventry: changed files.el
|
||||
|
||||
Alex Harsanyi: changed soap-client.el emacs3.py soap-inspect.el
|
||||
vc-hooks.el vc.el
|
||||
vc-hooks.el vc.el xml.el
|
||||
|
||||
Alex Ott: changed TUTORIAL.ru ru-refcard.tex ispell.el ru-refcard.ps
|
||||
|
||||
|
|
@ -195,9 +195,9 @@ Andreas Politz: changed editfns.c elp.el ido.el term.el
|
|||
Andreas Rottmann: changed emacsclient.1 emacsclient.c misc.texi server.el
|
||||
|
||||
Andreas Schwab: changed Makefile.in configure.in lisp.h xdisp.c alloc.c
|
||||
process.c coding.c files.el xterm.c editfns.c keyboard.c fns.c print.c
|
||||
emacs.c eval.c fileio.c lread.c sysdep.c dired.el xfns.c buffer.c
|
||||
and 571 other files
|
||||
process.c coding.c files.el keyboard.c xterm.c editfns.c emacs.c fns.c
|
||||
print.c eval.c fileio.c lread.c sysdep.c dired.el xfns.c buffer.c
|
||||
and 573 other files
|
||||
|
||||
Andreas Seltenreich: changed nnweb.el gnus.texi message.el gnus-sum.el
|
||||
gnus.el nnslashdot.el gnus-srvr.el gnus-util.el mm-url.el mm-uu.el
|
||||
|
|
@ -253,9 +253,9 @@ Anna M. Bigatti: wrote cal-html.el
|
|||
|
||||
Antoine Levitt: changed gnus-group.el gnus-sum.el message.texi ada-prj.el
|
||||
ange-ftp.el cus-edit.el dired-x.el ebnf2ps.el emerge.el erc-button.el
|
||||
erc-track.el files.el find-file.el gnus-art.el gnus-uu.el gnus.el
|
||||
gnus.texi message.el mh-funcs.el mh-mime.el printing.el
|
||||
and 5 other files
|
||||
erc-goodies.el erc-track.el files.el find-file.el gnus-art.el
|
||||
gnus-uu.el gnus.el gnus.texi message.el mh-funcs.el mh-mime.el
|
||||
and 7 other files
|
||||
|
||||
Ari Roponen: changed atimer.c doc.c mule.texi startup.el time-date.el
|
||||
|
||||
|
|
@ -296,11 +296,11 @@ Barry Fishman: changed gnu-linux.h
|
|||
|
||||
Bastien Guerry: wrote gnus-bookmark.el org-latex.el org-protocol.el
|
||||
and co-wrote org-bibtex.el org-list.el org-src.el
|
||||
and changed org.el org-html.el org-agenda.el org-clock.el org-exp.el
|
||||
org-capture.el org-timer.el org-export-latex.el org-table.el
|
||||
org-publish.el org.texi org-ascii.el bookmark.el info.el ob.el
|
||||
org-archive.el org-attach.el org-crypt.el org-gnus.el org-mobile.el
|
||||
rmail.el and 20 other files
|
||||
and changed org.el org-agenda.el org-html.el org-clock.el org-exp.el
|
||||
org.texi org-table.el org-capture.el org-publish.el org-timer.el
|
||||
org-export-latex.el org-archive.el ob.el org-ascii.el org-mobile.el
|
||||
bookmark.el info.el org-attach.el org-colview.el org-crypt.el
|
||||
org-eshell.el and 31 other files
|
||||
|
||||
Ben A. Mesander: co-wrote erc-dcc.el
|
||||
|
||||
|
|
@ -332,7 +332,7 @@ and changed vc.el gnus-msg.el message.el diff-mode.el ffap.el nnimap.el
|
|||
Bernhard Herzog: changed vc-hg.el menu.c xsmfns.c
|
||||
|
||||
Bernt Hansen: changed org-agenda.el org-clock.el org.el org-capture.el
|
||||
org-indent.el
|
||||
org-html.el org-indent.el org.texi
|
||||
|
||||
Bill Atkins: changed wdired.el
|
||||
|
||||
|
|
@ -431,7 +431,7 @@ Brian Preble: changed abbrev.el apropos.el asm-mode.el awk-mode.el
|
|||
compare-w.el compile.el dabbrev.el debug.el diary.el diff.el dired.el
|
||||
doctex.el doctor.el ebuff-menu.el echistory.el and 129 other files
|
||||
|
||||
Brian Sniffen: changed gnus-draft.el
|
||||
Brian Sniffen: changed gnus-draft.el mm-decode.el
|
||||
|
||||
Brian T. Sniffen: changed imap.el
|
||||
|
||||
|
|
@ -469,7 +469,7 @@ and changed org-latex.el org.texi org-publish.el orgcard.tex
|
|||
org-export-latex.el org-colview-xemacs.el org-docbook.el org-attach.el
|
||||
org-mouse.el org-protocol.el org-mac-message.el org-wl.el org-crypt.el
|
||||
org-freemind.el idlw-rinfo.el org-exp-blocks.el org-habit.el org-mhe.el
|
||||
org-plot.el reftex.texi ob.el and 24 other files
|
||||
org-plot.el org-special-blocks.el reftex.texi and 24 other files
|
||||
|
||||
Caveh Jalali: changed configure.in intel386.h sol2-4.h
|
||||
|
||||
|
|
@ -497,16 +497,17 @@ Chip Coldwell: changed font.c
|
|||
Chong Yidong: wrote compile-tests.el dichromacy-theme.el
|
||||
font-parse-tests.el redisplay-testsuite.el tabulated-list.el
|
||||
and co-wrote longlines.el tango-dark-theme.el tango-theme.el
|
||||
and changed xdisp.c simple.el files.el display.texi frames.texi
|
||||
cus-edit.el files.texi keyboard.c startup.el package.el custom.el
|
||||
emacs.texi xterm.c subr.el text.texi faces.el image.c mouse.el
|
||||
misc.texi progmodes/compile.el xfns.c and 830 other files
|
||||
and changed xdisp.c simple.el display.texi files.el frames.texi
|
||||
cus-edit.el files.texi keyboard.c startup.el custom.el package.el
|
||||
text.texi emacs.texi misc.texi xterm.c faces.el subr.el image.c
|
||||
mouse.el custom.texi progmodes/compile.el and 837 other files
|
||||
|
||||
Chris Chase: co-wrote idlw-shell.el idlwave.el
|
||||
|
||||
Chris Foote: changed progmodes/python.el
|
||||
|
||||
Chris Gray: wrote org-special-blocks.el
|
||||
and changed mm-decode.el
|
||||
|
||||
Chris Hall: changed callproc.c frame.c
|
||||
|
||||
|
|
@ -544,7 +545,7 @@ Christian Lynbech: changed appt.el emacsserver.c tramp.el
|
|||
|
||||
Christian Millour: changed shell.el
|
||||
|
||||
Christian Moe: changed org-bbdb.el
|
||||
Christian Moe: changed org-bbdb.el org-html.el org-special-blocks.el
|
||||
|
||||
Christian Neukirchen: changed mm-util.el
|
||||
|
||||
|
|
@ -573,10 +574,14 @@ Christoph Wedler: wrote antlr-mode.el
|
|||
and changed format.el gnus-art.el gnus-picon.el message.el register.el
|
||||
smiley.el texinfmt.el
|
||||
|
||||
Christophe Rhodes: changed org-exp.el
|
||||
|
||||
Christophe de Dinechin: co-wrote ns-win.el
|
||||
|
||||
Christopher Allan Webber: changed gamegrid.el org-agenda.el tetris.el
|
||||
|
||||
Christopher Genovese: changed assoc.el
|
||||
|
||||
Christopher J. Madsen: wrote decipher.el
|
||||
and changed replace.el files.el ispell.el time.el
|
||||
|
||||
|
|
@ -660,7 +665,7 @@ and changed vc.el Makefile.in configure.in vc-hg.el vc-git.el vc-bzr.el
|
|||
|
||||
Dan Rosenberg: changed movemail.c
|
||||
|
||||
Dani Moncayo: changed lists.texi
|
||||
Dani Moncayo: changed lists.texi buffers.texi text.texi
|
||||
|
||||
Daniel Brockman: changed cus-start.el format-spec.el ibuffer.el rcirc.el
|
||||
|
||||
|
|
@ -668,8 +673,8 @@ Daniel Clemente: changed generic-x.el org-html.el
|
|||
|
||||
Daniel Colascione: co-wrote js.el
|
||||
and changed cmdproxy.c subr.el syntax.el DEBUG cc-engine.el cus-start.el
|
||||
eval.c fns.c imenu.el keyboard.c lisp.h nxml-mode.el nxml-rap.el
|
||||
nxml-util.el sh-script.el which-func.el
|
||||
eval.c fns.c frames.texi imenu.el keyboard.c lisp.h nxml-mode.el
|
||||
nxml-rap.el nxml-util.el sh-script.el which-func.el
|
||||
|
||||
Daniel Dehennin: changed mml2015.el gnus-msg.el mm-decode.el
|
||||
|
||||
|
|
@ -699,7 +704,7 @@ Daniel Ortmann: changed paragraphs.el
|
|||
Daniel Pfeiffer: wrote conf-mode.el copyright.el executable.el
|
||||
sh-script.el skeleton.el two-column.el
|
||||
and co-wrote ada-stmt.el apropos.el progmodes/compile.el wyse50.el
|
||||
and changed files.el make-mode.el buff-menu.el font-lock.el mpuz.el
|
||||
and changed make-mode.el files.el buff-menu.el font-lock.el mpuz.el
|
||||
progmodes/grep.el sgml-mode.el autoinsert.el cperl-mode.el facemenu.el
|
||||
gomoku.el help.el imenu.el autoload.el autorevert.el bindings.el
|
||||
button.el cc-fonts.el cc-mode.el compilation.txt compile.el
|
||||
|
|
@ -722,8 +727,8 @@ Darren Stalder: changed gnus-util.el
|
|||
|
||||
Darrin B. Jewell: changed etags.c lisp.h
|
||||
|
||||
Dave Abrahams: changed gnus-registry.el gnus-sum.el gnus.texi nnimap.el
|
||||
nnir.el nnmairix.el nnregistry.el
|
||||
Dave Abrahams: changed gnus-sum.el org-agenda.el gnus-registry.el
|
||||
gnus.texi nnimap.el nnir.el nnmairix.el nnregistry.el org-clock.el
|
||||
|
||||
Dave Detlefs: co-wrote cc-align.el cc-cmds.el cc-defs.el cc-engine.el
|
||||
cc-langs.el cc-menus.el cc-mode.el cc-styles.el cc-vars.el
|
||||
|
|
@ -749,6 +754,8 @@ David Abrahams: changed coding.c ediff-init.el mairix.el
|
|||
|
||||
David Bakhash: wrote strokes.el
|
||||
|
||||
David Benjamin: changed xfns.c xterm.c xterm.h
|
||||
|
||||
David Burger: changed macros.el
|
||||
|
||||
David Byers: changed minibuf.c
|
||||
|
|
@ -762,11 +769,11 @@ David Edmondson: changed message.el gnus-cite.el imap.el mm-view.el
|
|||
mml2015.el nnfolder.el nnimap.el nnml.el
|
||||
|
||||
David Engster: wrote mairix.el nnmairix.el
|
||||
and changed gnus.texi registry.el gnus-msg.el insert.el
|
||||
and changed gnus.texi insert.el registry.el gnus-msg.el
|
||||
analyze/complete.el base.el bovine-grammar.el cedet/srecode.el
|
||||
cpp-root.el custom.el db-find.el db-typecache.el db.el dictionary.el
|
||||
display.texi document.el ede-grammar.el files.el generic.el
|
||||
gnus-registry.el gnus-sum.el and 21 other files
|
||||
display.texi document.el ede-grammar.el files.el filters.el generic.el
|
||||
gnus-registry.el and 22 other files
|
||||
|
||||
David Gillespie: wrote calc-aent.el calc-alg.el calc-arith.el calc-bin.el
|
||||
calc-comb.el calc-cplx.el calc-embed.el calc-ext.el calc-fin.el
|
||||
|
|
@ -824,11 +831,11 @@ David M. Smith: wrote ielm.el
|
|||
and changed imenu.el pgg-def.el xterm.c
|
||||
|
||||
David Maus: co-wrote org-wl.el
|
||||
and changed org.el org-feed.el org-html.el org-agenda.el org-exp.el
|
||||
org-gnus.el org-capture.el org.texi org-protocol.el org-macs.el
|
||||
ob-haskell.el org-bibtex.el org-footnote.el org-id.el org-latex.el
|
||||
org-list.el org-mhe.el org-mobile.el org-publish.el org-table.el ob.el
|
||||
and 13 other files
|
||||
and changed org.el org-agenda.el org-feed.el org-html.el org-macs.el
|
||||
org-exp.el org.texi org-gnus.el org-capture.el org-protocol.el
|
||||
org-publish.el ob-haskell.el ob.el org-bibtex.el org-clock.el
|
||||
org-compat.el org-footnote.el org-id.el org-latex.el org-list.el
|
||||
org-mhe.el and 18 other files
|
||||
|
||||
David McCabe: changed lisp-mode.el
|
||||
|
||||
|
|
@ -859,9 +866,9 @@ and changed w32menu.c w32term.c close.png close.xpm empty.png empty.xpm
|
|||
|
||||
David Reitter: wrote mailclient.el
|
||||
and changed nsterm.m nsfns.m ns-win.el nsfont.m Makefile.in cus-start.el
|
||||
macos.texi menu-bar.el simple.el commands.h cus-edit.el easy-mmode.el
|
||||
emacsbug.el emacsclient.c faces.el flyspell.el info.el keyboard.c
|
||||
keymap.c macterm.c menu.c and 12 other files
|
||||
macos.texi menu-bar.el nsmenu.m simple.el commands.h cus-edit.el
|
||||
easy-mmode.el emacsbug.el emacsclient.c faces.el flyspell.el info.el
|
||||
keyboard.c keymap.c macterm.c and 12 other files
|
||||
|
||||
David Robinow: changed makefile.w32-in w32inevt.c
|
||||
|
||||
|
|
@ -971,10 +978,10 @@ Drake Wilson: changed emacsclient.c files.el misc.texi
|
|||
|
||||
Drew Adams: wrote light-blue-theme.el
|
||||
and co-wrote color.el
|
||||
and changed cus-edit.el dired.el faces.el isearch.el menu-bar.el mouse.el
|
||||
bindings.el bookmark.el custom.el dired.texi etags.el files.el
|
||||
finder.el frame.el help-fns.el help.el image-dired.el info.el
|
||||
modes.texi msdog.texi pp.el and 5 other files
|
||||
and changed cus-edit.el dired.el faces.el files.el isearch.el menu-bar.el
|
||||
mouse.el ange-ftp.el bindings.el bookmark.el custom.el descr-text.el
|
||||
dired.texi etags.el finder.el frame.el help-fns.el help.el
|
||||
image-dired.el info.el modes.texi and 7 other files
|
||||
|
||||
E. Jay Berkenbilt: changed b2m.c flyspell.el ispell.el unrmail.el
|
||||
whitespace.el window.h
|
||||
|
|
@ -983,7 +990,7 @@ Ed L. Cashin: changed gnus-sum.el imap.el
|
|||
|
||||
Ed Swarthout: changed hexl.el textmodes/table.el
|
||||
|
||||
Eduard Wiebe: changed browse-url.el dired.el flymake.texi footnote.el
|
||||
Eduard Wiebe: changed dired.el browse-url.el flymake.texi footnote.el
|
||||
javascript.el korean.el locate.el mule-conf.el nxml-mode.texi
|
||||
objects.texi ps-print.el vc-rcs.el
|
||||
|
||||
|
|
@ -1022,14 +1029,14 @@ Eli Tziperman: wrote rmail-spam-filter.el
|
|||
Eli Zaretskii: wrote [bidirectional display in xdisp.c] bidi.c rxvt.el
|
||||
tty-colors.el
|
||||
and changed makefile.w32-in msdos.c xdisp.c Makefile.in files.el
|
||||
config.bat fileio.c msdos.h simple.el mainmake.v2 sed1v2.inp info.el
|
||||
display.texi rmail.el w32.c process.c pc-win.el startup.el dispextern.h
|
||||
dispnew.c dired.c and 697 other files
|
||||
config.bat fileio.c simple.el msdos.h info.el mainmake.v2 rmail.el
|
||||
sed1v2.inp display.texi w32.c process.c pc-win.el dispnew.c startup.el
|
||||
dispextern.h dired.c and 697 other files
|
||||
|
||||
Elias Oltmanns: changed tls.el gnus-agent.el gnus-int.el gnus-srvr.el
|
||||
gnus.el
|
||||
|
||||
Elias Pipping: changed XDelAssoc.c XMakeAssoc.c
|
||||
Elias Pipping: changed XDelAssoc.c XMakeAssoc.c shr.el
|
||||
|
||||
Emanuele Giaquinta: changed configure.in rxvt.el charset.c etags.c
|
||||
fontset.c frame.el gnus-faq.texi loadup.el lread.c sh-script.el
|
||||
|
|
@ -1060,7 +1067,8 @@ Eric Eide: changed gnus-xmas.el
|
|||
|
||||
Eric Hanchrow: changed vc-git.el TUTORIAL.es abbrev.el autorevert.el
|
||||
cperl-mode.el delphi.el dired.el emacsclient.c env.el erc.el
|
||||
frames.texi ibuf-ext.el ispell.el ldap.el make-dist
|
||||
frames.texi ibuf-ext.el ispell.el ldap.el make-dist tramp.texi
|
||||
window.el
|
||||
|
||||
Éric Jacoboni: changed fr-refcard.tex
|
||||
|
||||
|
|
@ -1120,10 +1128,11 @@ Eric Schulte: wrote ob-C.el ob-asymptote.el ob-awk.el ob-calc.el
|
|||
ob-comint.el ob-css.el ob-ditaa.el ob-dot.el ob-emacs-lisp.el
|
||||
ob-eval.el ob-gnuplot.el ob-haskell.el ob-java.el ob-js.el ob-keys.el
|
||||
ob-latex.el ob-ocaml.el ob-org.el ob-ruby.el ob-sass.el ob-scheme.el
|
||||
ob-sh.el ob-sql.el ob-sqlite.el ob-table.el ob-tangle.el
|
||||
ob-sh.el ob-shen.el ob-sql.el ob-sqlite.el ob-table.el ob-tangle.el
|
||||
org-exp-blocks.el org-plot.el
|
||||
and co-wrote ob-R.el ob-clojure.el ob-exp.el ob-lisp.el ob-lob.el
|
||||
ob-maxima.el ob-perl.el ob-python.el ob-ref.el ob.el org-bibtex.el
|
||||
and co-wrote ob-R.el ob-clojure.el ob-exp.el ob-fortran.el ob-lisp.el
|
||||
ob-lob.el ob-maxima.el ob-perl.el ob-picolisp.el ob-python.el ob-ref.el
|
||||
ob.el org-bibtex.el
|
||||
and changed org.texi org.el org-exp.el org-latex.el ob-plantuml.el
|
||||
org-table.el org-macs.el org-src.el orgcard.tex ob-lilypond.el
|
||||
ob-mscgen.el ob-octave.el ob-screen.el org-agenda.el org-ascii.el
|
||||
|
|
@ -1327,7 +1336,8 @@ Glenn Morris: wrote check-declare.el f90.el vc-bzr.el
|
|||
and changed Makefile.in configure.in calendar.el diary-lib.el rmail.el
|
||||
files.el cal-menu.el appt.el cal-hebrew.el fortran.el bytecomp.el
|
||||
holidays.el make-dist calendar.texi emacs.texi simple.el sed1v2.inp
|
||||
cal-islam.el cal-bahai.el startup.el ack.texi and 1208 other files
|
||||
cal-islam.el cal-bahai.el makefile.w32-in dired-x.el
|
||||
and 1210 other files
|
||||
|
||||
Glynn Clements: wrote gamegrid.el snake.el tetris.el
|
||||
|
||||
|
|
@ -1417,6 +1427,8 @@ Hiroshi Fujishima: changed faq.texi gnus-score.el mail-source.el
|
|||
|
||||
Hiroshi Nakano: changed ralloc.c unexelf.c
|
||||
|
||||
Hiroshi Oota: changed coding.c
|
||||
|
||||
Hoan Ton-That: changed erc-log.el
|
||||
|
||||
Holger Schauer: wrote fortune.el
|
||||
|
|
@ -1517,8 +1529,10 @@ Jacques Duthen: co-wrote ps-print.el ps-samp.el
|
|||
|
||||
Jaeyoun Chung: changed hangul3.el hanja3.el gnus-mule.el hangul.el
|
||||
|
||||
Jambunathan K: changed org.el org-exp.el org.texi indian.el
|
||||
org-footnote.el org-html.el package-x.el tar-mode.el
|
||||
Jambunathan K: wrote org-lparse.el org-odt.el
|
||||
and changed org.el org-exp.el org-inlinetask.el org.texi
|
||||
OrgOdtContentTemplate.xml OrgOdtStyles.xml indian.el org-footnote.el
|
||||
org-html.el package-x.el tar-mode.el
|
||||
|
||||
James Clark: wrote nxml-enc.el nxml-glyph.el nxml-maint.el nxml-mode.el
|
||||
nxml-ns.el nxml-outln.el nxml-parse.el nxml-rap.el nxml-uchnm.el
|
||||
|
|
@ -1556,9 +1570,9 @@ Jan Böker: changed org.el
|
|||
|
||||
Jan Djärv: wrote dnd.el dynamic-setting.el x-dnd.el
|
||||
and changed gtkutil.c xterm.c xfns.c configure.in xmenu.c xterm.h
|
||||
gtkutil.h x-win.el keyboard.c Makefile.in nsterm.m frames.texi
|
||||
xsettings.c frame.c emacs.c xselect.c process.c xlwmenu.c config.in
|
||||
cus-start.el nsfns.m and 302 other files
|
||||
gtkutil.h nsterm.m x-win.el keyboard.c Makefile.in frames.texi
|
||||
xsettings.c emacs.c frame.c nsfns.m xselect.c process.c xlwmenu.c
|
||||
config.in cus-start.el and 302 other files
|
||||
|
||||
Jan Moringen: co-wrote srecode/cpp.el tango-dark-theme.el tango-theme.el
|
||||
and changed dbus.el dbus.texi dbusbind.c eieio.el log-edit.el zeroconf.el
|
||||
|
|
@ -1771,7 +1785,7 @@ John Heidemann: wrote mouse-copy.el mouse-drag.el
|
|||
|
||||
John Hughes: changed term.c
|
||||
|
||||
John J Foerch: changed erc-stamp.el progmodes/compile.el
|
||||
John J Foerch: changed erc-stamp.el org.el progmodes/compile.el
|
||||
|
||||
John Mongan: changed f90.el
|
||||
|
||||
|
|
@ -1867,15 +1881,17 @@ Juan Pechiar: wrote ob-mscgen.el
|
|||
and changed ob-octave.el
|
||||
|
||||
Juanma Barranquero: wrote emacs-lock.el
|
||||
and changed makefile.w32-in subr.el w32fns.c files.el server.el bs.el
|
||||
emacsclient.c help-fns.el faces.el org.el simple.el buffer.c xdisp.c
|
||||
keyboard.c process.c w32term.c window.c desktop.el ido.el allout.el
|
||||
eval.c and 1084 other files
|
||||
and changed makefile.w32-in subr.el w32fns.c files.el server.el
|
||||
emacsclient.c bs.el help-fns.el faces.el org.el simple.el buffer.c
|
||||
xdisp.c keyboard.c desktop.el process.c w32term.c window.c ido.el w32.c
|
||||
allout.el and 1086 other files
|
||||
|
||||
Juergen Kreileder: changed imap.el nnimap.el
|
||||
|
||||
Juergen Nickelsen: wrote ws-mode.el
|
||||
|
||||
Julian Gehring: changed org.texi orgcard.tex
|
||||
|
||||
Julian Scheid: changed tramp.el
|
||||
|
||||
Julien Avarre: changed gnus-fun.el
|
||||
|
|
@ -1887,7 +1903,7 @@ Julien Danjou: wrote gnus-gravatar.el gravatar.el notifications.el
|
|||
and co-wrote color.el
|
||||
and changed shr.el org-agenda.el gnus-art.el gnus-html.el gnus.el
|
||||
mm-decode.el gnus-group.el gnus-util.el message.el org.el gnus-sum.el
|
||||
gnus.texi mm-view.el mm-uu.el nnimap.el nnir.el sieve-manage.el
|
||||
gnus.texi mm-view.el nnimap.el mm-uu.el nnir.el sieve-manage.el
|
||||
color-lab.el url-cache.el auth-source.el gnus-ems.el and 82 other files
|
||||
|
||||
Julien Gilles: wrote gnus-ml.el
|
||||
|
|
@ -1901,7 +1917,7 @@ and changed info.el isearch.el simple.el replace.el progmodes/grep.el
|
|||
dired-aux.el progmodes/compile.el dired.el startup.el faces.el files.el
|
||||
display.texi menu-bar.el descr-text.el bindings.el cus-edit.el
|
||||
image-mode.el ispell.el man.el dired-x.el log-view.el
|
||||
and 335 other files
|
||||
and 337 other files
|
||||
|
||||
Justin Bogner: changed fortune.el
|
||||
|
||||
|
|
@ -1909,6 +1925,8 @@ Justin Sheehy: changed gnus-sum.el nntp.el
|
|||
|
||||
Justus Piater: changed smtpmail.el
|
||||
|
||||
Jérémy Compostella: changed battery.el windmove.el window.el
|
||||
|
||||
Jérôme Marant: changed Makefile.in make-dist bindings.el configure.in
|
||||
emacsclient.c misc.texi
|
||||
|
||||
|
|
@ -1930,7 +1948,7 @@ and changed message.el gnus-agent.el gnus-sum.el files.el nnmail.el
|
|||
paragraphs.el bindings.el files.texi gnus-art.el gnus-group.el man.el
|
||||
INSTALL crisp.el fileio.c and 45 other files
|
||||
|
||||
Kai Tetzlaff: changed url-http.el
|
||||
Kai Tetzlaff: changed org-publish.el url-http.el
|
||||
|
||||
Kailash C. Chowksey: changed HELLO Makefile.in ind-util.el kannada.el
|
||||
knd-util.el loadup.el makefile.w32-in
|
||||
|
|
@ -1983,10 +2001,10 @@ Karl Pflästerer: changed gnus-art.el gnus-score.el mml.el spam-stat.el
|
|||
Katsuhiro Hermit Endo: changed gnus-group.el gnus-spec.el
|
||||
|
||||
Katsumi Yamaoka: wrote canlock.el
|
||||
and changed gnus-art.el gnus-sum.el message.el gnus.texi mm-decode.el
|
||||
and changed gnus-art.el message.el gnus-sum.el gnus.texi mm-decode.el
|
||||
mm-util.el mm-view.el gnus-group.el mml.el rfc2047.el gnus-util.el
|
||||
gnus-start.el gnus-msg.el shr.el gnus.el nntp.el gnus-agent.el nnrss.el
|
||||
nnmail.el mm-uu.el gnus-html.el and 133 other files
|
||||
gnus-start.el gnus-msg.el gnus.el shr.el nntp.el gnus-agent.el nnrss.el
|
||||
mm-uu.el nnmail.el gnus-html.el and 135 other files
|
||||
|
||||
Kaveh R. Ghazi: changed delta88k.h xterm.c
|
||||
|
||||
|
|
@ -2007,7 +2025,8 @@ Keith Gabryelski: wrote hexl.c hexl.el
|
|||
Keith Packard: changed font.c
|
||||
|
||||
Ken Brown: changed configure.in cygwin.h sheap.c browse-url.el gmalloc.c
|
||||
vm-limit.c dired.c emacs.c gdb-mi.el loadup.el mem-limits.h unexcw.c
|
||||
vm-limit.c dired.c emacs.c fileio.c gdb-mi.el loadup.el mem-limits.h
|
||||
unexcw.c
|
||||
|
||||
Ken Brush: changed emacsclient.c
|
||||
|
||||
|
|
@ -2111,7 +2130,8 @@ and changed hanja.el hangul.el hangul3.el hanja-jis.el symbol-ksc.el
|
|||
Kobayashi Yasuhiro: changed w32fns.c configure.bat indent.c info.el
|
||||
w32term.c w32term.h window.c xfns.c
|
||||
|
||||
Konrad Hinsen: changed ob-python.el
|
||||
Konrad Hinsen: wrote org-eshell.el
|
||||
and changed ob-python.el
|
||||
|
||||
Konstantin Novitsky: changed progmodes/python.el
|
||||
|
||||
|
|
@ -2148,10 +2168,10 @@ Lars Hansen: changed desktop.el tramp.el info.el mh-e.el dired-x.el
|
|||
url-irc.el url-misc.el url-news.el url-privacy.el and 39 other files
|
||||
|
||||
Lars Ingebrigtsen: changed nnimap.el gnus-art.el gnus-sum.el shr.el
|
||||
gnus.texi gnus-start.el auth-source.el message.el nntp.el gnus-draft.el
|
||||
gnus-group.el gnus-agent.el gnus-html.el gnus-util.el nnfolder.el
|
||||
nnmail.el proto-stream.el gnus-demon.el gnus-gravatar.el gnus-int.el
|
||||
gnus-msg.el and 6 other files
|
||||
gnus.texi gnus-start.el auth-source.el nntp.el message.el gnus-draft.el
|
||||
gnus-group.el gnus-agent.el gnus-html.el gnus-util.el macros.texi
|
||||
nnfolder.el nnmail.el proto-stream.el gnus-demon.el gnus-gravatar.el
|
||||
gnus-int.el and 10 other files
|
||||
|
||||
Lars Lindberg: wrote msb.el
|
||||
and co-wrote dabbrev.el imenu.el
|
||||
|
|
@ -2173,10 +2193,10 @@ and co-wrote gnus-kill.el gnus-mh.el gnus-msg.el gnus-score.el
|
|||
nnheader.el nnimap.el nnmbox.el nnmh.el nnml.el nnspool.el nnvirtual.el
|
||||
rfc2047.el time-date.el
|
||||
and changed gnus.texi gnus-cite.el pop3.el gnus-xmas.el smtpmail.el
|
||||
proto-stream.el auth-source.el xml.c dired.el editfns.c nnultimate.el
|
||||
subr.el gnus-nocem.el gnutls.c imap.el nnkiboze.el nnrss.el
|
||||
proto-stream.el auth-source.el subr.el xml.c dired.el editfns.c
|
||||
nnultimate.el gnus-nocem.el gnutls.c imap.el nnkiboze.el nnrss.el
|
||||
nnslashdot.el spam-report.el url-http.el gnus-cus.el
|
||||
and 206 other files
|
||||
and 207 other files
|
||||
|
||||
Lars Rasmusson: changed ebrowse.c
|
||||
|
||||
|
|
@ -2208,9 +2228,9 @@ and changed nxml-mode.el tutorial.el window.el ada-xref.el buff-menu.el
|
|||
Lennart Staflin: changed dired.el diary-ins.el diary-lib.el tq.el xdisp.c
|
||||
|
||||
Leo Liu: changed rcirc.el ido.el makefile.w32-in abbrev.el Makefile.in
|
||||
deps.mk fns.c gl-comp.m4 gnulib.mk minibuffer.el register.el replace.el
|
||||
subr.el abbrevlist.el ansi-color.el bindings.el bookmark.el cl-macs.el
|
||||
diff.el editfns.c files.el and 22 other files
|
||||
deps.mk dnd.el em-hist.el erc.el files.el fns.c footnote.el gl-comp.m4
|
||||
gnulib.mk help-mode.el iswitchb.el minibuf.c minibuffer.el register.el
|
||||
replace.el subr.el and 47 other files
|
||||
|
||||
Leonard H. Tower Jr.: changed rnews.el rnewspost.el emacsbug.el
|
||||
rmailout.el sendmail.el
|
||||
|
|
@ -2221,6 +2241,8 @@ Lewis Perin: changed emacs.manifest
|
|||
|
||||
Liam Healy: changed outline.el
|
||||
|
||||
Litvinov Sergey: changed ob-maxima.el ob-octave.el
|
||||
|
||||
Lloyd Zusman: changed mml.el pgg-gpg.el
|
||||
|
||||
Luc Teirlinck: wrote help-at-pt.el
|
||||
|
|
@ -2268,6 +2290,8 @@ Manoj Srivastava: wrote manoj-dark-theme.el
|
|||
|
||||
Manuel Giraud: changed org-html.el org-publish.el org.texi
|
||||
|
||||
Manuel Gómez: changed speedbar.el
|
||||
|
||||
Manuel Serrano: wrote flyspell.el
|
||||
|
||||
Marc Fleischeuers: changed files.el
|
||||
|
|
@ -2491,7 +2515,7 @@ and changed tramp.texi dbusbind.c trampver.texi dbus.texi trampver.el
|
|||
Michael Ben-Gershon: changed acorn.h configure.in riscix1-1.h riscix1-2.h
|
||||
unexec.c
|
||||
|
||||
Michael Brand: changed org-agenda.el org-table.el org.el
|
||||
Michael Brand: changed org.el org-agenda.el org-table.el org.texi
|
||||
|
||||
Michael D. Ernst: wrote reposition.el
|
||||
and changed dired-x.el uniquify.el ispell.el bibtex.el rmail.el dired.el
|
||||
|
|
@ -2555,7 +2579,7 @@ Michael Shields: changed spam.el gnus-art.el gnus-sum.el gnus-cite.el
|
|||
window.c window.el
|
||||
|
||||
Michael Sperber: changed aix3-1.h aix4-2.h gnus.texi mail-source.el
|
||||
nnmail.el
|
||||
nnmail.el org-capture.el
|
||||
|
||||
Michael Staats: wrote pc-select.el
|
||||
|
||||
|
|
@ -2568,6 +2592,8 @@ Michal Jankowski: changed insdel.c keyboard.c
|
|||
|
||||
Michal Nazarewicz: changed frame.c frame.h ispell.el w32term.c xterm.c
|
||||
|
||||
Michal Sojka: changed org-icalendar.el
|
||||
|
||||
Michaël Cadilhac: changed browse-url.el gnus-sum.el gnus.texi ido.el
|
||||
emacsbug.el files.el fill.el flyspell.el fr-drdref.tex fr-refcard.ps
|
||||
fr-refcard.tex ispell.el meta-mode.el nnrss.el
|
||||
|
|
@ -2592,6 +2618,8 @@ Mike Kazantsev: changed erc-dcc.el
|
|||
|
||||
Mike Kupfer: changed mh-e.el mh-utils.el
|
||||
|
||||
Mike Lamb: changed em-unix.el esh-util.el pcmpl-unix.el
|
||||
|
||||
Mike Long: changed b2m.c make-dist make-mode.el netbsd.h view.el vms.h
|
||||
|
||||
Mike McEwan: changed gnus-agent.el gnus-sum.el gnus-score.el
|
||||
|
|
@ -2610,7 +2638,7 @@ Mikio Nakajima: changed ring.el viper-util.el
|
|||
|
||||
Milan Zamazal: wrote czech.el glasses.el tildify.el
|
||||
and co-wrote prolog.el slovak.el
|
||||
and changed abbrev.el filecache.el files.el mm-view.el
|
||||
and changed abbrev.el filecache.el files.el mm-view.el org.el
|
||||
progmodes/compile.el
|
||||
|
||||
Miles Bader: wrote button.el face-remap.el image-file.el macroexp.el
|
||||
|
|
@ -2692,7 +2720,9 @@ Nic Ferrier: changed tramp.el
|
|||
|
||||
Nicholas Maniscalco: changed term.el
|
||||
|
||||
Nick Dokos: changed org-exp.el mh-search.el url-cache.el
|
||||
Nick Alcock: changed gnus.el
|
||||
|
||||
Nick Dokos: changed org-exp.el mh-search.el org.el url-cache.el
|
||||
|
||||
Nick Roberts: wrote gdb-mi.el t-mouse.el
|
||||
and changed gdb-ui.el gud.el building.texi tooltip.el speedbar.el
|
||||
|
|
@ -2704,13 +2734,14 @@ Nico Francois: changed w32fns.c w32inevt.c w32menu.c
|
|||
|
||||
Nicolas Avrutin: changed url-http.el
|
||||
|
||||
Nicolas Goaziou: changed org-list.el org.el org-latex.el org-exp.el
|
||||
org-footnote.el org-html.el org-inlinetask.el org-docbook.el
|
||||
org-timer.el org-capture.el org-ascii.el ob.el org-archive.el
|
||||
org-clock.el org-macs.el org-indent.el org-mouse.el
|
||||
Nicolas Goaziou: changed org-list.el org.el org-footnote.el org-exp.el
|
||||
org-latex.el org-html.el org-inlinetask.el org-indent.el org-docbook.el
|
||||
org-timer.el ob-asymptote.el org-ascii.el org-capture.el ob.el
|
||||
org-agenda.el org-archive.el org-clock.el org-macs.el org-mouse.el
|
||||
ob-exp.el org-colview.el org-table.el
|
||||
|
||||
Niels Giesen: changed icalendar.el org-clock.el org-docbook.el
|
||||
org-icalendar.el
|
||||
Niels Giesen: changed icalendar.el org-agenda.el org-clock.el
|
||||
org-docbook.el org-icalendar.el
|
||||
|
||||
Niimi Satoshi: changed pp.el search.c
|
||||
|
||||
|
|
@ -2797,7 +2828,7 @@ P. E. Jareth Hein: changed gnus-util.el
|
|||
|
||||
Pascal Dupuis: changed octave-inf.el
|
||||
|
||||
Pascal Rigaux: changed rfc2231.el
|
||||
Pascal Rigaux: changed image.c rfc2231.el
|
||||
|
||||
Pat Thoyts: changed xfns.c
|
||||
|
||||
|
|
@ -2815,7 +2846,7 @@ and co-wrote cal-dst.el
|
|||
and changed lisp.h Makefile.in editfns.c alloc.c xdisp.c configure.in
|
||||
fileio.c image.c process.c fns.c xterm.c dispextern.h keyboard.c data.c
|
||||
lread.c sysdep.c xfns.c eval.c emacs.c config.in print.c
|
||||
and 564 other files
|
||||
and 568 other files
|
||||
|
||||
Paul Fisher: changed fns.c
|
||||
|
||||
|
|
@ -2905,7 +2936,7 @@ Peter Kleiweg: wrote ps-mode.el
|
|||
|
||||
Peter Liljenberg: wrote elint.el
|
||||
|
||||
Peter Münster: changed gnus.texi
|
||||
Peter Münster: changed gnus.texi org-agenda.el org.el
|
||||
|
||||
Peter O'Gorman: changed configure.in frame.h hpux10-20.h termhooks.h
|
||||
|
||||
|
|
@ -2974,6 +3005,8 @@ Puneeth Chaganti: changed org.texi org-exp.el org-agenda.el
|
|||
|
||||
R. Bernstein: changed gud.el
|
||||
|
||||
Rafael Laboissiere: changed org.el org.texi
|
||||
|
||||
Rafael Sepúlveda: changed TUTORIAL.es
|
||||
|
||||
Raffael Mancini: changed misc.el
|
||||
|
|
@ -3073,10 +3106,10 @@ and changed files.el keyboard.c simple.el xterm.c xdisp.c rmail.el
|
|||
|
||||
Richard Mlynarik: wrote cl-indent.el ebuff-menu.el ehelp.el rfc822.el
|
||||
terminal.el yow.el
|
||||
and changed files.el rmail.el sysdep.c info.el keyboard.c bytecomp.el
|
||||
fileio.c simple.el process.c startup.el window.c editfns.c unexec.c
|
||||
xfns.c keymap.c minibuf.c sendmail.el buffer.c dispnew.c emacs.c
|
||||
subr.el and 129 other files
|
||||
and changed files.el simple.el rmail.el info.el sysdep.c bytecomp.el
|
||||
startup.el keyboard.c fileio.c process.c sendmail.el window.c editfns.c
|
||||
unexec.c xfns.c keymap.c lisp-mode.el minibuf.c buffer.c dired.el
|
||||
dispnew.c and 140 other files
|
||||
|
||||
Richard Sharman: wrote hilit-chg.el
|
||||
and changed sh-script.el ediff-init.el regexp-opt.el simple.el
|
||||
|
|
@ -3090,6 +3123,8 @@ Rob Browning: changed configure.in
|
|||
|
||||
Rob Christie: changed nsmenu.m
|
||||
|
||||
Rob Giardina: changed org-agenda.el
|
||||
|
||||
Rob Kaut: changed vhdl-mode.el
|
||||
|
||||
Rob Riepel: wrote tpu-edt.el tpu-extras.el tpu-mapper.el vt-control.el
|
||||
|
|
@ -3116,6 +3151,8 @@ Robert Pluim: changed gnus-demon.el org-agenda.el
|
|||
|
||||
Robert Thorpe: changed cus-start.el indent.el
|
||||
|
||||
Roberto Huelga: changed org-clock.el
|
||||
|
||||
Roberto Rodríguez: changed ada-mode.texi glossary.texi widget.texi
|
||||
|
||||
Roderick Schertler: changed dgux.h dgux4.h gud.el sysdep.c
|
||||
|
|
@ -3202,11 +3239,13 @@ Sam Steingold: wrote gulp.el midnight.el
|
|||
and changed progmodes/compile.el cl-indent.el vc-cvs.el vc.el mouse.el
|
||||
simple.el font-lock.el ange-ftp.el vc-hg.el add-log.el bookmark.el
|
||||
bug-reference.el diary-lib.el dired.el pcvs.el tex-mode.el apropos.el
|
||||
bindings.el emacs-lisp/debug.el etags.el files.el and 124 other files
|
||||
bindings.el emacs-lisp/debug.el etags.el files.el and 126 other files
|
||||
|
||||
Samuel Bronson: changed custom.el
|
||||
|
||||
Samuel Tardieu: changed smime.el
|
||||
|
||||
Samuel Thibault: changed sysdep.c term.c
|
||||
Samuel Thibault: changed gnu.h sysdep.c term.c
|
||||
|
||||
Sanghyuk Suh: changed mac-win.el macterm.c
|
||||
|
||||
|
|
@ -3266,6 +3305,8 @@ Sebastian Tennant: changed desktop.el
|
|||
|
||||
Sebastien Kirche: changed mail-extr.el
|
||||
|
||||
Sebastien Vauban: changed org-agenda.el org-html.el
|
||||
|
||||
Seiji Zenitani: changed nsfns.m frame.c xterm.c Info.plist PkgInfo
|
||||
document.icns find-func.el frame.h help-fns.el macfns.c nsfont.m
|
||||
nsterm.m w32fns.c xdisp.c xfns.c
|
||||
|
|
@ -3278,6 +3319,8 @@ Seppo Sade: changed esh-ext.el
|
|||
|
||||
Sergei Organov: changed vc.el
|
||||
|
||||
Sergey Litvinov: co-wrote ob-fortran.el
|
||||
|
||||
Sergey Poznyakoff: changed mh-mime.el rmail.el rmail.texi smtpmail.el
|
||||
|
||||
Sergio Pokrovskij: changed TUTORIAL.eo
|
||||
|
|
@ -3366,8 +3409,8 @@ Stefan Monnier: wrote bibtex-style.el bzrmerge.el css-mode.el
|
|||
and co-wrote font-lock.el
|
||||
and changed vc.el subr.el simple.el lisp.h keyboard.c files.el
|
||||
bytecomp.el Makefile.in keymap.c progmodes/compile.el xdisp.c pcvs.el
|
||||
alloc.c newcomment.el vc-hooks.el tex-mode.el buffer.c fileio.c
|
||||
sh-script.el eval.c fill.el and 1032 other files
|
||||
alloc.c newcomment.el vc-hooks.el tex-mode.el buffer.c fileio.c eval.c
|
||||
sh-script.el fill.el and 1032 other files
|
||||
|
||||
Stefan Reichör: changed gnus-agent.el
|
||||
|
||||
|
|
@ -3471,7 +3514,7 @@ Sun Yijiang: changed TUTORIAL.cn
|
|||
|
||||
Sundar Narasimhan: changed rnews.el rnewspost.el
|
||||
|
||||
Suvayu Ali: changed org.texi
|
||||
Suvayu Ali: changed org-exp.el org-inlinetask.el org.texi
|
||||
|
||||
Sven Joachim: changed files.el de-refcard.tex dired-aux.el emacs.1
|
||||
arc-mode.el dired-x.el em-cmpl.el em-hist.el em-ls.el esh-cmd.el
|
||||
|
|
@ -3480,9 +3523,11 @@ Sven Joachim: changed files.el de-refcard.tex dired-aux.el emacs.1
|
|||
|
||||
Svend Tollak Munkejord: changed deuglify.el
|
||||
|
||||
Syver Enstad: changed gud.el
|
||||
|
||||
Sébastien Delafond: changed org.el
|
||||
|
||||
Sébastien Vauban: changed org-agenda.el org-latex.el org.el
|
||||
Sébastien Vauban: changed org.el org-agenda.el org-latex.el
|
||||
|
||||
T. V. Raman: changed completion.el files.el json.el
|
||||
|
||||
|
|
@ -3517,7 +3562,7 @@ and changed subword.el image-mode.el Makefile.in cc-cmds.el emacsbug.el
|
|||
gnus-art.el gnus.texi nnimap.el files.el gnus-sum.el info.el
|
||||
org-footnote.el org.el reftex-ref.el simple.el tsdh-dark-theme.el
|
||||
tsdh-light-theme.el ack.texi bindings.el bookmark.el cc-mode.el
|
||||
and 22 other files
|
||||
and 23 other files
|
||||
|
||||
Tatsuya Ichikawa: changed gnus-agent.el gnus-cache.el
|
||||
|
||||
|
|
@ -3531,8 +3576,8 @@ Teodor Zlatanov: wrote auth-source.el gnus-registry.el gnus-sync.el
|
|||
gnus-tests.el gnutls.el registry.el spam-report.el url-future.el
|
||||
and changed spam.el gnus.el nnimap.el gnus.texi gnus-sum.el gnus-util.el
|
||||
auth.texi netrc.el gnus-start.el gnutls.c message.el spam-stat.el
|
||||
encrypt.el nnir.el nnmail.el imap.el mail-source.el nnmairix.el
|
||||
Makefile.in gnus-encrypt.el gnus-html.el and 97 other files
|
||||
encrypt.el nnir.el nnmail.el imap.el mail-source.el nnmairix.el nntp.el
|
||||
Makefile.in gnus-encrypt.el and 97 other files
|
||||
|
||||
Terje Rosten: changed xfns.c version.el xterm.c xterm.h
|
||||
|
||||
|
|
@ -3559,7 +3604,7 @@ Thierry Emery: changed kinsoku.el timezone.el url-http.el wid-edit.el
|
|||
|
||||
Thierry Volpiatto: changed bookmark.el eshell.el gnus-sum.el
|
||||
image-mode.el info.el man.el woman.el dired-aux.el dired.el doc-view.el
|
||||
files.el gnus-art.el image-dired.el vc-rcs.el
|
||||
files.el find-func.el gnus-art.el image-dired.el vc-rcs.el
|
||||
|
||||
Thomas Baumann: wrote org-mhe.el
|
||||
and co-wrote org-bbdb.el
|
||||
|
|
@ -3570,6 +3615,8 @@ Thomas Deweese: changed x-win.el
|
|||
|
||||
Thomas Dorner: changed ange-ftp.el
|
||||
|
||||
Thomas Dye: changed org.texi ob-R.el
|
||||
|
||||
Thomas Horsley: changed cxux-crt0.s cxux.h cxux7.h emacs.c nh3000.h
|
||||
nh4000.h simple.el sysdep.c xterm.c
|
||||
|
||||
|
|
@ -3591,6 +3638,8 @@ and changed emacs-lock.el subr.el
|
|||
|
||||
Thor Kristoffersen: changed nntp.el
|
||||
|
||||
Thorsten Jolitz: co-wrote ob-picolisp.el
|
||||
|
||||
Thorsten Ohl: changed lread.c next.h
|
||||
|
||||
Tiago Saboga: changed files.el
|
||||
|
|
@ -3628,7 +3677,7 @@ and co-wrote org-wl.el
|
|||
|
||||
Tom Breton: changed autoinsert.el cus-edit.el gnus-agent.el lread.c
|
||||
|
||||
Tom Dye: changed org-bibtex.el org.texi org.el
|
||||
Tom Dye: changed org.texi org-bibtex.el org.el
|
||||
|
||||
Tom Hageman: changed etags.c
|
||||
|
||||
|
|
@ -3712,9 +3761,9 @@ and changed org-gnus.el smime.el
|
|||
|
||||
Ulrich Leodolter: changed w32proc.c
|
||||
|
||||
Ulrich Mueller: changed configure.in Makefile.in files.el gud.el
|
||||
server.el ChgPane.c ChgSel.c HELLO INSTALL XMakeAssoc.c authors.el
|
||||
bytecomp.el calc-units.el case-table.el configure doctor.el em-ls.el
|
||||
Ulrich Mueller: changed configure.in Makefile.in doctor.el files.el
|
||||
gud.el server.el ChgPane.c ChgSel.c HELLO INSTALL XMakeAssoc.c
|
||||
authors.el bytecomp.el calc-units.el case-table.el configure em-ls.el
|
||||
emacs.1 emacs.c emacs.desktop emacsclient.c and 26 other files
|
||||
|
||||
Ulrich Neumerkel: changed xterm.c
|
||||
|
|
@ -3726,6 +3775,8 @@ Vadim Nasardinov: changed allout.el
|
|||
|
||||
Vagn Johansen: changed gnus-cache.el vc-svn.el
|
||||
|
||||
Valentin Wüstholz: changed org.el
|
||||
|
||||
Valery Alexeev: changed cyril-util.el cyrillic.el
|
||||
|
||||
Vasily Korytov: changed cyrillic.el message.el cperl-mode.el gnus-art.el
|
||||
|
|
@ -3733,6 +3784,8 @@ Vasily Korytov: changed cyrillic.el message.el cperl-mode.el gnus-art.el
|
|||
|
||||
Victor Zandy: wrote zone.el
|
||||
|
||||
Vida Gábor: changed gnus-demon.el
|
||||
|
||||
Ville Skyttä: changed mh-comp.el pgg.el tcl.el
|
||||
|
||||
Vincent Belaïche: changed ses.el 5x5.el calc-alg.el calc-vec.el calc.texi
|
||||
|
|
@ -3758,6 +3811,8 @@ Vladimir Alexiev: changed arc-mode.el nnvirtual.el tmm.el
|
|||
|
||||
Vladimir Volovich: changed smime.el
|
||||
|
||||
Volker Sobek: changed programs.texi
|
||||
|
||||
W. Martin Borgert: changed files.el schemas.xml
|
||||
|
||||
Walter C. Pelissero: changed browse-url.el url-methods.el
|
||||
|
|
@ -3809,13 +3864,15 @@ and changed files.el
|
|||
|
||||
Wim Nieuwenhuizen: changed TUTORIAL.nl
|
||||
|
||||
Wj Carpenter: changed feedmail.el
|
||||
|
||||
Wlodzimierz Bzyl: co-wrote ogonek.el
|
||||
and changed latin-pre.el pl-refcard.ps pl-refcard.tex refcard-pl.ps
|
||||
refcard-pl.tex survival.tex
|
||||
|
||||
Wolfgang Glas: changed unexsgi.c
|
||||
|
||||
Wolfgang Jenkner: changed conf-mode.el gnus-sum.el lread.c
|
||||
Wolfgang Jenkner: changed conf-mode.el gnus-agent.el gnus-sum.el lread.c
|
||||
network-stream.el pcvs.el pop3.el
|
||||
|
||||
Wolfgang Lux: changed nsterm.m keyboard.c
|
||||
|
|
|
|||
|
|
@ -1,3 +1,42 @@
|
|||
2012-02-10 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* NEWS: Change condition-case-no-debug to
|
||||
condition-case-unless-debug and split the entry in two.
|
||||
|
||||
2012-02-08 Alex Ott <alexott@gmail.com>
|
||||
|
||||
* tutorials/TUTORIAL.ru: Updated; synchronize with TUTORIAL.
|
||||
Coding system changed to UTF-8.
|
||||
|
||||
2012-02-06 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* tutorials/TUTORIAL.es: Updated; synchronize with TUTORIAL.
|
||||
|
||||
2012-02-03 Pieter Schoenmakers <tiggr@tiggr.net>
|
||||
|
||||
* tutorials/TUTORIAL.nl: Updated; synchronize with TUTORIAL.
|
||||
|
||||
2012-01-30 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* tutorials/TUTORIAL: Delete a repeat sentence.
|
||||
|
||||
2012-01-25 Mats Lidell <mats.lidell@cag.se>
|
||||
|
||||
* tutorials/TUTORIAL.sv: Updated; synchronize with TUTORIAL.
|
||||
|
||||
2012-01-21 Ognyan Kulev <ogi@tower.3.bg>
|
||||
|
||||
* tutorials/TUTORIAL.bg: Updated; synchronize with TUTORIAL.
|
||||
|
||||
2012-01-19 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* tutorial/TUTORIAL.de: Updated; synchronize with TUTORIAL.
|
||||
Minor typographical improvements.
|
||||
|
||||
2012-01-17 Primoz PETERLIN <primoz.peterlin@mf.uni-lj.si>
|
||||
|
||||
* tutorials/TUTORIAL.sl: Update.
|
||||
|
||||
2012-01-14 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* tutorials/TUTORIAL.he: Update to follow changes to TUTORIAL in
|
||||
|
|
|
|||
14
etc/NEWS.23
14
etc/NEWS.23
|
|
@ -24,12 +24,22 @@ require version 1.14 or later. See README.W32 and nt/INSTALL for
|
|||
details and pointers to URLs where the latest libpng can be
|
||||
downloaded.
|
||||
|
||||
|
||||
* Changes in Specialized Modes and Packages in Emacs 23.4
|
||||
|
||||
** EDE
|
||||
|
||||
*** New variable `ede-project-directories'.
|
||||
EDE now refuses to automatically load a project file (Project.ede)
|
||||
unless the file is in one of the directories specified by this
|
||||
variable. This reduces the risk of inadvertently loading malicious
|
||||
project files. The commands `M-x ede-new' and `M-x ede' now offer to
|
||||
save directories to `ede-project-directories'.
|
||||
|
||||
* Changes in Emacs 23.4 on non-free operating systems
|
||||
|
||||
** The MS-Windows port can now use more than 500MB of heap.
|
||||
Depending on the available virtual memory, Emacs on Windows can now
|
||||
have up to 2GB of heap space. This allows, e.g., to visit several
|
||||
have up to 2GB of heap space. This allows, e.g., visiting several
|
||||
large (> 256MB) files in the same session.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ There are two different protocols in general use. One of them uses
|
|||
the `flock' system call. The other involves creating a lock file;
|
||||
`movemail' must be able to write in /usr/spool/mail in order to do
|
||||
this. You control which one is used by defining, or not defining,
|
||||
the macro MAIL_USE_FLOCK in config.h or the m- or s- file it includes.
|
||||
the macro MAIL_USE_FLOCK in config.h or the m/ or s/ file it includes.
|
||||
IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
|
||||
SYSTEM, YOU CAN LOSE MAIL!
|
||||
|
||||
|
|
@ -2744,7 +2744,7 @@ value in the man page for a.out (5).
|
|||
initialized variables. Emacs makes all initialized variables in most
|
||||
of its files pure after dumping, but the variables declared static and
|
||||
not initialized are not supposed to be pure. On these systems you
|
||||
may need to add "#define static" to the m- or the s- file.
|
||||
may need to add "#define static" to config.h.
|
||||
|
||||
* Runtime problems on legacy systems
|
||||
|
||||
|
|
|
|||
6
etc/TODO
6
etc/TODO
|
|
@ -71,6 +71,12 @@ things in their .emacs.
|
|||
|
||||
** See if other files can use generated-autoload-file (see eg ps-print).
|
||||
|
||||
** Write more tests. Pick a fixed bug from the database, write a test
|
||||
case to make sure it stays fixed. Or pick your favorite programming
|
||||
major-mode, and write a test for its indentation. Or a version
|
||||
control backend, and write a test for its status parser. Etc.
|
||||
See test/automated for examples.
|
||||
|
||||
* Small but important fixes needed in existing features:
|
||||
|
||||
** Flymake's customization mechanism needs to be both simpler (fewer
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ Reinsertion of killed text is called "yanking". Generally, the
|
|||
commands that can remove a lot of text kill the text (they are set up so
|
||||
that you can yank the text), while the commands that remove just one
|
||||
character, or only remove blank lines and spaces, do deletion (so you
|
||||
cannot yank that text). <DEL> and C-d do deletion in the simplest
|
||||
cannot yank that text). <DEL> and C-d do deletion in the simplest
|
||||
case, with no argument. When given an argument, they kill instead.
|
||||
|
||||
>> Move the cursor to the beginning of a line which is not empty.
|
||||
|
|
@ -577,7 +577,6 @@ Most of the time, the buffer's name is the same as the file name
|
|||
The buffer list you make with C-x C-b shows you both the buffer name
|
||||
and the file name of every buffer.
|
||||
|
||||
ANY text you see in an Emacs window is always part of some buffer.
|
||||
Some buffers do not correspond to files. The buffer named
|
||||
"*Buffer List*", which contains the buffer list that you made with
|
||||
C-x C-b, does not have any file. This TUTORIAL buffer initially did
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -14,8 +14,10 @@ ocasi
|
|||
<car>. Escribimos <ESC> para referirnos a la tecla ESC.
|
||||
|
||||
Nota importante: para terminar la sesión de Emacs teclee C-x C-c (dos
|
||||
caracteres). Los caracteres ">>" en el margen izquierdo indican
|
||||
instrucciones para que usted trate de usar un comando. Por ejemplo:
|
||||
caracteres). Para cancelar un comando parcialmente introducido,
|
||||
teclee C-g.
|
||||
Los caracteres ">>" en el margen izquierdo indican instrucciones para
|
||||
que usted trate de usar un comando. Por ejemplo:
|
||||
<<Blank lines inserted around following line by help-with-tutorial>>
|
||||
[Mitad de página en blanco para propósitos didácticos. El texto continúa abajo]
|
||||
>> Ahora teclee C-v (ver la próxima pantalla) para desplazarse a la
|
||||
|
|
@ -47,9 +49,12 @@ Los siguientes comandos son
|
|||
pantalla (Esto es CONTROL-L, no CONTROL-1.)
|
||||
|
||||
>> Encuentre el cursor, y fíjese qué texto hay cerca de éste.
|
||||
Luego teclee C-l.
|
||||
Encuentre el cursor otra vez y note que el mismo texto está cerca
|
||||
del cursor ahora.
|
||||
Luego teclee C-l. Encuentre el cursor otra vez y note que el mismo
|
||||
texto está todavía cerca del cursor, pero ahora está en el centro
|
||||
de la pantalla.
|
||||
Si vuelve teclear C-l, ese texto se moverá al principio de la
|
||||
pantalla. Al teclear C-l otra vez, se moverá al final de la
|
||||
pantalla.
|
||||
|
||||
Si su terminal las soporta, también puede usar las teclas AvPág o
|
||||
RegPág para moverse por pantallas completas, pero puede editar más
|
||||
|
|
@ -89,9 +94,9 @@ comandos de posicionamiento b
|
|||
lo que hace C-p cuando el cursor está en medio de la línea.
|
||||
|
||||
Cada línea de texto termina con un carácter de nueva línea (Newline),
|
||||
que sirve para separarla de la línea siguiente. La última línea de su
|
||||
archivo debe de tener un carácter de nueva línea al final (pero Emacs
|
||||
no requiere que ésta lo tenga).
|
||||
que sirve para separarla de la línea siguiente. (Normalmente, la
|
||||
última línea de un archivo termina con un carácter de nueva línea,
|
||||
pero Emacs no requiere que sea así.)
|
||||
|
||||
>> Intente usar C-b al comienzo de una línea. Debería moverse al
|
||||
final de la línea previa. Esto sucede porque retrocede a través
|
||||
|
|
@ -227,24 +232,17 @@ Esto debi
|
|||
quisiera desplazarla hacia abajo de nuevo, puede dar un argumento a
|
||||
M-v.
|
||||
|
||||
Si está usando un sistema de ventanas, como X11 o MS-Windows, debe
|
||||
Si está usando un entorno gráfico, como X o MS-Windows, debe
|
||||
haber una larga área rectangular llamada una barra de desplazamiento
|
||||
en el lado izquierdo de la ventana de Emacs. Puede desplazar el texto
|
||||
al oprimir el botón del ratón en la barra de desplazamiento.
|
||||
|
||||
>> Pruebe presionando el botón del medio en la parte superior del área
|
||||
resaltada en la barra de desplazamiento. Éste debe desplazar el
|
||||
texto a una posición determinada según cuan alto o bajo oprima el
|
||||
botón.
|
||||
|
||||
>> Intente mover el ratón arriba y abajo, mientras mantiene el botón
|
||||
del medio presionado. Verá que el texto se desplaza arriba y abajo
|
||||
a medida que mueve el ratón.
|
||||
Si su ratón tiene un botón de rueda, también puede utilizarlo para
|
||||
desplazar el texto.
|
||||
|
||||
|
||||
|
||||
* CUANDO EMACS ESTÁ BLOQUEADO
|
||||
-----------------------------
|
||||
* SI EMACS DEJA DE RESPONDER
|
||||
----------------------------
|
||||
|
||||
Si Emacs dejara de responder a sus comandos, puede detenerlo con
|
||||
seguridad al teclear C-g. Puede usar C-g para detener un comando que
|
||||
|
|
@ -253,7 +251,7 @@ est
|
|||
También puede usar C-g para descartar un argumento numérico o el
|
||||
comienzo de un comando que no quiere finalizar.
|
||||
|
||||
>> Escriba C-u 100 para hacer un argumento numérico de 100, entonces
|
||||
>> Escriba C-u 100 para hacer un argumento numérico de 100, y luego
|
||||
pruebe C-g.
|
||||
Ahora pruebe C-f. Esto deberá mover sólo un carácter, ya que
|
||||
canceló el argumento con C-g.
|
||||
|
|
@ -282,7 +280,7 @@ desactivado, conteste la pregunta con "n".
|
|||
* VENTANAS
|
||||
----------
|
||||
|
||||
Emacs puede tener varias ventanas, cada una mostrando su propio texto.
|
||||
Emacs puede tener varias "ventanas", cada una mostrando su propio texto.
|
||||
Explicaremos después como usar múltiples ventanas. Ahora mismo
|
||||
queremos explicar cómo deshacerse de ventanas adicionales y volver a
|
||||
la edición básica en una ventana. Es sencillo:
|
||||
|
|
@ -294,9 +292,9 @@ contiene el cursor, para ocupar toda la pantalla. Esto borra todas las
|
|||
demás ventanas.
|
||||
|
||||
>> Mueva el cursor a esta línea y escriba C-u 0 C-l.
|
||||
>> Escriba Control-h k Control-f.
|
||||
>> Escriba C-h k C-f.
|
||||
Vea como esta ventana se encoge, mientras una nueva aparece y
|
||||
muestra documentación sobre el comando Control-f.
|
||||
muestra documentación sobre el comando C-f.
|
||||
|
||||
>> Escriba C-x 1 y vea que la ventana de listado de documentación
|
||||
desaparece.
|
||||
|
|
@ -312,41 +310,36 @@ cuatro caracteres.
|
|||
* INSERTAR Y BORRAR
|
||||
-------------------
|
||||
|
||||
Si quiere insertar un texto, basta con que lo teclee. Emacs
|
||||
interpreta los caracteres que usted puede ver, tales como A, 7, *,
|
||||
etc. como texto y los inserta inmediatamente. Teclee <Return> (la
|
||||
tecla Enter) para insertar un carácter de nueva línea.
|
||||
Si quiere insertar un texto, basta con que lo teclee. Los caracteres
|
||||
normales, como A, 7, *, etc. se insertan nada más teclearlos. Teclee
|
||||
<Return> (la tecla "Enter" o "Intro") para insertar un carácter de
|
||||
nueva línea.
|
||||
|
||||
Puede borrar el último carácter que escribió oprimiendo <Delback>.
|
||||
<Delback> es una tecla en el teclado--la misma que normalmente usa
|
||||
fuera de emacs para borrar el último carácter que escribió.
|
||||
Normalmente es una tecla una o dos filas arriba de la tecla <Return>,
|
||||
y que está usualmente rotulada como "Backspace", "Del" o simplemente
|
||||
con una flecha en dirección izquierda que no es parte de las teclas de
|
||||
flecha.
|
||||
Para borrar el carácter que precede al cursor, oprima <DEL>. Es una
|
||||
tecla alargada, normalmente etiquetada como "Backspace" o "Del", o con
|
||||
una flecha apuntando a la izquierda; la misma que suele utilizar fuera
|
||||
de Emacs para borrar el último carácter introducido.
|
||||
|
||||
Si la tecla larga está rotulada "Backspace", entonces ésa es la que
|
||||
debe de usar para <Delback>. Puede haber otra tecla llamada "Del" en
|
||||
otra parte, pero ésa no es <Delback>.
|
||||
|
||||
Generalmente, <Delback> borra el carácter inmediatamente anterior a la
|
||||
posición actual del cursor.
|
||||
Puede haber otra tecla llamada "Del" o "Supr" en otra parte, pero ésa
|
||||
no es <DEL>.
|
||||
|
||||
>> Haga esto ahora: teclee unos pocos caracteres, después bórrelos
|
||||
tecleando <Delback> varias veces. No se preocupe si este archivo
|
||||
tecleando <DEL> varias veces. No se preocupe si este archivo
|
||||
cambia, no alterará el tutorial principal. Ésta es su copia
|
||||
personal de él.
|
||||
|
||||
Cuando una línea de texto se hace muy grande para una sola línea en la
|
||||
Cuando una línea de texto se hace muy grande para una sola línea de la
|
||||
pantalla, la línea de texto "continúa" en una segunda línea en la
|
||||
pantalla. Un backslash ("\") (o, si está usando un sistema de
|
||||
ventanas, una pequeña flecha curva) en el margen derecho indica que la
|
||||
línea "continúa".
|
||||
pantalla. Si está usando un entorno gráfico, se mostrarán pequeñas
|
||||
flechas curvas en las estrechas franjas vacías (los "márgenes" derecho
|
||||
e izquierdo) a cada lado del área de texto, para indicar que la línea
|
||||
continúa. Si está utilizando una terminal, la continuación se señala
|
||||
mediante una barra invertida ("\") en la última columna de la derecha.
|
||||
|
||||
>> Inserte texto hasta que llegue al margen derecho, y siga
|
||||
insertando. Verá aparecer una línea de continuación.
|
||||
|
||||
>> Use <Delback> para borrar el texto hasta que la línea de nuevo
|
||||
>> Use <DEL> para borrar el texto hasta que la línea de nuevo
|
||||
quepa en la pantalla. La línea de continuación se pierde.
|
||||
|
||||
Puede borrar un carácter de nueva línea como cualquier otro carácter.
|
||||
|
|
@ -355,7 +348,7 @@ sola l
|
|||
largo para caber en el ancho de la pantalla, se mostrará con una línea
|
||||
de continuación.
|
||||
|
||||
>> Mueva el cursor al comienzo de una línea y teclee <Delback>. Esto
|
||||
>> Mueva el cursor al comienzo de una línea y teclee <DEL>. Esto
|
||||
juntará esa línea con la línea anterior.
|
||||
|
||||
>> Teclee <Return> para reinsertar la nueva línea que borró.
|
||||
|
|
@ -370,27 +363,29 @@ Ya ha aprendido la manera m
|
|||
corregir errores. Puede borrar por palabras o por líneas. He aquí un
|
||||
resumen de las operaciones de borrado:
|
||||
|
||||
<Delback> borra el carácter justo antes que el cursor
|
||||
<DEL> borra el carácter justo antes que el cursor
|
||||
C-d borra el siguiente carácter después del cursor
|
||||
|
||||
M-<Delback> Elimina la palabra inmediatamente antes del
|
||||
M-<DEL> Elimina la palabra inmediatamente antes del
|
||||
cursor
|
||||
M-d Elimina la siguiente palabra después del cursor
|
||||
|
||||
C-k Elimina desde el cursor hasta el fin de la línea
|
||||
M-k Elimina hasta el final de la oración actual
|
||||
|
||||
Note que <Delback> y C-d, comparados con M-<Delback> y M-d, extienden
|
||||
el paralelismo iniciado por C-f y M-f (bien, <Delback> no es realmente
|
||||
una tecla de control, pero no nos preocuparemos de eso ahora). C-k y
|
||||
M-k, en ciertas forma, son como C-e y M-e, en que las líneas son
|
||||
oraciones opuestas.
|
||||
Note que <DEL> y C-d, comparados con M-<DEL> y M-d, extienden el
|
||||
paralelismo iniciado por C-f y M-f (bien, <DEL> no es realmente una
|
||||
tecla de control, pero no nos preocuparemos de eso ahora). C-k y M-k,
|
||||
en ciertas forma, son como C-e y M-e, en que las líneas de unos
|
||||
corresponden a sentencias en los otros.
|
||||
|
||||
También puede eliminar cualquier parte del buffer con un método
|
||||
uniforme. Muévase a un extremo de esa parte, y teclee C-@ o C-SPC
|
||||
(cualquiera de los dos). (SPC es la barra espaciadora.) Muévase al
|
||||
otro extremo de esa parte, y teclee C-w. Eso elimina todo el texto
|
||||
entre las dos posiciones.
|
||||
También puede eliminar un segmento contiguo de texto con un método
|
||||
uniforme. Muévase a un extremo de ese segmento de texto, y teclee C-@
|
||||
o C-SPC (cualquiera de los dos). (SPC es la barra espaciadora.)
|
||||
Luego, mueva el cursor al otro extremo del texto que desea eliminar.
|
||||
Al hacerlo, Emacs resaltará el texto situado entre el cursor y la
|
||||
posición en la que tecleó C-SPC. Finalmente, teclee C-w. Eso elimina
|
||||
todo el texto entre las dos posiciones.
|
||||
|
||||
>> Mueva el cursor a la letra T del inicio del párrafo anterior.
|
||||
>> Teclee C-SPC. Emacs debe mostrar el mensaje "Mark set" en la parte
|
||||
|
|
@ -401,12 +396,15 @@ entre las dos posiciones.
|
|||
termina justo antes de la x.
|
||||
|
||||
La diferencia entre "eliminar" y "borrar" es que el texto "eliminado"
|
||||
puede ser reinsertado, mientras que las cosas "borradas" no pueden ser
|
||||
reinsertadas. La reinserción de texto eliminado se llama "yanking" o
|
||||
"pegar". Generalmente, los comandos que pueden quitar mucho texto lo
|
||||
eliminan, mientras que los comandos que quitan solo un carácter, o
|
||||
solo líneas en blanco y espacios, borran (para que no pueda pegar ese
|
||||
texto).
|
||||
puede ser reinsertado (en cualquier posición), mientras que las cosas
|
||||
"borradas" no pueden ser reinsertadas (sin embargo, es posible
|
||||
deshacer el borrado; ver más abajo). La reinserción de texto
|
||||
eliminado se llama "yanking" o "pegar". Generalmente, los comandos
|
||||
que pueden quitar mucho texto lo eliminan (para que pueda pegarlo de
|
||||
nuevo) mientras que los comandos que quitan solo un carácter, o solo
|
||||
líneas en blanco y espacios, borran (y por tanto no se puede pegar lo
|
||||
borrado). Si se normalmente, sin pasar un argumento, <DEL> y C-d
|
||||
borran. Con un argumento, eliminan.
|
||||
|
||||
>> Mueva el cursor al comienzo de una línea que no esté vacía.
|
||||
Luego teclee C-k para eliminar el texto de esa línea.
|
||||
|
|
@ -420,12 +418,13 @@ especialmente: Elimina ese n
|
|||
contenidos. Esto no es una simple repetición. C-u 2 C-k elimina dos
|
||||
líneas y sus nuevas líneas, tecleando C-k dos veces no hace esto.
|
||||
|
||||
Traer texto eliminado de regreso es llamado "yanking" o "pegar".
|
||||
(Piense en ello como pegar de nuevo, o traer de vuelta, algún texto
|
||||
que le fue quitado.) Puede pegar el texto eliminado en, ya sea el
|
||||
lugar en que fue eliminado, o en otra parte del buffer, o hasta en un
|
||||
archivo diferente. Puede pegar el texto varias veces, lo que hace
|
||||
varias copias de él.
|
||||
Reinsertar texto eliminado se denomina "yanking" o "pegar". (Piense
|
||||
en ello como pegar de nuevo, o traer de vuelta, algún texto que le fue
|
||||
quitado.) Puede pegar el texto eliminado, ya sea el lugar en que fue
|
||||
eliminado, o en otra parte del buffer, o hasta en un archivo
|
||||
diferente. Puede pegar el texto varias veces, lo que hace varias
|
||||
copias de él. Algunos editores se refieren a eliminar y reinsertar
|
||||
como "cortar" y "pegar" (consulte el Glosario en el manual de Emacs).
|
||||
|
||||
El comando para pegar es C-y. Reinserta el último texto eliminado, en
|
||||
la posición actual del cursor.
|
||||
|
|
@ -468,32 +467,31 @@ eliminaci
|
|||
----------
|
||||
|
||||
Si hace un cambio al texto, y luego decide que fue un error,
|
||||
puede deshacer el cambio con el comando deshacer, C-x u.
|
||||
puede deshacer el cambio con el comando deshacer, C-/.
|
||||
|
||||
Normalmente, C-x u deshace los cambios hechos por un comando; si repite
|
||||
varias veces seguidas C-x u, cada repetición deshará un comando
|
||||
Normalmente, C-/ deshace los cambios hechos por un comando; si repite
|
||||
varias veces seguidas C-/, cada repetición deshará un comando
|
||||
adicional.
|
||||
|
||||
Pero hay dos excepciones: los comandos que no cambian el texto no
|
||||
cuentan (esto incluye los comandos de movimiento del cursor y el
|
||||
comando de desplazamiento), y los caracteres de autoinserción se
|
||||
manejan usualmente en grupos de hasta 20. (Esto es para reducir el
|
||||
numero de C-x u que tenga que teclear para deshacer una inserción en
|
||||
cuentan (esto incluye los comandos de movimiento del cursor y de
|
||||
desplazamiento), y los caracteres de autoinserción se manejan
|
||||
usualmente en grupos de hasta 20 caracteres. (Esto es para reducir el
|
||||
numero de C-/ que tenga que teclear para deshacer una inserción en
|
||||
el texto.)
|
||||
|
||||
>> Elimine esta línea con C-k, después teclee C-x u y debería
|
||||
>> Elimine esta línea con C-k, después teclee C-/ y debería
|
||||
reaparecer.
|
||||
|
||||
C-_ es un comando alternativo para deshacer; funciona igual que C-x u,
|
||||
pero es más fácil de teclear varias veces seguidas. La desventaja de
|
||||
C-_ es que en algunos teclados no es obvio cómo se teclea. Por esto
|
||||
existe también C-x u. En algunas terminales, puede teclear C-_ al
|
||||
teclear / mientras oprime CONTROL.
|
||||
C-_ es un comando alternativo para deshacer; funciona igual que C-/.
|
||||
En algunas terminales, al teclear C-/ en realidad envía C-_ a Emacs.
|
||||
También existe la alternativa de usar C-x u, que funciona exactamente
|
||||
igual que C-/, pero es menos cómodo de teclear.
|
||||
|
||||
Un argumento numérico para C-_ o C-x u actúa como un factor de
|
||||
Un argumento numérico para C-/, C-_ o C-x u actúa como un factor de
|
||||
repetición.
|
||||
|
||||
Uuede deshacer un texto borrado justo como puede deshacer el texto
|
||||
Puede deshacer un texto borrado justo como puede deshacer el texto
|
||||
eliminado. La distinción entre eliminar algo y borrar algo afecta en
|
||||
si puede pegarlo con C-y; no hay diferencia alguna para deshacer.
|
||||
|
||||
|
|
@ -516,17 +514,17 @@ cuando guarde, Emacs dejar
|
|||
cambiado en caso de que luego decida que sus cambios fueron un error.
|
||||
|
||||
Si mira cerca del final de la pantalla podrá ver una línea que
|
||||
comienza y termina con guiones, y comienza con "--:-- TUTORIAL.es" o
|
||||
algo así. Esta parte de la pantalla normalmente muestra el nombre del
|
||||
archivo que está visitando. En este momento está visitando un archivo
|
||||
llamado "TUTORIAL.es" que es su borrador personal del tutorial de
|
||||
Emacs. Cuando encuentre un archivo con Emacs, el nombre de ese
|
||||
archivo aparecerá en ese mismo punto.
|
||||
comienza con guiones, y empieza con " -:--- TUTORIAL.es" o algo así.
|
||||
Esta parte de la pantalla normalmente muestra el nombre del archivo
|
||||
que está visitando. En este momento está visitando su propia copia
|
||||
del tutorial de Emacs, que se llama "TUTORIAL.es". Cuando encuentre
|
||||
un archivo con Emacs, el nombre de ese archivo aparecerá en ese mismo
|
||||
punto.
|
||||
|
||||
Una cosa especial acerca del comando para encontrar un archivo, es que
|
||||
tendrá que decir que nombre de archivo desea. Decimos que el comando
|
||||
"lee un argumento desde la terminal" (en este caso, el argumento es el
|
||||
nombre del archivo). Después de teclear el comando:
|
||||
"lee un argumento" (en este caso, el argumento es el nombre del
|
||||
archivo). Después de teclear el comando:
|
||||
|
||||
C-x C-f Encontrar un archivo
|
||||
|
||||
|
|
@ -544,13 +542,12 @@ entrada al minibuffer) puede cancelar el comando con C-g.
|
|||
Así que no encontrará archivo alguno.
|
||||
|
||||
Cuando haya finalizado de ingresar el nombre del archivo, teclee
|
||||
<Return> para terminarlo. Entonces el comando C-x C-f trabaja, y
|
||||
encuentra el archivo que escogió. El minibuffer desaparece cuando el
|
||||
comando C-x C-f termina.
|
||||
<Return> para terminarlo. El minibuffer desaparece, y el comando C-x
|
||||
C-f trabaja para encontrar el archivo que escogió.
|
||||
|
||||
Poco tiempo después aparecerá el contenido del archivo en la pantalla,
|
||||
y puede editarlo. Cuando quiera que sus cambios sean permanentes,
|
||||
teclee el comando
|
||||
En seguida aparecerá el contenido del archivo en la pantalla, y puede
|
||||
editarlo. Cuando quiera que sus cambios sean permanentes, teclee el
|
||||
comando
|
||||
|
||||
C-x C-s Guardar el archivo
|
||||
|
||||
|
|
@ -561,11 +558,12 @@ final del nombre del archivo original.
|
|||
|
||||
Cuando guardar haya terminado, Emacs mostrará el nombre del archivo
|
||||
escrito. Deberá guardar frecuentemente, para que no pierda mucho
|
||||
trabajo si el sistema falla.
|
||||
trabajo si el sistema falla (vea la sección "AUTO GUARDADO", más
|
||||
adelante).
|
||||
|
||||
>> Teclee C-x C-s, guardando la copia del tutorial.
|
||||
Esto debería mostrar "Wrote ...TUTORIAL.es" al final de la
|
||||
pantalla.
|
||||
>> Teclee C-x C-s TUTORIAL.es <Return>
|
||||
Esto guardará el tutorial en un archivo llamado TUTORIAL.es, y
|
||||
mostrará "Wrote ...TUTORIAL.es" al final de la pantalla.
|
||||
|
||||
Puede encontrar un archivo existente, para verlo o editarlo. También
|
||||
puede hacerlo con un archivo que no exista. Ésta es la forma de crear
|
||||
|
|
@ -584,16 +582,10 @@ dentro de Emacs. Puede volver a el encontr
|
|||
C-f. De esta forma puede mantener un gran número de archivos dentro
|
||||
de Emacs.
|
||||
|
||||
>> Cree un archivo llamado "foo" tecleando C-x C-f foo <Return>.
|
||||
Luego inserte algún texto, edítelo, y guarde "foo" tecleando C-x
|
||||
C-s.
|
||||
Finalmente teclee C-x C-f TUTORIAL.es <Return>
|
||||
para regresar al tutorial.
|
||||
|
||||
Emacs almacena cada texto del archivo dentro de un objeto llamado
|
||||
"buffer". Al encontrar un archivo se crea un nuevo buffer dentro de
|
||||
Emacs. Para mirar la lista de los buffers que existen actualmente en
|
||||
su sesión de Emacs, teclee:
|
||||
Emacs. Para mirar la lista de los buffers que existen actualmente,
|
||||
teclee:
|
||||
|
||||
C-x C-b Lista de buffers
|
||||
|
||||
|
|
@ -612,22 +604,24 @@ que corresponde a un archivo, puede hacerlo visitando el archivo de
|
|||
nuevo con C-x C-f. Pero existe una manera más rápida: use el comando
|
||||
C-x b. En ese comando, necesita teclear el nombre de buffer.
|
||||
|
||||
>> Teclee C-x b foo <Return> para volver al buffer "foo" que contiene
|
||||
el texto del archivo "foo". Después teclee C-x b TUTORIAL.es
|
||||
<Return> para regresar a este tutorial.
|
||||
>> Cree un archivo llamado "foo" tecleando C-x C-f foo <Return>.
|
||||
Después teclee C-x b TUTORIAL.es <Return> para regresar a este
|
||||
tutorial.
|
||||
|
||||
La mayoría del tiempo el nombre del buffer es el mismo que el nombre
|
||||
del archivo (sin la parte del directorio del archivo). Sin embargo,
|
||||
esto no es así siempre. La lista de buffers que hace con C-x C-b
|
||||
siempre muestra el nombre de todos los buffers.
|
||||
muestra el nombre de cada buffer y de su archivo correspondiente.
|
||||
|
||||
CUALQUIER texto que vea en una ventana de Emacs siempre es parte de un
|
||||
buffer. Algunos buffers no corresponden a un archivo. Por ejemplo,
|
||||
el buffer llamado "*Buffer List*" no tiene ningún archivo. Es el
|
||||
buffer que contiene la lista de buffers que ha creado con C-x C-b. El
|
||||
buffer llamado "*Messages*" tampoco tiene un archivo correspondiente;
|
||||
contiene los mensajes que han aparecido en la línea de abajo durante
|
||||
su sesión de Emacs.
|
||||
Algunos buffers no corresponden a un archivo. El buffer llamado
|
||||
"*Buffer List*", que contiene la lista de buffers que ha creado con
|
||||
C-x C-b, no tiene archivo. Este buffer TUTORIAL.es al principio no
|
||||
tenía archivo, pero ahora ya sí, porque en la sección anterior tecleó
|
||||
C-x C-s y lo guardó en un archivo.
|
||||
|
||||
El buffer llamado "*Messages*" tampoco tiene un archivo
|
||||
correspondiente. Este buffer contiene los mensajes que han aparecido
|
||||
en la línea de abajo durante su sesión de Emacs.
|
||||
|
||||
>> Teclee C-x b *Messages* <Return> para ver el buffer de mensajes.
|
||||
Luego teclee C-x b TUTORIAL <Return> para regresar a este tutorial.
|
||||
|
|
@ -669,45 +663,45 @@ comando C-x C-c. (No se preocupe por perder los cambios que haya
|
|||
hecho; C-x C-c ofrece guardar cada archivo alterado antes de finalizar
|
||||
Emacs.)
|
||||
|
||||
C-z es el comando para salir de Emacs *temporalmente*: para que pueda
|
||||
regresar a la misma sesión de Emacs después.
|
||||
Si está utilizando una pantalla gráfica, no necesita ningún comando
|
||||
especial para cambiar de Emacs a otra aplicación. Puede hacerlo con
|
||||
el ratón, o mediante el gestor de ventanas. Sin embargo, si está
|
||||
usando una terminal que solo puede mostrar una aplicación a la vez,
|
||||
tendrá que "suspender" Emacs para poder acceder a otros programas.
|
||||
|
||||
En sistemas que lo permiten C-z "suspende" Emacs; esto es, se regresa
|
||||
al intérprete de comandos pero no se destruye Emacs. En los
|
||||
C-z es el comando para salir de Emacs *temporalmente*: para que pueda
|
||||
regresar a la misma sesión de Emacs después. Cuando Emacs está
|
||||
ejecutándose en una terminal, C-z "suspende" Emacs; esto es, se
|
||||
regresa al intérprete de comandos pero no se destruye Emacs. En los
|
||||
intérpretes de comandos más comunes, puede reanudar Emacs con el
|
||||
comando `fg' o con `%emacs'.
|
||||
|
||||
En sistemas que no implementen el suspendido, C-z crea un
|
||||
subintérprete que corre bajo Emacs para darle la opción de correr
|
||||
otros programas y regresar a Emacs después; esto en realidad no "sale"
|
||||
de Emacs. En este caso, el comando `exit' del intérprete es la vía
|
||||
usual para regresar a Emacs desde éste.
|
||||
|
||||
El momento para usar C-x C-c es cuando está listo para salir del
|
||||
sistema. Es además el paso correcto para salir de un Emacs llamado
|
||||
bajo programas de manejo de correo y diversas otras utilidades, puesto
|
||||
que ellos no saben cómo lidiar con la suspensión de Emacs. En
|
||||
circunstancias normales, si no va a salir, es mejor suspender
|
||||
Emacs con C-z en lugar de salir de él.
|
||||
bajo programas de gestión de correo y otras utilidades diversas.
|
||||
|
||||
Existen varios comandos C-x. Aquí hay una lista de los que ha
|
||||
Existen muchos comandos C-x. He aquí la lista de los que ya ha
|
||||
aprendido:
|
||||
|
||||
C-x C-f Encontrar archivo.
|
||||
C-x C-s Guardar archivo.
|
||||
C-x C-b Lista de buffers.
|
||||
C-x C-c Salir de Emacs.
|
||||
C-x 1 Borrar todo menos una ventana.
|
||||
C-x u Deshacer.
|
||||
C-x C-f Encontrar archivo
|
||||
C-x C-s Guardar archivo
|
||||
C-x s Guardar varios buffers
|
||||
C-x C-b Lista de buffers
|
||||
C-x b Cambiar a otro buffer
|
||||
C-x C-c Salir de Emacs
|
||||
C-x 1 Borrar todo menos una ventana
|
||||
C-x u Deshacer
|
||||
|
||||
Los comandos eXtendidos por nombre son comandos que se utilizan aún
|
||||
con menos frecuencia, o únicamente en ciertos modos. Un ejemplo es el
|
||||
comando replace-string, el cual globalmente substituye una cadena de
|
||||
caracteres por otra. Cuando teclea M-x, Emacs le pregunta al
|
||||
final de la pantalla con M-x y debe escribir el nombre del
|
||||
comando; en este caso "replace-string". Solo teclee "repl s<TAB>" y
|
||||
Emacs completará el nombre. Finalice el nombre del comando con
|
||||
<Return>.
|
||||
comando replace-string, el cual substituye globalmente una cadena de
|
||||
caracteres por otra. Cuando teclea M-x, Emacs le pregunta al final de
|
||||
la pantalla con M-x y debe escribir el nombre del comando; en este
|
||||
caso "replace-string". Solo teclee "repl s<TAB>" y Emacs completará
|
||||
el nombre. (<TAB> es la tecla del tabulador, que habitualmenté está
|
||||
situada sobre la tecla de bloquear mayúsculas o la de shift, en el
|
||||
lado izquierdo del teclado.) Para aceptar el comando y ejecutarlo,
|
||||
pulse <Return>.
|
||||
|
||||
El comando replace-string requiere dos argumentos: la cadena de
|
||||
caracteres a reemplazar, y la cadena de caracteres para reemplazarla.
|
||||
|
|
@ -733,11 +727,11 @@ un # al principio y al final; por ejemplo, si su archivo se llama
|
|||
"hola.c", su archivo auto guardado es "#hola.c#". Cuando guarda por
|
||||
la vía normal, Emacs borra su archivo de auto guardado.
|
||||
|
||||
Si la computadora falla, puede recuperar su edición de auto
|
||||
guardado encontrando el archivo normal (el archivo que estuvo
|
||||
editando, no el archivo de auto guardar) y entonces tecleando M-x
|
||||
recover file<Return>. Cuando le pregunte por la confirmación, teclee
|
||||
yes<Return> para ir y recuperar la información del auto guardado.
|
||||
Si la computadora falla, puede recuperar su edición de auto guardado
|
||||
encontrando el archivo normal (el archivo que estuvo editando, no el
|
||||
archivo de auto guardar) y entonces tecleando M-x recover-file
|
||||
<Return>. Cuando le pregunte por la confirmación, teclee yes<Return>
|
||||
para seguir adelante y recuperar la información de auto guardado.
|
||||
|
||||
|
||||
* ÁREA DE ECO
|
||||
|
|
@ -754,20 +748,20 @@ lentamente, se los muestra al final de la pantalla en un
|
|||
La línea inmediatamente encima del área de eco recibe el nombre de
|
||||
"línea de modo" o "mode line". La línea de modo dice algo así:
|
||||
|
||||
--:** TUTORIAL.es (Fundamental)--l765--65%---------
|
||||
-:**- TUTORIAL.es 63% L749 (Fundamental)
|
||||
|
||||
Esta línea da información útil acerca del estado de Emacs y del texto
|
||||
que está editando.
|
||||
|
||||
Ya sabe qué significa el nombre del archivo: es el archivo que usted
|
||||
ha encontrado. -NN%-- indica su posición actual en el texto; esto
|
||||
ha encontrado. NN% indica su posición actual en el texto; esto
|
||||
significa que NN por ciento del texto está encima de la parte superior
|
||||
de la pantalla. Si el principio del archivo está en la pantalla, éste
|
||||
dirá --Top-- en vez de --00%--. Si el final del texto está en la
|
||||
pantalla, dirá --Bot--. Si está mirando un texto tan pequeño que cabe
|
||||
en la pantalla, el modo de línea dirá --All--.
|
||||
dirá "Top" en vez de " 0%". Si el final del texto está en la
|
||||
pantalla, dirá "Bot". Si está mirando un texto tan pequeño que cabe
|
||||
entero en la pantalla, el modo de línea dirá "All".
|
||||
|
||||
La L y los dígitos indican la posición de otra forma: ellos dan el
|
||||
La L y los dígitos señalan la posición de otra forma: indican el
|
||||
número de línea actual del punto.
|
||||
|
||||
Los asteriscos cerca del frente significan que usted ha hecho cambios
|
||||
|
|
@ -795,7 +789,8 @@ fundamental-mode es un comando para cambiar al modo fundamental.
|
|||
|
||||
Si va a editar un texto de algún lenguaje humano, como este archivo,
|
||||
debería usar el modo de texto.
|
||||
>> Teclee M-x text mode<Return>.
|
||||
|
||||
>> Teclee M-x text-mode <Return>.
|
||||
|
||||
No se preocupe, ninguno de los comandos de Emacs que ha aprendido
|
||||
cambia de manera significativa. Pero puede observar que M-f y M-b
|
||||
|
|
@ -805,20 +800,20 @@ de palabras.
|
|||
|
||||
Los modos mayores normalmente hacen cambios sutiles como el anterior:
|
||||
la mayoría de comandos hacen "el mismo trabajo" en cada modo mayor,
|
||||
pero funcionan un poco diferente.
|
||||
pero funcionan de forma un poco diferente.
|
||||
|
||||
Para ver documentación en el modo mayor actual, teclee C-h m.
|
||||
Para ver la documentación del modo mayor actual, teclee C-h m.
|
||||
|
||||
>> Use C-u C-v una o más veces para traer esta línea cerca de la
|
||||
parte superior de la pantalla.
|
||||
>> Use C-l C-l para traer esta línea en la parte superior de la
|
||||
pantalla.
|
||||
|
||||
>> Teclee C-h m, para ver como el modo de Texto difiere del modo
|
||||
Fundamental.
|
||||
|
||||
>> Teclee C-x 1 para eliminar la documentación de la pantalla.
|
||||
|
||||
Los modos mayores son llamados así porque también hay modos menores.
|
||||
Los modos menores no son alternativas para los modos mayores, solo
|
||||
Los modos mayores se llaman así porque también hay modos menores. Los
|
||||
modos menores no son alternativas para los modos mayores, solo
|
||||
modificaciones menores de éstos. Cada modo menor puede ser activado o
|
||||
desactivado por sí mismo, independiente de todos los otros modos
|
||||
menores, e independiente de su modo mayor. Por tanto, puede no usar
|
||||
|
|
@ -830,13 +825,13 @@ espa
|
|||
rompe la línea entre palabras automáticamente siempre que inserte
|
||||
texto y la línea sea demasiado ancha.
|
||||
|
||||
Puede activar el modo Auto Fill al hacer M-x auto fill mode<Return>.
|
||||
Puede activar el modo Auto Fill al hacer M-x auto-fill-mode <Return>.
|
||||
Cuando el modo esté activado, puede desactivarlo nuevamente usando M-x
|
||||
auto fill mode<Return>. Si el modo está desactivado, este comando lo
|
||||
auto-fill-mode <Return>. Si el modo está desactivado, este comando lo
|
||||
activa, y si el modo está activado, este comando lo desactiva.
|
||||
Decimos que el comando "cambia el modo".
|
||||
|
||||
>> teclee M-x auto fill mode<Return> ahora. Luego inserte una línea
|
||||
>> teclee M-x auto-fill-mode <Return> ahora. Luego inserte una línea
|
||||
de "asdf " repetidas veces hasta que la vea dividida en dos líneas.
|
||||
Debe intercalar espacios porque Auto Fill sólo rompe líneas en los
|
||||
espacios.
|
||||
|
|
@ -861,15 +856,13 @@ ese p
|
|||
* BUSCAR
|
||||
--------
|
||||
|
||||
Emacs puede hacer búsquedas de cadenas (grupos de caracteres o
|
||||
palabras contiguos) hacia adelante a través del texto o hacia atrás en
|
||||
el mismo. La búsqueda de una cadena es un comando de movimiento de
|
||||
Emacs puede hacer búsquedas de cadenas (una "cadena" es un grupo de
|
||||
caracteres contiguos) hacia adelante a través del texto o hacia atrás
|
||||
en el mismo. La búsqueda de una cadena es un comando de movimiento de
|
||||
cursor; mueve el cursor al próximo lugar donde esa cadena aparece.
|
||||
|
||||
El comando de búsqueda de Emacs es diferente a los comandos de
|
||||
búsqueda de los demás editores, en que es "incremental". Esto
|
||||
significa que la búsqueda ocurre mientras teclea la cadena para
|
||||
buscarla.
|
||||
El comando de búsqueda de Emacs es "incremental". Esto significa que
|
||||
la búsqueda ocurre mientras teclea la cadena para buscarla.
|
||||
|
||||
El comando para iniciar una búsqueda es C-s para búsqueda hacia
|
||||
adelante, y C-r para la búsqueda hacia atrás. ¡PERO ESPERE! No los
|
||||
|
|
@ -886,7 +879,7 @@ quiere buscar. <Return> termina una b
|
|||
Ahora ha buscado "cursor", una vez.
|
||||
>> Teclee C-s de nuevo, para buscar la siguiente ocurrencia de
|
||||
"cursor".
|
||||
>> Ahora teclee <Delback> cuatro veces y vea como se mueve el cursor.
|
||||
>> Ahora teclee <DEL> cuatro veces y vea como se mueve el cursor.
|
||||
>> Teclee <Return> para terminar la búsqueda.
|
||||
|
||||
¿Vió lo que ocurrió? Emacs, en una búsqueda incremental, trata de ir
|
||||
|
|
@ -895,27 +888,22 @@ ir a la pr
|
|||
tal ocurrencia no existe, Emacs pita y le dice que la búsqueda actual
|
||||
está fallando ("failing"). C-g también termina la búsqueda.
|
||||
|
||||
NOTA: En algunos sistemas, teclear C-s dejará inmóvil la pantalla y no
|
||||
podrá ver más respuesta de Emacs. Esto indica que una
|
||||
"característica" del sistema operativo llamada "control de flujo" está
|
||||
interceptando el C-s y no permitiéndole llegar hasta Emacs. Para
|
||||
descongelar la pantalla, teclee C-q. Luego consulte la sección
|
||||
"Entrada Espontánea para Búsqueda Incremental" en el manual de Emacs
|
||||
para consejos de cómo tratar con esta "característica".
|
||||
|
||||
Si se encuentra en medio de una búsqueda incremental y teclea
|
||||
<Delback>, notará que el último carácter de la cadena buscada se borra
|
||||
y la búsqueda vuelve al sitio anterior de la búsqueda. Por ejemplo,
|
||||
suponga que ha tecleado "c", para buscar la primera ocurrencia de "c".
|
||||
Ahora, si teclea "u", el cursor se moverá a la primera ocurrencia de
|
||||
"cu". Ahora teclee <Delback>. Esto borra la "u" de la cadena
|
||||
buscada, y el cursor vuelve a la primera ocurrencia de "c".
|
||||
Si se encuentra en medio de una búsqueda incremental y teclea <DEL>,
|
||||
la búsqueda "vuelve" a un punto anterior. Si teclea <DEL> justo
|
||||
después de teclear C-s para avanzar hasta la siguiente ocurrencia de
|
||||
la cadena buscada, el cursor retrocede a una ocurrencia previa. Si no
|
||||
hay ocurrencias previas, <DEL> borra el último carácter de la cadena
|
||||
buscada. Por ejemplo, suponga que ha tecleado "c", para buscar la
|
||||
primera ocurrencia de "c". Ahora, si teclea "u", el cursor se moverá
|
||||
a la primera ocurrencia de "cu". Ahora teclee <DEL>. Esto borra la
|
||||
"u" de la cadena buscada, y el cursor vuelve a la primera ocurrencia
|
||||
de "c".
|
||||
|
||||
Si está en medio de una búsqueda y teclea un carácter control o meta
|
||||
(con algunas pocas excepciones: los caracteres que son especiales en
|
||||
una búsqueda, tales como C-s y C-r), la búsqueda termina.
|
||||
|
||||
El C-s inicia una exploración que busca alguna ocurrencia de la cadena
|
||||
C-s inicia una exploración que busca alguna ocurrencia de la cadena
|
||||
buscada DESPUÉS de la posición actual del cursor. Si quiere buscar
|
||||
algo anterior en el texto, teclee en cambio C-r. Todo lo que hemos
|
||||
dicho sobre C-s también se aplica a C-r, excepto que la dirección de
|
||||
|
|
@ -926,14 +914,16 @@ la b
|
|||
--------------------
|
||||
|
||||
Una de las características agradables de Emacs es que se puede mostrar
|
||||
más de una ventana en la pantalla al mismo tiempo.
|
||||
más de una ventana en la pantalla al mismo tiempo. (Note que Emacs
|
||||
usa el término "marcos", descrito en la siguiente sección, para
|
||||
referirse a lo que otras aplicaciones llaman "ventanas". El manual de
|
||||
Emacs contiene un Glosario de términos.)
|
||||
|
||||
>> Mueva el cursor a esta línea y teclee C-u 0 C-l (eso es CONTROL-L,
|
||||
no CONTROL-1).
|
||||
>> Mueva el cursor a esta línea y teclee C-l C-l.
|
||||
|
||||
>> Ahora teclee C-x 2 que divide la pantalla en dos ventanas. Ambas
|
||||
ventanas muestran este tutorial. El cursor permanece en la ventana
|
||||
superior.
|
||||
>> Ahora teclee C-x 2 que divide la pantalla en dos ventanas.
|
||||
Ambas ventanas muestran este tutorial. El cursor de edición
|
||||
permanece en la ventana superior.
|
||||
|
||||
>> Teclee C-M-v para desplazar la ventana inferior.
|
||||
(Si no tiene una tecla META real, teclee ESC C-v.)
|
||||
|
|
@ -947,24 +937,25 @@ m
|
|||
superior.
|
||||
El cursor en la ventana superior está justo donde estaba antes.
|
||||
|
||||
Puede continuar usando C-x o para cambiar entre las ventanas. Cada
|
||||
ventana tiene su propia posición del cursor, pero únicamente una
|
||||
ventana actual muestra el cursor. Todos los comandos de edición
|
||||
comunes se aplican a la ventana en que está el cursor. Llamaremos
|
||||
esto la "ventana seleccionada".
|
||||
Puede continuar usando C-x o para cambiar entre las ventanas. La
|
||||
"ventana seleccionada", donde tiene lugar casi toda la edición, es la
|
||||
que tiene un cursor muy visible que parpadea cuando usted no está
|
||||
tecleando. Las otras ventanas tienen sus propia posición del cursor;
|
||||
si está ejecutando Emacs en una pantalla gráfica, esos cursores se
|
||||
muestran como rectángulos vacíos que no parpadean.
|
||||
|
||||
El comando C-M-v es muy útil cuando está editando un texto en una
|
||||
ventana y usando la otra ventana como referencia. Puede mantener el
|
||||
cursor siempre en la ventana donde está editando, y avanzar a la otra
|
||||
ventana secuencialmente con C-M-v.
|
||||
ventana y usando la otra ventana como referencia. Sin moverse de la
|
||||
ventana seleccionada, puede desplazar el texto de la otra ventana con
|
||||
C-M-v.
|
||||
|
||||
C-M-v es un ejemplo de un carácter CONTROL-META. Si tiene una tecla
|
||||
META real, puede teclear C-M-v pulsando a la vez CONTROL y META
|
||||
META (o Alt), puede teclear C-M-v pulsando a la vez CONTROL y META
|
||||
mientras teclea v. No importa qué tecla "vaya primero", CONTROL o
|
||||
META, porque las dos teclas actúan modificando los caracteres que
|
||||
teclea.
|
||||
|
||||
Si no tiene una tecla META real, y en vez de eso usa ESC, el orden sí
|
||||
Si no tiene una tecla META, y en vez de eso usa ESC, el orden sí
|
||||
importa: debe teclear ESC seguido de Control-v, porque Control-ESC v
|
||||
no funcionará. Esto es porque ESC es un carácter que tiene valor por
|
||||
sí mismo, no es una tecla modificadora.
|
||||
|
|
@ -992,6 +983,32 @@ diferentes:
|
|||
borrar la ventana inferior.
|
||||
|
||||
|
||||
* MÚLTIPLES MARCOS
|
||||
------------------
|
||||
|
||||
Emacs puede crear también múltiples "marcos". Marco es como
|
||||
denominamos a un grupo de ventanas, junto con sus menus, barras de
|
||||
desplazamiento, áreas de eco, etc. En entornos gráficos, lo que Emacs
|
||||
denomina "marco" es lo que otras aplicaciones llaman "ventana". En
|
||||
entornos gráficos, es posible mostrar varios marcos al mismo tiempo.
|
||||
En una terminal, solo se puede mostrar un marco a la vez.
|
||||
|
||||
>> Teclee M-x make-frame <Return>.
|
||||
En la pantalla aparecerá un nuevo marco.
|
||||
|
||||
En el nuevo marco puede hacer todo lo que hacía en el marco original.
|
||||
El primer marco no tiene nada de especial.
|
||||
|
||||
>> Teclee M-x delete-frame <Return>.
|
||||
Esto destruye el marco seleccionado.
|
||||
|
||||
También puede destruir un marco mediante el método normal que ofrezca
|
||||
el entorno gráfico (a menudo, pinchando con el ratón en un botón
|
||||
etiquetado como "X" en alguna de las esquinas superiores del marco).
|
||||
Si al hacer eso destruye el último marco de Emacs, la aplicación
|
||||
termina.
|
||||
|
||||
|
||||
* NIVELES RECURSIVOS DE EDICIÓN
|
||||
--------------------------------
|
||||
|
||||
|
|
@ -1024,32 +1041,27 @@ Emacs. Todos estos comandos de "ayuda" comienzan con el car
|
|||
Control-h, que es llamado "el carácter de Ayuda (Help)".
|
||||
|
||||
Para usar las funciones de ayuda, teclee el carácter C-h, y luego un
|
||||
carácter decidiendo qué tipo de ayuda quiere. Si está REALMENTE
|
||||
carácter que especifica qué tipo de ayuda quiere. Si está REALMENTE
|
||||
perdido teclee C-h ? y Emacs le dirá qué tipo de ayuda puede
|
||||
ofrecerle. Si ha tecleado C-h y decide que no quiere ninguna ayuda,
|
||||
teclee C-g para cancelarlo.
|
||||
|
||||
(En algunas instalaciones cambian el significado del carácter C-h.
|
||||
Realmente no deberían hacer esto como una política para todos los
|
||||
usuarios, así que tiene argumentos para quejarse al administrador del
|
||||
sistema. Mientras tanto, si C-h no muestra un mensaje de ayuda en el
|
||||
final de la pantalla, intente teclear la tecla F1 o, en su lugar, M-x
|
||||
help <Return>).
|
||||
(Si C-h no muestra un mensaje de ayuda en el final de la pantalla,
|
||||
intente teclear la tecla F1 o, en su lugar, M-x help <Return>.)
|
||||
|
||||
La función de AYUDA más básica es C-h c. Teclee C-h, el carácter c y
|
||||
un carácter de comando o secuencia de comando; Emacs le mostrará
|
||||
una descripción muy breve del comando.
|
||||
|
||||
>> Teclee C-h c C-p.
|
||||
El mensaje debe ser algo como
|
||||
El mensaje debe ser algo como
|
||||
|
||||
C-p runs the command previous-line
|
||||
|
||||
Esto le dice el "nombre de la función". Los nombres de función se
|
||||
usan principalmente para adecuar y extender Emacs. Pero ya que los
|
||||
nombres de las funciones se eligen para indicar lo que el comando
|
||||
hace, también pueden servir como una breve documentación: suficiente
|
||||
para recordarle los comandos que ha aprendido.
|
||||
Esto le dice el "nombre de la función". Ya que los nombres de las
|
||||
funciones se eligen para indicar lo que hace el comando, pueden servir
|
||||
como una breve documentación: suficiente para recordarle los comandos
|
||||
que ha aprendido.
|
||||
|
||||
Los comandos de múltiples caracteres tales como C-x C-s y (sí no tiene
|
||||
las teclas META o EDIT o ALT) <ESC>v también están permitidos después
|
||||
|
|
@ -1062,22 +1074,23 @@ C-h c.
|
|||
|
||||
Esto muestra la documentación de la función, al igual que el nombre,
|
||||
en una ventana de Emacs. Cuando haya terminado de leer el resultado,
|
||||
teclee C-x 1 para deshacerse del texto de ayuda. No tiene que hacer
|
||||
esto ahora. Puede hacer algunas ediciones mientras se refiere
|
||||
al texto de ayuda, y entonces teclear C-x 1.
|
||||
teclee C-x 1 para deshacerse de la ventana. No tiene que hacer esto
|
||||
ahora. Puede hacer algunas ediciones mientras se refiere al texto de
|
||||
ayuda, y entonces teclear C-x 1.
|
||||
|
||||
Aquí hay algunas otras opciones útiles de C-h:
|
||||
|
||||
C-h f Describe una función. Usted teclea el nombre de la
|
||||
función.
|
||||
|
||||
>> Intente teclear C-h f previous-line<Return>.
|
||||
>> Intente teclear C-h f previous-line <Return>.
|
||||
Esto muestra toda la información que Emacs tiene sobre la función
|
||||
que implementa el comando C-p
|
||||
|
||||
Un comando similar, C-h v, muestra la documentación de variables cuyos
|
||||
valores pueda poner para adecuar el comportamiento de Emacs. Necesita
|
||||
teclear el nombre de la variable cuando Emacs pregunte por ella.
|
||||
Un comando similar, C-h v, muestra documentación de las variables,
|
||||
incluyendo los valores que pueda poner para adaptar el comportamiento
|
||||
de Emacs. Deberá teclear el nombre de la variable cuando Emacs
|
||||
pregunte por ella.
|
||||
|
||||
C-h a Comando Apropos. Teclee una palabra y Emacs hará una
|
||||
lista de todos los comandos que contengan esa palabra.
|
||||
|
|
@ -1086,7 +1099,7 @@ teclear el nombre de la variable cuando Emacs pregunte por ella.
|
|||
listará una secuencia de uno o dos caracteres la cual
|
||||
ejecutará el mismo comando.
|
||||
|
||||
>> Teclee C-h a file<Return>.
|
||||
>> Teclee C-h a file <Return>.
|
||||
|
||||
Esto muestra en otra ventana una lista de todos los comandos M-x con
|
||||
la palabra "file" en sus nombres. Verá comandos de caracteres como
|
||||
|
|
@ -1098,36 +1111,37 @@ correspondientes tales como find-file.
|
|||
|
||||
>> Teclee C-x 1 para borrar la ventana de ayuda.
|
||||
|
||||
C-h i Leer los Manuales En-Línea (alias Info). Este comando
|
||||
C-h i Leer los manuales incluidos (alias Info). Este comando
|
||||
lo pone en un buffer especial llamado `*info*' donde
|
||||
puede leer manuales en línea de los paquetes
|
||||
instalados en su sistema. Teclee m Emacs <Return>
|
||||
para leer el manual de Emacs. Sí nunca ha usado Info
|
||||
antes, teclee ? y Emacs lo llevará en una visita
|
||||
guiada de los servicios del modo de Info. Una vez que
|
||||
haya terminado este tutorial, debería considerar el
|
||||
manual Info de Emacs como su documentación primaria.
|
||||
puede leer manuales de los paquetes instalados en su
|
||||
sistema. Teclee m emacs <Return> para leer el manual
|
||||
de Emacs. Si nunca ha usado Info, teclee ? y Emacs y
|
||||
lo llevará por una visita guiada de los servicios del
|
||||
modo de Info. Una vez que haya terminado este
|
||||
tutorial, debería considerar el manual Info de Emacs
|
||||
como su documentación primaria.
|
||||
|
||||
|
||||
* MÁS CARACTERÍSTICAS
|
||||
---------------------
|
||||
|
||||
Puede aprender más de Emacs leyendo su manual, ya sea como libro o en
|
||||
línea en el Info (use el menú Ayuda--"Help"--o teclee F10 h r). Dos
|
||||
características que pueden gustarle son la completación, que ahorra
|
||||
teclear, y dired, que simplifica el manejo de archivos.
|
||||
Puede aprender más acerca de Emacs leyendo su manual, ya sea como
|
||||
libro o en el propio Emacs (use el menú Ayuda, "Help", o teclee C-h
|
||||
r). Dos características que pueden gustarle son la completación, que
|
||||
ahorra teclear, y dired, que simplifica el manejo de archivos.
|
||||
|
||||
La completación es una manera de ahorrar teclear innecesariamente.
|
||||
Por ejemplo, si quiere cambiarse al buffer "*Messages*", puede teclear
|
||||
C-x b *M<Tab> y emacs encontrará el resto del nombre del buffer tan
|
||||
lejos como pueda determinar de lo que ya haya tecleado. La
|
||||
completación es descrita en el Info del manual de Emacs en el nodo
|
||||
llamado "Completation".
|
||||
completación también funciona con nombres de comandos y de archivos.
|
||||
La completación se describe en el Info del manual de Emacs en el nodo
|
||||
llamado "Completion".
|
||||
|
||||
Dired le permite listar los archivos en un directorio (y opcionalmente
|
||||
sus subdirectorios), moverse alrededor de esa lista, visitar,
|
||||
renombrar, borrar y aparte de eso operar en los archivos. Dired está
|
||||
descrito en el Info en el manual de Emacs en el nodo llamado "Dired".
|
||||
descrito en el manual de Emacs en el nodo llamado "Dired".
|
||||
|
||||
El manual también describe otras características de Emacs.
|
||||
|
||||
|
|
@ -1135,13 +1149,11 @@ El manual tambi
|
|||
* CONCLUSIÓN
|
||||
------------
|
||||
|
||||
Recuerde, para salir permanentemente de Emacs use C-x C-c. Para salir
|
||||
temporalmente a un intérprete de comandos, de forma que puede volver a
|
||||
Emacs después, use C-z.
|
||||
Para salir permanentemente de Emacs use C-x C-c.
|
||||
|
||||
Este tutorial intenta ser comprensible para todos los usuarios nuevos,
|
||||
así que si encuentra algo que no esté claro, no se siente y se culpe a
|
||||
sí mismo: ¡Quéjese!
|
||||
así que si encuentra algo que no esté claro, no se quede parado
|
||||
culpándose a sí mismo: ¡Quéjese!
|
||||
|
||||
|
||||
* COPIA
|
||||
|
|
@ -1174,6 +1186,7 @@ La versi
|
|||
La versión en español ha sido actualizada por:
|
||||
|
||||
Rafael Sepúlveda <drs@gnulinux.org.mx>
|
||||
Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
Por favor, en caso de duda, sólo es válido el original en inglés de la
|
||||
siguiente nota de derechos de reproducción (que puede encontrar en el
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ qu'il
|
|||
des C-p. Notez ce que fait C-p lorsque le curseur est au milieu de
|
||||
la ligne.
|
||||
|
||||
|
||||
Chaque ligne de texte se termine par un caractère Newline, qui sert à
|
||||
la séparer de la ligne suivante. La dernière ligne de votre fichier
|
||||
devrait se terminer par un Newline (mais Emacs n'exige pas qu'il y en
|
||||
|
|
@ -180,7 +179,7 @@ ainsi que les commandes de d
|
|||
|
||||
M-< (Meta inférieur à) et M-> (Meta supérieur à) sont deux autres
|
||||
commandes importantes de déplacement du curseur. La première renvoie
|
||||
au tout début du texte, la seconde à la fin de celui-ci.
|
||||
au tout début du texte, la seconde à la toute fin de celui-ci.
|
||||
|
||||
Sur certains claviers, le "<" se trouve sous la virgule, vous devez
|
||||
donc utiliser la touche <Maj> pour y avoir accès. Sur ces terminaux,
|
||||
|
|
@ -228,9 +227,9 @@ vues jusqu'
|
|||
d'un paramètre préfixe, quelle que soit sa valeur, force la commande à
|
||||
agir différemment.
|
||||
|
||||
C-v et M-v constituent un autre type d'exception. Lorsqu'on leur
|
||||
donne un paramètre, elles font défiler l'écran vers le haut ou vers le
|
||||
bas du nombre de lignes indiqué au lieu de passer d'un écran complet à
|
||||
C-v et M-v constituent un autre type d'exception. Lorsqu'on leur donne
|
||||
un paramètre, elles font défiler l'écran vers le haut ou vers le bas
|
||||
du nombre de lignes indiqué au lieu de passer d'un écran complet à
|
||||
l'autre. C-u 8 C-v, par exemple, fait défiler l'écran de 8 lignes.
|
||||
|
||||
>> Faites C-u 8 C-v.
|
||||
|
|
@ -248,8 +247,9 @@ d
|
|||
Si votre souris a une molette, vous pouvez aussi l'utiliser pour faire
|
||||
défiler le texte.
|
||||
|
||||
* QUAND EMACS EST MUET
|
||||
----------------------
|
||||
|
||||
* QUAND EMACS NE RÉPOND PLUS
|
||||
----------------------------
|
||||
|
||||
Si Emacs cesse de répondre à vos commandes, vous pouvez le débloquer
|
||||
en toute sécurité avec C-g. Cette commande fait stopper une commande
|
||||
|
|
@ -267,8 +267,8 @@ Si vous avez tap
|
|||
avec un C-g.
|
||||
|
||||
|
||||
* COMMANDES DÉSACTIVÉES
|
||||
------------------------
|
||||
* COMMANDES DÉSACTIVÉES
|
||||
-----------------------
|
||||
|
||||
Certaines commandes d'Emacs sont « désactivées » afin que les
|
||||
utilisateurs débutants ne puissent les utiliser par accident.
|
||||
|
|
@ -282,7 +282,8 @@ r
|
|||
désactivée, il suffit normalement de répondre « n ».
|
||||
|
||||
>> Faites C-x C-l (qui est une commande désactivée),
|
||||
puis répondez n à la question.
|
||||
puis répondez « n » à la question.
|
||||
|
||||
|
||||
* FENÊTRES
|
||||
----------
|
||||
|
|
@ -300,9 +301,9 @@ contenant le curseur pour qu'elle occupe tout l'
|
|||
supprime toutes les autres fenêtres.
|
||||
|
||||
>> Déplacez le curseur sur cette ligne et faites C-u 0 C-l.
|
||||
>> Faites CONTROLE-h k CONTROLE-f.
|
||||
>> Faites C-h k C-f.
|
||||
Vous constatez que cette fenêtre est réduite alors qu'une nouvelle
|
||||
apparaît pour afficher la documentation sur la commande CONTROLE-f.
|
||||
apparaît pour afficher la documentation sur la commande C-f.
|
||||
|
||||
>> Faites C-x 1 et la fenêtre de documentation disparaît.
|
||||
|
||||
|
|
@ -322,24 +323,24 @@ comme du texte par Emacs et ins
|
|||
touche de retour chariot) pour insérer un caractère Newline.
|
||||
|
||||
Vous pouvez effacer le dernier caractère que vous avez tapé en faisant
|
||||
<Delback>. <Delback> est une touche du clavier -- la même que vous
|
||||
utilisez habituellement en dehors d'Emacs, pour supprimer le dernier
|
||||
caractère saisi. Il s'agit généralement de la grande touche située
|
||||
quelques lignes au-dessus de la touche « Entrée ». Elle est
|
||||
habituellement nommée « Delete », « Del », « Suppr » ou « Backspace ».
|
||||
<DEL>. <DEL> est une touche du clavier -- la même que vous utilisez
|
||||
habituellement en dehors d'Emacs, pour supprimer le dernier caractère
|
||||
saisi. Il s'agit généralement de la grande touche située quelques
|
||||
lignes au-dessus de la touche « Entrée ». Elle est habituellement
|
||||
nommée « Delete », « Del », « Suppr » ou « Backspace ».
|
||||
|
||||
Si cette grande touche s'appelle « Backspace », c'est celle-là qui
|
||||
représente <Delback>. Votre clavier peut également comporter une autre
|
||||
représente <DEL>. Votre clavier peut également comporter une autre
|
||||
touche, nommée « Delete », « Del » ou « Suppr », mais ce n'est pas
|
||||
<Delback>.
|
||||
<DEL>.
|
||||
|
||||
Plus généralement, <Delback> efface le caractère situé immédiatement
|
||||
avant la position courante du curseur.
|
||||
Plus généralement, <DEL> efface le caractère situé immédiatement avant
|
||||
la position courante du curseur.
|
||||
|
||||
>> Tapez quelques caractères puis effacez-les en faisant plusieurs
|
||||
fois <Delback>. Ne vous inquiétez pas de modifier ce fichier ; vous
|
||||
ne modifierez pas le didacticiel principal mais uniquement votre
|
||||
copie personnelle de celui-ci.
|
||||
fois <DEL>. Ne vous inquiétez pas de modifier ce fichier ; vous ne
|
||||
modifierez pas le didacticiel principal mais uniquement votre copie
|
||||
personnelle de celui-ci.
|
||||
|
||||
Lorsqu'une ligne de texte devient trop longue pour tenir sur une seule
|
||||
ligne de l'écran, elle se « continue » sur une deuxième ligne
|
||||
|
|
@ -350,7 +351,7 @@ droite indique une ligne qui se poursuit sur la ligne suivante.
|
|||
>> Insérez du texte jusqu'à atteindre la marge droite et continuez
|
||||
d'en insérer. Vous verrez apparaître une ligne de continuation.
|
||||
|
||||
>> Faites des <Delback> pour effacer le texte jusqu'à ce que la ligne
|
||||
>> Faites des <DEL> pour effacer le texte jusqu'à ce que la ligne
|
||||
tienne à nouveau sur une seule ligne d'écran. La ligne de
|
||||
continuation disparaît.
|
||||
|
||||
|
|
@ -360,8 +361,8 @@ en une seule ligne. Si la ligne r
|
|||
dans la largeur de l'écran, elle s'affichera avec une ligne de
|
||||
continuation.
|
||||
|
||||
>> Placez le curseur au début d'une ligne et faites <Delback>.
|
||||
Cela fusionne cette ligne avec la ligne précédente.
|
||||
>> Placez le curseur au début d'une ligne et faites <DEL>. Cela
|
||||
fusionne cette ligne avec la ligne précédente.
|
||||
|
||||
>> Faites <Entrée> pour remettre le Newline que vous avez supprimé.
|
||||
|
||||
|
|
@ -376,41 +377,46 @@ texte dans Emacs et pour corriger les erreurs. Vous pouvez
|
|||
effacer des mots ou des lignes entières. Voici un résumé des
|
||||
opérations de suppression :
|
||||
|
||||
<Delback> Efface le caractère situé avant le curseur
|
||||
C-d Efface le caractère situé après le curseur
|
||||
<DEL> Efface le caractère situé avant le curseur
|
||||
C-d Efface le caractère situé après le curseur
|
||||
|
||||
M-<Delback> Supprime le mot situé avant le curseur
|
||||
M-d Supprime le mot situé après le curseur
|
||||
M-<DEL> Supprime le mot situé avant le curseur
|
||||
M-d Supprime le mot situé après le curseur
|
||||
|
||||
C-k Supprime du curseur à la fin de la ligne
|
||||
M-k Supprime jusqu'à la fin de la phrase courante
|
||||
C-k Supprime du curseur à la fin de la ligne
|
||||
M-k Supprime jusqu'à la fin de la phrase courante
|
||||
|
||||
Vous noterez que <Delback> et C-d, par rapport à M-<Delback> et M-d,
|
||||
ont la même relation que C-f et M-f (en fait, <Delback> n'est pas
|
||||
vraiment un caractère de contrôle, mais ne nous soucions pas de cela)
|
||||
C-k et M-k sont un peu comme C-e et M-e.
|
||||
Vous noterez que <DEL> et C-d, par rapport à M-<DEL> et M-d, ont la
|
||||
même relation que C-f et M-f (en fait, <DEL> n'est pas vraiment un
|
||||
caractère de contrôle, mais ne nous soucions pas de cela) C-k et M-k
|
||||
sont un peu comme C-e et M-e.
|
||||
|
||||
Vous pouvez aussi supprimer n'importe quelle zone du tampon en
|
||||
utilisant une méthode unique et générale. Placez-vous à une extrémité
|
||||
de cette zone et tapez soit C-@, soit C-SPC (SPC désigne la barre
|
||||
espace). Puis, allez à l'autre extrémité et faites C-w. Cela supprime
|
||||
tout le texte compris entre ces deux positions.
|
||||
de cette zone et tapez C-SPC (SPC désigne la barre espace). Puis,
|
||||
allez à l'autre extrémité du texte que vous voulez supprimer. En
|
||||
faisant cela, Emacs surligne le texte entre le curseur et la position
|
||||
d'où vous avez tapé C-SPC. Enfin, faites C-w. Cela supprime tout le
|
||||
texte compris entre ces deux positions.
|
||||
|
||||
>> Placez le curseur sur le V au début du paragraphe précédent.
|
||||
>> Faites C-SPC. Emacs devrait afficher un message "Mark set"
|
||||
en bas de l'écran.
|
||||
>> Déplacez le curseur sur le x d'« extrémité », sur la seconde ligne
|
||||
du paragraphe.
|
||||
>> Déplacez le curseur sur le x d'« extrémité », sur la seconde
|
||||
ligne du paragraphe.
|
||||
>> Faites C-w. Cela supprimera le texte allant du V jusqu'au
|
||||
caractère situé juste avant le x.
|
||||
|
||||
La différence entre « effacer » et « supprimer » est que vous pouvez
|
||||
réinsérer le texte « supprimé », alors que c'est impossible avec ce
|
||||
qui a été « effacé ». La réinsertion d'un texte supprimé s'appelle le
|
||||
qui a été « effacé » (Vous pouvez cependant « annuler » un effacement
|
||||
- voir plus bas.) La réinsertion d'un texte supprimé s'appelle le
|
||||
« yanking ». Généralement, les commandes qui ôtent beaucoup de texte
|
||||
le suppriment (afin que vous puissiez le récupérer), tandis que celles
|
||||
qui ne font qu'ôter un seul caractère, des lignes blanches ou des
|
||||
espaces, les effacent (vous ne pouvez donc pas récupérer ce texte).
|
||||
Dans le cas le plus simple et sans paramètre, <DEL> et C-d effacent.
|
||||
Avec un paramètre, ces commandes suppriment.
|
||||
|
||||
>> Placez le curseur au début d'une ligne non vide puis faites
|
||||
C-k pour supprimer le texte de celle-ci.
|
||||
|
|
@ -424,11 +430,16 @@ il d
|
|||
simple répétition : C-u 2 C-k détruit deux lignes et leurs Newlines
|
||||
alors que taper deux fois C-k n'aurait pas le même effet.
|
||||
|
||||
Vous pouvez ramener le texte supprimé à la place qu'il occupait ou à
|
||||
n'importe quel autre emplacement du texte. Vous pouvez récupérer
|
||||
plusieurs fois ce texte afin d'en créer plusieurs copies.
|
||||
Réinsérer du texte supprimé est appelé « yanking » (« récupérer »).
|
||||
(Pensez au geste de tirer vers soi du texte qui a été jeté.) Vous
|
||||
pouvez récupérer le texte supprimé à la place qu'il occupait, à
|
||||
n'importe quel autre emplacement du texte, ou même dans un autre
|
||||
fichier. Vous pouvez récupérer plusieurs fois ce texte afin d'en
|
||||
créer plusieurs copies. Certains éditeurs de texte appellent
|
||||
« couper » et « coller » les opérations de « supprimer » et de
|
||||
« récupérer » (voir le Glossaire dans le manuel d'Emacs.)
|
||||
|
||||
La commande de récupération est C-y. Elle réinsère le dernier texte
|
||||
La commande de récupération est C-y. Elle réinsère le dernier texte
|
||||
supprimé à la position courante du curseur.
|
||||
|
||||
>> Essayez : faites C-y pour récupérer le texte.
|
||||
|
|
@ -452,12 +463,12 @@ M-y. Apr
|
|||
récente, M-y remplacera ce texte récupéré par le texte supprimé
|
||||
précédemment. En répétant les M-y, vous ramenez les suppressions de
|
||||
plus en plus anciennes. Lorsque vous avez atteint le texte que vous
|
||||
recherchez, vous n'avez rien besoin de faire pour le
|
||||
conserver. Continuez simplement à éditer votre texte et laissez le
|
||||
texte récupéré où il est.
|
||||
recherchez, vous n'avez rien besoin de faire pour le conserver.
|
||||
Continuez simplement à éditer votre texte et laissez le texte
|
||||
récupéré où il est.
|
||||
|
||||
Si vous faites M-y suffisamment de fois, vous reviendrez à votre point
|
||||
de départ (la suppression la plus récente).
|
||||
Si vous faites M-y un nombre suffisant de fois, vous reviendrez
|
||||
à votre point de départ (la suppression la plus récente).
|
||||
|
||||
>> Supprimez une ligne, déplacez vous et supprimez une autre ligne.
|
||||
Puis, faites C-y pour récupérer cette dernière.
|
||||
|
|
@ -472,34 +483,36 @@ de d
|
|||
* ANNULATION
|
||||
------------
|
||||
|
||||
Si vous modifiez le texte, puis que vous décidez que c'était une
|
||||
erreur, vous pouvez annuler cette modification avec la commande C-x u
|
||||
(comme Undo, défaire).
|
||||
Si vous modifiez le texte, puis décidez que c'était une erreur,
|
||||
vous pouvez annuler cette modification avec la commande C-/.
|
||||
|
||||
Normalement C-x u annule les modifications d'une seule commande ; si
|
||||
vous répétez plusieurs fois C-x u dans une ligne, chaque répétition
|
||||
Normalement C-/ annule les modifications d'une seule commande ; si
|
||||
vous répétez plusieurs fois C-/ dans une ligne, chaque répétition
|
||||
annulera une commande supplémentaire.
|
||||
|
||||
Il y a quand même deux exceptions : les commandes qui ne modifient pas
|
||||
le texte ne comptent pas (cela inclut les commandes de déplacement du
|
||||
curseur et les commandes de défilement du texte) et les caractères
|
||||
auto-insérés sont habituellement gérés par groupes allant jusqu'à 20
|
||||
(ceci afin de réduire le nombre de C-x u que vous devriez taper pour
|
||||
(ceci afin de réduire le nombre de C-/ que vous devriez taper pour
|
||||
annuler l'insertion de texte).
|
||||
|
||||
>> Supprimez cette ligne avec C-k, puis faites C-x u pour la voir
|
||||
>> Supprimez cette ligne avec C-k, puis faites C-/ pour la voir
|
||||
réapparaître.
|
||||
|
||||
C-_ est une autre commande d'annulation ; elle fonctionne exactement
|
||||
comme C-x u mais est plus facile à taper plusieurs fois dans une
|
||||
ligne. Son inconvénient est qu'elle n'est pas facile à taper sur
|
||||
certains claviers, c'est pourquoi C-x u existe aussi. Sur certains
|
||||
terminaux, vous pouvez taper C-_ en tapant / tout en pressant la
|
||||
touche CTRL.
|
||||
comme C-/. Sur certains terminaux, taper C-/ envoie en fait C-_ à Emacs.
|
||||
Autrement, C-x u marche aussi exactement comme C-/, mais est un peu
|
||||
moins pratique à taper.
|
||||
|
||||
Un paramètre numérique passé à C-_ ou C-x u agit comme un nombre de
|
||||
Un paramètre numérique passé à C-_ ou C-/ agit comme un nombre de
|
||||
répétitions.
|
||||
|
||||
Vous pouvez annuler la suppression de texte de la même manière que
|
||||
vous pouvez annuler son effacement. La distinction entre supprimer
|
||||
et effacer quelque chose n'intervient que pour la récupération avec
|
||||
C-y; elle ne fait aucune différence pour l'annulation.
|
||||
|
||||
|
||||
* FICHIERS
|
||||
----------
|
||||
|
|
@ -520,7 +533,7 @@ sauvegardez, Emacs garde le fichier original sous un nom modifi
|
|||
cas où vous décideriez ensuite d'annuler vos modifications.
|
||||
|
||||
Si vous examinez le bas de l'écran, vous verrez une ligne qui commence
|
||||
et finit par des tirets et débute par « -1:-- TUTORIAL.fr » ou quelque
|
||||
et finit par des tirets et débute par « -:--- TUTORIAL.fr » ou quelque
|
||||
chose comme ça. Cette partie de l'écran montre normalement le nom du
|
||||
fichier que vous êtes en train de visiter. Pour l'instant, vous
|
||||
visitez un fichier appelé « TUTORIAL.fr », qui est votre copie
|
||||
|
|
@ -529,8 +542,8 @@ Emacs, son nom appara
|
|||
|
||||
Une particularité de la commande permettant de trouver un fichier est
|
||||
que vous devez donner le nom du fichier voulu. On dit que la commande
|
||||
« lit un paramètre à partir du terminal » (ici, le paramètre est le
|
||||
nom du fichier). Après avoir fait la commande
|
||||
« lit un paramètre » (ici, le paramètre est le nom du fichier). Après
|
||||
avoir fait la commande
|
||||
|
||||
C-x C-f Trouve un fichier
|
||||
|
||||
|
|
@ -592,7 +605,7 @@ Emacs.
|
|||
|
||||
Emacs stocke le texte de chaque fichier dans un objet appelé « tampon ».
|
||||
Trouver un fichier crée un nouveau tampon dans Emacs. Pour voir la
|
||||
liste des tampons existants dans votre session Emacs, faites
|
||||
liste des tampons existants dans votre session Emacs, faites :
|
||||
|
||||
C-x C-b Liste des tampons
|
||||
|
||||
|
|
@ -605,14 +618,14 @@ pouvez voir dans une fen
|
|||
>> Faites C-x 1 pour faire disparaître la liste des tampons.
|
||||
|
||||
Lorsque vous avez plusieurs tampons, seul l'un d'entre eux est le
|
||||
tampon "courant" à un instant donné : c'est celui que vous éditez. Si
|
||||
vous souhaitez éditer un autre tampon, vous devez "basculer" vers
|
||||
tampon « courant » à un instant donné : c'est celui que vous éditez.
|
||||
Si vous souhaitez éditer un autre tampon, vous devez « basculer » vers
|
||||
lui. Pour basculer vers un tampon correspondant à un fichier, vous
|
||||
pouvez le recharger avec C-x C-f mais il y a plus simple : utilisez la
|
||||
commande C-x b en lui passant le nom du tampon.
|
||||
|
||||
>> Faites C-x b truc <Entrée> pour revenir au tampon "truc", qui
|
||||
contient le texte du fichier "truc".
|
||||
>> Faites C-x b truc <Entrée> pour revenir au tampon « truc », qui
|
||||
contient le texte du fichier « truc ».
|
||||
Puis, faites C-x b TUTORIAL <Entrée> pour revenir à ce didacticiel.
|
||||
|
||||
La plupart du temps, le nom d'un tampon est le même que celui du
|
||||
|
|
@ -623,13 +636,17 @@ noms de tous les tampons.
|
|||
TOUT texte que vous visualisez dans une fenêtre Emacs fait toujours
|
||||
partie d'un tampon, mais certains tampons ne correspondent pas à des
|
||||
fichiers : le tampon "*Buffer List*", par exemple, ne contient pas de
|
||||
fichiers mais la liste obtenue par C-x C-b. Le tampon "*Messages*" ne
|
||||
correspond pas non plus à un fichier ; il contient la liste des
|
||||
messages apparus dans la ligne d'état pendant votre session Emacs.
|
||||
fichiers mais la liste obtenue par C-x C-b. Ce didacticiel n'avait pas
|
||||
de fichier au départ mais il en a un désormais, car dans la section
|
||||
précédente, vous avez tapé C-x C-s pour l'enregistrer.
|
||||
|
||||
Le tampon "*Messages*" ne correspond pas non plus à un fichier ; il
|
||||
contient la liste des messages apparus dans la ligne d'état pendant
|
||||
votre session Emacs.
|
||||
|
||||
>> Faites C-x b *Messages* <Entrée> pour visualiser le tampon des
|
||||
messages.
|
||||
Puis, faites C-x b TUTORIAL <Entrée> pour revenir à ce didacticiel.
|
||||
Puis, faites C-x b TUTORIAL.fr <Entrée> pour revenir à ce didacticiel.
|
||||
|
||||
Si vous modifiez le texte d'un fichier, puis que vous chargez un autre
|
||||
fichier, le premier ne sera pas sauvegardé. Ses modifications restent
|
||||
|
|
@ -672,26 +689,22 @@ inqui
|
|||
proposera de sauvegarder tous les fichiers modifiés avant de quitter
|
||||
Emacs).
|
||||
|
||||
Si vous utiliser un affichage graphique, vous n'avez pas besoin de
|
||||
commande spéciale pour vous déplacer d'Emacs à une autre application.
|
||||
Vous pouvez le faire à l'aide de la souris ou avec les commandes du
|
||||
gestionnaire de fenêtres. Cependant, si vous utilisez un terminal
|
||||
texte ne pouvant afficher qu'une application à la fois, vous devez
|
||||
« suspendre » Emacs pour passer à n'importe quel autre programme.
|
||||
|
||||
C-z est la commande permettant de quitter *temporairement* Emacs --
|
||||
afin de pouvoir revenir à la même session plus tard.
|
||||
|
||||
Sur les systèmes qui le permettent, C-z « suspend » Emacs ;
|
||||
c'est-à-dire qu'il revient au shell mais ne détruit pas Emacs. Avec
|
||||
les shells les plus courants, vous pouvez revenir à Emacs en faisant
|
||||
la commande 'fg' ou '%emacs'.
|
||||
|
||||
Sur les systèmes qui n'implémentent pas ce mécanisme, C-z crée un
|
||||
sous-shell qui s'exécute sous Emacs afin que vous puissiez lancer
|
||||
d'autres programmes et revenir à Emacs ensuite : vous ne « sortez »
|
||||
pas vraiment d'Emacs. Dans ce cas, la commande shell 'exit' est le
|
||||
moyen habituel pour revenir à Emacs à partir de ce sous-shell.
|
||||
afin de pouvoir revenir à la même session plus tard. Sur les systèmes
|
||||
qui le permettent, C-z « suspend » Emacs ; c'est-à-dire qu'il revient
|
||||
au shell mais ne détruit pas Emacs. Avec les shells les plus courants,
|
||||
vous pouvez revenir à Emacs en faisant la commande 'fg' ou '%emacs'.
|
||||
|
||||
Le moment idéal pour utiliser C-x C-c est lorsque l'on se
|
||||
déconnecte. C'est aussi la commande adaptée pour sortir d'un Emacs
|
||||
invoqué par un programme de courrier ou tout autre utilitaire car
|
||||
ceux-ci peuvent ne pas savoir comment gérer la suspension d'Emacs. Dans
|
||||
des situations normales, si vous ne devez pas vous déconnecter, il est
|
||||
préférable de suspendre Emacs avec C-z au lieu de le quitter.
|
||||
invoqué par un programme de courrier ou tout autre utilitaire.
|
||||
|
||||
Il existe de nombreuses commandes C-x. Voici une liste de celles que
|
||||
vous avez apprises :
|
||||
|
|
@ -751,8 +764,8 @@ sauv
|
|||
-------------
|
||||
|
||||
Si Emacs constate que vous tapez les commandes multi-caractères
|
||||
lentement, il les affiche en bas de l'écran dans une zone nommée «
|
||||
zone d'écho ». La zone d'écho contient la dernière ligne de l'écran.
|
||||
lentement, il les affiche en bas de l'écran dans une zone nommée
|
||||
« zone d'écho ». La zone d'écho contient la dernière ligne de l'écran.
|
||||
|
||||
|
||||
* LIGNE DE MODE
|
||||
|
|
@ -761,18 +774,18 @@ zone d'
|
|||
La ligne placée immédiatement au dessus de la zone d'écho s'appelle la
|
||||
« ligne de mode ». Elle affiche quelque chose comme ça :
|
||||
|
||||
-1:** TUTORIAL.fr (Fundamental)--L752--67%----------------
|
||||
-:**- TUTORIAL.fr 64% L749 (Fundamental)
|
||||
|
||||
Cette ligne donne des informations sur l'état d'Emacs et sur le texte
|
||||
que vous êtes en train d'éditer.
|
||||
|
||||
Vous savez déjà ce que signifie le nom de fichier -- c'est celui que
|
||||
vous avez chargé. -NN%-- indique votre position actuelle dans le
|
||||
texte ; cela signifie que NN pour cent du texte se trouve au dessus du
|
||||
sommet de l'écran. Si le début du fichier est sur l'écran, il
|
||||
s'affichera --Top-- et non --00%--. Si le bas du texte est sur
|
||||
l'écran, il s'affichera --Bot--. Si tout le texte tient dans l'écran,
|
||||
il s'affichera --All--.
|
||||
vous avez chargé. NN% indique votre position actuelle dans le texte ;
|
||||
cela signifie que NN pour cent du texte se trouve au dessus du sommet
|
||||
de l'écran. Si le début du fichier est sur l'écran, il s'affichera
|
||||
« Top » et non « 00% ». Si le bas du texte est sur l'écran, il
|
||||
s'affichera « Bot » (comme « bottom »). Si tout le texte tient dans
|
||||
l'écran, il s'affichera « All ».
|
||||
|
||||
Le L et les chiffres qui le suivent indiquent une position d'une façon
|
||||
différente : ils indiquent le numéro de la ligne courante du point.
|
||||
|
|
@ -784,7 +797,7 @@ simplement des tirets.
|
|||
|
||||
La partie de la ligne de mode située entre parenthèses indique les
|
||||
modes d'édition dans lesquels vous vous trouvez. Le mode par défaut
|
||||
est « Fundamental » et c'est celui que vous êtes en train
|
||||
est le mode « Fundamental » et c'est celui que vous êtes en train
|
||||
d'utiliser. C'est un exemple de « mode majeur ».
|
||||
|
||||
Emacs possède de nombreux modes majeurs différents. Certains sont
|
||||
|
|
@ -804,7 +817,7 @@ exemple, est une commande pour basculer dans le mode Fundamental.
|
|||
Si vous devez éditer du texte en langage naturel, comme ce fichier,
|
||||
vous utiliserez probablement le mode Text.
|
||||
|
||||
>> Faites M-x text mode<Entrée>.
|
||||
>> Faites M-x text-mode<Entrée>.
|
||||
|
||||
Ne vous inquiétez pas, aucune des commandes Emacs que vous avez
|
||||
apprises ne change beaucoup mais vous pouvez constater que M-f et M-b
|
||||
|
|
@ -818,7 +831,7 @@ les modes majeurs, mais fonctionnent un peu diff
|
|||
|
||||
Pour lire la documentation sur votre mode majeur actuel, faites C-h m.
|
||||
|
||||
>> Faites une fois C-u C-v pour amener cette ligne près du haut de l'écran.
|
||||
>> Faites C-l C-l pour amener cette ligne près du haut de l'écran.
|
||||
>> Faites C-h m pour voir comment le mode Text diffère du mode Fundamental.
|
||||
>> Faites C-x 1 pour supprimer la documentation de l'écran.
|
||||
|
||||
|
|
@ -840,7 +853,7 @@ faisant
|
|||
désactivé, cette commande l'active et, s'il est activé, elle le
|
||||
désactive : on dit que la commande « fait basculer le mode ».
|
||||
|
||||
>> Faites M-x auto fill mode<Entrée> puis insérez une ligne de
|
||||
>> Faites M-x auto-fill-mode<Entrée> puis insérez une ligne de
|
||||
plusieurs « azer » jusqu'à ce qu'elle se divise en deux lignes.
|
||||
Vous devez mettre des espaces entre eux car le mode Auto Fill ne
|
||||
coupe les lignes que sur les espaces.
|
||||
|
|
@ -870,8 +883,7 @@ l'arri
|
|||
du curseur : elle déplace le curseur à l'emplacement où la chaîne
|
||||
apparaît.
|
||||
|
||||
La commande de recherche d'Emacs est différente de celle que l'on
|
||||
trouve sur la plupart des éditeurs car elle est « incrémentale ». Cela
|
||||
La commande de recherche d'Emacs est « incrémentale ». Cela
|
||||
signifie que la recherche a lieu pendant que l'on tape la chaîne que
|
||||
l'on recherche.
|
||||
|
||||
|
|
@ -889,7 +901,7 @@ que vous recherchez. <Entr
|
|||
pour constater ce que fait le curseur. Vous avez maintenant atteint
|
||||
« curseur » une première fois.
|
||||
>> Tapez C-s à nouveau pour trouver l'occurrence suivante de « curseur ».
|
||||
>> Faites maintenant <Delback> quatre fois et étudiez les mouvements du
|
||||
>> Faites maintenant <DEL> quatre fois et étudiez les mouvements du
|
||||
curseur.
|
||||
>> Faites <Entrée> pour mettre fin à la recherche.
|
||||
|
||||
|
|
@ -900,21 +912,13 @@ avec tap
|
|||
bippe et vous indique que la recherche a échoué. C-g permet également
|
||||
de mettre fin à la recherche.
|
||||
|
||||
REMARQUE : Sur certains systèmes, C-s gèlera l'écran et vous ne verrez
|
||||
plus rien se produire dans Emacs. Cela indique qu'une
|
||||
« fonctionnalité » du système d'exploitation, appelée « contrôle de
|
||||
flux », a intercepté le C-s et ne lui permet pas de parvenir à
|
||||
Emacs. Pour décoincer l'écran, faites C-q puis consultez la section
|
||||
« Spontaneous Entry to Incremental Search » dans le manuel d'Emacs
|
||||
pour avoir des avis sur la gestion de cette « fonctionnalité ».
|
||||
|
||||
Si vous vous trouvez au milieu d'une recherche incrémentale et que
|
||||
vous tapez <Delback>, vous remarquerez que cela supprime le dernier
|
||||
vous tapez <DEL>, vous remarquerez que cela supprime le dernier
|
||||
caractère de la chaîne recherchée et que la recherche reprend à
|
||||
l'endroit où elle se trouvait précédemment. Supposons, par exemple,
|
||||
que vous ayiez tapé « c » pour trouver la première occurrence de
|
||||
« c ». Si vous tapez maintenant « u », le curseur ira sur la première
|
||||
occurrence de « cu ». Faites <Delback> : cela supprime le « u » de la
|
||||
occurrence de « cu ». Faites <DEL> : cela supprime le « u » de la
|
||||
chaîne de recherche et le curseur revient à la première occurrence de
|
||||
« c ».
|
||||
|
||||
|
|
@ -929,21 +933,24 @@ haut dans le texte, faites plut
|
|||
C-s s'applique également à C-r, sauf que la direction de la recherche
|
||||
est inversée.
|
||||
|
||||
|
||||
* FENÊTRES MULTIPLES
|
||||
--------------------
|
||||
|
||||
L'une des caractéristiques les plus agréables d'Emacs est que vous
|
||||
pouvez afficher plusieurs fenêtres en même temps à l'écran.
|
||||
pouvez afficher plusieurs fenêtres en même temps à l'écran. (Notez
|
||||
qu'Emacs utilise le terme « cadres » -- décrits dans la section
|
||||
d'après -- là où d'autres applications disent « fenêtres ». Le
|
||||
manuel d'Emacs contient un Glossaire des termes d'Emacs.)
|
||||
|
||||
>> Placez le curseur sur cette ligne et faites C-u 0 C-l (CTRL-L, pas
|
||||
CTRL-1).
|
||||
>> Placez le curseur sur cette ligne et faites C-l C-l.
|
||||
|
||||
>> Faites maintenant C-x 2 pour diviser l'écran en deux
|
||||
fenêtres. Toutes les deux affichent ce didacticiel et le curseur
|
||||
reste dans celle du haut.
|
||||
|
||||
>> Faites C-M-v pour faire défiler la fenêtre du bas
|
||||
(Si vous n'avez pas de touche Meta, faites <ESC>C-V).
|
||||
(Si vous n'avez pas de touche Meta, faites <ESC> C-v).
|
||||
|
||||
>> Tapez C-x o (« o » pour « other ») afin de placer le curseur dans
|
||||
la fenêtre du bas.
|
||||
|
|
@ -954,10 +961,11 @@ pouvez afficher plusieurs fen
|
|||
haut. Le curseur est exactement où il était avant.
|
||||
|
||||
Vous pouvez continuer à utiliser C-x o pour passer d'une fenêtre à
|
||||
l'autre. Chaque fenêtre a sa propre position du curseur, mais une
|
||||
seule le montre vraiment. Toutes les commandes d'édition habituelles
|
||||
s'appliquent à la fenêtre dans laquelle se trouve le curseur : on
|
||||
l'appelle la « fenêtre sélectionnée ».
|
||||
l'autre. La « fenêtre sélectionnée », où la plupart de l'édition a
|
||||
lieu, est celle avec un curseur plus visible, qui clignotte quand
|
||||
vous ne tapez pas. Les autres fenêtres ont leurs propres positions
|
||||
de curseur ; si vous utilisez Emacs dans un affichage graphique, ces
|
||||
curseurs sont dessinés comme des boîtes fantômes fixes.
|
||||
|
||||
La commande C-M-v est très utile lorsque l'on édite du texte dans une
|
||||
fenêtre et que l'on utilise l'autre uniquement comme référence. Vous
|
||||
|
|
@ -998,6 +1006,33 @@ choses diff
|
|||
supprimer celle du bas.
|
||||
|
||||
|
||||
* CADRES MULTIPLES
|
||||
------------------
|
||||
|
||||
Emacs peut aussi créer plusieurs « cadres ». Un cadre est ce que nous
|
||||
appelons une collection de fenêtres, avec ses menus, ses barres de
|
||||
défilement, son mini-tampon, etc. Dans les affichages graphiques, ce
|
||||
qu'Emacs appelle un cadre est ce que la plupart des applications
|
||||
appellent une « fenêtre ». Des cadres graphiques multiples peuvent
|
||||
apparaître sur l'écran en même temps. Dans un terminal texte, seul
|
||||
un cadre à la fois peut être affiché.
|
||||
|
||||
>> Tapez M-x make-frame <Entrée>
|
||||
Voyez un nouveau cadre apparaître dans votre écran.
|
||||
|
||||
Tout ce que vous faisiez dans votre cadre initial, vous pouvez le
|
||||
faire dans le nouveau cadre. Il n'y a rien de spécial au premier
|
||||
cadre.
|
||||
|
||||
>> Tapez M-x delete-frame <Entrée>
|
||||
Ceci détruit le cadre sélectionné.
|
||||
|
||||
Vous pouvez aussi détruire un cadre en utilisant les méthodes normales
|
||||
fournies par le système graphique (souvent en cliquant sur un bouton
|
||||
avec un « X » dans l'angle haut du cadre.) Si vous supprimez le
|
||||
dernier cadre de la tâche Emacs de cette manière, vous sortez d'Emacs.
|
||||
|
||||
|
||||
* NIVEAUX D'ÉDITION RÉCURSIVE
|
||||
-----------------------------
|
||||
|
||||
|
|
@ -1006,18 +1041,18 @@ d'
|
|||
de mode, entourant les parenthèses situées autour du nom du mode
|
||||
majeur. Vous verrez, par exemple [(Fundamental)] au lieu de (Fundamental).
|
||||
|
||||
Pour sortir du niveau d'édition récursive, faites ESC ESC ESC. C'est
|
||||
une commande de sortie à tout faire. Vous pouvez également l'utiliser
|
||||
pour supprimer les fenêtres supplémentaires et pour sortir du
|
||||
mini-tampon.
|
||||
Pour sortir du niveau d'édition récursive, faites <ESC> <ESC> <ESC>.
|
||||
C'est une commande de sortie à tout faire. Vous pouvez également l'utiliser
|
||||
pour supprimer les fenêtres supplémentaires et pour sortir du mini-tampon.
|
||||
|
||||
>> Faites M-x pour aller dans le mini-tampon, puis faites ESC ESC ESC
|
||||
>> Faites M-x pour aller dans le mini-tampon, puis faites <ESC> <ESC> <ESC>
|
||||
pour en sortir.
|
||||
|
||||
Vous ne pouvez pas utiliser C-g pour sortir d'un niveau d'édition
|
||||
récursive car cette commande sert à annuler des commandes et des
|
||||
paramètres DANS le niveau d'édition récursive.
|
||||
|
||||
|
||||
* OBTENIR DE L'AIDE SUPPLÉMENTAIRE
|
||||
----------------------------------
|
||||
|
||||
|
|
@ -1035,18 +1070,16 @@ et Emacs vous indiquera les types d'aide qu'il peut fournir. Si vous
|
|||
avez tapé C-h et que vous vous ravisez, il vous suffit de faire C-g
|
||||
pour annuler.
|
||||
|
||||
Certains sites changent la signification du caractère C-h. Ils ne
|
||||
devraient pas le faire à la légère pour tous les utilisateurs et vous
|
||||
êtes donc en droit de vous plaindre auprès de l'administrateur
|
||||
système. Cependant, si C-h n'affiche pas de message d'aide en bas de
|
||||
l'écran, essayez à la place la touche F1 ou M-x help <Entrée>.
|
||||
(si C-h n'affiche pas de message d'aide en bas de l'écran, essayez à
|
||||
la place la touche F1 ou M-x help <Entrée>.)
|
||||
|
||||
La commande d'aide la plus simple est C-h c. Faites C-h, le caractère
|
||||
c, puis un caractère ou une séquence de commande : Emacs affichera une
|
||||
description très courte de cette commande.
|
||||
|
||||
>> Faites C-h c C-p.
|
||||
Le message devrait être quelque chose comme :
|
||||
|
||||
Le message devrait être quelque chose comme :
|
||||
|
||||
C-p runs the command previous-line
|
||||
|
||||
|
|
@ -1116,7 +1149,7 @@ leur correspondent, comme find-file.
|
|||
|
||||
Vous pouvez en apprendre plus en lisant le manuel d'Emacs, qu'il soit
|
||||
imprimé ou en ligne avec le système Info (utilisez le menu Help, ou
|
||||
faites F10 h r). Les deux fonctionnalités que vous apprécierez
|
||||
faites C-h r). Les deux fonctionnalités que vous apprécierez
|
||||
particulièrement sont la complétion, qui permet d'économiser la
|
||||
frappe, et dired, qui simplifie la manipulation des fichiers.
|
||||
|
||||
|
|
@ -1136,12 +1169,11 @@ Info du manuel Emacs,
|
|||
Le manuel décrit également les nombreuses autres fonctionnalités
|
||||
d'Emacs.
|
||||
|
||||
|
||||
* CONCLUSION
|
||||
------------
|
||||
|
||||
Rappelez-vous, pour quitter définitivement Emacs, faites C-x C-c. Pour
|
||||
lancer temporairement un shell et pouvoir ensuite revenir à Emacs,
|
||||
faites C-z.
|
||||
Pour quitter définitivement Emacs, faites C-x C-c.
|
||||
|
||||
Ce didacticiel est destiné à être compréhensible par tous les nouveaux
|
||||
utilisateurs. Si vous avez trouvé que quelque chose n'était pas clair,
|
||||
|
|
@ -1157,7 +1189,7 @@ d
|
|||
Emacs.
|
||||
|
||||
Cette version du didacticiel, comme GNU Emacs, est placée sous
|
||||
copyright, et vous pouvez en distribuer des copies sous certaines
|
||||
droit d'auteur, et vous pouvez en distribuer des copies sous certaines
|
||||
conditions :
|
||||
|
||||
Copyright (C) 1985, 1996, 2001-2012 Free Software Foundation, Inc.
|
||||
|
|
@ -1180,7 +1212,7 @@ l'obstructionnisme du logiciel (sa
|
|||
utilisant, écrivant et partagent des logiciels libres !
|
||||
|
||||
Cette traduction française a été effectuée par Éric Jacoboni
|
||||
<jaco@teaser.fr>.
|
||||
<jaco@teaser.fr> et complétée par Bastien Guerry <bzg@gnu.org>.
|
||||
|
||||
--- end of TUTORIAL.fr ---
|
||||
|
||||
|
|
@ -1188,4 +1220,3 @@ Cette traduction fran
|
|||
;;; coding: latin-1
|
||||
;;; sentence-end-double-space: nil
|
||||
;;; End:
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -11,6 +11,7 @@ ALT eller EDIT). Vi anv
|
|||
den och trycker sedan <chr>.
|
||||
|
||||
Viktigt: För att avsluta Emacs trycker du C-x C-c (två tecken).
|
||||
För att avsluta kommandon som inte skrivits in fullt, tryck C-g.
|
||||
Tecknen ">>" i vänstermarginalen anger att du kan prova ett
|
||||
kommando. Till exempel:
|
||||
<<Tomma rader sätts in runt nästa rad när help-with-tutorial aktiveras>>
|
||||
|
|
@ -45,7 +46,9 @@ F
|
|||
|
||||
>> Leta reda på markören och se vad som står där. Tryck sedan C-l.
|
||||
Hitta markören igen och notera att det är samma text som står kring
|
||||
markören nu.
|
||||
markören nu, men nu mitt på skärmen. Om du trycker C-l igen så
|
||||
flyttas texten högst upp på skärmen. Tryck C-l igen och den flyttas
|
||||
ner till botten.
|
||||
|
||||
Du kan också använda PageUp och PageDn tangenterna, om din terminal
|
||||
har dem, för att flytta en hel skärmbild åt gången, men du redigerar
|
||||
|
|
@ -77,8 +80,8 @@ fyra piltangenterna. S
|
|||
|
||||
Detta är enklare att komma ihåg om du tänker på dessa förkortningar: P
|
||||
för föregående (previous), N för nästa (next), B för bakåt (backward)
|
||||
och F för framåt (forward). Dessa är de grundläggande kommandona för
|
||||
att flytta markören och du kommer att använda dem hela tiden.
|
||||
och F för framåt (forward). Du kommer att använda dessa grundläggande
|
||||
kommandona hela tiden.
|
||||
|
||||
>> Gör några C-n så att du kommer ned till den här raden.
|
||||
|
||||
|
|
@ -223,22 +226,16 @@ upp
|
|||
Detta borde ha flyttat skärmbilden 8 rader uppåt. Om du önskar flytta
|
||||
tillbaka igen är det bara att ge samma argument till M-v.
|
||||
|
||||
Om du använder Emacs under ett fönstersystem, som X11 eller
|
||||
MS-Windows, finns det troligen ett rektangulärt område på sidan
|
||||
av Emacs-fönstret, en så kallad rullningslist. Genom att klicka i den
|
||||
med musen kan du rulla texten.
|
||||
Om du använder ett fönstersystem, som X eller MS-Windows, finns det
|
||||
troligen ett rektangulärt område på sidan av Emacs-fönstret, en så
|
||||
kallad rullningslist. Genom att klicka i den med musen kan du rulla
|
||||
texten.
|
||||
|
||||
>> Prova att trycka med den mellersta musknappen i det utvalda området
|
||||
på rullningslisten. Detta bör flytta skärmbilden till en plats i
|
||||
texten beroende på var i rullningslisten du trycker.
|
||||
Om din mus har ett rullningshjul kan även den användas för att rulla
|
||||
texten.
|
||||
|
||||
>> Prova att flytta musen upp och ner medan du håller ner den
|
||||
mellersta musknappen. Du ser att texten rullar upp och ner beroende
|
||||
på hur du för musen.
|
||||
|
||||
|
||||
* OM EMACS HÄNGER
|
||||
-----------------
|
||||
* OM EMACS SLUTAR SVARA
|
||||
-----------------------
|
||||
|
||||
Om Emacs slutar att reagera på kommandon kan du lugnt stoppa dem genom
|
||||
att trycka C-g. Du kan också använda C-g för att stoppa ett kommando
|
||||
|
|
@ -264,9 +261,9 @@ Om du provar ett av dessa sp
|
|||
meddelande som berättar vilket kommando det är och kommer att fråga om
|
||||
du verkligen vill fortsätta och utföra detta kommando.
|
||||
|
||||
Om du verkligen önskar att utföra kommandot trycker du mellanslag som
|
||||
svar på frågan. Normalt, om du inte önskar att utföra detta kommando,
|
||||
svarar du "n" på frågan.
|
||||
Om du verkligen önskar att utföra kommandot skriver du <SPC>,
|
||||
(mellanslagstangenten) som svar på frågan. Normalt, om du inte önskar
|
||||
att utföra detta kommando, svarar du "n" på frågan.
|
||||
|
||||
>> Skriv C-x C-l (som är ett spärrat kommando).
|
||||
Skriv n som svar på frågan.
|
||||
|
|
@ -275,8 +272,8 @@ svarar du "n" p
|
|||
* FÖNSTER
|
||||
---------
|
||||
|
||||
Emacs kan ha flera fönster och varje fönster kan visa sin egen text.
|
||||
Vi kommer förklara senare hur man använder flera fönster. Här skall vi
|
||||
Emacs kan ha flera "fönster" där varje kan visa sin egen text. Vi
|
||||
kommer förklara senare hur man använder flera fönster. Här skall vi
|
||||
förklara hur man blir av med extra fönster för att komma tillbaka till
|
||||
det grundläggande läget med endast ett fönster. Det är enkelt:
|
||||
|
||||
|
|
@ -289,7 +286,7 @@ tas bort.
|
|||
>> Flytta markören till den här raden och tryck C-u 0 C-l.
|
||||
>> Tryck C-h k C-f.
|
||||
Se hur det här fönstret krymper samtidigt som ett nytt uppträder
|
||||
för att visa dokumentationen för C-f-kommandot.
|
||||
för att visa dokumentationen av C-f-kommandot.
|
||||
|
||||
>> Slå C-x 1 och se hur dokumentationsfönstret nu försvinner.
|
||||
|
||||
|
|
@ -303,39 +300,36 @@ g
|
|||
* SKRIVA OCH TA BORT TEXT
|
||||
-------------------------
|
||||
|
||||
Om du önskar att sätta in text är det bara att skriva in
|
||||
texten. Tecken som du kan se, så som A, 7, *, etc. tolkas som text och
|
||||
sätts in direkt. Skriv <Return> (retur-tangenten) för att sätta in en
|
||||
radbrytning.
|
||||
Om du önskar att sätta in text är det bara att skriva in texten.
|
||||
Vanliga tecken, som A, 7, *, etc., sätts in direkt när du skriver dem.
|
||||
Tryck på <Return> för att sätta in en radbrytning. (Det är den tangent
|
||||
på tangentbordet som ibland är märkt med "Enter")
|
||||
|
||||
Du kan radera det sista tecknet du skrev genom att trycka <Delback>.
|
||||
<Delback> är en tangent på tangentbordet -- samma som du normalt
|
||||
använder utanför Emacs för att ta bort det senaste tecknet du skrivit.
|
||||
Det är vanligen en stor tangent några rader ovanför retur-tangenten,
|
||||
och den är vanligtvis märkt "Delete, "Del" eller "Backspace".
|
||||
För att radera <DEL> tecknet omedelbart före aktuell markörposition,
|
||||
skriv <DEL>. Det är tangenten på tangentbordet som vanligtvis är
|
||||
markerad med "Backspace" -- det är samma tangent som du normal
|
||||
använder för att radera det sist inmatade tecknet utanför Emacs.
|
||||
|
||||
Om den stora tangenten är märkt med "Backspace" så är det den du
|
||||
använder för <Delback>. Det kan finnas en annan tangent som är märkt
|
||||
med "Delete" men det är inte <Delback>.
|
||||
|
||||
Generellt raderar <Delback> tecknet precis före den aktuella
|
||||
markörspositionen.
|
||||
Det kan finnas en annan tangent på ditt tangentbordet som är märkt med
|
||||
"Delete", men det är inte den vi menar med <DEL>.
|
||||
|
||||
>> Gör detta nu: Skriv in några tecken och ta bort dem genom att
|
||||
använda <Delback>. Var inte rädd för att skriva i den här filen,
|
||||
du kommer inte att kunna förändra originalet till vägledningen.
|
||||
Detta är bara en lokal kopia.
|
||||
använda <DEL>. Var inte rädd för att skriva i den här filen, du
|
||||
kommer inte att kunna förändra originalet till vägledningen. Detta
|
||||
är bara en lokal kopia.
|
||||
|
||||
När en rad blir för lång för att rymmas på en skärmbredd så fortsätter
|
||||
den på raden under. Ett bakstreck ("\") (eller om du kör under ett
|
||||
fönstersystem, en liten böjd pil) i slutet av högermarginalen
|
||||
indikerar att raden fortsätter.
|
||||
den på raden under. Om du använder ett fönstersystem, visas små böjda
|
||||
pilar i det lilla utrymmet på bägge sidor om textmassan (i vänster och
|
||||
höger marginal) för att ange var en rad fortsätter, Om du använder
|
||||
en textterminal anges med ett bakstreck ("\") i kolumnen längst till
|
||||
höger att raden fortsätter.
|
||||
|
||||
>> Skriv in lite text så att du kommer till slutet av raden och
|
||||
fortsätt att skriva lite till. Du kommer då att se hur
|
||||
fortsättningstecknet ser ut.
|
||||
|
||||
>> Använd <Delback> för att radera texten tills raden ryms på en
|
||||
>> Använd <DEL> för att radera texten tills raden ryms på en
|
||||
skärmbredd igen. Fortsättningstecknet kommer då att försvinna.
|
||||
|
||||
Du kan radera radbrytning precis som andra tecken. Genom att radera
|
||||
|
|
@ -343,7 +337,7 @@ radbrytningen mellan tv
|
|||
resultatet av denna sammanslagning blir för stor för att passa inom en
|
||||
skärmbredd, så kommer den att visas med ett fortsättningstecken.
|
||||
|
||||
>> Flytta markören till början av en rad och tryck <Delback>.
|
||||
>> Flytta markören till början av en rad och tryck <DEL>.
|
||||
Detta kommer att klistra ihop raden med raden över.
|
||||
|
||||
>> Tryck <Return> för att sätta in radbrytningen du tog bort.
|
||||
|
|
@ -358,28 +352,30 @@ Du har nu l
|
|||
Emacs och att rätta fel. Du kan radera ord och rader också. Här är en
|
||||
översikt över kommandon för radering:
|
||||
|
||||
<Delback> Raderar tecknet som står precis före markören
|
||||
<DEL> Raderar tecknet som står precis före markören
|
||||
C-d Raderar tecknet som står precis under markören
|
||||
|
||||
M-<Delback> Raderar ordet precis före markören
|
||||
M-<DEL> Raderar ordet precis före markören
|
||||
M-d Raderar ordet precis efter markören
|
||||
|
||||
C-k Raderar från markören till slutet av raden
|
||||
M-k Raderar till slutet av stycket
|
||||
|
||||
Lägg märke till att <Delback> och C-d kontra M-<Delback> och M-d
|
||||
följer mönstret som började med C-f och M-f. (<Delback> är inte precis
|
||||
ett kontrolltecken men låt oss inte bry oss om det.) C-k och M-k
|
||||
fungerar på samma sätt som C-e och M-e (nästan).
|
||||
Lägg märke till att <DEL> och C-d kontra M-<DEL> och M-d följer
|
||||
mönstret som började med C-f och M-f. (<DEL> är inte precis ett
|
||||
kontrolltecken men låt oss inte bry oss om det.) C-k och M-k fungerar
|
||||
på liknande sätt som C-e och M-e när det gäller rader respektive
|
||||
meningar.
|
||||
|
||||
Du kan också ta bort vilken del som helst av texten med hjälp av
|
||||
följande allmänna metod. Flytta till ena änden av det område du vill
|
||||
ta bort och tryck C-@ eller C-mellanslag. Flytta till andra änden av
|
||||
området och tryck C-w. Detta tar bort all text mellan de två
|
||||
positionerna.
|
||||
Du kan också ta bort en del av en texten med hjälp av följande
|
||||
allmänna metod. Flytta till ena änden av det område du vill ta bort
|
||||
och tryck C-<SPC>. (<SPC> är mellanslagstangenten.) Flytta sedan till
|
||||
andra änden av området du vill ta bort. När du gör det markerar Emacs
|
||||
texten mellan markören och den plats där du tryckte C-<SPC>. Slutligen,
|
||||
tryck C-w. Detta tar bort texten mellan de två positionerna.
|
||||
|
||||
>> Flytta markören till bokstaven D i föregående stycke.
|
||||
>> Tryck C-mellanslag. Emacs skall nu visa meddelandet "Mark set"
|
||||
>> Tryck C-<SPC>. Emacs skall nu visa meddelandet "Mark set"
|
||||
längst ner på skärmen.
|
||||
>> Flytta markören till bokstaven o i ordet metod på andra raden i
|
||||
stycket.
|
||||
|
|
@ -387,12 +383,15 @@ positionerna.
|
|||
o.
|
||||
|
||||
Skillnaden mellan att "ta bort" (killing) och "radera" (deleting) text
|
||||
är att "borttagen" text kan hämtas tillbaka, medan raderad text inte
|
||||
kan det. Återinsättning av borttagen text kallas "återhämtning"
|
||||
(yanking). Generellt kan man säga att kommandon som tar bort fler än
|
||||
ett tecken sparar undan texten (så att den kan återhämtas) medan
|
||||
kommandon som bara raderar ett tecken eller tomma rader och mellanrum
|
||||
inte sparar någonting (och den texten kan alltså inte återhämtas).
|
||||
är att "borttagen" text kan sättas tillbaka (var som helst), medan
|
||||
raderad text inte kan det på det sättet. (Du kan dock ångra en
|
||||
radering--se nedan.) Återinsättning av borttagen text kallas
|
||||
"återhämtning" (yanking). Generellt kan man säga att kommandon som
|
||||
tar bort fler än ett tecken sparar undan texten (så att den kan
|
||||
återhämtas) medan kommandon som bara raderar ett tecken, eller bara
|
||||
raderar tomma rader och mellanrum inte sparar någonting (och den
|
||||
texten kan alltså inte återhämtas). <DEL> och C-d raderar i det enkla
|
||||
fallet utan argument. Med argument så tar de bort i stället.
|
||||
|
||||
>> Flytta markören till början av en rad som inte är tom.
|
||||
Tryck C-k för att ta bort texten på raden.
|
||||
|
|
@ -412,7 +411,9 @@ tagits bort.) Du kan antingen h
|
|||
plats som där den blev borttagen, eller så kan du sätta in den på en
|
||||
annan plats i texten du redigerar eller till och med i en helt annan
|
||||
fil. Du kan också hämta tillbaka samma text flera gånger så att du får
|
||||
flera lika förekomster av den.
|
||||
flera kopior av den. Några andra textredigerare kallar "ta bort" och
|
||||
"återhämta" att "klippa ut" respektive "klistra in" (Se ordlistan i
|
||||
Emacs-manualen)
|
||||
|
||||
Kommandot för att hämta tillbaka text är C-y. Kommandot hämtar
|
||||
tillbaka den sist borttagna texten och placerar den där markören är.
|
||||
|
|
@ -455,28 +456,26 @@ till startpunkten (texten som sist blev borttagen).
|
|||
-------
|
||||
|
||||
Om du gör en förändring i texten och sedan ångrar dig, så kan du
|
||||
upphäva ändringen med kommandot C-x u (undo).
|
||||
upphäva ändringen med ångra-kommandot C-/.
|
||||
|
||||
Normalt kommer C-x u upphäva förändringen som gjordes av det sist
|
||||
utförda kommandot. Om du repeterar C-x u flera gånger kommer varje
|
||||
Normalt kommer C-/ upphäva förändringen som gjordes av det sist
|
||||
utförda kommandot. Om du repeterar C-/ flera gånger kommer varje
|
||||
repetition upphäva ett kommando till.
|
||||
|
||||
Det finns två undantag. Kommandon som inte förändrar texten räknas
|
||||
inte (detta inkluderar markörförflyttningar och bläddringskommandon),
|
||||
och inskrivna enkelbokstäver blir vanligtvis grupperade i grupper om
|
||||
upp till 20 tecken. Detta är för att reducera antalet C-x u som behövs
|
||||
upp till 20 tecken. Detta är för att reducera antalet C-/ som behövs
|
||||
för att ångra inskriven text.
|
||||
|
||||
>> Ta bort den här raden med C-k. C-x u kommer att hämta tillbaka den
|
||||
igen.
|
||||
>> Ta bort den här raden med C-k, hämta sedan tillbaka den med C-/.
|
||||
|
||||
C-_ är ett alternativ till ångra-kommandot. Den fungerar på samma sätt
|
||||
som C-x u men är enklare att trycka flera gånger i följd. Det
|
||||
olämpliga med C-_ är att den är svår att hitta på en del tangentbord.
|
||||
Det är därför vi också har C-x u. På en del terminaler kan du få fram
|
||||
C-_ genom att trycka / samtidigt som Ctrl hålls nere.
|
||||
C-_ är ett alternativt ångra-kommandot. Den fungerar exakt på samma
|
||||
sätt som C-/. På vissa textterminaler skickar C-/ faktiskt C-_ till
|
||||
Emacs. Även C-x u fungerar precis som C-/, men är inte lika enkelt att
|
||||
skriva.
|
||||
|
||||
Ett numeriskt argument till C-_ eller C-x u medför repetering.
|
||||
Ett numeriskt argument till C-/, C-_ eller C-x u medför upprepning.
|
||||
|
||||
Du kan ångra radering av text precis på samma sätt som du kan ångra
|
||||
att du tagit bort text. Skillnaden mellan att ta bort och att radera
|
||||
|
|
@ -500,16 +499,16 @@ med n
|
|||
nytt namn, som backup, ifall du senare ångrar alltihop.
|
||||
|
||||
Om du tittar nästan längst ner på skärmbilden så kommer du se en rad
|
||||
som börjar och slutar med minustecken, och som innehåller texten
|
||||
"--:-- TUTORIAL.sv". Denna del av skärmbilden visar alltid namnet på
|
||||
filen du besöker. Just nu är du inne i en fil som heter "TUTORIAL.sv"
|
||||
och som är en personlig kopia av vägledningen till Emacs. Vilken fil
|
||||
du än är inne i så kommer filnamnet stå där.
|
||||
som börjar med minustecken, och som startar med "--:-- TUTORIAL.sv"
|
||||
eller något snarlikt. Denna del av skärmbilden visar normalt namnet på
|
||||
filen du besöker. Just nu besöker du din personlig kopia av
|
||||
vägledningen till Emacs, vilken heter "TUTORIAL.sv". Vilken fil du än
|
||||
är inne i så kommer filnamnet stå där.
|
||||
|
||||
En annan sak med kommandot för att finna filer är att du måste ange
|
||||
vilket filnamn du önskar. Vi säger att kommandot "läser ett argument
|
||||
från terminalen". I detta fall är argumentet namnet på filen. Efter
|
||||
att du gett kommandot
|
||||
vilket filnamn du önskar. Vi säger att kommandot "läser ett
|
||||
argument". I detta fall är argumentet namnet på filen. Efter att du
|
||||
gett kommandot
|
||||
|
||||
C-x C-f Finn en fil
|
||||
|
||||
|
|
@ -526,12 +525,11 @@ avbryta med kommandot C-g.
|
|||
du inte finner någon fil.
|
||||
|
||||
När du är färdig med att skriva filnamnet trycker du <Return> för att
|
||||
utföra kommandot. Då kommer C-x C-f kommandot att börja leta fram
|
||||
filen. Minibufferten försvinner när C-x C-f kommandot är färdigt.
|
||||
utföra kommandot. Minibufferten försvinner och C-x C-f kommandot börja
|
||||
leta efter filen.
|
||||
|
||||
Efter en liten stund kommer filen upp på skärmen och du kan börja
|
||||
redigera innehållet. När du vill spara filen kan du använda detta
|
||||
kommando
|
||||
Filinnehållet visas nu upp på skärmen och du kan börja redigera
|
||||
innehållet. När du vill spara filen kan du använda detta kommando
|
||||
|
||||
C-x C-s Spara fil
|
||||
|
||||
|
|
@ -542,11 +540,11 @@ slutet av det ursprungliga filnamnet.
|
|||
|
||||
När lagringen är utförd kommer Emacs skriva ut namnet på filen som
|
||||
blev sparad. Du bör spara ofta så att du inte förlorar så mycket om
|
||||
systemet kraschar.
|
||||
systemet kraschar. (Se kapitlet om sparautomatik nedan.)
|
||||
|
||||
>> Skriv C-x C-s för att spara en kopia av denna vägledning.
|
||||
Detta skall leda till att "Wrote ...TUTORIAL.sv" skrivs ut nederst
|
||||
på skärmbilden.
|
||||
>> Skriv C-x C-s TUTORIAL.sv <Return>.
|
||||
Detta sparar den här handledningen i en fil med namnet TUTORIAL
|
||||
och "Wrote ...TUTORIAL.sv" skrivs ut nederst på skärmbilden.
|
||||
|
||||
Du kan finna en existerande fil, antingen för att förändra den eller
|
||||
för att titta på den. Du kan också finna en fil som inte existerar.
|
||||
|
|
@ -565,11 +563,6 @@ att vara
|
|||
den på nytt med C-x C-f. På så sätt kan du ha ett stort antal filer
|
||||
öppna i Emacs.
|
||||
|
||||
>> Skapa en fil med namnet "foo" genom att trycka C-x C-f foo <Return>.
|
||||
Skriv in lite text, redigera den och spara "foo" genom att använda
|
||||
C-x C-s. Skriv till slut C-x C-f TUTORIAL.sv <Return> för att komma
|
||||
tillbaka till den här vägledningen.
|
||||
|
||||
Emacs sparar texten för varje fil i ett objekt kallat "buffert". När
|
||||
du finner en ny fil skapas en ny buffert i Emacs. För att se en lista
|
||||
över existerande buffertar i Emacs kan du skriva
|
||||
|
|
@ -591,9 +584,9 @@ motsvarar en fil kan du g
|
|||
C-f. Det finns dock ett enklare sätt: använd C-x b kommandot. I det
|
||||
kommandot anger du buffertens namn.
|
||||
|
||||
>> Skriv C-x b foo <Return> för att gå tillbaka till bufferten "foo"
|
||||
som innehåller texten i filen "foo". Skriv sedan C-x b TUTORIAL.sv
|
||||
<Return> för att komma tillbaka till den här handledningen.
|
||||
>> Skapa en fil med namnet "foo" genom att trycka C-x C-f foo <Return>.
|
||||
Skriv sedan C-x b TUTORIAL.sv <Return> för att komma tillbaka till
|
||||
den här handledningen.
|
||||
|
||||
Mestadels är buffertens namn densamma som filens namn (utan
|
||||
katalogdel.) Det är dock inte alltid så. Bufferlistan du skapar med
|
||||
|
|
@ -646,24 +639,21 @@ f
|
|||
förändringar du har gjort. C-x C-c erbjuder dig att spara förändringar
|
||||
innan Emacs avslutas.
|
||||
|
||||
Om du använder ett fönstersystem behöver du inte något speciellt
|
||||
kommando för att byta till ett annat program. Du kan göra det med
|
||||
musen eller med ett kommando till fönsterhanteraren. Men om du
|
||||
använder en textterminal, som bara kan visa ett program åt gången, så
|
||||
måste du avbryta Emacs för att flytta till ett annat program.
|
||||
|
||||
C-z är kommandot för att avsluta Emacs *tillfälligt* så att du kan
|
||||
återvända till samma Emacs senare.
|
||||
|
||||
På system som tillåter det kommer C-z suspendera Emacs, dvs. returnera
|
||||
till kommandoraden utan att avsluta Emacs. I de flesta system kan du få
|
||||
tillbaka Emacs med kommandot 'fg' eller '%emacs'.
|
||||
|
||||
På system som saknar suspendering startar C-z ett skal som kör under
|
||||
Emacs och som ger dig chansen till att köra andra program och sedan
|
||||
återgå till Emacs efteråt. Den ger ingen riktig avslutning av Emacs. I
|
||||
detta fall återvänder man vanligtvis till Emacs med kommandot 'exit'.
|
||||
återvända till samma Emacs senare. När Emacs körs från en textterminal
|
||||
så avbryts Emacs med C-z, dvs du återgår till kommandoskalet utan att
|
||||
Emacsprocessen förstörs. I de flesta vanliga kommandoskalen så kan man
|
||||
återgå till Emacs med kommandot 'fg' eller med '%emacs'.
|
||||
|
||||
C-x C-c används när du skall avsluta Emacs. Det är klokt att avsluta
|
||||
Emacs om den har startats av ett mail-program eller andra
|
||||
applikationer eftersom det inte är säkert att de kan hantera
|
||||
suspendering av Emacs. Under normala omständigheter, om du inte har
|
||||
tänkt att logga ut, är det bättre att suspendera Emacs med C-z
|
||||
istället för att avsluta.
|
||||
applikationer.
|
||||
|
||||
Det finns många C-x kommandon. Här är en lista över de du har lärt dig
|
||||
hittills:
|
||||
|
|
@ -685,7 +675,7 @@ M-x d
|
|||
fallet "replace-string". Det är bara att skriva "repl s<TAB>" och
|
||||
Emacs kommer då att fylla i kommandonamnet. (<TAB> är
|
||||
tabulatortangenten, som vanligtvis finns över CapsLock- eller
|
||||
skifttangenten nära den vänstra kanten på tangentbordet.) Avsluta
|
||||
skifttangenten nära den vänstra kanten på tangentbordet.) Kör
|
||||
kommandot med <Return>.
|
||||
|
||||
Kommandot replace-string kräver två argument, teckensträngen som skall
|
||||
|
|
@ -770,7 +760,7 @@ fundamental-mode kommandot f
|
|||
Om du skall redigera text, såsom den här filen, bör du troligen
|
||||
använda Text-läge.
|
||||
|
||||
>> Skriv M-x text mode<Return>.
|
||||
>> Skriv M-x text-mode <Return>.
|
||||
|
||||
Inget av kommandona du har lärt dig hittills förändrar Emacs i någon
|
||||
högre grad. Men lägg märke till att M-f och M-b nu behandlar
|
||||
|
|
@ -784,8 +774,7 @@ annorlunda.
|
|||
För att få fram dokumentationen för det läge du är i nu kan du skriva
|
||||
C-h m.
|
||||
|
||||
>> Använd C-u C-v så att denna rad kommer nära toppen av
|
||||
skärmbilden.
|
||||
>> Använd C-l C-l för att få denna rad överst på skärmbilden.
|
||||
>> Skriv C-h m och se hur Text-läget skiljer sig från
|
||||
Fundamental-läget.
|
||||
>> Tryck C-x 1 för att ta bort dokumentationen från skärmbilden.
|
||||
|
|
@ -801,13 +790,13 @@ radbrytningsl
|
|||
rader mellan ord automatisk när du skriver in text så att en rad blir
|
||||
för lång.
|
||||
|
||||
Du kan slå på radbrytningsläget genom att skriva M-x auto fill
|
||||
mode<Return>. När läget är påslaget kan du slå av det igen genom att
|
||||
upprepa M-x auto fill mode<Return>. Om läget är avslaget slår
|
||||
Du kan slå på radbrytningsläget genom att skriva M-x auto-fill-mode
|
||||
<Return>. När läget är påslaget kan du slå av det igen genom att
|
||||
upprepa M-x auto-fill-mode <Return>. Om läget är avslaget slår
|
||||
kommandot på det och vice versa. Vi säger att kommandot "växlar
|
||||
läget".
|
||||
|
||||
>> Skriv M-x auto fill mode<Return> nu. Skriv så in en rad med
|
||||
>> Skriv M-x auto-fill-mode <Return> nu. Skriv så in en rad med
|
||||
"asdf " tills raden delar sig. Du måste sätta in blanktecken, för
|
||||
Auto Fill bryter bara raden mellan ord.
|
||||
|
||||
|
|
@ -831,15 +820,13 @@ du
|
|||
* SÖKNING
|
||||
---------
|
||||
|
||||
Emacs kan söka efter textsträngar (grupper med sammanhängande
|
||||
bokstäver eller ord) antingen framåt eller bakåt i texten. När du
|
||||
Emacs kan söka efter textsträngar (en "sträng" är en grupp med
|
||||
sammanhängande bokstäver) antingen framåt eller bakåt i texten. När du
|
||||
söker efter text kommer markören att flytta sig till nästa plats där
|
||||
teckensträngen uppträder.
|
||||
|
||||
Sökmetoden i Emacs skiljer sig lite från sökmetoder i andra
|
||||
redigeringsprogram genom att den är inkrementell. Detta betyder att
|
||||
sökandet fortgår medan du skriver in teckensträngen du skall söka
|
||||
efter.
|
||||
Sökmetoden i Emacs är inkrementell. Detta betyder att sökandet fortgår
|
||||
medan du skriver in teckensträngen du skall söka efter.
|
||||
|
||||
Kommandot för att inleda en sökning är C-s för att söka framåt och C-r
|
||||
för att söka bakåt. MEN VÄNTA! Prova dem inte än.
|
||||
|
|
@ -855,7 +842,7 @@ efter. <Return> avslutar s
|
|||
har du sökt efter ordet "markör" en gång.
|
||||
>> Skriv C-s en gång till för att söka efter nästa förekomst av ordet
|
||||
"markör".
|
||||
>> Tryck nu på <Delback> fyra gånger och se hur markören flyttar sig
|
||||
>> Tryck nu på <DEL> fyra gånger och se hur markören flyttar sig
|
||||
>> Tryck <Return> för att avsluta sökandet.
|
||||
|
||||
Såg du vad som hände? Under inkrementell sökning försöker Emacs att gå
|
||||
|
|
@ -865,22 +852,18 @@ f
|
|||
Om det inte finns flera förekomster kommer Emacs att pipa och meddela
|
||||
att sökandet har misslyckats. C-g avbryter också sökandet.
|
||||
|
||||
Observera: På vissa system gör C-s att skärmen låser sig. Detta tyder
|
||||
på att systemets flödeskontroll har fångat upp C-s och inte skickat
|
||||
den vidare till Emacs. För att fortsätta måste du trycka C-q. Se i så
|
||||
fall avsnittet "Spontaneous Entry to Incremental Search" i
|
||||
Emacs-manualen för råd om hur detta kan undvikas.
|
||||
Om du är inne i en inkrementell sökning och trycker <DEL> kommer den
|
||||
sökningen att återgå till en tidigare plats. Om du skriver <DEL>
|
||||
precis efter att du skrivit C-s för att gå till nästa förekomst av
|
||||
söksträngen, kommer <DEL> att flytta markören tillbaka till en
|
||||
tidigare förekomst. Om det inte finns några tidigare förekomster så
|
||||
raderar <DEL> sista tecknet i söksträngen. Om du till exempel skriver
|
||||
"m" för att söka efter den första förekomsten av "m", och sedan
|
||||
trycker "a" så kommer markören flytta sig till första förekomsten av
|
||||
"ma". Tryck nu <DEL>. Detta avlägsnar "a" från söksträngen, och
|
||||
markören flyttar sig tillbaka till den första förekomsten av "m".
|
||||
|
||||
Om du är inne i en inkrementell sökning och trycker <Delback> kommer
|
||||
du lägga märke till att den sista bokstaven i söksträngen blir raderad
|
||||
och sökandet hoppar tillbaka till en tidigare förekomst. Om du till
|
||||
exempel skriver "m" för att söka efter den första förekomsten av "m",
|
||||
och sedan trycker "a" så kommer markören flytta sig till första
|
||||
förekomsten av "ma". Tryck nu <Delback>. Detta avlägsnar "a" från
|
||||
söksträngen, och markören flyttar sig tillbaka till den första
|
||||
förekomsten av "m".
|
||||
|
||||
Om du är mitt i en sökning och trycker ett KONTROLL- eller META-tecken
|
||||
Om du är mitt i en sökning och trycker ett kontroll- eller meta-tecken
|
||||
så avbryts sökandet. Undantag är tecken som används under sökningen,
|
||||
så som C-s och C-r.
|
||||
|
||||
|
|
@ -894,21 +877,22 @@ C-r, bortsett fr
|
|||
---------------
|
||||
|
||||
En av egenskaperna hos Emacs är att den kan visa mera än en buffert på
|
||||
skärmen samtidig.
|
||||
skärmen samtidig. (Notera att Emacs använder termen "ramar"
|
||||
(frames), som beskrivs i nästa kapitel, för det som en del andra
|
||||
program kallar för "fönster" (windows). Emacs-manualen innehåller en
|
||||
ordlista över Emacs-termer.
|
||||
|
||||
>> Flytta markören till den här raden och tryck C-u 0 C-l (alltså
|
||||
KONTROLL-L, inte KONTROLL-1).
|
||||
>> Flytta markören till den här raden och tryck C-l C-l.
|
||||
|
||||
>> Skriv nu C-x 2, som leder till att skärmen delas i två
|
||||
fönster. Bägge fönstren visar den här vägledningen. Markören står i
|
||||
det övre fönstret.
|
||||
fönster. Bägge fönstren visar den här vägledningen.
|
||||
Redigeringsmarkören stannar i det övre fönstret.
|
||||
|
||||
>> Skriv C-M-v för att rulla det nedre fönstret.
|
||||
(Om du inte har META-tangenten trycker du <ESC> C-v.)
|
||||
|
||||
>> Skriv C-x o (o för other) för att flytta markören till det
|
||||
>> Skriv C-x o ("o" för "other") för att flytta markören till det
|
||||
nedre fönstret.
|
||||
|
||||
>> Använd C-v och M-v i det nedre fönstret för att flytta upp
|
||||
och ned i texten. Fortsätt att läsa den här texten i det övre
|
||||
fönstret.
|
||||
|
|
@ -918,21 +902,20 @@ sk
|
|||
gjorde när du lämnade det.
|
||||
|
||||
Du kan fortsätta att använda C-x o för att byta mellan de två
|
||||
fönstren. Vart och ett av fönstren har sin egen markörposition men det
|
||||
är bara ett av fönstren som visar den. Alla redigeringskommandon
|
||||
fungerar i det fönster där markören är synlig. Vi kallar detta fönster
|
||||
för det valda fönstret (selected window).
|
||||
fönstren. Det valda fönstret, där de flesta redigeringarna äger rum, är
|
||||
det med den tydligaste markören, som blinkar när du inte skriver. De
|
||||
andra fönstren har sin egen markörposition. Om du kör Emacs under ett
|
||||
fönstersystem, ritas dessa markörer som en tom ruta som inte blinkar..
|
||||
|
||||
Kommandot C-M-v är bra när du redigerar text i ett fönster och
|
||||
använder det andra fönstret för referenser. Då kan du kan ha markören
|
||||
i samma fönster hela tiden och du kan använda C-M-v för att flytta dig
|
||||
i det andra fönstret.
|
||||
använder det andra fönstret för referenser. Utan att lämna det valda
|
||||
fönstret du kan använda C-M-v för att rulla det andra fönstret.
|
||||
|
||||
C-M-v är ett exempel på en KONTROLL-META-kombination. Om du har
|
||||
META-tangenten håller du både KONTROLL och META nedtryckt samtidigt
|
||||
som du trycker v. Det har ingen betydelse vilken av tangenterna
|
||||
KONTROLL och META som trycks först, för bägge fungerar så att de
|
||||
"modifierar" de andra tangenterna du trycker.
|
||||
C-M-v är ett exempel på en KONTROLL-META-kombination. Om du har META-
|
||||
eller Alt-tangenten håller du både KONTROLL och META nedtryckt
|
||||
samtidigt som du trycker v. Det har ingen betydelse vilken av
|
||||
tangenterna KONTROLL och META som trycks först, för bägge fungerar så
|
||||
att de "modifierar" de andra tangenterna du trycker.
|
||||
|
||||
Om du inte har META-tangenten och använder <ESC> istället är
|
||||
ordningsföljden viktig. Du måste trycka <ESC> följt av KONTROLL-v,
|
||||
|
|
@ -961,6 +944,28 @@ filer:
|
|||
>> Skriv C-x o för att gå tillbaka till det övre fönstret och C-x
|
||||
1 för att bli kvitt det nedre igen.
|
||||
|
||||
* MULTIPLA RAMAR
|
||||
----------------
|
||||
|
||||
Emacs kan också skapa flera "ramar". En ram är vad vi kallar en
|
||||
samling av fönster tillsammans med menyer, rullningslister, ekoområde
|
||||
etc. Det som Emacs kallar för ram kallar de flesta andra program för
|
||||
fönster. Flera grafiska ramar kan visas på skärmen samtidigt. På en
|
||||
textterminal kan bara en ram visas åt gången.
|
||||
|
||||
>> Skriv M-x make-frame <Return>.
|
||||
En ny ram visas på din skärm.
|
||||
|
||||
Du kan göra allt du gjorde i den första ramen i den här nya ramen. Det
|
||||
finns inget speciellt med den första ramen.
|
||||
|
||||
>> Skriv M-x delete-frame <Return>.
|
||||
Ta bort den valda ramen.
|
||||
|
||||
Du kan också ta bort ramen genom den vanliga metod som tillhandahålls
|
||||
av fönstersystemet (ofta klickar man på knappen med symbolen "X" i
|
||||
något av de övre hörnen.) Om den sista ramen tas bort på det här
|
||||
sättet så avlutas Emacs.
|
||||
|
||||
* REKURSIVA REDIGERINGSNIVÅER
|
||||
-----------------------------
|
||||
|
|
@ -999,11 +1004,8 @@ hj
|
|||
har skrivit C-h och bestämmer dig för att du inte behöver ha någon
|
||||
hjälp kan du trycka C-g för att avbryta.
|
||||
|
||||
(På vissa platser är C-h omkonfigurerad. Det är normalt ingen bra ide´,
|
||||
så du kan på goda grunder klaga hos systemadministratören. Under
|
||||
tiden, om C-h inte visar ett hjälpmeddelande längst ner på skärmen,
|
||||
kan du i stället försöka med funktionstangenten F1 eller M-x
|
||||
help<Return>.)
|
||||
(Om C-h inte visar ett hjälpmeddelande längst ner på skärmen, kan du i
|
||||
stället försöka med funktionstangenten F1 eller M-x help <Return>.)
|
||||
|
||||
Den mest grundläggande hjälp-funktionen är C-h c. Skriv C-h, ett "c"
|
||||
och en knappsekvens. Emacs ger då en beskrivning av kommandot.
|
||||
|
|
@ -1014,8 +1016,7 @@ Meddelandet skall d
|
|||
|
||||
C-p runs the command previous-line
|
||||
|
||||
Detta ger ett funktionsnamn. Funktionsnamnen används huvudsakligen för
|
||||
att specialanpassa och utvidga Emacs. Men eftersom funktionerna har
|
||||
Detta ger dig namnet på funktionen. Eftersom funktionerna har
|
||||
beskrivande namn kan de också fungera som en enkel dokumentation,
|
||||
tillräckligt för att påminna dig om kommandon du redan lärt dig.
|
||||
|
||||
|
|
@ -1062,9 +1063,9 @@ C-x C-f listade bredvid motsvarande kommandonamn, t.ex. find-file.
|
|||
|
||||
>> Type C-x 1 för att ta bort hjälpfönstret.
|
||||
|
||||
C-h i Läs direktmanualen (alias Info). Detta kommando
|
||||
C-h i Läs den bifogade manualen (alias Info). Detta kommando
|
||||
placerar dig i en speciell buffer vid namn "*info*"
|
||||
där du kan läsa direkthjälpen för de paket som är
|
||||
där du kan läsa hjälpen för de paket som är
|
||||
installerade i ditt system. Slå m emacs <Return> för
|
||||
att läsa Emacs-manualen. Om du aldrig tidigare har
|
||||
använt dig av Info, skriv ? och Emacs tar dig på en
|
||||
|
|
@ -1074,18 +1075,6 @@ C-x C-f listade bredvid motsvarande kommandonamn, t.ex. find-file.
|
|||
din huvudsakliga källa till dokumentation.
|
||||
|
||||
|
||||
* TILL SIST
|
||||
-----------
|
||||
|
||||
Tänk på att använda C-x C-c för att avsluta Emacs permanent. För att
|
||||
tillfälligt gå till ett skal, så att du senare kan komma tillbaka
|
||||
igen, använd C-z. (Under X kommer detta att minimera Emacs.)
|
||||
|
||||
Denna vägledningen är avsedd för nya användare, om det är något som är
|
||||
oklart duger det inte att sitta och tycka synd om sig själv -- Skicka
|
||||
ett mail och klaga!
|
||||
|
||||
|
||||
* MER FUNKTIONER
|
||||
----------------
|
||||
|
||||
|
|
@ -1108,6 +1097,15 @@ Emacs-manualen i noden "Dired".
|
|||
|
||||
Manualen beskriver även många andra Emacs funktioner.
|
||||
|
||||
* SLUTORD
|
||||
---------
|
||||
|
||||
För att avsluta Emacs använd C-x C-c.
|
||||
|
||||
Den här handledningen är tänkt att vara förståelig för alla nya
|
||||
Emacs-användare. Så om det är något som är oklart, klandra inte dig
|
||||
själv, klaga!
|
||||
|
||||
|
||||
* KOPIERING
|
||||
-----------
|
||||
|
|
@ -1121,24 +1119,26 @@ comes with permission to distribute copies on certain conditions:
|
|||
|
||||
Copyright (C) 1985, 1996, 1998, 2001-2012 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to anyone to make or distribute verbatim copies
|
||||
of this document as received, in any medium, provided that the
|
||||
copyright notice and permission notice are preserved,
|
||||
and that the distributor grants the recipient permission
|
||||
for further redistribution as permitted by this notice.
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
Permission is granted to distribute modified versions
|
||||
of this document, or of portions of it,
|
||||
under the above conditions, provided also that they
|
||||
carry prominent notices stating who last altered them.
|
||||
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.
|
||||
|
||||
The conditions for copying Emacs itself are more complex, but in the
|
||||
same spirit. Please read the file COPYING and then do give copies of
|
||||
GNU Emacs to your friends. Help stamp out software obstructionism
|
||||
("ownership") by using, writing, and sharing free software!
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Please read the file COPYING and then do give copies of GNU Emacs to
|
||||
your friends. Help stamp out software obstructionism ("ownership") by
|
||||
using, writing, and sharing free software!
|
||||
|
||||
;;; Local Variables:
|
||||
;;; coding: latin-1
|
||||
;;; sentence-end-double-space: nil
|
||||
;;; End:
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ This file contains the list of translators and maintainers of the
|
|||
tutorial.
|
||||
|
||||
* TUTORIAL.bg:
|
||||
Author: Ognyan Kulev <ogi@fmi.uni-sofia.bg>
|
||||
Maintainer: Ognyan Kulev <ogi@fmi.uni-sofia.bg>
|
||||
Author: Ognyan Kulev <ogi@tower.3.bg>
|
||||
Maintainer: Ognyan Kulev <ogi@tower.3.bg>
|
||||
|
||||
* TUTORIAL.cn:
|
||||
Author: Sun Yijiang <sunyijiang@gmail.com>
|
||||
|
|
@ -75,8 +75,8 @@ Author: Miroslav Vaško <vasko@debian.cz>
|
|||
Maintainer: Maintainer needed.
|
||||
|
||||
* TUTORIAL.sl:
|
||||
Author: Primož Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>
|
||||
Maintainer: Primož Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>
|
||||
Author: Primož Peterlin <primozz.peterlin@gmail.com>
|
||||
Maintainer: Primož Peterlin <primozz.peterlin@gmail.com>
|
||||
|
||||
* TUTORIAL.sv:
|
||||
Author: Mats Lidell <matsl@contactor.se>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
# the same distribution terms as the rest of that program.
|
||||
#
|
||||
# Generated by gnulib-tool.
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=pathmax --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
|
||||
|
||||
|
||||
MOSTLYCLEANFILES += core *.stackdump
|
||||
|
|
@ -258,6 +258,15 @@ EXTRA_libgnu_a_SOURCES += mktime.c
|
|||
|
||||
## end gnulib module mktime
|
||||
|
||||
## begin gnulib module pathmax
|
||||
|
||||
if gl_GNULIB_ENABLED_pathmax
|
||||
|
||||
endif
|
||||
EXTRA_DIST += pathmax.h
|
||||
|
||||
## end gnulib module pathmax
|
||||
|
||||
## begin gnulib module pthread_sigmask
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ $(BLD)/filemode.$(O) : \
|
|||
#
|
||||
$(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O): stamp_BLD
|
||||
$(BLD)/strftime.$(O) $(BLD)/time_r.$(O) $(BLD)/md5.$(O): stamp_BLD
|
||||
$(BLD)/sha1.$(O) $(BLD)/sha256.$(O) $(BLD)/sha512.$(O): stamp_BLD
|
||||
$(BLD)/filemode.$(O): stamp_BLD
|
||||
|
||||
#
|
||||
|
|
@ -212,7 +213,6 @@ getopt_.h-SH: doit
|
|||
|
||||
HAVE_GETOPT_H = HAVE_GETOPT_H
|
||||
INCLUDE_NEXT = include_next
|
||||
PRAGMA_SYSTEM_HEADER = \#pragma GCC system_header
|
||||
PRAGMA_COLUMNS =
|
||||
NEXT_GETOPT_H = <getopt.h>
|
||||
ARG_NONNULL_H = ../build-aux/snippet/arg-nonnull.h
|
||||
|
|
|
|||
84
lib/pathmax.h
Normal file
84
lib/pathmax.h
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
/* Define PATH_MAX somehow. Requires sys/types.h.
|
||||
Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2011 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program 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, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program 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 this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef _PATHMAX_H
|
||||
# define _PATHMAX_H
|
||||
|
||||
/* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename,
|
||||
including the terminating NUL byte.
|
||||
<http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html>
|
||||
PATH_MAX is not defined on systems which have no limit on filename length,
|
||||
such as GNU/Hurd.
|
||||
|
||||
This file does *not* define PATH_MAX always. Programs that use this file
|
||||
can handle the GNU/Hurd case in several ways:
|
||||
- Either with a package-wide handling, or with a per-file handling,
|
||||
- Either through a
|
||||
#ifdef PATH_MAX
|
||||
or through a fallback like
|
||||
#ifndef PATH_MAX
|
||||
# define PATH_MAX 8192
|
||||
#endif
|
||||
or through a fallback like
|
||||
#ifndef PATH_MAX
|
||||
# define PATH_MAX pathconf ("/", _PC_PATH_MAX)
|
||||
#endif
|
||||
*/
|
||||
|
||||
# include <unistd.h>
|
||||
|
||||
# include <limits.h>
|
||||
|
||||
# ifndef _POSIX_PATH_MAX
|
||||
# define _POSIX_PATH_MAX 256
|
||||
# endif
|
||||
|
||||
/* Don't include sys/param.h if it already has been. */
|
||||
# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
|
||||
# include <sys/param.h>
|
||||
# endif
|
||||
|
||||
# if !defined PATH_MAX && defined MAXPATHLEN
|
||||
# define PATH_MAX MAXPATHLEN
|
||||
# endif
|
||||
|
||||
# ifdef __hpux
|
||||
/* On HP-UX, PATH_MAX designates the maximum number of bytes in a filename,
|
||||
*not* including the terminating NUL byte, and is set to 1023.
|
||||
Additionally, when _XOPEN_SOURCE is defined to 500 or more, PATH_MAX is
|
||||
not defined at all any more. */
|
||||
# undef PATH_MAX
|
||||
# define PATH_MAX 1024
|
||||
# endif
|
||||
|
||||
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
|
||||
/* The page "Naming Files, Paths, and Namespaces" on msdn.microsoft.com,
|
||||
section "Maximum Path Length Limitation",
|
||||
<http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx#maxpath>
|
||||
explains that the maximum size of a filename, including the terminating
|
||||
NUL byte, is 260 = 3 + 256 + 1.
|
||||
This is the same value as
|
||||
- FILENAME_MAX in <stdio.h>,
|
||||
- _MAX_PATH in <stdlib.h>,
|
||||
- MAX_PATH in <windef.h>.
|
||||
Undefine the original value, because mingw's <limits.h> gets it wrong. */
|
||||
# undef PATH_MAX
|
||||
# define PATH_MAX 260
|
||||
# endif
|
||||
|
||||
#endif /* _PATHMAX_H */
|
||||
648
lisp/ChangeLog
648
lisp/ChangeLog
|
|
@ -1,3 +1,636 @@
|
|||
2012-02-10 Lars Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* mail/emacsbug.el (report-emacs-bug-hook): Query the user first
|
||||
about SMTP before checking the From header.
|
||||
|
||||
* mail/sendmail.el (sendmail-query-user-about-smtp): Refacored out
|
||||
into own function for reuse by emacsbug.el.
|
||||
|
||||
2012-02-10 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* subr.el (condition-case-unless-debug): Rename from
|
||||
condition-case-no-debug. All callers changed.
|
||||
(with-demoted-errors): Fix caller.
|
||||
|
||||
* vc/diff-mode.el (diff-auto-refine-mode, diff-hunk):
|
||||
* nxml/rng-valid.el (rng-do-some-validation):
|
||||
* emacs-lisp/package.el (package-refresh-contents)
|
||||
(package-menu-execute):
|
||||
* desktop.el (desktop-create-buffer):
|
||||
* font-lock.el (lisp-font-lock-keywords-2): caller changed.
|
||||
|
||||
2012-02-10 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* textmodes/bibtex.el:
|
||||
Add missing :version tags for new/changed defcustoms.
|
||||
|
||||
* files.el (remote-file-name-inhibit-cache): Doc fixes.
|
||||
|
||||
2012-02-09 Lars Ingebrigtsen <larsi@rusty>
|
||||
|
||||
* mail/smtpmail.el (smtpmail-user-mail-address): New function.
|
||||
(smtpmail-via-smtp): Use it, or fall back on the From address.
|
||||
(smtpmail-send-it): Ditto.
|
||||
|
||||
2012-02-09 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/bytecomp.el (byte-compile-file-form-defvar):
|
||||
Don't fallback on byte-compile-defvar. Optimize (defvar foo) away.
|
||||
(byte-compile-tmp-var): New const.
|
||||
(byte-compile-defvar): Use it to minimize .elc size.
|
||||
Just use `defvar' rather than simulate it (bug#10761).
|
||||
|
||||
2012-02-09 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* files.el (rename-uniquely): Doc fix. (Bug#3806)
|
||||
|
||||
* progmodes/cc-guess.el (c-guess-offset-threshold, c-guess-region-max):
|
||||
Add :version tags.
|
||||
|
||||
* progmodes/compile.el (compilation-first-column)
|
||||
(compilation-error-screen-columns, compilation-filter-start): Doc fixes.
|
||||
|
||||
* vc/log-view.el (log-view-toggle-entry-display):
|
||||
* vc/vc.el (vc-merge, vc-pull): Doc fixes.
|
||||
|
||||
* mail/emacsbug.el (report-emacs-bug-can-use-osx-open)
|
||||
(report-emacs-bug-can-use-xdg-email):
|
||||
(report-emacs-bug-insert-to-mailer): Doc fixes.
|
||||
(report-emacs-bug): Message fix.
|
||||
|
||||
* net/browse-url.el (browse-url-can-use-xdg-open)
|
||||
(browse-url-xdg-open): Doc fixes.
|
||||
|
||||
* electric.el (electric-indent-mode, electric-pair-mode)
|
||||
(electric-layout-rules, electric-layout-mode): Doc fixes.
|
||||
(electric-pair-pairs, electric-pair-skip-self): Add :version tags.
|
||||
|
||||
2012-02-08 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* server.el (server-unselect-display): Don't inadvertently kill
|
||||
the current buffer. (Bug#10729)
|
||||
|
||||
2012-02-08 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* progmodes/sql.el (sql-port, sql-connection-alist, sql-list-all)
|
||||
(sql-list-table): Doc fixes.
|
||||
|
||||
* image-mode.el (image-transform-minor-mode-map, image-transform-mode):
|
||||
Comment out (does nothing).
|
||||
|
||||
* completion.el (dynamic-completion-mode):
|
||||
* dirtrack.el (dirtrack-debug-mode):
|
||||
* electric.el (electric-layout-mode):
|
||||
* epa-mail.el (epa-mail-mode, epa-global-mail-mode):
|
||||
* face-remap.el (text-scale-mode, buffer-face-mode):
|
||||
* iimage.el (iimage-mode):
|
||||
* image-mode.el (image-transform-mode):
|
||||
* minibuffer.el (completion-in-region-mode):
|
||||
* scroll-lock.el (scroll-lock-mode):
|
||||
* simple.el (next-error-follow-minor-mode):
|
||||
* tar-mode.el (tar-subfile-mode):
|
||||
* tooltip.el (tooltip-mode):
|
||||
* vcursor.el (vcursor-use-vcursor-map):
|
||||
* wid-browse.el (widget-minor-mode):
|
||||
* emulation/tpu-edt.el (tpu-edt-mode):
|
||||
* emulation/tpu-extras.el (tpu-cursor-free-mode):
|
||||
* international/iso-ascii.el (iso-ascii-mode):
|
||||
* language/thai-util.el (thai-word-mode):
|
||||
* mail/supercite.el (sc-minor-mode):
|
||||
* net/goto-addr.el (goto-address-mode):
|
||||
* net/rcirc.el (rcirc-multiline-minor-mode, rcirc-track-minor-mode):
|
||||
* progmodes/cwarn.el (cwarn-mode):
|
||||
* progmodes/flymake.el (flymake-mode):
|
||||
* progmodes/glasses.el (glasses-mode):
|
||||
* progmodes/hideshow.el (hs-minor-mode):
|
||||
* progmodes/pascal.el (pascal-outline-mode):
|
||||
* textmodes/enriched.el (enriched-mode):
|
||||
* vc/smerge-mode.el (smerge-mode):
|
||||
Doc fixes (minor mode argument).
|
||||
|
||||
2012-02-07 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* ls-lisp.el (ls-lisp-sanitize): New function.
|
||||
(ls-lisp-insert-directory): Use it to fix or remove any elements
|
||||
in file-alist with missing attributes. (Bug#4673)
|
||||
|
||||
2012-02-07 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
Fix spurious recognition of c-in-knr-argdecl.
|
||||
|
||||
* progmodes/cc-engine.el (c-in-knr-argdecl): Check for '=' in a
|
||||
putative K&R region.
|
||||
|
||||
2012-02-07 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
* progmodes/cc-engine.el (c-forward-objc-directive): Prevent
|
||||
looping in "#pragma mark @implementation".
|
||||
|
||||
2012-02-07 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* notifications.el (notifications-on-closed-signal): Make `reason'
|
||||
optional. (Bug#10744)
|
||||
|
||||
2012-02-07 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* emacs-lisp/easy-mmode.el (define-minor-mode):
|
||||
Doc fixes for the macro and the mode it defines.
|
||||
|
||||
* image.el (imagemagick-types-inhibit): Doc fix.
|
||||
|
||||
* cus-start.el (imagemagick-render-type): Add it.
|
||||
|
||||
2012-02-06 Lars Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* progmodes/cc-mode.el
|
||||
(c-standard-font-lock-fontify-region-function): Set the default at
|
||||
load time, too, so that `font-lock-fontify-buffer' can be called
|
||||
without setting up the entire mode first. This fixes a bug in
|
||||
`mm-inline-text' with C MIME parts.
|
||||
|
||||
2012-02-06 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* simple.el (list-processes--refresh): Delete exited processes
|
||||
(Bug#8094).
|
||||
|
||||
* comint.el (comint-next-prompt): next-single-char-property-change
|
||||
and prev-single-char-property-change never return nil (Bug#8657).
|
||||
|
||||
* custom.el (defcustom): Doc fix (Bug#9711).
|
||||
|
||||
2012-02-05 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* cus-edit.el (custom-variable-reset-backup): Quote the value
|
||||
before storing it in the customized-value property (Bug#6712).
|
||||
(custom-display): Add a customization type tag.
|
||||
(custom-buffer-create-internal): Improve tooltip message.
|
||||
|
||||
* wid-edit.el (widget-field-value-get): New optional arg to
|
||||
suppress trailing whitespace truncation.
|
||||
(character): Use it (Bug#2689).
|
||||
|
||||
2012-02-05 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* progmodes/gud.el (gud-pv): Use pv instead of pv1.
|
||||
* progmodes/gdb-mi.el (gud-pp): Use pp instead of pp1.
|
||||
|
||||
2012-02-05 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* cus-edit.el (custom-variable-value-create): For mismatched
|
||||
types, show the current value (Bug#7600).
|
||||
|
||||
* custom.el (defcustom): Doc fix.
|
||||
|
||||
2012-02-05 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* font-lock.el (lisp-font-lock-keywords-2): Add with-wrapper-hook.
|
||||
|
||||
2012-02-05 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* emacs-lisp/pp.el (pp-to-string): Use `with-temp-buffer'.
|
||||
(pp-buffer): Use `ignore-errors', `looking-at-p'.
|
||||
(pp-last-sexp): Use `looking-at-p'.
|
||||
|
||||
2012-02-04 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* files.el (revert-buffer):
|
||||
Doc fix (mention revert-buffer-in-progress-p).
|
||||
|
||||
* emacs-lisp/ert-x.el (ert-simulate-command):
|
||||
Check deferred-action-list (which is obsolete) is bound.
|
||||
|
||||
* subr.el (with-wrapper-hook): Doc fixes.
|
||||
|
||||
* simple.el (filter-buffer-substring-functions)
|
||||
(buffer-substring-filters, filter-buffer-substring): Doc fixes.
|
||||
|
||||
2012-02-04 Lars Ljung <lars@matholka.se> (tiny change)
|
||||
|
||||
* eshell/esh-ext.el (eshell-windows-shell-file): Match "cmdproxy"
|
||||
anywhere in shell-file-name, not just at the beginning. (Bug#10523)
|
||||
|
||||
2012-02-04 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* emacs-lisp/smie.el: Fix dead link (Bug#10711).
|
||||
|
||||
2012-02-04 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* image.el (image-extension-data): Add obsolete alias.
|
||||
|
||||
* isearch.el (isearch-update): Doc fix.
|
||||
|
||||
* facemenu.el (list-colors-display): Doc fix (minor rephrasing).
|
||||
|
||||
* ido.el (ido-find-file): Doc fix (ido-toggle-vc not on any key).
|
||||
|
||||
2012-02-03 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* image.el (image-animated-p): Doc fix. Use image-animated-types.
|
||||
(image-animate-timeout): Doc fix.
|
||||
|
||||
* image-mode.el (image-animate-loop, image-toggle-animation): Doc fixes.
|
||||
|
||||
2012-02-02 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* server.el (server-auth-dir): Doc fix.
|
||||
(server-eval-at): Doc fix. Give an explicit error if !server-use-tcp.
|
||||
|
||||
* subr.el (run-mode-hooks): Doc fix.
|
||||
|
||||
2012-02-02 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* image-mode.el (image-toggle-display-image): Remove tautological
|
||||
`major-mode' from the `derived-mode-p' test.
|
||||
|
||||
2012-02-02 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* composite.el (compose-region): Cancel previous change.
|
||||
|
||||
2012-02-02 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* composite.el (compose-region, compose-string): Signal error for
|
||||
a null string component (Bug#6988).
|
||||
|
||||
2012-02-01 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* view.el (view-buffer-other-window, view-buffer-other-frame):
|
||||
Handle special modes like view-buffer (Bug#10650).
|
||||
(view-buffer): Simplify.
|
||||
|
||||
* frame.el (set-frame-font): Tweak meaning of third argument.
|
||||
|
||||
* dynamic-setting.el (font-setting-change-default-font):
|
||||
Use set-frame-font (Bug#9982).
|
||||
|
||||
2012-02-01 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* progmodes/compile.el (compilation-internal-error-properties):
|
||||
Respect compilation-first-column in the "*compilation*" buffer.
|
||||
|
||||
* emacs-lisp/easy-mmode.el (define-minor-mode):
|
||||
Relax :variable's test for a named function.
|
||||
|
||||
2012-01-31 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
* progmodes/cc-engine.el (c-guess-basic-syntax): CASE 5B.1: Fix an
|
||||
off by one error.
|
||||
|
||||
2012-01-31 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* frame.el (set-frame-font): New arg ALL-FRAMES.
|
||||
|
||||
* menu-bar.el (menu-set-font): Use set-frame-font.
|
||||
|
||||
* faces.el (face-spec-reset-face): Don't apply unspecified
|
||||
attribute values to the default face.
|
||||
|
||||
2012-01-31 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* progmodes/cwarn.el (cwarn): Remove dead link.
|
||||
(cwarn-configuration, cwarn-verbose, cwarn-mode-text, cwarn-load-hook):
|
||||
Remove * from defcustom docstrings.
|
||||
(turn-on-cwarn-mode): Make obsolete.
|
||||
(c-at-toplevel-p): Remove compatibility code for Emacs 20.3 and older.
|
||||
(turn-on-cwarn-mode-if-enabled): Call `cwarn-mode'.
|
||||
|
||||
2012-01-31 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.
|
||||
Fix :variable handling of mode a symbol not equal to modefun.
|
||||
Allow named functions to be used as the cdr of :variable.
|
||||
|
||||
2012-01-30 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* emacs-lisp/authors.el (authors-fixed-entries):
|
||||
Remove reference to deleted file rnewspost.el.
|
||||
|
||||
2012-01-29 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* window.el (window-with-parameter): Remove unused variable `windows'.
|
||||
(window--side-check): Remove unused variable `code'.
|
||||
(window--resize-siblings): Remove unused variable `first'.
|
||||
(adjust-window-trailing-edge): Remove unused variable `failed'.
|
||||
(window-deletable-p, window--delete): Remove unused variable `buffer'.
|
||||
Use `let', not `let*'.
|
||||
(balance-windows-2): Remove unused variable `found'.
|
||||
(window--state-put-2): Remove unused variable `splits'.
|
||||
(window-state-put): Remove unused variable `selected'.
|
||||
(same-window-p): Use `string-match-p'.
|
||||
(display-buffer-assq-regexp): Remove unused variable `value'.
|
||||
(display-buffer-pop-up-frame, display-buffer-pop-up-window):
|
||||
Mark argument ALIST as ignored.
|
||||
(pop-to-buffer): Remove unused variable `old-window'.
|
||||
|
||||
2012-01-29 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* jka-cmpr-hook.el (jka-compr-compression-info-list): Support .lz
|
||||
and .lzma compressed files.
|
||||
|
||||
2012-01-29 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* frame.el (window-system-default-frame-alist): Doc fix.
|
||||
|
||||
* dynamic-setting.el (font-setting-change-default-font): Don't
|
||||
change the default face if SET-FONT argument is non-nil (Bug#9982).
|
||||
|
||||
2012-01-29 Samuel Bronson <naesten@gmail.com> (tiny change)
|
||||
|
||||
* custom.el (defcustom): Add doc link to Lisp manual (Bug#10635).
|
||||
|
||||
2012-01-29 Syver Enstad <syver.enstad@cisco.com> (tiny change)
|
||||
|
||||
* progmodes/gud.el (pdb): Give pdb full paths, to allow setting
|
||||
breakpoints in files outside current directory (Bug#6098).
|
||||
|
||||
2012-01-29 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* progmodes/python.el: Require ansi-color at top-level.
|
||||
|
||||
* emacs-lisp/lisp-mode.el (emacs-lisp-mode-abbrev-table):
|
||||
Define and use in Emacs Lisp mode (Bug#9360).
|
||||
(lisp-mode-abbrev-table): Add doc.
|
||||
(lisp-mode-variables): Don't set local-abbrev-table.
|
||||
(lisp-interaction-mode): Use emacs-lisp-mode-abbrev-table.
|
||||
|
||||
2012-01-28 Roland Winkler <winkler@gnu.org>
|
||||
|
||||
* textmodes/bibtex.el (bibtex-vec-incr): Fix docstring.
|
||||
|
||||
2012-01-28 Roland Winkler <winkler@gnu.org>
|
||||
|
||||
* textmodes/bibtex.el (bibtex-entry-alist): New function.
|
||||
(bibtex-set-dialect): Use it. Either set global values of
|
||||
dialect-dependent variables or bind these variables buffer-locally
|
||||
(Bug#10254).
|
||||
(bibtex-mode): Call bibtex-set-dialect via
|
||||
hack-local-variables-hook.
|
||||
(bibtex-dialect): Update docstring. Add
|
||||
safe-local-variable predicate.
|
||||
(bibtex-entry-alist, bibtex-field-alist): Initialize via
|
||||
bibtex-set-dialect.
|
||||
(bibtex-mode-map): Define menu for each dialect.
|
||||
(bibtex-entry): Fix docstring.
|
||||
|
||||
2012-01-28 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* eshell/esh-arg.el (eshell-quote-argument): New function.
|
||||
|
||||
* eshell/esh-ext.el (eshell-invoke-batch-file):
|
||||
* eshell/em-unix.el (eshell/cat, eshell/du): Use it to quote the
|
||||
first arg to eshell-parse-command (Bug#10523).
|
||||
|
||||
2012-01-28 Drew Adams <drew.adams@oracle.com>
|
||||
|
||||
* net/ange-ftp.el (ange-ftp-canonize-filename): Check, that
|
||||
`default-directory' is non-nil.
|
||||
|
||||
2012-01-28 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* mail/emacsbug.el (report-emacs-bug): Fill the potentially long
|
||||
line that displays system-configuration-options. (Bug#9924)
|
||||
|
||||
2012-01-28 Drew Adams <drew.adams@oracle.com>
|
||||
|
||||
* descr-text.el (describe-char): Show information about POS, in
|
||||
addition to information about the character at POS. Improve and
|
||||
update the doc string. Change "code point" to "code point in
|
||||
charset", to avoid confusion with the character's Unicode code
|
||||
point shown above that. (Bug#10129)
|
||||
|
||||
2012-01-28 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* descr-text.el (describe-char): Show the raw character, not only
|
||||
its display form at POS. Suggested by Kenichi Handa <handa@m17n.org>.
|
||||
See http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00760.html
|
||||
for the reasons.
|
||||
|
||||
2012-01-28 Phil Hagelberg <phil@hagelb.org>
|
||||
|
||||
* emacs-lisp/package.el (package-install): Run
|
||||
package-refresh-contents if there is no archive yet (Bug#9798).
|
||||
|
||||
2012-01-28 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* emacs-lisp/package.el (package-maybe-load-descriptor):
|
||||
New function, split from package-maybe-load-descriptor.
|
||||
(package-maybe-load-descriptor): Use it.
|
||||
(package-download-transaction): Fully load required packages
|
||||
inside the loop, so that `require' calls work (Bug#10593).
|
||||
(package-install): No need to call package-initialize now.
|
||||
|
||||
2012-01-28 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* simple.el (deactivate-mark): Doc fix (Bug#8614).
|
||||
|
||||
* tooltip.el (tooltip-mode): Doc fix.
|
||||
(tooltip-use-echo-area): Mark as obsolete (Bug#6595).
|
||||
|
||||
* frame.el (set-cursor-color): Doc fix (Bug#352).
|
||||
|
||||
* mail/rmail.el (rmail-start-mail): Add send-action again (Bug#10625).
|
||||
(rmail-mail-return): Switch to NEWBUF only if it is non-nil.
|
||||
|
||||
* cus-edit.el (custom-buffer-create-internal): Fix search button
|
||||
action (Bug#10542).
|
||||
(customize-unsaved, customize-saved): Doc fix (Bug#10541).
|
||||
|
||||
2012-01-27 Eduard Wiebe <usenet@pusto.de>
|
||||
|
||||
* dired.el (dired-mark-files-regexp):
|
||||
Include any subdirectory components. (Bug#10445)
|
||||
|
||||
2012-01-27 Mike Lamb <mrlamb@gmail.com> (tiny change)
|
||||
|
||||
* pcmpl-unix.el (pcmpl-ssh-known-hosts):
|
||||
Handle [host]:port syntax. (Bug#10533)
|
||||
|
||||
2012-01-27 Alex Harsanyi <harsanyi@mac.com>
|
||||
|
||||
* xml.el (xml-parse-tag): Fix parsing of comments (Bug#10405).
|
||||
|
||||
2012-01-26 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* dired-x.el (dired-bind-jump): Use ctl-x-map and ctl-x-4-map.
|
||||
* term.el (term-raw-escape-map): Use Control-X-prefix.
|
||||
* vc/vc-hooks.el (vc-prefix-map): Use ctl-x-map. (Bug#10566)
|
||||
|
||||
2012-01-25 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* window.el (window-state-get, window--state-get-1): Don't deal
|
||||
with fixed-sizeness of windows. Simplify code.
|
||||
|
||||
2012-01-25 Jérémy Compostella <jeremy.compostella@gmail.com>
|
||||
|
||||
* window.el (window--state-get-1, window--state-put-2):
|
||||
Don't save and restore the mark.
|
||||
|
||||
2012-01-25 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* custom.el (custom-variable-p): Doc fix.
|
||||
|
||||
2012-01-25 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* dired.el (dired-goto-file): Handle some of the more common
|
||||
characters that `ls -b' escapes. (Bug#10596)
|
||||
|
||||
* progmodes/compile.el (compilation-next-error-function):
|
||||
Respect compilation-first-column in the "*compilation*" buffer.
|
||||
* progmodes/grep.el (grep-first-column): New variable. (Bug#10594)
|
||||
|
||||
* vc/vc.el (vc-modify-change-comment): Scoping fix. (Bug#10513)
|
||||
|
||||
2012-01-24 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* pcmpl-gnu.el (pcomplete/tar): Handle " - ". (Bug#10457)
|
||||
|
||||
2012-01-24 Julien Danjou <julien@danjou.info>
|
||||
|
||||
* color.el (color-rgb-to-hsl): Fix value computing.
|
||||
(color-hue-to-rgb): New function.
|
||||
(color-hsl-to-rgb): New function.
|
||||
(color-clamp, color-saturate-hsl, color-saturate-name)
|
||||
(color-desaturate-hsl, color-desaturate-name, color-lighten-hsl)
|
||||
(color-lighten-name, color-darken-hsl, color-darken-name): New function.
|
||||
|
||||
2012-01-24 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* vc/vc-rcs.el (vc-rcs-create-tag):
|
||||
* vc/vc-sccs.el (vc-sccs-create-tag):
|
||||
Fix argument spec to be what vc-create-tag expects. (Bug#10515)
|
||||
|
||||
2012-01-23 Mike Lamb <mrlamb@gmail.com> (tiny change)
|
||||
|
||||
* eshell/esh-util.el (eshell-read-hosts-file):
|
||||
Skip comment lines. (Bug#10549)
|
||||
|
||||
* eshell/em-unix.el (pcomplete/ssh): Remove. (Bug#10548)
|
||||
|
||||
2012-01-23 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* subr.el (display-delayed-warnings): Doc fix.
|
||||
(collapse-delayed-warnings): New function to collapse identical
|
||||
adjacent warnings.
|
||||
(delayed-warnings-hook): Add it.
|
||||
|
||||
2012-01-22 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp.el (tramp-action-login): Set connection property "login-as".
|
||||
|
||||
* net/tramp-cache.el (tramp-dump-connection-properties): Do not dump
|
||||
properties, when "login-as" is set.
|
||||
|
||||
* net/tramp-sh.el (tramp-methods): Add user spec to "pscp" and "psftp".
|
||||
(tramp-default-user-alist): Don't add "pscp".
|
||||
(tramp-do-copy-or-rename-file-out-of-band): Use connection
|
||||
property "login-as", if set. (Bug#10530)
|
||||
|
||||
2012-01-21 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp-sh.el (tramp-default-user-alist): Don't add "plink",
|
||||
"plink1" and "psftp". (Bug#10530)
|
||||
|
||||
2012-01-21 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* international/mule-cmds.el (prefer-coding-system): Show a
|
||||
warning message if the default value of file-name-coding-system
|
||||
was not changed.
|
||||
|
||||
2012-01-21 Jérémy Compostella <jeremy.compostella@gmail.com>
|
||||
|
||||
* windmove.el (windmove-reference-loc):
|
||||
Fix windmove-reference-loc miscalculation.
|
||||
|
||||
2012-01-21 Jay Belanger <jay.p.belanger@gmail.com>
|
||||
|
||||
* calc/calc-units.el (math-put-default-units): Don't use "1" as a
|
||||
default unit.
|
||||
|
||||
2012-01-21 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* international/mule.el (auto-coding-alist): Add .tbz.
|
||||
|
||||
* files.el (local-enable-local-variables): Doc fix.
|
||||
(inhibit-local-variables-regexps): Rename from
|
||||
inhibit-first-line-modes-regexps. Keep old name as obsolete alias.
|
||||
Doc fix. Add some extensions from auto-coding-alist.
|
||||
(inhibit-local-variables-suffixes):
|
||||
Rename from inhibit-first-line-modes-suffixes. Doc fix.
|
||||
(inhibit-local-variables-p):
|
||||
New function, extracted from set-auto-mode-1.
|
||||
(set-auto-mode): Doc fix. Respect inhibit-local-variables-regexps.
|
||||
(set-auto-mode-1): Doc fix. Use inhibit-local-variables-p.
|
||||
(hack-local-variables): Doc fix. Make the mode-only case
|
||||
respect enable-local-variables and friends.
|
||||
Respect inhibit-local-variables-regexps for file-locals, but
|
||||
not for directory-locals.
|
||||
(set-visited-file-name):
|
||||
Take account of inhibit-local-variables-regexps.
|
||||
Whether it applies may change as the file name is changed.
|
||||
* jka-cmpr-hook.el (jka-compr-install):
|
||||
* jka-compr.el (jka-compr-uninstall):
|
||||
Update for inhibit-first-line-modes-suffixes name change.
|
||||
|
||||
2012-01-20 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* help-macro.el (make-help-screen): Temporarily restore original
|
||||
binding for minor-mode-map-alist (Bug#10454).
|
||||
|
||||
2012-01-19 Julien Danjou <julien@danjou.info>
|
||||
|
||||
* color.el (color-name-to-rgb): Use the white color to find the max
|
||||
color component value and return correctly computed values.
|
||||
(color-name-to-rgb): Add missing float conversion for max value.
|
||||
|
||||
2012-01-19 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* window.el (window--state-get-1, window-state-get): Do not use
|
||||
special state value for window-persistent-parameters. Rename
|
||||
argument IGNORE to WRITABLE. Rewrite doc-string.
|
||||
(window--state-put-2): Reset all window parameters to nil before
|
||||
assigning values of persistent parameters.
|
||||
|
||||
2012-01-18 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
Eliminate sluggishness and hangs in fontification of "semicolon
|
||||
deserts".
|
||||
|
||||
* progmodes/cc-engine.el (c-state-nonlit-pos-interval):
|
||||
Change value 10000 -> 3000.
|
||||
(c-state-safe-place): Reformulate so it doesn't stack up an
|
||||
infinite number of wrong entries in c-state-nonlit-pos-cache.
|
||||
(c-determine-limit-get-base, c-determine-limit): New functions to
|
||||
determine backward search limits disregarding literals.
|
||||
(c-find-decl-spots): Amend commenting.
|
||||
(c-cheap-inside-bracelist-p): New function which detects "={".
|
||||
|
||||
* progmodes/cc-fonts.el
|
||||
(c-make-font-lock-BO-decl-search-function): Give a limit to a
|
||||
backward search.
|
||||
(c-font-lock-declarations): Fix an occurrence of point being
|
||||
undefined. Check additionally for point being in a bracelist or
|
||||
near a macro invocation without a semicolon so as to avoid a
|
||||
fruitless time consuming search for a declarator. Give a more
|
||||
precise search limit for declarators using the new
|
||||
c-determine-limit.
|
||||
|
||||
2012-01-18 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* files.el (auto-mode-alist, inhibit-first-line-modes-regexps)
|
||||
(set-auto-mode): Doc fixes.
|
||||
|
||||
2012-01-17 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* isearch.el (search-nonincremental-instead): Fix doc typo.
|
||||
|
||||
* dired.el (dired-insert-directory): Handle newlines in directory name.
|
||||
(dired-build-subdir-alist): Unescape newlines in directory name.
|
||||
|
||||
2012-01-17 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp.el (tramp-local-end-of-line): New defcustom.
|
||||
(tramp-action-login, tramp-action-yesno, tramp-action-yn)
|
||||
(tramp-action-terminal): Use it. (Bug#10530)
|
||||
|
||||
2012-01-16 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* minibuffer.el (completion--replace): Strip properties (bug#10062).
|
||||
|
|
@ -34,6 +667,17 @@
|
|||
|
||||
* dired.el (dired-get-filename): Fix 'verbatim case of previous change.
|
||||
|
||||
2012-01-13 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
Fix filling for when filladapt mode is enabled.
|
||||
|
||||
* progmodes/cc-cmds.el (c-fill-paragraph): In the invocation of
|
||||
c-mask-paragraph, pass in `fill-paragraph' rather than
|
||||
`fill-region-as-paragraph'. (This is a reversion of a previous
|
||||
change.)
|
||||
* progmodes/cc-mode.el (c-basic-common-init): Make
|
||||
fill-paragraph-handle-comment buffer local and set it to nil.
|
||||
|
||||
2012-01-13 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* dired.el (dired-switches-escape-p): New function.
|
||||
|
|
@ -165,7 +809,7 @@
|
|||
first prompt in `sql-interacive-mode'.
|
||||
(sql-mode-oracle-font-lock-keywords): Add CONNECT_BY_* builtin
|
||||
keywords.
|
||||
(sql-mode-mysql-font-lock-keywords): Add ELSEIF keyword.
|
||||
(sql-mode-mysql-font-lock-keywords): Add ELSEIF keyword.
|
||||
(sql-product-interactive): Bug fix: Set `sql-buffer' in
|
||||
context of original buffer. Invoke `sql-login-hook'.
|
||||
|
||||
|
|
@ -3679,7 +4323,7 @@
|
|||
|
||||
* cus-start.el (all): Add entry for bidi-paragraph-direction.
|
||||
|
||||
* international/uni-bidi.el: Regenerated.
|
||||
* international/uni-bidi.el: Regenerate.
|
||||
|
||||
2011-08-23 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue