merge trunk

This commit is contained in:
Kenichi Handa 2012-10-24 00:47:51 +09:00
commit 6a8f819329
94 changed files with 1196 additions and 678 deletions

View file

@ -1,3 +1,10 @@
2012-10-21 Glenn Morris <rgm@gnu.org>
* Makefile.in (install-etc): Don't install emacs22 icons.
* Makefile.in (emacs_transform): New variable.
(install-etc): Prefer a make variable to a shell variable.
2012-10-18 Stefan Monnier <monnier@iro.umontreal.ca>
* Makefile.in ($(MAKEFILE_NAME)): Depend on src/lisp.mk as well.

View file

@ -631,21 +631,24 @@ install-man:
done
## Install those items from etc/ that need to end up elsewhere.
# Like EMACS, but without EXEEXT.
emacs_transform = `echo emacs | sed '$(TRANSFORM)'`
install-etc:
umask 022; ${MKDIR_P} $(DESTDIR)${desktopdir}
dest=`echo emacs | sed '$(TRANSFORM)'`; \
tmp=etc/emacs.tmpdesktop; rm -f $${tmp}; \
sed -e "/^Exec=emacs/ s/emacs/$${dest}/" \
-e "/^Icon=emacs/ s/emacs/$${dest}/" \
sed -e '/^Exec=emacs/ s/emacs/${emacs_transform}/' \
-e '/^Icon=emacs/ s/emacs/${emacs_transform}/' \
${srcdir}/etc/emacs.desktop > $${tmp}; \
${INSTALL_DATA} $${tmp} $(DESTDIR)${desktopdir}/$${dest}.desktop; \
${INSTALL_DATA} $${tmp} $(DESTDIR)${desktopdir}/${emacs_transform}.desktop; \
rm -f $${tmp}
thisdir=`/bin/pwd`; \
cd ${iconsrcdir} || exit 1; umask 022 ; \
for dir in */*/apps */*/mimetypes; do \
[ -d $${dir} ] || continue ; \
( cd $${thisdir}; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \
for icon in $${dir}/*.*; do \
for icon in $${dir}/emacs[.-]*; do \
[ -r $${icon} ] || continue ; \
dest=`echo "$${icon}" | sed -e 's|.*/||' -e '$(TRANSFORM)'` ; \
( cd $${thisdir}; \

View file

@ -2538,7 +2538,7 @@ no_return_alloc_pixels
fi
if test "${HAVE_XPM}" = "yes"; then
AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm libary (-lXpm).])
AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm library (-lXpm).])
LIBXPM=-lXpm
fi
fi

View file

@ -1,3 +1,11 @@
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* custom.texi (Hooks): Clarify that -hooks is deprecated.
2012-10-23 Chong Yidong <cyd@gnu.org>
* kmacro.texi (Edit Keyboard Macro): Fix typo.
2012-10-18 Dani Moncayo <dmoncayo@gmail.com>
* mini.texi (Completion Options): Fix off-by-one error. (Bug#12644)

View file

@ -838,7 +838,8 @@ is a normal hook.
@cindex abnormal hook
A few hooks are @dfn{abnormal hooks}. Their names end in
@samp{-hooks} or @samp{-functions}, instead of @samp{-hook}. What
@samp{-functions}, instead of @samp{-hook} (some old code may also use
the deprecated suffix @samp{-hooks}). What
makes these hooks abnormal is the way its functions are
called---perhaps they are given arguments, or perhaps the values they
return are used in some way. For example,
@ -1735,11 +1736,11 @@ and @kbd{C-c p} in Texinfo mode:
@example
(add-hook 'texinfo-mode-hook
'(lambda ()
(define-key texinfo-mode-map "\C-cp"
'backward-paragraph)
(define-key texinfo-mode-map "\C-cn"
'forward-paragraph)))
(lambda ()
(define-key texinfo-mode-map "\C-cp"
'backward-paragraph)
(define-key texinfo-mode-map "\C-cn"
'forward-paragraph)))
@end example
@node Modifier Keys

View file

@ -482,10 +482,11 @@ Edit the last 300 keystrokes as a keyboard macro
@kindex C-x C-k C-e
@kindex C-x C-k RET
You can edit the last keyboard macro by typing @kbd{C-x C-k C-e} or
@kbd{C-x C-k RET} (@code{kmacro-edit-macro}). This formats the macro
definition in a buffer and enters a specialized major mode for editing
it. Type @kbd{C-h m} once in that buffer to display details of how to
edit the macro. When you are finished editing, type @kbd{C-c C-c}.
@kbd{C-x C-k @key{RET}} (@code{kmacro-edit-macro}). This formats the
macro definition in a buffer and enters a specialized major mode for
editing it. Type @kbd{C-h m} once in that buffer to display details
of how to edit the macro. When you are finished editing, type
@kbd{C-c C-c}.
@findex edit-kbd-macro
@kindex C-x C-k e

View file

@ -17909,10 +17909,10 @@ file that set values:
@group
;; Set calendar highlighting colors
(setq calendar-load-hook
'(lambda ()
(set-face-foreground 'diary-face "skyblue")
(set-face-background 'holiday-face "slate blue")
(set-face-foreground 'holiday-face "white")))
(lambda ()
(set-face-foreground 'diary-face "skyblue")
(set-face-background 'holiday-face "slate blue")
(set-face-foreground 'holiday-face "white")))
@end group
@end smallexample
@ -20947,7 +20947,7 @@ not yet seen, @code{mapcar} and @code{lambda}.
@group
(defun one-fiftieth (full-range)
"Return list, each number one-fiftieth of previous."
(mapcar '(lambda (arg) (/ arg 50)) full-range))
(mapcar (lambda (arg) (/ arg 50)) full-range))
@end group
@end smallexample
@ -21168,7 +21168,7 @@ and the second argument is @code{full-range}, which will be bound to
The whole expression looks like this:
@smallexample
(mapcar '(lambda (arg) (/ arg 50)) full-range))
(mapcar (lambda (arg) (/ arg 50)) full-range))
@end smallexample
@xref{Mapping Functions, , Mapping Functions, elisp, The GNU Emacs
@ -21840,7 +21840,7 @@ each column."
@group
(defun one-fiftieth (full-range)
"Return list, each number of which is 1/50th previous."
(mapcar '(lambda (arg) (/ arg 50)) full-range))
(mapcar (lambda (arg) (/ arg 50)) full-range))
@end group
@end smallexample

View file

@ -1,3 +1,29 @@
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* hooks.texi (Standard Hooks): Clarify that -hooks is deprecated.
2012-10-23 Paul Eggert <eggert@cs.ucla.edu>
Fix outdated timestamp documentation in Elisp manual (bug#12706).
* files.texi (File Attributes):
* text.texi (Undo):
Time stamp resolution is now 1 picosecond, not 1 second.
2012-10-23 Chong Yidong <cyd@gnu.org>
* display.texi (Font Lookup): Remove font-list-limit.
* keymaps.texi (Key Sequences): Avoid referring to Edit Macro mode
(Bug#12529).
2012-10-22 Glenn Morris <rgm@gnu.org>
* os.texi (Recording Input): Tiny fix.
* intro.texi (Lisp History):
* lists.texi (Sets And Lists): Refer to cl-lib rather than cl.
* tips.texi (Coding Conventions): Recommend cl-lib over cl.
2012-10-15 Chong Yidong <cyd@gnu.org>
* macros.texi (Defining Macros): defmacro is now a macro.

View file

@ -2944,14 +2944,6 @@ The last three elements give additional information about the font.
encoding of the font.
@end defun
@defopt font-list-limit
This variable specifies maximum number of fonts to consider in font
matching. The function @code{x-family-fonts} will not return more
than that many fonts, and font selection will consider only that many
fonts when searching a matching font for face attributes. The default
is 100.
@end defopt
@node Fontsets
@subsection Fontsets

View file

@ -1220,9 +1220,8 @@ point number.
The file's @acronym{GID}, likewise.
@item
The time of last access, as a list of two integers.
The first integer has the high-order 16 bits of time,
the second has the low 16 bits. (This is similar to the
The time of last access, as a list of four integers @code{(@var{sec-high}
@var{sec-low} @var{microsec} @var{picosec})}. (This is similar to the
value of @code{current-time}; see @ref{Time of Day}.) Note that on
some FAT-based filesystems, only the date of last access is recorded,
so this time will always hold the midnight of the day of last access.

View file

@ -978,7 +978,7 @@ anonymous function by quoting it as a list:
@example
@group
(defun double-property (symbol prop)
(change-property symbol prop '(lambda (x) (* 2 x))))
(change-property symbol prop (lambda (x) (* 2 x))))
@end group
@end example

View file

@ -17,11 +17,11 @@ arguments and their values are completely ignored. The recommended way
to put a new function on such a hook is to call @code{add-hook}.
@xref{Hooks}, for more information about using hooks.
The variables whose names end in @samp{-hooks} or @samp{-functions} are
usually @dfn{abnormal hooks}; their values are lists of functions, but
these functions are called in a special way (they are passed arguments,
or their values are used). The variables whose names end in
@samp{-function} have single functions as their values.
The variables whose names end in @samp{-functions} are usually @dfn{abnormal
hooks} (some old code may also use the deprecated @samp{-hooks} suffix); their
values are lists of functions, but these functions are called in a special way
(they are passed arguments, or their return values are used). The variables
whose names end in @samp{-function} have single functions as their values.
This is not an exhaustive list, it only covers the more general hooks.
For example, every major mode defines a hook named

View file

@ -119,7 +119,7 @@ worry about it; this manual is self-contained.
@pindex cl
A certain amount of Common Lisp emulation is available via the
@file{cl} library. @xref{Top,, Overview, cl, Common Lisp Extensions}.
@file{cl-lib} library. @xref{Top,, Overview, cl, Common Lisp Extensions}.
Emacs Lisp is not at all influenced by Scheme; but the GNU project has
an implementation of Scheme, called Guile. We use it in all new GNU

View file

@ -78,11 +78,11 @@ representations, @ref{Init Rebinding,,, emacs, The GNU Emacs Manual}.
@defmac kbd keyseq-text
This macro converts the text @var{keyseq-text} (a string constant)
into a key sequence (a string or vector constant). The contents of
@var{keyseq-text} should describe the key sequence using almost the same
syntax used in this manual. More precisely, it uses the same syntax
that Edit Macro mode uses for editing keyboard macros (@pxref{Edit
Keyboard Macro,,, emacs, The GNU Emacs Manual}); you must surround
function key names with @samp{<@dots{}>}.
@var{keyseq-text} should use the same syntax as in the buffer invoked
by the @kbd{C-x C-k @key{RET}} (@code{kmacro-edit-macro}) command; in
particular, you must surround function key names with
@samp{<@dots{}>}. @xref{Edit Keyboard Macro,,, emacs, The GNU Emacs
Manual}.
@example
(kbd "C-x") @result{} "\C-x"

View file

@ -1266,7 +1266,7 @@ functions for sets include @code{memq} and @code{delq}, and their
@quotation
@b{Common Lisp note:} Common Lisp has functions @code{union} (which
avoids duplicate elements) and @code{intersection} for set operations.
Although standard GNU Emacs Lisp does not have them, the @file{cl}
Although standard GNU Emacs Lisp does not have them, the @file{cl-lib}
library provides versions. @xref{Top,, Overview, cl, Common Lisp Extensions}.
@end quotation

View file

@ -897,8 +897,8 @@ It then restores any autoloads formerly associated with those symbols.
Before restoring the previous definitions, @code{unload-feature} runs
@code{remove-hook} to remove functions in the library from certain
hooks. These hooks include variables whose names end in @samp{hook}
or @samp{-hooks}, plus those listed in
hooks. These hooks include variables whose names end in @samp{-hook}
(or the deprecated suffix @samp{-hooks}), plus those listed in
@code{unload-feature-special-hooks}, as well as
@code{auto-mode-alist}. This is to prevent Emacs from ceasing to
function because important hooks refer to functions that are no longer

View file

@ -70,9 +70,9 @@ called. You can use @code{add-hook} to add a function to an abnormal
hook, but you must write the function to follow the hook's calling
convention.
By convention, abnormal hook names end in @samp{-functions} or
@samp{-hooks}. If the variable's name ends in @samp{-function}, then
its value is just a single function, not a list of functions.
By convention, abnormal hook names end in @samp{-functions}. If the
variable's name ends in @samp{-function}, then its value is just a single
function, not a list of functions.
@menu
* Running Hooks:: How to run a hook.

View file

@ -1963,7 +1963,7 @@ is the character Emacs currently uses for quitting, usually @kbd{C-g}.
This function returns a vector containing the last 300 input events from
the keyboard or mouse. All input events are included, whether or not
they were used as parts of key sequences. Thus, you always get the last
100 input events, not counting events generated by keyboard macros.
300 input events, not counting events generated by keyboard macros.
(These are excluded because they are less interesting for debugging; it
should be enough to see the events that invoked the macros.)

View file

@ -1233,11 +1233,12 @@ reinsert it is @code{(abs @var{position})}. If @var{position} is
positive, point was at the beginning of the deleted text, otherwise it
was at the end.
@item (t @var{high} . @var{low})
@item (t @var{sec-high} @var{sec-low} @var{microsec} @var{picosec})
This kind of element indicates that an unmodified buffer became
modified. The elements @var{high} and @var{low} are two integers, each
recording 16 bits of the visited file's modification time as of when it
was previously visited or saved. @code{primitive-undo} uses those
modified. The list @code{(@var{sec-high} @var{sec-low} @var{microsec}
@var{picosec})} represents the visited file's modification time as of
when it was previously visited or saved, using the same format as
@code{current-time}; see @ref{Time of Day}. @code{primitive-undo} uses those
values to determine whether to mark the buffer as unmodified once again;
it does so only if the file's modification time matches those numbers.

View file

@ -120,15 +120,18 @@ library when needed. This way people who don't use those aspects of
your file do not need to load the extra library.
@item
Please don't require the @code{cl} package of Common Lisp extensions at
run time. Use of this package is optional, and it is not part of the
standard Emacs namespace. If your package loads @code{cl} at run time,
that could cause name clashes for users who don't use that package.
If you need Common Lisp extensions, use the @code{cl-lib} library
rather than the old @code{cl} library. The latter does not
use a clean namespace (i.e., its definitions do not
start with a @samp{cl-} prefix). If your package loads @code{cl} at
run time, that could cause name clashes for users who don't use that
package.
However, there is no problem with using the @code{cl} package at
compile time, with @code{(eval-when-compile (require 'cl))}. That's
There is no problem with using the @code{cl} package at @emph{compile}
time, with @code{(eval-when-compile (require 'cl))}. That's
sufficient for using the macros in the @code{cl} package, because the
compiler expands them before generating the byte-code.
compiler expands them before generating the byte-code. It is still
better to use the more modern @code{cl-lib} in this case, though.
@item
When defining a major mode, please follow the major mode

View file

@ -1,3 +1,18 @@
2012-10-23 Glenn Morris <rgm@gnu.org>
* cl.texi: Include emacsver.texi. Use Emacs version number rather
than unchanging cl.el version number.
End all menu descriptions with a period.
Do not use @dfn{CL} for every instance of "CL".
(Overview): Remove no-runtime caveat, and note about foo* names.
(Usage): Use cl-lib rather than cl.
(Organization, Naming Conventions): Update for cl-lib.el.
(Installation): Remove long-irrelevant node.
(Program Structure, Predicates, Control Structure):
Start updating for cl-lib namespace.
* Makefile.in ($(buildinfodir)/cl$(INFO_EXT), cl.dvi, cl.pdf):
Depend on emacsver.texi.
2012-10-09 Michael Albinus <michael.albinus@gmx.de>
* trampver.texi: Update release number.

View file

@ -237,12 +237,12 @@ cc-mode.pdf: ${srcdir}/cc-mode.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/cc-mode.texi
cl : $(buildinfodir)/cl$(INFO_EXT)
$(buildinfodir)/cl$(INFO_EXT): ${srcdir}/cl.texi
$(buildinfodir)/cl$(INFO_EXT): ${srcdir}/cl.texi $(emacsdir)/emacsver.texi
$(mkinfodir)
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/cl.texi
cl.dvi: ${srcdir}/cl.texi
cl.dvi: ${srcdir}/cl.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/cl.texi
cl.pdf: ${srcdir}/cl.texi
cl.pdf: ${srcdir}/cl.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/cl.texi
dbus : $(buildinfodir)/dbus$(INFO_EXT)

View file

@ -1,6 +1,7 @@
\input texinfo @c -*-texinfo-*-
@setfilename ../../info/cl
@settitle Common Lisp Extensions
@include emacsver.texi
@copying
This file documents the GNU Emacs Common Lisp emulation package.
@ -34,7 +35,7 @@ developing GNU and promoting software freedom.''
@sp 4
@center For GNU Emacs Lisp
@sp 1
@center Version 2.02
@center as distributed with Emacs @value{EMACSVER}
@sp 5
@center Dave Gillespie
@center daveg@@synaptics.com
@ -53,23 +54,23 @@ developing GNU and promoting software freedom.''
@end ifnottex
@menu
* Overview:: Installation, usage, etc.
* Program Structure:: Arglists, @code{eval-when}, @code{defalias}
* Predicates:: @code{typep} and @code{equalp}
* Control Structure:: @code{setf}, @code{do}, @code{loop}, etc.
* Macros:: Destructuring, @code{define-compiler-macro}
* Declarations:: @code{proclaim}, @code{declare}, etc.
* Symbols:: Property lists, @code{gensym}
* Numbers:: Predicates, functions, random numbers
* Sequences:: Mapping, functions, searching, sorting
* Lists:: @code{caddr}, @code{sublis}, @code{member*}, @code{assoc*}, etc.
* Structures:: @code{defstruct}
* Assertions:: @code{check-type}, @code{assert}, @code{ignore-errors}.
* Overview:: Basics, usage, etc.
* Program Structure:: Arglists, @code{cl-eval-when}, @code{defalias}.
* Predicates:: @code{cl-typep} and @code{cl-equalp}.
* Control Structure:: @code{setf}, @code{cl-do}, @code{cl-loop}, etc.
* Macros:: Destructuring, @code{cl-define-compiler-macro}.
* Declarations:: @code{cl-proclaim}, @code{cl-declare}, etc.
* Symbols:: Property lists, @code{cl-gensym}.
* Numbers:: Predicates, functions, random numbers.
* Sequences:: Mapping, functions, searching, sorting.
* Lists:: @code{cl-caddr}, @code{cl-sublis}, @code{cl-member}, @code{cl-assoc}, etc.
* Structures:: @code{cl-defstruct}.
* Assertions:: @code{cl-check-type}, @code{cl-assert}, @code{ignore-errors}.
* Efficiency Concerns:: Hints and techniques
* Common Lisp Compatibility:: All known differences with Steele
* Old CL Compatibility:: All known differences with old cl.el
* Porting Common Lisp:: Hints for porting Common Lisp code
* Efficiency Concerns:: Hints and techniques.
* Common Lisp Compatibility:: All known differences with Steele.
* Old CL Compatibility:: All known differences with old cl.el.
* Porting Common Lisp:: Hints for porting Common Lisp code.
* GNU Free Documentation License:: The license for this documentation.
* Function Index::
@ -92,21 +93,11 @@ As Emacs Lisp programmers have grown in number, and the applications
they write have grown more ambitious, it has become clear that Emacs
Lisp could benefit from many of the conveniences of Common Lisp.
The @dfn{CL} package adds a number of Common Lisp functions and
The @code{CL} package adds a number of Common Lisp functions and
control structures to Emacs Lisp. While not a 100% complete
implementation of Common Lisp, @dfn{CL} adds enough functionality
implementation of Common Lisp, @code{CL} adds enough functionality
to make Emacs Lisp programming significantly more convenient.
@strong{Please note:} the @dfn{CL} functions are not standard parts of
the Emacs Lisp name space, so it is legitimate for users to define
them with other, conflicting meanings. To avoid conflicting with
those user activities, we have a policy that packages installed in
Emacs must not load @dfn{CL} at run time. (It is ok for them to load
@dfn{CL} at compile time only, with @code{eval-when-compile}, and use
the macros it provides.) If you are writing packages that you plan to
distribute and invite widespread use for, you might want to observe
the same rule.
Some Common Lisp features have been omitted from this package
for various reasons:
@ -119,152 +110,131 @@ examples of this group.
@item
Other features cannot be implemented without modification to the
Emacs Lisp interpreter itself, such as multiple return values,
lexical scoping, case-insensitive symbols, and complex numbers.
The @dfn{CL} package generally makes no attempt to emulate these
case-insensitive symbols, and complex numbers.
The @code{CL} package generally makes no attempt to emulate these
features.
@item
Some features conflict with existing things in Emacs Lisp. For
example, Emacs's @code{assoc} function is incompatible with the
Common Lisp @code{assoc}. In such cases, this package usually
adds the suffix @samp{*} to the function name of the Common
Lisp version of the function (e.g., @code{assoc*}).
@end itemize
The package described here was written by Dave Gillespie,
@file{daveg@@synaptics.com}. It is a total rewrite of the original
The package described here was originally written by Dave Gillespie,
@file{daveg@@synaptics.com}, as a total rewrite of an earlier
1986 @file{cl.el} package by Cesar Quiroz. Most features of the
Quiroz package have been retained; any incompatibilities are
Quiroz package were retained; any incompatibilities are
noted in the descriptions below. Care has been taken in this
version to ensure that each function is defined efficiently,
concisely, and with minimal impact on the rest of the Emacs
environment.
environment. Stefan Monnier added the file @file{cl-lib.el} and
rationalized the namespace for Emacs 24.3.
@menu
* Usage:: How to use the CL package
* Organization:: The package's five component files
* Installation:: Compiling and installing CL
* Naming Conventions:: Notes on CL function names
* Usage:: How to use the CL package.
* Organization:: The package's five component files.
* Naming Conventions:: Notes on CL function names.
@end menu
@node Usage
@section Usage
@noindent
Lisp code that uses features from the @dfn{CL} package should
include at the beginning:
The @code{CL} package is distributed with Emacs, so there is no need
to install any additional files in order to start using it. Lisp code
that uses features from the @code{CL} package should simply include at
the beginning:
@example
(require 'cl)
(require 'cl-lib)
@end example
@noindent
It is safe to arrange to load @dfn{CL} at all times, e.g.,
in your @file{.emacs} file. But it's a good idea, for portability,
to @code{(require 'cl)} in your code even if you do this.
You may wish to add such a statement to your init file, if you
make frequent use of CL features.
@node Organization
@section Organization
@noindent
The Common Lisp package is organized into four files:
The Common Lisp package is organized into four main files:
@table @file
@item cl.el
This is the ``main'' file, which contains basic functions
and information about the package. This file is relatively
compact---about 700 lines.
@item cl-lib.el
This is the main file, which contains basic functions
and information about the package. This file is relatively compact.
@item cl-extra.el
This file contains the larger, more complex or unusual functions.
It is kept separate so that packages which only want to use Common
Lisp fundamentals like the @code{cadr} function won't need to pay
Lisp fundamentals like the @code{cl-incf} function won't need to pay
the overhead of loading the more advanced functions.
@item cl-seq.el
This file contains most of the advanced functions for operating
on sequences or lists, such as @code{delete-if} and @code{assoc*}.
on sequences or lists, such as @code{cl-delete-if} and @code{cl-assoc}.
@item cl-macs.el
This file contains the features of the packages which are macros
instead of functions. Macros expand when the caller is compiled,
not when it is run, so the macros generally only need to be
present when the byte-compiler is running (or when the macros are
used in uncompiled code such as a @file{.emacs} file). Most of
the macros of this package are isolated in @file{cl-macs.el} so
that they won't take up memory unless you are compiling.
This file contains the features that are macros instead of functions.
Macros expand when the caller is compiled, not when it is run, so the
macros generally only need to be present when the byte-compiler is
running (or when the macros are used in uncompiled code). Most of the
macros of this package are isolated in @file{cl-macs.el} so that they
won't take up memory unless you are compiling.
@end table
The file @file{cl.el} includes all necessary @code{autoload}
The file @file{cl-lib.el} includes all necessary @code{autoload}
commands for the functions and macros in the other three files.
All you have to do is @code{(require 'cl)}, and @file{cl.el}
All you have to do is @code{(require 'cl-lib)}, and @file{cl-lib.el}
will take care of pulling in the other files when they are
needed.
There is another file, @file{cl-compat.el}, which defines some
routines from the older @file{cl.el} package that are not otherwise
There is another file, @file{cl.el}, which was the main entry point
to the CL package prior to Emacs 24.3. Nowadays, it is replaced
by @file{cl-lib.el}. The two provide the same features, but use
different function names (in fact, @file{cl.el} just defines aliases
to the @file{cl-lib.el} definitions). In particular, the old @file{cl.el}
does not use a clean namespace. For this reason, Emacs has a policy
that packages distributed with Emacs must not load @code{cl} at run time.
(It is ok for them to load @code{cl} at @emph{compile} time, with
@code{eval-when-compile}, and use the macros it provides.) There is
no such restriction on the use of @code{cl-lib}. New code should use
@code{cl-lib} rather than @code{cl}. @xref{Naming Conventions}.
There is one more file, @file{cl-compat.el}, which defines some
routines from the older CL package that are not otherwise
present in the new package. This includes internal routines
like @code{setelt} and @code{zip-lists}, deprecated features
like @code{defkeyword}, and an emulation of the old-style
multiple-values feature. This file is obsolete and should not be used
in new code. @xref{Old CL Compatibility}.
@node Installation
@section Installation
@noindent
The @dfn{CL} package is distributed with Emacs, so there is no need
to install anything.
If you do need to install it, just put the byte-compiled files
@file{cl.elc}, @file{cl-extra.elc}, @file{cl-seq.elc},
@file{cl-macs.elc}, and (if necessary) @file{cl-compat.elc} into a
directory on your @code{load-path}. Also, format the @file{cl.texi}
file and put the resulting Info files into a directory in your
@code{Info-directory-list}.
@node Naming Conventions
@section Naming Conventions
@noindent
Except where noted, all functions defined by this package have the
same names and calling conventions as their Common Lisp counterparts.
Following is a complete list of functions whose names were changed
from Common Lisp, usually to avoid conflicts with Emacs. In each
case, a @samp{*} has been appended to the Common Lisp name to obtain
the Emacs name:
@example
defun* defsubst* defmacro* function*
member* assoc* rassoc* get*
remove* delete* mapcar* sort*
floor* ceiling* truncate* round*
mod* rem* random*
@end example
same calling conventions as their Common Lisp counterparts, and
names that are those of Common Lisp plus a @samp{cl-} prefix.
Internal function and variable names in the package are prefixed
by @code{cl-}. Here is a complete list of functions @emph{not}
prefixed by @code{cl-} which were not taken from Common Lisp:
by @code{cl--}. Here is a complete list of functions prefixed by
@code{cl-} that were not taken from Common Lisp:
@c FIXME lexical-let lexical-let*
@example
floatp-safe lexical-let lexical-let*
callf callf2 letf letf*
defsubst*
cl-callf cl-callf2 cl-defsubst
cl-floatp-safe cl-letf cl-letf*
@end example
The following simple functions and macros are defined in @file{cl.el};
The following simple functions and macros are defined in @file{cl-lib.el};
they do not cause other components like @file{cl-extra} to be loaded.
@example
floatp-safe endp
evenp oddp plusp minusp
caaar .. cddddr
list* ldiff rest first .. tenth
copy-list subst mapcar* [2]
adjoin [3] acons pairlis pop [4]
push [4] pushnew [3,4] incf [4] decf [4]
proclaim declaim
cl-floatp-safe cl-endp
cl-evenp cl-oddp cl-plusp cl-minusp
cl-caaar .. cl-cddddr
cl-list* cl-ldiff cl-rest cl-first .. cl-tenth
cl-copy-list cl-subst cl-mapcar [2]
cl-adjoin [3] cl-acons cl-pairlis
cl-pushnew [3,4] cl-incf [4] cl-decf [4]
cl-proclaim cl-declaim
@end example
@noindent
@ -281,13 +251,13 @@ and @code{:key} is not used.
@chapter Program Structure
@noindent
This section describes features of the @dfn{CL} package which have to
This section describes features of the @code{CL} package that have to
do with programs as a whole: advanced argument lists for functions,
and the @code{eval-when} construct.
and the @code{cl-eval-when} construct.
@menu
* Argument Lists:: @code{&key}, @code{&aux}, @code{defun*}, @code{defmacro*}.
* Time of Evaluation:: The @code{eval-when} construct.
* Argument Lists:: @code{&key}, @code{&aux}, @code{cl-defun}, @code{cl-defmacro}.
* Time of Evaluation:: The @code{cl-eval-when} construct.
@end menu
@iftex
@ -309,26 +279,26 @@ this package to implement Common Lisp argument lists seamlessly.
Instead, this package defines alternates for several Lisp forms
which you must use if you need Common Lisp argument lists.
@defspec defun* name arglist body...
@defspec cl-defun name arglist body...
This form is identical to the regular @code{defun} form, except
that @var{arglist} is allowed to be a full Common Lisp argument
list. Also, the function body is enclosed in an implicit block
called @var{name}; @pxref{Blocks and Exits}.
@end defspec
@defspec defsubst* name arglist body...
This is just like @code{defun*}, except that the function that
@defspec cl-defsubst name arglist body...
This is just like @code{cl-defun}, except that the function that
is defined is automatically proclaimed @code{inline}, i.e.,
calls to it may be expanded into in-line code by the byte compiler.
This is analogous to the @code{defsubst} form;
@code{defsubst*} uses a different method (compiler macros) which
@code{cl-defsubst} uses a different method (compiler macros) which
works in all versions of Emacs, and also generates somewhat more
efficient inline expansions. In particular, @code{defsubst*}
efficient inline expansions. In particular, @code{cl-defsubst}
arranges for the processing of keyword arguments, default values,
etc., to be done at compile-time whenever possible.
@end defspec
@defspec defmacro* name arglist body...
@defspec cl-defmacro name arglist body...
This is identical to the regular @code{defmacro} form,
except that @var{arglist} is allowed to be a full Common Lisp
argument list. The @code{&environment} keyword is supported as
@ -339,19 +309,19 @@ The macro expander body is enclosed in an implicit block called
@var{name}.
@end defspec
@defspec function* symbol-or-lambda
@defspec cl-function symbol-or-lambda
This is identical to the regular @code{function} form,
except that if the argument is a @code{lambda} form then that
form may use a full Common Lisp argument list.
@end defspec
Also, all forms (such as @code{defsetf} and @code{flet}) defined
Also, all forms (such as @code{cl-flet} and @code{cl-labels}) defined
in this package that include @var{arglist}s in their syntax allow
full Common Lisp argument lists.
Note that it is @emph{not} necessary to use @code{defun*} in
order to have access to most @dfn{CL} features in your function.
These features are always present; @code{defun*}'s only
Note that it is @emph{not} necessary to use @code{cl-defun} in
order to have access to most @code{CL} features in your function.
These features are always present; @code{cl-defun}'s only
difference from @code{defun} is its more flexible argument
lists and its implicit block.
@ -401,7 +371,7 @@ are optional arguments which are specified by name rather than
positionally in the argument list. For example,
@example
(defun* foo (a &optional b &key c d (e 17)))
(cl-defun foo (a &optional b &key c d (e 17)))
@end example
@noindent
@ -427,7 +397,7 @@ You can also explicitly specify the keyword argument; it need not be
simply the variable name prefixed with a colon. For example,
@example
(defun* bar (&key (a 1) ((baz b) 4)))
(cl-defun bar (&key (a 1) ((baz b) 4)))
@end example
@noindent
@ -453,16 +423,16 @@ the ``rest'' argument is bound to the keyword list as it appears
in the call. For example:
@smallexample
(defun* find-thing (thing &rest rest &key need &allow-other-keys)
(or (apply 'member* thing thing-list :allow-other-keys t rest)
(cl-defun find-thing (thing &rest rest &key need &allow-other-keys)
(or (apply 'cl-member thing thing-list :allow-other-keys t rest)
(if need (error "Thing not found"))))
@end smallexample
@noindent
This function takes a @code{:need} keyword argument, but also
accepts other keyword arguments which are passed on to the
@code{member*} function. @code{allow-other-keys} is used to
keep both @code{find-thing} and @code{member*} from complaining
@code{cl-member} function. @code{allow-other-keys} is used to
keep both @code{find-thing} and @code{cl-member} from complaining
about each others' keywords in the arguments.
The fifth section of the argument list consists of @dfn{auxiliary
@ -473,17 +443,17 @@ difference between the following two functions, except for a
matter of stylistic taste:
@example
(defun* foo (a b &aux (c (+ a b)) d)
(cl-defun foo (a b &aux (c (+ a b)) d)
@var{body})
(defun* foo (a b)
(cl-defun foo (a b)
(let ((c (+ a b)) d)
@var{body}))
@end example
Argument lists support @dfn{destructuring}. In Common Lisp,
destructuring is only allowed with @code{defmacro}; this package
allows it with @code{defun*} and other argument lists as well.
allows it with @code{cl-defun} and other argument lists as well.
In destructuring, any argument variable (@var{var} in the above
diagram) can be replaced by a list of variables, or more generally,
a recursive argument list. The corresponding argument value must
@ -491,7 +461,7 @@ be a list whose elements match this recursive argument list.
For example:
@example
(defmacro* dolist ((var listform &optional resultform)
(cl-defmacro dolist ((var listform &optional resultform)
&rest body)
...)
@end example
@ -532,21 +502,21 @@ For example, the compiler effectively evaluates @code{defmacro} forms
at compile-time so that later parts of the file can refer to the
macros that are defined.
@defspec eval-when (situations...) forms...
@defspec cl-eval-when (situations...) forms...
This form controls when the body @var{forms} are evaluated.
The @var{situations} list may contain any set of the symbols
@code{compile}, @code{load}, and @code{eval} (or their long-winded
ANSI equivalents, @code{:compile-toplevel}, @code{:load-toplevel},
and @code{:execute}).
The @code{eval-when} form is handled differently depending on
The @code{cl-eval-when} form is handled differently depending on
whether or not it is being compiled as a top-level form.
Specifically, it gets special treatment if it is being compiled
by a command such as @code{byte-compile-file} which compiles files
or buffers of code, and it appears either literally at the
top level of the file or inside a top-level @code{progn}.
For compiled top-level @code{eval-when}s, the body @var{forms} are
For compiled top-level @code{cl-eval-when}s, the body @var{forms} are
executed at compile-time if @code{compile} is in the @var{situations}
list, and the @var{forms} are written out to the file (to be executed
at load-time) if @code{load} is in the @var{situations} list.
@ -554,11 +524,11 @@ at load-time) if @code{load} is in the @var{situations} list.
For non-compiled-top-level forms, only the @code{eval} situation is
relevant. (This includes forms executed by the interpreter, forms
compiled with @code{byte-compile} rather than @code{byte-compile-file},
and non-top-level forms.) The @code{eval-when} acts like a
and non-top-level forms.) The @code{cl-eval-when} acts like a
@code{progn} if @code{eval} is specified, and like @code{nil}
(ignoring the body @var{forms}) if not.
The rules become more subtle when @code{eval-when}s are nested;
The rules become more subtle when @code{cl-eval-when}s are nested;
consult Steele (second edition) for the gruesome details (and
some gruesome examples).
@ -566,13 +536,13 @@ Some simple examples:
@example
;; Top-level forms in foo.el:
(eval-when (compile) (setq foo1 'bar))
(eval-when (load) (setq foo2 'bar))
(eval-when (compile load) (setq foo3 'bar))
(eval-when (eval) (setq foo4 'bar))
(eval-when (eval compile) (setq foo5 'bar))
(eval-when (eval load) (setq foo6 'bar))
(eval-when (eval compile load) (setq foo7 'bar))
(cl-eval-when (compile) (setq foo1 'bar))
(cl-eval-when (load) (setq foo2 'bar))
(cl-eval-when (compile load) (setq foo3 'bar))
(cl-eval-when (eval) (setq foo4 'bar))
(cl-eval-when (eval compile) (setq foo5 'bar))
(cl-eval-when (eval load) (setq foo6 'bar))
(cl-eval-when (eval compile load) (setq foo7 'bar))
@end example
When @file{foo.el} is compiled, these variables will be set during
@ -595,18 +565,18 @@ be set:
foo4 foo5 foo6 foo7 ; `eval'
@end example
If these seven @code{eval-when}s had been, say, inside a @code{defun},
If these seven @code{cl-eval-when}s had been, say, inside a @code{defun},
then the first three would have been equivalent to @code{nil} and the
last four would have been equivalent to the corresponding @code{setq}s.
Note that @code{(eval-when (load eval) @dots{})} is equivalent
Note that @code{(cl-eval-when (load eval) @dots{})} is equivalent
to @code{(progn @dots{})} in all contexts. The compiler treats
certain top-level forms, like @code{defmacro} (sort-of) and
@code{require}, as if they were wrapped in @code{(eval-when
(compile load eval) @dots{})}.
@end defspec
Emacs includes two special forms related to @code{eval-when}.
Emacs includes two special forms related to @code{cl-eval-when}.
One of these, @code{eval-when-compile}, is not quite equivalent to
any @code{eval-when} construct and is described below.
@ -625,7 +595,7 @@ or other reasons.
This form is similar to the @samp{#.} syntax of true Common Lisp.
@end defspec
@defspec load-time-value form
@defspec cl-load-time-value form
The @var{form} is evaluated at load-time; at execution time,
this form acts like a quoted constant of the resulting value.
@ -633,12 +603,12 @@ Early Common Lisp had a @samp{#,} syntax that was similar to
this, but ANSI Common Lisp replaced it with @code{load-time-value}
and gave it more well-defined semantics.
In a compiled file, @code{load-time-value} arranges for @var{form}
In a compiled file, @code{cl-load-time-value} arranges for @var{form}
to be evaluated when the @file{.elc} file is loaded and then used
as if it were a quoted constant. In code compiled by
@code{byte-compile} rather than @code{byte-compile-file}, the
effect is identical to @code{eval-when-compile}. In uncompiled
code, both @code{eval-when-compile} and @code{load-time-value}
code, both @code{eval-when-compile} and @code{cl-load-time-value}
act exactly like @code{progn}.
@example
@ -649,7 +619,7 @@ act exactly like @code{progn}.
(eval-when-compile (current-time-string))
;; or '#.(current-time-string) in real Common Lisp
", and loaded on: "
(load-time-value (current-time-string))))
(cl-load-time-value (current-time-string))))
@end example
@noindent
@ -676,21 +646,21 @@ This section describes functions for testing whether various
facts are true or false.
@menu
* Type Predicates:: @code{typep}, @code{deftype}, and @code{coerce}
* Equality Predicates:: @code{equalp}
* Type Predicates:: @code{cl-typep}, @code{cl-deftype}, and @code{cl-coerce}.
* Equality Predicates:: @code{cl-equalp}.
@end menu
@node Type Predicates
@section Type Predicates
@noindent
The @dfn{CL} package defines a version of the Common Lisp @code{typep}
The @code{CL} package defines a version of the Common Lisp @code{typep}
predicate.
@defun typep object type
@defun cl-typep object type
Check if @var{object} is of type @var{type}, where @var{type} is a
(quoted) type name of the sort used by Common Lisp. For example,
@code{(typep foo 'integer)} is equivalent to @code{(integerp foo)}.
@code{(cl-typep foo 'integer)} is equivalent to @code{(integerp foo)}.
@end defun
The @var{type} argument to the above function is either a symbol
@ -705,18 +675,18 @@ than @samp{-p} are used when appropriate.)
@item
The type symbol @code{t} stands for the union of all types.
@code{(typep @var{object} t)} is always true. Likewise, the
@code{(cl-typep @var{object} t)} is always true. Likewise, the
type symbol @code{nil} stands for nothing at all, and
@code{(typep @var{object} nil)} is always false.
@code{(cl-typep @var{object} nil)} is always false.
@item
The type symbol @code{null} represents the symbol @code{nil}.
Thus @code{(typep @var{object} 'null)} is equivalent to
Thus @code{(cl-typep @var{object} 'null)} is equivalent to
@code{(null @var{object})}.
@item
The type symbol @code{atom} represents all objects that are not cons
cells. Thus @code{(typep @var{object} 'atom)} is equivalent to
cells. Thus @code{(cl-typep @var{object} 'atom)} is equivalent to
@code{(atom @var{object})}.
@item
@ -728,7 +698,7 @@ The type symbols @code{character} and @code{string-char} match
integers in the range from 0 to 255.
@item
The type symbol @code{float} uses the @code{floatp-safe} predicate
The type symbol @code{float} uses the @code{cl-floatp-safe} predicate
defined by this package rather than @code{floatp}, so it will work
correctly even in Emacs versions without floating-point support.
@ -750,7 +720,7 @@ combinations of types. For example, @code{(or integer (float 0 *))}
represents all objects that are integers or non-negative floats.
@item
Lists beginning with @code{member} or @code{member*} represent
Lists beginning with @code{member} or @code{cl-member} represent
objects @code{eql} to any of the following values. For example,
@code{(member 1 2 3 4)} is equivalent to @code{(integer 1 4)},
and @code{(member nil)} is equivalent to @code{null}.
@ -762,9 +732,9 @@ with that object as an argument.
@end itemize
The following function and macro (not technically predicates) are
related to @code{typep}.
related to @code{cl-typep}.
@defun coerce object type
@defun cl-coerce object type
This function attempts to convert @var{object} to the specified
@var{type}. If @var{object} is already of that type as determined by
@code{typep}, it is simply returned. Otherwise, certain types of
@ -774,28 +744,28 @@ converted to that type if possible. If @var{type} is
@code{character}, then strings of length one and symbols with
one-character names can be coerced. If @var{type} is @code{float},
then integers can be coerced in versions of Emacs that support
floats. In all other circumstances, @code{coerce} signals an
floats. In all other circumstances, @code{cl-coerce} signals an
error.
@end defun
@defspec deftype name arglist forms...
@defspec cl-deftype name arglist forms...
This macro defines a new type called @var{name}. It is similar
to @code{defmacro} in many ways; when @var{name} is encountered
as a type name, the body @var{forms} are evaluated and should
return a type specifier that is equivalent to the type. The
@var{arglist} is a Common Lisp argument list of the sort accepted
by @code{defmacro*}. The type specifier @samp{(@var{name} @var{args}...)}
by @code{cl-defmacro}. The type specifier @samp{(@var{name} @var{args}...)}
is expanded by calling the expander with those arguments; the type
symbol @samp{@var{name}} is expanded by calling the expander with
no arguments. The @var{arglist} is processed the same as for
@code{defmacro*} except that optional arguments without explicit
@code{cl-defmacro} except that optional arguments without explicit
defaults use @code{*} instead of @code{nil} as the ``default''
default. Some examples:
@example
(deftype null () '(satisfies null)) ; predefined
(deftype list () '(or null cons)) ; predefined
(deftype unsigned-byte (&optional bits)
(cl-deftype null () '(satisfies null)) ; predefined
(cl-deftype list () '(or null cons)) ; predefined
(cl-deftype unsigned-byte (&optional bits)
(list 'integer 0 (if (eq bits '*) bits (1- (lsh 1 bits)))))
(unsigned-byte 8) @equiv{} (integer 0 255)
(unsigned-byte) @equiv{} (integer 0 *)
@ -808,21 +778,21 @@ type specifier could be implemented if desired; this package does
not implement @code{unsigned-byte} by default.
@end defspec
The @code{typecase} and @code{check-type} macros also use type
names. @xref{Conditionals}. @xref{Assertions}. The @code{map},
@code{concatenate}, and @code{merge} functions take type-name
The @code{cl-typecase} and @code{cl-check-type} macros also use type
names. @xref{Conditionals}. @xref{Assertions}. The @code{cl-map},
@code{cl-concatenate}, and @code{cl-merge} functions take type-name
arguments to specify the type of sequence to return. @xref{Sequences}.
@node Equality Predicates
@section Equality Predicates
@noindent
This package defines the Common Lisp predicate @code{equalp}.
This package defines the Common Lisp predicate @code{cl-equalp}.
@defun equalp a b
@defun cl-equalp a b
This function is a more flexible version of @code{equal}. In
particular, it compares strings case-insensitively, and it compares
numbers without regard to type (so that @code{(equalp 3 3.0)} is
numbers without regard to type (so that @code{(cl-equalp 3 3.0)} is
true). Vectors and conses are compared recursively. All other
objects are compared as if by @code{equal}.
@ -831,15 +801,15 @@ respects. First, Common Lisp's @code{equalp} also compares
@emph{characters} case-insensitively, which would be impractical
in this package since Emacs does not distinguish between integers
and characters. In keeping with the idea that strings are less
vector-like in Emacs Lisp, this package's @code{equalp} also will
vector-like in Emacs Lisp, this package's @code{cl-equalp} also will
not compare strings against vectors of integers.
@end defun
Also note that the Common Lisp functions @code{member} and @code{assoc}
use @code{eql} to compare elements, whereas Emacs Lisp follows the
MacLisp tradition and uses @code{equal} for these two functions.
In Emacs, use @code{member*} and @code{assoc*} to get functions
which use @code{eql} for comparisons.
In Emacs, use @code{memq} (or @code{cl-member}) and @code{assq} (or
@code{cl-assoc}) to get functions which use @code{eql} for comparisons.
@node Control Structure
@chapter Control Structure
@ -847,28 +817,32 @@ which use @code{eql} for comparisons.
@noindent
The features described in the following sections implement
various advanced control structures, including the powerful
@c FIXME setf is now in gv.el, not cl.
@code{setf} facility and a number of looping and conditional
constructs.
@c FIXME setf, push are standard now.
@c lexical-let is obsolete; flet is not cl-flet.
@c values is not cl-values.
@menu
* Assignment:: The @code{psetq} form
* Generalized Variables:: @code{setf}, @code{incf}, @code{push}, etc.
* Variable Bindings:: @code{progv}, @code{lexical-let}, @code{flet}, @code{macrolet}
* Conditionals:: @code{case}, @code{typecase}
* Blocks and Exits:: @code{block}, @code{return}, @code{return-from}
* Iteration:: @code{do}, @code{dotimes}, @code{dolist}, @code{do-symbols}
* Loop Facility:: The Common Lisp @code{loop} macro
* Multiple Values:: @code{values}, @code{multiple-value-bind}, etc.
* Assignment:: The @code{cl-psetq} form.
* Generalized Variables:: @code{setf}, @code{cl-incf}, @code{push}, etc.
* Variable Bindings:: @code{cl-progv}, @code{lexical-let}, @code{flet}, @code{cl-macrolet}.
* Conditionals:: @code{cl-case}, @code{cl-typecase}.
* Blocks and Exits:: @code{cl-block}, @code{cl-return}, @code{cl-return-from}.
* Iteration:: @code{cl-do}, @code{cl-dotimes}, @code{cl-dolist}, @code{cl-do-symbols}.
* Loop Facility:: The Common Lisp @code{cl-loop} macro.
* Multiple Values:: @code{values}, @code{cl-multiple-value-bind}, etc.
@end menu
@node Assignment
@section Assignment
@noindent
The @code{psetq} form is just like @code{setq}, except that multiple
The @code{cl-psetq} form is just like @code{setq}, except that multiple
assignments are done in parallel rather than sequentially.
@defspec psetq [symbol form]@dots{}
@defspec cl-psetq [symbol form]@dots{}
This special form (actually a macro) is used to assign to several
variables simultaneously. Given only one @var{symbol} and @var{form},
it has the same effect as @code{setq}. Given several @var{symbol}
@ -883,21 +857,22 @@ x
y ; @r{@code{y} was computed after @code{x} was set.}
@result{} 15
(setq x 2 y 3)
(psetq x (+ x y) y (* x y))
(cl-psetq x (+ x y) y (* x y))
x
@result{} 5
y ; @r{@code{y} was computed before @code{x} was set.}
@result{} 6
@end example
The simplest use of @code{psetq} is @code{(psetq x y y x)}, which
exchanges the values of two variables. (The @code{rotatef} form
The simplest use of @code{cl-psetq} is @code{(cl-psetq x y y x)}, which
exchanges the values of two variables. (The @code{cl-rotatef} form
provides an even more convenient way to swap two variables;
@pxref{Modify Macros}.)
@code{psetq} always returns @code{nil}.
@code{cl-psetq} always returns @code{nil}.
@end defspec
@c FIXME now in gv.el.
@node Generalized Variables
@section Generalized Variables
@ -922,9 +897,9 @@ Just as certain forms like @code{a[i]} can be lvalues in C, there
is a set of forms that can be generalized variables in Lisp.
@menu
* Basic Setf:: @code{setf} and place forms
* Modify Macros:: @code{incf}, @code{push}, @code{rotatef}, @code{letf}, @code{callf}, etc.
* Customizing Setf:: @code{define-modify-macro}, @code{defsetf}, @code{define-setf-method}
* Basic Setf:: @code{setf} and place forms.
* Modify Macros:: @code{cl-incf}, @code{push}, @code{cl-rotatef}, @code{letf}, @code{cl-callf}, etc.
* Customizing Setf:: @code{define-modify-macro}, @code{defsetf}, @code{define-setf-method}.
@end menu
@node Basic Setf
@ -1107,7 +1082,7 @@ that operate on generalized variables. Many are interesting and
useful even when the @var{place} is just a variable name.
@defspec psetf [place form]@dots{}
This macro is to @code{setf} what @code{psetq} is to @code{setq}:
This macro is to @code{setf} what @code{cl-psetq} is to @code{setq}:
When several @var{place}s and @var{form}s are involved, the
assignments take place in parallel rather than sequentially.
Specifically, all subforms are evaluated from left to right, then
@ -1533,10 +1508,10 @@ analogous to Lisp's built-in @code{let} form.
are also related to variable bindings.
@menu
* Dynamic Bindings:: The @code{progv} form
* Lexical Bindings:: @code{lexical-let} and lexical closures
* Function Bindings:: @code{flet} and @code{labels}
* Macro Bindings:: @code{macrolet} and @code{symbol-macrolet}
* Dynamic Bindings:: The @code{progv} form.
* Lexical Bindings:: @code{lexical-let} and lexical closures.
* Function Bindings:: @code{flet} and @code{labels}.
* Macro Bindings:: @code{macrolet} and @code{symbol-macrolet}.
@end menu
@node Dynamic Bindings
@ -1563,7 +1538,7 @@ are ignored.
@subsection Lexical Bindings
@noindent
The @dfn{CL} package defines the following macro which
The @code{CL} package defines the following macro which
more closely follows the Common Lisp @code{let} form:
@defspec lexical-let (bindings@dots{}) forms@dots{}
@ -1984,7 +1959,7 @@ looping constructs to complement Emacs Lisp's basic @code{while}
loop.
@defspec loop forms@dots{}
The @dfn{CL} package supports both the simple, old-style meaning of
The @code{CL} package supports both the simple, old-style meaning of
@code{loop} and the extremely powerful and flexible feature known as
the @dfn{Loop Facility} or @dfn{Loop Macro}. This more advanced
facility is discussed in the following section; @pxref{Loop Facility}.
@ -2026,7 +2001,7 @@ associated @var{init} value as if by a @code{let} form. Then, in
each iteration of the loop, the @var{end-test} is evaluated; if
true, the loop is finished. Otherwise, the body @var{forms} are
evaluated, then each @var{var} is set to the associated @var{step}
expression (as if by a @code{psetq} form) and the next iteration
expression (as if by a @code{cl-psetq} form) and the next iteration
begins. Once the @var{end-test} becomes true, the @var{result}
forms are evaluated (with the @var{var}s still bound to their
values) to produce the result returned by @code{do}.
@ -2065,7 +2040,7 @@ the rest of the loop.
This is to @code{do} what @code{let*} is to @code{let}. In
particular, the initial values are bound as if by @code{let*}
rather than @code{let}, and the steps are assigned as if by
@code{setq} rather than @code{psetq}.
@code{setq} rather than @code{cl-psetq}.
Here is another way to write the above loop:
@ -2133,12 +2108,12 @@ construct called the ``Loop Facility'' or ``@code{loop} macro,''
with an easy-to-use but very powerful and expressive syntax.
@menu
* Loop Basics:: @code{loop} macro, basic clause structure
* Loop Examples:: Working examples of @code{loop} macro
* For Clauses:: Clauses introduced by @code{for} or @code{as}
* Loop Basics:: @code{loop} macro, basic clause structure.
* Loop Examples:: Working examples of @code{loop} macro.
* For Clauses:: Clauses introduced by @code{for} or @code{as}.
* Iteration Clauses:: @code{repeat}, @code{while}, @code{thereis}, etc.
* Accumulation Clauses:: @code{collect}, @code{sum}, @code{maximize}, etc.
* Other Clauses:: @code{with}, @code{if}, @code{initially}, @code{finally}
* Other Clauses:: @code{with}, @code{if}, @code{initially}, @code{finally}.
@end menu
@node Loop Basics
@ -2546,7 +2521,7 @@ If you include several @code{for} clauses in a row, they are
treated sequentially (as if by @code{let*} and @code{setq}).
You can instead use the word @code{and} to link the clauses,
in which case they are processed in parallel (as if by @code{let}
and @code{psetq}).
and @code{cl-psetq}).
@example
(loop for x below 5 for y = nil then x collect (list x y))
@ -3177,8 +3152,8 @@ This package defines several symbol-related features that were
missing from Emacs Lisp.
@menu
* Property Lists:: @code{get*}, @code{remprop}, @code{getf}, @code{remf}
* Creating Symbols:: @code{gensym}, @code{gentemp}
* Property Lists:: @code{get*}, @code{remprop}, @code{getf}, @code{remf}.
* Creating Symbols:: @code{gensym}, @code{gentemp}.
@end menu
@node Property Lists
@ -3321,8 +3296,8 @@ which were left out of Emacs Lisp.
@menu
* Predicates on Numbers:: @code{plusp}, @code{oddp}, @code{floatp-safe}, etc.
* Numerical Functions:: @code{abs}, @code{floor*}, etc.
* Random Numbers:: @code{random*}, @code{make-random-state}
* Implementation Parameters:: @code{most-positive-float}
* Random Numbers:: @code{random*}, @code{make-random-state}.
* Implementation Parameters:: @code{most-positive-float}.
@end menu
@iftex
@ -3614,11 +3589,11 @@ Emacs Lisp includes a few of these, notably @code{elt} and
@code{length}; this package defines most of the rest.
@menu
* Sequence Basics:: Arguments shared by all sequence functions
* Sequence Basics:: Arguments shared by all sequence functions.
* Mapping over Sequences:: @code{mapcar*}, @code{mapcan}, @code{map}, @code{every}, etc.
* Sequence Functions:: @code{subseq}, @code{remove*}, @code{substitute}, etc.
* Searching Sequences:: @code{find}, @code{position}, @code{count}, @code{search}, etc.
* Sorting Sequences:: @code{sort*}, @code{stable-sort}, @code{merge}
* Sorting Sequences:: @code{sort*}, @code{stable-sort}, @code{merge}.
@end menu
@node Sequence Basics
@ -4101,7 +4076,7 @@ The functions described here operate on lists.
* List Functions:: @code{caddr}, @code{first}, @code{list*}, etc.
* Substitution of Expressions:: @code{subst}, @code{sublis}, etc.
* Lists as Sets:: @code{member*}, @code{adjoin}, @code{union}, etc.
* Association Lists:: @code{assoc*}, @code{rassoc*}, @code{acons}, @code{pairlis}
* Association Lists:: @code{assoc*}, @code{rassoc*}, @code{acons}, @code{pairlis}.
@end menu
@node List Functions
@ -5045,7 +5020,7 @@ Lisp.
@appendixsec The @code{cl-compat} package
@noindent
The @dfn{CL} package includes emulations of some features of the
The @code{CL} package includes emulations of some features of the
old @file{cl.el}, in the form of a compatibility package
@code{cl-compat}. This file is obsolete and may be removed in future,
so it should not be used in new code.
@ -5066,7 +5041,7 @@ best fix is to change to use @code{setf} properly.
The @code{cl-compat} file defines the keyword functions
@code{keywordp}, @code{keyword-of}, and @code{defkeyword},
which are not defined by the new @dfn{CL} package because the
which are not defined by the new @code{CL} package because the
use of keywords as data is discouraged.
The @code{build-klist} mechanism for parsing keyword arguments

View file

@ -1981,7 +1981,7 @@ usually not desired. D-Bus errors in events can be made visible by
setting the variable @code{dbus-debug} to @code{t}. They can also be
handled by a hook function.
@defvar dbus-event-error-hooks
@defvar dbus-event-error-functions
This hook variable keeps a list of functions, which are called when a
D-Bus error happens in the event handler. Every function must accept
two arguments, the event and the error variable caught in
@ -1997,7 +1997,7 @@ Example:
(message "my-dbus-event-error-handler: %S %S" event error)
(signal 'file-error (cdr error))))
(add-hook 'dbus-event-error-hooks 'my-dbus-event-error-handler)
(add-hook 'dbus-event-error-functions 'my-dbus-event-error-handler)
@end lisp
@end defvar

View file

@ -1248,7 +1248,7 @@ detection scheme works like this:
@table @asis
@item Step 1:
@code{find-file-hooks} calls @code{ede-turn-on-hook} on BUFFER.
@code{find-file-hook} calls @code{ede-turn-on-hook} on BUFFER.
@item Step 2:
@code{ede-turn-on-hook} turns on @code{ede-minor-mode}
@item Step 3:

View file

@ -1248,7 +1248,7 @@ This hook is run just before @code{ediff-quit-hook}. This is a good
place to do various cleanups, such as deleting the variant buffers.
Ediff provides a function, @code{ediff-janitor}, as one such possible
hook, which you can add to @code{ediff-cleanup-hook} with
@code{add-hooks}.
@code{add-hook}.
@findex ediff-janitor
This function kills buffers A, B, and, possibly, C, if these buffers aren't

View file

@ -170,8 +170,8 @@ of the buffer are parsed using the specifications in
@code{forms-format-list}, and the data file is updated. If the record
has fields that aren't included in the display, they are not changed.
@vindex forms-mode-hooks
Entering Forms mode runs the normal hook @code{forms-mode-hooks} to
@vindex forms-mode-hook
Entering Forms mode runs the normal hook @code{forms-mode-hook} to
perform user-defined customization.
To save any modified data, you can use @kbd{C-x C-s}

View file

@ -3148,7 +3148,7 @@ following is added to a group parameter
@lisp
(gnus-summary-prepared-hook
'(lambda nil (local-set-key "d" (local-key-binding "n"))))
(lambda nil (local-set-key "d" (local-key-binding "n"))))
@end lisp
when the group is entered, the 'd' key will not mark the article as

View file

@ -429,7 +429,7 @@ for a description about @dfn{normal hooks} and @dfn{abnormal hooks}.
MH-E uses normal hooks in nearly all cases, so you can assume that we
are talking about normal hooks unless we explicitly mention that a
hook is abnormal. We also follow the conventions described in that
section: the name of the abnormal hooks end in @code{-hooks} and all
section: the name of the abnormal hooks end in @code{-functions} and all
the rest of the MH-E hooks end in @code{-hook}. You can add hooks with
either @code{customize-option} or @code{add-hook}.
@ -3749,9 +3749,9 @@ when you press @key{TAB} when prompted for a folder name.
@findex mh-search-p
@kindex k
@vindex mh-kill-folder-suppress-prompt-hooks
@vindex mh-kill-folder-suppress-prompt-functions
The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal
The hook @code{mh-kill-folder-suppress-prompt-functions} is an abnormal
hook run at the beginning of the command @kbd{k}. The hook functions
are called with no arguments and should return a non-nil value to
suppress the normal prompt when you remove a folder. This is useful

View file

@ -277,7 +277,7 @@ variable. This allows SemanticDB to save tag caches in directories
controlled by them.
@end defvar
@deffn Option semanticdb-save-database-hooks
@deffn Option semanticdb-save-database-functions
Abnormal hook run after a database is saved. Each function is called
with one argument, the object representing the database recently
written.

View file

@ -3007,10 +3007,10 @@ checksum.
@lisp
(add-hook
'find-file-hooks
'(lambda ()
(when (file-remote-p default-directory)
(set (make-local-variable 'file-precious-flag) t))))
'find-file-hook
(lambda ()
(when (file-remote-p default-directory)
(set (make-local-variable 'file-precious-flag) t))))
@end lisp
@end itemize
@ -3126,7 +3126,7 @@ into your @file{~/.emacs}:
(setq mode-line-format
(format-mode-line mode-line-format 'font-lock-warning-face))))
(add-hook 'find-file-hooks 'my-mode-line-function)
(add-hook 'find-file-hook 'my-mode-line-function)
(add-hook 'dired-mode-hook 'my-mode-line-function)
@end lisp
@end ifset
@ -3159,10 +3159,10 @@ should put it into your @file{~/.emacs}:
(add-hook
'dired-mode-hook
'(lambda ()
(setq
mode-line-buffer-identification
my-mode-line-buffer-identification)))
(lambda ()
(setq
mode-line-buffer-identification
my-mode-line-buffer-identification)))
@end lisp
Since @value{emacsname} 23.1, the mode line contains an indication if
@ -3195,9 +3195,9 @@ like this:
@lisp
(add-hook
'dired-before-readin-hook
'(lambda ()
(when (file-remote-p default-directory)
(setq dired-actual-switches "-al"))))
(lambda ()
(when (file-remote-p default-directory)
(setq dired-actual-switches "-al"))))
@end lisp
@end ifset
@ -3329,9 +3329,9 @@ minibuffer:
(add-hook
'minibuffer-setup-hook
'(lambda ()
(abbrev-mode 1)
(setq local-abbrev-table my-tramp-abbrev-table)))
(lambda ()
(abbrev-mode 1)
(setq local-abbrev-table my-tramp-abbrev-table)))
(defadvice minibuffer-complete
(before my-minibuffer-complete activate)
@ -3398,7 +3398,7 @@ their readability through a remote access:
@ifset xemacs
(recent-files-initialize)
(add-hook
'find-file-hooks
'find-file-hook
(lambda ()
(when (file-remote-p (buffer-file-name))
(recent-files-make-permanent)))

View file

@ -1,3 +1,15 @@
2012-10-23 Paul Eggert <eggert@cs.ucla.edu>
Fix outdated timestamp documentation in Elisp manual (bug#12706).
* NEWS: Document increased precision in undo list.
2012-10-21 Glenn Morris <rgm@gnu.org>
* images/icons/hicolor/32x32/apps/emacs22.png:
* images/icons/hicolor/16x16/apps/emacs22.png:
* images/icons/hicolor/48x48/apps/emacs22.png:
* images/icons/hicolor/24x24/apps/emacs22.png: Restore old icons.
2012-10-14 Kenichi Handa <handa@gnu.org>
* charsets/JISC6226.map: Re-generated.
@ -9,12 +21,12 @@
2012-10-11 Kenichi Handa <handa@gnu.org>
* charsets/CNS-2.map, charsets/CNS-3.map, charsets/CNS-4.map,
charsets/CNS-5.map, charsets/CNS-6.map, charsets/CNS-7.map,
charsets/CP932-2BYTE.map, charsets/GB180302.map,
charsets/GB180304.map, charsets/JISC6226.map,
charsets/JISX2131.map, charsets/MIK.map, charsets/PTCP154.map,
charsets/stdenc.map, charsets/symbol.map: Re-generated.
* charsets/CNS-2.map, charsets/CNS-3.map, charsets/CNS-4.map:
* charsets/CNS-5.map, charsets/CNS-6.map, charsets/CNS-7.map:
* charsets/CP932-2BYTE.map, charsets/GB180302.map:
* charsets/GB180304.map, charsets/JISC6226.map:
* charsets/JISX2131.map, charsets/MIK.map, charsets/PTCP154.map:
* charsets/stdenc.map, charsets/symbol.map: Re-generate.
2012-10-07 Jan Djärv <jan.h.d@swipnet.se>

View file

@ -621,6 +621,29 @@ enabled.
** FIXME something happened to ses.el, 2012-04-17.
** Hooks renamed to avoid obsolete "-hooks" suffix:
*** semantic-lex-reset-hooks -> semantic-lex-reset-functions
*** semantic-change-hooks -> semantic-change-functions
*** semantic-edits-new-change-hooks -> semantic-edits-new-change-functions
*** semantic-edits-delete-change-hooks -> semantic-edits-delete-change-functions
*** semantic-edits-reparse-change-hooks -> semantic-edits-reparse-change-functions
*** semanticdb-save-database-hooks -> semanticdb-save-database-functions
*** c-prepare-bug-report-hooks -> c-prepare-bug-report-hook
*** rcirc-sentinel-hooks -> rcirc-sentinel-functions
*** rcirc-receive-message-hooks -> rcirc-receive-message-functions
*** rcirc-activity-hooks -> rcirc-activity-functions
*** rcirc-print-hooks -> rcirc-print-functions
*** dbus-event-error-hooks -> dbus-event-error-functions
*** eieio-pre-method-execution-hooks -> eieio-pre-method-execution-functions
*** checkdoc-style-hooks -> checkdoc-style-functions
*** checkdoc-comment-style-hooks -> checkdoc-comment-style-functions
*** archive-extract-hooks -> archive-extract-hook
*** filesets-cache-fill-content-hooks -> filesets-cache-fill-content-hook
*** hfy-post-html-hooks -> hfy-post-html-hook
*** nndiary-request-create-group-hooks -> nndiary-request-create-group-functions
*** nndiary-request-update-info-hooks -> nndiary-request-update-info-functions
*** nndiary-request-accept-article-hooks -> nndiary-request-accept-article-functions
*** gnus-subscribe-newsgroup-hooks -> gnus-subscribe-newsgroup-functions
** Obsolete packages:
+++
@ -843,6 +866,9 @@ stamps are still accepted.
The PSECS slot is new, and uses picosecond resolution. It can be
accessed via the new timer--psecs accessor.
*** Last-modified time stamps in undo lists now are of the form
(t HI-SECS LO-SECS USECS PSECS) instead of (t HI-SECS . LO-SECS).
+++
** Floating point functions now always return special values like NaN,
instead of signaling errors, if given invalid args, e.g. (log -1.0).
@ -890,6 +916,7 @@ See the "Face Attributes" section of the Elisp manual.
*** `window-system-version'
*** `dired-pop-to-buffer' (use `dired-mark-pop-up')
*** `query-replace-interactive'
*** `font-list-limit' (has had no effect since Emacs < 23)
* Changes in Emacs 24.3 on non-free operating systems

View file

@ -9,6 +9,13 @@ Copyright (C) 2007-2012 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
Files: hicolor/16x16/apps/emacs22.png hicolor/24x24/apps/emacs22.png
hicolor/32x32/apps/emacs22.png hicolor/48x48/apps/emacs22.png
Author: Andrew Zhilin <andrew_zhilin@yahoo.com>
Copyright (C) 2005-2012 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
Files: allout-widgets-dark-bg/closed.png
allout-widgets-dark-bg/closed.xpm
allout-widgets-dark-bg/empty.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -1,3 +1,26 @@
2012-10-21 Glenn Morris <rgm@gnu.org>
* make-docfile.c (scan_lisp_file): Add cp51932.el and eucjp-ms.el.
2012-10-20 Eli Zaretskii <eliz@gnu.org>
* make-docfile.c (IS_SLASH, DEF_ELISP_FILE): New macros.
(scan_lisp_file): Only pass a .el file if its basename matches a
known file in its entirety. Use IS_SLASH and DEF_ELISP_FILE.
2012-10-20 Andreas Schwab <schwab@linux-m68k.org>
* make-docfile.c (scan_lisp_file): Add bounds checking.
2012-10-20 Eli Zaretskii <eliz@gnu.org>
Prevent silent omission of doc strings from uncompiled Lisp files.
* make-docfile.c (scan_lisp_file): Barf if called with a .el file
other than one of a small list of supported un-compiled files.
* makefile.w32-in (lisp1, lisp2): Name .elc files wherever they
exist. (Bug#12395)
2012-10-17 Eli Zaretskii <eliz@gnu.org>
* ntlib.c: Include <mbstring.h>, to avoid compiler warning about

View file

@ -58,9 +58,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef chdir
#define READ_TEXT "rt"
#define READ_BINARY "rb"
#define IS_SLASH(c) ((c) == '/' || (c) == '\\' || (c) == ':')
#else /* not DOS_NT */
#define READ_TEXT "r"
#define READ_BINARY "r"
#define IS_SLASH(c) ((c) == '/')
#endif /* not DOS_NT */
static int scan_file (char *filename);
@ -1025,9 +1027,9 @@ scan_c_file (char *filename, const char *mode)
arglist, but the doc string must still have a backslash and newline
immediately after the double quote.
The only source files that must follow this convention are preloaded
uncompiled ones like loaddefs.el and bindings.el; aside
from that, it is always the .elc file that we look at, and they are no
problem because byte-compiler output follows this convention.
uncompiled ones like loaddefs.el; aside from that, it is always the .elc
file that we should look at, and they are no problem because byte-compiler
output follows this convention.
The NAME and DOCSTRING are output.
NAME is preceded by `F' for a function or `V' for a variable.
An entry is output only if DOCSTRING has \ newline just after the opening ".
@ -1098,15 +1100,50 @@ search_lisp_doc_at_eol (FILE *infile)
return 1;
}
#define DEF_ELISP_FILE(fn) { #fn, sizeof(#fn) - 1 }
static int
scan_lisp_file (const char *filename, const char *mode)
{
FILE *infile;
register int c;
char *saved_string = 0;
/* These are the only files that are loaded uncompiled, and must
follow the conventions of the doc strings expected by this
function. These conventions are automatically followed by the
byte compiler when it produces the .elc files. */
static struct {
const char *fn;
size_t fl;
} const uncompiled[] = {
DEF_ELISP_FILE (loaddefs.el),
DEF_ELISP_FILE (loadup.el),
DEF_ELISP_FILE (charprop.el),
DEF_ELISP_FILE (cp51932.el),
DEF_ELISP_FILE (eucjp-ms.el)
};
int i, match;
size_t flen = strlen (filename);
if (generate_globals)
fatal ("scanning lisp file when -g specified", 0);
if (flen > 3 && !strcmp (filename + flen - 3, ".el"))
{
for (i = 0, match = 0; i < sizeof (uncompiled) / sizeof (uncompiled[0]);
i++)
{
if (uncompiled[i].fl <= flen
&& !strcmp (filename + flen - uncompiled[i].fl, uncompiled[i].fn)
&& (flen == uncompiled[i].fl
|| IS_SLASH (filename[flen - uncompiled[i].fl - 1])))
{
match = 1;
break;
}
}
if (!match)
fatal ("uncompiled lisp file %s is not supported", filename);
}
infile = fopen (filename, mode);
if (infile == NULL)

View file

@ -209,38 +209,38 @@ lisp1= \
$(lispsource)emacs-lisp/map-ynp.elc \
$(lispsource)menu-bar.elc \
$(lispsource)international/mule.elc \
$(lispsource)international/mule-conf.el \
$(lispsource)international/mule-conf.elc \
$(lispsource)international/mule-cmds.elc \
$(lispsource)international/characters.elc \
$(lispsource)international/charprop.el \
$(lispsource)case-table.elc
lisp2 = \
$(lispsource)language/chinese.el \
$(lispsource)language/cyrillic.el \
$(lispsource)language/indian.el \
$(lispsource)language/sinhala.el \
$(lispsource)language/english.el \
$(lispsource)language/chinese.elc \
$(lispsource)language/cyrillic.elc \
$(lispsource)language/indian.elc \
$(lispsource)language/sinhala.elc \
$(lispsource)language/english.elc \
$(lispsource)language/ethiopic.elc \
$(lispsource)language/european.elc \
$(lispsource)language/czech.el \
$(lispsource)language/slovak.el \
$(lispsource)language/romanian.el \
$(lispsource)language/greek.el \
$(lispsource)language/czech.elc \
$(lispsource)language/slovak.elc \
$(lispsource)language/romanian.elc \
$(lispsource)language/greek.elc \
$(lispsource)language/hebrew.elc \
$(lispsource)language/japanese.el \
$(lispsource)language/korean.el \
$(lispsource)language/lao.el \
$(lispsource)language/cham.el \
$(lispsource)language/tai-viet.el \
$(lispsource)language/thai.el \
$(lispsource)language/japanese.elc \
$(lispsource)language/korean.elc \
$(lispsource)language/lao.elc \
$(lispsource)language/cham.elc \
$(lispsource)language/tai-viet.elc \
$(lispsource)language/thai.elc \
$(lispsource)language/tibetan.elc \
$(lispsource)language/vietnamese.el \
$(lispsource)language/misc-lang.el \
$(lispsource)language/utf-8-lang.el \
$(lispsource)language/georgian.el \
$(lispsource)language/khmer.el \
$(lispsource)language/burmese.el \
$(lispsource)language/vietnamese.elc \
$(lispsource)language/misc-lang.elc \
$(lispsource)language/utf-8-lang.elc \
$(lispsource)language/georgian.elc \
$(lispsource)language/khmer.elc \
$(lispsource)language/burmese.elc \
$(lispsource)register.elc \
$(lispsource)replace.elc \
$(lispsource)simple.elc \
@ -266,7 +266,7 @@ lisp2 = \
$(WINDOW_SUPPORT) \
$(lispsource)widget.elc \
$(lispsource)window.elc \
$(lispsource)version.el
$(lispsource)version.elc
# This is needed the first time we build the tree, since temacs.exe
# does not exist yet, and the DOC rule needs it to rebuild DOC whenever

View file

@ -1,3 +1,116 @@
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* htmlfontify.el (hfy-post-html-hook):
* filesets.el (filesets-cache-fill-content-hook):
* arc-mode.el (archive-extract-hook):
* progmodes/cc-mode.el (c-prepare-bug-report-hook):
* net/rcirc.el (rcirc-sentinel-functions)
(rcirc-receive-message-functions, rcirc-activity-functions)
(rcirc-print-functions):
* net/dbus.el (dbus-event-error-functions):
* emacs-lisp/eieio.el (eieio-pre-method-execution-functions):
* emacs-lisp/checkdoc.el (checkdoc-style-functions)
(checkdoc-comment-style-functions): Don't use "-hooks" suffix.
* term/sun.el (sun-raw-prefix-hooks):
* mail/sendmail.el (mail-yank-hooks): Use make-obsolete-variable.
2012-10-23 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-smb.el (tramp-smb-maybe-open-connection):
Set `tramp-chunksize' to 1. This improves the performance.
(tramp-smb-wait-for-output): Add timeout to
`tramp-accept-process-output' calls.
2012-10-23 Chong Yidong <cyd@gnu.org>
* faces.el (font-list-limit): Define as an obsolete variable.
* startup.el (command-line):
* cus-start.el: Don't refer to font-list-limit.
* newcomment.el (comment-normalize-vars): Doc fix (Bug#12583).
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (internal-temp-output-buffer-show): Rename from
temp-output-buffer-show, since previously compiled files expect this name.
2012-10-23 Glenn Morris <rgm@gnu.org>
* image.el (image-type-from-file-name): If multiple types match,
return the first one that is supported. (Bug#9045)
2012-10-22 Glenn Morris <rgm@gnu.org>
* image.el (imagemagick-enabled-types): Doc fix.
2012-10-22 Takafumi Arakaki <aka.tkf@gmail.com> (tiny change)
* progmodes/which-func.el (which-func-current): The hash-table may have
an explicit nil (bug#12338).
2012-10-22 Stefan Monnier <monnier@iro.umontreal.ca>
* electric.el (electric-pair-delete-selection-self-insert-function):
Rename to electric-pair-will-use-region, return a boolean.
(electric-pair-mode): Adjust accordingly. Don't require delsel.
* delsel.el (delete-selection-helper): Use a function instead of a hook.
(delete-selection-pre-hook): Use use-region-p.
(delete-selection-self-insert-function): Remove.
(self-insert-command): Obey self-insert-uses-region-functions.
(self-insert-iso): Revert to previous setting, since we don't actually
know what that command does.
(delete-selection-self-insert-hooks): Remove.
2012-10-22 Simon Law <sfllaw@sfllaw.ca> (tiny change)
* delsel.el (delete-selection-helper): New function, extracted from
delete-selection-pre-hook.
(delete-selection-pre-hook): Use it.
(delete-selection-self-insert-function): New function.
(delete-selection-self-insert-hooks): New hook.
(self-insert-command, self-insert-iso): Use it.
* electric.el (electric-pair-syntax): New function, extracted from
electric-pair-post-self-insert-function.
(electric-pair-post-self-insert-function): Use it.
(electric-pair-delete-selection-self-insert-function): New function.
(electric-pair-mode): Require delsel and setup
delete-selection-self-insert-hooks (bug#11520).
2012-10-20 Chong Yidong <cyd@gnu.org>
* vc/vc.el (vc-diff-internal): Set up Diff mode even if there are
no changes to show (Bug#12586).
* eshell/esh-cmd.el (eshell-rewrite-for-command): Copy the body
list explicitly (Bug#12571).
2012-10-20 Arne Jørgensen <arne@arnested.dk>
* progmodes/flymake.el (flymake-create-temp-inplace):
Use file-truename.
2012-10-20 Eli Zaretskii <eliz@gnu.org>
* loadup.el: Update comment about uncompiled Lisp files. (Bug#12395)
2012-10-20 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-units.el (math-extract-units): Properly extract powers
of units.
2012-10-20 Daniel Colascione <dancol@dancol.org>
* frame.el (make-frame): Set x-display-name as we used to in order
to unbreak creating an X11 frame from an Emacs daemon started
without a display.
2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuffer.el (minibuffer-force-complete): Make the next completion use
the same completion-field (bug@12221).
2012-10-19 Martin Rudalics <rudalics@gmx.at>
* emacs-lisp/debug.el (debug): Record height of debugger window

View file

@ -140,8 +140,10 @@ A local copy of the archive will be used when updating."
:type 'regexp
:group 'archive)
(defcustom archive-extract-hooks nil
"Hooks to run when an archive member has been extracted."
(define-obsolete-variable-alias 'archive-extract-hooks
'archive-extract-hook "24.3")
(defcustom archive-extract-hook nil
"Hook run when an archive member has been extracted."
:type 'hook
:group 'archive)
;; ------------------------------
@ -1078,7 +1080,7 @@ using `make-temp-file', and the generated name is returned."
;; We will write out the archive ourselves if it is
;; part of another archive.
(remove-hook 'write-contents-functions 'archive-write-file t))
(run-hooks 'archive-extract-hooks)
(run-hooks 'archive-extract-hook)
(if archive-read-only
(message "Note: altering this archive is not implemented."))))
(archive-maybe-update t))

View file

@ -1481,10 +1481,16 @@ If COMP or STD is non-nil, put that in the units table instead."
(mapcar 'math-remove-units (cdr expr))))))
(defun math-extract-units (expr)
(if (memq (car-safe expr) '(* /))
(cons (car expr)
(mapcar 'math-extract-units (cdr expr)))
(if (math-check-unit-name expr) expr 1)))
(cond
((memq (car-safe expr) '(* /))
(cons (car expr)
(mapcar 'math-extract-units (cdr expr))))
((and
(eq (car-safe expr) '^)
(math-check-unit-name (nth 1 expr)))
expr)
((math-check-unit-name expr) expr)
(t 1)))
(defun math-build-units-table-buffer (enter-buffer)
(if (not (and math-units-table math-units-table-buffer-valid

View file

@ -1,14 +1,23 @@
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* semantic/db-file.el (semanticdb-save-database-functions):
* semantic/lex.el (semantic-lex-reset-functions):
* semantic/edit.el (semantic-change-functions)
(semantic-edits-new-change-functions)
(semantic-edits-delete-change-functions)
(semantic-edits-reparse-change-functions): Don't use "-hooks" suffix.
2012-10-14 David Engster <deng@randomsample.de>
* semantic.el (semantic-error-if-unparsed): New function. Raise
error if buffer was not parsed by Semantic (bug #12045).
* semantic.el (semantic-error-if-unparsed): New function.
Raise error if buffer was not parsed by Semantic (bug #12045).
(navigate-menu, edit-menu, cedet-menu-map): Enable Semantic items
only if buffer was parsed. Also, replace ':active' with ':enable'
where necessary.
* semantic/wisent/python.el
(semantic-python-get-system-include-path): Use
`python-shell-internal-send-string' if available to query Python
(semantic-python-get-system-include-path):
Use `python-shell-internal-send-string' if available to query Python
for system paths.
* semantic/senator.el (senator-next-tag, senator-previous-tag)
@ -57,8 +66,8 @@
2012-10-06 Chong Yidong <cyd@gnu.org>
* semantic/bovine/grammar.el:
* semantic/wisent/grammar.el: Move from admin/grammars. Add
autoloads for bovine-grammar-mode and wisent-grammar-mode.
* semantic/wisent/grammar.el: Move from admin/grammars.
Add autoloads for bovine-grammar-mode and wisent-grammar-mode.
2012-10-02 Chong Yidong <cyd@gnu.org>
@ -163,8 +172,8 @@
(-scheme, -makefile-misc, ede-proj-target-makefile-program)
(-makefile-archive, -makefile-shared-object)
(ede-proj-target-makefile-info, -grammar): New autoloads.
(ede-proj-project): Inherit from eieio-persistent-read. Specify
extension and header line.
(ede-proj-project): Inherit from eieio-persistent-read.
Specify extension and header line.
(ede-proj-load, ede-proj-save): Replace with impl using
eieio-persistent-read.
@ -176,27 +185,27 @@
(navigate-menu): Add menu item for Stickyfunc mode.
* semantic/analyze/debug.el
(semantic-analyzer-debug-insert-include-summary): Before
dereferencing tableinner, make sure it has a value.
(semantic-analyzer-debug-insert-include-summary):
Before dereferencing tableinner, make sure it has a value.
* semantic/analyze/refs.el
(semantic-analyze-tag-references-default): When doing a lookup,
specify noerror.
(semantic--analyze-refs-full-lookup): Add optional noerror input
argument. Pass to to full-lookup-simple.
(semantic-analyze-refs-impl, semantic-analyze-refs-proto): Ignore
:typemodifiers during compare.
(semantic-analyze-refs-impl, semantic-analyze-refs-proto):
Ignore :typemodifiers during compare.
* semantic/bovine/c.el (semantic-lex-cpp-define): Specify limits
to looking back for comment chars.
(semantic--tag-similar-names-p, semantic--tag-similar-names-p-default)
(semantic--tag-attribute-similar-p): New.
(semantic-c-describe-environment): Handle list value of ede-object.
(semantic-lex-c-preprocessor-symbol-map-builtin): Add
__attribute_pure__.
(semantic-lex-c-preprocessor-symbol-map-builtin):
Add __attribute_pure__.
* semantic/bovine/scm.el (semantic-format-tag-prototype): Add
parent and color argument. Pass them through.
* semantic/bovine/scm.el (semantic-format-tag-prototype):
Add parent and color argument. Pass them through.
* semantic/complete.el (semantic-collector-calculate-completions):
Search for more matches if new prefix is a substring of old one.
@ -217,15 +226,15 @@
the (%d tags) extra string.
(semanticdb-project-database): Specify :type for table.
(semanticdb-create-table-for-file): Specify file-truename.
(semanticdb-synchronize, semanticdb-partial-synchronize): Restore
code that refreshes references to include files.
(semanticdb-synchronize, semanticdb-partial-synchronize):
Restore code that refreshes references to include files.
* semantic/decorate/include.el
(semantic-decoration-on-fileless-includes): New face.
(semantic-decoration-on-fileless-include-map)
(semantic-decoration-on-fileless-include-menu): New variables.
(semantic-decoration-on-includes-highlight-default): Support
includes that have a table, but are not associated with a file.
(semantic-decoration-on-includes-highlight-default):
Support includes that have a table, but are not associated with a file.
(semantic-decoration-fileless-include-describe)
(semantic-decoration-fileless-include-menu): New functions.
(semantic-decoration-all-include-summary): Add arrows to indicate
@ -262,15 +271,15 @@
* semantic/tag.el (semantic-create-tag-proxy)
(semantic-tag-set-proxy, semantic-tag-resolve-proxy): New.
* semantic/util.el (semantic-describe-buffer): Add
semantic-new-buffer-fcn-was-run.
* semantic/util.el (semantic-describe-buffer):
Add semantic-new-buffer-fcn-was-run.
* semantic/wisent/java-tags.el (semantic-get-local-variables): Add
`this' to the local variable context.
* semantic/wisent/java-tags.el (semantic-get-local-variables):
Add `this' to the local variable context.
(semantic-analyze-split-name, semantic-analyze-unsplit-name): New.
* semantic/wisent/python.el (semantic-python-expand-tag): New
function.
* semantic/wisent/python.el (semantic-python-expand-tag):
New function.
* srecode/compile.el (srecode-compile-templates): Add "framework"
special variable support.
@ -280,7 +289,7 @@
(srecode-semantic-handle-:cpp): New functions.
(srecode-semantic-apply-tag-to-dict): Move from cpp-mode function
to c-mode function.
(srecode-c-apply-templates): Renamed from srecode-cpp-apply-templates.
(srecode-c-apply-templates): Rename from srecode-cpp-apply-templates.
* srecode/dictionary.el (initialize-instance): Remove bogus error
condition.
@ -293,8 +302,8 @@
* srecode/mode.el (srecode-minor-mode): Support the m3 menu.
* srecode/semantic.el (srecode-semantic-insert-tag): Support
system includes.
* srecode/semantic.el (srecode-semantic-insert-tag):
Support system includes.
* srecode/srt-mode.el (srecode-font-lock-keywords): Update.
@ -325,8 +334,8 @@
* ede/proj-comp.el (ede-proj-makefile-insert-rules): Fix insertion
of phony rule.
* ede/proj-elisp.el (ede-proj-target-elisp): Remove
ede-emacs-preload-compiler.
* ede/proj-elisp.el (ede-proj-target-elisp):
Remove ede-emacs-preload-compiler.
(ede-proj-makefile-insert-rules, ede-proj-makefile-dependencies):
New methods.
(ede-emacs-compiler): Add 'require' macro to variables and pattern
@ -362,8 +371,8 @@
(semantic-cpp-lexer): Add semantic-lex-c-ifdef.
(semantic-expand-c-tag): Check if tag is non-nil before adding it
to return list
(semantic-expand-c-extern-C, semantic-expand-c-complex-type): New
functions, copied from semantic-expand-c-tag.
(semantic-expand-c-extern-C, semantic-expand-c-complex-type):
New functions, copied from semantic-expand-c-tag.
(semantic-find-tags-included): New override which also searches
for include tags inside of namespaces.
(semantic-c-dereference-typedef): Use semantic-tag-prototype-p.
@ -371,16 +380,16 @@
* semantic/bovine/el.el: Remove emacs-lisp-mode-hook.
* semantic/complete.el (semantic-complete-post-command-hook): Exit
completion when user has deleted all characters from the prefix.
* semantic/complete.el (semantic-complete-post-command-hook):
Exit completion when user has deleted all characters from the prefix.
(semantic-displayor-focus-request): Return to previous window when
focussing tags.
* semantic/db-el.el (semanticdb-normalize-one-tag): Make obsolete.
(semanticdb-elisp-sym->tag): Use help-function-arglist instead.
* semantic/db-file.el (semanticdb-create-database): Use
semantic-tag-version instead of just semantic-version as the
* semantic/db-file.el (semanticdb-create-database):
Use semantic-tag-version instead of just semantic-version as the
initializer for the :semantic-tag-version slot.
* semantic/db-find.el (semanticdb-find-tags-by-class-method):
@ -394,11 +403,11 @@
(semanticdb-save-current-db, semanticdb-save-all-db): Only emit
message when running interactively.
* semantic/decorate/mode.el (semantic-decoration-mode): Activate
decoration of includes by default.
* semantic/decorate/mode.el (semantic-decoration-mode):
Activate decoration of includes by default.
* semantic/doc.el (semantic-doc-snarf-comment-for-tag): Remove
comment delimiter at the end of the text.
* semantic/doc.el (semantic-doc-snarf-comment-for-tag):
Remove comment delimiter at the end of the text.
* semantic/ede-grammar.el (semantic-ede-proj-target-grammar):
Change aux- and pre-load-packages.
@ -412,16 +421,16 @@
(ede-proj-makefile-insert-rules): Add target specific EMACSFLAGS
to raise max-specpdl-size and max-lisp-eval-depth.
* semantic/find.el (semantic-find-tags-included): Make
overridable.
* semantic/find.el (semantic-find-tags-included):
Make overridable.
* semantic/fw.el (semantic-alias-obsolete)
(semantic-varalias-obsolete): Use byte-compile-warn.
(semantic-find-file-noselect): Disable font lock by calling
global-font-lock-mode.
* semantic/grammar.el (semantic-grammar-create-package): Fix
message.
* semantic/grammar.el (semantic-grammar-create-package):
Fix message.
(semantic-grammar-batch-build-one-package): When generating
parsers in batch-mode, ignore version control and make sure we do
not use cached versions.
@ -433,16 +442,16 @@
(semantic-lex-spp-lex-text-string): Instead of only setting the
lexer, call the major mode's setup function.
* semantic/scope.el (semantic-analyze-scoped-types-default): Use
semantic-tag-prototype-p.
* semantic/scope.el (semantic-analyze-scoped-types-default):
Use semantic-tag-prototype-p.
(semantic-analyze-scope-nested-tags-default): Make sure we don't
return tags we already have in scopetypes.
* semantic/symref/filter.el
(semantic-symref-test-count-hits-in-tag): Restore.
* semantic/wisent/comp.el (wisent-BITS-PER-WORD): Use
most-positive-fixnum if available.
* semantic/wisent/comp.el (wisent-BITS-PER-WORD):
Use most-positive-fixnum if available.
* semantic/wisent/javascript.el (semantic-tag-protection)
(semantic-analyze-scope-calculate-access)
@ -477,8 +486,8 @@
2012-10-01 Jan Moringen <jan.moringen@uni-bielefeld.de>
* semantic/idle.el
(semantic-idle-breadcrumbs--display-in-header-line): Escape
%-characters to avoid erroneous expansion in header line.
(semantic-idle-breadcrumbs--display-in-header-line):
Escape %-characters to avoid erroneous expansion in header line.
(semantic-idle-breadcrumbs--display-in-mode-line): Likewise.
* semantic/wisent/python.el (wisent-python-reconstitute-function-tag)
@ -514,8 +523,8 @@
* semantic/wisent/python.el (wisent-python-string-start-re)
(wisent-python-string-re, wisent-python-forward-string)
(wisent-python-forward-line,wisent-python-lex-string): New
variables.
(wisent-python-forward-line,wisent-python-lex-string):
New variables.
(wisent-python-forward-balanced-expression): New function.
2012-10-01 Pete Beardmore <elbeardmorez@msn.com>
@ -528,16 +537,16 @@
(semantic-displayor-tooltip-mode)
(semantic-displayor-tooltip-initial-max-tags)
(semantic-displayor-tooltip-max-tags): New defcustoms.
(semantic-displayor-tooltip): Use new variables as initforms. Use
new slot `mode' instead of `force-show'. Rename `max-tags' to
(semantic-displayor-tooltip): Use new variables as initforms.
Use new slot `mode' instead of `force-show'. Rename `max-tags' to
`max-tags-initial'.
(semantic-displayor-show-request): Display completions according
to new modes, and make variable names clearer.
(semantic-displayor-tooltip::semantic-displayor-scroll-request):
Use new max-tags-initial slot.
* semantic/idle.el (semantic-idle-local-symbol-highlight): Make
sure there actually is a tag at point.
* semantic/idle.el (semantic-idle-local-symbol-highlight):
Make sure there actually is a tag at point.
(semantic-idle-completion-list-default): Report errors as messages
if semantic-idle-scheduler-verbose-flag is non-nil.
@ -548,13 +557,13 @@
2012-10-01 Alex Ott <alexott@gmail.com>
* semantic/idle.el (semantic-idle-scheduler-enabled-p): Fix
file-checking.
* semantic/idle.el (semantic-idle-scheduler-enabled-p):
Fix file-checking.
2012-10-01 Darren Hoo <darren.hoo@gmail.com> (tiny change)
* semantic/db-find.el (semanticdb-find-default-throttle): Make
buffer-local.
* semantic/db-find.el (semanticdb-find-default-throttle):
Make buffer-local.
(semanticdb-strip-find-results): Check for existing :filename
attribute, so that file information from GNU Global is not lost.
@ -1001,7 +1010,7 @@
(ede-customize-forms-menu): Prevent error if there is no project.
(ede-load-project-file): Set ede-constructing to the thing being
constructed, instead of t.
(ede-project-force-load): Deleted.
(ede-project-force-load): Delete.
* ede/base.el:
* ede/auto.el:
@ -1011,7 +1020,7 @@
(autoconf-parameters-for-macro): Parse multiline parameters of
macros. Optionally ignore case and at bol for macro.
(autoconf-parameter-strip): Use greedy match for newlines.
(autoconf-new-automake-string): Deleted.
(autoconf-new-automake-string): Delete.
(autoconf-new-program): Use SRecode to fill an empty file.
* ede/cpp-root.el (ede-create-lots-of-projects-under-dir):
@ -1046,7 +1055,7 @@
(project-am-scan-for-targets): Scan also over
project-am-meta-type-alist.
(ede-system-include-path): Simple implementation.
(ede-find-target): Deleted. EDE core takes care of this.
(ede-find-target): Delete. EDE core takes care of this.
(ede-buffer-mine): Create the searched filename as relative.
(project-am-load): Simplify, using autoconf-edit.
(project-am-extract-package-info): Fix separators.
@ -1063,7 +1072,7 @@
(ede-proj-target-makefile-objectcode): Quote initforms.
Support lex and yacc.
* ede/proj-prog.el (ede-proj-makefile-insert-rules): Removed.
* ede/proj-prog.el (ede-proj-makefile-insert-rules): Remove.
(ede-proj-makefile-insert-variables): New, add LDDEPS.
(ede-proj-makefile-insert-automake-post-variables): Add LDADD
variable. Use ldlibs-local slot. Add a -l to ldlibs strings.
@ -1158,7 +1167,7 @@
* semantic/util.el (semantic-hack-search)
(semantic-recursive-find-nonterminal-by-name)
(semantic-current-tag-interactive): Deleted.
(semantic-current-tag-interactive): Delete.
(semantic-describe-buffer): Fix expand-nonterminal.
Add lex-syntax-mods, type relation separator char, and command
separation char.
@ -1191,7 +1200,7 @@
(semantic-idle-truncate-long-summaries): New option.
* semantic/ia.el (semantic-ia-cache)
(semantic-ia-get-completions): Deleted. Callers changed.
(semantic-ia-get-completions): Delete. Callers changed.
(semantic-ia-show-variants): New command.
(semantic-ia-show-doc): If doc is empty, don't make a temp buffer.
(semantic-ia-show-summary): If there isn't anything to show, say so.

View file

@ -70,7 +70,9 @@ passes a list of predicates in `semanticdb-project-predicate-functions'."
:group 'semanticdb
:type nil)
(defcustom semanticdb-save-database-hooks nil
(define-obsolete-variable-alias 'semanticdb-save-database-hooks
'semanticdb-save-database-functions "24.3")
(defcustom semanticdb-save-database-functions nil
"Abnormal hook run after a database is saved.
Each function is called with one argument, the object representing
the database recently written."
@ -251,7 +253,7 @@ If DB is not specified, then use the current database."
(message "Save Error: %S: %s" (car (cdr foo))
objname)
(error "%S" (car (cdr foo))))))))
(run-hook-with-args 'semanticdb-save-database-hooks
(run-hook-with-args 'semanticdb-save-database-functions
(or DB semanticdb-current-database))
;;(message "Saving tag summary for %s...done" objname)
)

View file

@ -72,7 +72,9 @@ updated in the current buffer.
For language specific hooks, make sure you define this as a local hook.")
(defvar semantic-change-hooks
(define-obsolete-variable-alias 'semantic-change-hooks
'semantic-change-functions "24.3")
(defvar semantic-change-functions
'(semantic-edits-change-function-handle-changes)
"Abnormal hook run when semantic detects a change in a buffer.
Each hook function must take three arguments, identical to the
@ -89,11 +91,15 @@ If the hook returns non-nil, then declare that a reparse is needed.
For language specific hooks, make sure you define this as a local hook.
Not used yet; part of the next generation reparse mechanism.")
(defvar semantic-edits-new-change-hooks nil
(define-obsolete-variable-alias 'semantic-edits-new-change-hooks
'semantic-edits-new-change-functions "24.3")
(defvar semantic-edits-new-change-functions nil
"Abnormal hook run when a new change is found.
Functions must take one argument representing an overlay on that change.")
(defvar semantic-edits-delete-change-hooks nil
(define-obsolete-variable-alias 'semantic-edits-delete-change-hooks
'semantic-edits-delete-change-functions "24.3")
(defvar semantic-edits-delete-change-functions nil
"Abnormal hook run before a change overlay is deleted.
Deleted changes occur when multiple changes are merged.
Functions must take one argument representing an overlay being deleted.")
@ -104,7 +110,9 @@ Changes move when a new change overlaps an old change. The old change
will be moved.
Functions must take one argument representing an overlay being moved.")
(defvar semantic-edits-reparse-change-hooks nil
(define-obsolete-variable-alias 'semantic-edits-reparse-change-hooks
'semantic-edits-reparse-change-functions "24.3")
(defvar semantic-edits-reparse-change-functions nil
"Abnormal hook run after a change results in a reparse.
Functions are called before the overlay is deleted, and after the
incremental reparse.")
@ -133,7 +141,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
(setq semantic-unmatched-syntax-cache-check t)
(let ((inhibit-point-motion-hooks t)
)
(run-hook-with-args 'semantic-change-hooks start end length)
(run-hook-with-args 'semantic-change-functions start end length)
))
(defun semantic-changes-in-region (start end &optional buffer)
@ -168,7 +176,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
;; function will be removed from the list of active change
;; functions.
(condition-case nil
(run-hook-with-args 'semantic-edits-new-change-hooks o)
(run-hook-with-args 'semantic-edits-new-change-functions o)
(error nil)))
(let ((tmp changes-in-change))
;; Find greatest bounds of all changes
@ -188,7 +196,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
;; Delete other changes. They are now all bound here.
(while changes-in-change
(condition-case nil
(run-hook-with-args 'semantic-edits-delete-change-hooks
(run-hook-with-args 'semantic-edits-delete-change-functions
(car changes-in-change))
(error nil))
(semantic-overlay-delete (car changes-in-change))
@ -198,7 +206,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
(defsubst semantic-edits-flush-change (change)
"Flush the CHANGE overlay."
(condition-case nil
(run-hook-with-args 'semantic-edits-delete-change-hooks
(run-hook-with-args 'semantic-edits-delete-change-functions
change)
(error nil))
(semantic-overlay-delete change))

View file

@ -729,7 +729,9 @@ This is an alist of (ANCHOR . STREAM) elements where ANCHOR is the
start position of the block, and STREAM is the list of tokens in that
block.")
(defvar semantic-lex-reset-hooks nil
(define-obsolete-variable-alias 'semantic-lex-reset-hooks
'semantic-lex-reset-functions "24.3")
(defvar semantic-lex-reset-functions nil
"Abnormal hook used by major-modes to reset lexical analyzers.
Hook functions are called with START and END values for the
current lexical pass. Should be set with `add-hook', specifying
@ -771,7 +773,7 @@ analyzer which might mistake a number for as a symbol."
;; Make sure the state of block parsing starts over.
(setq semantic-lex-block-streams nil)
;; Allow specialty reset items.
(run-hook-with-args 'semantic-lex-reset-hooks start end)
(run-hook-with-args 'semantic-lex-reset-functions start end)
;; Lexing state.
(let* (;(starttime (current-time))
(starting-position (point))

View file

@ -487,7 +487,6 @@ since it could result in memory overflow and make Emacs crash."
(hourglass-delay cursor number)
;; xfaces.c
(font-list-limit display integer)
(scalable-fonts-allowed display boolean "22.1")
;; xfns.c
(x-bitmap-file-path installation

View file

@ -44,9 +44,12 @@
;; `kill-region' is used on the selection, rather than
;; `delete-region'. (Text selected with the mouse will typically
;; be yankable anyhow.)
;; non-nil
;; t
;; The normal case: delete the active region prior to executing
;; the command which will insert replacement text.
;; <function>
;; For commands which need to dynamically determine this behaviour.
;; The function should return one of the above values or nil.
;;; Code:
@ -71,65 +74,96 @@ any selection."
(transient-mark-mode t)))
(defun delete-active-region (&optional killp)
"Delete the active region.
If KILLP in not-nil, the active region is killed instead of deleted."
(if killp
(kill-region (point) (mark))
(delete-region (point) (mark)))
t)
(defun delete-selection-pre-hook ()
(when (and delete-selection-mode transient-mark-mode mark-active
(not buffer-read-only))
(let ((type (and (symbolp this-command)
(get this-command 'delete-selection))))
(condition-case data
(cond ((eq type 'kill)
(delete-active-region t))
((eq type 'yank)
;; Before a yank command, make sure we don't yank the
;; head of the kill-ring that really comes from the
;; currently active region we are going to delete.
;; That would make yank a no-op.
(when (and (string= (buffer-substring-no-properties
(point) (mark))
(car kill-ring))
(fboundp 'mouse-region-match)
(mouse-region-match))
(current-kill 1))
(delete-active-region))
((eq type 'supersede)
(let ((empty-region (= (point) (mark))))
(delete-active-region)
(unless empty-region
(setq this-command 'ignore))))
(type
(delete-active-region)
(if (and overwrite-mode
(eq this-command 'self-insert-command))
(let ((overwrite-mode nil))
(self-insert-command
(prefix-numeric-value current-prefix-arg))
(setq this-command 'ignore)))))
;; If ask-user-about-supersession-threat signals an error,
;; stop safe_run_hooks from clearing out pre-command-hook.
(file-supersession (message "%s" (cadr data)) (ding))
(text-read-only
;; This signal may come either from `delete-active-region' or
;; `self-insert-command' (when `overwrite-mode' is non-nil).
;; To avoid clearing out `pre-command-hook' we handle this case
;; by issuing a simple message. Note, however, that we do not
;; handle all related problems: When read-only text ends before
;; the end of the region, the latter is not deleted but any
;; subsequent insertion will succeed. We could avoid this case
;; by doing a (setq this-command 'ignore) here. This would,
;; however, still not handle the case where read-only text ends
;; precisely where the region starts: In that case the deletion
;; would succeed but the subsequent insertion would fail with a
;; text-read-only error. To handle that case we would have to
;; investigate text properties at both ends of the region and
;; skip the deletion when inserting text is forbidden there.
(message "Text is read-only") (ding))))))
(defun delete-selection-helper (type)
"Delete selection according to TYPE:
`yank'
For commands which do a yank; ensures the region about to be
deleted isn't yanked.
`supersede'
Delete the active region and ignore the current command,
i.e. the command will just delete the region.
`kill'
`kill-region' is used on the selection, rather than
`delete-region'. (Text selected with the mouse will typically
be yankable anyhow.)
t
The normal case: delete the active region prior to executing
the command which will insert replacement text.
FUNCTION
For commands which need to dynamically determine this behaviour.
FUNCTION should take no argument and return one of the above values or nil."
(condition-case data
(cond ((eq type 'kill)
(delete-active-region t))
((eq type 'yank)
;; Before a yank command, make sure we don't yank the
;; head of the kill-ring that really comes from the
;; currently active region we are going to delete.
;; That would make yank a no-op.
(when (and (string= (buffer-substring-no-properties
(point) (mark))
(car kill-ring))
(fboundp 'mouse-region-match)
(mouse-region-match))
(current-kill 1))
(delete-active-region))
((eq type 'supersede)
(let ((empty-region (= (point) (mark))))
(delete-active-region)
(unless empty-region
(setq this-command 'ignore))))
((functionp type) (delete-selection-helper (funcall type)))
(type
(delete-active-region)
(if (and overwrite-mode
(eq this-command 'self-insert-command))
(let ((overwrite-mode nil))
(self-insert-command
(prefix-numeric-value current-prefix-arg))
(setq this-command 'ignore)))))
;; If ask-user-about-supersession-threat signals an error,
;; stop safe_run_hooks from clearing out pre-command-hook.
(file-supersession (message "%s" (cadr data)) (ding))
(text-read-only
;; This signal may come either from `delete-active-region' or
;; `self-insert-command' (when `overwrite-mode' is non-nil).
;; To avoid clearing out `pre-command-hook' we handle this case
;; by issuing a simple message. Note, however, that we do not
;; handle all related problems: When read-only text ends before
;; the end of the region, the latter is not deleted but any
;; subsequent insertion will succeed. We could avoid this case
;; by doing a (setq this-command 'ignore) here. This would,
;; however, still not handle the case where read-only text ends
;; precisely where the region starts: In that case the deletion
;; would succeed but the subsequent insertion would fail with a
;; text-read-only error. To handle that case we would have to
;; investigate text properties at both ends of the region and
;; skip the deletion when inserting text is forbidden there.
(message "Text is read-only") (ding))))
(defun delete-selection-pre-hook ()
"Function run before commands that delete selections are executed.
Commands which will delete the selection need a `delete-selection'
property on their symbol; commands which insert text but don't
have this property won't delete the selection.
See `delete-selection-helper'."
(when (and delete-selection-mode (use-region-p)
(not buffer-read-only))
(delete-selection-helper (and (symbolp this-command)
(get this-command 'delete-selection)))))
(put 'self-insert-command 'delete-selection
(lambda ()
(not (run-hook-with-args-until-success
'self-insert-uses-region-functions))))
(put 'self-insert-command 'delete-selection t)
(put 'self-insert-iso 'delete-selection t)
(put 'yank 'delete-selection 'yank)

View file

@ -301,14 +301,17 @@ This can be convenient for people who find it easier to hit ) than C-f."
:version "24.1"
:type 'boolean)
(defun electric-pair-syntax (command-event)
(and electric-pair-mode
(let ((x (assq command-event electric-pair-pairs)))
(cond
(x (if (eq (car x) (cdr x)) ?\" ?\())
((rassq command-event electric-pair-pairs) ?\))
(t (char-syntax command-event))))))
(defun electric-pair-post-self-insert-function ()
(let* ((syntax (and (eq (char-before) last-command-event) ; Sanity check.
electric-pair-mode
(let ((x (assq last-command-event electric-pair-pairs)))
(cond
(x (if (eq (car x) (cdr x)) ?\" ?\())
((rassq last-command-event electric-pair-pairs) ?\))
(t (char-syntax last-command-event))))))
(electric-pair-syntax last-command-event)))
;; FIXME: when inserting the closer, we should maybe use
;; self-insert-command, although it may prove tricky running
;; post-self-insert-hook recursively, and we wouldn't want to trigger
@ -355,6 +358,10 @@ This can be convenient for people who find it easier to hit ) than C-f."
(eq (char-syntax (following-char)) ?w)))
(save-excursion (insert closer))))))
(defun electric-pair-will-use-region ()
(and (use-region-p)
(memq (electric-pair-syntax last-command-event) '(?\( ?\" ?\$))))
;;;###autoload
(define-minor-mode electric-pair-mode
"Toggle automatic parens pairing (Electric Pair mode).
@ -370,10 +377,15 @@ See options `electric-pair-pairs' and `electric-pair-skip-self'."
:global t
:group 'electricity
(if electric-pair-mode
(add-hook 'post-self-insert-hook
#'electric-pair-post-self-insert-function)
(progn
(add-hook 'post-self-insert-hook
#'electric-pair-post-self-insert-function)
(add-hook 'self-insert-uses-region-functions
#'electric-pair-will-use-region))
(remove-hook 'post-self-insert-hook
#'electric-pair-post-self-insert-function)))
#'electric-pair-post-self-insert-function)
(remove-hook 'self-insert-uses-region-functions
#'electric-pair-will-use-region)))
;; Automatically add newlines after/before/around some chars.

View file

@ -124,7 +124,7 @@
;; Adding your own checks:
;;
;; You can experiment with adding your own checks by setting the
;; hooks `checkdoc-style-hooks' and `checkdoc-comment-style-hooks'.
;; hooks `checkdoc-style-functions' and `checkdoc-comment-style-hooks'.
;; Return a string which is the error you wish to report. The cursor
;; position should be preserved.
;;
@ -274,17 +274,21 @@ made in the style guide relating to order."
:type 'boolean)
;;;###autoload(put 'checkdoc-arguments-in-order-flag 'safe-local-variable 'booleanp)
(defvar checkdoc-style-hooks nil
"Hooks called after the standard style check is completed.
All hooks must return nil or a string representing the error found.
(define-obsolete-variable-alias 'checkdoc-style-hooks
'checkdoc-style-functions "24.3")
(defvar checkdoc-style-functions nil
"Hook run after the standard style check is completed.
All functions must return nil or a string representing the error found.
Useful for adding new user implemented commands.
Each hook is called with two parameters, (DEFUNINFO ENDPOINT).
DEFUNINFO is the return value of `checkdoc-defun-info'. ENDPOINT is the
location of end of the documentation string.")
(defvar checkdoc-comment-style-hooks nil
"Hooks called after the standard comment style check is completed.
(define-obsolete-variable-alias 'checkdoc-comment-style-hooks
checkdoc-comment-style-functions "24.3")
(defvar checkdoc-comment-style-functions nil
"Hook run after the standard comment style check is completed.
Must return nil if no errors are found, or a string describing the
problem discovered. This is useful for adding additional checks.")
@ -1843,7 +1847,7 @@ Replace with \"%s\"? " original replace)
;; and reliance on the Ispell program.
(checkdoc-ispell-docstring-engine e)
;; User supplied checks
(save-excursion (checkdoc-run-hooks 'checkdoc-style-hooks fp e))
(save-excursion (checkdoc-run-hooks 'checkdoc-style-functions fp e))
;; Done!
)))
@ -2353,7 +2357,7 @@ Code:, and others referenced in the style guide."
err
(or
;; Generic Full-file checks (should be comment related)
(checkdoc-run-hooks 'checkdoc-comment-style-hooks)
(checkdoc-run-hooks 'checkdoc-comment-style-functions)
err))
;; Done with full file comment checks
err)))

View file

@ -2066,7 +2066,9 @@ Keys are a number representing :before, :primary, and :after methods.")
During executions, the list is first generated, then as each next method
is called, the next method is popped off the stack.")
(defvar eieio-pre-method-execution-hooks nil
(define-obsolete-variable-alias 'eieio-pre-method-execution-hooks
'eieio-pre-method-execution-functions "24.3")
(defvar eieio-pre-method-execution-functions nil
"Abnormal hook run just before an EIEIO method is executed.
The hook function must accept one argument, the list of forms
about to be executed.")
@ -2172,7 +2174,7 @@ This should only be called from a generic function."
(eieiomt-method-list method method-primary nil)))
)
(run-hook-with-args 'eieio-pre-method-execution-hooks
(run-hook-with-args 'eieio-pre-method-execution-functions
primarymethodlist)
;; Now loop through all occurrences forms which we must execute
@ -2277,7 +2279,7 @@ for this common case to improve performance."
;; Do the regular implementation here.
(run-hook-with-args 'eieio-pre-method-execution-hooks
(run-hook-with-args 'eieio-pre-method-execution-functions
lambdas)
(setq lastval (apply (car lambdas) newargs))

View file

@ -484,20 +484,22 @@ implemented via rewriting, rather than as a function."
(let ((body (car (last terms))))
(setcdr (last terms 2) nil)
`(let ((for-items
(append
,@(mapcar
(lambda (elem)
(if (listp elem)
elem
`(list ,elem)))
(cdr (cddr terms)))))
(eshell-command-body '(nil))
(copy-tree
(append
,@(mapcar
(lambda (elem)
(if (listp elem)
elem
`(list ,elem)))
(cdr (cddr terms))))))
(eshell-command-body '(nil))
(eshell-test-body '(nil)))
(while (consp for-items)
(let ((,(intern (cadr terms)) (car for-items)))
(eshell-protect
,(eshell-invokify-arg body t)))
(setq for-items (cdr for-items)))
(while (car for-items)
(let ((,(intern (cadr terms)) (car for-items)))
(eshell-protect
,(eshell-invokify-arg body t)))
(setcar for-items (cadr for-items))
(setcdr for-items (cddr for-items)))
(eshell-close-handles
eshell-last-command-status
(list 'quote eshell-last-command-result))))))

View file

@ -2572,6 +2572,12 @@ also the same size as FACE on FRAME, or fail."
(car fonts))
(cdr (assq 'font (frame-parameters (selected-frame))))))
(defcustom font-list-limit 100
"This variable is obsolete and has no effect."
:type 'integer
:group 'display)
(make-obsolete-variable 'font-list-limit nil "24.3")
(provide 'faces)
;;; faces.el ends here

View file

@ -403,8 +403,10 @@ Don't forget to check out `filesets-menu-ensure-use-cached'."
(sexp :tag "Other" :value nil)))
:group 'filesets)
(defcustom filesets-cache-fill-content-hooks nil
"Hooks to run when writing the contents of filesets' cache file.
(define-obsolete-variable-alias 'filesets-cache-fill-content-hooks
'filesets-cache-fill-content-hook "24.3")
(defcustom filesets-cache-fill-content-hook nil
"Hook run when writing the contents of filesets' cache file.
The hook is called with the cache file as current buffer and the cursor
at the last position. I.e. each hook has to make sure that the cursor is
@ -2414,7 +2416,7 @@ fileset thinks this is necessary or not."
(when filesets-cache-hostname-flag
(insert (format "(setq filesets-cache-hostname %S)" (system-name)))
(newline 2))
(run-hooks 'filesets-cache-fill-content-hooks)
(run-hooks 'filesets-cache-fill-content-hook)
(write-file filesets-menu-cache-file))
(setq filesets-has-changed-flag nil)
(setq filesets-update-cache-file-flag nil)))

View file

@ -655,6 +655,8 @@ the new frame according to its own rules."
(error "Don't know how to create a frame on window system %s" w))
(unless (get w 'window-system-initialized)
(unless x-display-name
(setq x-display-name display))
(funcall (cdr (assq w window-system-initialization-alist)))
(put w 'window-system-initialized t))

View file

@ -1,3 +1,11 @@
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* nndiary.el (nndiary-request-create-group-functions)
(nndiary-request-update-info-functions)
(nndiary-request-accept-article-functions):
* gnus-start.el (gnus-subscribe-newsgroup-functions): Don't use
"-hooks" suffix.
2012-10-17 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
* starttls.el (starttls-extra-arguments): Doc fix.
@ -110,7 +118,7 @@
2012-09-05 Martin Stjernholm <mast@lysator.liu.se>
* gnus-demon.el (gnus-demon-init): Fixed regression when IDLE is t and
* gnus-demon.el (gnus-demon-init): Fix regression when IDLE is t and
TIME is set.
2012-09-05 Juri Linkov <juri@jurta.org>
@ -571,7 +579,7 @@
* gnus.el: Register gnus-registry functions.
* gnus-registry.el (gnus-try-warping-via-registry):
Moved here and indent.
Move here and indent.
* gnus-int.el (gnus-warp-to-article):
Check whether the registry is enabled before warping.
@ -703,7 +711,7 @@
(message-multi-smtp-send-mail): Respect the X-Message-SMTP-Method
header to implement multi-SMTP functionality.
* gnus-agent.el (gnus-agent-send-mail-function): Removed.
* gnus-agent.el (gnus-agent-send-mail-function): Remove.
(gnus-agentize): Don't set it.
(gnus-agent-send-mail): Don't use it.
@ -844,8 +852,8 @@
2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-group.el (gnus-group-get-new-news): Respect
`gnus-group-use-permanent-levels', as documented (bug#11638).
* gnus-group.el (gnus-group-get-new-news):
Respect `gnus-group-use-permanent-levels', as documented (bug#11638).
2012-06-10 Dave Abrahams <dave@boostpro.com>
@ -985,7 +993,7 @@
(shr-insert): Allow the natural width to be computed for tables again.
(shr-tag-table-1): Rework how the natural widths are computed by
rendering the table a third time.
(shr-natural-width): Removed.
(shr-natural-width): Remove.
(shr-buffer-width): New function.
(shr-expand-newlines): Use it.
@ -1396,8 +1404,8 @@
2012-01-04 Wolfgang Jenkner <wjenkner@inode.at> (tiny change)
* gnus-agent.el (gnus-agent-load-local): Recompute
gnus-agent-article-local on changing method.
* gnus-agent.el (gnus-agent-load-local):
Recompute gnus-agent-article-local on changing method.
2012-01-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
@ -1689,8 +1697,8 @@
2011-09-27 Daiki Ueno <ueno@unixuser.org>
* plstore.el (plstore-select-keys, plstore-encrypt-to): Clarify
documentation.
* plstore.el (plstore-select-keys, plstore-encrypt-to):
Clarify documentation.
2011-09-27 Lars Magne Ingebrigtsen <larsi@gnus.org>

View file

@ -291,7 +291,9 @@ claim them."
function
(repeat function)))
(defcustom gnus-subscribe-newsgroup-hooks nil
(define-obsolete-variable-alias 'gnus-subscribe-newsgroup-hooks
'gnus-subscribe-newsgroup-functions "24.3")
(defcustom gnus-subscribe-newsgroup-functions nil
"*Hooks run after you subscribe to a new group.
The hooks will be called with new group's name as argument."
:version "22.1"
@ -639,7 +641,7 @@ the first newsgroup."
gnus-level-killed (gnus-group-entry (or next "dummy.group")))
(gnus-request-update-group-status newsgroup 'subscribe)
(gnus-message 5 "Subscribe newsgroup: %s" newsgroup)
(run-hook-with-args 'gnus-subscribe-newsgroup-hooks newsgroup)
(run-hook-with-args 'gnus-subscribe-newsgroup-functions newsgroup)
t))
(defun gnus-read-active-file-p ()

View file

@ -179,22 +179,28 @@ In order to make this clear, here are some examples:
:group 'nndiary)
(defcustom nndiary-request-create-group-hooks nil
"*Hooks to run after `nndiary-request-create-group' is executed.
The hooks will be called with the full group name as argument."
(define-obsolete-variable-alias 'nndiary-request-create-group-hooks
'nndiary-request-create-group-functions "24.3")
(defcustom nndiary-request-create-group-functions nil
"*Hook run after `nndiary-request-create-group' is executed.
The hook functions will be called with the full group name as argument."
:group 'nndiary
:type 'hook)
(defcustom nndiary-request-update-info-hooks nil
"*Hooks to run after `nndiary-request-update-info-group' is executed.
The hooks will be called with the full group name as argument."
(define-obsolete-variable-alias 'nndiary-request-update-info-hooks
'nndiary-request-update-info-functions "24.3")
(defcustom nndiary-request-update-info-functions nil
"*Hook run after `nndiary-request-update-info-group' is executed.
The hook functions will be called with the full group name as argument."
:group 'nndiary
:type 'hook)
(defcustom nndiary-request-accept-article-hooks nil
"*Hooks to run before accepting an article.
(define-obsolete-variable-alias 'nndiary-request-accept-article-hooks
'nndiary-request-accept-article-functions "24.3")
(defcustom nndiary-request-accept-article-functions nil
"*Hook run before accepting an article.
Executed near the beginning of `nndiary-request-accept-article'.
The hooks will be called with the article in the current buffer."
The hook functions will be called with the article in the current buffer."
:group 'nndiary
:type 'hook)
@ -541,7 +547,7 @@ all. This may very well take some time.")
(setcar active (apply 'min articles))
(setcdr active (apply 'max articles))))
(nnmail-save-active nndiary-group-alist nndiary-active-file)
(run-hook-with-args 'nndiary-request-create-group-hooks
(run-hook-with-args 'nndiary-request-create-group-functions
(gnus-group-prefixed-name group
(list "nndiary" server)))
t))
@ -633,7 +639,7 @@ all. This may very well take some time.")
(deffoo nndiary-request-accept-article (group &optional server last)
(nndiary-possibly-change-directory group server)
(nnmail-check-syntax)
(run-hooks 'nndiary-request-accept-article-hooks)
(run-hooks 'nndiary-request-accept-article-functions)
(when (nndiary-schedule)
(let (result)
(when nnmail-cache-accepted-message-ids
@ -804,7 +810,7 @@ all. This may very well take some time.")
(gnus-info-set-read info (gnus-update-read-articles
(gnus-info-group info) unread t)))
))
(run-hook-with-args 'nndiary-request-update-info-hooks
(run-hook-with-args 'nndiary-request-update-info-functions
(gnus-info-group info))
t))

View file

@ -249,7 +249,8 @@ when not running under a window system."
:tag "init-kludge-hooks"
:type '(hook))
(defcustom hfy-post-html-hooks nil
(define-obsolete-variable-alias 'hfy-post-html-hooks 'hfy-post-html-hook "24.3")
(defcustom hfy-post-html-hook nil
"List of functions to call after creating and filling the HTML buffer.
These functions will be called with the HTML buffer as the current buffer."
:group 'htmlfontify
@ -1786,7 +1787,7 @@ FILE, if set, is the file name."
;;(message "inserting footer")
(insert (funcall hfy-page-footer file)))
;; call any post html-generation hooks:
(run-hooks 'hfy-post-html-hooks)
(run-hooks 'hfy-post-html-hook)
;; return the html buffer
(set-buffer-modified-p nil)
html-buffer))

View file

@ -308,8 +308,17 @@ be determined."
"Determine the type of image file FILE from its name.
Value is a symbol specifying the image type, or nil if type cannot
be determined."
(assoc-default file image-type-file-name-regexps 'string-match-p))
(let (type first)
(or
(catch 'found
(dolist (elem image-type-file-name-regexps)
(when (string-match-p (car elem) file)
(setq type (cdr elem))
(or first (setq first type))
(if (image-type-available-p type)
(throw 'found type)))))
;; If nothing seems to be supported, return the first type that matched.
first)))
;;;###autoload
(defun image-type (source &optional type data-p)
@ -798,7 +807,7 @@ to enable all types that ImageMagick supports.
The variable `imagemagick-types-inhibit' overrides this variable.
If you change this without outside of Customize, you must call
If you change this without using customize, you must call
`imagemagick-register-types' afterwards.
If Emacs is compiled without ImageMagick support, this variable

View file

@ -38,7 +38,8 @@
;; doc strings in the dumped Emacs.) Because of this:
;; ii) If the file is loaded uncompiled, it should (where possible)
;; obey the doc-string conventions expected by make-docfile.
;; obey the doc-string conventions expected by make-docfile. It
;; should also be added to the uncompiled[] list in make-docfile.c.
;;; Code:

View file

@ -243,15 +243,14 @@ Used by `mail-yank-original' via `mail-indent-citation'."
:type 'integer
:group 'sendmail)
;; FIXME make it really obsolete.
(defvar mail-yank-hooks nil
"Obsolete hook for modifying a citation just inserted in the mail buffer.
Each hook function can find the citation between (point) and (mark t).
And each hook function should leave point and mark around the citation
text as modified.
This is a normal hook, misnamed for historical reasons.
It is semi-obsolete and mail agents should no longer use it.")
It is obsolete and mail agents should no longer use it.")
(make-obsolete-variable 'mail-yank-hooks 'mail-citation-hook "19.34")
;;;###autoload
(defcustom mail-citation-hook nil

View file

@ -1,3 +1,7 @@
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* mh-letter.el (mh-yank-hooks): Use make-obsolete-variable.
2012-04-25 Stefan Monnier <monnier@iro.umontreal.ca>
* mh-utils.el (minibuffer-completing-file-name): Don't declare, unused.

View file

@ -3189,7 +3189,9 @@ function used to insert the signature with
:group 'mh-letter
:package-version '(MH-E . "8.0"))
(defcustom-mh mh-kill-folder-suppress-prompt-hooks '(mh-search-p)
(define-obsolete-variable-alias 'mh-kill-folder-suppress-prompt-hooks
'mh-kill-folder-suppress-prompt-functions "24.3")
(defcustom-mh mh-kill-folder-suppress-prompt-functions '(mh-search-p)
"Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder].
The hook functions are called with no arguments and should return

View file

@ -66,8 +66,9 @@ Each hook function can find the citation between point and mark.
And each hook function should leave point and mark around the
citation text as modified.
This is a normal hook, misnamed for historical reasons. It is
semi-obsolete and is only used if `mail-citation-hook' is nil.")
This is a normal hook, misnamed for historical reasons.
It is obsolete and is only used if `mail-citation-hook' is nil.")
(make-obsolete-variable 'mh-yank-hooks 'mail-citation-hook "19.34")

View file

@ -1134,7 +1134,23 @@ Repeated uses step through the possible completions."
;; through the previous possible completions.
(let ((last (last all)))
(setcdr last (cons (car all) (cdr last)))
(completion--cache-all-sorted-completions (cdr all)))))))
(completion--cache-all-sorted-completions (cdr all)))
;; Make sure repeated uses cycle, even though completion--done might
;; have added a space or something that moved us outside of the field.
;; (bug#12221).
(let* ((table minibuffer-completion-table)
(pred minibuffer-completion-predicate)
(extra-prop completion-extra-properties)
(cmd
(lambda () "Cycle through the possible completions."
(interactive)
(let ((completion-extra-properties extra-prop))
(completion-in-region start (point) table pred)))))
(set-temporary-overlay-map
(let ((map (make-sparse-keymap)))
(define-key map [remap completion-at-point] cmd)
(define-key map (vector last-command-event) cmd)
map)))))))
(defvar minibuffer-confirm-exit-commands
'(completion-at-point minibuffer-complete
@ -1557,7 +1573,6 @@ variables.")
(let* ((exit-fun (plist-get completion-extra-properties :exit-function))
(pre-msg (and exit-fun (current-message))))
(cl-assert (memq finished '(exact sole finished unknown)))
;; FIXME: exit-fun should receive `finished' as a parameter.
(when exit-fun
(when (eq finished 'unknown)
(setq finished

View file

@ -152,7 +152,9 @@ Otherwise, return result of last form in BODY, or all other errors."
(dbus-error (when dbus-debug (signal (car err) (cdr err))))))
(font-lock-add-keywords 'emacs-lisp-mode '("\\<dbus-ignore-errors\\>"))
(defvar dbus-event-error-hooks nil
(define-obsolete-variable-alias 'dbus-event-error-hooks
'dbus-event-error-functions "24.3")
(defvar dbus-event-error-functions nil
"Functions to be called when a D-Bus error happens in the event handler.
Every function must accept two arguments, the event and the error variable
caught in `condition-case' by `dbus-error'.")
@ -947,7 +949,7 @@ If the HANDLER returns a `dbus-error', it is propagated as return message."
(dbus-method-error-internal
(nth 1 event) (nth 4 event) (nth 3 event) (cadr err))))
;; Propagate D-Bus error messages.
(run-hook-with-args 'dbus-event-error-hooks event err)
(run-hook-with-args 'dbus-event-error-functions event err)
(when (or dbus-debug (= dbus-message-type-error (nth 2 event)))
(signal (car err) (cdr err))))))

View file

@ -300,7 +300,9 @@ See `rcirc-dim-nick' face."
:type '(repeat string)
:group 'rcirc)
(defcustom rcirc-print-hooks nil
(define-obsolete-variable-alias 'rcirc-print-hooks
'rcirc-print-functions "24.3")
(defcustom rcirc-print-functions nil
"Hook run after text is printed.
Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT."
:type 'hook
@ -647,7 +649,9 @@ is non-nil."
"] "
text)))))
(defvar rcirc-sentinel-hooks nil
(define-obsolete-variable-alias 'rcirc-sentinel-hooks
'rcirc-sentinel-functions "24.3")
(defvar rcirc-sentinel-functions nil
"Hook functions called when the process sentinel is called.
Functions are called with PROCESS and SENTINEL arguments.")
@ -664,7 +668,7 @@ Functions are called with PROCESS and SENTINEL arguments.")
sentinel
(process-status process)) (not rcirc-target))
(rcirc-disconnect-buffer)))
(run-hook-with-args 'rcirc-sentinel-hooks process sentinel))))
(run-hook-with-args 'rcirc-sentinel-functions process sentinel))))
(defun rcirc-disconnect-buffer (&optional buffer)
(with-current-buffer (or buffer (current-buffer))
@ -684,7 +688,9 @@ Functions are called with PROCESS and SENTINEL arguments.")
(process-list))
ps))
(defvar rcirc-receive-message-hooks nil
(define-obsolete-variable-alias 'rcirc-receive-message-hooks
'rcirc-receive-message-functions "24.3")
(defvar rcirc-receive-message-functions nil
"Hook functions run when a message is received from server.
Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
(defun rcirc-filter (process output)
@ -738,7 +744,7 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
(if (not (fboundp handler))
(rcirc-handler-generic process cmd sender args text)
(funcall handler process sender args text))
(run-hook-with-args 'rcirc-receive-message-hooks
(run-hook-with-args 'rcirc-receive-message-functions
process cmd sender args text)))
(message "UNHANDLED: %s" text)))
@ -1625,7 +1631,7 @@ record activity."
(rcirc-log process sender response target text))
(sit-for 0) ; displayed text before hook
(run-hook-with-args 'rcirc-print-hooks
(run-hook-with-args 'rcirc-print-functions
process sender response target text)))))
(defun rcirc-generate-log-filename (process target)
@ -1927,7 +1933,9 @@ With prefix ARG, go to the next low priority buffer with activity."
(key-description (this-command-keys))
" for low priority activity."))))))))
(defvar rcirc-activity-hooks nil
(define-obsolete-variable-alias 'rcirc-activity-hooks
'rcirc-activity-functions "24.3")
(defvar rcirc-activity-functions nil
"Hook to be run when there is channel activity.
Functions are called with a single argument, the buffer with the
@ -1950,7 +1958,7 @@ activity. Only run if the buffer is not visible and
(unless (and (equal rcirc-activity old-activity)
(member type old-types))
(rcirc-update-activity-string)))))
(run-hook-with-args 'rcirc-activity-hooks buffer))
(run-hook-with-args 'rcirc-activity-functions buffer))
(defun rcirc-clear-activity (buffer)
"Clear the BUFFER activity."

View file

@ -1677,11 +1677,11 @@ If ARGUMENT is non-nil, use it as argument for
(tramp-set-connection-property
vec "smbserver-version" smbserver-version))))
;; Set chunksize. Otherwise, `tramp-send-string' might
;; try it itself.
;; Set chunksize to 1. smbclient reads its input
;; character by character; if we send the string
;; at once, it is read painfully slow.
(tramp-set-connection-property p "smb-share" share)
(tramp-set-connection-property
p "chunksize" tramp-chunksize))
(tramp-set-connection-property p "chunksize" 1))
;; Check for the error reason. If it was due to wrong
;; password, reestablish the connection. We cannot
@ -1717,7 +1717,7 @@ Returns nil if an error message has appeared."
(while (and (not found) (not err) (memq (process-status p) '(run open)))
;; Accept pending output.
(tramp-accept-process-output p)
(tramp-accept-process-output p 0.1)
;; Search for prompt.
(goto-char (point-min))
@ -1731,7 +1731,7 @@ Returns nil if an error message has appeared."
(while (and (not found) (memq (process-status p) '(run open)))
;; Accept pending output.
(tramp-accept-process-output p)
(tramp-accept-process-output p 0.1)
;; Search for prompt.
(goto-char (point-min))

View file

@ -24,7 +24,13 @@
;;; Commentary:
;; A replacement for simple.el's comment-related functions.
;; This library contains functions and variables for commenting and
;; uncommenting source code.
;; Prior to calling any `comment-*' function, you should ensure that
;; `comment-normalize-vars' is first called to set up the appropriate
;; variables; except for the `comment-*' commands, which call
;; `comment-normalize-vars' automatically as a subroutine.
;;; Bugs:
@ -326,10 +332,11 @@ terminated by the end of line (i.e. `comment-end' is empty)."
;;;###autoload
(defun comment-normalize-vars (&optional noerror)
"Check and setup the variables needed by other commenting functions.
Any command calling functions from newcomment.el should call this function
before any other, so the rest of the code can assume that the variables are
properly set."
"Check and set up variables needed by other commenting functions.
All the `comment-*' commands call this function to set up various
variables, like `comment-start', to ensure that the commenting
functions work correctly. Lisp callers of any other `comment-*'
function should first call this function explicitly."
(unless (and (not comment-start) noerror)
(unless comment-start
(let ((cs (read-string "No comment syntax is defined. Use: ")))

View file

@ -1703,7 +1703,9 @@ Key bindings:
(message "Using CC Mode version %s" c-version)
(c-keep-region-active))
(defvar c-prepare-bug-report-hooks nil)
(define-obsolete-variable-alias 'c-prepare-bug-report-hooks
'c-prepare-bug-report-hook "24.3")
(defvar c-prepare-bug-report-hook nil)
;; Dynamic variables used by reporter.
(defvar reporter-prompt-for-summary-p)
@ -1770,7 +1772,7 @@ Key bindings:
lookup-syntax-properties))
vars)
(lambda ()
(run-hooks 'c-prepare-bug-report-hooks)
(run-hooks 'c-prepare-bug-report-hook)
(insert (format "Buffer Style: %s\nc-emacs-features: %s\n"
style c-features)))))))

View file

@ -1535,10 +1535,11 @@ if ARG is omitted or nil."
(error "Invalid file-name"))
(or prefix
(setq prefix "flymake"))
(let* ((temp-name (concat (file-name-sans-extension file-name)
"_" prefix
(and (file-name-extension file-name)
(concat "." (file-name-extension file-name))))))
(let* ((ext (file-name-extension file-name))
(temp-name (file-truename
(concat (file-name-sans-extension file-name)
"_" prefix
(and ext (concat "." ext))))))
(flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name)
temp-name))

View file

@ -182,7 +182,8 @@ and you want to simplify them for the mode line
(defconst which-func-current
'(:eval (replace-regexp-in-string
"%" "%%"
(gethash (selected-window) which-func-table which-func-unknown))))
(or (gethash (selected-window) which-func-table)
which-func-unknown))))
;;;###autoload (put 'which-func-current 'risky-local-variable t)
(defvar which-func-mode nil

View file

@ -971,7 +971,6 @@ Amongst another things, it parses the command-line arguments."
(not (eq 0 (cdr tool-bar-lines)))))))
(let ((old-scalable-fonts-allowed scalable-fonts-allowed)
(old-font-list-limit font-list-limit)
(old-face-ignored-fonts face-ignored-fonts))
;; Run the site-start library if it exists. The point of this file is
@ -1162,7 +1161,6 @@ the `--debug-init' option to view a complete error backtrace."
;; face realization, clear the face cache so that new faces will
;; be realized.
(unless (and (eq scalable-fonts-allowed old-scalable-fonts-allowed)
(eq font-list-limit old-font-list-limit)
(eq face-ignored-fonts old-face-ignored-fonts))
(clear-face-cache)))

View file

@ -1260,12 +1260,10 @@ is converted into a string by expressing it in decimal."
(define-obsolete-variable-alias 'executing-macro 'executing-kbd-macro
"before 19.34")
(defvaralias 'x-lost-selection-hooks 'x-lost-selection-functions)
(make-obsolete-variable 'x-lost-selection-hooks
'x-lost-selection-functions "22.1")
(defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions)
(make-obsolete-variable 'x-sent-selection-hooks
'x-sent-selection-functions "22.1")
(define-obsolete-variable-alias 'x-lost-selection-hooks
'x-lost-selection-functions "22.1")
(define-obsolete-variable-alias 'x-sent-selection-hooks
'x-sent-selection-functions "22.1")
;; This was introduced in 21.4 for pre-unicode unification. That
;; usage was rendered obsolete in 23.1 which uses Unicode internally.
@ -3151,7 +3149,7 @@ in which case `save-window-excursion' cannot help."
(unwind-protect (progn ,@body)
(set-window-configuration ,c)))))
(defun temp-output-buffer-show (buffer)
(defun internal-temp-output-buffer-show (buffer)
"Internal function for `with-output-to-temp-buffer'."
(with-current-buffer buffer
(set-buffer-modified-p nil)
@ -3235,7 +3233,7 @@ if it uses `temp-buffer-show-function'."
(run-hooks 'temp-buffer-setup-hook)))))
(standard-output ,buf))
(prog1 (progn ,@body)
(temp-output-buffer-show ,buf)))))
(internal-temp-output-buffer-show ,buf)))))
(defmacro with-temp-file (file &rest body)
"Create a new buffer, evaluate BODY there, and write the buffer to FILE.

View file

@ -123,6 +123,7 @@
(defvar sun-raw-prefix-hooks nil
"List of forms to evaluate after setting sun-raw-prefix.")
(make-obsolete-variable 'sun-raw-prefix-hooks 'term-setup-hook "21.1")

View file

@ -217,8 +217,9 @@ This can be toggled with `ediff-toggle-filename-truncation'."
:type 'hook
:group 'ediff-mult)
(defcustom ediff-before-session-group-setup-hooks nil
"Hooks to run before Ediff arranges the window for group-level operations.
(defcustom ediff-before-session-group-setup-hooks
nil ;FIXME: Bad name (should be -hook or -functions) and never run??
"Hook run before Ediff arranges the window for group-level operations.
It is used by commands such as `ediff-directories'.
This hook can be used to save the previous window config, which can be restored
on `ediff-quit', `ediff-suspend', or `ediff-quit-session-group-hook'."

View file

@ -1584,21 +1584,21 @@ Return t if the buffer had changes, nil otherwise."
(let ((vc-disable-async-diff (not async)))
(vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer))
(set-buffer buffer)
(diff-mode)
(set (make-local-variable 'diff-vc-backend) (car vc-fileset))
(set (make-local-variable 'revert-buffer-function)
`(lambda (ignore-auto noconfirm)
(vc-diff-internal ,async ',vc-fileset ,rev1 ,rev2 ,verbose)))
;; Make the *vc-diff* buffer read only, the diff-mode key
;; bindings are nicer for read only buffers. pcl-cvs does the
;; same thing.
(setq buffer-read-only t)
(if (and (zerop (buffer-size))
(not (get-buffer-process (current-buffer))))
;; Treat this case specially so as not to pop the buffer.
(progn
(message "%s" (cdr messages))
nil)
(diff-mode)
(set (make-local-variable 'diff-vc-backend) (car vc-fileset))
(set (make-local-variable 'revert-buffer-function)
`(lambda (ignore-auto noconfirm)
(vc-diff-internal ,async ',vc-fileset ,rev1 ,rev2 ,verbose)))
;; Make the *vc-diff* buffer read only, the diff-mode key
;; bindings are nicer for read only buffers. pcl-cvs does the
;; same thing.
(setq buffer-read-only t)
;; Display the buffer, but at the end because it can change point.
(pop-to-buffer (current-buffer))
;; The diff process may finish early, so call `vc-diff-finish'

View file

@ -5828,7 +5828,7 @@ buffer with the name BUFFER-OR-NAME and return that buffer."
"If non-nil, `switch-to-buffer' tries to preserve `window-point'.
If this is nil, `switch-to-buffer' displays the buffer at that
buffer's `point'. If this is `already-displayed', it tries to
display the buffer at its pevious position in the selected
display the buffer at its previous position in the selected
window, provided the buffer is currently displayed in some other
window on any visible or iconified frame. If this is t, it
unconditionally tries to display the buffer at its previous

View file

@ -6,6 +6,49 @@
* font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
(font_open_for_lface): Handle Vface_font_rescale_alist.
2012-10-23 Chong Yidong <cyd@gnu.org>
* xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
2012-10-21 Jan Djärv <jan.h.d@swipnet.se>
* nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
for screen font.
(nsfont_draw): Turn off LCD-smoothing (Bug#11484).
* xterm.c (x_focus_changed): Check if daemonp when sending focus in
event (Bug#12681).
2012-10-21 Glenn Morris <rgm@gnu.org>
* lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
2012-10-20 Paul Eggert <eggert@cs.ucla.edu>
Port to OpenBSD 5.1.
* frame.c (Fmouse_position, Fmouse_pixel_position):
* xdisp.c (produce_stretch_glyph):
Declare local vars only when they're needed.
This is clearer and avoids a warning on OpenBSD about unused vars.
* frame.h (FRAME_WINDOW_P): Always evaluate its argument.
This is safer, and avoids OpenBSD warnings about unused vars.
* keyboard.c (record_menu_key): Remove unnecessary decl.
(poll_timer): Define only if POLL_FOR_INPUT is defined.
* unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
as our definition clashes with OpenBSD's.
* xfaces.c (load_face_colors, check_lface_attrs)
(get_lface_attributes_no_remap, get_lface_attributes)
(lface_fully_specified_p, x_supports_face_attributes_p)
(tty_supports_face_attributes_p, face_fontset, realize_face)
(realize_x_face, realize_tty_face):
Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
merely Lisp_Object *. This is more informative and avoids
a warning on OpenBSD about accessing beyond an object's size.
2012-10-20 Chong Yidong <cyd@gnu.org>
* lread.c (Fload): Doc fix (Bug#12592).
2012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
* font.c (Ffont_at): Fix previous change.

View file

@ -1501,10 +1501,7 @@ and returns whatever that function returns. */)
{
FRAME_PTR f;
Lisp_Object lispy_dummy;
enum scroll_bar_part party_dummy;
Lisp_Object x, y, retval;
int col, row;
Time long_dummy;
struct gcpro gcpro1;
f = SELECTED_FRAME ();
@ -1513,14 +1510,19 @@ and returns whatever that function returns. */)
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
/* It's okay for the hook to refrain from storing anything. */
if (FRAME_TERMINAL (f)->mouse_position_hook)
(*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1,
&lispy_dummy, &party_dummy,
&x, &y,
&long_dummy);
{
enum scroll_bar_part party_dummy;
Time time_dummy;
(*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1,
&lispy_dummy, &party_dummy,
&x, &y,
&time_dummy);
}
if (! NILP (x))
{
col = XINT (x);
row = XINT (y);
int col = XINT (x);
int row = XINT (y);
pixel_to_glyph_coords (f, col, row, &col, &row, NULL, 1);
XSETINT (x, col);
XSETINT (y, row);
@ -1547,9 +1549,7 @@ and nil for X and Y. */)
{
FRAME_PTR f;
Lisp_Object lispy_dummy;
enum scroll_bar_part party_dummy;
Lisp_Object x, y;
Time long_dummy;
f = SELECTED_FRAME ();
x = y = Qnil;
@ -1557,10 +1557,15 @@ and nil for X and Y. */)
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
/* It's okay for the hook to refrain from storing anything. */
if (FRAME_TERMINAL (f)->mouse_position_hook)
(*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1,
&lispy_dummy, &party_dummy,
&x, &y,
&long_dummy);
{
enum scroll_bar_part party_dummy;
Time time_dummy;
(*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1,
&lispy_dummy, &party_dummy,
&x, &y,
&time_dummy);
}
#endif
XSETFRAME (lispy_dummy, f);
return Fcons (lispy_dummy, Fcons (x, y));

View file

@ -646,7 +646,7 @@ typedef struct frame *FRAME_PTR;
#define FRAME_WINDOW_P(f) FRAME_NS_P(f)
#endif
#ifndef FRAME_WINDOW_P
#define FRAME_WINDOW_P(f) (0)
#define FRAME_WINDOW_P(f) ((void) (f), 0)
#endif
/* Return a pointer to the structure holding information about the

View file

@ -365,7 +365,6 @@ static Lisp_Object command_loop (void);
static Lisp_Object Qextended_command_history;
EMACS_TIME timer_check (void);
static void record_menu_key (Lisp_Object c);
static void echo_now (void);
static ptrdiff_t echo_length (void);
@ -1963,13 +1962,13 @@ safe_run_hooks (Lisp_Object hook)
int poll_suppress_count;
#ifdef POLL_FOR_INPUT
/* Asynchronous timer for polling. */
static struct atimer *poll_timer;
#ifdef POLL_FOR_INPUT
/* Poll for input, so that we catch a C-g if it comes in. This
function is called from x_make_frame_visible, see comment
there. */

View file

@ -222,7 +222,9 @@ enum enum_USE_LSB_TAG { USE_LSB_TAG = 0 };
/* Define the fundamental Lisp data structures. */
/* This is the set of Lisp data types. */
/* This is the set of Lisp data types. If you want to define a new
data type, read the comments after Lisp_Fwd_Type definition
below. */
/* Lisp integers use 2 tags, to give them one extra bit, thus
extending their range from, e.g., -2^28..2^28-1 to -2^29..2^29-1. */
@ -298,6 +300,53 @@ enum Lisp_Fwd_Type
Lisp_Fwd_Kboard_Obj, /* Fwd to a Lisp_Object field of kboards. */
};
/* If you want to define a new Lisp data type, here are some
instructions. See the thread at
http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00561.html
for more info.
First, there are already a couple of Lisp types that can be used if
your new type does not need to be exposed to Lisp programs nor
displayed to users. These are Lisp_Save_Value, a Lisp_Misc
subtype; and PVEC_OTHER, a kind of vectorlike object. The former
is suitable for temporarily stashing away pointers and integers in
a Lisp object (see the existing uses of make_save_value and
XSAVE_VALUE). The latter is useful for vector-like Lisp objects
that need to be used as part of other objects, but which are never
shown to users or Lisp code (search for PVEC_OTHER in xterm.c for
an example).
These two types don't look pretty when printed, so they are
unsuitable for Lisp objects that can be exposed to users.
To define a new data type, add one more Lisp_Misc subtype or one
more pseudovector subtype. Pseudovectors are more suitable for
objects with several slots that need to support fast random access,
while Lisp_Misc types are for everything else. A pseudovector object
provides one or more slots for Lisp objects, followed by struct
members that are accessible only from C. A Lisp_Misc object is a
wrapper for a C struct that can contain anything you like.
To add a new pseudovector type, extend the pvec_type enumeration;
to add a new Lisp_Misc, extend the Lisp_Misc_Type enumeration.
For a Lisp_Misc, you will also need to add your entry to union
Lisp_Misc (but make sure the first word has the same structure as
the others, starting with a 16-bit member of the Lisp_Misc_Type
enumeration and a 1-bit GC markbit) and make sure the overall size
of the union is not increased by your addition.
Then you will need to add switch branches in print.c (in
print_object, to print your object, and possibly also in
print_preprocess) and to alloc.c, to mark your object (in
mark_object) and to free it (in gc_sweep). The latter is also the
right place to call any code specific to your data type that needs
to run when the object is recycled -- e.g., free any additional
resources allocated for it that are not Lisp objects. You can even
make a pointer to the function that frees the resources a slot in
your object -- this way, the same object could be used to represent
several disparate C structures. */
#ifdef CHECK_LISP_OBJECT_TYPE
typedef struct { EMACS_INT i; } Lisp_Object;

View file

@ -35,7 +35,8 @@
## no-byte-compile ones.
## Confusingly, term/internal is not in loadup, but is unconditionally
## loaded by pc-win, which is.
## loaded by pc-win, which is. Ditto for international/cp51932 and
## international/eucjp-ms, loaded from language/japanese.
## Note that this list should not include lisp files which might not
## be present, like site-load.el and site-init.el; this makefile
@ -94,6 +95,8 @@ lisp = \
$(lispsource)/language/greek.elc \
$(lispsource)/language/hebrew.elc \
$(lispsource)/language/japanese.elc \
$(lispsource)/international/cp51932.el \
$(lispsource)/international/eucjp-ms.el \
$(lispsource)/language/korean.elc \
$(lispsource)/language/lao.elc \
$(lispsource)/language/tai-viet.elc \

View file

@ -996,18 +996,17 @@ If optional fifth arg MUST-SUFFIX is non-nil, insist on
the suffix `.elc' or `.el'; don't accept just FILE unless
it ends in one of those suffixes or includes a directory name.
If this function fails to find a file, it may look for different
representations of that file before trying another file.
It does so by adding the non-empty suffixes in `load-file-rep-suffixes'
to the file name. Emacs uses this feature mainly to find compressed
versions of files when Auto Compression mode is enabled.
If NOSUFFIX is nil, then if a file could not be found, try looking for
a different representation of the file by adding non-empty suffixes to
its name, before trying another file. Emacs uses this feature to find
compressed versions of files when Auto Compression mode is enabled.
If NOSUFFIX is non-nil, disable this feature.
The exact suffixes that this function tries out, in the exact order,
are given by the value of the variable `load-file-rep-suffixes' if
NOSUFFIX is non-nil and by the return value of the function
`get-load-suffixes' if MUST-SUFFIX is non-nil. If both NOSUFFIX and
MUST-SUFFIX are nil, this function first tries out the latter suffixes
and then the former.
The suffixes that this function tries out, when NOSUFFIX is nil, are
given by the return value of `get-load-suffixes' and the values listed
in `load-file-rep-suffixes'. If MUST-SUFFIX is non-nil, only the
return value of `get-load-suffixes' is used, i.e. the file name is
required to have a non-empty suffix.
Loading a file records its definitions, and its `provide' and
`require' calls, in an element of `load-history' whose

View file

@ -797,7 +797,13 @@ when setting family in ns_spec_to_descriptor(). */
block_input ();
/* for metrics */
#ifdef NS_IMPL_COCOA
sfont = [nsfont screenFontWithRenderingMode:
NSFontAntialiasedIntegerAdvancementsRenderingMode];
#else
sfont = [nsfont screenFont];
#endif
if (sfont == nil)
sfont = nsfont;
@ -1229,6 +1235,7 @@ is false when (FROM > 0 || TO < S->nchars). */
else
CGContextSetShouldAntialias (gcontext, 1);
CGContextSetShouldSmoothFonts (gcontext, NO);
CGContextSetTextMatrix (gcontext, fliptf);
if (bgCol != nil)
@ -1372,7 +1379,12 @@ is false when (FROM > 0 || TO < S->nchars). */
#endif
block_input ();
sfont = [font_info->nsfont screenFont];
#ifdef NS_IMPL_COCOA
sfont = [font_info->nsfont screenFontWithRenderingMode:
NSFontAntialiasedIntegerAdvancementsRenderingMode];
#else
sfont = [font_info->nsfont screenFont];
#endif
font_info->metrics[block] = xzalloc (0x100 * sizeof (struct font_metrics));
if (!(font_info->metrics[block]))

View file

@ -507,10 +507,12 @@ typedef struct {
#ifndef ElfW
# define ElfBitsW(bits, type) Elf##bits##_##type
# ifdef _LP64
# define ELFSIZE 64
# else
# define ELFSIZE 32
# ifndef ELFSIZE
# ifdef _LP64
# define ELFSIZE 64
# else
# define ELFSIZE 32
# endif
# endif
/* This macro expands `bits' before invoking ElfBitsW. */
# define ElfExpandBitsW(bits, type) ElfBitsW (bits, type)

View file

@ -211,7 +211,7 @@ static void w32_show_hourglass (struct frame *);
static void w32_hide_hourglass (void);
#ifdef WINDOWSNT
/* From w32inevet.c */
/* From w32inevt.c */
extern int faked_key;
#endif /* WINDOWSNT */
@ -7711,4 +7711,3 @@ emacs_abort (void)
break;
}
}

View file

@ -24076,17 +24076,16 @@ produce_stretch_glyph (struct it *it)
Lisp_Object prop, plist;
int width = 0, height = 0, align_to = -1;
int zero_width_ok_p = 0;
int ascent = 0;
double tem;
struct face *face = NULL;
struct font *font = NULL;
#ifdef HAVE_WINDOW_SYSTEM
int ascent = 0;
int zero_height_ok_p = 0;
if (FRAME_WINDOW_P (it->f))
{
face = FACE_FROM_ID (it->f, it->face_id);
struct face *face = FACE_FROM_ID (it->f, it->face_id);
font = face->font ? face->font : FRAME_FONT (it->f);
PREPARE_FACE_FOR_DISPLAY (it->f, face);
}

View file

@ -371,8 +371,6 @@ Lisp_Object Vface_alternative_font_registry_alist;
static Lisp_Object Qscalable_fonts_allowed;
#define DEFAULT_FONT_LIST_LIMIT 100
/* The symbols `foreground-color' and `background-color' which can be
used as part of a `face' property. This is for compatibility with
Emacs 20.2. */
@ -1323,7 +1321,8 @@ load_color (struct frame *f, struct face *face, Lisp_Object name,
try to emulate gray colors with a stipple from Vface_default_stipple. */
static void
load_face_colors (struct frame *f, struct face *face, Lisp_Object *attrs)
load_face_colors (struct frame *f, struct face *face,
Lisp_Object attrs[LFACE_VECTOR_SIZE])
{
Lisp_Object fg, bg;
@ -1802,7 +1801,7 @@ the WIDTH times as wide as FACE on FRAME. */)
/* Check consistency of Lisp face attribute vector ATTRS. */
static void
check_lface_attrs (Lisp_Object *attrs)
check_lface_attrs (Lisp_Object attrs[LFACE_VECTOR_SIZE])
{
eassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX])
|| IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX])
@ -2049,7 +2048,8 @@ lface_from_face_name (struct frame *f, Lisp_Object face_name, int signal_p)
static int
get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name,
Lisp_Object *attrs, int signal_p)
Lisp_Object attrs[LFACE_VECTOR_SIZE],
int signal_p)
{
Lisp_Object lface;
@ -2071,7 +2071,7 @@ get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name,
static int
get_lface_attributes (struct frame *f, Lisp_Object face_name,
Lisp_Object *attrs, int signal_p,
Lisp_Object attrs[LFACE_VECTOR_SIZE], int signal_p,
struct named_merge_point *named_merge_points)
{
Lisp_Object face_remapping;
@ -2108,7 +2108,7 @@ get_lface_attributes (struct frame *f, Lisp_Object face_name,
specified, i.e. are non-nil. */
static int
lface_fully_specified_p (Lisp_Object *attrs)
lface_fully_specified_p (Lisp_Object attrs[LFACE_VECTOR_SIZE])
{
int i;
@ -4760,7 +4760,8 @@ DEFUN ("face-attributes-as-vector", Fface_attributes_as_vector,
\(2) `close in spirit' to what the attributes specify, if not exact. */
static int
x_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs,
x_supports_face_attributes_p (struct frame *f,
Lisp_Object attrs[LFACE_VECTOR_SIZE],
struct face *def_face)
{
Lisp_Object *def_attrs = def_face->lface;
@ -4862,7 +4863,8 @@ x_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs,
substitution of a `dim' face for italic. */
static int
tty_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs,
tty_supports_face_attributes_p (struct frame *f,
Lisp_Object attrs[LFACE_VECTOR_SIZE],
struct face *def_face)
{
int weight, slant;
@ -5245,7 +5247,7 @@ be found. Value is ALIST. */)
attribute of ATTRS doesn't name a fontset. */
static int
face_fontset (Lisp_Object *attrs)
face_fontset (Lisp_Object attrs[LFACE_VECTOR_SIZE])
{
Lisp_Object name;
@ -5474,7 +5476,8 @@ realize_named_face (struct frame *f, Lisp_Object symbol, int id)
face. Value is a pointer to the newly created realized face. */
static struct face *
realize_face (struct face_cache *cache, Lisp_Object *attrs, int former_face_id)
realize_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE],
int former_face_id)
{
struct face *face;
@ -5551,7 +5554,7 @@ realize_non_ascii_face (struct frame *f, Lisp_Object font_object,
created realized face. */
static struct face *
realize_x_face (struct face_cache *cache, Lisp_Object *attrs)
realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE])
{
struct face *face = NULL;
#ifdef HAVE_WINDOW_SYSTEM
@ -5878,7 +5881,8 @@ map_tty_color (struct frame *f, struct face *face,
Value is a pointer to the newly created realized face. */
static struct face *
realize_tty_face (struct face_cache *cache, Lisp_Object *attrs)
realize_tty_face (struct face_cache *cache,
Lisp_Object attrs[LFACE_VECTOR_SIZE])
{
struct face *face;
int weight, slant;
@ -6594,12 +6598,6 @@ syms_of_xfaces (void)
defsubr (&Sdump_colors);
#endif
DEFVAR_LISP ("font-list-limit", Vfont_list_limit,
doc: /* Limit for font matching.
If an integer > 0, font matching functions won't load more than
that number of fonts when searching for a matching font. */);
Vfont_list_limit = make_number (DEFAULT_FONT_LIST_LIMIT);
DEFVAR_LISP ("face-new-frame-defaults", Vface_new_frame_defaults,
doc: /* List of global face definitions (for internal use only.) */);
Vface_new_frame_defaults = Qnil;

View file

@ -3448,7 +3448,8 @@ x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct fra
/* Don't stop displaying the initial startup message
for a switch-frame event we don't need. */
if (NILP (Vterminal_frame)
/* When run as a deamon, Vterminal_frame is always NIL. */
if ((NILP (Vterminal_frame) || EQ (Fdaemonp(), Qt))
&& CONSP (Vframe_list)
&& !NILP (XCDR (Vframe_list)))
{