Merge emacs-25 into master (using imerge)

This commit is contained in:
John Wiegley 2015-12-29 21:40:28 -08:00
commit 9f2f14a072
391 changed files with 14943 additions and 7937 deletions

4
.gitignore vendored
View file

@ -42,6 +42,7 @@ InfoPlist.strings
Makefile
makefile
!etc/refcards/Makefile
!modules/mod-test/Makefile
!test/lisp/progmodes/flymake-resources/Makefile
!test/manual/indent/Makefile
!test/manual/etags/Makefile
@ -139,6 +140,8 @@ src/stamp-h1
*.elc
*.o
*.res
*.so
*.dll
[0-9]*.core
core
core.*[0-9]
@ -209,6 +212,7 @@ lisp/international/uni-*.el
*.cms
*.cp
*.cps
*.doc
*.dvi
*.fn
*.fns

View file

@ -186,10 +186,12 @@ branch later.
However, if you know that the change will be difficult to merge to the
trunk (eg because the trunk code has changed a lot), you can apply the
change to both trunk and branch yourself. Indicate in the release
branch commit log that there is no need to merge the commit to the
trunk; start the commit message with "Backport:". gitmerge.el will
then exclude that commit from the merge to trunk.
change to both trunk and branch yourself. It could also happen that a
change is cherry-picked from master to the release branch, and so
doesn't need to be merged back. In these cases, indicate in the
release branch commit log that there is no need to merge the commit to
the trunk; start the commit message with "Backport:". gitmerge.el
will then exclude that commit from the merge to trunk.
** Other process information

View file

@ -3180,14 +3180,6 @@
* lisp/net/tramp-compat.el (tramp-compat-delete-dups): New defun.
* lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Use it.
2015-10-28 Anders Lindgren <andlind@gmail.com>
Merge branch 'master' of /Volumes/HD2/build/emacs-git-ssh
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/emacs
Merge branch 'master' of /Volumes/HD2/build/emacs-git-ssh
2015-10-28 Michael Albinus <michael.albinus@gmx.de>
* lisp/net/tramp-smb.el (tramp-smb-handle-directory-files):
@ -3207,10 +3199,6 @@
* nsterm.m (ns_constrain_all_frames, ns_init_term): Block input.
* nsterm.m (ns_send_appdefined, EmacsApp): Trace output.
2015-10-28 Anders Lindgren <andlind@gmail.com>
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/emacs
2015-10-28 Artur Malabarba <bruce.connor.am@gmail.com>
* src/process.c (Fget_buffer_process): Improve docstring.

View file

@ -309,6 +309,8 @@ Use --with-wide-int to implement Emacs values with the type 'long long',
even on hosts where a narrower type would do. With this option, on a
typical 32-bit host, Emacs integers have 62 bits instead of 30.
Use --with-cairo to compile Emacs with Cairo drawing.
Use --enable-gcc-warnings to enable compile-time checks that warn
about possibly-questionable C code. This is intended for developers
and is useful with GNU-compatible compilers. On a recent GNU system

View file

@ -10,18 +10,30 @@ The first phase of the release schedule is the "heads-down" working
period for new features, on the `master' branch and several feature
branches.
** Phase two: bugfixes
** Phase two: fixing and stabilizing the release branch
Shortly before this phase, Emacs developers will be devoted to
figuring out what features to include in the next release and what
features to defer to a later release.
This phase is mostly spent fixing bugs and documenting new features
and changes on the "emacs-NN" branch. Actually, the default branch
for pushing any work in this phase should be "emacs-NN", except for
new features.
At the beginning of this phase, a release branch called "emacs-NN"
("NN" represents the major version number of the new Emacs release)
will be cut from `master'.
will be cut from `master'. When that happens, the version number on
`master' should be incremented; use admin/admin.el's `set-version'
command to do that, then commit the changes it made and push to
`master'. For major releases, also update the value of
`customize-changed-options-previous-release'.
This phase is spent fixing bugs and eliminating undocumented new
features on the "emacs-NN" branch.
The 2 main manuals, the User Manual and the Emacs Lisp Manual, need to
be proofread, preferably by at least 2 different persons, and any
uncovered problems fixed. This is a lot of work, so it is advisable
to divide the job between several people (see the checklist near the
end of this file).
In parallel to this phase, `master' can receive new features, to be
released in the next release cycle. From time to time, the master
@ -48,8 +60,16 @@ files. See `admin/notes/years' for information about maintaining
copyright years for GNU Emacs.
** Make sure the necessary sources and scripts for any generated files
are included in the source tarfile. (They don't need to be installed,
so eg admin/ is fine.)
are included in the source tarball. (They don't need to be installed,
so e.g. admin/ is fine.)
** Regenerate AUTHORS by using admin/authors.el
(The instructions are at the beginning of that file.)
** Remove temporary +++/--- lines in NEWS.
But first make sure there are no unmarked entries, and update the
documentation (or decide no updates are necessary) for those that
aren't.
** Manuals
Check for node names using problematic characters:
@ -60,7 +80,15 @@ Check for major new features added since the last release (e.g. new
lisp files), and add the relevant authors to the Acknowledgments in
doc/emacs/ack.texi and emacs.texi.
Check cross-references between the manuals (eg from emacs to elisp)
For major releases, rewrite the "Antinews" appendix of the User Manual
(doc/emacs/anti.texi) to describe features lost by downgrading to the
previous version. The way to do that is read NEWS, pick up the more
significant changes and new features in the upcoming release, then
describe the "benefits" from losing those features. Be funny, use
humor. The text written for the previous major release can serve as
good example.
Check cross-references between the manuals (e.g. from emacs to elisp)
are correct. You can use something like the following in the info
directory in the Emacs build tree:
@ -78,32 +106,31 @@ Redirect /software/emacs/manual/html_node/automake/ /software/automake/manual/ht
Another tool you can use to check links is gnu.org's linc.py:
http://www.gnu.org/server/source/
You run this something like:
You run this with something like:
cd /path/to/cvs/emacs-www
linc.py -o /path/to/output-dir --url http://www.gnu.org/software/emacs/ .
Be warned that it is really, really slow (as in, can take ~ a full day
to check the manual/ directory). It is probably best to run it on a
single directory at a time from eg manual/html_node. It is very
single directory at a time from e.g. manual/html_node. It is very
inefficient, but may reveal a few things that info-xref does not.
make emacs.dvi, elisp.dvi, and deal with any errors (undefined
references etc) in the output. Break any overfull lines.
Underfull hboxes are not serious, but it can be nice to get rid of
them if a simple rephrasing or rearrangement will work.
Update the master menu and detailed menu (eg the antinews version).
Update the master menu and detailed menu (e.g. the antinews version).
The command texinfo-multiple-files-update can do this, but you
probably want to apply the results selectively (eg the current master
probably want to apply the results selectively (e.g. the current master
menu has better line-breaks than the automatic version). It includes
the menu-entry name (if there is one) as well as the node name - using
only the latter looks better. Also, it doesn't seem to handle nested
includes, so will miss edebug.texi etc.
Check for widow and orphan lines in the printed manual; make sure all
the pages really look ok in the manual as formatted. Orphans/widows
the pages really look OK in the manual as formatted. Orphans/widows
are cases where the first/last line of a paragraph is on its own at
the end/start of a page, or where the last word in a paragraph is on
its own at the start of a line. It looks better if you reword/respace
@ -117,9 +144,13 @@ pages of the manuals, and even if they do, the resulting page breaks
depend on what paper and font size they use. This also means that if
you _are_ going to do this, it should be done with the paper and font
size that the GNU Press are going to use when they print the manuals.
I think this is different to what you get if you just use eg 'make
I think this is different to what you get if you just use e.g. 'make
emacs.pdf' (e.g., enable "smallbook").
** Try to reorder NEWS: most important things first, related items together.
** For a major release, add a "New in Emacs XX" section to faq.texi.
** Check the keybindings in the refcards are correct, and add any new ones.
What paper size are the English versions supposed to be on?
On Debian testing, the packages texlive-lang-czechslovak and
@ -141,14 +172,6 @@ pt-br Rodrigo Real
ru Alex Ott
sk Miroslav Vaško
** For a major release, add a "New in Emacs XX" section to faq.texi.
** Remove temporary +++/--- lines in NEWS.
** Try to reorder NEWS: most important things first, related items together.
** Consider bumping customize-changed-options-previous-release.
** cusver-check from admin.el can help find new defcustoms missing
:version tags.

View file

@ -77,7 +77,7 @@ test -d .git || {
# Maybe we should skip all "Merge branch 'master'" messages.
# See eg the cairo-related ones.
./build-aux/gitlog-to-changelog \
--ignore-matching="^; |^Merge branch 'master' of git\.(savannah|sv)\.gnu\.org:/srv/git/emacs$|^Merge remote-tracking branch '.*'$" \
--ignore-matching="^; |^Merge branch '(master|emacs-[0-9][0-9])' of git\.(savannah|sv)\.gnu\.org:/srv/git/emacs$|^Merge remote-tracking branch '.*'$" \
--ignore-line='^; ' --format='%B' \
"$gen_origin..$new_origin" >"ChangeLog.tmp" || exit

View file

@ -316,7 +316,7 @@ this option's value should be 'yes', 'no', 'lucid', 'athena', 'motif', 'gtk',
with_x_toolkit=$val
])
OPTION_DEFAULT_OFF([wide-int], [prefer wide Emacs integers (typically 62-bit)])
OPTION_DEFAULT_OFF([wide-int], [prefer wide Emacs integers (typically 62-bit); allows buffer and string size up to 2GB on 32-bit hosts, at the cost of 10% to 30% slowdown of Lisp interpreter and larger memory footprint])
if test "$with_wide_int" = yes; then
AC_DEFINE([WIDE_EMACS_INT], 1, [Use long long for EMACS_INT if available.])
fi
@ -353,6 +353,7 @@ OPTION_DEFAULT_ON([gsettings],[don't compile with GSettings support])
OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support])
OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
OPTION_DEFAULT_ON([zlib],[don't compile with zlib decompression support])
OPTION_DEFAULT_OFF([modules],[compile with dynamic modules support])
AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB],
[use a file notification library (LIB one of: yes, inotify, kqueue, gfile, w32, no)])],
@ -2103,8 +2104,8 @@ AC_CACHE_CHECK(
[[malloc_set_state (malloc_get_state ());
__after_morecore_hook = hook;
__malloc_initialize_hook = hook;]])],
[emacs_cv_var_doug_lea_malloc=yes])])
fi
[emacs_cv_var_doug_lea_malloc=yes])
fi])
doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
system_malloc=$emacs_cv_sanitize_address
@ -2199,7 +2200,6 @@ if test "$ac_cv_header_pthread_h" && test "$opsys" != "mingw32"; then
AC_CACHE_CHECK([for pthread library],
[emacs_cv_pthread_lib],
[emacs_cv_pthread_lib=no
OLD_CPPFLAGS=$CPPFLAGS
OLD_LIBS=$LIBS
for emacs_pthread_lib in 'none needed' -lpthread; do
case $emacs_pthread_lib in
@ -2228,8 +2228,7 @@ if test "$ac_cv_header_pthread_h" && test "$opsys" != "mingw32"; then
if test "$emacs_cv_pthread_lib" != no; then
break
fi
done
CPPFLAGS=$OLD_CPPFLAGS])
done])
if test "$emacs_cv_pthread_lib" != no; then
AC_DEFINE([HAVE_PTHREAD], 1, [Define to 1 if you have POSIX threads.])
case $emacs_cv_pthread_lib in
@ -3305,6 +3304,52 @@ if test "${HAVE_ZLIB}" = "yes"; then
fi
AC_SUBST(LIBZ)
### Dynamic modules support
LIBMODULES=
HAVE_MODULES=no
MODULES_OBJ=
MODULES_SUFFIX=
if test "${with_modules}" != "no"; then
if test "$opsys" = "gnu-linux"; then
LIBMODULES="-ldl"
MODULES_SUFFIX=".so"
HAVE_MODULES=yes
elif test "$opsys" = "cygwin"; then
MODULES_SUFFIX=".dll"
HAVE_MODULES=yes
elif test "$opsys" = "darwin"; then
MODULES_SUFFIX=".so"
HAVE_MODULES=yes
elif test "$opsys" = "mingw32"; then
MODULES_SUFFIX=".dll"
HAVE_MODULES=yes
else
# BSD system have dlopen in the libc
AC_CHECK_FUNC(dlopen, [MODULES_SUFFIX=".so"]
[HAVE_MODULES=yes], [])
fi
if test "${HAVE_MODULES}" = no; then
AC_MSG_ERROR([Dynamic modules are not supported on your system])
else
SAVE_LIBS=$LIBS
LIBS="$LIBS $LIBMODULES"
AC_CHECK_FUNCS([dlfunc])
LIBS=$SAVE_LIBS
fi
fi
if test "${HAVE_MODULES}" = yes; then
MODULES_OBJ="dynlib.o emacs-module.o"
AC_DEFINE(HAVE_MODULES, 1, [Define to 1 if dynamic modules are enabled])
AC_DEFINE_UNQUOTED(MODULES_SUFFIX, "$MODULES_SUFFIX",
[System extension for dynamic libraries])
fi
AC_SUBST(MODULES_OBJ)
AC_SUBST(LIBMODULES)
AX_GCC_VAR_ATTRIBUTE(cleanup)
AC_CHECK_FUNCS(dladdr)
### Use -lpng if available, unless '--with-png=no'.
HAVE_PNG=no
LIBPNG=
@ -5195,7 +5240,7 @@ optsep=
emacs_config_features=
for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \
GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \
LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT X11 NS; do
LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT X11 NS MODULES; do
case $opt in
NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;;
@ -5243,6 +5288,7 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D
Does Emacs use -lotf? ${HAVE_LIBOTF}
Does Emacs use -lxft? ${HAVE_XFT}
Does Emacs directly use zlib? ${HAVE_ZLIB}
Does Emacs have dynamic modules support? ${HAVE_MODULES}
Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}
"])

View file

@ -407,7 +407,7 @@ you are expanding.
in this search; if it is @code{nil}, the word and the expansion must
match in case. If the value is @code{case-fold-search} (the default),
then the variable @code{case-fold-search} controls whether to ignore
case while searching for expansions (@pxref{Search Case}).
case while searching for expansions (@pxref{Lax Search}).
@vindex dabbrev-case-replace
Normally, dynamic abbrev expansion preserves the case pattern
@ -421,7 +421,7 @@ the dynamic abbrev's case pattern is preserved in most cases; if it is
@code{nil}, the expansion is always copied verbatim. If the value is
@code{case-replace} (the default), then the variable
@code{case-replace} controls whether to copy the expansion verbatim
(@pxref{Replacement and Case}).
(@pxref{Replacement and Lax Matches}).
However, if the expansion contains a complex mixed case pattern, and
the dynamic abbrev matches this pattern as far as it goes, then the

View file

@ -63,6 +63,10 @@ Ralf Angeli wrote @file{scroll-lock.el}, a minor mode which keeps the
point vertically fixed by scrolling the window when moving up and down
in the buffer.
@item
Aurélien Aptel added dynamic module support to Emacs. Philipp
Stephani and others also worked on the dynamic module code.
@item
Joe Arceneaux wrote the original text property implementation, and
implemented support for X11.

View file

@ -703,5 +703,6 @@ C-b}. To customize this buffer list, use the @code{bs} Custom group
MSB global minor mode (``MSB'' stands for ``mouse select buffer'')
provides a different and customizable mouse buffer menu which you may
prefer. It replaces the bindings of @code{mouse-buffer-menu},
normally on @kbd{C-Down-Mouse-1}, and the menu bar buffer menu. You
can customize the menu in the @code{msb} Custom group.
normally on @kbd{C-Down-Mouse-1} and @kbd{C-@key{F10}}, and the menu
bar buffer menu. You can customize the menu in the @code{msb} Custom
group.

View file

@ -403,6 +403,8 @@ customizations in your initialization file. This is because saving
customizations from such a session would wipe out all the other
customizations you might have on your initialization file.
@cindex unsaved customizations, reminder to save
@findex custom-prompt-customize-unsaved-options
Please note that any customizations you have not chosen to save for
future sessions will be lost when you terminate Emacs. If you'd like
to be prompted about unsaved customizations at termination time, add
@ -1131,6 +1133,12 @@ won't confuse other programs that the file is intended for. The
example above is for the C programming language, where comments start
with @samp{/*} and end with @samp{*/}.
If some unrelated text might look to Emacs as a local variables list,
you can countermand that by inserting a form-feed character (a page
delimiter, @pxref{Pages}) after that text. Emacs only looks for
file-local variables in the last page of a file, after the last page
delimiter.
@findex add-file-local-variable
@findex delete-file-local-variable
@findex copy-dir-locals-to-file-locals

View file

@ -188,6 +188,7 @@ Advanced Features
* Sending Mail:: Sending mail in Emacs.
* Rmail:: Reading mail in Emacs.
* Gnus:: A flexible mail and news reader.
* Host Security:: Security issues on a single computer.
* Network Security:: Managing the network security.
* Document View:: Viewing PDF, PS and DVI files.
* EWW:: A web browser in Emacs.
@ -392,18 +393,20 @@ Searching and Replacement
* Regexps:: Syntax of regular expressions.
* Regexp Backslash:: Regular expression constructs starting with `\'.
* Regexp Example:: A complex regular expression explained.
* Search Case:: To ignore case while searching, or not.
* Lax Search:: Search ignores some distinctions between
similar characters, like letter-case.
* Replace:: Search, and replace some or all matches.
* Other Repeating Search:: Operating on all matches for some regexp.
* Search Customizations:: Various search customizations.
Incremental Search
* Basic Isearch:: Basic incremental search commands.
* Repeat Isearch:: Searching for the same string again.
* Error in Isearch:: When your string is not found.
* Special Isearch:: Special input in incremental search.
* Isearch Yank:: Commands that grab text into the search string
or else edit the search string.
* Error in Isearch:: When your string is not found.
* Special Isearch:: Special input in incremental search.
* Not Exiting Isearch:: Prefix argument and scrolling commands.
* Isearch Minibuffer:: Incremental search of the minibuffer history.
@ -411,7 +414,8 @@ Replacement Commands
* Unconditional Replace:: Replacing all matches for a string.
* Regexp Replace:: Replacing all matches for a regexp.
* Replacement and Case:: How replacements preserve case of letters.
* Replacement and Lax Matches::
Lax searching for text to replace.
* Query Replace:: How to use querying.
Commands for Fixing Typos
@ -534,6 +538,7 @@ Frames and Graphical Displays
* Multiple Displays:: How one Emacs instance can talk to several displays.
* Frame Parameters:: Changing the colors and other modes of frames.
* Scroll Bars:: How to enable and disable scroll bars; how to use them.
* Window Dividers:: Window separators that can be dragged with the mouse.
* Drag and Drop:: Using drag and drop to open files and insert text.
* Menu Bars:: Enabling and disabling the menu bar.
* Tool Bars:: Enabling and disabling the tool bar.
@ -589,6 +594,7 @@ Commands for Human Languages
* Sentences:: Moving over and killing sentences.
* Paragraphs:: Moving over paragraphs.
* Pages:: Moving over pages.
* Quotation Marks:: Inserting quotation marks.
* Filling:: Filling or justifying text.
* Case:: Changing the case of text.
* Text Mode:: The major modes for editing text files.
@ -1164,6 +1170,11 @@ Reporting Bugs
* Checklist:: Steps to follow for a good bug report.
* Sending Patches:: How to send a patch for GNU Emacs.
Contributing to Emacs Development
* Coding Standards:: Gnu Emacs coding standards.
* Copyright Assignment:: Assigning copyright to the FSF.
Command Line Arguments for Emacs Invocation
* Action Arguments:: Arguments to visit files, load libraries,

View file

@ -1295,11 +1295,12 @@ would make to the file if you save the buffer.
@findex compare-windows
The command @kbd{M-x compare-windows} compares the text in the
current window with that in the next window. (For more information
about windows in Emacs, @ref{Windows}.) Comparison starts at point in
each window, after pushing each initial point value on the mark ring
in its respective buffer. Then it moves point forward in each window,
one character at a time, until it reaches characters that don't match.
current window with that in the window that was the selected window
before you selected the current one. (For more information about
windows in Emacs, @ref{Windows}.) Comparison starts at point in each
window, after pushing each initial point value on the mark ring in its
respective buffer. Then it moves point forward in each window, one
character at a time, until it reaches characters that don't match.
Then the command exits.
If point in the two windows is followed by non-matching text when

View file

@ -1265,10 +1265,11 @@ Some text terminals support mouse clicks in the terminal window.
In a terminal emulator which is compatible with @command{xterm}, you
can use @kbd{M-x xterm-mouse-mode} to give Emacs control over simple
uses of the mouse---basically, only non-modified single clicks are
supported. The normal @command{xterm} mouse functionality for such
clicks is still available by holding down the @kbd{SHIFT} key when you
press the mouse button. Xterm Mouse mode is a global minor mode
(@pxref{Minor Modes}). Repeating the command turns the mode off
supported. Newer versions of @command{xterm} also support
mouse-tracking. The normal @command{xterm} mouse functionality for
such clicks is still available by holding down the @kbd{SHIFT} key
when you press the mouse button. Xterm Mouse mode is a global minor
mode (@pxref{Minor Modes}). Repeating the command turns the mode off
again.
@findex gpm-mouse-mode

View file

@ -175,11 +175,22 @@ corresponding Control character. @xref{User Input,C-M-}.
Case conversion means changing text from upper case to lower case or
vice versa. @xref{Case}.
@item Case Folding
Case folding means ignoring the differences between case variants of
the same letter: upper-case, lower-case, and title-case. Emacs
performs case folding by default in text search. @xref{Lax Search}.
@item Character
Characters form the contents of an Emacs buffer. Also, key sequences
(q.v.@:) are usually made up of characters (though they may include
other input events as well). @xref{User Input}.
@item Character Folding
Character folding means ignoring differences between similarly looking
characters, such as between @code{a}, and @code{@:a} and @code{@'a}.
Emacs performs character folding by default in text search. @xref{Lax
Search}.
@item Character Set
Emacs supports a number of character sets, each of which represents a
particular alphabet or script. @xref{International}.

View file

@ -126,6 +126,10 @@ Display documentation of the current major mode and minor modes
(@code{describe-mode}).
@item C-h n
Display news of recent Emacs changes (@code{view-emacs-news}).
@item C-h o @var{symbol}
Display documentation of the Lisp symbol named @var{symbol}
(@code{describe-symbol}). This will show the documentation of all
kinds of symbols: functions, variables, and faces.
@item C-h p
Find packages by topic keyword (@code{finder-by-keyword}). This lists
packages using a package menu buffer. @xref{Packages}.
@ -272,6 +276,14 @@ source files installed (@pxref{Hyperlinking}).
(@code{Info-goto-emacs-command-node}). This knows about various
manuals, not just the Emacs manual, and finds the right one.
@kindex C-h o
@findex describe-symbol
@kbd{C-h o} (@code{describe-symbol}) is like @kbd{C-h f} and
@kbd{C-h v}, but it describes any symbol, be it a function, a
variable, or a face. If the symbol has more than one definition, like
it has both definition as a function and as a variable, this command
will show the documentation of all of them, one after the other.
@node Apropos
@section Apropos
@cindex apropos
@ -524,8 +536,9 @@ command works depend on the major mode.
@findex view-lossage
If something surprising happens, and you are not sure what you typed,
use @kbd{C-h l} (@code{view-lossage}). @kbd{C-h l} displays your last
300 input keystrokes. If you see commands that you don't know, you can
use @kbd{C-h c} to find out what they do.
300 input keystrokes and the commands they invoked. If you see
commands that you are not familiar with, you can use @kbd{C-h k} or
@kbd{C-h f} to find out what they do.
@kindex C-h e
@findex view-echo-area-messages

View file

@ -504,9 +504,9 @@ does not alter the clipboard. However, if you change
@code{yank-pop-change-selection} to @code{t}, then @kbd{M-y} saves the
new yank to the clipboard.
@vindex x-select-enable-clipboard
@vindex select-enable-clipboard
To prevent kill and yank commands from accessing the clipboard,
change the variable @code{x-select-enable-clipboard} to @code{nil}.
change the variable @code{select-enable-clipboard} to @code{nil}.
@cindex clipboard manager
@vindex x-select-enable-clipboard-manager
@ -519,14 +519,14 @@ when exiting Emacs; if you wish to prevent Emacs from transferring
data to the clipboard manager, change the variable
@code{x-select-enable-clipboard-manager} to @code{nil}.
@vindex x-select-enable-primary
@vindex select-enable-primary
@findex clipboard-kill-region
@findex clipboard-kill-ring-save
@findex clipboard-yank
Prior to Emacs 24, the kill and yank commands used the primary
selection (@pxref{Primary Selection}), not the clipboard. If you
prefer this behavior, change @code{x-select-enable-clipboard} to
@code{nil}, @code{x-select-enable-primary} to @code{t}, and
prefer this behavior, change @code{select-enable-clipboard} to
@code{nil}, @code{select-enable-primary} to @code{t}, and
@code{mouse-drag-copy-region} to @code{t}. In this case, you can use
the following commands to act explicitly on the clipboard:
@code{clipboard-kill-region} kills the region and saves it to the
@ -853,6 +853,19 @@ so in a rectangular fashion, and killing and yanking operate on the
rectangle. @xref{Killing}. The mode persists only as long as the
region is active.
Unlike the standard region, the region-rectangle can have its corners
extended past the end of buffer, or inside stretches of white space
that point normally cannot enter, like the TAB.
@findex rectangle-exchange-point-and-mark
@findex exchange-point-and-mark@r{, in rectangle-mark-mode}
@kindex C-x C-x@r{, in rectangle-mark-mode}
When the region is in rectangle-mark-mode, @kbd{C-x C-x} runs the
command @code{rectangle-exchange-point-and-mark}, which cycles between
the four corners of the region-rectangle. This comes in handy if you
want to modify the dimensions of the region-rectangle before invoking
an operation on the marked text.
@node CUA Bindings
@section CUA Bindings
@findex cua-mode

View file

@ -43,6 +43,13 @@ Note that @code{forward-char} is the same command that you invoke with
the key @kbd{C-f}. The existence of a key binding does not stop you
from running the command by name.
@cindex obsolete command
When @kbd{M-x} completes on commands, it ignores the commands that
are declared @dfn{obsolete}; for these, you will have to type their
full name. Obsolete commands are those for which newer, better
alternatives exist, and which are slated for removal in some future
Emacs release.
To cancel the @kbd{M-x} and not run a command, type @kbd{C-g} instead
of entering the command name. This takes you back to command level.
@ -57,7 +64,16 @@ mentions this in the echo area after running the command. For
example, if you type @kbd{M-x forward-word}, the message says that you
can run the same command by typing @kbd{M-f}. You can turn off these
messages by setting the variable @code{suggest-key-bindings} to
@code{nil}.
@code{nil}. The value of @code{suggest-key-bindings} can also be a
number, in which case Emacs will show the binding for that many
seconds before removing it from display. The default behavior is to
display the binding for 2 seconds.
Commands that don't have key bindings, can still be invoked after
typing less than their full name at the @samp{M-x} prompt. Emacs
mentions such shorthands in the echo area if they are significantly
shorter than the full command name. The setting of
@code{suggest-key-bindings} affects these hints as well.
In this manual, when we speak of running a command by name, we often
omit the @key{RET} that terminates the name. Thus we might say

View file

@ -47,6 +47,17 @@ variable @code{vc-handled-backends} to @code{nil}
(@pxref{Customizing VC}).
@end ifnottex
@findex vc-refresh-state
@findex vc-state-refresh
To update the VC state information for the file visited in the
current buffer, use the command @code{vc-refresh-state}. This command
is useful when you perform version control commands outside Emacs
(e.g., from the shell prompt), or if you put the buffer's file under a
different version control system, or remove it from version control
entirely. A companion command @code{vc-state-refresh} does the same,
but does not consider switching the version control system or removal
from VC.
@menu
* Introduction to VC:: How version control works in general.
* VC Mode Line:: How the mode line shows version control status.
@ -821,15 +832,19 @@ corresponding to @var{revision}, saves it to
window.
@findex vc-annotate
@vindex vc-annotate-background-mode
@kindex C-x v g
Many version control systems allow you to view files @dfn{annotated}
with per-line revision information, by typing @kbd{C-x v g}
(@code{vc-annotate}). This creates a new ``annotate'' buffer
displaying the file's text, with each line colored to show
how old it is. Red text is new, blue is old, and intermediate colors
indicate intermediate ages. By default, the color is scaled over the
full range of ages, such that the oldest changes are blue, and the
newest changes are red.
displaying the file's text, with each line colored to show how old it
is. Red text is new, blue is old, and intermediate colors indicate
intermediate ages. By default, the color is scaled over the full
range of ages, such that the oldest changes are blue, and the newest
changes are red. If the variable @code{vc-annotate-background-mode}
is non-@code{nil}, the colors expressing the age of each line are
applied to the background color, leaving the foreground at its default
color.
When you give a prefix argument to this command, Emacs reads two
arguments using the minibuffer: the revision to display and annotate
@ -1009,6 +1024,22 @@ increase the number of revisions shown in an existing
entries} or @samp{Show unlimited entries} buttons at the end of the
buffer. However, RCS, SCCS, and CVS do not support this feature.
@findex vc-region-history
A useful variant of examining changes is provided by the command
@kbd{vc-region-history}, which shows a @file{*VC-history*} buffer with
the history of changes to the region of the current file between point
and the mark (@pxref{Mark}). The history of changes includes the
commit log messages and also the changes themselves in the Diff
format.
Invoke this command after marking the region of the current file in
whose changes you are interested. In the @file{*VC-history*} buffer
it pops up, you can use all of the commands available in the
@file{*vc-change-log*} buffer described above, and also the commands
defined by Diff mode (@pxref{Diff Mode}).
This command is currently available only with Git.
@node VC Undo
@subsection Undoing Version Control Actions
@ -1353,19 +1384,43 @@ commit will be committed to that specific branch.
@subsubsection Pulling/Pushing Changes into/from a Branch
@table @kbd
@item C-x v P
On a decentralized version control system, update another location
with changes from the current branch (a.k.a. ``push'' changes). This
concept does not exist for centralized version control systems
@item C-x v +
On a decentralized version control system, update the current branch
by ``pulling in'' changes from another location.
On a centralized version control system, update the current VC
fileset.
@item C-x v P
On a decentralized version control system, ``push'' changes from the
current branch to another location. This concept does not exist
for centralized version control systems.
@end table
@kindex C-x v P
@findex vc-push
On a decentralized version control system, the command @kbd{C-x v P}
(@code{vc-push}) updates another location with changes from the
current branch. With a prefix argument, it prompts for the exact
version control command to run, which lets you specify where to push
changes; the default is @command{bzr push} with Bazaar, @command{git
push} with Git, and @command{hg push} with Mercurial. The default
commands always push to a default location determined by the version
control system from your branch configuration.
Prior to pushing, you can use @kbd{C-x v O} (@code{vc-log-outgoing})
to view a log buffer of the changes to be sent. @xref{VC Change Log}.
@cindex bound branch (Bazaar VCS)
This command is currently supported only by Bazaar, Git, and Mercurial.
The concept of ``pushing'' does not exist for centralized version
control systems, where this operation is a part of committing a
changeset, so invoking this command on a centralized VCS signals an
error. This command also signals an error when attempted in a Bazaar
@dfn{bound branch}, where committing a changeset automatically pushes
the changes to the remote repository to which the local branch is
bound.
@kindex C-x v +
@findex vc-pull
On a decentralized version control system, the command @kbd{C-x v +}
@ -1377,12 +1432,12 @@ Otherwise, it pulls from a default location determined by the version
control system.
Amongst decentralized version control systems, @kbd{C-x v +} is
currently supported only by Bazaar, Git, and Mercurial. On Bazaar, it
calls @command{bzr pull} for ordinary branches (to pull from a master
branch into a mirroring branch), and @command{bzr update} for a bound
branch (to pull from a central repository). On Git, it calls
currently supported only by Bazaar, Git, and Mercurial. With Bazaar,
it calls @command{bzr pull} for ordinary branches (to pull from a
master branch into a mirroring branch), and @command{bzr update} for a
bound branch (to pull from a central repository). With Git, it calls
@command{git pull} to fetch changes from a remote repository and merge
it into the current branch. On Mercurial, it calls @command{hg pull
it into the current branch. With Mercurial, it calls @command{hg pull
-u} to fetch changesets from the default remote repository and update
the working directory.
@ -1393,21 +1448,6 @@ Log}.
On a centralized version control system like CVS, @kbd{C-x v +}
updates the current VC fileset from the repository.
@kindex C-x v P
@findex vc-push
On a decentralized version control system, the command @kbd{C-x v P}
(@code{vc-push}) sends changes from your current branch to another location.
With a prefix argument, the command prompts for the exact
version control command to use, which lets you specify where to push
changes. Otherwise, it pushes to a default location determined
by the version control system.
Prior to pushing, you can use @kbd{C-x v O} (@code{vc-log-outgoing})
to view a log buffer of the changes to be sent. @xref{VC Change Log}.
This command is currently supported only by Bazaar, Git, and Mercurial.
It signals an error for centralized version control systems.
@node Merging
@subsubsection Merging Branches
@cindex merging changes
@ -2285,7 +2325,7 @@ input. @xref{Query Replace}, for more information on query replace.
You can control the case-sensitivity of tags search commands by
customizing the value of the variable @code{tags-case-fold-search}. The
default is to use the same setting as the value of
@code{case-fold-search} (@pxref{Search Case}).
@code{case-fold-search} (@pxref{Lax Search}).
It is possible to get through all the files in the tags table with a
single invocation of @kbd{M-x tags-query-replace}. But often it is

View file

@ -588,13 +588,17 @@ argument into the minibuffer:
@table @kbd
@item M-p
@itemx @key{UP}
Move to the previous item in the minibuffer history, an earlier
argument (@code{previous-history-element}).
@item M-n
@itemx @key{DOWN}
Move to the next item in the minibuffer history
(@code{next-history-element}).
@item @key{UP}
@itemx @key{DOWN}
Like @kbd{M-p} and @kbd{M-n}, but move to the previous or next line of
a multi-line item before going to the previous history item
(@code{previous-line-or-history-element} and
@code{next-line-or-history-element}) .
@item M-r @var{regexp} @key{RET}
Move to an earlier item in the minibuffer history that
matches @var{regexp} (@code{previous-matching-history-element}).
@ -609,13 +613,13 @@ Move to a later item in the minibuffer history that matches
@kindex DOWN @r{(minibuffer history)}
@findex next-history-element
@findex previous-history-element
While in the minibuffer, @kbd{M-p} or @key{UP}
(@code{previous-history-element}) moves through the minibuffer history
list, one item at a time. Each @kbd{M-p} fetches an earlier item from
the history list into the minibuffer, replacing its existing contents.
Typing @kbd{M-n} or @key{DOWN} (@code{next-history-element}) moves
through the minibuffer history list in the opposite direction,
fetching later entries into the minibuffer.
While in the minibuffer, @kbd{M-p} (@code{previous-history-element})
moves through the minibuffer history list, one item at a time. Each
@kbd{M-p} fetches an earlier item from the history list into the
minibuffer, replacing its existing contents. Typing @kbd{M-n}
(@code{next-history-element}) moves through the minibuffer history
list in the opposite direction, fetching later entries into the
minibuffer.
If you type @kbd{M-n} in the minibuffer when there are no later
entries in the minibuffer history (e.g., if you haven't previously
@ -623,6 +627,14 @@ typed @kbd{M-p}), Emacs tries fetching from a list of default
arguments: values that you are likely to enter. You can think of this
as moving through the ``future history''.
@findex previous-line-or-history-element
@findex next-line-or-history-element
The arrow keys @kbd{@key{UP}} and @kbd{@key{DOWN}} work like
@kbd{M-p} and @kbd{M-n}, but if the current history item is longer
than a single line, they allow you to move to the previous or next
line of the current history item before going to the previous or next
history item.
If you edit the text inserted by the @kbd{M-p} or @kbd{M-n}
minibuffer history commands, this does not change its entry in the
history list. However, the edited argument does go at the end of the
@ -642,8 +654,8 @@ expressions. A numeric prefix argument @var{n} means to fetch the
@var{n}th matching entry. These commands are unusual, in that they
use the minibuffer to read the regular expression argument, even
though they are invoked from the minibuffer. An upper-case letter in
the regular expression makes the search case-sensitive (@pxref{Search
Case}).
the regular expression makes the search case-sensitive (@pxref{Lax
Search}).
You can also search through the history using an incremental search.
@xref{Isearch Minibuffer}.

View file

@ -6,7 +6,8 @@
@chapter Miscellaneous Commands
This chapter contains several brief topics that do not fit anywhere
else: reading Usenet news, viewing PDFs and other such documents, web
else: reading Usenet news, host and network security,
viewing PDFs and other such documents, web
browsing, running shell commands and shell subprocesses, using a
single shared Emacs for utilities that expect to run an editor as a
subprocess, printing, sorting text, editing binary files, saving an
@ -249,6 +250,25 @@ Search forward for articles containing a match for @var{regexp}.
Exit the summary buffer and return to the group buffer.
@end table
@node Host Security
@section Host Security
@cindex security
Emacs runs inside an operating system such as GNU/Linux, and relies on
the operating system to check security constraints such as accesses to
files. The default settings for Emacs are designed for typical use;
they may require some tailoring in environments where security is more
of a concern, or less of a concern, than usual. For example,
file-local variables can be risky, and you can set the variable
@code{enable-local-variables} to @code{:safe} or (even more
conservatively) to @code{nil}; conversely, if your files can all be
trusted and the default checking for these variables is irritating,
you can set @code{enable-local-variables} to @code{:all}. @xref{Safe
File Variables}.
@xref{Security Considerations,,, elisp, The Emacs Lisp Reference
Manual}, for more information about security considerations when using
Emacs as part of a larger application.
@node Network Security
@section Network Security
@ -741,6 +761,10 @@ advancing point, and any terminal input for the subshell comes from
text in the buffer. To give input to the subshell, go to the end of
the buffer and type the input, terminated by @key{RET}.
By default, when the subshell is invoked interactively, the
@file{*shell*} buffer is displayed in a new window. This behavior can
be customized via @code{display-buffer-alist} (@pxref{Window Choice}).
While the subshell is waiting or running a command, you can switch
windows or buffers and perform other editing in Emacs. Emacs inserts
the output from the subshell into the Shell buffer whenever it has

View file

@ -59,7 +59,12 @@ The package's version number (e.g., @samp{11.86}).
The package's status---normally one of @samp{available} (can be
downloaded from the package archive), @samp{installed},
@c @samp{unsigned} (installed, but not signed; @pxref{Package Signing}),
or @samp{built-in} (included in Emacs by default).
or @samp{built-in} (included in Emacs by default). The status
@samp{external} means the package is not built-in and not from the
directory specified by @code{package-user-dir} (@pxref{Package
Files}). External packages are treated much like built-in: they
cannot be deleted through the package menu, and are not considered for
upgrading.
The status can also be @samp{new}. This is equivalent to
@samp{available}, except that it means the package became newly
@ -106,7 +111,13 @@ line; typing @kbd{x} (see below) will delete the package.
@xref{Package Files}, for information about what package deletion
entails.
@item ~
Mark all obsolete packages for deletion
(@code{package-menu-mark-obsolete-for-deletion}). This marks for
deletion all the packages whose status is @samp{obsolete}.
@item u
@itemx @key{DEL}
Remove any installation or deletion mark previously added to the
current line by an @kbd{i} or @kbd{d} command.
@ -117,6 +128,7 @@ on the new available versions, and a deletion mark on the old
installed versions.
@item x
@vindex package-menu-async
Download and install all packages marked with @kbd{i}, and their
dependencies; also, delete all packages marked with @kbd{d}
(@code{package-menu-execute}). This also removes the marks.
@ -131,6 +143,14 @@ Filter the package list (@code{package-menu-filter}). This prompts
for a keyword (e.g., @samp{games}), then shows only the packages
that relate to that keyword. To restore the full package list,
type @kbd{q}.
@item H
Permanently hide packages that match a regexp
(@code{package-menu-hide-package}).
@item (
Toggle visibility of old versions of packages and also of versions
from lower-priority archives (@code{package-menu-toggle-hiding}).
@end table
@noindent
@ -205,6 +225,17 @@ offer different versions of the same package, you may find the option
pairs to this list, to ensure that the specified package is only ever
downloaded from the specified archive.
@vindex package-archive-priorities
@vindex package-menu-hide-low-priority
Another option that is useful when you have several package archives
enabled is @code{package-archive-priorities}. It specifies the
priority of each archive (higher numbers specify higher priority
archives). By default, archives have the priority of zero, unless
specified otherwise by this option's value. Packages from
lower-priority archives will not be shown in the menu, if the same
package is available from a higher-priority archive. (This is
controlled by the value of @code{package-menu-hide-low-priority}.)
Once a package is downloaded and installed, it is @dfn{loaded} into
the current Emacs session. Loading a package is not quite the same as
loading a Lisp library (@pxref{Lisp Libraries}); its effect varies

View file

@ -833,9 +833,36 @@ displayed. The default is 102400.
@findex show-paren-mode
Show Paren mode, a global minor mode, provides a more powerful kind
of automatic matching. Whenever point is before an opening delimiter
or after a closing delimiter, both that delimiter and its opposite
delimiter are highlighted. To toggle Show Paren mode, type @kbd{M-x
show-paren-mode}.
or after a closing delimiter, the delimiter, its matching delimiter,
and optionally the text between them are highlighted. To toggle Show
Paren mode, type @kbd{M-x show-paren-mode}. To customize it, type
@kbd{M-x customize-group @key{RET} paren-showing}. The customizable
options which control the operation of this mode include:
@itemize @bullet
@item
@code{show-paren-highlight-open-paren} controls whether to highlight
an open paren when point stands just before it, and hence its position
is marked by the cursor anyway. The default is non-@code{nil} (yes).
@item
@code{show-paren-style} controls whether just the two parens, or also
the space between them get highlighted. The valid options here are
@code{parenthesis} (show the matching paren), @code{expression}
(highlight the entire expression enclosed by the parens), and
@code{mixed} (highlight the matching paren if it is visible, the
expression otherwise).
@item
@code{show-paren-when-point-inside-paren}, when non-@code{nil}, causes
highlighting also when point is on the inside of a parenthesis.
@item
@code{show-paren-when-point-in-periphery}, when non-@code{nil}, causes
highlighting also when point is in whitespace at the beginning or end
of a line, and there is a paren at, respectively, the first or last,
or the last, non-whitespace position on the line.
@end itemize
@cindex Electric Pair mode
@cindex inserting matching parentheses
@ -917,6 +944,8 @@ will indent the comment to the appropriate position.
@item @kbd{M-;}
Insert or realign comment on current line; if the region is active,
comment or uncomment the region instead (@code{comment-dwim}).
@item @kbd{C-x C-;}
Comment or uncomment the current line (@code{comment-line}).
@item @kbd{C-u M-;}
Kill comment on current line (@code{comment-kill}).
@item @kbd{C-x ;}
@ -971,6 +1000,18 @@ are not moved. Even when an existing comment is properly aligned,
@kbd{M-;} is still useful for moving directly to the start of the
comment text.
@findex comment-line
@kindex C-x C-;
@kbd{C-x C-;} (@code{comment-line}) comments or uncomments complete
lines. When a region is active (@pxref{Mark}), @kbd{C-x C-;} either
comments or uncomments the lines in the region. If the region is not
active, this command comments or uncomments the line point is on.
With a positive prefix argument @var{n}, it operates on @var{n} lines
starting with the current one; with a negative @var{n}, it affects
@var{n} preceding lines. After invoking this command with a negative
argument, successive invocations with a positive argument will operate
on preceding lines as if the argument were negated.
@findex comment-kill
@kindex C-u M-;
@kbd{C-u M-;} (@code{comment-dwim} with a prefix argument) kills any
@ -1220,13 +1261,16 @@ variables that you want to use. @xref{Name Help}.
@cindex Eldoc mode
@findex eldoc-mode
@findex global-eldoc-mode
Eldoc is a buffer-local minor mode that helps with looking up Lisp
documentation. When it is enabled, the echo area displays some useful
information whenever there is a Lisp function or variable at point;
for a function, it shows the argument list, and for a variable it
shows the first line of the variable's documentation string. To
toggle Eldoc mode, type @kbd{M-x eldoc-mode}. Eldoc mode can be used
with the Emacs Lisp and Lisp Interaction major modes.
toggle Eldoc mode, type @kbd{M-x eldoc-mode}. There's also a Global
Eldoc mode, which is turned on by default, and affects buffers, such
as @samp{*scratch*}, whose major mode is Emacs Lisp or Lisp
Interaction (@w{@kbd{M-x global-eldoc-mode}} to turn it off globally).
@node Hideshow
@section Hideshow minor mode
@ -1484,14 +1528,21 @@ with the Foldout package (@pxref{Foldout}).
@findex prettify-symbols-mode
Prettify Symbols mode is a buffer-local minor mode that replaces
certain strings with more attractive versions for display
purposes. For example, in Emacs Lisp mode, it replaces the string
@samp{lambda} with the Greek lambda character @samp{λ}. You may wish
to use this
in non-programming modes as well. You can customize the mode by
adding more entries to @code{prettify-symbols-alist}. There is also a
global version, @code{global-prettify-symbols-mode}, which enables the
mode in all buffers that support it.
certain strings with more attractive versions for display purposes.
For example, in Emacs Lisp mode, it replaces the string @samp{lambda}
with the Greek lambda character @samp{λ}. You may wish to use this in
non-programming modes as well. You can customize the mode by adding
more entries to @code{prettify-symbols-alist}. More elaborate
customization is available via customizing
@code{prettify-symbols-compose-predicate} if its default value
@code{prettify-symbols-default-compose-p} is not appropriate. There
is also a global version, @code{global-prettify-symbols-mode}, which
enables the mode in all buffers that support it.
The symbol at point can be shown in its original form. This is
controlled by the variable @code{prettify-symbols-unprettify-at-point}:
if non-@code{nil}, the original form of symbol at point will be
restored for as long as point is at it.
@node C Modes

View file

@ -293,9 +293,11 @@ various files.
Set the bookmark for the visited file, at point.
@item C-x r m @var{bookmark} @key{RET}
@findex bookmark-set
Set the bookmark named @var{bookmark} at point (@code{bookmark-set}).
@item C-x r M @var{bookmark} @key{RET}
Like @kbd{C-x r m}, but don't overwrite an existing bookmark.
@item C-x r b @var{bookmark} @key{RET}
@findex bookmark-jump
Jump to the bookmark named @var{bookmark} (@code{bookmark-jump}).
@ -320,6 +322,12 @@ name. If you name each bookmark after the file it points to, then you
can conveniently revisit any of those files with @kbd{C-x r b}, and move
to the position of the bookmark at the same time.
@kindex C-x r M
@findex bookmark-set-no-overwrite
The command @kbd{C-x r M} (@code{bookmark-set-no-overwrite}) works
like @kbd{C-x r m}, but it signals an error if the specified bookmark
already exists, instead of overwriting it.
@kindex C-x r l
To display a list of all your bookmarks in a separate buffer, type
@kbd{C-x r l} (@code{list-bookmarks}). If you switch to that buffer,

View file

@ -282,9 +282,9 @@ current message and select another. @kbd{d}
messages already deleted, while @kbd{C-d} (@code{rmail-delete-backward})
moves to the previous nondeleted message. If there is no nondeleted
message to move to in the specified direction, the message that was just
deleted remains current. @kbd{d} with a prefix argument is equivalent
to @kbd{C-d}. Note that the Rmail summary versions of these commands
behave slightly differently (@pxref{Rmail Summary Edit}).
deleted remains current. A numeric prefix argument serves as a repeat
count, to allow deletion of several messages in a single command. A
negative argument reverses the meaning of @kbd{d} and @kbd{C-d}.
@c mention other hooks, e.g., show message hook?
@vindex rmail-delete-message-hook
@ -305,7 +305,8 @@ type @kbd{x} (@code{rmail-expunge}). Until you do this, you can still
effect of a @kbd{d} command in most cases. It undeletes the current
message if the current message is deleted. Otherwise it moves backward
to previous messages until a deleted message is found, and undeletes
that message.
that message. A numeric prefix argument serves as a repeat count, to
allow deletion of several messages in a single command.
You can usually undo a @kbd{d} with a @kbd{u} because the @kbd{u}
moves back to and undeletes the message that the @kbd{d} deleted. But
@ -974,13 +975,11 @@ different lines. It doesn't matter what Emacs command you use to move
point; whichever line point is on at the end of the command, that
message is selected in the Rmail buffer.
Almost all Rmail commands work in the summary buffer as well as in the
Rmail buffer. Thus, @kbd{d} in the summary buffer deletes the current
message, @kbd{u} undeletes, and @kbd{x} expunges. (However, in the
summary buffer, a numeric argument to @kbd{d}, @kbd{C-d} and @kbd{u}
serves as a repeat count. A negative argument reverses the meaning of
@kbd{d} and @kbd{C-d}. Also, if there are no more undeleted messages in
the relevant direction, the delete commands go to the first or last
Almost all Rmail commands work in the summary buffer as well as in
the Rmail buffer. Thus, @kbd{d} in the summary buffer deletes the
current message, @kbd{u} undeletes, and @kbd{x} expunges. (However,
in the summary buffer, if there are no more undeleted messages in the
relevant direction, the delete commands go to the first or last
message, rather than staying on the current message.) @kbd{o} and
@kbd{C-o} output the current message to a FILE; @kbd{r} starts a reply
to it; etc. You can scroll the current message while remaining in the
@ -1224,6 +1223,15 @@ tagline (except for buttons for other actions, if there are any). Type
the undecoded @acronym{MIME} data. With a prefix argument, this
command toggles the display of only an entity at point.
@vindex rmail-mime-prefer-html
If the message has an @acronym{HTML} @acronym{MIME} part, Rmail
displays it in preference to the plain-text part, if Emacs can render
@acronym{HTML}@footnote{
This capability requires that Emacs be built with @file{libxml2}
support or that you have the Lynx browser installed.}. To prevent
that, and have the plain-text part displayed instead, customize the
variable @code{rmail-mime-prefer-html} to a @code{nil} value.
To prevent Rmail from handling MIME decoded messages, change the
variable @code{rmail-enable-mime} to @code{nil}. When this is the
case, the @kbd{v} (@code{rmail-mime}) command instead creates a

File diff suppressed because it is too large Load diff

View file

@ -1065,7 +1065,7 @@ send it to the developers. Sending it to
recommended, because that list is coupled to a tracking system that
makes it easier to locate patches. If your patch is not complete and
you think it needs more discussion, you might want to send it to
@email{emacs-devel@@gnu@@gnu.org} instead. If you revise your patch,
@email{emacs-devel@@gnu.org} instead. If you revise your patch,
send it as a followup to the initial topic.
We prefer to get the patches as plain text, either inline (be careful

View file

@ -716,7 +716,9 @@ The special commands of these modes bind @code{buffer-read-only} to
@defvar buffer-read-only
This buffer-local variable specifies whether the buffer is read-only.
The buffer is read-only if this variable is non-@code{nil}.
The buffer is read-only if this variable is non-@code{nil}. However,
characters that have the @code{inhibit-read-only} text property can
still be modified. @xref{Special Properties, inhibit-read-only}.
@end defvar
@defvar inhibit-read-only

View file

@ -330,7 +330,7 @@ support them, then @code{message-box} uses the echo area, like
@code{message}.
@end defun
@defun display-message-or-buffer message &optional buffer-name not-this-window frame
@defun display-message-or-buffer message &optional buffer-name action frame
This function displays the message @var{message}, which may be either a
string or a buffer. If it is shorter than the maximum height of the
echo area, as defined by @code{max-mini-window-height}, it is displayed
@ -346,7 +346,7 @@ pop-up buffer is used, defaulting to @file{*Message*}. In the case
where @var{message} is a string and displayed in the echo area, it is
not specified whether the contents are inserted into the buffer anyway.
The optional arguments @var{not-this-window} and @var{frame} are as for
The optional arguments @var{action} and @var{frame} are as for
@code{display-buffer}, and only used if a buffer is displayed.
@end defun
@ -1889,12 +1889,13 @@ end of the result if it falls short of @var{width}. It is also used at
the beginning of the result if one multi-column character in
@var{string} extends across the column @var{start-column}.
@vindex truncate-string-ellipsis
If @var{ellipsis} is non-@code{nil}, it should be a string which will
replace the end of @var{string} (including any padding) if it extends
beyond @var{width}, unless the display width of @var{string} is equal
to or less than the display width of @var{ellipsis}. If
@var{ellipsis} is non-@code{nil} and not a string, it stands for
@code{"..."}.
the value of the variable @code{truncate-string-ellipsis}.
@example
(truncate-string-to-width "\tab\t" 12 4)
@ -3659,6 +3660,39 @@ tag (or @code{nil}, which stands for the default langsys), and each
@end table
@end defun
@cindex font information for layout
The following four functions return size information about fonts used
by various faces, allowing various layout considerations in Lisp
programs. These functions take face remapping into consideration,
returning information about the remapped face, if the face in question
was remapped. @xref{Face Remapping}.
@defun default-font-width
This function returns the average width in pixels of the font used by
the current buffer's default face.
@end defun
@defun default-font-height
This function returns the height in pixels of the font used by the
current buffer's default face.
@end defun
@defun window-font-width &optional window face
This function returns the average width in pixels for the font used by
@var{face} in @var{window}. The specified @var{window} must be a live
window. If @code{nil} or omitted, @var{window} defaults to the
selected window, and @var{face} defaults to the default face in
@var{window}.
@end defun
@defun window-font-height &optional window face
This function returns the height in pixels for the font used by
@var{face} in @var{window}. The specified @var{window} must be a live
window. If @code{nil} or omitted, @var{window} defaults to the
selected window, and @var{face} defaults to the default face in
@var{window}.
@end defun
@node Fringes
@section Fringes
@cindex fringes

View file

@ -467,6 +467,10 @@ Control Structures
* Generators:: Generic sequences and coroutines.
* Nonlocal Exits:: Jumping out of a sequence.
Conditionals
* Pattern matching case statement:: How to use @code{pcase}.
Nonlocal Exits
* Catch and Throw:: Nonlocal exits for the program's own purposes.
@ -535,6 +539,7 @@ Functions
* Function Cells:: Accessing or setting the function definition
of a symbol.
* Closures:: Functions that enclose a lexical environment.
* Advising Functions:: Adding to the definition of a function.
* Obsolete Functions:: Declaring functions obsolete.
* Inline Functions:: Defining functions that the compiler
will expand inline.
@ -552,6 +557,13 @@ Lambda Expressions
* Argument List:: Details and special features of argument lists.
* Function Documentation:: How to put documentation in a function.
Advising Emacs Lisp Functions
* Core Advising Primitives:: Primitives to manipulate advice.
* Advising Named Functions:: Advising named functions.
* Advice combinators:: Ways to compose advice.
* Porting old advice:: Adapting code using the old defadvice.
Macros
* Simple Macro:: A basic example.
@ -602,6 +614,7 @@ Loading
* Unloading:: How to unload a library that was loaded.
* Hooks for Loading:: Providing code to be run when
particular libraries are loaded.
* Dynamic Modules:: Modules provide additional Lisp primitives.
Byte Compilation
@ -1191,6 +1204,10 @@ Text Properties
* Not Intervals:: Why text properties do not use
Lisp-visible text intervals.
Parsing HTML and XML
* Document Object Model:: Access, manipulate and search the @acronym{DOM}.
Non-@acronym{ASCII} Characters
* Text Representations:: How Emacs represents text.
@ -1530,9 +1547,12 @@ GNU Emacs Internals
* Building Emacs:: How the dumped Emacs is made.
* Pure Storage:: Kludge to make preloaded Lisp functions shareable.
* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
* Stack-allocated Objects:: Temporary conses and strings on C stack.
* Memory Usage:: Info about total size of Lisp objects made so far.
* C Dialect:: What C variant Emacs is written in.
* Writing Emacs Primitives:: Writing C code for Emacs.
* Object Internals:: Data formats of buffers, windows, processes.
* C Integer Types:: How C integer types are used inside Emacs.
Object Internals

View file

@ -780,7 +780,8 @@ to specify this function, but it is more robust to use the
@deffn Command eval-buffer &optional buffer-or-name stream filename unibyte print
This is similar to @code{eval-region}, but the arguments provide
different optional features. @code{eval-buffer} operates on the
entire accessible portion of buffer @var{buffer-or-name}.
entire accessible portion of buffer @var{buffer-or-name}
(@pxref{Narrowing,,, emacs, The GNU Emacs Manual}).
@var{buffer-or-name} can be a buffer, a buffer name (a string), or
@code{nil} (or omitted), which means to use the current buffer.
@var{stream} is used as in @code{eval-region}, unless @var{stream} is
@ -833,9 +834,9 @@ The value of this variable is a list of the values returned by all the
expressions that were read, evaluated, and printed from buffers
(including the minibuffer) by the standard Emacs commands which do
this. (Note that this does @emph{not} include evaluation in
@file{*ielm*} buffers, nor evaluation using @kbd{C-j} in
@code{lisp-interaction-mode}.) The elements are ordered most recent
first.
@file{*ielm*} buffers, nor evaluation using @kbd{C-j}, @kbd{C-x C-e},
and similar evaluation commands in @code{lisp-interaction-mode}.) The
elements are ordered most recent first.
@example
@group

View file

@ -2030,11 +2030,6 @@ form.
@end example
@end defun
@defun directory-name-p filename
This function returns non-@code{nil} if @var{filename} ends with a
forward slash (@samp{/}) character.
@end defun
@node Directory Names
@subsection Directory Names
@cindex directory name
@ -2076,6 +2071,13 @@ string (if it does not already end in one).
@end example
@end defun
@defun directory-name-p filename
This function returns non-@code{nil} if @var{filename} ends with a
directory separator character. This is the forward slash @samp{/} on
Unix and GNU systems; MS-Windows and MS-DOS recognize both the forward
slash and the backslash @samp{\} as directory separators.
@end defun
@defun directory-file-name dirname
This function returns a string representing @var{dirname} in a form
that the operating system will interpret as the name of a file (a
@ -2632,12 +2634,20 @@ An error is signaled if @var{directory} is not the name of a directory
that can be read.
@end defun
@defun directory-files-recursively directory match &optional include-directories
Return all files under @var{directory} whose file names match
@var{match} recursively. The file names are returned depth first,
meaning that contents of sub-directories are returned before contents
of the directories. If @var{include-directories} is non-@code{nil},
also return directory names that have matching names.
@defun directory-files-recursively directory regexp &optional include-directories
Return all files under @var{directory} whose names match @var{regexp}.
This function searches the specified @var{directory} and its
sub-directories, recursively, for files whose basenames (i.e., without
the leading directories) match the specified @var{regexp}, and returns
a list of the absolute file names of the matching files
(@pxref{Relative File Names, absolute file names}). The file names
are returned in depth-first order, meaning that files in some
sub-directory are returned before the files in its parent directory.
In addition, matching files found in each subdirectory are sorted
alphabetically by their basenames. By default, directories whose
names match @var{regexp} are omitted from the list, but if the
optional argument @var{include-directories} is non-@code{nil}, they
are included.
@end defun
@defun directory-files-and-attributes directory &optional full-name match-regexp nosort id-format

View file

@ -557,7 +557,7 @@ The top left corner of the native frame specifies the @dfn{native
position} of the frame. (1)--(3) in the drawing above indicate that
position for the various builds:
@itemize @w
@itemize @w{}
@item (1) non-toolkit and terminal frames
@item (2) Lucid, Motif and Windows frames
@ -1001,18 +1001,40 @@ parameters of @var{frame} and their values. If @var{frame} is
@end defun
@defun modify-frame-parameters frame alist
This function alters the parameters of frame @var{frame} based on the
elements of @var{alist}. Each element of @var{alist} has the form
@code{(@var{parm} . @var{value})}, where @var{parm} is a symbol naming a
parameter. If you don't mention a parameter in @var{alist}, its value
doesn't change. If @var{frame} is @code{nil}, it defaults to the selected
frame.
This function alters the frame @var{frame} based on the elements of
@var{alist}. Each element of @var{alist} has the form
@code{(@var{parm} . @var{value})}, where @var{parm} is a symbol naming
a parameter. If you don't mention a parameter in @var{alist}, its
value doesn't change. If @var{frame} is @code{nil}, it defaults to
the selected frame.
Some parameters are only meaningful for frames on certain kinds of
display (@pxref{Frames}). If @var{alist} includes parameters that are
not meaningful for the @var{frame}'s display, this function will
change its value in the frame's parameter list, but will otherwise
ignore it.
When @var{alist} specifies more than one parameter whose value can
affect the new size of @var{frame}, the final size of the frame may
differ according to the toolkit used. For example, specifying that a
frame should from now on have a menu and/or tool bar instead of none and
simultaneously specifying the new height of the frame will inevitably
lead to a recalculation of the frame's height. Conceptually, in such
case, this function will try to have the explicit height specification
prevail. It cannot be excluded, however, that the addition (or removal)
of the menu or tool bar, when eventually performed by the toolkit, will
defeat this intention.
Sometimes, binding @code{frame-inhibit-implied-resize} (@pxref{Implied
Frame Resizing}) to a non-@code{nil} value around calls to this function
may fix the problem sketched here. Sometimes, however, exactly such
binding may be hit by the problem.
@end defun
@defun set-frame-parameter frame parm value
This function sets the frame parameter @var{parm} to the specified
@var{value}. If @var{frame} is @code{nil}, it defaults to the
selected frame.
@var{value}. If @var{frame} is @code{nil}, it defaults to the selected
frame.
@end defun
@defun modify-all-frames-parameters alist

View file

@ -861,15 +861,18 @@ into a list. @code{mapc} always returns @var{sequence}.
@defun mapconcat function sequence separator
@code{mapconcat} applies @var{function} to each element of
@var{sequence}: the results, which must be strings, are concatenated.
Between each pair of result strings, @code{mapconcat} inserts the string
@var{separator}. Usually @var{separator} contains a space or comma or
other suitable punctuation.
@var{sequence}; the results, which must be sequences of characters
(strings, vectors, or lists), are concatenated into a single string
return value. Between each pair of result sequences, @code{mapconcat}
inserts the characters from @var{separator}, which also must be a
string, or a vector or list of characters. @xref{Sequences Arrays
Vectors}.
The argument @var{function} must be a function that can take one
argument and return a string. The argument @var{sequence} can be any
kind of sequence except a char-table; that is, a list, a vector, a
bool-vector, or a string.
argument and returns a sequence of characters: a string, a vector, or
a list. The argument @var{sequence} can be any kind of sequence
except a char-table; that is, a list, a vector, a bool-vector, or a
string.
@example
@group

View file

@ -352,16 +352,16 @@ string in Emacs Lisp.
@defvar text-quoting-style
@cindex curved quotes
@cindex curly quotes
The value of this variable specifies the style used to generate text
quotes. If the variable's value is @code{curve}, the style is
The value of this variable is a symbol that specifies the style Emacs
should use for single quotes in the wording of help and messages.
If the variable's value is @code{curve}, the style is
@t{like this} with curved single quotes. If the value is
@code{straight}, the style is @t{'like this'} with straight
apostrophes. If the value is @code{grave}, the style is @t{`like
this'} with grave accent and apostrophe. The default value @code{nil}
this'} with grave accent and apostrophe, the standard style
before Emacs version 25. The default value @code{nil}
acts like @code{curve} if curved single quotes are displayable, and
like @code{grave} otherwise. To use the traditional @code{grave}
style, put the line @code{(setq text-quoting-style 'grave)} into your
@file{~/.emacs} file.
like @code{grave} otherwise.
@end defvar
@defun substitute-command-keys string

View file

@ -32,7 +32,9 @@ executable. You don't have to know this material to build and install
Emacs, since the makefiles do all these things automatically. This
information is pertinent to Emacs developers.
Compilation of the C source files in the @file{src} directory
Building Emacs requires GNU Make version 3.81 or later.
Compilation of the C source files in the @file{src} directory
produces an executable file called @file{temacs}, also called a
@dfn{bare impure Emacs}. It contains the Emacs Lisp interpreter and
I/O routines, but not the editing commands.

View file

@ -29,7 +29,15 @@ into a buffer and evaluated there. (Indeed, most code is tested this
way.) Most often, the forms are function definitions and variable
definitions.
For on-demand loading of external libraries, @pxref{Dynamic Libraries}.
Emacs can also load compiled dynamic modules: shared libraries that
provide additional functionality for use in Emacs Lisp programs, just
like a package written in Emacs Lisp would. When a dynamic module is
loaded, Emacs calls a specially-named initialization function which
the module needs to implement, and which exposes the additional
functions and variables to Emacs Lisp programs.
For on-demand loading of external libraries which are known in advance
to be required by certain Emacs primitives, @pxref{Dynamic Libraries}.
@menu
* How Programs Do Loading:: The @code{load} function and others.
@ -43,6 +51,7 @@ For on-demand loading of external libraries, @pxref{Dynamic Libraries}.
* Unloading:: How to unload a library that was loaded.
* Hooks for Loading:: Providing code to be run when
particular libraries are loaded.
* Dynamic Modules:: Modules provide additional Lisp primitives.
@end menu
@node How Programs Do Loading
@ -1076,3 +1085,53 @@ defined in another library (those meant for outside use), you can do
it immediately---there is no need to wait until the library is loaded.
If you need to call functions defined by that library, you should load
the library, preferably with @code{require} (@pxref{Named Features}).
@node Dynamic Modules
@section Emacs Dynamic Modules
@cindex dynamic modules
@c FIXME: This is intentionally incomplete, as the module integration
@c is not yet finished. To be refined later.
A @dfn{dynamic Emacs module} is a shared library that provides
additional functionality for use in Emacs Lisp programs, just like a
package written in Emacs Lisp would.
Functions that load Emacs Lisp packages can also load dynamic
modules. They recognize dynamic modules by looking at their file-name
extension, a.k.a.@: ``suffix''. This suffix is platform-dependent.
@defvar module-file-suffix
This variable holds the system-dependent value of the file-name
extension of the module files. Its value is @file{.so} on Posix hosts
and @file{.dll} on MS-Windows.
@end defvar
@findex emacs_module_init
@vindex plugin_is_GPL_compatible
Every dynamic module should export a C-callable function named
@code{emacs_module_init}, which Emacs will call as part of the call to
@code{load} or @code{require} which loads the module. It should also
export a symbol named @code{plugin_is_GPL_compatible} to indicate that
its code is released under the GPL or compatible license; Emacs will
refuse to load modules that don't export such a symbol.
If a module needs to call Emacs functions, it should do so through the
API defined and documented in the header file @file{emacs-module.h}
that is part of the Emacs distribution.
@cindex user-ptr object
Modules can create @code{user-ptr} Lisp objects that embed pointers to
C struct's defined by the module. This is useful for keeping around
complex data structures created by a module, to be passed back to the
module's functions. User-ptr objects can also have associated
@dfn{finalizers} -- functions to be run when the object is GC'ed; this
is useful for freeing any resources allocated for the underlying data
structure, such as memory, open file descriptors, etc.
@defun user-ptrp object
This function returns @code{t} if its argument is a @code{user-ptr}
object.
@end defun
Loadable modules in Emacs are enabled by using the
@kbd{--with-modules} option at configure time.

View file

@ -2509,6 +2509,53 @@ Search-based fontification happens second.
@node Font Lock Basics
@subsection Font Lock Basics
The Font Lock functionality is based on several basic functions.
Each of these calls the function specified by the corresponding
variable. This indirection allows major modes to modify the way
fontification works in the buffers of that mode, and even use the Font
Lock mechanisms for features that have nothing to do with
fontification. (This is why the description below says ``should''
when it describes what the functions do: the major mode can customize
the values of the corresponding variables to do something entirely
different.) The variables mentioned below are described in @ref{Other
Font Lock Variables}.
@ftable @code
@item font-lock-fontify-buffer
This function should fontify the current buffer's accessible portion,
by calling the function specified by
@code{font-lock-fontify-buffer-function}.
@item font-lock-unfontify-buffer
Used when turning Font Lock off to remove the fontification. Calls
the function specified by @code{font-lock-unfontify-buffer-function}.
@item font-lock-fontify-region beg end &optional loudly
Should fontify the region between @var{beg} and @var{end}. If
@var{loudly} is non-@code{nil}, should display status messages while
fontifying. Calls the function specified by
@code{font-lock-fontify-region-function}.
@item font-lock-unfontify-region beg end
Should remove fontification from the region between @var{beg} and
@var{end}. Calls the function specified by
@code{font-lock-unfontify-region-function}.
@item font-lock-flush &optional beg end
This function should mark the fontification of the region between
@var{beg} and @var{end} as outdated. If not specified or @code{nil},
@var{beg} and @var{end} default to the beginning and end of the
buffer's accessible portion. Calls the function specified by
@code{font-lock-flush-function}.
@item font-lock-ensure &optional beg end
This function should make sure the region between @var{beg} and
@var{end} has been fontified. The optional arguments @var{beg} and
@var{end} default to the beginning and the end of the buffer's
accessible portion. Calls the function specified by
@code{font-lock-ensure-function}.
@end ftable
There are several variables that control how Font Lock mode highlights
text. But major modes should not set any of these variables directly.
Instead, they should set @code{font-lock-defaults} as a buffer-local
@ -2936,6 +2983,22 @@ arguments, the beginning and end of the region. The default value is
@code{font-lock-default-unfontify-region}.
@end defvar
@defvar font-lock-flush-function
Function to use for declaring that a region's fontification is out of
date. It takes two arguments, the beginning and end of the region.
The default value of this variable is
@code{font-lock-after-change-function}.
@end defvar
@defvar font-lock-ensure-function
Function to use for making sure a region of the current buffer has
been fontified. It is called with two arguments, the beginning and
end of the region. The default value of this variable is a function
that calls @code{font-lock-default-fontify-buffer} if the buffer is
not fontified; the effect is to make sure the entire accessible
portion of the buffer is fontified.
@end defvar
@defun jit-lock-register function &optional contextual
This function tells Font Lock mode to run the Lisp function
@var{function} any time it has to fontify or refontify part of the

View file

@ -902,6 +902,9 @@ Hewlett-Packard HPUX operating system.
@item irix
Silicon Graphics Irix system.
@item nacl
Google Native Client (@acronym{NaCl}) sandboxing system.
@item ms-dos
Microsoft's DOS@. Emacs compiled with DJGPP for MS-DOS binds
@code{system-type} to @code{ms-dos} even when you run it on MS-Windows.
@ -911,7 +914,7 @@ AT&T Unix System V.
@item windows-nt
Microsoft Windows NT, 9X and later. The value of @code{system-type}
is always @code{windows-nt}, e.g., even on Windows 7.
is always @code{windows-nt}, e.g., even on Windows 10.
@end table
@ -2922,6 +2925,18 @@ means complete; it is intended to give you an idea of the security
issues involved, rather than to be a security checklist.
@table @asis
@item File local variables
@cindex file local variables
A file that Emacs visits can contain variable settings that affects
the buffer visiting that file; @xref{File Local Variables}.
Similarly, a directory can specify local variable values common to all
files in that directory; @xref{Directory Local Variables}. Although
Emacs takes some effort to protect against misuse of these variables,
a security hole can be created merely by a package setting
@code{safe-local-variable} too optimistically, a problem that is all
too common. To disable this feature for both files and directories,
set @code{enable-local-variables} to @code{nil}.
@item Access control
Although Emacs normally respects access permissions of the underlying
operating system, in some cases it handles accesses specially. For

View file

@ -572,6 +572,18 @@ The value returned is the window line number point has moved to, with
the top line in the window numbered 0.
@end deffn
@vindex move-to-window-group-line-function
@defun move-to-window-group-line count
This function is like @code{move-to-window-line}, except that when the
selected window is a part of a group of windows (@pxref{Window
Group}), @code{move-to-window-group-line} will move to a position with
respect to the entire group, not just the single window. This
condition holds when the buffer local variable
@code{move-to-window-group-line-function} is set to a function. In
this case, @code{move-to-window-group-line} calls the function with
the argument @var{count}, then returns its result.
@end defun
@defun compute-motion from frompos to topos width offsets window
This function scans the current buffer, calculating screen positions.
It scans the buffer forward from position @var{from}, assuming that is

View file

@ -737,10 +737,12 @@ If @var{stopped} is non-@code{nil}, start the process in the
stopped state.
@item :filter @var{filter}
Initialize the process filter to @var{filter}.
Initialize the process filter to @var{filter}. If not specified, a
default filter will be provided. @xref{Filter Functions}.
@item :sentinel @var{sentinel}
Initialize the process sentinel to @var{sentinel}.
Initialize the process sentinel to @var{sentinel}. If not specified,
a default sentinel will be used. @xref{Sentinels}.
@item :stderr @var{stderr}
Associate @var{stderr} with the standard error of the process.
@ -789,10 +791,12 @@ If @var{stopped} is non-@code{nil}, start the process in the
stopped state.
@item :filter @var{filter}
Initialize the process filter to @var{filter}.
Initialize the process filter to @var{filter}. If not specified, a
default filter will be provided. @xref{Filter Functions}.
@item :sentinel @var{sentinel}
Initialize the process sentinel to @var{sentinel}.
Initialize the process sentinel to @var{sentinel}. If not specified,
a default sentinel will be used. @xref{Sentinels}.
@end table
The original argument list, modified with the actual connection
@ -922,9 +926,10 @@ For a network process, the values include (see
@item :buffer
The associated value is the process buffer.
@item :filter
The associated value is the process filter function.
The associated value is the process filter function. @xref{Filter
Functions}.
@item :sentinel
The associated value is the process sentinel function.
The associated value is the process sentinel function. @xref{Sentinels}.
@item :remote
In a connection, the address in internal format of the remote peer.
@item :local
@ -1379,6 +1384,7 @@ subprocess with a @code{SIGHUP} signal (@pxref{Signals to Processes}).
@cindex filter function
@cindex process filter
@cindex default filter function of a process
A process @dfn{filter function} is a function that receives the
standard output from the associated process. @emph{All} output from
that process is passed to the filter. The default filter simply
@ -1632,21 +1638,43 @@ also called if the process exits. The sentinel receives two
arguments: the process for which the event occurred, and a string
describing the type of event.
@cindex default sentinel function of a process
If no sentinel function was specified for a process, it will use the
default sentinel function, which inserts a message in the process's
buffer with the process name and the string describing the event.
The string describing the event looks like one of the following:
@c FIXME? Also "killed\n" - see example below?
@itemize @bullet
@item
@code{"finished\n"}.
@item
@code{"exited abnormally with code @var{exitcode}\n"}.
@code{"deleted\n"}.
@item
@code{"@var{name-of-signal}\n"}.
@code{"exited abnormally with code @var{exitcode} (core dumped)\n"}.
The ``core dumped'' part is optional, and only appears if the process
dumped core.
@item
@code{"@var{name-of-signal} (core dumped)\n"}.
@code{"failed with code @var{fail-code}\n"}.
@item
@code{"@var{signal-description} (core dumped)\n"}. The
@var{signal-description} is a system-dependent textual description of
a signal, e.g., @code{"killed"} for @code{SIGKILL}. The ``core
dumped'' part is optional, and only appears if the process dumped
core.
@item
@code{"open from @var{host-name}\n"}.
@item
@code{"open\n"}.
@item
@code{"connection broken by remote peer\n"}.
@end itemize
A sentinel runs only while Emacs is waiting (e.g., for terminal

View file

@ -465,6 +465,7 @@ Representations}.
@code{string-equal} is another name for @code{string=}.
@end defun
@cindex locale-dependent string equivalence
@defun string-collate-equalp string1 string2 &optional locale ignore-case
This function returns @code{t} if @var{string1} and @var{string2} are
equal with respect to collation rules. A collation rule is not only
@ -493,6 +494,7 @@ systems.
If @var{ignore-case} is non-@code{nil}, characters are converted to lower-case
before comparing them.
@vindex w32-collate-ignore-punctuation
To emulate Unicode-compliant collation on MS-Windows systems,
bind @code{w32-collate-ignore-punctuation} to a non-@code{nil} value, since
the codeset part of the locale cannot be @code{"UTF-8"} on MS-Windows.
@ -518,7 +520,7 @@ optional argument @var{ignore-case} is non-@code{nil}, the comparison
ignores case differences.
@end defun
@cindex lexical comparison
@cindex lexical comparison of strings
@defun string< string1 string2
@c (findex string< causes problems for permuted index!!)
This function compares two strings a character at a time. It
@ -576,6 +578,7 @@ are used.
@code{string-lessp} is another name for @code{string<}.
@end defun
@cindex locale-dependent string comparison
@defun string-collate-lessp string1 string2 &optional locale ignore-case
This function returns @code{t} if @var{string1} is less than
@var{string2} in collation order. A collation order is not only
@ -594,15 +597,15 @@ for sorting (@pxref{Sequence Functions}):
@end group
@end example
This behavior is system-dependent; punctuation and whitespace are
never ignored on Cygwin, regardless of locale.
This behavior is system-dependent; e.g., punctuation and whitespace
are never ignored on Cygwin, regardless of locale.
The optional argument @var{locale}, a string, overrides the setting of
your current locale identifier for collation. The value is system
dependent; a @var{locale} @code{"en_US.UTF-8"} is applicable on POSIX
systems, while it would be, e.g., @code{"enu_USA.1252"} on MS-Windows
systems. The @var{locale} @code{"POSIX"} lets @code{string-collate-lessp}
behave like @code{string-lessp}:
systems. The @var{locale} value of @code{"POSIX"} or @code{"C"} lets
@code{string-collate-lessp} behave like @code{string-lessp}:
@example
@group

View file

@ -945,6 +945,14 @@ whitespace by the functions in this section and by @code{forward-sexp},
The behavior of @code{parse-partial-sexp} is also affected by
@code{parse-sexp-lookup-properties} (@pxref{Syntax Properties}).
@defvar comment-end-can-be-escaped
If this buffer local variable is non-@code{nil}, a single character
which usually terminates a comment doesn't do so when that character
is escaped. This is used in C and C++ Modes, where line comments
starting with @samp{//} can be continued onto the next line by
escaping the newline with @samp{\}.
@end defvar
You can use @code{forward-comment} to move forward or backward over
one comment or several comments.

View file

@ -899,13 +899,25 @@ adds it to the most recent element. It determines automatically (using
@code{last-command}) whether the previous command was a kill command,
and if so appends the killed text to the most recent entry.
@deffn Command kill-region start end
This function kills the text in the region defined by @var{start} and
@var{end}. The text is deleted but saved in the kill ring, along with
its text properties. The value is always @code{nil}.
@cindex filtering killed text
The commands described below can filter the killed text before they
save it in the kill ring. They call @code{filter-buffer-substring}
(@pxref{Buffer Contents}) to perform the filtering. By default,
there's no filtering, but major and minor modes and hook functions can
set up filtering, so that text saved in the kill ring is different
from what was in the buffer.
@deffn Command kill-region start end &optional region
This function kills the stretch of text between @var{start} and
@var{end}; but if the optional argument @var{region} is
non-@code{nil}, it ignores @var{start} and @var{end}, and kills the
text in the current region instead. The text is deleted but saved in
the kill ring, along with its text properties. The value is always
@code{nil}.
In an interactive call, @var{start} and @var{end} are point and
the mark.
the mark, and @var{region} is always non-@code{nil}, so the command
always kills the text in the current region.
If the buffer or text is read-only, @code{kill-region} modifies the kill
ring just the same, then signals an error without modifying the buffer.
@ -919,18 +931,20 @@ error if the buffer or text is read-only. Instead, it simply returns,
updating the kill ring but not changing the buffer.
@end defopt
@deffn Command copy-region-as-kill start end
This command saves the region defined by @var{start} and @var{end} on
the kill ring (including text properties), but does not delete the text
from the buffer. It returns @code{nil}.
@deffn Command copy-region-as-kill start end &optional region
This function saves the stretch of text between @var{start} and
@var{end} on the kill ring (including text properties), but does not
delete the text from the buffer. However, if the optional argument
@var{region} is non-@code{nil}, the function ignores @var{start} and
@var{end}, and saves the current region instead. It always returns
@code{nil}.
In an interactive call, @var{start} and @var{end} are point and
the mark, and @var{region} is always non-@code{nil}, so the command
always saves the text in the current region.
The command does not set @code{this-command} to @code{kill-region}, so a
subsequent kill command does not append to the same kill ring entry.
@c FIXME Why is it better? Why isn't copy-region-as-kill obsolete then?
@c Why is it used in many places in Emacs?
In Lisp programs, it is better to use @code{kill-new} or
@code{kill-append} instead of this command. @xref{Low-Level Kill Ring}.
@end deffn
@node Yanking
@ -1343,27 +1357,39 @@ This function places a boundary element in the undo list. The undo
command stops at such a boundary, and successive undo commands undo
to earlier and earlier boundaries. This function returns @code{nil}.
The editor command loop automatically calls @code{undo-boundary} just
before executing each key sequence, so that each undo normally undoes
the effects of one command. As an exception, the command
@code{self-insert-command}, which produces self-inserting input
characters (@pxref{Commands for Insertion}), may remove the boundary
inserted by the command loop: a boundary is accepted for the first
such character, the next 19 consecutive self-inserting input
characters do not have boundaries, and then the 20th does; and so on
as long as the self-inserting characters continue. Hence, sequences
of consecutive character insertions can be undone as a group.
All buffer modifications add a boundary whenever the previous undoable
change was made in some other buffer. This is to ensure that
each command makes a boundary in each buffer where it makes changes.
Calling this function explicitly is useful for splitting the effects of
a command into more than one unit. For example, @code{query-replace}
calls @code{undo-boundary} after each replacement, so that the user can
undo individual replacements one by one.
Mostly, however, this function is called automatically at an
appropriate time.
@end defun
@defun undo-auto-amalgamate
@cindex amalgamating commands, and undo
The editor command loop automatically calls @code{undo-boundary} just
before executing each key sequence, so that each undo normally undoes
the effects of one command. A few exceptional commands are
@dfn{amalgamating}: these commands generally cause small changes to
buffers, so with these a boundary is inserted only every 20th command,
allowing to undo them as a group. By default, commands
@code{self-insert-command}, which produces self-inserting input
characters (@pxref{Commands for Insertion}), and @code{delete-char}
which deletes characters (@pxref{Deletion}) are amalgamating.
Where a command affects the contents of several buffers, as may happen,
for example, when a function on the @code{post-command-hook} affects a
buffer other than the @code{current-buffer}, then @code{undo-boundary}
will be called in each of the affected buffers.
@end defun
@defvar undo-auto-current-boundary-timer
Some buffers, such as process buffers, can change even when no
commands are executing. In these cases, @code{undo-boundary} is
normally called periodically by the timer in this variable. Setting
this variable to non-@code{nil} prevents this behavior.
@end defvar
@defvar undo-in-progress
This variable is normally @code{nil}, but the undo commands bind it to
@code{t}. This is so that various kinds of change hooks can tell when
@ -2336,6 +2362,84 @@ already indented, it calls @code{completion-at-point} to complete the
text at point (@pxref{Completion in Buffers}).
@end defopt
@cindex literate programming
@cindex multi-mode indentation
Some major modes need to support embedded regions of text whose
syntax belongs to a different major mode. Examples include
@dfn{literate programming} source files that combine documentation and
snippets of source code, Yacc/Bison programs that include snippets of
plain C code, etc. To correctly indent the embedded chunks, the major
mode needs to delegate the indentation to another mode's indentation
engine (e.g., call @code{c-indent-defun} for C code or
@code{python-indent-line} for Python), while providing it with some
context to guide the indentation. The following facilities support
such multi-mode indentation.
@defvar prog-indentation-context
This variable, when non-@code{nil}, holds the indentation context for
the sub-mode's indentation engine provided by the superior major mode.
The value should be a list of the form @code{(@var{first-column}
@w{(@var{start} . @var{end})} @code{prev-chunk})}. The members of the
list have the following meaning:
@table @var
@item first-column
The column to be used for top-level constructs. This replaces the
default value of the top-level column used by the sub-mode, usually
zero.
@item start
@itemx end
The region of the code chunk to be indented by the sub-mode. The
value of @var{end} can be @code{nil}, which stands for the value of
@code{point-max}.
@item prev-chunk
If this is non-@code{nil}, it should provide the sub-mode's
indentation engine with a virtual context of the code chunk. Valid
values include:
@itemize @minus
@item
A string whose contents is the text the sub-mode's indentation engine
should consider to precede the code chunk. The sub-mode's indentation
engine can add text properties to that string, to be reused in
repeated calls with the same string, thus using it as a cache. An
example where this is useful is code chunks that need to be indented
as function bodies, but lack the function's preamble---the string
could then include that missing preamble.
@item
A function. It is expected to be called with the start position of
the current chunk, and should return a cons cell
@w{@code{(@var{prev-start} . @var{prev-end})}} that specifies the
region of the previous code chunk, or @code{nil} if there is no previous
chunk. This is useful in literate-programming sources, where code is
split into chunks, and correct indentation needs to access previous
chunks.
@end itemize
@end table
@end defvar
The following convenience functions should be used by major mode's
indentation engine in support of invocations as sub-modes of another
major mode.
@defun prog-first-column
Call this function instead of using a literal value (usually, zero) of
the column number for indenting top-level program constructs. The
function's value is the column number to use for top-level constructs.
When no superior mode is in effect, this function returns zero.
@end defun
@defun prog-widen
Call this function instead of @code{widen} to remove any restrictions
imposed by the mode's indentation engine and restore the restrictions
recorded in @code{prog-indentation-context}. This prevents the
indentation engine of a sub-mode from inadvertently operating on text
outside of the chunk it was supposed to indent, and preserves the
restriction imposed by the superior mode. When no superior mode is in
effect, this function just calls @code{widen}.
@end defun
@node Region Indent
@subsection Indenting an Entire Region
@ -3256,8 +3360,8 @@ and then remove the property. @xref{Read Only Buffers}.
@item inhibit-read-only
@kindex inhibit-read-only @r{(text property)}
If a character has the property @code{inhibit-read-only}, and the
buffer is read-only, editing the character in question is allowed.
Characters that have the property @code{inhibit-read-only} can be
edited even in read-only buffers. @xref{Read Only Buffers}.
@item invisible
@kindex invisible @r{(text property)}

View file

@ -14,11 +14,17 @@ it gives advice on making effective use of the features described in the
previous chapters, and describes conventions Emacs Lisp programmers
should follow.
@findex checkdoc
@findex checkdoc-current-buffer
@findex checkdoc-file
You can automatically check some of the conventions described below by
running the command @kbd{M-x checkdoc RET} when visiting a Lisp file.
It cannot check all of the conventions, and not all the warnings it
gives necessarily correspond to problems, but it is worth examining them
all.
all. Alternatively, use the command @kbd{M-x checkdoc-current-buffer RET}
to check the conventions in the current buffer, or @code{checkdoc-file}
when you want to check a file in batch mode, e.g., with a command run by
@kbd{@w{M-x compile RET}}.
@menu
* Coding Conventions:: Conventions for clean and robust programs.
@ -1007,8 +1013,14 @@ of multiple files, we recommend not writing the version in every file,
but only the main one.
@item Keywords
@vindex checkdoc-package-keywords-flag
@findex checkdoc-package-keywords
This line lists keywords for the @code{finder-by-keyword} help command.
Please use that command to see a list of the meaningful keywords.
Please use that command to see a list of the meaningful keywords. The
command @kbd{M-x checkdoc-package-keywords RET} will find and display
any keywords that are not in @code{finder-known-keywords}. If you set
the variable @code{checkdoc-package-keywords-flag} non-@code{nil},
checkdoc commands will include the keyword verification in its checks.
This field is how people will find your package when they're looking
for things by topic. To separate the keywords, you can use spaces,

View file

@ -133,6 +133,30 @@ This function returns the selected window (which is always a live
window).
@end defun
@anchor{Window Group}Sometimes several windows collectively and
cooperatively display a buffer, for example, under the management of
Follow Mode (@pxref{Follow Mode,,, emacs}), where the windows together
display a bigger portion of the buffer than one window could alone.
It is often useful to consider such a @dfn{window group} as a single
entity. Several functions such as @code{window-group-start}
(@pxref{Window Start and End}) allow you to do this by supplying, as
an argument, one of the windows as a stand in for the whole group.
@defun selected-window-group
@vindex selected-window-group-function
When the selected window is a member of a group of windows, this
function returns a list of the windows in the group, ordered such that
the first window in the list is displaying the earliest part of the
buffer, and so on. Otherwise the function returns a list containing
just the selected window.
The selected window is considered part of a group when the buffer
local variable @code{selected-window-group-function} is set to a
function. In this case, @code{selected-window-group} calls it with no
arguments and returns its result (which should be the list of windows
in the group).
@end defun
@node Windows and Frames
@section Windows and Frames
@ -521,9 +545,9 @@ its pixel height is the pixel height of the screen areas spanned by its
children.
@end defun
@cindex window pixel height
@cindex pixel height of a window
@cindex total pixel height of a window
@cindex window pixel width
@cindex pixel width of a window
@cindex total pixel width of a window
@defun window-pixel-width &optional Lisp_Object &optional window
This function returns the width of window @var{window} in pixels.
@ -558,7 +582,6 @@ that of the root window on that frame. If @var{window} is omitted or
@cindex window body height
@cindex body height of a window
@cindex window body width
The @dfn{body height} of a window is the height of its text area, which
does not include a mode or header line, a horizontal scroll bar, or a
bottom divider.
@ -578,9 +601,8 @@ counted. It also means that the height of a window's body can never
exceed its total height as returned by @code{window-total-height}.
@end defun
@cindex window body width
@cindex body width of a window
@cindex body size of a window
@cindex window body size
The @dfn{body width} of a window is the width of its text area, which
does not include the scroll bar, fringes, margins or a right divider.
@ -599,6 +621,8 @@ counted. It also means that the width of a window's body can never
exceed its total width as returned by @code{window-total-width}.
@end defun
@cindex window body size
@cindex body size of a window
@defun window-body-size &optional window horizontal pixelwise
This function returns the body height or body width of @var{window}. If
@var{horizontal} is omitted or @code{nil}, it is equivalent to calling
@ -607,7 +631,7 @@ to calling @code{window-body-width}. In either case, the optional
argument @var{pixelwise} is passed to the function called.
@end defun
For compatibility with previous versions of Emacs,
For compatibility with previous versions of Emacs,
@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.
@ -635,6 +659,22 @@ Functions for retrieving the height and/or width of window dividers
(@pxref{Scroll Bars}), and display margins (@pxref{Display Margins}) are
described in the corresponding sections.
If your Lisp program needs to make layout decisions, you will find the
following function useful:
@defun window-max-chars-per-line &optional window face
This function returns the number of characters displayed in the
specified @var{face} in the specified @var{window} (which must be a
live window). If @var{face} was remapped (@pxref{Face Remapping}),
the information is returned for the remapped face. If omitted or
@code{nil}, @var{face} defaults to the default face, and @var{window}
defaults to the selected window. Unlike @code{window-body-width},
this function accounts for the actual size of the @var{face}'s font,
instead of working in units of frame's canonical character width. It
also accounts for space used by the continuation glyph, if
@var{window} lacks one or both of its fringes.
@end defun
@cindex fixed-size window
@vindex window-min-height
@vindex window-min-width
@ -643,7 +683,7 @@ or split them (@pxref{Splitting Windows}), obey the variables
@code{window-min-height} and @code{window-min-width}, which specify the
smallest allowable window height and width. They also obey the variable
@code{window-size-fixed}, with which a window can be @dfn{fixed} in
size:
size (@pxref{Preserving Window Sizes}).
@defopt window-min-height
This option specifies the minimum total height, in lines, of any window.
@ -3082,6 +3122,17 @@ window-start position; if you move point, do not expect the window-start
position to change in response until after the next redisplay.
@end defun
@defun window-group-start &optional window
@vindex window-group-start-function
This function is like @code{window-start}, except that when
@var{window} is a part of a group of windows (@pxref{Window Group}),
@code{window-group-start} returns the start position of the entire
group. This condition holds when the buffer local variable
@code{window-group-start-function} is set to a function. In this
case, @code{window-group-start} calls the function with the single
argument @var{window}, then returns its result.
@end defun
@cindex window end position
@defun window-end &optional window update
This function returns the position where display of its buffer ends in
@ -3108,6 +3159,18 @@ way real redisplay would do. It does not alter the
text will end if scrolling is not required.
@end defun
@vindex window-group-end-function
@defun window-group-end window update
This function is like @code{window-end}, except that when @var{window}
is a part of a group of windows (@pxref{Window Group}),
@code{window-group-end} returns the end position of the entire group.
This condition holds when the buffer local variable
@code{window-group-end-function} is set to a function. In this case,
@code{window-group-end} calls the function with the two arguments
@var{window} and @var{update}, then returns its result. The argument
@var{update} has the same meaning as in @code{window-end}.
@end defun
@defun set-window-start window position &optional noforce
This function sets the display-start position of @var{window} to
@var{position} in @var{window}'s buffer. It returns @var{position}.
@ -3171,6 +3234,19 @@ off screen at the next redisplay, then redisplay computes a new window-start
position that works well with point, and thus @var{position} is not used.
@end defun
@vindex set-window-group-start-function
@defun set-window-group-start window position &optional noforce
This function is like @code{set-window-start}, except that when
@var{window} is a part of a group of windows (@pxref{Window Group}),
@code{set-window-group-start} sets the start position of the entire
group. This condition holds when the buffer local variable
@code{set-window-group-start-function} is set to a function. In this
case, @code{set-window-group-start} calls the function with the three
arguments @var{window}, @var{position}, and @var{noforce}, then
returns its result. The arguments @var{position} and @var{noforce} in
this function have the same meaning as in @code{set-window-start}.
@end defun
@defun pos-visible-in-window-p &optional position window partially
This function returns non-@code{nil} if @var{position} is within the
range of text currently visible on the screen in @var{window}. It
@ -3212,6 +3288,21 @@ Here is an example:
@end example
@end defun
@vindex pos-visible-in-window-group-p-function
@defun pos-visible-in-window-group-p &optional position window partially
This function is like @code{pos-visible-in-window-p}, except that when
@var{window} is a part of a group of windows (@pxref{Window Group}),
@code{pos-visible-in-window-group-p} tests the visibility of @var{pos}
in the entire group, not just in the single @var{window}. This
condition holds when the buffer local variable
@code{pos-visible-in-window-group-p-function} is set to a function.
In this case @code{pos-visible-in-window-group-p} calls the function
with the three arguments @var{position}, @var{window}, and
@var{partially}, then returns its result. The arguments
@var{position} and @var{partially} have the same meaning as in
@code{pos-visible-in-window-p}.
@end defun
@defun window-line-height &optional line window
This function returns the height of text line @var{line} in
@var{window}. If @var{line} is one of @code{header-line} or
@ -3455,6 +3546,19 @@ the top of the window. The command @code{recenter-top-bottom} offers
a more convenient way to achieve this.
@end deffn
@vindex recenter-window-group-function
@defun recenter-window-group &optional count
This function is like @code{recenter}, except that when the selected
window is part of a group of windows (@pxref{Window Group}),
@code{recenter-window-group} scrolls the entire group. This condition
holds when the buffer local variable
@code{recenter-window-group-function} is set to a function. In this
case, @code{recenter-window-group} calls the function with the
argument @var{count}, then returns its result. The argument
@var{count} has the same meaning as in @code{recenter}, but with
respect to the entire window group.
@end defun
@defopt recenter-redisplay
If this variable is non-@code{nil}, calling @code{recenter} with a
@code{nil} argument redraws the frame. The default value is
@ -4264,10 +4368,10 @@ work.
@end defvar
@defvar window-size-change-functions
This variable holds a list of functions to be called if the size of any
window changes for any reason. The functions are called just once per
redisplay, and just once for each frame on which size changes have
occurred.
This variable holds a list of functions to be called if the size of
any window changes for any reason. The functions are called at the
beginning of a redisplay cycle, and just once for each frame on which
size changes have occurred.
Each function receives the frame as its sole argument. There is no
direct way to find out which windows on that frame have changed size, or

View file

@ -51,7 +51,7 @@ format understood by
\&. Both forms of the program understand
the syntax of C, Objective C, C++, Java, Fortran, Ada, Cobol, Erlang,
Forth, HTML, LaTeX, Emacs Lisp/Common Lisp, Lua, Makefile, Pascal, Perl,
PHP, PostScript, Python, Prolog, Scheme and
Ruby, PHP, PostScript, Python, Prolog, Scheme and
most assembler\-like syntaxes.
Both forms read the files specified on the command line, and write a tag
table (defaults: \fBTAGS\fP for \fBetags\fP, \fBtags\fP for

View file

@ -12597,7 +12597,6 @@ in this mode. Explicit simplification commands, such as @kbd{=} or
@xref{Algebraic Definitions}, for a sample use of
No-Simplification mode.
@kindex m N
@pindex calc-num-simplify-mode
The @kbd{m N} (@code{calc-num-simplify-mode}) command turns off simplification
@ -22463,7 +22462,6 @@ Hyperbolic prefix @kbd{H} can be used similarly; the @kbd{H a s} will
replace any hyperbolic functions in the formula with the appropriate
combinations of @samp{sinh}s and @samp{cosh}s before simplifying.
@menu
* Basic Simplifications::
* Algebraic Simplifications::
@ -28032,7 +28030,7 @@ column of the Units Table.
@noindent
The definitions of many units have changed over the years. For example,
the meter was originally defined in 1791 as one ten-millionth of the
distance from the equator to the north pole. In order to be more
distance from the Equator to the North Pole. In order to be more
precise, the definition was adjusted several times, and now a meter is
defined as the distance that light will travel in a vacuum in
1/299792458 of a second; consequently, the speed of light in a
@ -28071,13 +28069,8 @@ of the various temperature scales.
The unit of volume ``liters'' can be referred to by either the lower-case
@code{l} or the upper-case @code{L}.
The unit @code{A} stands for Amperes; the name @code{Ang} is used
@tex
for \AA ngstroms.
@end tex
@ifnottex
for Angstroms.
@end ifnottex
The unit @code{A} stands for amperes; the name @code{Ang} is used
for angstroms.
The unit @code{pt} stands for pints; the name @code{point} stands for
a typographical point, defined by @samp{72 point = 1 in}. This is
@ -28099,7 +28092,6 @@ use the @samp{tex} prefix; the unit name for a @TeX{} point will be
the unit names for pint and parsec will simply be @samp{pint} and
@samp{parsec} instead of @samp{pt} and @samp{pc}.
The unit @code{e} stands for the elementary (electron) unit of charge;
because algebra command could mistake this for the special constant
@expr{e}, Calc provides the alternate unit name @code{ech} which is
@ -28496,7 +28488,6 @@ a frequency or a midi number to scientific pitch notation. For
example, @code{500 Hz} gets converted to
@code{B_4 + 21.3094853649 cents} and @code{84} to @code{C_6}.
@kindex l m
@pindex calc-midi
@tindex midi
@ -28527,7 +28518,6 @@ notation @code{B_3 + 99.9962592773 cents}; with the default value of
@code{1}, Calc converts @code{261.625 Hz} to @code{C_4}.
@node Store and Recall, Graphics, Units, Top
@chapter Storing and Recalling
@ -29907,7 +29897,7 @@ The @kbd{C-y} command can be given a prefix, which will interpret the
text being yanked with a different radix. If the text being yanked can be
interpreted as a binary, octal, hexadecimal, or decimal number, then a
prefix of @kbd{2}, @kbd{8}, @kbd{6} or @kbd{0} will have Calc
interpret the yanked text as a number in the appropriate base. For example,
interpret the yanked text as a number in the appropriate base. For example,
if @samp{111} has just been killed and is yanked into Calc with a command
of @kbd{C-2 C-y}, then the number @samp{7} will be put on the stack.
If you use the plain prefix @kbd{C-u}, then you will be prompted for a

View file

@ -2461,7 +2461,7 @@ handled a little differently from the other style variables. It's
default global binding is the empty list @code{nil}, rather than
@code{set-from-style}. Before the style system is initialized, you
can add individual elements to @code{c-offsets-alist} by calling
@code{c-set-offset}(@pxref{c-offsets-alist}) just like you would set
@code{c-set-offset} (@pxref{c-offsets-alist}) just like you would set
other style variables with @code{setq}. Those elements will then
prevail when the style system later initializes a buffer-local copy of
@code{c-offsets-alist}.
@ -5234,13 +5234,13 @@ This command changes the entry for a syntactic symbol in the current
binding of @code{c-offsets-alist}, or it inserts a new entry if there
isn't already one for that syntactic symbol.
You can use @code{c-set-offsets} interactively within a @ccmode{}
You can use @code{c-set-offset} interactively within a @ccmode{}
buffer to make experimental changes to your indentation settings.
@kbd{C-c C-o} prompts you for the syntactic symbol to change
(defaulting to that of the current line) and the new offset
(defaulting to the current offset).
@code{c-set-offsets} takes two arguments when used programmatically:
@code{c-set-offset} takes two arguments when used programmatically:
@var{symbol}, the syntactic element symbol to change and @var{offset},
the new offset for that syntactic element. You can call the command
in your @file{.emacs} to change the global binding of

View file

@ -2937,7 +2937,7 @@ error if the argument is not an integer.
@defun cl-digit-char-p char radix
Test if @var{char} is a digit in the specified @var{radix} (default is
10). If true return the decimal value of digit @var{char} in
10). If it is, return the numerical value of digit @var{char} in
@var{radix}.
@end defun
@ -3027,9 +3027,10 @@ of @code{cl-truncate}.
This function implements the Common Lisp @code{parse-integer}
function. It parses an integer in the specified @var{radix} from the
substring of @var{string} between @var{start} and @var{end}. Any
leading and trailing whitespace chars are ignored. It signals an error
if the substring between @var{start} and @var{end} cannot be parsed as
an integer unless @var{junk-allowed} is non-nil.
leading and trailing whitespace chars are ignored. The function
signals an error if the substring between @var{start} and @var{end}
cannot be parsed as an integer, unless @var{junk-allowed} is
non-@code{nil}.
@end defun
@node Random Numbers

View file

@ -283,6 +283,15 @@ with a zero exit status if all tests passed, or nonzero if any tests
failed or if anything else went wrong. It will also print progress
messages and error diagnostics to standard output.
You can also redirect the above output to a log file, say
@file{output.log}, and use the
@code{ert-summarize-tests-batch-and-exit} function to produce a neat
summary as shown below:
@example
emacs -batch -l ert -f ert-summarize-tests-batch-and-exit output.log
@end example
If ERT is not part of your Emacs distribution, you may need to use
@code{-L /path/to/ert/} so that Emacs can find it. You may need
additional @code{-L} flags to ensure that @code{my-tests.el} and all the

View file

@ -9,11 +9,10 @@
@c %**end of header
@copying
This file documents EUDC v1.30b.
This file documents EUDC version 1.40.0.
EUDC is the Emacs Unified Directory Client, a common interface to
directory servers using various protocols such as LDAP or the CCSO white
pages directory system (PH/QI)
directory servers and contact information.
Copyright @copyright{} 1998, 2000--2015 Free Software Foundation, Inc.
@ -32,7 +31,7 @@ modify this GNU manual.''
@dircategory Emacs network features
@direntry
* EUDC: (eudc). Emacs client for directory servers (LDAP, PH).
* EUDC: (eudc). Emacs client for directory servers (LDAP, BBDB).
@end direntry
@footnotestyle end
@ -41,7 +40,7 @@ modify this GNU manual.''
@title EUDC Manual
@subtitle The Emacs Unified Directory Client
@author by Oscar Figueiredo
@code{1.30b}
@code{1.40.0}
@page
@vskip 0pt plus 1fill
@ -83,8 +82,6 @@ Currently supported back-ends are:
@item
LDAP, Lightweight Directory Access Protocol
@item
CCSO PH/QI
@item
BBDB, Big Brother's Insidious Database
@end itemize
@ -109,7 +106,6 @@ Interface to BBDB to let you insert server records into your own BBDB database
@menu
* LDAP:: What is LDAP ?
* CCSO PH/QI:: What is CCSO, PH, QI ?
* BBDB:: What is BBDB ?
@end menu
@ -141,30 +137,6 @@ EUDC requires external support to access LDAP directory servers
(@pxref{LDAP Configuration})
@node CCSO PH/QI
@section CCSO PH/QI
The Central Computing Services Office (CCSO) of the University of
Illinois at Urbana Champaign created and freely distributed a
directory system that was used by many organizations in the 1990s.
The system records information about people such as their address,
phone number, email, academic information or any other details it was
configured to. Nowadays this system is not widely used.
The system consists of two parts: a database server traditionally called
@samp{qi} and a command-line client called @samp{ph}.
@ignore
Until 2010, the code could be downloaded from
@url{http://www-dev.cites.uiuc.edu/ph/}.
@end ignore
The original command-line @samp{ph} client that came with the
@samp{ph/qi} distribution provided additional features that are
not implemented in EUDC, like the possibility to communicate with the
server in login-mode, which made it possible to change records in the
database.
@node BBDB
@section BBDB
@ -175,14 +147,14 @@ and news readers.
It is often used as an enhanced email address book.
EUDC considers BBDB as a directory server back end just like LDAP or
PH/QI servers, though BBDB has no client/server protocol and thus always
resides locally on your machine. The point in this is not to offer an
EUDC considers BBDB as a directory server back end just like LDAP,
though BBDB has no client/server protocol and thus always resides
locally on your machine. The point in this is not to offer an
alternate way to query your BBDB database (BBDB itself provides much
more flexible ways to do that), but rather to offer an interface to your
local directory that is consistent with the interface to external
directories (LDAP, PH/QI). This is particularly interesting when
performing queries on multiple servers.
more flexible ways to do that), but rather to offer an interface to
your local directory that is consistent with the interface to external
LDAP directories. This is particularly interesting when performing
queries on multiple servers.
EUDC also offers a means to insert results from directory queries into
your own local BBDB (@pxref{Creating BBDB Records})
@ -473,7 +445,7 @@ it will be ignored anyway.
@defvar eudc-protocol
The directory protocol to use to query the server. Currently supported
protocols in this version of EUDC are @code{ph}, @code{ldap} and @code{bbdb}.
protocols in this version of EUDC are @code{ldap} and @code{bbdb}.
@end defvar
@deffn Command eudc-set-server
@ -510,11 +482,8 @@ attributes are ignored. Default is @code{t}.
Directory standards may authorize different instances of the same
attribute in a record. For instance the record of a person may contain
several email fields containing different email addresses. When using
a QI directory server this is difficult to distinguish from attributes
having multi-line values such as the postal address that may contain a
line for the street and another one for the zip code and city name. In
both cases, EUDC will consider the attribute duplicated.
several email fields containing different email addresses, in which
case EUDC will consider the attribute duplicated.
EUDC has several methods to deal with duplicated attributes. The
available methods are:
@ -956,39 +925,6 @@ convenience functions to parse phones and addresses.
@end table
@end defvar
The default value of the PH-specific value of that variable is
@code{eudc-ph-bbdb-conversion-alist}:
@lisp
((name . name)
(net . email)
(address . (eudc-bbdbify-address address "Address"))
(phone . ((eudc-bbdbify-phone phone "Phone")
(eudc-bbdbify-phone office_phone "Office Phone"))))
@end lisp
This means that:
@itemize @bullet
@item
the @code{name} field of the BBDB record gets its value
from the @code{name} attribute of the directory record
@item
the @code{net} field of the BBDB record gets its value
from the @code{email} attribute of the directory record
@item
the @code{address} field of the BBDB record is obtained by parsing the
@code{address} attribute of the directory record with the function
@code{eudc-bbdbify-address}
@item
two @code{phone} fields are created (when possible) in the BBDB record.
The first one has @cite{Phone} for location and its value is obtained by
parsing the @code{phone} attribute of the PH/QI record with the function
@code{eudc-bbdbify-phone}. The second one has @cite{Office Phone} for location
its value is obtained by parsing the @code{office_phone} attribute of the
PH/QI record with the function @code{eudc-bbdbify-phone}.
@end itemize
@defun eudc-bbdbify-phone phone location
This is a convenience function provided for use in
@code{eudc-bbdb-conversion-alist}. It parses @var{phone} into a vector

View file

@ -706,7 +706,8 @@ packages.
@noindent
After @kbd{C-x b} (@code{ido-switch-buffer}), the buffer at the head
of the list can be killed by pressing @kbd{C-k}. If the buffer needs
saving, you will be queried before the buffer is killed.
saving, you will be queried before the buffer is killed. @kbd{C-S-b}
buries the buffer at the head of the list.
Likewise, after @kbd{C-x C-f}, you can delete (i.e., physically
remove) the file at the head of the list with @kbd{C-k}. You will

View file

@ -377,6 +377,7 @@ Undo previous action (@code{(undo)}).
@findex ses-read-cell-printer
@findex ses-read-column-printer
@findex ses-read-default-printer
@findex ses-define-local-printer
@findex ses-center
@findex ses-center-span
@findex ses-dashfill
@ -435,13 +436,13 @@ Centering with dashes and spill-over.
Centering with tildes (~) and spill-over.
@end table
You can define printer function local to a sheet with command
@code{ses-define-local-printer}. For instance define printer
@samp{foo} to @code{"%.2f"} and then use symbol @samp{foo} as a
printer function. Then, if you call again
You can define printer function local to a sheet with the command
@code{ses-define-local-printer}. For instance, define a printer
@samp{foo} to @code{"%.2f"}, and then use symbol @samp{foo} as a
printer function. Then, if you call again
@code{ses-define-local-printer} on @samp{foo} to redefine it as
@code{"%.3f"} all the cells using printer @samp{foo} will be reprinted
accordingly.
@code{"%.3f"}, all the cells using printer @samp{foo} will be
reprinted accordingly.
@node Clearing cells
@section Clearing cells

View file

@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2015-10-29.16}
\def\texinfoversion{2015-12-17.20}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@ -158,22 +158,10 @@
\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
% Since the category of space is not known, we have to be careful.
\chardef\spacecat = 10
\def\spaceisspace{\catcode`\ =\spacecat}
% Give the space character the catcode for a space.
\def\spaceisspace{\catcode`\ =10\relax}
% sometimes characters are active, so we need control sequences.
\chardef\ampChar = `\&
\chardef\colonChar = `\:
\chardef\commaChar = `\,
\chardef\dashChar = `\-
\chardef\dotChar = `\.
\chardef\exclamChar= `\!
\chardef\hashChar = `\#
\chardef\lquoteChar= `\`
\chardef\questChar = `\?
\chardef\rquoteChar= `\'
\chardef\semiChar = `\;
\chardef\slashChar = `\/
\chardef\underChar = `\_
@ -271,11 +259,18 @@
%
% Another complication is to let the user choose whether \thischapter
% (\thissection) refers to the chapter (section) in effect at the top
% of a page, or that at the bottom of a page. The solution is
% described on page 260 of The TeXbook. It involves outputting two
% marks for the sectioning macros, one before the section break, and
% one after. I won't pretend I can describe this better than DEK...
% of a page, or that at the bottom of a page.
% \domark is called twice inside \chapmacro, to add one
% mark before the section break, and one after.
% In the second call \prevchapterdefs is the same as \lastchapterdefs,
% and \prevsectiondefs is the same as \lastsectiondefs.
% Then if the page is not broken at the mark, some of the previous
% section appears on the page, and we can get the name of this section
% from \firstmark for @everyheadingmarks top.
% @everyheadingmarks bottom uses \botmark.
%
% See page 260 of The TeXbook.
\def\domark{%
\toks0=\expandafter{\lastchapterdefs}%
\toks2=\expandafter{\lastsectiondefs}%
@ -283,13 +278,14 @@
\toks6=\expandafter{\prevsectiondefs}%
\toks8=\expandafter{\lastcolordefs}%
\mark{%
\the\toks0 \the\toks2 % 0: top marks (\last...)
\noexpand\or \the\toks4 \the\toks6 % 1: bottom marks (default, \prev...)
\the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top
\noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom
\noexpand\else \the\toks8 % 2: color marks
}%
}
% \gettopheadingmarks, \getbottomheadingmarks - extract needed part of mark.
% \gettopheadingmarks, \getbottomheadingmarks,
% \getcolormarks - extract needed part of mark.
%
% \topmark doesn't work for the very first chapter (after the title
% page or the contents), so we use \firstmark there -- this gets us
@ -345,28 +341,21 @@
% values in \headline and \footline.
%
% This is used to check if we are on the first page of a chapter.
\ifcase0\topmark\fi
\ifx\thischapter\empty
% See comment for \gettopheadingmarks
\ifcase0\firstmark\fi
\let\curchaptername\thischaptername
\ifcase1\firstmark\fi
\let\prevchaptername\thischaptername
\else
\let\curchaptername\thischaptername
\ifcase1\topmark\fi
\let\prevchaptername\thischaptername
\fi
\ifcase1\topmark\fi
\let\prevchaptername\thischaptername
\ifcase0\firstmark\fi
\let\curchaptername\thischaptername
%
\ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
\ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
%
\ifx\curchaptername\prevchaptername
\let\thischapterheading\thischapter
\else
% If on the first page of a chapter, clear @thischapter so it
% doesn't appear in the headline, because the chapter is already
% shown in the chapter heading.
\def\thischapter{}%
% \thischapterheading is the same as \thischapter except it is blank
% for the first page of a chapter. This is to prevent the chapter name
% being shown twice.
\def\thischapterheading{}%
\fi
%
\global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}%
@ -1164,8 +1153,8 @@
\def\rgbDarkRed{0.50 0.09 0.12}
\def\rgbBlack{0 0 0}
%
% k sets the color for filling (usual text, etc.);
% K sets the color for stroking (thin rules, e.g., normal _'s).
% rg sets the color for filling (usual text, etc.);
% RG sets the color for stroking (thin rules, e.g., normal _'s).
\def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
%
% Set color, and create a mark which defines \thiscolor accordingly,
@ -1416,7 +1405,6 @@
\normalturnoffactive
\def\@{@}%
\let\/=\empty
\let\xprocessmacroarg=\eatspaces % in case we are in a macro expansion
\makevalueexpandable
% do we want to go so far as to use \indexnofonts instead of just
% special-casing \var here?
@ -2452,8 +2440,8 @@
%
\catcode`@=11
\def\plainfrenchspacing{%
\sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
\sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
\sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
\sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
\def\endofsentencespacefactor{1000}% for @. and friends
}
\def\plainnonfrenchspacing{%
@ -2641,9 +2629,9 @@
% Allow line breaks around only a few characters (only).
\def\urefcatcodes{%
\catcode\ampChar=\active \catcode\dotChar=\active
\catcode\hashChar=\active \catcode\questChar=\active
\catcode\slashChar=\active
\catcode`\&=\active \catcode`\.=\active
\catcode`\#=\active \catcode`\?=\active
\catcode`\/=\active
}
{
\urefcatcodes
@ -2852,23 +2840,24 @@
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
%
\def\math{%
\tex
\mathunderscore
\let\\ = \mathbackslash
\mathactive
% make the texinfo accent commands work in math mode
\let\"=\ddot
\let\'=\acute
\let\==\bar
\let\^=\hat
\let\`=\grave
\let\u=\breve
\let\v=\check
\let\~=\tilde
\let\dotaccent=\dot
% have to provide another name for sup operator
\let\mathopsup=\sup
$\finishmath
\ifmmode\else % only go into math if not in math mode already
\tex
\mathunderscore
\let\\ = \mathbackslash
\mathactive
% make the texinfo accent commands work in math mode
\let\"=\ddot
\let\'=\acute
\let\==\bar
\let\^=\hat
\let\`=\grave
\let\u=\breve
\let\v=\check
\let\~=\tilde
\let\dotaccent=\dot
% have to provide another name for sup operator
\let\mathopsup=\sup
$\expandafter\finishmath\fi
}
\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
@ -3517,7 +3506,7 @@
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
\global\oddheadline={\line{\thischapterheading\hfil\folio}}
\global\let\contentsalignmacro = \chapoddpage
}
\let\contentsalignmacro = \chappager
@ -3528,8 +3517,8 @@
\global\pageno=1
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
\global\evenheadline={\line{\thischapterheading\hfil\folio}}
\global\oddheadline={\line{\thischapterheading\hfil\folio}}
\global\let\contentsalignmacro = \chappager
}
\def\HEADINGSon{\HEADINGSdouble}
@ -3540,7 +3529,7 @@
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
\global\oddheadline={\line{\thischapterheading\hfil\folio}}
\global\let\contentsalignmacro = \chapoddpage
}
@ -3548,8 +3537,8 @@
\def\HEADINGSsinglex{%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
\global\evenheadline={\line{\thischapterheading\hfil\folio}}
\global\oddheadline={\line{\thischapterheading\hfil\folio}}
\global\let\contentsalignmacro = \chappager
}
@ -4676,16 +4665,6 @@
\definedummyword\verb
\definedummyword\w
\definedummyword\xref
%
% Consider:
% @macro mkind{arg1,arg2}
% @cindex \arg2\
% @end macro
% @mkind{foo, bar}
% The space after the comma will end up in the temporary definition
% that we make for arg2 (see \parsemargdef ff.). We want all this to be
% expanded for the sake of the index, so we end up just seeing "bar".
\let\xprocessmacroarg\eatspaces
}
% For testing: output @{ and @} in index sort strings as \{ and \}.
@ -5212,16 +5191,12 @@
% from @* into spaces. The user might give these in long section
% titles, for instance.
\def\*{\unskip\space\ignorespaces}%
\def\entrybreak{\hfil\break}%
\def\entrybreak{\hfil\break}% An undocumented command
%
% A bit of stretch before each entry for the benefit of balancing
% columns.
\vskip 0pt plus0.5pt
%
% Badness calculation for paragraph affected by -
% How much \indexdotfill is stretched, or how much \parfillskip is shrunk
% Number of lines (\linepenalty)
%
% Swallow the left brace of the text (first parameter):
\afterassignment\doentry
\let\temp =
@ -5255,16 +5230,23 @@
%
\ifpdf
\pdfgettoks#1.%
\hskip\skip\thinshrinkable\the\toksA
\bgroup\let\domark\relax
\hskip\skip\thinshrinkable\the\toksA
\egroup
% The redefinion of \domark stops marks being added in \pdflink to
% preserve coloured links across page boundaries. Otherwise the marks
% would get in the way of \lastbox in \insertindexentrybox.
\else
\hskip\skip\thinshrinkable #1%
\fi
\fi
\egroup % end \boxA
\ifdim\wd\boxB = 0pt
\global\setbox\entryindexbox=\box\boxA
\global\setbox\entryindexbox=\vbox{\unhbox\boxA}%
\else
\global\setbox\entryindexbox=\vbox\bgroup\noindent
\global\setbox\entryindexbox=\vbox\bgroup
\prevdepth=\entrylinedepth
\noindent
% We want the text of the entries to be aligned to the left, and the
% page numbers to be aligned to the right.
%
@ -5333,10 +5315,21 @@
\newbox\entryindexbox
\def\insertindexentrybox{%
\lineskip=.7ex plus .5ex % This comes into effect when the \vbox has a large
% height due to the paragraph in it having several
% lines.
\box\entryindexbox}
\copy\entryindexbox
% The following gets the depth of the last box. This is for even
% line spacing when entries span several lines.
\setbox\dummybox\vbox{%
\unvbox\entryindexbox
\nointerlineskip
\lastbox
\global\entrylinedepth=\prevdepth
}%
% Note that we couldn't simply \unvbox\entryindexbox followed by
% \nointerlineskip\lastbox to remove the last box and then reinstate it,
% because this resets how far the box has been \moveleft'ed to 0. \unvbox
% doesn't affect \prevdepth either.
}
\newdimen\entrylinedepth
% Default is no penalty
\let\entryorphanpenalty\egroup
@ -5387,16 +5380,35 @@
% Define two-column mode, which we use to typeset indexes.
% Adapted from the TeXbook, page 416, which is to say,
% the manmac.tex format used to print the TeXbook itself.
\catcode`\@=11
\catcode`\@=11 % private names
\newbox\partialpage
\newdimen\doublecolumnhsize
\newdimen\doublecolumntopgap
\doublecolumntopgap = 0pt
\newtoks\savedtopmark % Used in \begindoublecolumns
% Use inside an output routine to save \topmark and \firstmark
\def\savemarks{%
\global\savedtopmark=\expandafter{\topmark }%
\global\savedfirstmark=\expandafter{\firstmark }%
}
\newtoks\savedtopmark
\newtoks\savedfirstmark
% Set \topmark and \firstmark for next time \output runs.
% Can't be run from withinside \output (because any material
% added while an output routine is active, including
% penalties, is saved for after it finishes). The page so far
% should be empty, otherwise what's on it will be thrown away.
\def\restoremarks{%
\mark{\the\savedtopmark}%
\bgroup\output = {%
\setbox\dummybox=\box\PAGE
}abc\eject\egroup
% "abc" because output routine doesn't fire for a completely empty page.
\mark{\the\savedfirstmark}%
}
\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
% Grab any single-column material above us.
\output = {%
@ -5417,22 +5429,15 @@
\unvbox\PAGE
\kern-\topskip \kern\baselineskip
}%
% Save \topmark and \firstmark
\global\savedtopmark=\expandafter{\topmark}%
\global\savedfirstmark=\expandafter{\firstmark}%
\savemarks
}%
\eject % run that output routine to set \partialpage
\restoremarks
%
% We recover the two marks that the last output routine saved in order
% to propagate the information in marks added around a chapter heading,
% which could be otherwise be lost by the time the final page is output.
%
\mark{\the\savedtopmark}% Only mark in page passed to following \output.
\output = {%
\setbox0=\box\PAGE % clear box 255
}abc\eject
%
\mark{\the\savedfirstmark}%
%
% Use the double-column output routine for subsequent pages.
\output = {\doublecolumnout}%
@ -5465,12 +5470,14 @@
\global\advance\vsize by -1\doublecolumntopgap
\vsize = 2\vsize
\topskip=0pt
\global\entrylinedepth=0pt\relax
}
% The double-column output routine for all double-column pages except
% the last, which is done by \balancecolumns.
%
\def\doublecolumnout{%
%
\splittopskip=\topskip \splitmaxdepth=\maxdepth
% Get the available space for the double columns -- the normal
% (undoubled) page height minus any material left over from the
@ -5532,6 +5539,7 @@
\output = {%
% Split the last of the double-column material. Leave it on the
% current page, no automatic page break.
\savemarks
\balancecolumns
%
% If we end up splitting too much material for the current page,
@ -5545,6 +5553,8 @@
}%
\eject
\endgroup % started in \begindoublecolumns
\restoremarks
\box\balancedcolumns
%
% \pagegoal was set to the doubled \vsize above, since we restarted
% the current page. We're now back to normal single-column
@ -5552,6 +5562,8 @@
% \endgroup where \vsize got restored).
\pagegoal = \vsize
}
\newbox\balancedcolumns
\setbox\balancedcolumns=\vbox{shouldnt see this}%
%
% Only called for the last of the double column material. \doublecolumnout
% does the others.
@ -5595,7 +5607,7 @@
\fi
\fi
%
\pagesofar
\global\setbox\balancedcolumns=\vbox{\pagesofar}%
}
\catcode`\@ = \other
@ -7612,8 +7624,7 @@
% Argument is macro body with arguments substituted
\def\scanmacro#1{%
\newlinechar`\^^M
% Reduce doubled backslashes to one
\def\xprocessmacroarg{\passargtomacro\eatspaces}%
\def\xprocessmacroarg{\eatspaces}%
%
% Process the macro body under the current catcode regime.
\scantokens{#1\texinfoc}\aftermacro%
@ -7629,6 +7640,7 @@
% to allow macros to open or close groups themselves.
}
% Used for copying and captions
\def\scanexp#1{%
\bgroup
% Undo catcode changes of \startcontents and \printindex
@ -7733,6 +7745,7 @@
% an argument to another Texinfo command.
\def\macroargctxt{%
\scanctxt
\catcode`\ =\active
\catcode`\^^M=\other
\catcode`\\=\active
}
@ -8127,16 +8140,23 @@
\egroup\noexpand\scanmacro{\macrobody}}%
\else
\ifnum\paramno<10\relax % at most 9
% See non-recursive section below for comments
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
\noexpand\csname\the\macname @@\endcsname}%
\bgroup
\noexpand\expandafter
\noexpand\macroargctxt
\noexpand\expandafter
\expandafter\noexpand\csname\the\macname @@\endcsname}%
\expandafter\xdef\csname\the\macname @@\endcsname##1{%
\expandafter\noexpand\csname\the\macname @@@\endcsname ##1,}%
\noexpand\passargtomacro
\expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}%
\expandafter\xdef\csname\the\macname @@@\endcsname##1{%
\expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}%
\expandafter\expandafter
\expandafter\xdef
\expandafter\expandafter
\csname\the\macname @@@\endcsname
\paramlist{\egroup\noexpand\scanmacro{\macrobody}}%
\csname\the\macname @@@@\endcsname\paramlist{%
\egroup\noexpand\scanmacro{\macrobody}}%
\else % 10 or more
\expandafter\xdef\csname\the\macname\endcsname{%
\noexpand\getargvals@{\the\macname}{\argl}%
@ -8166,19 +8186,27 @@
}%
\else % at most 9
\ifnum\paramno<10\relax
% @MACNAME sets the context for reading the macro argument
% @MACNAME@@ gets the argument, processes backslashes and appends a
% comma.
% @MACNAME@@@ removes braces surrounding the argument list.
% @MACNAME@@@@ scans the macro body with arguments substituted.
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
\expandafter\noexpand\csname\the\macname @@\endcsname}%
\bgroup
\noexpand\expandafter % This \expandafter skip any spaces after the
\noexpand\macroargctxt % macro before we change the catcode of space.
\noexpand\expandafter
\expandafter\noexpand\csname\the\macname @@\endcsname}%
\expandafter\xdef\csname\the\macname @@\endcsname##1{%
\expandafter\noexpand\csname\the\macname @@@\endcsname ##1,}%
\noexpand\passargtomacro
\expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}%
\expandafter\xdef\csname\the\macname @@@\endcsname##1{%
\expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}%
\expandafter\expandafter
\expandafter\xdef
\expandafter\expandafter
\csname\the\macname @@@\endcsname
\paramlist{%
\egroup
\noexpand\scanmacro{\macrobody}%
}%
\csname\the\macname @@@@\endcsname\paramlist{%
\egroup\noexpand\scanmacro{\macrobody}}%
\else % 10 or more:
\expandafter\xdef\csname\the\macname\endcsname{%
\noexpand\getargvals@{\the\macname}{\argl}%
@ -8194,71 +8222,96 @@
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
{\catcode`\@=0 \catcode`\\=13
@catcode`@_=11
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
{\catcode`\@=0 \catcode`\\=13 % We need to manipulate \ so use @ as escape
@catcode`@_=11 % private names
@catcode`@!=11 % used as argument separator
% \passargtomacro#1#2 -
% Call #1 with a list of tokens #2, with any doubled backslashes in #2
% compressed to one.
%
% This implementation works by expansion, and not execution (so we cannot use
% \def or similar). This reduces the risk of this failing in contexts where
% complete expansion is done with no execution (for example, in writing out to
% an auxiliary file for an index entry).
%
% State is kept in the input stream: the argument passed to
% @look_ahead, @gobble_and_check_finish and @add_segment is
%
% THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input)
%
% where:
% THE_MACRO - name of the macro we want to call
% ARG_RESULT - argument list we build to pass to that macro
% PENDING_BS - either a backslash or nothing
% NEXT_TOKEN - used to look ahead in the input stream to see what's coming next
@gdef@passargtomacro#1#2{%
@def@the_macro{#1}%
@def@pending_backslash{}%
@def@finish{@finish}%
@def@arg_result{}%
@let@next_token=@relax
@add_segment#2\@finish\%
@add_segment #1!{}@relax#2\@_finish\%
}
@gdef@_finish{@_finishx} @global@let@_finishx@relax
% Input stream is just after a backslash. If the next token is not a
% backslash, process the rest of the argument; otherwise, remove the next
% token.
@gdef@look_ahead{%
@futurelet@next_token@look_aheadzzz}
@gdef@look_aheadzzz{%
@ifx@next_token\%
@let@next=@gobble_and_check_finish
% #1 - THE_MACRO ARG_RESULT
% #2 - PENDING_BS
% #3 - NEXT_TOKEN
% #4 used to look ahead
%
% If the next token is not a backslash, process the rest of the argument;
% otherwise, remove the next token.
@gdef@look_ahead#1!#2#3#4{%
@ifx#4\%
@expandafter@gobble_and_check_finish
@else
@let@next=@add_segment
@fi@next
@expandafter@add_segment
@fi#1!{#2}#4#4%
}
% Double backslash found. Add a single backslash here.
@gdef@gobble_and_check_finish#1{%
@add_the_backslash
@def@pending_backslash{}%
@futurelet@next_token@add_segment
% #1 - THE_MACRO ARG_RESULT
% #2 - PENDING_BS
% #3 - NEXT_TOKEN
% #4 should be a backslash, which is gobbled.
% #5 looks ahead
%
% Double backslash found. Add a single backslash, and look ahead.
@gdef@gobble_and_check_finish#1!#2#3#4#5{%
@add_segment#1\!{}#5#5%
}
% append a backslash to \arg_result
@gdef@add_the_backslash{%
@expandafter@gdef@expandafter@arg_result@expandafter{@arg_result\}%
}
@gdef@is_fi{@fi}
% #1 - THE_MACRO ARG_RESULT
% #2 - PENDING_BS
% #3 - NEXT_TOKEN
% #4 is input stream until next backslash
%
% Input stream is either at the start of the argument, or just after a
% backslash sequence, either a lone backslash, or a doubled backslash.
% \next_token contains the first token in the input stream: if it is \finish,
% finish; otherwise, append to \arg_result the segment of the argument up until
% the next backslash. \pending_backslash contains a backslash to represent
% NEXT_TOKEN contains the first token in the input stream: if it is \finish,
% finish; otherwise, append to ARG_RESULT the segment of the argument up until
% the next backslash. PENDING_BACKSLASH contains a backslash to represent
% a backslash just before the start of the input stream that has not been
% added to \arg_result.
@gdef@add_segment#1\{%
@ifx@next_token@finish
@let@next=@call_the_macro%
% added to ARG_RESULT.
@gdef@add_segment#1!#2#3#4\{%
@ifx#3@_finish
@call_the_macro#1!%
@else
@let@next=@look_ahead
%
% append to @arg_result
% token list registers might be better
@expandafter@expandafter@expandafter@gdef
@expandafter@expandafter@expandafter@arg_result
@expandafter@expandafter@expandafter{%
@expandafter@arg_result
@pending_backslash#1}%
@def@pending_backslash{\}%
@fi@next}
% append the pending backslash to the result, followed by the next segment
@expandafter@is_fi@look_ahead#1#2#4!{\}@fi
% this @fi is discarded by @look_ahead.
% we can't get rid of it with \expandafter because we don't know how
% long #4 is.
}
@gdef@call_the_macro{@expandafter@the_macro@expandafter{@arg_result}}
% #1 - THE_MACRO
% #2 - ARG_RESULT
% #3 discards the res of the conditional in @add_segment, and @is_fi ends the
% conditional.
@gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \braceorline MAC is used for a one-argument macro MAC. It checks
% whether the next non-whitespace character is a {. It sets the context
@ -10818,11 +10871,12 @@
% this is not a problem.
\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
% Turn off all special characters except @
% (and those which the user can use as if they were ordinary).
% Set catcodes for Texinfo file
% Active characters for printing the wanted glyph.
% Most of these we simply print from the \tt font, but for some, we can
% use math or other variants that look better in normal text.
%
\catcode`\"=\active
\def\activedoublequote{{\tt\char34}}
\let"=\activedoublequote
@ -10832,12 +10886,10 @@
\catcode`\_=\active
\def_{\ifusingtt\normalunderscore\_}
\let\realunder=_
% Subroutine for the previous macro.
\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
\let\realunder=_
\catcode`\|=\active
\def|{{\tt\char124}}
\catcode`\|=\active \def|{{\tt\char124}}
\chardef \less=`\<
\catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@
@c In the Tramp GIT, the version number is auto-frobbed from
@c configure.ac, so you should edit that file and run
@c "autoconf && ./configure" to change the version number.
@set trampver 2.2.13-pre
@set trampver 2.2.13.25.1
@c Other flags from configuration
@set instprefix /usr/local

View file

@ -373,9 +373,10 @@ for specific schemes.
* rlogin/telnet/tn3270:: Remote host connectivity.
* irc:: Internet Relay Chat.
* data:: Embedded data URLs.
* nfs:: Networked File System
* ldap:: Lightweight Directory Access Protocol
* nfs:: Networked File System.
* ldap:: Lightweight Directory Access Protocol.
* man:: Unix man pages.
* Tramp:: Schemes supported via Tramp.
@end menu
@node http/https
@ -549,8 +550,8 @@ file://@var{user}:@var{password}@@@var{host}:@var{port}/@var{file}
@noindent
If the URL specifies a local file, it is retrieved by reading the file
contents in the usual way. If it specifies a remote file, it is
retrieved using the Ange-FTP package. @xref{Remote Files,,, emacs,
The GNU Emacs Manual}.
retrieved using either the Tramp or the Ange-FTP package.
@xref{Remote Files,,, emacs, The GNU Emacs Manual}.
When retrieving a compressed file, it is automatically uncompressed
if it has the file suffix @file{.z}, @file{.gz}, @file{.Z},
@ -682,7 +683,8 @@ telnet://@var{user}:@var{password}@@@var{host}:@var{port}
@end example
@noindent
but the @var{password} component is ignored.
but the @var{password} component is ignored. By default, the
@code{telnet} scheme is handled via Tramp (@pxref{Tramp}).
To handle rlogin, telnet and tn3270 URLs, a @code{rlogin},
@code{telnet} or @code{tn3270} (the program names and arguments are
@ -798,6 +800,38 @@ The @code{man} scheme is a non-standard one. Such URLs have the form
and are retrieved by passing @var{page-spec} to the Lisp function
@code{man}.
@node Tramp
@section URL Types Supported via Tramp
@vindex url-tramp-protocols
Some additional URL types are supported by passing them to Tramp
(@pxref{Top, The Tramp Manual,, tramp, The Tramp Manual}). These
protocols are listed in the @code{url-tramp-protocols} variable, which
you can customize. The default value includes the following
protocols:
@table @code
@item ftp
The file transfer protocol. @xref{file/ftp}.
@item ssh
@cindex ssh
The secure shell protocol. @xref{Inline Methods,,, tramp, The Tramp
Manual}.
@item scp
@cindex scp
The secure file copy protocol. @xref{External Methods,,, tramp, The
Tramp Manual}.
@item rsync
@cindex rsync
The remote sync protocol.
@item telnet
The telnet protocol.
@end table
@node General Facilities
@chapter General Facilities
@ -1296,6 +1330,14 @@ Connect directly.
@end table
@end defopt
@defopt url-user-agent
The User Agent string used for sending HTTP/HTTPS requests. The value
should be a string or a function of no arguments that returns a
string. The default value is @w{@samp{User-Agent: @var{package-name}
URL/Emacs}}, where @var{package-name} is the value of
@code{url-package-name} and its version, if they are non-@code{nil}.
@end defopt
@node GNU Free Documentation License
@appendix GNU Free Documentation License
@include doclicense.texi

250
etc/DEBUG
View file

@ -3,27 +3,163 @@ Debugging GNU Emacs
Copyright (C) 1985, 2000-2015 Free Software Foundation, Inc.
See the end of the file for license conditions.
** Preliminaries
[People who debug Emacs on Windows using Microsoft debuggers should
read the Windows-specific section near the end of this document.]
This section can be skipped if you are already familiar with building
Emacs with debug info, configuring and starting GDB, and simple GDB
debugging techniques.
** When you debug Emacs with GDB, you should start GDB in the directory
*** Configuring Emacs for debugging
It is best to configure and build Emacs with special options that will
make the debugging easier. Here's the configure-time options we
recommend (they are in addition to any other options you might need,
such as --prefix):
CFLAGS='-O0 -g3' ./configure --enable-checking='yes,glyphs' --enable-check-lisp-object-type
The CFLAGS value is important: debugging optimized code can be very
hard. (If the problem only happens with optimized code, you may need
to enable optimizations. If that happens, try using -Og first,
instead of -O2, as the former will disable some optimizations that
make debugging some code exceptionally hard.)
Modern versions of GCC support more elaborate debug info that is
available by just using the -g3 compiler switch. Try using -gdwarf-4
in addition to -g3, and if that fails, try -gdwarf-3. This is
especially important if you have to debug optimized code. More info
about this is available below; search for "analyze failed assertions".
The 2 --enable-* switches are optional. They don't have any effect on
debugging with GDB, but will compile additional code that might catch
the problem you are debugging much earlier, in the form of assertion
violation. The --enable-checking option also enables additional
functionality useful for debugging display problems; see more about
this below under "Debugging Emacs redisplay problems".
Emacs needs not be installed to be debugged, you can debug the binary
created in the 'src' directory.
*** Configuring GDB
When you debug Emacs with GDB, you should start GDB in the directory
where the Emacs executable was made (the 'src' directory in the Emacs
source tree). That directory has a .gdbinit file that defines various
"user-defined" commands for debugging Emacs. (These commands are
described below under "Examining Lisp object values" and "Debugging
Emacs Redisplay problems".)
Starting the debugger from Emacs, via the "M-x gdb" command (described
below), when the current buffer visits one of the Emacs C source files
will automatically start GDB in the 'src' directory.
Some GDB versions by default do not automatically load .gdbinit files
in the directory where you invoke GDB. With those versions of GDB,
you will see a warning when GDB starts, like this:
warning: File ".../src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
There are several ways to overcome that difficulty, they are all
described in the node "Auto-loading safe path" in the GDB user
manual. If nothing else helps, type "source /path/to/.gdbinit RET" at
the GDB prompt, to unconditionally load the GDB init file.
The simplest way to fix this is to add the following line to your
~/.gdbinit file:
add-auto-load-safe-path /path/to/emacs/src/.gdbinit
There are other ways to overcome that difficulty, they are all
described in the node "Auto-loading safe path" in the GDB user manual.
If nothing else helps, type "source /path/to/.gdbinit RET" at the GDB
prompt, to unconditionally load the GDB init file.
*** Use the Emacs GDB UI front-end
We recommend using the GUI front-end for GDB provided by Emacs. With
it, you can start GDB by typing "M-x GDB RET". This will suggest the
default binary to debug; if you are going to start a new Emacs
process, change it as needed to point to the correct binary.
Alternatively, if you want to attach the debugger to an already
running Emacs process, change the GDB command shown in the minibuffer
to say this:
gdb -i=mi -p PID
where PID is the numerical process ID of the running Emacs process,
displayed by system utilities such as 'top' or 'ps' on Posix hosts and
Task Manager on MS-Windows.
Once the debugger starts, open the additional windows provided by the
GDB UI, by typing "M-x gdb-many-windows RET". (Alternatively, click
Gud->GDB-MI->Display Other Windows" from the menu bar.) At this
point, make your frame large enough (or full-screen) such that the
windows you just opened have enough space to show the content without
horizontal scrolling.
You can later restore your window configuration with the companion
command "M-x gdb-restore-windows RET", or by deselecting "Display
Other Windows" from the menu bar.
*** Setting initial breakpoints
Before you let Emacs run, you should now set breakpoints in the code
which you want to debug, so that Emacs stops there and lets GDB take
control. If the code which you want to debug is executed under some
rare conditions, or only when a certain Emacs command is manually
invoked, then just set your breakpoint there, let Emacs run, and
trigger the breakpoint by invoking that command or reproducing those
rare conditions.
If you are less lucky, and the code in question is run very
frequently, you will have to find some way of avoiding triggering your
breakpoint when the conditions for the buggy behavior did not yet
happen. There's no single recipe for this, you will have to be
creative and study the code to see what's appropriate. Some useful
tricks for that:
. Make your breakpoint conditional on certain buffer or string
position. For example:
(gdb) break foo.c:1234 if PT >= 9876
. Set a break point in some rarely called function, then create the
conditions for the bug, call that rare function, and when GDB gets
control, set the breakpoint in the buggy code, knowing that it
will now be called when the bug happens.
. If the bug manifests itself as an error message, set a breakpoint
in Fsignal, and when it breaks, look at the backtrace to see what
triggers the error.
Some additional techniques are described below under "Getting control
to the debugger".
You are now ready to start your debugging session.
If you are starting a new Emacs session, type "run", followed by any
command-line arguments (e.g., "-Q") into the *gud-emacs* buffer and
press RET.
If you attached the debugger to a running Emacs, type "continue" into
the *gud-emacs* buffer and press RET.
Many variables you will encounter while debugging are Lisp objects.
These are displayed as integer values (or structures, if you used the
"--enable-check-lisp-object-type" option at configure time) that are
hard to interpret, especially if they represent long lists. You can
use the 'pp' command to display them in their Lisp form. That command
displays its output on the standard error stream (on GNU/Linux, you
can redirect that to a file using "M-x redirect-debugging-output").
This means that if you attach GDB to a running Emacs that was invoked
from a desktop icon, chances are you will not see the output at all,
or it will wind up in an obscure place (check the documentation of
your desktop environment).
Additional information about displaying Lisp objects can be found
under "Examining Lisp object values" below.
The rest of this document describes specific useful techniques for
debugging Emacs; we suggest reading it in its entirety the first time
you are about to debug Emacs, then look up your specific issues
whenever you need.
Good luck!
** When you are trying to analyze failed assertions or backtraces, it
is essential to compile Emacs with flags suitable for debugging.
@ -111,6 +247,12 @@ You can also use 'pp value' to print the emacs value directly.
To see the current value of a Lisp Variable, use 'pv variable'.
These commands send their output to stderr; if that is closed or
redirected to some file you don't know, you won't see their output.
This is particularly so for Emacs invoked on MS-Windows from the
desktop shortcut. On GNU/Linux, you can use the command
'redirect-debugging-output' to redirect stderr to a file.
Note: It is not a good idea to try 'pr', 'pp', or 'pv' if you know that Emacs
is in deep trouble: its stack smashed (e.g., if it encountered SIGSEGV
due to stack overflow), or crucial data structures, such as 'obarray',
@ -181,7 +323,7 @@ Then Emacs hits the breakpoint:
[...]
}
Now we can use 'pr' to print the frame parameters:
Now we can use 'pp' to print the frame parameters:
(gdb) pp $->param_alist
((background-mode . light) (display-type . color) [...])
@ -400,15 +542,16 @@ Debugging with GDB in Emacs offers some advantages over the command line (See
the GDB Graphical Interface node of the Emacs manual). There are also some
features available just for debugging Emacs:
1) The command gud-pp is available on the tool bar (the 'pp' icon) and
1) The command gud-print is available on the tool bar (the 'p' icon) and
allows the user to print the s-expression of the variable at point,
in the GUD buffer.
2) Pressing 'p' on a component of a watch expression that is a lisp object
in the speedbar prints its s-expression in the GUD buffer.
3) The STOP button on the tool bar is adjusted so that it sends SIGTSTP
instead of the usual SIGINT.
3) The STOP button on the tool bar and the Signals->STOP menu-bar menu
item are adjusted so that they send SIGTSTP instead of the usual
SIGINT.
4) The command gud-pv has the global binding 'C-x C-a C-v' and prints the
value of the lisp variable at point.
@ -753,91 +896,6 @@ recovering the contents of Emacs buffers from a core dump file. You
might also find those commands useful for displaying the list of
buffers in human-readable format from within the debugger.
** Some suggestions for debugging on MS Windows:
(written by Marc Fleischeuers, Geoff Voelker and Andrew Innes)
To debug Emacs with Microsoft Visual C++, you either start emacs from
the debugger or attach the debugger to a running emacs process.
To start emacs from the debugger, you can use the file bin/debug.bat.
The Microsoft Developer studio will start and under Project, Settings,
Debug, General you can set the command-line arguments and Emacs's
startup directory. Set breakpoints (Edit, Breakpoints) at Fsignal and
other functions that you want to examine. Run the program (Build,
Start debug). Emacs will start and the debugger will take control as
soon as a breakpoint is hit.
You can also attach the debugger to an already running Emacs process.
To do this, start up the Microsoft Developer studio and select Build,
Start debug, Attach to process. Choose the Emacs process from the
list. Send a break to the running process (Debug, Break) and you will
find that execution is halted somewhere in user32.dll. Open the stack
trace window and go up the stack to w32_msg_pump. Now you can set
breakpoints in Emacs (Edit, Breakpoints). Continue the running Emacs
process (Debug, Step out) and control will return to Emacs, until a
breakpoint is hit.
To examine the contents of a Lisp variable, you can use the function
'debug_print'. Right-click on a variable, select QuickWatch (it has
an eyeglass symbol on its button in the toolbar), and in the text
field at the top of the window, place 'debug_print(' and ')' around
the expression. Press 'Recalculate' and the output is sent to stderr,
and to the debugger via the OutputDebugString routine. The output
sent to stderr should be displayed in the console window that was
opened when the emacs.exe executable was started. The output sent to
the debugger should be displayed in the 'Debug' pane in the Output
window. If Emacs was started from the debugger, a console window was
opened at Emacs' startup; this console window also shows the output of
'debug_print'.
For example, start and run Emacs in the debugger until it is waiting
for user input. Then click on the 'Break' button in the debugger to
halt execution. Emacs should halt in 'ZwUserGetMessage' waiting for
an input event. Use the 'Call Stack' window to select the procedure
'w32_msp_pump' up the call stack (see below for why you have to do
this). Open the QuickWatch window and enter
"debug_print(Vexec_path)". Evaluating this expression will then print
out the contents of the Lisp variable 'exec-path'.
If QuickWatch reports that the symbol is unknown, then check the call
stack in the 'Call Stack' window. If the selected frame in the call
stack is not an Emacs procedure, then the debugger won't recognize
Emacs symbols. Instead, select a frame that is inside an Emacs
procedure and try using 'debug_print' again.
If QuickWatch invokes debug_print but nothing happens, then check the
thread that is selected in the debugger. If the selected thread is
not the last thread to run (the "current" thread), then it cannot be
used to execute debug_print. Use the Debug menu to select the current
thread and try using debug_print again. Note that the debugger halts
execution (e.g., due to a breakpoint) in the context of the current
thread, so this should only be a problem if you've explicitly switched
threads.
It is also possible to keep appropriately masked and typecast Lisp
symbols in the Watch window, this is more convenient when steeping
though the code. For instance, on entering apply_lambda, you can
watch (struct Lisp_Symbol *) (0xfffffff & args[0]).
Optimizations often confuse the MS debugger. For example, the
debugger will sometimes report wrong line numbers, e.g., when it
prints the backtrace for a crash. It is usually best to look at the
disassembly to determine exactly what code is being run--the
disassembly will probably show several source lines followed by a
block of assembler for those lines. The actual point where Emacs
crashes will be one of those source lines, but not necessarily the one
that the debugger reports.
Another problematic area with the MS debugger is with variables that
are stored in registers: it will sometimes display wrong values for
those variables. Usually you will not be able to see any value for a
register variable, but if it is only being stored in a register
temporarily, you will see an old value for it. Again, you need to
look at the disassembly to determine which registers are being used,
and look at those registers directly, to see the actual current values
of these variables.
This file is part of GNU Emacs.

705
etc/NEWS

File diff suppressed because it is too large Load diff

View file

@ -2051,6 +2051,10 @@ pinned icon, a separate button appears on the taskbar, instead of the
expected effect of the icon you clicked on being converted to that
button.
This is due to a bug in early versions of Windows 10, reportedly fixed
in build 1511 of Windows 10 (a.k.a. "Windows 10 SP1"). If you cannot
upgrade, read the work-around described below.
First, be sure to edit the Properties of the pinned icon to invoke
runemacs.exe, not emacs.exe. (The latter will cause an extra cmd
window to appear when you invoke Emacs from the pinned icon.)

File diff suppressed because it is too large Load diff

View file

@ -847,7 +847,7 @@ saída do Emacs. Isso indica que um "recurso" do sistema operacional
chamado "controle de fluxo" (flow control) esta interceptando o C-s e
não deixando que passe pelo Emacs. Para destravar a tela, digite
C-q. Então, leia na seção "Spontaneous Entry to Incremental Search" no
manual do Emacs para uma dica de como lhe dar com esse "recurso".
manual do Emacs para uma dica de como lidar com esse "recurso".
Se você estiver no meio de uma pesquisa incremental e digitar <Delete>,
você perceberá que o último caractere da pesquisa será apagado e a

View file

@ -364,6 +364,7 @@ static void PHP_functions (FILE *);
static void PS_functions (FILE *);
static void Prolog_functions (FILE *);
static void Python_functions (FILE *);
static void Ruby_functions (FILE *);
static void Scheme_functions (FILE *);
static void TeX_commands (FILE *);
static void Texinfo_nodes (FILE *);
@ -722,6 +723,12 @@ static const char Python_help [] =
"In Python code, 'def' or 'class' at the beginning of a line\n\
generate a tag.";
static const char *Ruby_suffixes [] =
{ "rb", "ruby", NULL };
static const char Ruby_help [] =
"In Ruby code, 'def' or 'class' or 'module' at the beginning of\n\
a line generate a tag.";
/* Can't do the `SCM' or `scm' prefix with a version number. */
static const char *Scheme_suffixes [] =
{ "oak", "sch", "scheme", "SCM", "scm", "SM", "sm", "ss", "t", NULL };
@ -800,6 +807,7 @@ static language lang_names [] =
{ "proc", no_lang_help, plain_C_entries, plain_C_suffixes },
{ "prolog", Prolog_help, Prolog_functions, Prolog_suffixes },
{ "python", Python_help, Python_functions, Python_suffixes },
{ "ruby", Ruby_help, Ruby_functions, Ruby_suffixes },
{ "scheme", Scheme_help, Scheme_functions, Scheme_suffixes },
{ "tex", TeX_help, TeX_commands, TeX_suffixes },
{ "texinfo", Texinfo_help, Texinfo_nodes, Texinfo_suffixes },
@ -4532,6 +4540,35 @@ Python_functions (FILE *inf)
}
}
/*
* Ruby support
* Original code by Xi Lu <lx@shellcodes.org> (2015)
*/
static void
Ruby_functions (FILE *inf)
{
char *cp = NULL;
LOOP_ON_INPUT_LINES (inf, lb, cp)
{
cp = skip_spaces (cp);
if (LOOKING_AT (cp, "def")
|| LOOKING_AT (cp, "class")
|| LOOKING_AT (cp, "module"))
{
char *name = cp;
/* Ruby method names can end in a '='. Also, operator overloading can
define operators whose names include '='. */
while (!notinname (*cp) || *cp == '=')
cp++;
make_tag (name, cp - name, true,
lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
}
}
}
/*
* PHP support
@ -4948,13 +4985,29 @@ Lua_functions (FILE *inf)
LOOP_ON_INPUT_LINES (inf, lb, bp)
{
bp = skip_spaces (bp);
if (bp[0] != 'f' && bp[0] != 'l')
continue;
(void)LOOKING_AT (bp, "local"); /* skip possible "local" */
if (LOOKING_AT (bp, "function"))
get_tag (bp, NULL);
{
char *tag_name, *tp_dot, *tp_colon;
get_tag (bp, &tag_name);
/* If the tag ends with ".foo" or ":foo", make an additional tag for
"foo". */
tp_dot = strrchr (tag_name, '.');
tp_colon = strrchr (tag_name, ':');
if (tp_dot || tp_colon)
{
char *p = tp_dot > tp_colon ? tp_dot : tp_colon;
int len_add = p - tag_name + 1;
get_tag (bp + len_add, NULL);
}
}
}
}

View file

@ -42,10 +42,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#endif
#include <pop.h>
#ifdef sun
#include <malloc.h>
#endif /* sun */
#ifdef HESIOD
#include <hesiod.h>
/*

View file

@ -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=close --avoid=dup --avoid=fchdir --avoid=flexmember --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings
# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=flexmember --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings
MOSTLYCLEANFILES += core *.stackdump

View file

@ -272,9 +272,10 @@
Example usage, assuming A and B are long int:
long int result = INT_MULTIPLY_WRAPV (a, b);
printf ("result is %ld (%s)\n", result,
INT_MULTIPLY_OVERFLOW (a, b) ? "after overflow" : "no overflow");
if (INT_MULTIPLY_OVERFLOW (a, b))
printf ("result would overflow\n");
else
printf ("result is %ld (no overflow)\n", a * b);
Example usage with WRAPV flavor:

View file

@ -823,7 +823,7 @@ Returns list of symbols and documentation found."
(lambda (symbol)
(setq f (apropos-safe-documentation symbol)
v (get symbol 'variable-documentation))
(if (integerp v) (setq v))
(if (integerp v) (setq v nil))
(setq f (apropos-documentation-internal f)
v (apropos-documentation-internal v))
(setq sf (apropos-score-doc f)

View file

@ -2,7 +2,7 @@
;; Copyright (C) 1997-1999, 2001-2015 Free Software Foundation, Inc.
;; Author: Anders Lindgren <andersl@andersl.com>
;; Author: Anders Lindgren
;; Keywords: convenience
;; Created: 1997-06-01
;; Date: 1999-11-30

View file

@ -32,6 +32,7 @@
;;; Code:
(require 'calendar)
(require 'diary-lib)
(defgroup calendar-html nil
@ -358,12 +359,12 @@ of holidays, rather than diary entries."
;; Monthly calendar
;;------------------------------------------------------------
(autoload 'diary-list-entries "diary-lib")
(defun cal-html-list-diary-entries (d1 d2)
"Generate a list of all diary-entries from absolute date D1 to D2."
(diary-list-entries (calendar-gregorian-from-absolute d1)
(1+ (- d2 d1)) t))
(if (with-demoted-errors "Not adding diary entries: %S"
(diary-check-diary-file))
(diary-list-entries (calendar-gregorian-from-absolute d1)
(1+ (- d2 d1)) t)))
(defun cal-html-insert-agenda-days (month year diary-list holiday-list)
"Insert HTML commands for a range of days in monthly calendars.

View file

@ -881,11 +881,11 @@ is a list of expressions that can involve the keywords `month', `day',
and `year' (all numbers in string form), and `monthname' and `dayname'
\(both alphabetic strings). For example, a typical American form would be
'(month \"/\" day \"/\" (substring year -2))
(month \"/\" day \"/\" (substring year -2))
whereas
'((format \"%9s, %9s %2s, %4s\" dayname monthname day year))
((format \"%9s, %9s %2s, %4s\" dayname monthname day year))
would give the usual American style in fixed-length fields. The variables
`calendar-iso-date-display-form', `calendar-european-date-display-form', and
@ -1184,8 +1184,8 @@ A negative year is interpreted as BC; -1 being 1 BC, and so on."
(defsubst calendar-day-number (date)
"Return the day number within the year of the date DATE.
For example, (calendar-day-number '(1 1 1987)) returns the value 1,
while (calendar-day-number '(12 31 1980)) returns 366."
For example, (calendar-day-number \\='(1 1 1987)) returns the value 1,
while (calendar-day-number \\='(12 31 1980)) returns 366."
(let* ((month (calendar-extract-month date))
(day (calendar-extract-day date))
(year (calendar-extract-year date))

View file

@ -909,13 +909,15 @@ This is recursive; that is, included files may include other files."
(append diary-entries-list
(diary-list-entries original-date number t)))))
(display-warning
:error
'diary
(format-message "Can't read included diary file %s\n"
diary-file)))
diary-file)
:error))
(display-warning
:error
'diary
(format-message "Can't find included diary file %s\n"
diary-file)))))
diary-file)
:error))))
(goto-char (point-min)))
(defun diary-include-other-diary-files ()
@ -1190,7 +1192,7 @@ ensure that all relevant variables are set.
\(setq diary-mail-days 3
diary-file \"/path/to/diary.file\"
calendar-date-style 'european
calendar-date-style \\='european
diary-mail-addr \"user@host.name\")
\(diary-mail-entries)
@ -1410,11 +1412,12 @@ marks. This is intended to deal with deleted diary entries."
(eval (car (read-from-string sexp)))
(error
(display-warning
:error
'diary
(format "Bad diary sexp at line %d in %s:\n%s\n\
Error: %s\n"
(count-lines (point-min) (point))
diary-file sexp err))
diary-file sexp err)
:error)
nil))))))
(cond ((stringp result) result)
((and (consp result)

View file

@ -346,9 +346,10 @@ The holidays are those in the list `calendar-holidays'."
(eval p)
(error
(display-warning
:error
'holidays
(format "Bad holiday list item: %s\nError: %s\n"
p err))
p err)
:error)
nil))))
(setq res (append h res))))
'calendar-date-compare)))

View file

@ -321,18 +321,29 @@ other sexp entries are enumerated in any case."
"Return a new buffer containing the unfolded contents of a buffer.
Folding is the iCalendar way of wrapping long lines. In the
created buffer all occurrences of CR LF BLANK are replaced by the
empty string. Argument FOLDED-ICAL-BUFFER is the unfolded input
empty string. Argument FOLDED-ICAL-BUFFER is the folded input
buffer."
(let ((unfolded-buffer (get-buffer-create " *icalendar-work*")))
(save-current-buffer
(set-buffer unfolded-buffer)
(erase-buffer)
(insert-buffer-substring folded-ical-buffer)
(icalendar--clean-up-line-endings)
(goto-char (point-min))
(while (re-search-forward "\r?\n[ \t]" nil t)
(replace-match "" nil nil)))
unfolded-buffer))
(defun icalendar--clean-up-line-endings ()
"Replace DOS- and MAC-like line endings with unix line endings.
All occurrences of (CR LF) and (LF CF) are replaced with LF in
the current buffer. This is necessary in buffers which contain a
mix of different line endings."
(save-excursion
(goto-char (point-min))
(while (re-search-forward "\r\n\\|\n\r" nil t)
(replace-match "\n" nil nil))))
(defsubst icalendar--rris (regexp rep string &optional fixedcase literal)
"Replace regular expression in string.
Pass arguments REGEXP REP STRING FIXEDCASE LITERAL to
@ -1296,8 +1307,8 @@ Returns an alist."
"Return a VALARM block.
Argument ADVANCE-TIME is a number giving the time when the alarm
fires (minutes before the respective event). Argument ALARM-SPEC
is a list which must be one of '(audio), '(display) or
'(email (ADDRESS1 ...)), see `icalendar-export-alarms'. Argument
is a list which must be one of (audio), (display) or
(email (ADDRESS1 ...)), see `icalendar-export-alarms'. Argument
SUMMARY is a string which contains a short description for the
alarm."
(let* ((action (car alarm-spec))

View file

@ -104,7 +104,8 @@ SCOPE is the scope of the search, such as 'project or 'subdirs."
(defun cedet-gnu-global-expand-filename (filename)
"Expand the FILENAME with GNU Global.
Return a fully qualified filename."
Return a list of absolute filenames or nil if none found.
Signal an error if Gnu global not available."
(interactive "sFile: ")
(let ((ans (with-current-buffer (cedet-gnu-global-call (list "-Pa" filename))
(goto-char (point-min))

View file

@ -81,12 +81,12 @@
"Whether a new source file should be automatically added to a target.
Whenever a new file is encountered in a directory controlled by a
project file, all targets are queried to see if it should be added.
If the value is 'always, then the new file is added to the first
target encountered. If the value is 'multi-ask, then if more than one
If the value is `always', then the new file is added to the first
target encountered. If the value is `multi-ask', then if more than one
target wants the file, the user is asked. If only one target wants
the file, then it is automatically added to that target. If the
value is 'ask, then the user is always asked, unless there is no
target willing to take the file. 'never means never perform the check."
value is `ask', then the user is always asked, unless there is no
target willing to take the file. `never' means never perform the check."
:group 'ede
:type '(choice (const always)
(const multi-ask)

View file

@ -304,7 +304,7 @@ Do this whenever a new project is created, as opposed to loaded."
;; instead so that -P can be obsoleted.
(defun ede-directory-project-p (dir &optional force)
"Return a project description object if DIR is in a project.
Optional argument FORCE means to ignore a hash-hit of 'nomatch.
Optional argument FORCE means to ignore a hash-hit of `nomatch'.
This depends on an up to date `ede-project-class-files' variable.
Any directory that contains the file .ede-ignore will always
return nil.

View file

@ -100,9 +100,9 @@ based on `ede-locate-setup-options'."
(defclass ede-locate-base ()
((root :initarg :root
:documentation
"The root of these locat searches.")
"The root of these locate searches.")
(file :documentation
"The last file search for with EDE locate.")
"The last file searched for with EDE locate.")
(lastanswer :documentation
"The last answer provided by the locator.")
(hash :documentation
@ -245,10 +245,8 @@ variable `cedet-global-command'.")
newroot))
(cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-global)
filesubstring)
"Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT.
Searches are done under the current root of the EDE project
that created this EDE locate object."
filesubstring)
"Locate occurrences of FILESUBSTRING in LOC, using Gnu Global."
(require 'cedet-global)
(let ((default-directory (oref loc root)))
(cedet-gnu-global-expand-filename filesubstring)))

View file

@ -627,7 +627,8 @@ SYMBOL is a function that can be overridden."
(beginning-of-line)
(forward-line -1))
(let ((inhibit-read-only t))
(insert (overload-docstring-extension symbol) "\n")
(insert (substitute-command-keys (overload-docstring-extension symbol))
"\n")
;; NOTE TO SELF:
;; LIST ALL LOADED OVERRIDES FOR SYMBOL HERE
)))
@ -641,7 +642,8 @@ SYMBOL is a function that can be overridden."
(fetch-overload symbol)))
modes)
(insert (overload-docstring-extension symbol) "\n\n")
(insert (substitute-command-keys (overload-docstring-extension symbol))
"\n\n")
(insert (format-message "default function: `%s'\n" default))
(if override
(insert (format-message "\noverride in buffer `%s': `%s'\n"
@ -872,24 +874,6 @@ invoked interactively."
(when (setq mode (intern-soft mode))
(mode-local-describe-bindings-1 mode (called-interactively-p 'any))))
;; ;;; find-func support (Emacs 21.4, or perhaps 22.1)
;; ;;
;; (condition-case nil
;; ;; Try to get find-func so we can modify it.
;; (require 'find-func)
;; (error nil))
;; (when (boundp 'find-function-regexp)
;; (unless (string-match "ine-overload" find-function-regexp)
;; (if (string-match "(def\\\\(" find-function-regexp)
;; (let ((end (match-end 0))
;; )
;; (setq find-function-regexp
;; (concat (substring find-function-regexp 0 end)
;; "ine-overload\\|ine-mode-local-override\\|"
;; "ine-child-mode\\|"
;; (substring find-function-regexp end)))))))
;;; edebug support
;;
(defun mode-local-setup-edebug-specs ()

View file

@ -1191,7 +1191,7 @@ This function can be used by `completion-at-point-functions'."
(defun semantic-analyze-notc-completion-at-point-function ()
"Return possible analysis completions at point.
The completions provided are via `semantic-analyze-possible-completions',
but with the 'no-tc option passed in, which means constraints based
but with the `no-tc' option passed in, which means constraints based
on what is being assigned to are ignored.
This function can be used by `completion-at-point-functions'."
(when (semantic-active-p)
@ -1207,7 +1207,7 @@ This function can be used by `completion-at-point-functions'."
(defun semantic-analyze-nolongprefix-completion-at-point-function ()
"Return possible analysis completions at point.
The completions provided are via `semantic-analyze-possible-completions',
but with the 'no-tc and 'no-longprefix option passed in, which means
but with the `no-tc' and `no-longprefix' option passed in, which means
constraints resulting in a long multi-symbol dereference are ignored.
This function can be used by `completion-at-point-functions'."
(when (semantic-active-p)

View file

@ -1513,7 +1513,7 @@ Override function for `semantic-tag-protection'."
(define-mode-local-override semantic-find-tags-included c-mode
(&optional table)
"Find all tags in TABLE that are of the 'include class.
"Find all tags in TABLE that are of the `include' class.
TABLE is a tag table. See `semantic-something-to-tag-table'.
For C++, we also have to search namespaces for include tags."
(let ((tags (semantic-find-tags-by-class 'include table))
@ -1948,7 +1948,7 @@ For types with a :parent, create faux namespaces to put TAG into."
(define-mode-local-override semanticdb-find-table-for-include c-mode
(includetag &optional table)
"For a single INCLUDETAG found in TABLE, find a `semanticdb-table' object
INCLUDETAG is a semantic TAG of class 'include.
INCLUDETAG is a semantic TAG of class `include'.
TABLE is a semanticdb table that identifies where INCLUDETAG came from.
TABLE is optional if INCLUDETAG has an overlay of :filename attribute.

View file

@ -316,7 +316,7 @@ Default action as described in `semanticdb-find-translate-path'."
;;;###autoload
(define-overloadable-function semanticdb-find-table-for-include (includetag &optional table)
"For a single INCLUDETAG found in TABLE, find a `semanticdb-table' object
INCLUDETAG is a semantic TAG of class 'include.
INCLUDETAG is a semantic TAG of class `include'.
TABLE is a semanticdb table that identifies where INCLUDETAG came from.
TABLE is optional if INCLUDETAG has an overlay of :filename attribute."
)
@ -854,7 +854,7 @@ This makes it appear more like the results of a `semantic-find-' call.
Optional FIND-FILE-MATCH loads all files associated with RESULTS
into buffers. This has the side effect of enabling `semantic-tag-buffer' to
return a value.
If FIND-FILE-MATCH is 'name, then only the filename is stored
If FIND-FILE-MATCH is `name', then only the filename is stored
in each tag instead of loading each file into a buffer.
If the input RESULTS are not going to be used again, and if
FIND-FILE-MATCH is nil, you can use `semanticdb-fast-strip-find-results'

View file

@ -41,7 +41,7 @@ some documentation in a comment preceding TAG's definition which we
can look for. When appropriate, this can be overridden by a language specific
enhancement.
Optional argument NOSNARF means to only return the lexical analyzer token for it.
If nosnarf if 'lex, then only return the lex token."
If NOSNARF is `lex', then only return the lex token."
(if (not tag) (setq tag (semantic-current-tag)))
(save-excursion
(when (semantic-tag-with-position-p tag)
@ -66,7 +66,7 @@ If nosnarf if 'lex, then only return the lex token."
If TAG is nil. use the tag under point.
Searches the space between TAG and the preceding tag for a comment,
and converts the comment into clean documentation.
Optional argument NOSNARF with a value of 'lex means to return
Optional argument NOSNARF with a value of `lex' means to return
just the lexical token and not the string."
(if (not tag) (setq tag (semantic-current-tag)))
(save-excursion
@ -92,7 +92,7 @@ just the lexical token and not the string."
"Snarf up the comment at POINT for `semantic-documentation-for-tag'.
Attempt to strip out comment syntactic sugar.
Argument NOSNARF means don't modify the found text.
If NOSNARF is 'lex, then return the lex token."
If NOSNARF is `lex', then return the lex token."
(let* ((semantic-ignore-comments nil)
(semantic-lex-analyzer #'semantic-comment-lexer))
(if (memq nosnarf '(lex flex)) ;; keep `flex' for compatibility

View file

@ -378,11 +378,11 @@ See `semantic-tag-protected-p' for details on which tags are returned."
;;;###autoload
(define-overloadable-function semantic-find-tags-included (&optional table)
"Find all tags in TABLE that are of the 'include class.
"Find all tags in TABLE that are of the `include' class.
TABLE is a tag table. See `semantic-something-to-tag-table'.")
(defun semantic-find-tags-included-default (&optional table)
"Find all tags in TABLE that are of the 'include class.
"Find all tags in TABLE that are of the `include' class.
TABLE is a tag table. See `semantic-something-to-tag-table'.
By default, just call `semantic-find-tags-by-class'."
(semantic-find-tags-by-class 'include table))

View file

@ -171,7 +171,7 @@ That is remove the unsupported :help stuff."
NAME specifies a special name that can be searched for later to
recover the cached data with `semantic-get-cache-data'.
LIFESPAN indicates how long the data cache will be remembered.
The default LIFESPAN is 'end-of-command.
The default LIFESPAN is `end-of-command'.
Possible Lifespans are:
`end-of-command' - Remove the cache at the end of the currently
executing command.
@ -193,7 +193,7 @@ Possible Lifespans are:
))
(defun semantic-cache-data-post-command-hook ()
"Flush `semantic-cache-data-overlays' based 'lifespan property.
"Flush `semantic-cache-data-overlays' based `lifespan' property.
Remove self from `post-command-hook' if it is empty."
(let ((newcache nil)
(oldcache semantic-cache-data-overlays))

View file

@ -1815,13 +1815,13 @@ to keep comments as part of the token stream.")
(make-variable-buffer-local 'semantic-ignore-comments)
(defvar semantic-flex-enable-newlines nil
"When flexing, report 'newlines as syntactic elements.
"When flexing, report newlines as syntactic elements.
Useful for languages where the newline is a special case terminator.
Only set this on a per mode basis, not globally.")
(make-variable-buffer-local 'semantic-flex-enable-newlines)
(defvar semantic-flex-enable-whitespace nil
"When flexing, report 'whitespace as syntactic elements.
"When flexing, report whitespace as syntactic elements.
Useful for languages where the syntax is whitespace dependent.
Only set this on a per mode basis, not globally.")
(make-variable-buffer-local 'semantic-flex-enable-whitespace)

View file

@ -453,7 +453,7 @@ has some sort of label defining a parent. The parent return will
be a string.
The default behavior, if not overridden with
`tag-member-parent' gets the 'parent extra
`tag-member-parent' gets the `parent' extra
specifier of TAG.
If this function is overridden, use

View file

@ -101,7 +101,7 @@ If no tools are supported, then 'grep is assumed.")
(defun semantic-symref-calculate-rootdir ()
"Calculate the root directory for a symref search.
Start with and EDE project, or use the default directory."
Start with an EDE project, or use the default directory."
(let* ((rootproj (when (and (featurep 'ede) ede-minor-mode)
(ede-toplevel)))
(rootdirbase (if rootproj
@ -162,7 +162,7 @@ ARGS are the initialization arguments to pass to the created class."
;;;###autoload
(defun semantic-symref-find-references-by-name (name &optional scope tool-return)
"Find a list of references to NAME in the current project.
Optional SCOPE specifies which file set to search. Defaults to 'project.
Optional SCOPE specifies which file set to search. Defaults to `project'.
Refers to `semantic-symref-tool', to determine the reference tool to use
for the current buffer.
Returns an object of class `semantic-symref-result'.
@ -186,7 +186,7 @@ to perform the search. This was added for use by a test harness."
;;;###autoload
(defun semantic-symref-find-tags-by-name (name &optional scope)
"Find a list of tags by NAME in the current project.
Optional SCOPE specifies which file set to search. Defaults to 'project.
Optional SCOPE specifies which file set to search. Defaults to `project'.
Refers to `semantic-symref-tool', to determine the reference tool to use
for the current buffer.
Returns an object of class `semantic-symref-result'."
@ -206,7 +206,7 @@ Returns an object of class `semantic-symref-result'."
;;;###autoload
(defun semantic-symref-find-tags-by-regexp (name &optional scope)
"Find a list of references to NAME in the current project.
Optional SCOPE specifies which file set to search. Defaults to 'project.
Optional SCOPE specifies which file set to search. Defaults to `project'.
Refers to `semantic-symref-tool', to determine the reference tool to use
for the current buffer.
Returns an object of class `semantic-symref-result'."
@ -226,7 +226,7 @@ Returns an object of class `semantic-symref-result'."
;;;###autoload
(defun semantic-symref-find-tags-by-completion (name &optional scope)
"Find a list of references to NAME in the current project.
Optional SCOPE specifies which file set to search. Defaults to 'project.
Optional SCOPE specifies which file set to search. Defaults to `project'.
Refers to `semantic-symref-tool', to determine the reference tool to use
for the current buffer.
Returns an object of class `semantic-symref-result'."
@ -246,7 +246,7 @@ Returns an object of class `semantic-symref-result'."
;;;###autoload
(defun semantic-symref-find-file-references-by-name (name &optional scope)
"Find a list of references to NAME in the current project.
Optional SCOPE specifies which file set to search. Defaults to 'project.
Optional SCOPE specifies which file set to search. Defaults to `project'.
Refers to `semantic-symref-tool', to determine the reference tool to use
for the current buffer.
Returns an object of class `semantic-symref-result'."
@ -267,7 +267,7 @@ Returns an object of class `semantic-symref-result'."
(defun semantic-symref-find-text (text &optional scope)
"Find a list of occurrences of TEXT in the current project.
TEXT is a regexp formatted for use with egrep.
Optional SCOPE specifies which file set to search. Defaults to 'project.
Optional SCOPE specifies which file set to search. Defaults to `project'.
Refers to `semantic-symref-tool', to determine the reference tool to use
for the current buffer.
Returns an object of class `semantic-symref-result'."

View file

@ -375,7 +375,7 @@ Optional argument IGNORABLE-ATTRIBUTES is passed down to
(defun semantic-tag-of-type-p (tag type)
"Compare TAG's type against TYPE. Non nil if equivalent.
TYPE can be a string, or a tag of class 'type.
TYPE can be a string, or a tag of class `type'.
This can be complex since some tags might have a :type that is a tag,
while other tags might just have a string. This function will also be
return true of TAG's type is compared directly to the declaration of a
@ -462,12 +462,12 @@ pairs eliminated:
"Create a generic semantic tag.
NAME is a string representing the name of this tag.
CLASS is the symbol that represents the class of tag this is,
such as 'variable, or 'function.
such as `variable', or `function'.
ATTRIBUTES is a list of additional attributes belonging to this tag."
(list name class (semantic-tag-make-plist attributes) nil nil))
(defsubst semantic-tag-new-variable (name type &optional default-value &rest attributes)
"Create a semantic tag of class 'variable.
"Create a semantic tag of class `variable'.
NAME is the name of this variable.
TYPE is a string or semantic tag representing the type of this variable.
Optional DEFAULT-VALUE is a string representing the default value of this
@ -479,7 +479,7 @@ tag."
attributes))
(defsubst semantic-tag-new-function (name type arg-list &rest attributes)
"Create a semantic tag of class 'function.
"Create a semantic tag of class `function'.
NAME is the name of this function.
TYPE is a string or semantic tag representing the type of this function.
ARG-LIST is a list of strings or semantic tags representing the
@ -491,7 +491,7 @@ ATTRIBUTES is a list of additional attributes belonging to this tag."
attributes))
(defsubst semantic-tag-new-type (name type members parents &rest attributes)
"Create a semantic tag of class 'type.
"Create a semantic tag of class `type'.
NAME is the name of this type.
TYPE is a string or semantic tag representing the type of this type.
MEMBERS is a list of strings or semantic tags representing the
@ -516,7 +516,7 @@ ATTRIBUTES is a list of additional attributes belonging to this tag."
attributes))
(defsubst semantic-tag-new-include (name system-flag &rest attributes)
"Create a semantic tag of class 'include.
"Create a semantic tag of class `include'.
NAME is the name of this include.
SYSTEM-FLAG represents that we were able to identify this include as belonging
to the system, as opposed to belonging to the local project.
@ -526,7 +526,7 @@ ATTRIBUTES is a list of additional attributes belonging to this tag."
attributes))
(defsubst semantic-tag-new-package (name detail &rest attributes)
"Create a semantic tag of class 'package.
"Create a semantic tag of class `package'.
NAME is the name of this package.
DETAIL is extra information about this package, such as a location where
it can be found.
@ -536,7 +536,7 @@ ATTRIBUTES is a list of additional attributes belonging to this tag."
attributes))
(defsubst semantic-tag-new-code (name detail &rest attributes)
"Create a semantic tag of class 'code.
"Create a semantic tag of class `code'.
NAME is a name for this code.
DETAIL is extra information about the code.
ATTRIBUTES is a list of additional attributes belonging to this tag."
@ -823,7 +823,7 @@ in SUPERS."
(defun semantic-tag-type-superclass-protection (tag parentstring)
"Return the inheritance protection in TAG from PARENTSTRING.
PARENTSTRING is the name of the parent being inherited.
The return protection is a symbol, 'public, 'protection, and 'private."
The return protection is a symbol, `public', `protection', and `private'."
(let ((supers (semantic-tag-get-attribute tag :superclasses)))
(cond ((stringp supers)
'public)
@ -946,7 +946,7 @@ ATTRIBUTES is a list of additional attributes belonging to this tag."
The returned value is a tag of the class that
`semantic-tag-alias-class' returns for TAG.
The default is to return the value of the :definition attribute.
Return nil if TAG is not of class 'alias."
Return nil if TAG is not of class `alias'."
(when (semantic-tag-of-class-p tag 'alias)
(:override
(semantic-tag-get-attribute tag :definition))))
@ -958,8 +958,8 @@ Return nil if TAG is not of class 'alias."
"Return a list of components for TAG.
A Component is a part of TAG which itself may be a TAG.
Examples include the elements of a structure in a
tag of class 'type, or the list of arguments to a
tag of class 'function."
tag of class `type', or the list of arguments to a
tag of class `function'."
)
(defun semantic-tag-components-default (tag)

View file

@ -22,65 +22,79 @@
;;; Code:
(eval-and-compile (put 'character-fold-table 'char-table-extra-slots 1))
(defconst character-fold-table
(eval-when-compile
(let* ((equiv (make-char-table 'character-fold-table))
(table (unicode-property-table-internal 'decomposition))
(func (char-table-extra-slot table 1)))
(let ((equiv (make-char-table 'character-fold-table))
(equiv-multi (make-char-table 'character-fold-table))
(table (unicode-property-table-internal 'decomposition)))
(set-char-table-extra-slot equiv 0 equiv-multi)
;; Ensure the table is populated.
(map-char-table
(lambda (i v) (when (consp i) (funcall func (car i) v table)))
table)
(let ((func (char-table-extra-slot table 1)))
(map-char-table (lambda (char v)
(when (consp char)
(funcall func (car char) v table)))
table))
;; Compile a list of all complex characters that each simple
;; character should match.
;; In summary this loop does 3 things:
;; - A complex character might be allowed to match its decomp.
;; - The decomp is allowed to match the complex character.
;; - A single char of the decomp might be allowed to match the
;; character.
;; Some examples in the comments below.
(map-char-table
(lambda (i dec)
(when (consp dec)
;; Discard a possible formatting tag.
(when (symbolp (car dec))
(setq dec (cdr dec)))
(lambda (char decomp)
(when (consp decomp)
;; Skip trivial cases like ?a decomposing to (?a).
(unless (or (and (eq i (car dec))
(not (cdr dec))))
(let ((d dec)
(fold-decomp t)
k found)
(while (and d (not found))
(setq k (pop d))
;; Is k a number or letter, per unicode standard?
(setq found (memq (get-char-code-property k 'general-category)
'(Lu Ll Lt Lm Lo Nd Nl No))))
(if found
;; Check if the decomposition has more than one letter,
;; because then we don't want the first letter to match
;; the decomposition.
(dolist (k d)
(when (and fold-decomp
(memq (get-char-code-property k 'general-category)
'(Lu Ll Lt Lm Lo Nd Nl No)))
(setq fold-decomp nil)))
;; If there's no number or letter on the
;; decomposition, take the first character in it.
(setq found (car-safe dec)))
;; Finally, we only fold multi-char decomposition if at
;; least one of the chars is non-spacing (combining).
(when fold-decomp
(setq fold-decomp nil)
(dolist (k dec)
(when (and (not fold-decomp)
(> (get-char-code-property k 'canonical-combining-class) 0))
(setq fold-decomp t))))
;; Add i to the list of characters that k can
;; represent. Also possibly add its decomposition, so we can
;; match multi-char representations like (format "a%c" 769)
(when (and found (not (eq i k)))
(let ((chars (cons (char-to-string i) (aref equiv k))))
(aset equiv k
(if fold-decomp
(cons (apply #'string dec) chars)
chars))))))))
(unless (and (not (cdr decomp))
(eq char (car decomp)))
(if (symbolp (car decomp))
;; Discard a possible formatting tag.
(setq decomp (cdr decomp))
;; If there's no formatting tag, ensure that char matches
;; its decomp exactly. This is because we want 'ä' to
;; match 'ä', but we don't want '¹' to match '1'.
(aset equiv char
(cons (apply #'string decomp)
(aref equiv char))))
;; Allow the entire decomp to match char. If decomp has
;; multiple characters, this is done by adding an entry
;; to the alist of the first character in decomp. This
;; allows 'ff' to match 'ff', 'ä' to match 'ä', and '1' to
;; match '¹'.
(let ((make-decomp-match-char
(lambda (decomp char)
(if (cdr decomp)
(aset equiv-multi (car decomp)
(cons (cons (apply #'string (cdr decomp))
(regexp-quote (string char)))
(aref equiv-multi (car decomp))))
(aset equiv (car decomp)
(cons (char-to-string char)
(aref equiv (car decomp))))))))
(funcall make-decomp-match-char decomp char)
;; Do it again, without the non-spacing characters.
;; This allows 'a' to match 'ä'.
(let ((simpler-decomp nil)
(found-one nil))
(dolist (c decomp)
(if (> (get-char-code-property c 'canonical-combining-class) 0)
(setq found-one t)
(push c simpler-decomp)))
(when (and simpler-decomp found-one)
(funcall make-decomp-match-char simpler-decomp char)
;; Finally, if the decomp only had one spacing
;; character, we allow this character to match the
;; decomp. This is to let 'a' match 'ä'.
(unless (cdr simpler-decomp)
(aset equiv (car simpler-decomp)
(cons (apply #'string decomp)
(aref equiv (car simpler-decomp)))))))))))
table)
;; Add some manual entries.
@ -93,13 +107,34 @@
;; Convert the lists of characters we compiled into regexps.
(map-char-table
(lambda (i v) (let ((re (regexp-opt (cons (char-to-string i) v))))
(if (consp i)
(set-char-table-range equiv i re)
(aset equiv i re))))
(lambda (char dec-list)
(let ((re (regexp-opt (cons (char-to-string char) dec-list))))
(if (consp char)
(set-char-table-range equiv char re)
(aset equiv char re))))
equiv)
equiv))
"Used for folding characters of the same group during search.")
"Used for folding characters of the same group during search.
This is a char-table with the `character-fold-table' subtype.
Let us refer to the character in question by char-x.
Each entry is either nil (meaning char-x only matches literally)
or a regexp. This regexp should match anything that char-x can
match by itself \(including char-x). For instance, the default
regexp for the ?+ character is \"[+]\".
This table also has one extra slot which is also a char-table.
Each entry in the extra slot is an alist used for multi-character
matching (which may be nil). The elements of the alist should
have the form (SUFFIX . OTHER-REGEXP). If the characters after
char-x are equal to SUFFIX, then this combination of char-x +
SUFFIX is allowed to match OTHER-REGEXP. This is in addition to
char-x being allowed to match REGEXP.
For instance, the default alist for ?f includes:
\((\"fl\" . \"ffl\") (\"fi\" . \"ffi\")
(\"i\" . \"fi\") (\"f\" . \"ff\"))
Exceptionally for the space character (32), ALIST is ignored.")
(defun character-fold--make-space-string (n)
"Return a string that matches N spaces."
@ -109,35 +144,80 @@
(make-list n (or (aref character-fold-table ?\s) " ")))))
;;;###autoload
(defun character-fold-to-regexp (string &optional _lax)
(defun character-fold-to-regexp (string &optional _lax from)
"Return a regexp matching anything that character-folds into STRING.
Any character in STRING that has an entry in
`character-fold-table' is replaced with that entry (which is a
regexp) and other characters are `regexp-quote'd."
regexp) and other characters are `regexp-quote'd.
If the resulting regexp would be too long for Emacs to handle,
just return the result of calling `regexp-quote' on STRING.
FROM is for internal use. It specifies an index in the STRING
from which to start."
(let* ((spaces 0)
(chars (mapcar #'identity string))
(out chars))
;; When the user types a space, we want to match the table entry,
;; but we also want the ?\s to be visible to `search-spaces-regexp'.
;; See commit message for a longer description.
(while chars
(let ((c (car chars)))
(setcar chars
(cond
((eq c ?\s)
(setq spaces (1+ spaces))
nil)
((> spaces 0)
(prog1 (concat (character-fold--make-space-string spaces)
(or (aref character-fold-table c)
(regexp-quote (string c))))
(setq spaces 0)))
(t (or (aref character-fold-table c)
(regexp-quote (string c))))))
(setq chars (cdr chars))))
(concat (apply #'concat out)
(when (> spaces 0)
(character-fold--make-space-string spaces)))))
(multi-char-table (char-table-extra-slot character-fold-table 0))
(i (or from 0))
(end (length string))
(out nil))
;; When the user types a space, we want to match the table entry
;; for ?\s, which is generally a regexp like "[ ...]". However,
;; the `search-spaces-regexp' variable doesn't "see" spaces inside
;; these regexp constructs, so we need to use "\\( \\|[ ...]\\)"
;; instead (to manually expose a space). Furthermore, the lax
;; search engine acts on a bunch of spaces, not on individual
;; spaces, so if the string contains sequential spaces like " ", we
;; need to keep them grouped together like this: "\\( \\|[ ...][ ...]\\)".
(while (< i end)
(pcase (aref string i)
(`?\s (setq spaces (1+ spaces)))
(c (when (> spaces 0)
(push (character-fold--make-space-string spaces) out)
(setq spaces 0))
(let ((regexp (or (aref character-fold-table c)
(regexp-quote (string c))))
;; Long string. The regexp would probably be too long.
(alist (unless (> end 50)
(aref multi-char-table c))))
(push (let ((matched-entries nil)
(max-length 0))
(dolist (entry alist)
(let* ((suffix (car entry))
(len-suf (length suffix)))
(when (eq (compare-strings suffix 0 nil
string (1+ i) (+ i 1 len-suf)
nil)
t)
(push (cons len-suf (cdr entry)) matched-entries)
(setq max-length (max max-length len-suf)))))
;; If no suffixes matched, just go on.
(if (not matched-entries)
regexp
;;; If N suffixes match, we "branch" out into N+1 executions for the
;;; length of the longest match. This means "fix" will match "fix" but
;;; not "fⅸ", but it's necessary to keep the regexp size from scaling
;;; exponentially. See https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02562.html
(let ((subs (substring string (1+ i) (+ i 1 max-length))))
;; `i' is still going to inc by 1 below.
(setq i (+ i max-length))
(concat
"\\(?:"
(mapconcat (lambda (entry)
(let ((length (car entry))
(suffix-regexp (cdr entry)))
(concat suffix-regexp
(character-fold-to-regexp subs nil length))))
`((0 . ,regexp) . ,matched-entries) "\\|")
"\\)"))))
out))))
(setq i (1+ i)))
(when (> spaces 0)
(push (character-fold--make-space-string spaces) out))
(let ((regexp (apply #'concat (nreverse out))))
;; Limited by `MAX_BUF_SIZE' in `regex.c'.
(if (> (length regexp) 5000)
(regexp-quote string)
regexp))))
;;; Commands provided for completeness.

View file

@ -519,8 +519,8 @@ code like
(defun foo-restore-desktop-buffer
...
(add-to-list 'desktop-buffer-mode-handlers
'(foo-mode . foo-restore-desktop-buffer))
(add-to-list \\='desktop-buffer-mode-handlers
\\='(foo-mode . foo-restore-desktop-buffer))
The major mode function must either be autoloaded, or of the form
\"foobar-mode\" and defined in library \"foobar\", so that desktop
@ -586,8 +586,8 @@ code like
(defun foo-desktop-restore
...
(add-to-list 'desktop-minor-mode-handlers
'(foo-mode . foo-desktop-restore))
(add-to-list \\='desktop-minor-mode-handlers
\\='(foo-mode . foo-desktop-restore))
The minor mode function must either be autoloaded, or of the form
\"foobar-mode\" and defined in library \"foobar\", so that desktop

View file

@ -420,7 +420,7 @@ CREATE-HOOK is a hook to run after creating a frame."
(defun dframe-reposition-frame (new-frame parent-frame location)
"Move NEW-FRAME to be relative to PARENT-FRAME.
LOCATION can be one of 'random, 'left, 'right, 'left-right, or 'top-bottom."
LOCATION can be one of `random', `left', `right', `left-right', or `top-bottom'."
(if (featurep 'xemacs)
(dframe-reposition-frame-xemacs new-frame parent-frame location)
(dframe-reposition-frame-emacs new-frame parent-frame location)))
@ -431,7 +431,7 @@ LOCATION can be one of 'random, 'left, 'right, 'left-right, or 'top-bottom."
(defun dframe-reposition-frame-emacs (new-frame parent-frame location)
"Move NEW-FRAME to be relative to PARENT-FRAME.
LOCATION can be one of 'random, 'left-right, 'top-bottom, or
LOCATION can be one of `random', `left-right', `top-bottom', or
a cons cell indicating a position of the form (LEFT . TOP)."
;; Position dframe.
;; Do no positioning if not on a windowing system,
@ -514,7 +514,7 @@ a cons cell indicating a position of the form (LEFT . TOP)."
(defun dframe-reposition-frame-xemacs (_new-frame _parent-frame _location)
"Move NEW-FRAME to be relative to PARENT-FRAME.
LOCATION can be one of 'random, 'left-right, or 'top-bottom."
LOCATION can be one of `random', `left-right', or `top-bottom'."
;; Not yet implemented
)

View file

@ -1629,7 +1629,7 @@ COMPILE argument of `ad-activate' was supplied as nil."
Only proper subtrees are considered, for example, if TREE is (1 (2 (3)) 4)
then the subtrees will be 1 (2 (3)) 2 (3) 3 4, dotted structures are
allowed too. Once a qualifying subtree has been found its subtrees will
not be considered anymore. (ad-substitute-tree 'atom 'identity tree)
not be considered anymore. (ad-substitute-tree \\='atom \\='identity tree)
generates a copy of TREE."
(cond ((consp tReE)
(cons (if (funcall sUbTrEe-TeSt (car tReE))
@ -2419,7 +2419,7 @@ as if they had been supplied to a function with TARGET-ARGLIST directly.
Excess source arguments will be neglected, missing source arguments will be
supplied as nil. Returns a `funcall' or `apply' form with the second element
being `function' which has to be replaced by an actual function argument.
Example: (ad-map-arglists '(a &rest args) '(w x y z)) will return
Example: (ad-map-arglists \\='(a &rest args) \\='(w x y z)) will return
(funcall ad--addoit-function a (car args) (car (cdr args)) (nth 2 args))."
(let* ((parsed-source-arglist (ad-parse-arglist source-arglist))
(source-reqopt-args (append (nth 0 parsed-source-arglist)

View file

@ -561,7 +561,7 @@ Note that if you don't care about the order in which FUNCTION is
applied, just that the resulting list is in the correct order,
then
(avl-tree-mapf function 'cons tree (not reverse))
(avl-tree-mapf function \\='cons tree (not reverse))
is more efficient."
(nreverse (avl-tree-mapf fun 'cons tree reverse)))

View file

@ -43,7 +43,7 @@
(defun backquote-list*-function (first &rest list)
"Like `list' but the last argument is the tail of the new list.
For example (backquote-list* 'a 'b 'c) => (a b . c)"
For example (backquote-list* \\='a \\='b \\='c) => (a b . c)"
;; The recursive solution is much nicer:
;; (if list (cons first (apply 'backquote-list*-function list)) first))
;; but Emacs is not very good at efficiently processing recursion.
@ -60,7 +60,7 @@ For example (backquote-list* 'a 'b 'c) => (a b . c)"
(defmacro backquote-list*-macro (first &rest list)
"Like `list' but the last argument is the tail of the new list.
For example (backquote-list* 'a 'b 'c) => (a b . c)"
For example (backquote-list* \\='a \\='b \\='c) => (a b . c)"
;; The recursive solution is much nicer:
;; (if list (list 'cons first (cons 'backquote-list*-macro list)) first))
;; but Emacs is not very good at efficiently processing such things.

View file

@ -265,8 +265,8 @@ This option is enabled by default because it reduces Emacs memory usage."
(defcustom byte-optimize-log nil
"If non-nil, the byte-compiler will log its optimizations.
If this is 'source, then only source-level optimizations will be logged.
If it is 'byte, then only byte-level optimizations will be logged.
If this is `source', then only source-level optimizations will be logged.
If it is `byte', then only byte-level optimizations will be logged.
The information is logged to `byte-compile-log-buffer'."
:group 'bytecomp
:type '(choice (const :tag "none" nil)
@ -456,10 +456,20 @@ Return the compile-time value of FORM."
(byte-compile-recurse-toplevel
(macroexp-progn body)
(lambda (form)
(setf result
(byte-compile-eval
(byte-compile-top-level
(byte-compile-preprocess form))))))
;; Insulate the following variables
;; against changes made in the
;; subsidiary compilation. This
;; prevents spurious warning
;; messages: "not defined at runtime"
;; etc.
(let ((byte-compile-unresolved-functions
byte-compile-unresolved-functions)
(byte-compile-new-defuns
byte-compile-new-defuns))
(setf result
(byte-compile-eval
(byte-compile-top-level
(byte-compile-preprocess form)))))))
(list 'quote result))))
(eval-and-compile . ,(lambda (&rest body)
(byte-compile-recurse-toplevel
@ -503,6 +513,11 @@ defined with incorrect args.")
Used for warnings about calling a function that is defined during compilation
but won't necessarily be defined when the compiled file is loaded.")
(defvar byte-compile-new-defuns nil
"List of (runtime) functions defined in this compilation run.
This variable is used to qualify `byte-compile-noruntime-functions' when
outputting warnings about functions not being defined at runtime.")
;; Variables for lexical binding
(defvar byte-compile--lexical-environment nil
"The current lexical environment.")
@ -1503,8 +1518,9 @@ extra args."
;; Separate the functions that will not be available at runtime
;; from the truly unresolved ones.
(dolist (f byte-compile-unresolved-functions)
(setq f (car f))
(if (fboundp f) (push f noruntime) (push f unresolved)))
(setq f (car f))
(when (not (memq f byte-compile-new-defuns))
(if (fboundp f) (push f noruntime) (push f unresolved))))
;; Complain about the no-run-time functions
(byte-compile-print-syms
"the function `%s' might not be defined at runtime."
@ -1691,7 +1707,7 @@ Any other non-nil value of ARG means to ask the user.
If optional argument LOAD is non-nil, loads the file after compiling.
If compilation is needed, this functions returns the result of
`byte-compile-file'; otherwise it returns 'no-byte-compile."
`byte-compile-file'; otherwise it returns `no-byte-compile'."
(interactive
(let ((file buffer-file-name)
(file-name nil)
@ -1961,6 +1977,8 @@ With argument ARG, insert value in current buffer after the form."
;; compiled. A: Yes! b-c-u-f might contain dross from a
;; previous byte-compile.
(setq byte-compile-unresolved-functions nil)
(setq byte-compile-noruntime-functions nil)
(setq byte-compile-new-defuns nil)
;; Compile the forms from the input buffer.
(while (progn
@ -2287,8 +2305,7 @@ list that represents a doc string reference.
;; byte-compile-warn-about-unresolved-functions.
(if (memq funsym byte-compile-noruntime-functions)
(setq byte-compile-noruntime-functions
(delq funsym byte-compile-noruntime-functions)
byte-compile-noruntime-functions)
(delq funsym byte-compile-noruntime-functions))
(setq byte-compile-unresolved-functions
(delq (assq funsym byte-compile-unresolved-functions)
byte-compile-unresolved-functions)))))
@ -2346,8 +2363,21 @@ list that represents a doc string reference.
(defun byte-compile-file-form-require (form)
(let ((args (mapcar 'eval (cdr form)))
(hist-orig load-history)
hist-new)
hist-new prov-cons)
(apply 'require args)
;; Record the functions defined by the require in `byte-compile-new-defuns'.
(setq hist-new load-history)
(setq prov-cons (cons 'provide (car args)))
(while (and hist-new
(not (member prov-cons (car hist-new))))
(setq hist-new (cdr hist-new)))
(when hist-new
(dolist (x (car hist-new))
(when (and (consp x)
(memq (car x) '(defun t)))
(push (cdr x) byte-compile-new-defuns))))
(when (byte-compile-warning-enabled-p 'cl-functions)
;; Detect (require 'cl) in a way that works even if cl is already loaded.
(if (member (car args) '("cl" cl))
@ -2403,6 +2433,7 @@ not to take responsibility for the actual compilation of the code."
(byte-compile-current-form name)) ; For warnings.
(byte-compile-set-symbol-position name)
(push name byte-compile-new-defuns)
;; When a function or macro is defined, add it to the call tree so that
;; we can tell when functions are not used.
(if byte-compile-generate-call-tree
@ -3710,16 +3741,25 @@ discarding."
(byte-defop-compiler-1 quote)
(defun byte-compile-setq (form)
(let ((args (cdr form)))
(if args
(while args
(byte-compile-form (car (cdr args)))
(or byte-compile--for-effect (cdr (cdr args))
(byte-compile-out 'byte-dup 0))
(byte-compile-variable-set (car args))
(setq args (cdr (cdr args))))
;; (setq), with no arguments.
(byte-compile-form nil byte-compile--for-effect))
(let* ((args (cdr form))
(len (length args)))
(if (= (logand len 1) 1)
(progn
(byte-compile-log-warning
(format "missing value for `%S' at end of setq" (car (last args)))
nil :error)
(byte-compile-form
`(signal 'wrong-number-of-arguments '(setq ,len))
byte-compile--for-effect))
(if args
(while args
(byte-compile-form (car (cdr args)))
(or byte-compile--for-effect (cdr (cdr args))
(byte-compile-out 'byte-dup 0))
(byte-compile-variable-set (car args))
(setq args (cdr (cdr args))))
;; (setq), with no arguments.
(byte-compile-form nil byte-compile--for-effect)))
(setq byte-compile--for-effect nil)))
(defun byte-compile-setq-default (form)
@ -3973,8 +4013,13 @@ that suppresses all warnings during execution of BODY."
(setq byte-compile--for-effect nil)))
(defun byte-compile-funcall (form)
(mapc 'byte-compile-form (cdr form))
(byte-compile-out 'byte-call (length (cdr (cdr form)))))
(if (cdr form)
(progn
(mapc 'byte-compile-form (cdr form))
(byte-compile-out 'byte-call (length (cdr (cdr form)))))
(byte-compile-log-warning "`funcall' called with no arguments" nil :error)
(byte-compile-form '(signal 'wrong-number-of-arguments '(funcall 0))
byte-compile--for-effect)))
;; let binding

View file

@ -473,25 +473,28 @@ places where they originally did not directly appear."
:fun-body ,(cconv--convert-function () body env form)))
(`(setq . ,forms) ; setq special form
(let ((prognlist ()))
(while forms
(let* ((sym (pop forms))
(sym-new (or (cdr (assq sym env)) sym))
(value (cconv-convert (pop forms) env extend)))
(push (pcase sym-new
((pred symbolp) `(setq ,sym-new ,value))
(`(car-safe ,iexp) `(setcar ,iexp ,value))
;; This "should never happen", but for variables which are
;; mutated+captured+unused, we may end up trying to `setq'
;; on a closed-over variable, so just drop the setq.
(_ ;; (byte-compile-report-error
;; (format "Internal error in cconv of (setq %s ..)"
;; sym-new))
value))
prognlist)))
(if (cdr prognlist)
`(progn . ,(nreverse prognlist))
(car prognlist))))
(if (= (logand (length forms) 1) 1)
;; With an odd number of args, let bytecomp.el handle the error.
form
(let ((prognlist ()))
(while forms
(let* ((sym (pop forms))
(sym-new (or (cdr (assq sym env)) sym))
(value (cconv-convert (pop forms) env extend)))
(push (pcase sym-new
((pred symbolp) `(setq ,sym-new ,value))
(`(car-safe ,iexp) `(setcar ,iexp ,value))
;; This "should never happen", but for variables which are
;; mutated+captured+unused, we may end up trying to `setq'
;; on a closed-over variable, so just drop the setq.
(_ ;; (byte-compile-report-error
;; (format "Internal error in cconv of (setq %s ..)"
;; sym-new))
value))
prognlist)))
(if (cdr prognlist)
`(progn . ,(nreverse prognlist))
(car prognlist)))))
(`(,(and (or `funcall `apply) callsym) ,fun . ,args)
;; These are not special forms but we treat them separately for the needs

View file

@ -479,7 +479,7 @@ See `chart-sort-matchlist' for more details."
(defun chart-sort-matchlist (namelst numlst pred)
"Sort NAMELST and NUMLST (both sequence objects) based on predicate PRED.
PRED should be the equivalent of '<, except it must expect two
PRED should be the equivalent of `<', except it must expect two
cons cells of the form (NAME . NUM). See `sort' for more details."
;; 1 - create 1 list of cons cells
(let ((newlist nil)
@ -571,7 +571,7 @@ R1 and R2 are dotted pairs. Colorize it with FACE."
(defun chart-bar-quickie (dir title namelst nametitle numlst numtitle
&optional max sort-pred)
"Wash over the complex EIEIO stuff and create a nice bar chart.
Create it going in direction DIR ['horizontal 'vertical] with TITLE
Create it going in direction DIR [`horizontal' `vertical'] with TITLE
using a name sequence NAMELST labeled NAMETITLE with values NUMLST
labeled NUMTITLE.
Optional arguments:

View file

@ -270,6 +270,7 @@ made in the style guide relating to order."
(defcustom checkdoc-package-keywords-flag nil
"Non-nil means warn if this file's package keywords are not recognized.
Currently, all recognized keywords must be on `finder-known-keywords'."
:version "25.1"
:type 'boolean)
(define-obsolete-variable-alias 'checkdoc-style-hooks

View file

@ -797,10 +797,10 @@ methods.")
;;; Define some pre-defined generic functions, used internally.
(define-error 'cl-no-method "No method for %S")
(define-error 'cl-no-next-method "No next method for %S" 'cl-no-method)
(define-error 'cl-no-primary-method "No primary method for %S" 'cl-no-method)
(define-error 'cl-no-applicable-method "No applicable method for %S"
(define-error 'cl-no-method "No method")
(define-error 'cl-no-next-method "No next method" 'cl-no-method)
(define-error 'cl-no-primary-method "No primary method" 'cl-no-method)
(define-error 'cl-no-applicable-method "No applicable method"
'cl-no-method)
(cl-defgeneric cl-no-next-method (generic method &rest args)

Some files were not shown because too many files have changed in this diff Show more