aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2012-10-24 00:47:51 +0900
committerKenichi Handa2012-10-24 00:47:51 +0900
commit6a8f8193298e05931baeebb1bd3aba6f8f5a7b5e (patch)
treefcee273be31e69f367b6f820aa32de660e541b2f
parent7e70a15287ee1ae5461d47e5a96d6c455aefaf57 (diff)
parentd106953274d29b6be4ef7e2c442078c81a52ff2f (diff)
downloademacs-6a8f8193298e05931baeebb1bd3aba6f8f5a7b5e.tar.gz
emacs-6a8f8193298e05931baeebb1bd3aba6f8f5a7b5e.zip
merge trunk
-rw-r--r--ChangeLog7
-rw-r--r--Makefile.in13
-rw-r--r--configure.ac2
-rw-r--r--doc/emacs/ChangeLog8
-rw-r--r--doc/emacs/custom.texi13
-rw-r--r--doc/emacs/kmacro.texi9
-rw-r--r--doc/lispintro/emacs-lisp-intro.texi14
-rw-r--r--doc/lispref/ChangeLog26
-rw-r--r--doc/lispref/display.texi8
-rw-r--r--doc/lispref/files.texi5
-rw-r--r--doc/lispref/functions.texi2
-rw-r--r--doc/lispref/hooks.texi10
-rw-r--r--doc/lispref/intro.texi2
-rw-r--r--doc/lispref/keymaps.texi10
-rw-r--r--doc/lispref/lists.texi2
-rw-r--r--doc/lispref/loading.texi4
-rw-r--r--doc/lispref/modes.texi6
-rw-r--r--doc/lispref/os.texi2
-rw-r--r--doc/lispref/text.texi9
-rw-r--r--doc/lispref/tips.texi19
-rw-r--r--doc/misc/ChangeLog15
-rw-r--r--doc/misc/Makefile.in6
-rw-r--r--doc/misc/cl.texi425
-rw-r--r--doc/misc/dbus.texi4
-rw-r--r--doc/misc/ede.texi2
-rw-r--r--doc/misc/ediff.texi2
-rw-r--r--doc/misc/forms.texi4
-rw-r--r--doc/misc/gnus.texi2
-rw-r--r--doc/misc/mh-e.texi6
-rw-r--r--doc/misc/sem-user.texi2
-rw-r--r--doc/misc/tramp.texi32
-rw-r--r--etc/ChangeLog24
-rw-r--r--etc/NEWS27
-rw-r--r--etc/images/icons/README7
-rw-r--r--etc/images/icons/hicolor/16x16/apps/emacs22.pngbin0 -> 705 bytes
-rw-r--r--etc/images/icons/hicolor/24x24/apps/emacs22.pngbin0 -> 988 bytes
-rw-r--r--etc/images/icons/hicolor/32x32/apps/emacs22.pngbin0 -> 2404 bytes
-rw-r--r--etc/images/icons/hicolor/48x48/apps/emacs22.pngbin0 -> 3431 bytes
-rw-r--r--lib-src/ChangeLog23
-rw-r--r--lib-src/make-docfile.c43
-rw-r--r--lib-src/makefile.w32-in46
-rw-r--r--lisp/ChangeLog113
-rw-r--r--lisp/arc-mode.el8
-rw-r--r--lisp/calc/calc-units.el14
-rw-r--r--lisp/cedet/ChangeLog143
-rw-r--r--lisp/cedet/semantic/db-file.el6
-rw-r--r--lisp/cedet/semantic/edit.el24
-rw-r--r--lisp/cedet/semantic/lex.el6
-rw-r--r--lisp/cus-start.el1
-rw-r--r--lisp/delsel.el140
-rw-r--r--lisp/electric.el30
-rw-r--r--lisp/emacs-lisp/checkdoc.el20
-rw-r--r--lisp/emacs-lisp/eieio.el8
-rw-r--r--lisp/eshell/esh-cmd.el28
-rw-r--r--lisp/faces.el6
-rw-r--r--lisp/filesets.el8
-rw-r--r--lisp/frame.el2
-rw-r--r--lisp/gnus/ChangeLog28
-rw-r--r--lisp/gnus/gnus-start.el6
-rw-r--r--lisp/gnus/nndiary.el30
-rw-r--r--lisp/htmlfontify.el5
-rw-r--r--lisp/image.el15
-rw-r--r--lisp/loadup.el3
-rw-r--r--lisp/mail/sendmail.el5
-rw-r--r--lisp/mh-e/ChangeLog4
-rw-r--r--lisp/mh-e/mh-e.el4
-rw-r--r--lisp/mh-e/mh-letter.el5
-rw-r--r--lisp/minibuffer.el19
-rw-r--r--lisp/net/dbus.el6
-rw-r--r--lisp/net/rcirc.el24
-rw-r--r--lisp/net/tramp-smb.el12
-rw-r--r--lisp/newcomment.el17
-rw-r--r--lisp/progmodes/cc-mode.el6
-rw-r--r--lisp/progmodes/flymake.el9
-rw-r--r--lisp/progmodes/which-func.el3
-rw-r--r--lisp/startup.el2
-rw-r--r--lisp/subr.el14
-rw-r--r--lisp/term/sun.el1
-rw-r--r--lisp/vc/ediff-mult.el5
-rw-r--r--lisp/vc/vc.el18
-rw-r--r--lisp/window.el2
-rw-r--r--src/ChangeLog43
-rw-r--r--src/frame.c35
-rw-r--r--src/frame.h2
-rw-r--r--src/keyboard.c7
-rw-r--r--src/lisp.h51
-rw-r--r--src/lisp.mk5
-rw-r--r--src/lread.c23
-rw-r--r--src/nsfont.m14
-rw-r--r--src/unexelf.c10
-rw-r--r--src/w32fns.c3
-rw-r--r--src/xdisp.c5
-rw-r--r--src/xfaces.c36
-rw-r--r--src/xterm.c3
94 files changed, 1198 insertions, 680 deletions
diff --git a/ChangeLog b/ChangeLog
index 81eddade0a0..362c2adc2d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
12012-10-21 Glenn Morris <rgm@gnu.org>
2
3 * Makefile.in (install-etc): Don't install emacs22 icons.
4
5 * Makefile.in (emacs_transform): New variable.
6 (install-etc): Prefer a make variable to a shell variable.
7
12012-10-18 Stefan Monnier <monnier@iro.umontreal.ca> 82012-10-18 Stefan Monnier <monnier@iro.umontreal.ca>
2 9
3 * Makefile.in ($(MAKEFILE_NAME)): Depend on src/lisp.mk as well. 10 * Makefile.in ($(MAKEFILE_NAME)): Depend on src/lisp.mk as well.
diff --git a/Makefile.in b/Makefile.in
index c27b6777162..d80496d8b7b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -631,21 +631,24 @@ install-man:
631 done 631 done
632 632
633## Install those items from etc/ that need to end up elsewhere. 633## Install those items from etc/ that need to end up elsewhere.
634
635# Like EMACS, but without EXEEXT.
636emacs_transform = `echo emacs | sed '$(TRANSFORM)'`
637
634install-etc: 638install-etc:
635 umask 022; ${MKDIR_P} $(DESTDIR)${desktopdir} 639 umask 022; ${MKDIR_P} $(DESTDIR)${desktopdir}
636 dest=`echo emacs | sed '$(TRANSFORM)'`; \
637 tmp=etc/emacs.tmpdesktop; rm -f $${tmp}; \ 640 tmp=etc/emacs.tmpdesktop; rm -f $${tmp}; \
638 sed -e "/^Exec=emacs/ s/emacs/$${dest}/" \ 641 sed -e '/^Exec=emacs/ s/emacs/${emacs_transform}/' \
639 -e "/^Icon=emacs/ s/emacs/$${dest}/" \ 642 -e '/^Icon=emacs/ s/emacs/${emacs_transform}/' \
640 ${srcdir}/etc/emacs.desktop > $${tmp}; \ 643 ${srcdir}/etc/emacs.desktop > $${tmp}; \
641 ${INSTALL_DATA} $${tmp} $(DESTDIR)${desktopdir}/$${dest}.desktop; \ 644 ${INSTALL_DATA} $${tmp} $(DESTDIR)${desktopdir}/${emacs_transform}.desktop; \
642 rm -f $${tmp} 645 rm -f $${tmp}
643 thisdir=`/bin/pwd`; \ 646 thisdir=`/bin/pwd`; \
644 cd ${iconsrcdir} || exit 1; umask 022 ; \ 647 cd ${iconsrcdir} || exit 1; umask 022 ; \
645 for dir in */*/apps */*/mimetypes; do \ 648 for dir in */*/apps */*/mimetypes; do \
646 [ -d $${dir} ] || continue ; \ 649 [ -d $${dir} ] || continue ; \
647 ( cd $${thisdir}; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \ 650 ( cd $${thisdir}; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \
648 for icon in $${dir}/*.*; do \ 651 for icon in $${dir}/emacs[.-]*; do \
649 [ -r $${icon} ] || continue ; \ 652 [ -r $${icon} ] || continue ; \
650 dest=`echo "$${icon}" | sed -e 's|.*/||' -e '$(TRANSFORM)'` ; \ 653 dest=`echo "$${icon}" | sed -e 's|.*/||' -e '$(TRANSFORM)'` ; \
651 ( cd $${thisdir}; \ 654 ( cd $${thisdir}; \
diff --git a/configure.ac b/configure.ac
index 5520dd6a903..7104b9de170 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2538,7 +2538,7 @@ no_return_alloc_pixels
2538 fi 2538 fi
2539 2539
2540 if test "${HAVE_XPM}" = "yes"; then 2540 if test "${HAVE_XPM}" = "yes"; then
2541 AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm libary (-lXpm).]) 2541 AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm library (-lXpm).])
2542 LIBXPM=-lXpm 2542 LIBXPM=-lXpm
2543 fi 2543 fi
2544fi 2544fi
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 66bb2de921b..90beb08233d 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,11 @@
12012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * custom.texi (Hooks): Clarify that -hooks is deprecated.
4
52012-10-23 Chong Yidong <cyd@gnu.org>
6
7 * kmacro.texi (Edit Keyboard Macro): Fix typo.
8
12012-10-18 Dani Moncayo <dmoncayo@gmail.com> 92012-10-18 Dani Moncayo <dmoncayo@gmail.com>
2 10
3 * mini.texi (Completion Options): Fix off-by-one error. (Bug#12644) 11 * mini.texi (Completion Options): Fix off-by-one error. (Bug#12644)
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 68219d7890f..a614126dbc0 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -838,7 +838,8 @@ is a normal hook.
838 838
839@cindex abnormal hook 839@cindex abnormal hook
840 A few hooks are @dfn{abnormal hooks}. Their names end in 840 A few hooks are @dfn{abnormal hooks}. Their names end in
841@samp{-hooks} or @samp{-functions}, instead of @samp{-hook}. What 841@samp{-functions}, instead of @samp{-hook} (some old code may also use
842the deprecated suffix @samp{-hooks}). What
842makes these hooks abnormal is the way its functions are 843makes these hooks abnormal is the way its functions are
843called---perhaps they are given arguments, or perhaps the values they 844called---perhaps they are given arguments, or perhaps the values they
844return are used in some way. For example, 845return are used in some way. For example,
@@ -1735,11 +1736,11 @@ and @kbd{C-c p} in Texinfo mode:
1735 1736
1736@example 1737@example
1737(add-hook 'texinfo-mode-hook 1738(add-hook 'texinfo-mode-hook
1738 '(lambda () 1739 (lambda ()
1739 (define-key texinfo-mode-map "\C-cp" 1740 (define-key texinfo-mode-map "\C-cp"
1740 'backward-paragraph) 1741 'backward-paragraph)
1741 (define-key texinfo-mode-map "\C-cn" 1742 (define-key texinfo-mode-map "\C-cn"
1742 'forward-paragraph))) 1743 'forward-paragraph)))
1743@end example 1744@end example
1744 1745
1745@node Modifier Keys 1746@node Modifier Keys
diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi
index 7a3f3151e5c..3b83d24e405 100644
--- a/doc/emacs/kmacro.texi
+++ b/doc/emacs/kmacro.texi
@@ -482,10 +482,11 @@ Edit the last 300 keystrokes as a keyboard macro
482@kindex C-x C-k C-e 482@kindex C-x C-k C-e
483@kindex C-x C-k RET 483@kindex C-x C-k RET
484 You can edit the last keyboard macro by typing @kbd{C-x C-k C-e} or 484 You can edit the last keyboard macro by typing @kbd{C-x C-k C-e} or
485@kbd{C-x C-k RET} (@code{kmacro-edit-macro}). This formats the macro 485@kbd{C-x C-k @key{RET}} (@code{kmacro-edit-macro}). This formats the
486definition in a buffer and enters a specialized major mode for editing 486macro definition in a buffer and enters a specialized major mode for
487it. Type @kbd{C-h m} once in that buffer to display details of how to 487editing it. Type @kbd{C-h m} once in that buffer to display details
488edit the macro. When you are finished editing, type @kbd{C-c C-c}. 488of how to edit the macro. When you are finished editing, type
489@kbd{C-c C-c}.
489 490
490@findex edit-kbd-macro 491@findex edit-kbd-macro
491@kindex C-x C-k e 492@kindex C-x C-k e
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index 55c3ef4e09e..70ddb81c776 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -17909,10 +17909,10 @@ file that set values:
17909@group 17909@group
17910;; Set calendar highlighting colors 17910;; Set calendar highlighting colors
17911(setq calendar-load-hook 17911(setq calendar-load-hook
17912 '(lambda () 17912 (lambda ()
17913 (set-face-foreground 'diary-face "skyblue") 17913 (set-face-foreground 'diary-face "skyblue")
17914 (set-face-background 'holiday-face "slate blue") 17914 (set-face-background 'holiday-face "slate blue")
17915 (set-face-foreground 'holiday-face "white"))) 17915 (set-face-foreground 'holiday-face "white")))
17916@end group 17916@end group
17917@end smallexample 17917@end smallexample
17918 17918
@@ -20947,7 +20947,7 @@ not yet seen, @code{mapcar} and @code{lambda}.
20947@group 20947@group
20948(defun one-fiftieth (full-range) 20948(defun one-fiftieth (full-range)
20949 "Return list, each number one-fiftieth of previous." 20949 "Return list, each number one-fiftieth of previous."
20950 (mapcar '(lambda (arg) (/ arg 50)) full-range)) 20950 (mapcar (lambda (arg) (/ arg 50)) full-range))
20951@end group 20951@end group
20952@end smallexample 20952@end smallexample
20953 20953
@@ -21168,7 +21168,7 @@ and the second argument is @code{full-range}, which will be bound to
21168The whole expression looks like this: 21168The whole expression looks like this:
21169 21169
21170@smallexample 21170@smallexample
21171(mapcar '(lambda (arg) (/ arg 50)) full-range)) 21171(mapcar (lambda (arg) (/ arg 50)) full-range))
21172@end smallexample 21172@end smallexample
21173 21173
21174@xref{Mapping Functions, , Mapping Functions, elisp, The GNU Emacs 21174@xref{Mapping Functions, , Mapping Functions, elisp, The GNU Emacs
@@ -21840,7 +21840,7 @@ each column."
21840@group 21840@group
21841(defun one-fiftieth (full-range) 21841(defun one-fiftieth (full-range)
21842 "Return list, each number of which is 1/50th previous." 21842 "Return list, each number of which is 1/50th previous."
21843 (mapcar '(lambda (arg) (/ arg 50)) full-range)) 21843 (mapcar (lambda (arg) (/ arg 50)) full-range))
21844@end group 21844@end group
21845@end smallexample 21845@end smallexample
21846 21846
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index acf6f8a51ff..26765e7a384 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,29 @@
12012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * hooks.texi (Standard Hooks): Clarify that -hooks is deprecated.
4
52012-10-23 Paul Eggert <eggert@cs.ucla.edu>
6
7 Fix outdated timestamp documentation in Elisp manual (bug#12706).
8 * files.texi (File Attributes):
9 * text.texi (Undo):
10 Time stamp resolution is now 1 picosecond, not 1 second.
11
122012-10-23 Chong Yidong <cyd@gnu.org>
13
14 * display.texi (Font Lookup): Remove font-list-limit.
15
16 * keymaps.texi (Key Sequences): Avoid referring to Edit Macro mode
17 (Bug#12529).
18
192012-10-22 Glenn Morris <rgm@gnu.org>
20
21 * os.texi (Recording Input): Tiny fix.
22
23 * intro.texi (Lisp History):
24 * lists.texi (Sets And Lists): Refer to cl-lib rather than cl.
25 * tips.texi (Coding Conventions): Recommend cl-lib over cl.
26
12012-10-15 Chong Yidong <cyd@gnu.org> 272012-10-15 Chong Yidong <cyd@gnu.org>
2 28
3 * macros.texi (Defining Macros): defmacro is now a macro. 29 * macros.texi (Defining Macros): defmacro is now a macro.
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 3f92c50e2bc..0b5ada43744 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2944,14 +2944,6 @@ The last three elements give additional information about the font.
2944encoding of the font. 2944encoding of the font.
2945@end defun 2945@end defun
2946 2946
2947@defopt font-list-limit
2948This variable specifies maximum number of fonts to consider in font
2949matching. The function @code{x-family-fonts} will not return more
2950than that many fonts, and font selection will consider only that many
2951fonts when searching a matching font for face attributes. The default
2952is 100.
2953@end defopt
2954
2955@node Fontsets 2947@node Fontsets
2956@subsection Fontsets 2948@subsection Fontsets
2957 2949
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 9424a661236..285e6406426 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1220,9 +1220,8 @@ point number.
1220The file's @acronym{GID}, likewise. 1220The file's @acronym{GID}, likewise.
1221 1221
1222@item 1222@item
1223The time of last access, as a list of two integers. 1223The time of last access, as a list of four integers @code{(@var{sec-high}
1224The first integer has the high-order 16 bits of time, 1224@var{sec-low} @var{microsec} @var{picosec})}. (This is similar to the
1225the second has the low 16 bits. (This is similar to the
1226value of @code{current-time}; see @ref{Time of Day}.) Note that on 1225value of @code{current-time}; see @ref{Time of Day}.) Note that on
1227some FAT-based filesystems, only the date of last access is recorded, 1226some FAT-based filesystems, only the date of last access is recorded,
1228so this time will always hold the midnight of the day of last access. 1227so this time will always hold the midnight of the day of last access.
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index c94e46dad18..623106b6d06 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -978,7 +978,7 @@ anonymous function by quoting it as a list:
978@example 978@example
979@group 979@group
980(defun double-property (symbol prop) 980(defun double-property (symbol prop)
981 (change-property symbol prop '(lambda (x) (* 2 x)))) 981 (change-property symbol prop (lambda (x) (* 2 x))))
982@end group 982@end group
983@end example 983@end example
984 984
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index 7c91b51b290..a7f01243641 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -17,11 +17,11 @@ arguments and their values are completely ignored. The recommended way
17to put a new function on such a hook is to call @code{add-hook}. 17to put a new function on such a hook is to call @code{add-hook}.
18@xref{Hooks}, for more information about using hooks. 18@xref{Hooks}, for more information about using hooks.
19 19
20The variables whose names end in @samp{-hooks} or @samp{-functions} are 20The variables whose names end in @samp{-functions} are usually @dfn{abnormal
21usually @dfn{abnormal hooks}; their values are lists of functions, but 21hooks} (some old code may also use the deprecated @samp{-hooks} suffix); their
22these functions are called in a special way (they are passed arguments, 22values are lists of functions, but these functions are called in a special way
23or their values are used). The variables whose names end in 23(they are passed arguments, or their return values are used). The variables
24@samp{-function} have single functions as their values. 24whose names end in @samp{-function} have single functions as their values.
25 25
26This is not an exhaustive list, it only covers the more general hooks. 26This is not an exhaustive list, it only covers the more general hooks.
27For example, every major mode defines a hook named 27For example, every major mode defines a hook named
diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi
index ce103a84a74..e61e13662db 100644
--- a/doc/lispref/intro.texi
+++ b/doc/lispref/intro.texi
@@ -119,7 +119,7 @@ worry about it; this manual is self-contained.
119 119
120@pindex cl 120@pindex cl
121 A certain amount of Common Lisp emulation is available via the 121 A certain amount of Common Lisp emulation is available via the
122@file{cl} library. @xref{Top,, Overview, cl, Common Lisp Extensions}. 122@file{cl-lib} library. @xref{Top,, Overview, cl, Common Lisp Extensions}.
123 123
124 Emacs Lisp is not at all influenced by Scheme; but the GNU project has 124 Emacs Lisp is not at all influenced by Scheme; but the GNU project has
125an implementation of Scheme, called Guile. We use it in all new GNU 125an implementation of Scheme, called Guile. We use it in all new GNU
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 40dfcaea043..9fa6193a804 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -78,11 +78,11 @@ representations, @ref{Init Rebinding,,, emacs, The GNU Emacs Manual}.
78@defmac kbd keyseq-text 78@defmac kbd keyseq-text
79This macro converts the text @var{keyseq-text} (a string constant) 79This macro converts the text @var{keyseq-text} (a string constant)
80into a key sequence (a string or vector constant). The contents of 80into a key sequence (a string or vector constant). The contents of
81@var{keyseq-text} should describe the key sequence using almost the same 81@var{keyseq-text} should use the same syntax as in the buffer invoked
82syntax used in this manual. More precisely, it uses the same syntax 82by the @kbd{C-x C-k @key{RET}} (@code{kmacro-edit-macro}) command; in
83that Edit Macro mode uses for editing keyboard macros (@pxref{Edit 83particular, you must surround function key names with
84Keyboard Macro,,, emacs, The GNU Emacs Manual}); you must surround 84@samp{<@dots{}>}. @xref{Edit Keyboard Macro,,, emacs, The GNU Emacs
85function key names with @samp{<@dots{}>}. 85Manual}.
86 86
87@example 87@example
88(kbd "C-x") @result{} "\C-x" 88(kbd "C-x") @result{} "\C-x"
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index d685ce0aa74..4a8740a5734 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -1266,7 +1266,7 @@ functions for sets include @code{memq} and @code{delq}, and their
1266@quotation 1266@quotation
1267@b{Common Lisp note:} Common Lisp has functions @code{union} (which 1267@b{Common Lisp note:} Common Lisp has functions @code{union} (which
1268avoids duplicate elements) and @code{intersection} for set operations. 1268avoids duplicate elements) and @code{intersection} for set operations.
1269Although standard GNU Emacs Lisp does not have them, the @file{cl} 1269Although standard GNU Emacs Lisp does not have them, the @file{cl-lib}
1270library provides versions. @xref{Top,, Overview, cl, Common Lisp Extensions}. 1270library provides versions. @xref{Top,, Overview, cl, Common Lisp Extensions}.
1271@end quotation 1271@end quotation
1272 1272
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index aa243185359..77a31cfde7a 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -897,8 +897,8 @@ It then restores any autoloads formerly associated with those symbols.
897 897
898Before restoring the previous definitions, @code{unload-feature} runs 898Before restoring the previous definitions, @code{unload-feature} runs
899@code{remove-hook} to remove functions in the library from certain 899@code{remove-hook} to remove functions in the library from certain
900hooks. These hooks include variables whose names end in @samp{hook} 900hooks. These hooks include variables whose names end in @samp{-hook}
901or @samp{-hooks}, plus those listed in 901(or the deprecated suffix @samp{-hooks}), plus those listed in
902@code{unload-feature-special-hooks}, as well as 902@code{unload-feature-special-hooks}, as well as
903@code{auto-mode-alist}. This is to prevent Emacs from ceasing to 903@code{auto-mode-alist}. This is to prevent Emacs from ceasing to
904function because important hooks refer to functions that are no longer 904function because important hooks refer to functions that are no longer
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 8b5e3da493a..4e4d700aade 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -70,9 +70,9 @@ called. You can use @code{add-hook} to add a function to an abnormal
70hook, but you must write the function to follow the hook's calling 70hook, but you must write the function to follow the hook's calling
71convention. 71convention.
72 72
73 By convention, abnormal hook names end in @samp{-functions} or 73 By convention, abnormal hook names end in @samp{-functions}. If the
74@samp{-hooks}. If the variable's name ends in @samp{-function}, then 74variable's name ends in @samp{-function}, then its value is just a single
75its value is just a single function, not a list of functions. 75function, not a list of functions.
76 76
77@menu 77@menu
78* Running Hooks:: How to run a hook. 78* Running Hooks:: How to run a hook.
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 54754f8e5e9..d3c3c6fd241 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1963,7 +1963,7 @@ is the character Emacs currently uses for quitting, usually @kbd{C-g}.
1963This function returns a vector containing the last 300 input events from 1963This function returns a vector containing the last 300 input events from
1964the keyboard or mouse. All input events are included, whether or not 1964the keyboard or mouse. All input events are included, whether or not
1965they were used as parts of key sequences. Thus, you always get the last 1965they were used as parts of key sequences. Thus, you always get the last
1966100 input events, not counting events generated by keyboard macros. 1966300 input events, not counting events generated by keyboard macros.
1967(These are excluded because they are less interesting for debugging; it 1967(These are excluded because they are less interesting for debugging; it
1968should be enough to see the events that invoked the macros.) 1968should be enough to see the events that invoked the macros.)
1969 1969
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index a5910ea921b..50b97cd4204 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -1233,11 +1233,12 @@ reinsert it is @code{(abs @var{position})}. If @var{position} is
1233positive, point was at the beginning of the deleted text, otherwise it 1233positive, point was at the beginning of the deleted text, otherwise it
1234was at the end. 1234was at the end.
1235 1235
1236@item (t @var{high} . @var{low}) 1236@item (t @var{sec-high} @var{sec-low} @var{microsec} @var{picosec})
1237This kind of element indicates that an unmodified buffer became 1237This kind of element indicates that an unmodified buffer became
1238modified. The elements @var{high} and @var{low} are two integers, each 1238modified. The list @code{(@var{sec-high} @var{sec-low} @var{microsec}
1239recording 16 bits of the visited file's modification time as of when it 1239@var{picosec})} represents the visited file's modification time as of
1240was previously visited or saved. @code{primitive-undo} uses those 1240when it was previously visited or saved, using the same format as
1241@code{current-time}; see @ref{Time of Day}. @code{primitive-undo} uses those
1241values to determine whether to mark the buffer as unmodified once again; 1242values to determine whether to mark the buffer as unmodified once again;
1242it does so only if the file's modification time matches those numbers. 1243it does so only if the file's modification time matches those numbers.
1243 1244
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index 0c7282c3586..4336baa128f 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -120,15 +120,18 @@ library when needed. This way people who don't use those aspects of
120your file do not need to load the extra library. 120your file do not need to load the extra library.
121 121
122@item 122@item
123Please don't require the @code{cl} package of Common Lisp extensions at 123If you need Common Lisp extensions, use the @code{cl-lib} library
124run time. Use of this package is optional, and it is not part of the 124rather than the old @code{cl} library. The latter does not
125standard Emacs namespace. If your package loads @code{cl} at run time, 125use a clean namespace (i.e., its definitions do not
126that could cause name clashes for users who don't use that package. 126start with a @samp{cl-} prefix). If your package loads @code{cl} at
127 127run time, that could cause name clashes for users who don't use that
128However, there is no problem with using the @code{cl} package at 128package.
129compile time, with @code{(eval-when-compile (require 'cl))}. That's 129
130There is no problem with using the @code{cl} package at @emph{compile}
131time, with @code{(eval-when-compile (require 'cl))}. That's
130sufficient for using the macros in the @code{cl} package, because the 132sufficient for using the macros in the @code{cl} package, because the
131compiler expands them before generating the byte-code. 133compiler expands them before generating the byte-code. It is still
134better to use the more modern @code{cl-lib} in this case, though.
132 135
133@item 136@item
134When defining a major mode, please follow the major mode 137When defining a major mode, please follow the major mode
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 3ee183ff255..cda4f272ca2 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,18 @@
12012-10-23 Glenn Morris <rgm@gnu.org>
2
3 * cl.texi: Include emacsver.texi. Use Emacs version number rather
4 than unchanging cl.el version number.
5 End all menu descriptions with a period.
6 Do not use @dfn{CL} for every instance of "CL".
7 (Overview): Remove no-runtime caveat, and note about foo* names.
8 (Usage): Use cl-lib rather than cl.
9 (Organization, Naming Conventions): Update for cl-lib.el.
10 (Installation): Remove long-irrelevant node.
11 (Program Structure, Predicates, Control Structure):
12 Start updating for cl-lib namespace.
13 * Makefile.in ($(buildinfodir)/cl$(INFO_EXT), cl.dvi, cl.pdf):
14 Depend on emacsver.texi.
15
12012-10-09 Michael Albinus <michael.albinus@gmx.de> 162012-10-09 Michael Albinus <michael.albinus@gmx.de>
2 17
3 * trampver.texi: Update release number. 18 * trampver.texi: Update release number.
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 5ce6d82e683..ea1e87333bd 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -237,12 +237,12 @@ cc-mode.pdf: ${srcdir}/cc-mode.texi
237 $(ENVADD) $(TEXI2PDF) ${srcdir}/cc-mode.texi 237 $(ENVADD) $(TEXI2PDF) ${srcdir}/cc-mode.texi
238 238
239cl : $(buildinfodir)/cl$(INFO_EXT) 239cl : $(buildinfodir)/cl$(INFO_EXT)
240$(buildinfodir)/cl$(INFO_EXT): ${srcdir}/cl.texi 240$(buildinfodir)/cl$(INFO_EXT): ${srcdir}/cl.texi $(emacsdir)/emacsver.texi
241 $(mkinfodir) 241 $(mkinfodir)
242 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/cl.texi 242 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/cl.texi
243cl.dvi: ${srcdir}/cl.texi 243cl.dvi: ${srcdir}/cl.texi $(emacsdir)/emacsver.texi
244 $(ENVADD) $(TEXI2DVI) ${srcdir}/cl.texi 244 $(ENVADD) $(TEXI2DVI) ${srcdir}/cl.texi
245cl.pdf: ${srcdir}/cl.texi 245cl.pdf: ${srcdir}/cl.texi $(emacsdir)/emacsver.texi
246 $(ENVADD) $(TEXI2PDF) ${srcdir}/cl.texi 246 $(ENVADD) $(TEXI2PDF) ${srcdir}/cl.texi
247 247
248dbus : $(buildinfodir)/dbus$(INFO_EXT) 248dbus : $(buildinfodir)/dbus$(INFO_EXT)
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index 18abb0647a2..12fd76e2e1c 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -1,6 +1,7 @@
1\input texinfo @c -*-texinfo-*- 1\input texinfo @c -*-texinfo-*-
2@setfilename ../../info/cl 2@setfilename ../../info/cl
3@settitle Common Lisp Extensions 3@settitle Common Lisp Extensions
4@include emacsver.texi
4 5
5@copying 6@copying
6This file documents the GNU Emacs Common Lisp emulation package. 7This file documents the GNU Emacs Common Lisp emulation package.
@@ -34,7 +35,7 @@ developing GNU and promoting software freedom.''
34@sp 4 35@sp 4
35@center For GNU Emacs Lisp 36@center For GNU Emacs Lisp
36@sp 1 37@sp 1
37@center Version 2.02 38@center as distributed with Emacs @value{EMACSVER}
38@sp 5 39@sp 5
39@center Dave Gillespie 40@center Dave Gillespie
40@center daveg@@synaptics.com 41@center daveg@@synaptics.com
@@ -53,23 +54,23 @@ developing GNU and promoting software freedom.''
53@end ifnottex 54@end ifnottex
54 55
55@menu 56@menu
56* Overview:: Installation, usage, etc. 57* Overview:: Basics, usage, etc.
57* Program Structure:: Arglists, @code{eval-when}, @code{defalias} 58* Program Structure:: Arglists, @code{cl-eval-when}, @code{defalias}.
58* Predicates:: @code{typep} and @code{equalp} 59* Predicates:: @code{cl-typep} and @code{cl-equalp}.
59* Control Structure:: @code{setf}, @code{do}, @code{loop}, etc. 60* Control Structure:: @code{setf}, @code{cl-do}, @code{cl-loop}, etc.
60* Macros:: Destructuring, @code{define-compiler-macro} 61* Macros:: Destructuring, @code{cl-define-compiler-macro}.
61* Declarations:: @code{proclaim}, @code{declare}, etc. 62* Declarations:: @code{cl-proclaim}, @code{cl-declare}, etc.
62* Symbols:: Property lists, @code{gensym} 63* Symbols:: Property lists, @code{cl-gensym}.
63* Numbers:: Predicates, functions, random numbers 64* Numbers:: Predicates, functions, random numbers.
64* Sequences:: Mapping, functions, searching, sorting 65* Sequences:: Mapping, functions, searching, sorting.
65* Lists:: @code{caddr}, @code{sublis}, @code{member*}, @code{assoc*}, etc. 66* Lists:: @code{cl-caddr}, @code{cl-sublis}, @code{cl-member}, @code{cl-assoc}, etc.
66* Structures:: @code{defstruct} 67* Structures:: @code{cl-defstruct}.
67* Assertions:: @code{check-type}, @code{assert}, @code{ignore-errors}. 68* Assertions:: @code{cl-check-type}, @code{cl-assert}, @code{ignore-errors}.
68 69
69* Efficiency Concerns:: Hints and techniques 70* Efficiency Concerns:: Hints and techniques.
70* Common Lisp Compatibility:: All known differences with Steele 71* Common Lisp Compatibility:: All known differences with Steele.
71* Old CL Compatibility:: All known differences with old cl.el 72* Old CL Compatibility:: All known differences with old cl.el.
72* Porting Common Lisp:: Hints for porting Common Lisp code 73* Porting Common Lisp:: Hints for porting Common Lisp code.
73 74
74* GNU Free Documentation License:: The license for this documentation. 75* GNU Free Documentation License:: The license for this documentation.
75* Function Index:: 76* Function Index::
@@ -92,21 +93,11 @@ As Emacs Lisp programmers have grown in number, and the applications
92they write have grown more ambitious, it has become clear that Emacs 93they write have grown more ambitious, it has become clear that Emacs
93Lisp could benefit from many of the conveniences of Common Lisp. 94Lisp could benefit from many of the conveniences of Common Lisp.
94 95
95The @dfn{CL} package adds a number of Common Lisp functions and 96The @code{CL} package adds a number of Common Lisp functions and
96control structures to Emacs Lisp. While not a 100% complete 97control structures to Emacs Lisp. While not a 100% complete
97implementation of Common Lisp, @dfn{CL} adds enough functionality 98implementation of Common Lisp, @code{CL} adds enough functionality
98to make Emacs Lisp programming significantly more convenient. 99to make Emacs Lisp programming significantly more convenient.
99 100
100@strong{Please note:} the @dfn{CL} functions are not standard parts of
101the Emacs Lisp name space, so it is legitimate for users to define
102them with other, conflicting meanings. To avoid conflicting with
103those user activities, we have a policy that packages installed in
104Emacs must not load @dfn{CL} at run time. (It is ok for them to load
105@dfn{CL} at compile time only, with @code{eval-when-compile}, and use
106the macros it provides.) If you are writing packages that you plan to
107distribute and invite widespread use for, you might want to observe
108the same rule.
109
110Some Common Lisp features have been omitted from this package 101Some Common Lisp features have been omitted from this package
111for various reasons: 102for various reasons:
112 103
@@ -119,152 +110,131 @@ examples of this group.
119@item 110@item
120Other features cannot be implemented without modification to the 111Other features cannot be implemented without modification to the
121Emacs Lisp interpreter itself, such as multiple return values, 112Emacs Lisp interpreter itself, such as multiple return values,
122lexical scoping, case-insensitive symbols, and complex numbers. 113case-insensitive symbols, and complex numbers.
123The @dfn{CL} package generally makes no attempt to emulate these 114The @code{CL} package generally makes no attempt to emulate these
124features. 115features.
125 116
126@item
127Some features conflict with existing things in Emacs Lisp. For
128example, Emacs's @code{assoc} function is incompatible with the
129Common Lisp @code{assoc}. In such cases, this package usually
130adds the suffix @samp{*} to the function name of the Common
131Lisp version of the function (e.g., @code{assoc*}).
132@end itemize 117@end itemize
133 118
134The package described here was written by Dave Gillespie, 119The package described here was originally written by Dave Gillespie,
135@file{daveg@@synaptics.com}. It is a total rewrite of the original 120@file{daveg@@synaptics.com}, as a total rewrite of an earlier
1361986 @file{cl.el} package by Cesar Quiroz. Most features of the 1211986 @file{cl.el} package by Cesar Quiroz. Most features of the
137Quiroz package have been retained; any incompatibilities are 122Quiroz package were retained; any incompatibilities are
138noted in the descriptions below. Care has been taken in this 123noted in the descriptions below. Care has been taken in this
139version to ensure that each function is defined efficiently, 124version to ensure that each function is defined efficiently,
140concisely, and with minimal impact on the rest of the Emacs 125concisely, and with minimal impact on the rest of the Emacs
141environment. 126environment. Stefan Monnier added the file @file{cl-lib.el} and
127rationalized the namespace for Emacs 24.3.
142 128
143@menu 129@menu
144* Usage:: How to use the CL package 130* Usage:: How to use the CL package.
145* Organization:: The package's five component files 131* Organization:: The package's five component files.
146* Installation:: Compiling and installing CL 132* Naming Conventions:: Notes on CL function names.
147* Naming Conventions:: Notes on CL function names
148@end menu 133@end menu
149 134
150@node Usage 135@node Usage
151@section Usage 136@section Usage
152 137
153@noindent 138@noindent
154Lisp code that uses features from the @dfn{CL} package should 139The @code{CL} package is distributed with Emacs, so there is no need
155include at the beginning: 140to install any additional files in order to start using it. Lisp code
141that uses features from the @code{CL} package should simply include at
142the beginning:
156 143
157@example 144@example
158(require 'cl) 145(require 'cl-lib)
159@end example 146@end example
160 147
161@noindent 148@noindent
162It is safe to arrange to load @dfn{CL} at all times, e.g., 149You may wish to add such a statement to your init file, if you
163in your @file{.emacs} file. But it's a good idea, for portability, 150make frequent use of CL features.
164to @code{(require 'cl)} in your code even if you do this.
165 151
166@node Organization 152@node Organization
167@section Organization 153@section Organization
168 154
169@noindent 155@noindent
170The Common Lisp package is organized into four files: 156The Common Lisp package is organized into four main files:
171 157
172@table @file 158@table @file
173@item cl.el 159@item cl-lib.el
174This is the ``main'' file, which contains basic functions 160This is the main file, which contains basic functions
175and information about the package. This file is relatively 161and information about the package. This file is relatively compact.
176compact---about 700 lines.
177 162
178@item cl-extra.el 163@item cl-extra.el
179This file contains the larger, more complex or unusual functions. 164This file contains the larger, more complex or unusual functions.
180It is kept separate so that packages which only want to use Common 165It is kept separate so that packages which only want to use Common
181Lisp fundamentals like the @code{cadr} function won't need to pay 166Lisp fundamentals like the @code{cl-incf} function won't need to pay
182the overhead of loading the more advanced functions. 167the overhead of loading the more advanced functions.
183 168
184@item cl-seq.el 169@item cl-seq.el
185This file contains most of the advanced functions for operating 170This file contains most of the advanced functions for operating
186on sequences or lists, such as @code{delete-if} and @code{assoc*}. 171on sequences or lists, such as @code{cl-delete-if} and @code{cl-assoc}.
187 172
188@item cl-macs.el 173@item cl-macs.el
189This file contains the features of the packages which are macros 174This file contains the features that are macros instead of functions.
190instead of functions. Macros expand when the caller is compiled, 175Macros expand when the caller is compiled, not when it is run, so the
191not when it is run, so the macros generally only need to be 176macros generally only need to be present when the byte-compiler is
192present when the byte-compiler is running (or when the macros are 177running (or when the macros are used in uncompiled code). Most of the
193used in uncompiled code such as a @file{.emacs} file). Most of 178macros of this package are isolated in @file{cl-macs.el} so that they
194the macros of this package are isolated in @file{cl-macs.el} so 179won't take up memory unless you are compiling.
195that they won't take up memory unless you are compiling.
196@end table 180@end table
197 181
198The file @file{cl.el} includes all necessary @code{autoload} 182The file @file{cl-lib.el} includes all necessary @code{autoload}
199commands for the functions and macros in the other three files. 183commands for the functions and macros in the other three files.
200All you have to do is @code{(require 'cl)}, and @file{cl.el} 184All you have to do is @code{(require 'cl-lib)}, and @file{cl-lib.el}
201will take care of pulling in the other files when they are 185will take care of pulling in the other files when they are
202needed. 186needed.
203 187
204There is another file, @file{cl-compat.el}, which defines some 188There is another file, @file{cl.el}, which was the main entry point
205routines from the older @file{cl.el} package that are not otherwise 189to the CL package prior to Emacs 24.3. Nowadays, it is replaced
190by @file{cl-lib.el}. The two provide the same features, but use
191different function names (in fact, @file{cl.el} just defines aliases
192to the @file{cl-lib.el} definitions). In particular, the old @file{cl.el}
193does not use a clean namespace. For this reason, Emacs has a policy
194that packages distributed with Emacs must not load @code{cl} at run time.
195(It is ok for them to load @code{cl} at @emph{compile} time, with
196@code{eval-when-compile}, and use the macros it provides.) There is
197no such restriction on the use of @code{cl-lib}. New code should use
198@code{cl-lib} rather than @code{cl}. @xref{Naming Conventions}.
199
200There is one more file, @file{cl-compat.el}, which defines some
201routines from the older CL package that are not otherwise
206present in the new package. This includes internal routines 202present in the new package. This includes internal routines
207like @code{setelt} and @code{zip-lists}, deprecated features 203like @code{setelt} and @code{zip-lists}, deprecated features
208like @code{defkeyword}, and an emulation of the old-style 204like @code{defkeyword}, and an emulation of the old-style
209multiple-values feature. This file is obsolete and should not be used 205multiple-values feature. This file is obsolete and should not be used
210in new code. @xref{Old CL Compatibility}. 206in new code. @xref{Old CL Compatibility}.
211 207
212@node Installation
213@section Installation
214
215@noindent
216The @dfn{CL} package is distributed with Emacs, so there is no need
217to install anything.
218
219If you do need to install it, just put the byte-compiled files
220@file{cl.elc}, @file{cl-extra.elc}, @file{cl-seq.elc},
221@file{cl-macs.elc}, and (if necessary) @file{cl-compat.elc} into a
222directory on your @code{load-path}. Also, format the @file{cl.texi}
223file and put the resulting Info files into a directory in your
224@code{Info-directory-list}.
225
226@node Naming Conventions 208@node Naming Conventions
227@section Naming Conventions 209@section Naming Conventions
228 210
229@noindent 211@noindent
230Except where noted, all functions defined by this package have the 212Except where noted, all functions defined by this package have the
231same names and calling conventions as their Common Lisp counterparts. 213same calling conventions as their Common Lisp counterparts, and
232 214names that are those of Common Lisp plus a @samp{cl-} prefix.
233Following is a complete list of functions whose names were changed
234from Common Lisp, usually to avoid conflicts with Emacs. In each
235case, a @samp{*} has been appended to the Common Lisp name to obtain
236the Emacs name:
237
238@example
239defun* defsubst* defmacro* function*
240member* assoc* rassoc* get*
241remove* delete* mapcar* sort*
242floor* ceiling* truncate* round*
243mod* rem* random*
244@end example
245 215
246Internal function and variable names in the package are prefixed 216Internal function and variable names in the package are prefixed
247by @code{cl-}. Here is a complete list of functions @emph{not} 217by @code{cl--}. Here is a complete list of functions prefixed by
248prefixed by @code{cl-} which were not taken from Common Lisp: 218@code{cl-} that were not taken from Common Lisp:
249 219
220@c FIXME lexical-let lexical-let*
250@example 221@example
251floatp-safe lexical-let lexical-let* 222cl-callf cl-callf2 cl-defsubst
252callf callf2 letf letf* 223cl-floatp-safe cl-letf cl-letf*
253defsubst*
254@end example 224@end example
255 225
256The following simple functions and macros are defined in @file{cl.el}; 226The following simple functions and macros are defined in @file{cl-lib.el};
257they do not cause other components like @file{cl-extra} to be loaded. 227they do not cause other components like @file{cl-extra} to be loaded.
258 228
259@example 229@example
260floatp-safe endp 230cl-floatp-safe cl-endp
261evenp oddp plusp minusp 231cl-evenp cl-oddp cl-plusp cl-minusp
262caaar .. cddddr 232cl-caaar .. cl-cddddr
263list* ldiff rest first .. tenth 233cl-list* cl-ldiff cl-rest cl-first .. cl-tenth
264copy-list subst mapcar* [2] 234cl-copy-list cl-subst cl-mapcar [2]
265adjoin [3] acons pairlis pop [4] 235cl-adjoin [3] cl-acons cl-pairlis
266push [4] pushnew [3,4] incf [4] decf [4] 236cl-pushnew [3,4] cl-incf [4] cl-decf [4]
267proclaim declaim 237cl-proclaim cl-declaim
268@end example 238@end example
269 239
270@noindent 240@noindent
@@ -281,13 +251,13 @@ and @code{:key} is not used.
281@chapter Program Structure 251@chapter Program Structure
282 252
283@noindent 253@noindent
284This section describes features of the @dfn{CL} package which have to 254This section describes features of the @code{CL} package that have to
285do with programs as a whole: advanced argument lists for functions, 255do with programs as a whole: advanced argument lists for functions,
286and the @code{eval-when} construct. 256and the @code{cl-eval-when} construct.
287 257
288@menu 258@menu
289* Argument Lists:: @code{&key}, @code{&aux}, @code{defun*}, @code{defmacro*}. 259* Argument Lists:: @code{&key}, @code{&aux}, @code{cl-defun}, @code{cl-defmacro}.
290* Time of Evaluation:: The @code{eval-when} construct. 260* Time of Evaluation:: The @code{cl-eval-when} construct.
291@end menu 261@end menu
292 262
293@iftex 263@iftex
@@ -309,26 +279,26 @@ this package to implement Common Lisp argument lists seamlessly.
309Instead, this package defines alternates for several Lisp forms 279Instead, this package defines alternates for several Lisp forms
310which you must use if you need Common Lisp argument lists. 280which you must use if you need Common Lisp argument lists.
311 281
312@defspec defun* name arglist body... 282@defspec cl-defun name arglist body...
313This form is identical to the regular @code{defun} form, except 283This form is identical to the regular @code{defun} form, except
314that @var{arglist} is allowed to be a full Common Lisp argument 284that @var{arglist} is allowed to be a full Common Lisp argument
315list. Also, the function body is enclosed in an implicit block 285list. Also, the function body is enclosed in an implicit block
316called @var{name}; @pxref{Blocks and Exits}. 286called @var{name}; @pxref{Blocks and Exits}.
317@end defspec 287@end defspec
318 288
319@defspec defsubst* name arglist body... 289@defspec cl-defsubst name arglist body...
320This is just like @code{defun*}, except that the function that 290This is just like @code{cl-defun}, except that the function that
321is defined is automatically proclaimed @code{inline}, i.e., 291is defined is automatically proclaimed @code{inline}, i.e.,
322calls to it may be expanded into in-line code by the byte compiler. 292calls to it may be expanded into in-line code by the byte compiler.
323This is analogous to the @code{defsubst} form; 293This is analogous to the @code{defsubst} form;
324@code{defsubst*} uses a different method (compiler macros) which 294@code{cl-defsubst} uses a different method (compiler macros) which
325works in all versions of Emacs, and also generates somewhat more 295works in all versions of Emacs, and also generates somewhat more
326efficient inline expansions. In particular, @code{defsubst*} 296efficient inline expansions. In particular, @code{cl-defsubst}
327arranges for the processing of keyword arguments, default values, 297arranges for the processing of keyword arguments, default values,
328etc., to be done at compile-time whenever possible. 298etc., to be done at compile-time whenever possible.
329@end defspec 299@end defspec
330 300
331@defspec defmacro* name arglist body... 301@defspec cl-defmacro name arglist body...
332This is identical to the regular @code{defmacro} form, 302This is identical to the regular @code{defmacro} form,
333except that @var{arglist} is allowed to be a full Common Lisp 303except that @var{arglist} is allowed to be a full Common Lisp
334argument list. The @code{&environment} keyword is supported as 304argument list. The @code{&environment} keyword is supported as
@@ -339,19 +309,19 @@ The macro expander body is enclosed in an implicit block called
339@var{name}. 309@var{name}.
340@end defspec 310@end defspec
341 311
342@defspec function* symbol-or-lambda 312@defspec cl-function symbol-or-lambda
343This is identical to the regular @code{function} form, 313This is identical to the regular @code{function} form,
344except that if the argument is a @code{lambda} form then that 314except that if the argument is a @code{lambda} form then that
345form may use a full Common Lisp argument list. 315form may use a full Common Lisp argument list.
346@end defspec 316@end defspec
347 317
348Also, all forms (such as @code{defsetf} and @code{flet}) defined 318Also, all forms (such as @code{cl-flet} and @code{cl-labels}) defined
349in this package that include @var{arglist}s in their syntax allow 319in this package that include @var{arglist}s in their syntax allow
350full Common Lisp argument lists. 320full Common Lisp argument lists.
351 321
352Note that it is @emph{not} necessary to use @code{defun*} in 322Note that it is @emph{not} necessary to use @code{cl-defun} in
353order to have access to most @dfn{CL} features in your function. 323order to have access to most @code{CL} features in your function.
354These features are always present; @code{defun*}'s only 324These features are always present; @code{cl-defun}'s only
355difference from @code{defun} is its more flexible argument 325difference from @code{defun} is its more flexible argument
356lists and its implicit block. 326lists and its implicit block.
357 327
@@ -401,7 +371,7 @@ are optional arguments which are specified by name rather than
401positionally in the argument list. For example, 371positionally in the argument list. For example,
402 372
403@example 373@example
404(defun* foo (a &optional b &key c d (e 17))) 374(cl-defun foo (a &optional b &key c d (e 17)))
405@end example 375@end example
406 376
407@noindent 377@noindent
@@ -427,7 +397,7 @@ You can also explicitly specify the keyword argument; it need not be
427simply the variable name prefixed with a colon. For example, 397simply the variable name prefixed with a colon. For example,
428 398
429@example 399@example
430(defun* bar (&key (a 1) ((baz b) 4))) 400(cl-defun bar (&key (a 1) ((baz b) 4)))
431@end example 401@end example
432 402
433@noindent 403@noindent
@@ -453,16 +423,16 @@ the ``rest'' argument is bound to the keyword list as it appears
453in the call. For example: 423in the call. For example:
454 424
455@smallexample 425@smallexample
456(defun* find-thing (thing &rest rest &key need &allow-other-keys) 426(cl-defun find-thing (thing &rest rest &key need &allow-other-keys)
457 (or (apply 'member* thing thing-list :allow-other-keys t rest) 427 (or (apply 'cl-member thing thing-list :allow-other-keys t rest)
458 (if need (error "Thing not found")))) 428 (if need (error "Thing not found"))))
459@end smallexample 429@end smallexample
460 430
461@noindent 431@noindent
462This function takes a @code{:need} keyword argument, but also 432This function takes a @code{:need} keyword argument, but also
463accepts other keyword arguments which are passed on to the 433accepts other keyword arguments which are passed on to the
464@code{member*} function. @code{allow-other-keys} is used to 434@code{cl-member} function. @code{allow-other-keys} is used to
465keep both @code{find-thing} and @code{member*} from complaining 435keep both @code{find-thing} and @code{cl-member} from complaining
466about each others' keywords in the arguments. 436about each others' keywords in the arguments.
467 437
468The fifth section of the argument list consists of @dfn{auxiliary 438The fifth section of the argument list consists of @dfn{auxiliary
@@ -473,17 +443,17 @@ difference between the following two functions, except for a
473matter of stylistic taste: 443matter of stylistic taste:
474 444
475@example 445@example
476(defun* foo (a b &aux (c (+ a b)) d) 446(cl-defun foo (a b &aux (c (+ a b)) d)
477 @var{body}) 447 @var{body})
478 448
479(defun* foo (a b) 449(cl-defun foo (a b)
480 (let ((c (+ a b)) d) 450 (let ((c (+ a b)) d)
481 @var{body})) 451 @var{body}))
482@end example 452@end example
483 453
484Argument lists support @dfn{destructuring}. In Common Lisp, 454Argument lists support @dfn{destructuring}. In Common Lisp,
485destructuring is only allowed with @code{defmacro}; this package 455destructuring is only allowed with @code{defmacro}; this package
486allows it with @code{defun*} and other argument lists as well. 456allows it with @code{cl-defun} and other argument lists as well.
487In destructuring, any argument variable (@var{var} in the above 457In destructuring, any argument variable (@var{var} in the above
488diagram) can be replaced by a list of variables, or more generally, 458diagram) can be replaced by a list of variables, or more generally,
489a recursive argument list. The corresponding argument value must 459a recursive argument list. The corresponding argument value must
@@ -491,7 +461,7 @@ be a list whose elements match this recursive argument list.
491For example: 461For example:
492 462
493@example 463@example
494(defmacro* dolist ((var listform &optional resultform) 464(cl-defmacro dolist ((var listform &optional resultform)
495 &rest body) 465 &rest body)
496 ...) 466 ...)
497@end example 467@end example
@@ -532,21 +502,21 @@ For example, the compiler effectively evaluates @code{defmacro} forms
532at compile-time so that later parts of the file can refer to the 502at compile-time so that later parts of the file can refer to the
533macros that are defined. 503macros that are defined.
534 504
535@defspec eval-when (situations...) forms... 505@defspec cl-eval-when (situations...) forms...
536This form controls when the body @var{forms} are evaluated. 506This form controls when the body @var{forms} are evaluated.
537The @var{situations} list may contain any set of the symbols 507The @var{situations} list may contain any set of the symbols
538@code{compile}, @code{load}, and @code{eval} (or their long-winded 508@code{compile}, @code{load}, and @code{eval} (or their long-winded
539ANSI equivalents, @code{:compile-toplevel}, @code{:load-toplevel}, 509ANSI equivalents, @code{:compile-toplevel}, @code{:load-toplevel},
540and @code{:execute}). 510and @code{:execute}).
541 511
542The @code{eval-when} form is handled differently depending on 512The @code{cl-eval-when} form is handled differently depending on
543whether or not it is being compiled as a top-level form. 513whether or not it is being compiled as a top-level form.
544Specifically, it gets special treatment if it is being compiled 514Specifically, it gets special treatment if it is being compiled
545by a command such as @code{byte-compile-file} which compiles files 515by a command such as @code{byte-compile-file} which compiles files
546or buffers of code, and it appears either literally at the 516or buffers of code, and it appears either literally at the
547top level of the file or inside a top-level @code{progn}. 517top level of the file or inside a top-level @code{progn}.
548 518
549For compiled top-level @code{eval-when}s, the body @var{forms} are 519For compiled top-level @code{cl-eval-when}s, the body @var{forms} are
550executed at compile-time if @code{compile} is in the @var{situations} 520executed at compile-time if @code{compile} is in the @var{situations}
551list, and the @var{forms} are written out to the file (to be executed 521list, and the @var{forms} are written out to the file (to be executed
552at load-time) if @code{load} is in the @var{situations} list. 522at 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.
554For non-compiled-top-level forms, only the @code{eval} situation is 524For non-compiled-top-level forms, only the @code{eval} situation is
555relevant. (This includes forms executed by the interpreter, forms 525relevant. (This includes forms executed by the interpreter, forms
556compiled with @code{byte-compile} rather than @code{byte-compile-file}, 526compiled with @code{byte-compile} rather than @code{byte-compile-file},
557and non-top-level forms.) The @code{eval-when} acts like a 527and non-top-level forms.) The @code{cl-eval-when} acts like a
558@code{progn} if @code{eval} is specified, and like @code{nil} 528@code{progn} if @code{eval} is specified, and like @code{nil}
559(ignoring the body @var{forms}) if not. 529(ignoring the body @var{forms}) if not.
560 530
561The rules become more subtle when @code{eval-when}s are nested; 531The rules become more subtle when @code{cl-eval-when}s are nested;
562consult Steele (second edition) for the gruesome details (and 532consult Steele (second edition) for the gruesome details (and
563some gruesome examples). 533some gruesome examples).
564 534
@@ -566,13 +536,13 @@ Some simple examples:
566 536
567@example 537@example
568;; Top-level forms in foo.el: 538;; Top-level forms in foo.el:
569(eval-when (compile) (setq foo1 'bar)) 539(cl-eval-when (compile) (setq foo1 'bar))
570(eval-when (load) (setq foo2 'bar)) 540(cl-eval-when (load) (setq foo2 'bar))
571(eval-when (compile load) (setq foo3 'bar)) 541(cl-eval-when (compile load) (setq foo3 'bar))
572(eval-when (eval) (setq foo4 'bar)) 542(cl-eval-when (eval) (setq foo4 'bar))
573(eval-when (eval compile) (setq foo5 'bar)) 543(cl-eval-when (eval compile) (setq foo5 'bar))
574(eval-when (eval load) (setq foo6 'bar)) 544(cl-eval-when (eval load) (setq foo6 'bar))
575(eval-when (eval compile load) (setq foo7 'bar)) 545(cl-eval-when (eval compile load) (setq foo7 'bar))
576@end example 546@end example
577 547
578When @file{foo.el} is compiled, these variables will be set during 548When @file{foo.el} is compiled, these variables will be set during
@@ -595,18 +565,18 @@ be set:
595foo4 foo5 foo6 foo7 ; `eval' 565foo4 foo5 foo6 foo7 ; `eval'
596@end example 566@end example
597 567
598If these seven @code{eval-when}s had been, say, inside a @code{defun}, 568If these seven @code{cl-eval-when}s had been, say, inside a @code{defun},
599then the first three would have been equivalent to @code{nil} and the 569then the first three would have been equivalent to @code{nil} and the
600last four would have been equivalent to the corresponding @code{setq}s. 570last four would have been equivalent to the corresponding @code{setq}s.
601 571
602Note that @code{(eval-when (load eval) @dots{})} is equivalent 572Note that @code{(cl-eval-when (load eval) @dots{})} is equivalent
603to @code{(progn @dots{})} in all contexts. The compiler treats 573to @code{(progn @dots{})} in all contexts. The compiler treats
604certain top-level forms, like @code{defmacro} (sort-of) and 574certain top-level forms, like @code{defmacro} (sort-of) and
605@code{require}, as if they were wrapped in @code{(eval-when 575@code{require}, as if they were wrapped in @code{(eval-when
606(compile load eval) @dots{})}. 576(compile load eval) @dots{})}.
607@end defspec 577@end defspec
608 578
609Emacs includes two special forms related to @code{eval-when}. 579Emacs includes two special forms related to @code{cl-eval-when}.
610One of these, @code{eval-when-compile}, is not quite equivalent to 580One of these, @code{eval-when-compile}, is not quite equivalent to
611any @code{eval-when} construct and is described below. 581any @code{eval-when} construct and is described below.
612 582
@@ -625,7 +595,7 @@ or other reasons.
625This form is similar to the @samp{#.} syntax of true Common Lisp. 595This form is similar to the @samp{#.} syntax of true Common Lisp.
626@end defspec 596@end defspec
627 597
628@defspec load-time-value form 598@defspec cl-load-time-value form
629The @var{form} is evaluated at load-time; at execution time, 599The @var{form} is evaluated at load-time; at execution time,
630this form acts like a quoted constant of the resulting value. 600this form acts like a quoted constant of the resulting value.
631 601
@@ -633,12 +603,12 @@ Early Common Lisp had a @samp{#,} syntax that was similar to
633this, but ANSI Common Lisp replaced it with @code{load-time-value} 603this, but ANSI Common Lisp replaced it with @code{load-time-value}
634and gave it more well-defined semantics. 604and gave it more well-defined semantics.
635 605
636In a compiled file, @code{load-time-value} arranges for @var{form} 606In a compiled file, @code{cl-load-time-value} arranges for @var{form}
637to be evaluated when the @file{.elc} file is loaded and then used 607to be evaluated when the @file{.elc} file is loaded and then used
638as if it were a quoted constant. In code compiled by 608as if it were a quoted constant. In code compiled by
639@code{byte-compile} rather than @code{byte-compile-file}, the 609@code{byte-compile} rather than @code{byte-compile-file}, the
640effect is identical to @code{eval-when-compile}. In uncompiled 610effect is identical to @code{eval-when-compile}. In uncompiled
641code, both @code{eval-when-compile} and @code{load-time-value} 611code, both @code{eval-when-compile} and @code{cl-load-time-value}
642act exactly like @code{progn}. 612act exactly like @code{progn}.
643 613
644@example 614@example
@@ -649,7 +619,7 @@ act exactly like @code{progn}.
649 (eval-when-compile (current-time-string)) 619 (eval-when-compile (current-time-string))
650 ;; or '#.(current-time-string) in real Common Lisp 620 ;; or '#.(current-time-string) in real Common Lisp
651 ", and loaded on: " 621 ", and loaded on: "
652 (load-time-value (current-time-string)))) 622 (cl-load-time-value (current-time-string))))
653@end example 623@end example
654 624
655@noindent 625@noindent
@@ -676,21 +646,21 @@ This section describes functions for testing whether various
676facts are true or false. 646facts are true or false.
677 647
678@menu 648@menu
679* Type Predicates:: @code{typep}, @code{deftype}, and @code{coerce} 649* Type Predicates:: @code{cl-typep}, @code{cl-deftype}, and @code{cl-coerce}.
680* Equality Predicates:: @code{equalp} 650* Equality Predicates:: @code{cl-equalp}.
681@end menu 651@end menu
682 652
683@node Type Predicates 653@node Type Predicates
684@section Type Predicates 654@section Type Predicates
685 655
686@noindent 656@noindent
687The @dfn{CL} package defines a version of the Common Lisp @code{typep} 657The @code{CL} package defines a version of the Common Lisp @code{typep}
688predicate. 658predicate.
689 659
690@defun typep object type 660@defun cl-typep object type
691Check if @var{object} is of type @var{type}, where @var{type} is a 661Check if @var{object} is of type @var{type}, where @var{type} is a
692(quoted) type name of the sort used by Common Lisp. For example, 662(quoted) type name of the sort used by Common Lisp. For example,
693@code{(typep foo 'integer)} is equivalent to @code{(integerp foo)}. 663@code{(cl-typep foo 'integer)} is equivalent to @code{(integerp foo)}.
694@end defun 664@end defun
695 665
696The @var{type} argument to the above function is either a symbol 666The @var{type} argument to the above function is either a symbol
@@ -705,18 +675,18 @@ than @samp{-p} are used when appropriate.)
705 675
706@item 676@item
707The type symbol @code{t} stands for the union of all types. 677The type symbol @code{t} stands for the union of all types.
708@code{(typep @var{object} t)} is always true. Likewise, the 678@code{(cl-typep @var{object} t)} is always true. Likewise, the
709type symbol @code{nil} stands for nothing at all, and 679type symbol @code{nil} stands for nothing at all, and
710@code{(typep @var{object} nil)} is always false. 680@code{(cl-typep @var{object} nil)} is always false.
711 681
712@item 682@item
713The type symbol @code{null} represents the symbol @code{nil}. 683The type symbol @code{null} represents the symbol @code{nil}.
714Thus @code{(typep @var{object} 'null)} is equivalent to 684Thus @code{(cl-typep @var{object} 'null)} is equivalent to
715@code{(null @var{object})}. 685@code{(null @var{object})}.
716 686
717@item 687@item
718The type symbol @code{atom} represents all objects that are not cons 688The type symbol @code{atom} represents all objects that are not cons
719cells. Thus @code{(typep @var{object} 'atom)} is equivalent to 689cells. Thus @code{(cl-typep @var{object} 'atom)} is equivalent to
720@code{(atom @var{object})}. 690@code{(atom @var{object})}.
721 691
722@item 692@item
@@ -728,7 +698,7 @@ The type symbols @code{character} and @code{string-char} match
728integers in the range from 0 to 255. 698integers in the range from 0 to 255.
729 699
730@item 700@item
731The type symbol @code{float} uses the @code{floatp-safe} predicate 701The type symbol @code{float} uses the @code{cl-floatp-safe} predicate
732defined by this package rather than @code{floatp}, so it will work 702defined by this package rather than @code{floatp}, so it will work
733correctly even in Emacs versions without floating-point support. 703correctly even in Emacs versions without floating-point support.
734 704
@@ -750,7 +720,7 @@ combinations of types. For example, @code{(or integer (float 0 *))}
750represents all objects that are integers or non-negative floats. 720represents all objects that are integers or non-negative floats.
751 721
752@item 722@item
753Lists beginning with @code{member} or @code{member*} represent 723Lists beginning with @code{member} or @code{cl-member} represent
754objects @code{eql} to any of the following values. For example, 724objects @code{eql} to any of the following values. For example,
755@code{(member 1 2 3 4)} is equivalent to @code{(integer 1 4)}, 725@code{(member 1 2 3 4)} is equivalent to @code{(integer 1 4)},
756and @code{(member nil)} is equivalent to @code{null}. 726and @code{(member nil)} is equivalent to @code{null}.
@@ -762,9 +732,9 @@ with that object as an argument.
762@end itemize 732@end itemize
763 733
764The following function and macro (not technically predicates) are 734The following function and macro (not technically predicates) are
765related to @code{typep}. 735related to @code{cl-typep}.
766 736
767@defun coerce object type 737@defun cl-coerce object type
768This function attempts to convert @var{object} to the specified 738This function attempts to convert @var{object} to the specified
769@var{type}. If @var{object} is already of that type as determined by 739@var{type}. If @var{object} is already of that type as determined by
770@code{typep}, it is simply returned. Otherwise, certain types of 740@code{typep}, it is simply returned. Otherwise, certain types of
@@ -774,28 +744,28 @@ converted to that type if possible. If @var{type} is
774@code{character}, then strings of length one and symbols with 744@code{character}, then strings of length one and symbols with
775one-character names can be coerced. If @var{type} is @code{float}, 745one-character names can be coerced. If @var{type} is @code{float},
776then integers can be coerced in versions of Emacs that support 746then integers can be coerced in versions of Emacs that support
777floats. In all other circumstances, @code{coerce} signals an 747floats. In all other circumstances, @code{cl-coerce} signals an
778error. 748error.
779@end defun 749@end defun
780 750
781@defspec deftype name arglist forms... 751@defspec cl-deftype name arglist forms...
782This macro defines a new type called @var{name}. It is similar 752This macro defines a new type called @var{name}. It is similar
783to @code{defmacro} in many ways; when @var{name} is encountered 753to @code{defmacro} in many ways; when @var{name} is encountered
784as a type name, the body @var{forms} are evaluated and should 754as a type name, the body @var{forms} are evaluated and should
785return a type specifier that is equivalent to the type. The 755return a type specifier that is equivalent to the type. The
786@var{arglist} is a Common Lisp argument list of the sort accepted 756@var{arglist} is a Common Lisp argument list of the sort accepted
787by @code{defmacro*}. The type specifier @samp{(@var{name} @var{args}...)} 757by @code{cl-defmacro}. The type specifier @samp{(@var{name} @var{args}...)}
788is expanded by calling the expander with those arguments; the type 758is expanded by calling the expander with those arguments; the type
789symbol @samp{@var{name}} is expanded by calling the expander with 759symbol @samp{@var{name}} is expanded by calling the expander with
790no arguments. The @var{arglist} is processed the same as for 760no arguments. The @var{arglist} is processed the same as for
791@code{defmacro*} except that optional arguments without explicit 761@code{cl-defmacro} except that optional arguments without explicit
792defaults use @code{*} instead of @code{nil} as the ``default'' 762defaults use @code{*} instead of @code{nil} as the ``default''
793default. Some examples: 763default. Some examples:
794 764
795@example 765@example
796(deftype null () '(satisfies null)) ; predefined 766(cl-deftype null () '(satisfies null)) ; predefined
797(deftype list () '(or null cons)) ; predefined 767(cl-deftype list () '(or null cons)) ; predefined
798(deftype unsigned-byte (&optional bits) 768(cl-deftype unsigned-byte (&optional bits)
799 (list 'integer 0 (if (eq bits '*) bits (1- (lsh 1 bits))))) 769 (list 'integer 0 (if (eq bits '*) bits (1- (lsh 1 bits)))))
800(unsigned-byte 8) @equiv{} (integer 0 255) 770(unsigned-byte 8) @equiv{} (integer 0 255)
801(unsigned-byte) @equiv{} (integer 0 *) 771(unsigned-byte) @equiv{} (integer 0 *)
@@ -808,21 +778,21 @@ type specifier could be implemented if desired; this package does
808not implement @code{unsigned-byte} by default. 778not implement @code{unsigned-byte} by default.
809@end defspec 779@end defspec
810 780
811The @code{typecase} and @code{check-type} macros also use type 781The @code{cl-typecase} and @code{cl-check-type} macros also use type
812names. @xref{Conditionals}. @xref{Assertions}. The @code{map}, 782names. @xref{Conditionals}. @xref{Assertions}. The @code{cl-map},
813@code{concatenate}, and @code{merge} functions take type-name 783@code{cl-concatenate}, and @code{cl-merge} functions take type-name
814arguments to specify the type of sequence to return. @xref{Sequences}. 784arguments to specify the type of sequence to return. @xref{Sequences}.
815 785
816@node Equality Predicates 786@node Equality Predicates
817@section Equality Predicates 787@section Equality Predicates
818 788
819@noindent 789@noindent
820This package defines the Common Lisp predicate @code{equalp}. 790This package defines the Common Lisp predicate @code{cl-equalp}.
821 791
822@defun equalp a b 792@defun cl-equalp a b
823This function is a more flexible version of @code{equal}. In 793This function is a more flexible version of @code{equal}. In
824particular, it compares strings case-insensitively, and it compares 794particular, it compares strings case-insensitively, and it compares
825numbers without regard to type (so that @code{(equalp 3 3.0)} is 795numbers without regard to type (so that @code{(cl-equalp 3 3.0)} is
826true). Vectors and conses are compared recursively. All other 796true). Vectors and conses are compared recursively. All other
827objects are compared as if by @code{equal}. 797objects are compared as if by @code{equal}.
828 798
@@ -831,15 +801,15 @@ respects. First, Common Lisp's @code{equalp} also compares
831@emph{characters} case-insensitively, which would be impractical 801@emph{characters} case-insensitively, which would be impractical
832in this package since Emacs does not distinguish between integers 802in this package since Emacs does not distinguish between integers
833and characters. In keeping with the idea that strings are less 803and characters. In keeping with the idea that strings are less
834vector-like in Emacs Lisp, this package's @code{equalp} also will 804vector-like in Emacs Lisp, this package's @code{cl-equalp} also will
835not compare strings against vectors of integers. 805not compare strings against vectors of integers.
836@end defun 806@end defun
837 807
838Also note that the Common Lisp functions @code{member} and @code{assoc} 808Also note that the Common Lisp functions @code{member} and @code{assoc}
839use @code{eql} to compare elements, whereas Emacs Lisp follows the 809use @code{eql} to compare elements, whereas Emacs Lisp follows the
840MacLisp tradition and uses @code{equal} for these two functions. 810MacLisp tradition and uses @code{equal} for these two functions.
841In Emacs, use @code{member*} and @code{assoc*} to get functions 811In Emacs, use @code{memq} (or @code{cl-member}) and @code{assq} (or
842which use @code{eql} for comparisons. 812@code{cl-assoc}) to get functions which use @code{eql} for comparisons.
843 813
844@node Control Structure 814@node Control Structure
845@chapter Control Structure 815@chapter Control Structure
@@ -847,28 +817,32 @@ which use @code{eql} for comparisons.
847@noindent 817@noindent
848The features described in the following sections implement 818The features described in the following sections implement
849various advanced control structures, including the powerful 819various advanced control structures, including the powerful
820@c FIXME setf is now in gv.el, not cl.
850@code{setf} facility and a number of looping and conditional 821@code{setf} facility and a number of looping and conditional
851constructs. 822constructs.
852 823
824@c FIXME setf, push are standard now.
825@c lexical-let is obsolete; flet is not cl-flet.
826@c values is not cl-values.
853@menu 827@menu
854* Assignment:: The @code{psetq} form 828* Assignment:: The @code{cl-psetq} form.
855* Generalized Variables:: @code{setf}, @code{incf}, @code{push}, etc. 829* Generalized Variables:: @code{setf}, @code{cl-incf}, @code{push}, etc.
856* Variable Bindings:: @code{progv}, @code{lexical-let}, @code{flet}, @code{macrolet} 830* Variable Bindings:: @code{cl-progv}, @code{lexical-let}, @code{flet}, @code{cl-macrolet}.
857* Conditionals:: @code{case}, @code{typecase} 831* Conditionals:: @code{cl-case}, @code{cl-typecase}.
858* Blocks and Exits:: @code{block}, @code{return}, @code{return-from} 832* Blocks and Exits:: @code{cl-block}, @code{cl-return}, @code{cl-return-from}.
859* Iteration:: @code{do}, @code{dotimes}, @code{dolist}, @code{do-symbols} 833* Iteration:: @code{cl-do}, @code{cl-dotimes}, @code{cl-dolist}, @code{cl-do-symbols}.
860* Loop Facility:: The Common Lisp @code{loop} macro 834* Loop Facility:: The Common Lisp @code{cl-loop} macro.
861* Multiple Values:: @code{values}, @code{multiple-value-bind}, etc. 835* Multiple Values:: @code{values}, @code{cl-multiple-value-bind}, etc.
862@end menu 836@end menu
863 837
864@node Assignment 838@node Assignment
865@section Assignment 839@section Assignment
866 840
867@noindent 841@noindent
868The @code{psetq} form is just like @code{setq}, except that multiple 842The @code{cl-psetq} form is just like @code{setq}, except that multiple
869assignments are done in parallel rather than sequentially. 843assignments are done in parallel rather than sequentially.
870 844
871@defspec psetq [symbol form]@dots{} 845@defspec cl-psetq [symbol form]@dots{}
872This special form (actually a macro) is used to assign to several 846This special form (actually a macro) is used to assign to several
873variables simultaneously. Given only one @var{symbol} and @var{form}, 847variables simultaneously. Given only one @var{symbol} and @var{form},
874it has the same effect as @code{setq}. Given several @var{symbol} 848it has the same effect as @code{setq}. Given several @var{symbol}
@@ -883,21 +857,22 @@ x
883y ; @r{@code{y} was computed after @code{x} was set.} 857y ; @r{@code{y} was computed after @code{x} was set.}
884 @result{} 15 858 @result{} 15
885(setq x 2 y 3) 859(setq x 2 y 3)
886(psetq x (+ x y) y (* x y)) 860(cl-psetq x (+ x y) y (* x y))
887x 861x
888 @result{} 5 862 @result{} 5
889y ; @r{@code{y} was computed before @code{x} was set.} 863y ; @r{@code{y} was computed before @code{x} was set.}
890 @result{} 6 864 @result{} 6
891@end example 865@end example
892 866
893The simplest use of @code{psetq} is @code{(psetq x y y x)}, which 867The simplest use of @code{cl-psetq} is @code{(cl-psetq x y y x)}, which
894exchanges the values of two variables. (The @code{rotatef} form 868exchanges the values of two variables. (The @code{cl-rotatef} form
895provides an even more convenient way to swap two variables; 869provides an even more convenient way to swap two variables;
896@pxref{Modify Macros}.) 870@pxref{Modify Macros}.)
897 871
898@code{psetq} always returns @code{nil}. 872@code{cl-psetq} always returns @code{nil}.
899@end defspec 873@end defspec
900 874
875@c FIXME now in gv.el.
901@node Generalized Variables 876@node Generalized Variables
902@section Generalized Variables 877@section Generalized Variables
903 878
@@ -922,9 +897,9 @@ Just as certain forms like @code{a[i]} can be lvalues in C, there
922is a set of forms that can be generalized variables in Lisp. 897is a set of forms that can be generalized variables in Lisp.
923 898
924@menu 899@menu
925* Basic Setf:: @code{setf} and place forms 900* Basic Setf:: @code{setf} and place forms.
926* Modify Macros:: @code{incf}, @code{push}, @code{rotatef}, @code{letf}, @code{callf}, etc. 901* Modify Macros:: @code{cl-incf}, @code{push}, @code{cl-rotatef}, @code{letf}, @code{cl-callf}, etc.
927* Customizing Setf:: @code{define-modify-macro}, @code{defsetf}, @code{define-setf-method} 902* Customizing Setf:: @code{define-modify-macro}, @code{defsetf}, @code{define-setf-method}.
928@end menu 903@end menu
929 904
930@node Basic Setf 905@node Basic Setf
@@ -1107,7 +1082,7 @@ that operate on generalized variables. Many are interesting and
1107useful even when the @var{place} is just a variable name. 1082useful even when the @var{place} is just a variable name.
1108 1083
1109@defspec psetf [place form]@dots{} 1084@defspec psetf [place form]@dots{}
1110This macro is to @code{setf} what @code{psetq} is to @code{setq}: 1085This macro is to @code{setf} what @code{cl-psetq} is to @code{setq}:
1111When several @var{place}s and @var{form}s are involved, the 1086When several @var{place}s and @var{form}s are involved, the
1112assignments take place in parallel rather than sequentially. 1087assignments take place in parallel rather than sequentially.
1113Specifically, all subforms are evaluated from left to right, then 1088Specifically, all subforms are evaluated from left to right, then
@@ -1533,10 +1508,10 @@ analogous to Lisp's built-in @code{let} form.
1533are also related to variable bindings. 1508are also related to variable bindings.
1534 1509
1535@menu 1510@menu
1536* Dynamic Bindings:: The @code{progv} form 1511* Dynamic Bindings:: The @code{progv} form.
1537* Lexical Bindings:: @code{lexical-let} and lexical closures 1512* Lexical Bindings:: @code{lexical-let} and lexical closures.
1538* Function Bindings:: @code{flet} and @code{labels} 1513* Function Bindings:: @code{flet} and @code{labels}.
1539* Macro Bindings:: @code{macrolet} and @code{symbol-macrolet} 1514* Macro Bindings:: @code{macrolet} and @code{symbol-macrolet}.
1540@end menu 1515@end menu
1541 1516
1542@node Dynamic Bindings 1517@node Dynamic Bindings
@@ -1563,7 +1538,7 @@ are ignored.
1563@subsection Lexical Bindings 1538@subsection Lexical Bindings
1564 1539
1565@noindent 1540@noindent
1566The @dfn{CL} package defines the following macro which 1541The @code{CL} package defines the following macro which
1567more closely follows the Common Lisp @code{let} form: 1542more closely follows the Common Lisp @code{let} form:
1568 1543
1569@defspec lexical-let (bindings@dots{}) forms@dots{} 1544@defspec lexical-let (bindings@dots{}) forms@dots{}
@@ -1984,7 +1959,7 @@ looping constructs to complement Emacs Lisp's basic @code{while}
1984loop. 1959loop.
1985 1960
1986@defspec loop forms@dots{} 1961@defspec loop forms@dots{}
1987The @dfn{CL} package supports both the simple, old-style meaning of 1962The @code{CL} package supports both the simple, old-style meaning of
1988@code{loop} and the extremely powerful and flexible feature known as 1963@code{loop} and the extremely powerful and flexible feature known as
1989the @dfn{Loop Facility} or @dfn{Loop Macro}. This more advanced 1964the @dfn{Loop Facility} or @dfn{Loop Macro}. This more advanced
1990facility is discussed in the following section; @pxref{Loop Facility}. 1965facility 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
2026each iteration of the loop, the @var{end-test} is evaluated; if 2001each iteration of the loop, the @var{end-test} is evaluated; if
2027true, the loop is finished. Otherwise, the body @var{forms} are 2002true, the loop is finished. Otherwise, the body @var{forms} are
2028evaluated, then each @var{var} is set to the associated @var{step} 2003evaluated, then each @var{var} is set to the associated @var{step}
2029expression (as if by a @code{psetq} form) and the next iteration 2004expression (as if by a @code{cl-psetq} form) and the next iteration
2030begins. Once the @var{end-test} becomes true, the @var{result} 2005begins. Once the @var{end-test} becomes true, the @var{result}
2031forms are evaluated (with the @var{var}s still bound to their 2006forms are evaluated (with the @var{var}s still bound to their
2032values) to produce the result returned by @code{do}. 2007values) to produce the result returned by @code{do}.
@@ -2065,7 +2040,7 @@ the rest of the loop.
2065This is to @code{do} what @code{let*} is to @code{let}. In 2040This is to @code{do} what @code{let*} is to @code{let}. In
2066particular, the initial values are bound as if by @code{let*} 2041particular, the initial values are bound as if by @code{let*}
2067rather than @code{let}, and the steps are assigned as if by 2042rather than @code{let}, and the steps are assigned as if by
2068@code{setq} rather than @code{psetq}. 2043@code{setq} rather than @code{cl-psetq}.
2069 2044
2070Here is another way to write the above loop: 2045Here is another way to write the above loop:
2071 2046
@@ -2133,12 +2108,12 @@ construct called the ``Loop Facility'' or ``@code{loop} macro,''
2133with an easy-to-use but very powerful and expressive syntax. 2108with an easy-to-use but very powerful and expressive syntax.
2134 2109
2135@menu 2110@menu
2136* Loop Basics:: @code{loop} macro, basic clause structure 2111* Loop Basics:: @code{loop} macro, basic clause structure.
2137* Loop Examples:: Working examples of @code{loop} macro 2112* Loop Examples:: Working examples of @code{loop} macro.
2138* For Clauses:: Clauses introduced by @code{for} or @code{as} 2113* For Clauses:: Clauses introduced by @code{for} or @code{as}.
2139* Iteration Clauses:: @code{repeat}, @code{while}, @code{thereis}, etc. 2114* Iteration Clauses:: @code{repeat}, @code{while}, @code{thereis}, etc.
2140* Accumulation Clauses:: @code{collect}, @code{sum}, @code{maximize}, etc. 2115* Accumulation Clauses:: @code{collect}, @code{sum}, @code{maximize}, etc.
2141* Other Clauses:: @code{with}, @code{if}, @code{initially}, @code{finally} 2116* Other Clauses:: @code{with}, @code{if}, @code{initially}, @code{finally}.
2142@end menu 2117@end menu
2143 2118
2144@node Loop Basics 2119@node Loop Basics
@@ -2546,7 +2521,7 @@ If you include several @code{for} clauses in a row, they are
2546treated sequentially (as if by @code{let*} and @code{setq}). 2521treated sequentially (as if by @code{let*} and @code{setq}).
2547You can instead use the word @code{and} to link the clauses, 2522You can instead use the word @code{and} to link the clauses,
2548in which case they are processed in parallel (as if by @code{let} 2523in which case they are processed in parallel (as if by @code{let}
2549and @code{psetq}). 2524and @code{cl-psetq}).
2550 2525
2551@example 2526@example
2552(loop for x below 5 for y = nil then x collect (list x y)) 2527(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
3177missing from Emacs Lisp. 3152missing from Emacs Lisp.
3178 3153
3179@menu 3154@menu
3180* Property Lists:: @code{get*}, @code{remprop}, @code{getf}, @code{remf} 3155* Property Lists:: @code{get*}, @code{remprop}, @code{getf}, @code{remf}.
3181* Creating Symbols:: @code{gensym}, @code{gentemp} 3156* Creating Symbols:: @code{gensym}, @code{gentemp}.
3182@end menu 3157@end menu
3183 3158
3184@node Property Lists 3159@node Property Lists
@@ -3321,8 +3296,8 @@ which were left out of Emacs Lisp.
3321@menu 3296@menu
3322* Predicates on Numbers:: @code{plusp}, @code{oddp}, @code{floatp-safe}, etc. 3297* Predicates on Numbers:: @code{plusp}, @code{oddp}, @code{floatp-safe}, etc.
3323* Numerical Functions:: @code{abs}, @code{floor*}, etc. 3298* Numerical Functions:: @code{abs}, @code{floor*}, etc.
3324* Random Numbers:: @code{random*}, @code{make-random-state} 3299* Random Numbers:: @code{random*}, @code{make-random-state}.
3325* Implementation Parameters:: @code{most-positive-float} 3300* Implementation Parameters:: @code{most-positive-float}.
3326@end menu 3301@end menu
3327 3302
3328@iftex 3303@iftex
@@ -3614,11 +3589,11 @@ Emacs Lisp includes a few of these, notably @code{elt} and
3614@code{length}; this package defines most of the rest. 3589@code{length}; this package defines most of the rest.
3615 3590
3616@menu 3591@menu
3617* Sequence Basics:: Arguments shared by all sequence functions 3592* Sequence Basics:: Arguments shared by all sequence functions.
3618* Mapping over Sequences:: @code{mapcar*}, @code{mapcan}, @code{map}, @code{every}, etc. 3593* Mapping over Sequences:: @code{mapcar*}, @code{mapcan}, @code{map}, @code{every}, etc.
3619* Sequence Functions:: @code{subseq}, @code{remove*}, @code{substitute}, etc. 3594* Sequence Functions:: @code{subseq}, @code{remove*}, @code{substitute}, etc.
3620* Searching Sequences:: @code{find}, @code{position}, @code{count}, @code{search}, etc. 3595* Searching Sequences:: @code{find}, @code{position}, @code{count}, @code{search}, etc.
3621* Sorting Sequences:: @code{sort*}, @code{stable-sort}, @code{merge} 3596* Sorting Sequences:: @code{sort*}, @code{stable-sort}, @code{merge}.
3622@end menu 3597@end menu
3623 3598
3624@node Sequence Basics 3599@node Sequence Basics
@@ -4101,7 +4076,7 @@ The functions described here operate on lists.
4101* List Functions:: @code{caddr}, @code{first}, @code{list*}, etc. 4076* List Functions:: @code{caddr}, @code{first}, @code{list*}, etc.
4102* Substitution of Expressions:: @code{subst}, @code{sublis}, etc. 4077* Substitution of Expressions:: @code{subst}, @code{sublis}, etc.
4103* Lists as Sets:: @code{member*}, @code{adjoin}, @code{union}, etc. 4078* Lists as Sets:: @code{member*}, @code{adjoin}, @code{union}, etc.
4104* Association Lists:: @code{assoc*}, @code{rassoc*}, @code{acons}, @code{pairlis} 4079* Association Lists:: @code{assoc*}, @code{rassoc*}, @code{acons}, @code{pairlis}.
4105@end menu 4080@end menu
4106 4081
4107@node List Functions 4082@node List Functions
@@ -5045,7 +5020,7 @@ Lisp.
5045@appendixsec The @code{cl-compat} package 5020@appendixsec The @code{cl-compat} package
5046 5021
5047@noindent 5022@noindent
5048The @dfn{CL} package includes emulations of some features of the 5023The @code{CL} package includes emulations of some features of the
5049old @file{cl.el}, in the form of a compatibility package 5024old @file{cl.el}, in the form of a compatibility package
5050@code{cl-compat}. This file is obsolete and may be removed in future, 5025@code{cl-compat}. This file is obsolete and may be removed in future,
5051so it should not be used in new code. 5026so it should not be used in new code.
@@ -5066,7 +5041,7 @@ best fix is to change to use @code{setf} properly.
5066 5041
5067The @code{cl-compat} file defines the keyword functions 5042The @code{cl-compat} file defines the keyword functions
5068@code{keywordp}, @code{keyword-of}, and @code{defkeyword}, 5043@code{keywordp}, @code{keyword-of}, and @code{defkeyword},
5069which are not defined by the new @dfn{CL} package because the 5044which are not defined by the new @code{CL} package because the
5070use of keywords as data is discouraged. 5045use of keywords as data is discouraged.
5071 5046
5072The @code{build-klist} mechanism for parsing keyword arguments 5047The @code{build-klist} mechanism for parsing keyword arguments
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
index 865e99a3aa6..1f9a401df90 100644
--- a/doc/misc/dbus.texi
+++ b/doc/misc/dbus.texi
@@ -1981,7 +1981,7 @@ usually not desired. D-Bus errors in events can be made visible by
1981setting the variable @code{dbus-debug} to @code{t}. They can also be 1981setting the variable @code{dbus-debug} to @code{t}. They can also be
1982handled by a hook function. 1982handled by a hook function.
1983 1983
1984@defvar dbus-event-error-hooks 1984@defvar dbus-event-error-functions
1985This hook variable keeps a list of functions, which are called when a 1985This hook variable keeps a list of functions, which are called when a
1986D-Bus error happens in the event handler. Every function must accept 1986D-Bus error happens in the event handler. Every function must accept
1987two arguments, the event and the error variable caught in 1987two arguments, the event and the error variable caught in
@@ -1997,7 +1997,7 @@ Example:
1997 (message "my-dbus-event-error-handler: %S %S" event error) 1997 (message "my-dbus-event-error-handler: %S %S" event error)
1998 (signal 'file-error (cdr error)))) 1998 (signal 'file-error (cdr error))))
1999 1999
2000(add-hook 'dbus-event-error-hooks 'my-dbus-event-error-handler) 2000(add-hook 'dbus-event-error-functions 'my-dbus-event-error-handler)
2001@end lisp 2001@end lisp
2002@end defvar 2002@end defvar
2003 2003
diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi
index 046cdc99414..1299f2ff062 100644
--- a/doc/misc/ede.texi
+++ b/doc/misc/ede.texi
@@ -1248,7 +1248,7 @@ detection scheme works like this:
1248 1248
1249@table @asis 1249@table @asis
1250@item Step 1: 1250@item Step 1:
1251@code{find-file-hooks} calls @code{ede-turn-on-hook} on BUFFER. 1251@code{find-file-hook} calls @code{ede-turn-on-hook} on BUFFER.
1252@item Step 2: 1252@item Step 2:
1253@code{ede-turn-on-hook} turns on @code{ede-minor-mode} 1253@code{ede-turn-on-hook} turns on @code{ede-minor-mode}
1254@item Step 3: 1254@item Step 3:
diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi
index 01349e31468..0afcdd923d6 100644
--- a/doc/misc/ediff.texi
+++ b/doc/misc/ediff.texi
@@ -1248,7 +1248,7 @@ This hook is run just before @code{ediff-quit-hook}. This is a good
1248place to do various cleanups, such as deleting the variant buffers. 1248place to do various cleanups, such as deleting the variant buffers.
1249Ediff provides a function, @code{ediff-janitor}, as one such possible 1249Ediff provides a function, @code{ediff-janitor}, as one such possible
1250hook, which you can add to @code{ediff-cleanup-hook} with 1250hook, which you can add to @code{ediff-cleanup-hook} with
1251@code{add-hooks}. 1251@code{add-hook}.
1252 1252
1253@findex ediff-janitor 1253@findex ediff-janitor
1254This function kills buffers A, B, and, possibly, C, if these buffers aren't 1254This function kills buffers A, B, and, possibly, C, if these buffers aren't
diff --git a/doc/misc/forms.texi b/doc/misc/forms.texi
index bcb8d8974ea..11c3782dd7e 100644
--- a/doc/misc/forms.texi
+++ b/doc/misc/forms.texi
@@ -170,8 +170,8 @@ of the buffer are parsed using the specifications in
170@code{forms-format-list}, and the data file is updated. If the record 170@code{forms-format-list}, and the data file is updated. If the record
171has fields that aren't included in the display, they are not changed. 171has fields that aren't included in the display, they are not changed.
172 172
173@vindex forms-mode-hooks 173@vindex forms-mode-hook
174Entering Forms mode runs the normal hook @code{forms-mode-hooks} to 174Entering Forms mode runs the normal hook @code{forms-mode-hook} to
175perform user-defined customization. 175perform user-defined customization.
176 176
177To save any modified data, you can use @kbd{C-x C-s} 177To save any modified data, you can use @kbd{C-x C-s}
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index afc324e3fb4..a9cd0d3567c 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -3148,7 +3148,7 @@ following is added to a group parameter
3148 3148
3149@lisp 3149@lisp
3150(gnus-summary-prepared-hook 3150(gnus-summary-prepared-hook
3151 '(lambda nil (local-set-key "d" (local-key-binding "n")))) 3151 (lambda nil (local-set-key "d" (local-key-binding "n"))))
3152@end lisp 3152@end lisp
3153 3153
3154when the group is entered, the 'd' key will not mark the article as 3154when the group is entered, the 'd' key will not mark the article as
diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi
index f6adc435789..e59b312889d 100644
--- a/doc/misc/mh-e.texi
+++ b/doc/misc/mh-e.texi
@@ -429,7 +429,7 @@ for a description about @dfn{normal hooks} and @dfn{abnormal hooks}.
429MH-E uses normal hooks in nearly all cases, so you can assume that we 429MH-E uses normal hooks in nearly all cases, so you can assume that we
430are talking about normal hooks unless we explicitly mention that a 430are talking about normal hooks unless we explicitly mention that a
431hook is abnormal. We also follow the conventions described in that 431hook is abnormal. We also follow the conventions described in that
432section: the name of the abnormal hooks end in @code{-hooks} and all 432section: the name of the abnormal hooks end in @code{-functions} and all
433the rest of the MH-E hooks end in @code{-hook}. You can add hooks with 433the rest of the MH-E hooks end in @code{-hook}. You can add hooks with
434either @code{customize-option} or @code{add-hook}. 434either @code{customize-option} or @code{add-hook}.
435 435
@@ -3749,9 +3749,9 @@ when you press @key{TAB} when prompted for a folder name.
3749 3749
3750@findex mh-search-p 3750@findex mh-search-p
3751@kindex k 3751@kindex k
3752@vindex mh-kill-folder-suppress-prompt-hooks 3752@vindex mh-kill-folder-suppress-prompt-functions
3753 3753
3754The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal 3754The hook @code{mh-kill-folder-suppress-prompt-functions} is an abnormal
3755hook run at the beginning of the command @kbd{k}. The hook functions 3755hook run at the beginning of the command @kbd{k}. The hook functions
3756are called with no arguments and should return a non-nil value to 3756are called with no arguments and should return a non-nil value to
3757suppress the normal prompt when you remove a folder. This is useful 3757suppress the normal prompt when you remove a folder. This is useful
diff --git a/doc/misc/sem-user.texi b/doc/misc/sem-user.texi
index 9f4dc72fea3..9d6fb11db50 100644
--- a/doc/misc/sem-user.texi
+++ b/doc/misc/sem-user.texi
@@ -277,7 +277,7 @@ variable. This allows SemanticDB to save tag caches in directories
277controlled by them. 277controlled by them.
278@end defvar 278@end defvar
279 279
280@deffn Option semanticdb-save-database-hooks 280@deffn Option semanticdb-save-database-functions
281Abnormal hook run after a database is saved. Each function is called 281Abnormal hook run after a database is saved. Each function is called
282with one argument, the object representing the database recently 282with one argument, the object representing the database recently
283written. 283written.
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 530b8fdd6c2..46f99acbb87 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -3007,10 +3007,10 @@ checksum.
3007 3007
3008@lisp 3008@lisp
3009(add-hook 3009(add-hook
3010 'find-file-hooks 3010 'find-file-hook
3011 '(lambda () 3011 (lambda ()
3012 (when (file-remote-p default-directory) 3012 (when (file-remote-p default-directory)
3013 (set (make-local-variable 'file-precious-flag) t)))) 3013 (set (make-local-variable 'file-precious-flag) t))))
3014@end lisp 3014@end lisp
3015@end itemize 3015@end itemize
3016 3016
@@ -3126,7 +3126,7 @@ into your @file{~/.emacs}:
3126 (setq mode-line-format 3126 (setq mode-line-format
3127 (format-mode-line mode-line-format 'font-lock-warning-face)))) 3127 (format-mode-line mode-line-format 'font-lock-warning-face))))
3128 3128
3129(add-hook 'find-file-hooks 'my-mode-line-function) 3129(add-hook 'find-file-hook 'my-mode-line-function)
3130(add-hook 'dired-mode-hook 'my-mode-line-function) 3130(add-hook 'dired-mode-hook 'my-mode-line-function)
3131@end lisp 3131@end lisp
3132@end ifset 3132@end ifset
@@ -3159,10 +3159,10 @@ should put it into your @file{~/.emacs}:
3159 3159
3160(add-hook 3160(add-hook
3161 'dired-mode-hook 3161 'dired-mode-hook
3162 '(lambda () 3162 (lambda ()
3163 (setq 3163 (setq
3164 mode-line-buffer-identification 3164 mode-line-buffer-identification
3165 my-mode-line-buffer-identification))) 3165 my-mode-line-buffer-identification)))
3166@end lisp 3166@end lisp
3167 3167
3168Since @value{emacsname} 23.1, the mode line contains an indication if 3168Since @value{emacsname} 23.1, the mode line contains an indication if
@@ -3195,9 +3195,9 @@ like this:
3195@lisp 3195@lisp
3196(add-hook 3196(add-hook
3197 'dired-before-readin-hook 3197 'dired-before-readin-hook
3198 '(lambda () 3198 (lambda ()
3199 (when (file-remote-p default-directory) 3199 (when (file-remote-p default-directory)
3200 (setq dired-actual-switches "-al")))) 3200 (setq dired-actual-switches "-al"))))
3201@end lisp 3201@end lisp
3202@end ifset 3202@end ifset
3203 3203
@@ -3329,9 +3329,9 @@ minibuffer:
3329 3329
3330(add-hook 3330(add-hook
3331 'minibuffer-setup-hook 3331 'minibuffer-setup-hook
3332 '(lambda () 3332 (lambda ()
3333 (abbrev-mode 1) 3333 (abbrev-mode 1)
3334 (setq local-abbrev-table my-tramp-abbrev-table))) 3334 (setq local-abbrev-table my-tramp-abbrev-table)))
3335 3335
3336(defadvice minibuffer-complete 3336(defadvice minibuffer-complete
3337 (before my-minibuffer-complete activate) 3337 (before my-minibuffer-complete activate)
@@ -3398,7 +3398,7 @@ their readability through a remote access:
3398@ifset xemacs 3398@ifset xemacs
3399(recent-files-initialize) 3399(recent-files-initialize)
3400(add-hook 3400(add-hook
3401 'find-file-hooks 3401 'find-file-hook
3402 (lambda () 3402 (lambda ()
3403 (when (file-remote-p (buffer-file-name)) 3403 (when (file-remote-p (buffer-file-name))
3404 (recent-files-make-permanent))) 3404 (recent-files-make-permanent)))
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 4e1f15e913d..3ebe18b407f 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,15 @@
12012-10-23 Paul Eggert <eggert@cs.ucla.edu>
2
3 Fix outdated timestamp documentation in Elisp manual (bug#12706).
4 * NEWS: Document increased precision in undo list.
5
62012-10-21 Glenn Morris <rgm@gnu.org>
7
8 * images/icons/hicolor/32x32/apps/emacs22.png:
9 * images/icons/hicolor/16x16/apps/emacs22.png:
10 * images/icons/hicolor/48x48/apps/emacs22.png:
11 * images/icons/hicolor/24x24/apps/emacs22.png: Restore old icons.
12
12012-10-14 Kenichi Handa <handa@gnu.org> 132012-10-14 Kenichi Handa <handa@gnu.org>
2 14
3 * charsets/JISC6226.map: Re-generated. 15 * charsets/JISC6226.map: Re-generated.
@@ -9,12 +21,12 @@
9 21
102012-10-11 Kenichi Handa <handa@gnu.org> 222012-10-11 Kenichi Handa <handa@gnu.org>
11 23
12 * charsets/CNS-2.map, charsets/CNS-3.map, charsets/CNS-4.map, 24 * charsets/CNS-2.map, charsets/CNS-3.map, charsets/CNS-4.map:
13 charsets/CNS-5.map, charsets/CNS-6.map, charsets/CNS-7.map, 25 * charsets/CNS-5.map, charsets/CNS-6.map, charsets/CNS-7.map:
14 charsets/CP932-2BYTE.map, charsets/GB180302.map, 26 * charsets/CP932-2BYTE.map, charsets/GB180302.map:
15 charsets/GB180304.map, charsets/JISC6226.map, 27 * charsets/GB180304.map, charsets/JISC6226.map:
16 charsets/JISX2131.map, charsets/MIK.map, charsets/PTCP154.map, 28 * charsets/JISX2131.map, charsets/MIK.map, charsets/PTCP154.map:
17 charsets/stdenc.map, charsets/symbol.map: Re-generated. 29 * charsets/stdenc.map, charsets/symbol.map: Re-generate.
18 30
192012-10-07 Jan Djärv <jan.h.d@swipnet.se> 312012-10-07 Jan Djärv <jan.h.d@swipnet.se>
20 32
diff --git a/etc/NEWS b/etc/NEWS
index 00d5109aba6..4fd7e13f8ca 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -621,6 +621,29 @@ enabled.
621 621
622** FIXME something happened to ses.el, 2012-04-17. 622** FIXME something happened to ses.el, 2012-04-17.
623 623
624** Hooks renamed to avoid obsolete "-hooks" suffix:
625*** semantic-lex-reset-hooks -> semantic-lex-reset-functions
626*** semantic-change-hooks -> semantic-change-functions
627*** semantic-edits-new-change-hooks -> semantic-edits-new-change-functions
628*** semantic-edits-delete-change-hooks -> semantic-edits-delete-change-functions
629*** semantic-edits-reparse-change-hooks -> semantic-edits-reparse-change-functions
630*** semanticdb-save-database-hooks -> semanticdb-save-database-functions
631*** c-prepare-bug-report-hooks -> c-prepare-bug-report-hook
632*** rcirc-sentinel-hooks -> rcirc-sentinel-functions
633*** rcirc-receive-message-hooks -> rcirc-receive-message-functions
634*** rcirc-activity-hooks -> rcirc-activity-functions
635*** rcirc-print-hooks -> rcirc-print-functions
636*** dbus-event-error-hooks -> dbus-event-error-functions
637*** eieio-pre-method-execution-hooks -> eieio-pre-method-execution-functions
638*** checkdoc-style-hooks -> checkdoc-style-functions
639*** checkdoc-comment-style-hooks -> checkdoc-comment-style-functions
640*** archive-extract-hooks -> archive-extract-hook
641*** filesets-cache-fill-content-hooks -> filesets-cache-fill-content-hook
642*** hfy-post-html-hooks -> hfy-post-html-hook
643*** nndiary-request-create-group-hooks -> nndiary-request-create-group-functions
644*** nndiary-request-update-info-hooks -> nndiary-request-update-info-functions
645*** nndiary-request-accept-article-hooks -> nndiary-request-accept-article-functions
646*** gnus-subscribe-newsgroup-hooks -> gnus-subscribe-newsgroup-functions
624 647
625** Obsolete packages: 648** Obsolete packages:
626+++ 649+++
@@ -843,6 +866,9 @@ stamps are still accepted.
843The PSECS slot is new, and uses picosecond resolution. It can be 866The PSECS slot is new, and uses picosecond resolution. It can be
844accessed via the new timer--psecs accessor. 867accessed via the new timer--psecs accessor.
845 868
869*** Last-modified time stamps in undo lists now are of the form
870(t HI-SECS LO-SECS USECS PSECS) instead of (t HI-SECS . LO-SECS).
871
846+++ 872+++
847** Floating point functions now always return special values like NaN, 873** Floating point functions now always return special values like NaN,
848instead of signaling errors, if given invalid args, e.g. (log -1.0). 874instead 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.
890*** `window-system-version' 916*** `window-system-version'
891*** `dired-pop-to-buffer' (use `dired-mark-pop-up') 917*** `dired-pop-to-buffer' (use `dired-mark-pop-up')
892*** `query-replace-interactive' 918*** `query-replace-interactive'
919*** `font-list-limit' (has had no effect since Emacs < 23)
893 920
894 921
895* Changes in Emacs 24.3 on non-free operating systems 922* Changes in Emacs 24.3 on non-free operating systems
diff --git a/etc/images/icons/README b/etc/images/icons/README
index d71641684cd..664c52906ac 100644
--- a/etc/images/icons/README
+++ b/etc/images/icons/README
@@ -9,6 +9,13 @@ Copyright (C) 2007-2012 Free Software Foundation, Inc.
9License: GNU General Public License version 3 or later (see COPYING) 9License: GNU General Public License version 3 or later (see COPYING)
10 10
11 11
12Files: hicolor/16x16/apps/emacs22.png hicolor/24x24/apps/emacs22.png
13 hicolor/32x32/apps/emacs22.png hicolor/48x48/apps/emacs22.png
14
15Author: Andrew Zhilin <andrew_zhilin@yahoo.com>
16Copyright (C) 2005-2012 Free Software Foundation, Inc.
17License: GNU General Public License version 3 or later (see COPYING)
18
12Files: allout-widgets-dark-bg/closed.png 19Files: allout-widgets-dark-bg/closed.png
13 allout-widgets-dark-bg/closed.xpm 20 allout-widgets-dark-bg/closed.xpm
14 allout-widgets-dark-bg/empty.png 21 allout-widgets-dark-bg/empty.png
diff --git a/etc/images/icons/hicolor/16x16/apps/emacs22.png b/etc/images/icons/hicolor/16x16/apps/emacs22.png
new file mode 100644
index 00000000000..b419b01b4ee
--- /dev/null
+++ b/etc/images/icons/hicolor/16x16/apps/emacs22.png
Binary files differ
diff --git a/etc/images/icons/hicolor/24x24/apps/emacs22.png b/etc/images/icons/hicolor/24x24/apps/emacs22.png
new file mode 100644
index 00000000000..790ec7e2bff
--- /dev/null
+++ b/etc/images/icons/hicolor/24x24/apps/emacs22.png
Binary files differ
diff --git a/etc/images/icons/hicolor/32x32/apps/emacs22.png b/etc/images/icons/hicolor/32x32/apps/emacs22.png
new file mode 100644
index 00000000000..31fbb47c0d2
--- /dev/null
+++ b/etc/images/icons/hicolor/32x32/apps/emacs22.png
Binary files differ
diff --git a/etc/images/icons/hicolor/48x48/apps/emacs22.png b/etc/images/icons/hicolor/48x48/apps/emacs22.png
new file mode 100644
index 00000000000..f0df0fb6594
--- /dev/null
+++ b/etc/images/icons/hicolor/48x48/apps/emacs22.png
Binary files differ
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 1f28000e110..bc0e5c9a3d2 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,26 @@
12012-10-21 Glenn Morris <rgm@gnu.org>
2
3 * make-docfile.c (scan_lisp_file): Add cp51932.el and eucjp-ms.el.
4
52012-10-20 Eli Zaretskii <eliz@gnu.org>
6
7 * make-docfile.c (IS_SLASH, DEF_ELISP_FILE): New macros.
8 (scan_lisp_file): Only pass a .el file if its basename matches a
9 known file in its entirety. Use IS_SLASH and DEF_ELISP_FILE.
10
112012-10-20 Andreas Schwab <schwab@linux-m68k.org>
12
13 * make-docfile.c (scan_lisp_file): Add bounds checking.
14
152012-10-20 Eli Zaretskii <eliz@gnu.org>
16
17 Prevent silent omission of doc strings from uncompiled Lisp files.
18 * make-docfile.c (scan_lisp_file): Barf if called with a .el file
19 other than one of a small list of supported un-compiled files.
20
21 * makefile.w32-in (lisp1, lisp2): Name .elc files wherever they
22 exist. (Bug#12395)
23
12012-10-17 Eli Zaretskii <eliz@gnu.org> 242012-10-17 Eli Zaretskii <eliz@gnu.org>
2 25
3 * ntlib.c: Include <mbstring.h>, to avoid compiler warning about 26 * ntlib.c: Include <mbstring.h>, to avoid compiler warning about
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index 411b7057861..68e7029ee85 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -58,9 +58,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
58#undef chdir 58#undef chdir
59#define READ_TEXT "rt" 59#define READ_TEXT "rt"
60#define READ_BINARY "rb" 60#define READ_BINARY "rb"
61#define IS_SLASH(c) ((c) == '/' || (c) == '\\' || (c) == ':')
61#else /* not DOS_NT */ 62#else /* not DOS_NT */
62#define READ_TEXT "r" 63#define READ_TEXT "r"
63#define READ_BINARY "r" 64#define READ_BINARY "r"
65#define IS_SLASH(c) ((c) == '/')
64#endif /* not DOS_NT */ 66#endif /* not DOS_NT */
65 67
66static int scan_file (char *filename); 68static int scan_file (char *filename);
@@ -1025,9 +1027,9 @@ scan_c_file (char *filename, const char *mode)
1025 arglist, but the doc string must still have a backslash and newline 1027 arglist, but the doc string must still have a backslash and newline
1026 immediately after the double quote. 1028 immediately after the double quote.
1027 The only source files that must follow this convention are preloaded 1029 The only source files that must follow this convention are preloaded
1028 uncompiled ones like loaddefs.el and bindings.el; aside 1030 uncompiled ones like loaddefs.el; aside from that, it is always the .elc
1029 from that, it is always the .elc file that we look at, and they are no 1031 file that we should look at, and they are no problem because byte-compiler
1030 problem because byte-compiler output follows this convention. 1032 output follows this convention.
1031 The NAME and DOCSTRING are output. 1033 The NAME and DOCSTRING are output.
1032 NAME is preceded by `F' for a function or `V' for a variable. 1034 NAME is preceded by `F' for a function or `V' for a variable.
1033 An entry is output only if DOCSTRING has \ newline just after the opening ". 1035 An entry is output only if DOCSTRING has \ newline just after the opening ".
@@ -1098,15 +1100,50 @@ search_lisp_doc_at_eol (FILE *infile)
1098 return 1; 1100 return 1;
1099} 1101}
1100 1102
1103#define DEF_ELISP_FILE(fn) { #fn, sizeof(#fn) - 1 }
1104
1101static int 1105static int
1102scan_lisp_file (const char *filename, const char *mode) 1106scan_lisp_file (const char *filename, const char *mode)
1103{ 1107{
1104 FILE *infile; 1108 FILE *infile;
1105 register int c; 1109 register int c;
1106 char *saved_string = 0; 1110 char *saved_string = 0;
1111 /* These are the only files that are loaded uncompiled, and must
1112 follow the conventions of the doc strings expected by this
1113 function. These conventions are automatically followed by the
1114 byte compiler when it produces the .elc files. */
1115 static struct {
1116 const char *fn;
1117 size_t fl;
1118 } const uncompiled[] = {
1119 DEF_ELISP_FILE (loaddefs.el),
1120 DEF_ELISP_FILE (loadup.el),
1121 DEF_ELISP_FILE (charprop.el),
1122 DEF_ELISP_FILE (cp51932.el),
1123 DEF_ELISP_FILE (eucjp-ms.el)
1124 };
1125 int i, match;
1126 size_t flen = strlen (filename);
1107 1127
1108 if (generate_globals) 1128 if (generate_globals)
1109 fatal ("scanning lisp file when -g specified", 0); 1129 fatal ("scanning lisp file when -g specified", 0);
1130 if (flen > 3 && !strcmp (filename + flen - 3, ".el"))
1131 {
1132 for (i = 0, match = 0; i < sizeof (uncompiled) / sizeof (uncompiled[0]);
1133 i++)
1134 {
1135 if (uncompiled[i].fl <= flen
1136 && !strcmp (filename + flen - uncompiled[i].fl, uncompiled[i].fn)
1137 && (flen == uncompiled[i].fl
1138 || IS_SLASH (filename[flen - uncompiled[i].fl - 1])))
1139 {
1140 match = 1;
1141 break;
1142 }
1143 }
1144 if (!match)
1145 fatal ("uncompiled lisp file %s is not supported", filename);
1146 }
1110 1147
1111 infile = fopen (filename, mode); 1148 infile = fopen (filename, mode);
1112 if (infile == NULL) 1149 if (infile == NULL)
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in
index ecc5fb866b3..640e8a7c468 100644
--- a/lib-src/makefile.w32-in
+++ b/lib-src/makefile.w32-in
@@ -209,38 +209,38 @@ lisp1= \
209 $(lispsource)emacs-lisp/map-ynp.elc \ 209 $(lispsource)emacs-lisp/map-ynp.elc \
210 $(lispsource)menu-bar.elc \ 210 $(lispsource)menu-bar.elc \
211 $(lispsource)international/mule.elc \ 211 $(lispsource)international/mule.elc \
212 $(lispsource)international/mule-conf.el \ 212 $(lispsource)international/mule-conf.elc \
213 $(lispsource)international/mule-cmds.elc \ 213 $(lispsource)international/mule-cmds.elc \
214 $(lispsource)international/characters.elc \ 214 $(lispsource)international/characters.elc \
215 $(lispsource)international/charprop.el \ 215 $(lispsource)international/charprop.el \
216 $(lispsource)case-table.elc 216 $(lispsource)case-table.elc
217 217
218lisp2 = \ 218lisp2 = \
219 $(lispsource)language/chinese.el \ 219 $(lispsource)language/chinese.elc \
220 $(lispsource)language/cyrillic.el \ 220 $(lispsource)language/cyrillic.elc \
221 $(lispsource)language/indian.el \ 221 $(lispsource)language/indian.elc \
222 $(lispsource)language/sinhala.el \ 222 $(lispsource)language/sinhala.elc \
223 $(lispsource)language/english.el \ 223 $(lispsource)language/english.elc \
224 $(lispsource)language/ethiopic.elc \ 224 $(lispsource)language/ethiopic.elc \
225 $(lispsource)language/european.elc \ 225 $(lispsource)language/european.elc \
226 $(lispsource)language/czech.el \ 226 $(lispsource)language/czech.elc \
227 $(lispsource)language/slovak.el \ 227 $(lispsource)language/slovak.elc \
228 $(lispsource)language/romanian.el \ 228 $(lispsource)language/romanian.elc \
229 $(lispsource)language/greek.el \ 229 $(lispsource)language/greek.elc \
230 $(lispsource)language/hebrew.elc \ 230 $(lispsource)language/hebrew.elc \
231 $(lispsource)language/japanese.el \ 231 $(lispsource)language/japanese.elc \
232 $(lispsource)language/korean.el \ 232 $(lispsource)language/korean.elc \
233 $(lispsource)language/lao.el \ 233 $(lispsource)language/lao.elc \
234 $(lispsource)language/cham.el \ 234 $(lispsource)language/cham.elc \
235 $(lispsource)language/tai-viet.el \ 235 $(lispsource)language/tai-viet.elc \
236 $(lispsource)language/thai.el \ 236 $(lispsource)language/thai.elc \
237 $(lispsource)language/tibetan.elc \ 237 $(lispsource)language/tibetan.elc \
238 $(lispsource)language/vietnamese.el \ 238 $(lispsource)language/vietnamese.elc \
239 $(lispsource)language/misc-lang.el \ 239 $(lispsource)language/misc-lang.elc \
240 $(lispsource)language/utf-8-lang.el \ 240 $(lispsource)language/utf-8-lang.elc \
241 $(lispsource)language/georgian.el \ 241 $(lispsource)language/georgian.elc \
242 $(lispsource)language/khmer.el \ 242 $(lispsource)language/khmer.elc \
243 $(lispsource)language/burmese.el \ 243 $(lispsource)language/burmese.elc \
244 $(lispsource)register.elc \ 244 $(lispsource)register.elc \
245 $(lispsource)replace.elc \ 245 $(lispsource)replace.elc \
246 $(lispsource)simple.elc \ 246 $(lispsource)simple.elc \
@@ -266,7 +266,7 @@ lisp2 = \
266 $(WINDOW_SUPPORT) \ 266 $(WINDOW_SUPPORT) \
267 $(lispsource)widget.elc \ 267 $(lispsource)widget.elc \
268 $(lispsource)window.elc \ 268 $(lispsource)window.elc \
269 $(lispsource)version.el 269 $(lispsource)version.elc
270 270
271# This is needed the first time we build the tree, since temacs.exe 271# This is needed the first time we build the tree, since temacs.exe
272# does not exist yet, and the DOC rule needs it to rebuild DOC whenever 272# does not exist yet, and the DOC rule needs it to rebuild DOC whenever
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f9d9ad4b03d..16c4983d385 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,116 @@
12012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * htmlfontify.el (hfy-post-html-hook):
4 * filesets.el (filesets-cache-fill-content-hook):
5 * arc-mode.el (archive-extract-hook):
6 * progmodes/cc-mode.el (c-prepare-bug-report-hook):
7 * net/rcirc.el (rcirc-sentinel-functions)
8 (rcirc-receive-message-functions, rcirc-activity-functions)
9 (rcirc-print-functions):
10 * net/dbus.el (dbus-event-error-functions):
11 * emacs-lisp/eieio.el (eieio-pre-method-execution-functions):
12 * emacs-lisp/checkdoc.el (checkdoc-style-functions)
13 (checkdoc-comment-style-functions): Don't use "-hooks" suffix.
14 * term/sun.el (sun-raw-prefix-hooks):
15 * mail/sendmail.el (mail-yank-hooks): Use make-obsolete-variable.
16
172012-10-23 Michael Albinus <michael.albinus@gmx.de>
18
19 * net/tramp-smb.el (tramp-smb-maybe-open-connection):
20 Set `tramp-chunksize' to 1. This improves the performance.
21 (tramp-smb-wait-for-output): Add timeout to
22 `tramp-accept-process-output' calls.
23
242012-10-23 Chong Yidong <cyd@gnu.org>
25
26 * faces.el (font-list-limit): Define as an obsolete variable.
27
28 * startup.el (command-line):
29 * cus-start.el: Don't refer to font-list-limit.
30
31 * newcomment.el (comment-normalize-vars): Doc fix (Bug#12583).
32
332012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
34
35 * subr.el (internal-temp-output-buffer-show): Rename from
36 temp-output-buffer-show, since previously compiled files expect this name.
37
382012-10-23 Glenn Morris <rgm@gnu.org>
39
40 * image.el (image-type-from-file-name): If multiple types match,
41 return the first one that is supported. (Bug#9045)
42
432012-10-22 Glenn Morris <rgm@gnu.org>
44
45 * image.el (imagemagick-enabled-types): Doc fix.
46
472012-10-22 Takafumi Arakaki <aka.tkf@gmail.com> (tiny change)
48
49 * progmodes/which-func.el (which-func-current): The hash-table may have
50 an explicit nil (bug#12338).
51
522012-10-22 Stefan Monnier <monnier@iro.umontreal.ca>
53
54 * electric.el (electric-pair-delete-selection-self-insert-function):
55 Rename to electric-pair-will-use-region, return a boolean.
56 (electric-pair-mode): Adjust accordingly. Don't require delsel.
57
58 * delsel.el (delete-selection-helper): Use a function instead of a hook.
59 (delete-selection-pre-hook): Use use-region-p.
60 (delete-selection-self-insert-function): Remove.
61 (self-insert-command): Obey self-insert-uses-region-functions.
62 (self-insert-iso): Revert to previous setting, since we don't actually
63 know what that command does.
64 (delete-selection-self-insert-hooks): Remove.
65
662012-10-22 Simon Law <sfllaw@sfllaw.ca> (tiny change)
67
68 * delsel.el (delete-selection-helper): New function, extracted from
69 delete-selection-pre-hook.
70 (delete-selection-pre-hook): Use it.
71 (delete-selection-self-insert-function): New function.
72 (delete-selection-self-insert-hooks): New hook.
73 (self-insert-command, self-insert-iso): Use it.
74 * electric.el (electric-pair-syntax): New function, extracted from
75 electric-pair-post-self-insert-function.
76 (electric-pair-post-self-insert-function): Use it.
77 (electric-pair-delete-selection-self-insert-function): New function.
78 (electric-pair-mode): Require delsel and setup
79 delete-selection-self-insert-hooks (bug#11520).
80
812012-10-20 Chong Yidong <cyd@gnu.org>
82
83 * vc/vc.el (vc-diff-internal): Set up Diff mode even if there are
84 no changes to show (Bug#12586).
85
86 * eshell/esh-cmd.el (eshell-rewrite-for-command): Copy the body
87 list explicitly (Bug#12571).
88
892012-10-20 Arne Jørgensen <arne@arnested.dk>
90
91 * progmodes/flymake.el (flymake-create-temp-inplace):
92 Use file-truename.
93
942012-10-20 Eli Zaretskii <eliz@gnu.org>
95
96 * loadup.el: Update comment about uncompiled Lisp files. (Bug#12395)
97
982012-10-20 Jay Belanger <jay.p.belanger@gmail.com>
99
100 * calc/calc-units.el (math-extract-units): Properly extract powers
101 of units.
102
1032012-10-20 Daniel Colascione <dancol@dancol.org>
104
105 * frame.el (make-frame): Set x-display-name as we used to in order
106 to unbreak creating an X11 frame from an Emacs daemon started
107 without a display.
108
1092012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
110
111 * minibuffer.el (minibuffer-force-complete): Make the next completion use
112 the same completion-field (bug@12221).
113
12012-10-19 Martin Rudalics <rudalics@gmx.at> 1142012-10-19 Martin Rudalics <rudalics@gmx.at>
2 115
3 * emacs-lisp/debug.el (debug): Record height of debugger window 116 * emacs-lisp/debug.el (debug): Record height of debugger window
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index c04cd8dcf9d..cebd4302d0c 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -140,8 +140,10 @@ A local copy of the archive will be used when updating."
140 :type 'regexp 140 :type 'regexp
141 :group 'archive) 141 :group 'archive)
142 142
143(defcustom archive-extract-hooks nil 143(define-obsolete-variable-alias 'archive-extract-hooks
144 "Hooks to run when an archive member has been extracted." 144 'archive-extract-hook "24.3")
145(defcustom archive-extract-hook nil
146 "Hook run when an archive member has been extracted."
145 :type 'hook 147 :type 'hook
146 :group 'archive) 148 :group 'archive)
147;; ------------------------------ 149;; ------------------------------
@@ -1078,7 +1080,7 @@ using `make-temp-file', and the generated name is returned."
1078 ;; We will write out the archive ourselves if it is 1080 ;; We will write out the archive ourselves if it is
1079 ;; part of another archive. 1081 ;; part of another archive.
1080 (remove-hook 'write-contents-functions 'archive-write-file t)) 1082 (remove-hook 'write-contents-functions 'archive-write-file t))
1081 (run-hooks 'archive-extract-hooks) 1083 (run-hooks 'archive-extract-hook)
1082 (if archive-read-only 1084 (if archive-read-only
1083 (message "Note: altering this archive is not implemented.")))) 1085 (message "Note: altering this archive is not implemented."))))
1084 (archive-maybe-update t)) 1086 (archive-maybe-update t))
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el
index 39f710f8322..58646ea114c 100644
--- a/lisp/calc/calc-units.el
+++ b/lisp/calc/calc-units.el
@@ -1481,10 +1481,16 @@ If COMP or STD is non-nil, put that in the units table instead."
1481 (mapcar 'math-remove-units (cdr expr)))))) 1481 (mapcar 'math-remove-units (cdr expr))))))
1482 1482
1483(defun math-extract-units (expr) 1483(defun math-extract-units (expr)
1484 (if (memq (car-safe expr) '(* /)) 1484 (cond
1485 (cons (car expr) 1485 ((memq (car-safe expr) '(* /))
1486 (mapcar 'math-extract-units (cdr expr))) 1486 (cons (car expr)
1487 (if (math-check-unit-name expr) expr 1))) 1487 (mapcar 'math-extract-units (cdr expr))))
1488 ((and
1489 (eq (car-safe expr) '^)
1490 (math-check-unit-name (nth 1 expr)))
1491 expr)
1492 ((math-check-unit-name expr) expr)
1493 (t 1)))
1488 1494
1489(defun math-build-units-table-buffer (enter-buffer) 1495(defun math-build-units-table-buffer (enter-buffer)
1490 (if (not (and math-units-table math-units-table-buffer-valid 1496 (if (not (and math-units-table math-units-table-buffer-valid
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog
index e89e8ed258b..7656248cac5 100644
--- a/lisp/cedet/ChangeLog
+++ b/lisp/cedet/ChangeLog
@@ -1,14 +1,23 @@
12012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * semantic/db-file.el (semanticdb-save-database-functions):
4 * semantic/lex.el (semantic-lex-reset-functions):
5 * semantic/edit.el (semantic-change-functions)
6 (semantic-edits-new-change-functions)
7 (semantic-edits-delete-change-functions)
8 (semantic-edits-reparse-change-functions): Don't use "-hooks" suffix.
9
12012-10-14 David Engster <deng@randomsample.de> 102012-10-14 David Engster <deng@randomsample.de>
2 11
3 * semantic.el (semantic-error-if-unparsed): New function. Raise 12 * semantic.el (semantic-error-if-unparsed): New function.
4 error if buffer was not parsed by Semantic (bug #12045). 13 Raise error if buffer was not parsed by Semantic (bug #12045).
5 (navigate-menu, edit-menu, cedet-menu-map): Enable Semantic items 14 (navigate-menu, edit-menu, cedet-menu-map): Enable Semantic items
6 only if buffer was parsed. Also, replace ':active' with ':enable' 15 only if buffer was parsed. Also, replace ':active' with ':enable'
7 where necessary. 16 where necessary.
8 17
9 * semantic/wisent/python.el 18 * semantic/wisent/python.el
10 (semantic-python-get-system-include-path): Use 19 (semantic-python-get-system-include-path):
11 `python-shell-internal-send-string' if available to query Python 20 Use `python-shell-internal-send-string' if available to query Python
12 for system paths. 21 for system paths.
13 22
14 * semantic/senator.el (senator-next-tag, senator-previous-tag) 23 * semantic/senator.el (senator-next-tag, senator-previous-tag)
@@ -57,8 +66,8 @@
572012-10-06 Chong Yidong <cyd@gnu.org> 662012-10-06 Chong Yidong <cyd@gnu.org>
58 67
59 * semantic/bovine/grammar.el: 68 * semantic/bovine/grammar.el:
60 * semantic/wisent/grammar.el: Move from admin/grammars. Add 69 * semantic/wisent/grammar.el: Move from admin/grammars.
61 autoloads for bovine-grammar-mode and wisent-grammar-mode. 70 Add autoloads for bovine-grammar-mode and wisent-grammar-mode.
62 71
632012-10-02 Chong Yidong <cyd@gnu.org> 722012-10-02 Chong Yidong <cyd@gnu.org>
64 73
@@ -163,8 +172,8 @@
163 (-scheme, -makefile-misc, ede-proj-target-makefile-program) 172 (-scheme, -makefile-misc, ede-proj-target-makefile-program)
164 (-makefile-archive, -makefile-shared-object) 173 (-makefile-archive, -makefile-shared-object)
165 (ede-proj-target-makefile-info, -grammar): New autoloads. 174 (ede-proj-target-makefile-info, -grammar): New autoloads.
166 (ede-proj-project): Inherit from eieio-persistent-read. Specify 175 (ede-proj-project): Inherit from eieio-persistent-read.
167 extension and header line. 176 Specify extension and header line.
168 (ede-proj-load, ede-proj-save): Replace with impl using 177 (ede-proj-load, ede-proj-save): Replace with impl using
169 eieio-persistent-read. 178 eieio-persistent-read.
170 179
@@ -176,27 +185,27 @@
176 (navigate-menu): Add menu item for Stickyfunc mode. 185 (navigate-menu): Add menu item for Stickyfunc mode.
177 186
178 * semantic/analyze/debug.el 187 * semantic/analyze/debug.el
179 (semantic-analyzer-debug-insert-include-summary): Before 188 (semantic-analyzer-debug-insert-include-summary):
180 dereferencing tableinner, make sure it has a value. 189 Before dereferencing tableinner, make sure it has a value.
181 190
182 * semantic/analyze/refs.el 191 * semantic/analyze/refs.el
183 (semantic-analyze-tag-references-default): When doing a lookup, 192 (semantic-analyze-tag-references-default): When doing a lookup,
184 specify noerror. 193 specify noerror.
185 (semantic--analyze-refs-full-lookup): Add optional noerror input 194 (semantic--analyze-refs-full-lookup): Add optional noerror input
186 argument. Pass to to full-lookup-simple. 195 argument. Pass to to full-lookup-simple.
187 (semantic-analyze-refs-impl, semantic-analyze-refs-proto): Ignore 196 (semantic-analyze-refs-impl, semantic-analyze-refs-proto):
188 :typemodifiers during compare. 197 Ignore :typemodifiers during compare.
189 198
190 * semantic/bovine/c.el (semantic-lex-cpp-define): Specify limits 199 * semantic/bovine/c.el (semantic-lex-cpp-define): Specify limits
191 to looking back for comment chars. 200 to looking back for comment chars.
192 (semantic--tag-similar-names-p, semantic--tag-similar-names-p-default) 201 (semantic--tag-similar-names-p, semantic--tag-similar-names-p-default)
193 (semantic--tag-attribute-similar-p): New. 202 (semantic--tag-attribute-similar-p): New.
194 (semantic-c-describe-environment): Handle list value of ede-object. 203 (semantic-c-describe-environment): Handle list value of ede-object.
195 (semantic-lex-c-preprocessor-symbol-map-builtin): Add 204 (semantic-lex-c-preprocessor-symbol-map-builtin):
196 __attribute_pure__. 205 Add __attribute_pure__.
197 206
198 * semantic/bovine/scm.el (semantic-format-tag-prototype): Add 207 * semantic/bovine/scm.el (semantic-format-tag-prototype):
199 parent and color argument. Pass them through. 208 Add parent and color argument. Pass them through.
200 209
201 * semantic/complete.el (semantic-collector-calculate-completions): 210 * semantic/complete.el (semantic-collector-calculate-completions):
202 Search for more matches if new prefix is a substring of old one. 211 Search for more matches if new prefix is a substring of old one.
@@ -217,15 +226,15 @@
217 the (%d tags) extra string. 226 the (%d tags) extra string.
218 (semanticdb-project-database): Specify :type for table. 227 (semanticdb-project-database): Specify :type for table.
219 (semanticdb-create-table-for-file): Specify file-truename. 228 (semanticdb-create-table-for-file): Specify file-truename.
220 (semanticdb-synchronize, semanticdb-partial-synchronize): Restore 229 (semanticdb-synchronize, semanticdb-partial-synchronize):
221 code that refreshes references to include files. 230 Restore code that refreshes references to include files.
222 231
223 * semantic/decorate/include.el 232 * semantic/decorate/include.el
224 (semantic-decoration-on-fileless-includes): New face. 233 (semantic-decoration-on-fileless-includes): New face.
225 (semantic-decoration-on-fileless-include-map) 234 (semantic-decoration-on-fileless-include-map)
226 (semantic-decoration-on-fileless-include-menu): New variables. 235 (semantic-decoration-on-fileless-include-menu): New variables.
227 (semantic-decoration-on-includes-highlight-default): Support 236 (semantic-decoration-on-includes-highlight-default):
228 includes that have a table, but are not associated with a file. 237 Support includes that have a table, but are not associated with a file.
229 (semantic-decoration-fileless-include-describe) 238 (semantic-decoration-fileless-include-describe)
230 (semantic-decoration-fileless-include-menu): New functions. 239 (semantic-decoration-fileless-include-menu): New functions.
231 (semantic-decoration-all-include-summary): Add arrows to indicate 240 (semantic-decoration-all-include-summary): Add arrows to indicate
@@ -262,15 +271,15 @@
262 * semantic/tag.el (semantic-create-tag-proxy) 271 * semantic/tag.el (semantic-create-tag-proxy)
263 (semantic-tag-set-proxy, semantic-tag-resolve-proxy): New. 272 (semantic-tag-set-proxy, semantic-tag-resolve-proxy): New.
264 273
265 * semantic/util.el (semantic-describe-buffer): Add 274 * semantic/util.el (semantic-describe-buffer):
266 semantic-new-buffer-fcn-was-run. 275 Add semantic-new-buffer-fcn-was-run.
267 276
268 * semantic/wisent/java-tags.el (semantic-get-local-variables): Add 277 * semantic/wisent/java-tags.el (semantic-get-local-variables):
269 `this' to the local variable context. 278 Add `this' to the local variable context.
270 (semantic-analyze-split-name, semantic-analyze-unsplit-name): New. 279 (semantic-analyze-split-name, semantic-analyze-unsplit-name): New.
271 280
272 * semantic/wisent/python.el (semantic-python-expand-tag): New 281 * semantic/wisent/python.el (semantic-python-expand-tag):
273 function. 282 New function.
274 283
275 * srecode/compile.el (srecode-compile-templates): Add "framework" 284 * srecode/compile.el (srecode-compile-templates): Add "framework"
276 special variable support. 285 special variable support.
@@ -280,7 +289,7 @@
280 (srecode-semantic-handle-:cpp): New functions. 289 (srecode-semantic-handle-:cpp): New functions.
281 (srecode-semantic-apply-tag-to-dict): Move from cpp-mode function 290 (srecode-semantic-apply-tag-to-dict): Move from cpp-mode function
282 to c-mode function. 291 to c-mode function.
283 (srecode-c-apply-templates): Renamed from srecode-cpp-apply-templates. 292 (srecode-c-apply-templates): Rename from srecode-cpp-apply-templates.
284 293
285 * srecode/dictionary.el (initialize-instance): Remove bogus error 294 * srecode/dictionary.el (initialize-instance): Remove bogus error
286 condition. 295 condition.
@@ -293,8 +302,8 @@
293 302
294 * srecode/mode.el (srecode-minor-mode): Support the m3 menu. 303 * srecode/mode.el (srecode-minor-mode): Support the m3 menu.
295 304
296 * srecode/semantic.el (srecode-semantic-insert-tag): Support 305 * srecode/semantic.el (srecode-semantic-insert-tag):
297 system includes. 306 Support system includes.
298 307
299 * srecode/srt-mode.el (srecode-font-lock-keywords): Update. 308 * srecode/srt-mode.el (srecode-font-lock-keywords): Update.
300 309
@@ -325,8 +334,8 @@
325 * ede/proj-comp.el (ede-proj-makefile-insert-rules): Fix insertion 334 * ede/proj-comp.el (ede-proj-makefile-insert-rules): Fix insertion
326 of phony rule. 335 of phony rule.
327 336
328 * ede/proj-elisp.el (ede-proj-target-elisp): Remove 337 * ede/proj-elisp.el (ede-proj-target-elisp):
329 ede-emacs-preload-compiler. 338 Remove ede-emacs-preload-compiler.
330 (ede-proj-makefile-insert-rules, ede-proj-makefile-dependencies): 339 (ede-proj-makefile-insert-rules, ede-proj-makefile-dependencies):
331 New methods. 340 New methods.
332 (ede-emacs-compiler): Add 'require' macro to variables and pattern 341 (ede-emacs-compiler): Add 'require' macro to variables and pattern
@@ -362,8 +371,8 @@
362 (semantic-cpp-lexer): Add semantic-lex-c-ifdef. 371 (semantic-cpp-lexer): Add semantic-lex-c-ifdef.
363 (semantic-expand-c-tag): Check if tag is non-nil before adding it 372 (semantic-expand-c-tag): Check if tag is non-nil before adding it
364 to return list 373 to return list
365 (semantic-expand-c-extern-C, semantic-expand-c-complex-type): New 374 (semantic-expand-c-extern-C, semantic-expand-c-complex-type):
366 functions, copied from semantic-expand-c-tag. 375 New functions, copied from semantic-expand-c-tag.
367 (semantic-find-tags-included): New override which also searches 376 (semantic-find-tags-included): New override which also searches
368 for include tags inside of namespaces. 377 for include tags inside of namespaces.
369 (semantic-c-dereference-typedef): Use semantic-tag-prototype-p. 378 (semantic-c-dereference-typedef): Use semantic-tag-prototype-p.
@@ -371,16 +380,16 @@
371 380
372 * semantic/bovine/el.el: Remove emacs-lisp-mode-hook. 381 * semantic/bovine/el.el: Remove emacs-lisp-mode-hook.
373 382
374 * semantic/complete.el (semantic-complete-post-command-hook): Exit 383 * semantic/complete.el (semantic-complete-post-command-hook):
375 completion when user has deleted all characters from the prefix. 384 Exit completion when user has deleted all characters from the prefix.
376 (semantic-displayor-focus-request): Return to previous window when 385 (semantic-displayor-focus-request): Return to previous window when
377 focussing tags. 386 focussing tags.
378 387
379 * semantic/db-el.el (semanticdb-normalize-one-tag): Make obsolete. 388 * semantic/db-el.el (semanticdb-normalize-one-tag): Make obsolete.
380 (semanticdb-elisp-sym->tag): Use help-function-arglist instead. 389 (semanticdb-elisp-sym->tag): Use help-function-arglist instead.
381 390
382 * semantic/db-file.el (semanticdb-create-database): Use 391 * semantic/db-file.el (semanticdb-create-database):
383 semantic-tag-version instead of just semantic-version as the 392 Use semantic-tag-version instead of just semantic-version as the
384 initializer for the :semantic-tag-version slot. 393 initializer for the :semantic-tag-version slot.
385 394
386 * semantic/db-find.el (semanticdb-find-tags-by-class-method): 395 * semantic/db-find.el (semanticdb-find-tags-by-class-method):
@@ -394,11 +403,11 @@
394 (semanticdb-save-current-db, semanticdb-save-all-db): Only emit 403 (semanticdb-save-current-db, semanticdb-save-all-db): Only emit
395 message when running interactively. 404 message when running interactively.
396 405
397 * semantic/decorate/mode.el (semantic-decoration-mode): Activate 406 * semantic/decorate/mode.el (semantic-decoration-mode):
398 decoration of includes by default. 407 Activate decoration of includes by default.
399 408
400 * semantic/doc.el (semantic-doc-snarf-comment-for-tag): Remove 409 * semantic/doc.el (semantic-doc-snarf-comment-for-tag):
401 comment delimiter at the end of the text. 410 Remove comment delimiter at the end of the text.
402 411
403 * semantic/ede-grammar.el (semantic-ede-proj-target-grammar): 412 * semantic/ede-grammar.el (semantic-ede-proj-target-grammar):
404 Change aux- and pre-load-packages. 413 Change aux- and pre-load-packages.
@@ -412,16 +421,16 @@
412 (ede-proj-makefile-insert-rules): Add target specific EMACSFLAGS 421 (ede-proj-makefile-insert-rules): Add target specific EMACSFLAGS
413 to raise max-specpdl-size and max-lisp-eval-depth. 422 to raise max-specpdl-size and max-lisp-eval-depth.
414 423
415 * semantic/find.el (semantic-find-tags-included): Make 424 * semantic/find.el (semantic-find-tags-included):
416 overridable. 425 Make overridable.
417 426
418 * semantic/fw.el (semantic-alias-obsolete) 427 * semantic/fw.el (semantic-alias-obsolete)
419 (semantic-varalias-obsolete): Use byte-compile-warn. 428 (semantic-varalias-obsolete): Use byte-compile-warn.
420 (semantic-find-file-noselect): Disable font lock by calling 429 (semantic-find-file-noselect): Disable font lock by calling
421 global-font-lock-mode. 430 global-font-lock-mode.
422 431
423 * semantic/grammar.el (semantic-grammar-create-package): Fix 432 * semantic/grammar.el (semantic-grammar-create-package):
424 message. 433 Fix message.
425 (semantic-grammar-batch-build-one-package): When generating 434 (semantic-grammar-batch-build-one-package): When generating
426 parsers in batch-mode, ignore version control and make sure we do 435 parsers in batch-mode, ignore version control and make sure we do
427 not use cached versions. 436 not use cached versions.
@@ -433,16 +442,16 @@
433 (semantic-lex-spp-lex-text-string): Instead of only setting the 442 (semantic-lex-spp-lex-text-string): Instead of only setting the
434 lexer, call the major mode's setup function. 443 lexer, call the major mode's setup function.
435 444
436 * semantic/scope.el (semantic-analyze-scoped-types-default): Use 445 * semantic/scope.el (semantic-analyze-scoped-types-default):
437 semantic-tag-prototype-p. 446 Use semantic-tag-prototype-p.
438 (semantic-analyze-scope-nested-tags-default): Make sure we don't 447 (semantic-analyze-scope-nested-tags-default): Make sure we don't
439 return tags we already have in scopetypes. 448 return tags we already have in scopetypes.
440 449
441 * semantic/symref/filter.el 450 * semantic/symref/filter.el
442 (semantic-symref-test-count-hits-in-tag): Restore. 451 (semantic-symref-test-count-hits-in-tag): Restore.
443 452
444 * semantic/wisent/comp.el (wisent-BITS-PER-WORD): Use 453 * semantic/wisent/comp.el (wisent-BITS-PER-WORD):
445 most-positive-fixnum if available. 454 Use most-positive-fixnum if available.
446 455
447 * semantic/wisent/javascript.el (semantic-tag-protection) 456 * semantic/wisent/javascript.el (semantic-tag-protection)
448 (semantic-analyze-scope-calculate-access) 457 (semantic-analyze-scope-calculate-access)
@@ -477,8 +486,8 @@
4772012-10-01 Jan Moringen <jan.moringen@uni-bielefeld.de> 4862012-10-01 Jan Moringen <jan.moringen@uni-bielefeld.de>
478 487
479 * semantic/idle.el 488 * semantic/idle.el
480 (semantic-idle-breadcrumbs--display-in-header-line): Escape 489 (semantic-idle-breadcrumbs--display-in-header-line):
481 %-characters to avoid erroneous expansion in header line. 490 Escape %-characters to avoid erroneous expansion in header line.
482 (semantic-idle-breadcrumbs--display-in-mode-line): Likewise. 491 (semantic-idle-breadcrumbs--display-in-mode-line): Likewise.
483 492
484 * semantic/wisent/python.el (wisent-python-reconstitute-function-tag) 493 * semantic/wisent/python.el (wisent-python-reconstitute-function-tag)
@@ -514,8 +523,8 @@
514 523
515 * semantic/wisent/python.el (wisent-python-string-start-re) 524 * semantic/wisent/python.el (wisent-python-string-start-re)
516 (wisent-python-string-re, wisent-python-forward-string) 525 (wisent-python-string-re, wisent-python-forward-string)
517 (wisent-python-forward-line,wisent-python-lex-string): New 526 (wisent-python-forward-line,wisent-python-lex-string):
518 variables. 527 New variables.
519 (wisent-python-forward-balanced-expression): New function. 528 (wisent-python-forward-balanced-expression): New function.
520 529
5212012-10-01 Pete Beardmore <elbeardmorez@msn.com> 5302012-10-01 Pete Beardmore <elbeardmorez@msn.com>
@@ -528,16 +537,16 @@
528 (semantic-displayor-tooltip-mode) 537 (semantic-displayor-tooltip-mode)
529 (semantic-displayor-tooltip-initial-max-tags) 538 (semantic-displayor-tooltip-initial-max-tags)
530 (semantic-displayor-tooltip-max-tags): New defcustoms. 539 (semantic-displayor-tooltip-max-tags): New defcustoms.
531 (semantic-displayor-tooltip): Use new variables as initforms. Use 540 (semantic-displayor-tooltip): Use new variables as initforms.
532 new slot `mode' instead of `force-show'. Rename `max-tags' to 541 Use new slot `mode' instead of `force-show'. Rename `max-tags' to
533 `max-tags-initial'. 542 `max-tags-initial'.
534 (semantic-displayor-show-request): Display completions according 543 (semantic-displayor-show-request): Display completions according
535 to new modes, and make variable names clearer. 544 to new modes, and make variable names clearer.
536 (semantic-displayor-tooltip::semantic-displayor-scroll-request): 545 (semantic-displayor-tooltip::semantic-displayor-scroll-request):
537 Use new max-tags-initial slot. 546 Use new max-tags-initial slot.
538 547
539 * semantic/idle.el (semantic-idle-local-symbol-highlight): Make 548 * semantic/idle.el (semantic-idle-local-symbol-highlight):
540 sure there actually is a tag at point. 549 Make sure there actually is a tag at point.
541 (semantic-idle-completion-list-default): Report errors as messages 550 (semantic-idle-completion-list-default): Report errors as messages
542 if semantic-idle-scheduler-verbose-flag is non-nil. 551 if semantic-idle-scheduler-verbose-flag is non-nil.
543 552
@@ -548,13 +557,13 @@
548 557
5492012-10-01 Alex Ott <alexott@gmail.com> 5582012-10-01 Alex Ott <alexott@gmail.com>
550 559
551 * semantic/idle.el (semantic-idle-scheduler-enabled-p): Fix 560 * semantic/idle.el (semantic-idle-scheduler-enabled-p):
552 file-checking. 561 Fix file-checking.
553 562
5542012-10-01 Darren Hoo <darren.hoo@gmail.com> (tiny change) 5632012-10-01 Darren Hoo <darren.hoo@gmail.com> (tiny change)
555 564
556 * semantic/db-find.el (semanticdb-find-default-throttle): Make 565 * semantic/db-find.el (semanticdb-find-default-throttle):
557 buffer-local. 566 Make buffer-local.
558 (semanticdb-strip-find-results): Check for existing :filename 567 (semanticdb-strip-find-results): Check for existing :filename
559 attribute, so that file information from GNU Global is not lost. 568 attribute, so that file information from GNU Global is not lost.
560 569
@@ -1001,7 +1010,7 @@
1001 (ede-customize-forms-menu): Prevent error if there is no project. 1010 (ede-customize-forms-menu): Prevent error if there is no project.
1002 (ede-load-project-file): Set ede-constructing to the thing being 1011 (ede-load-project-file): Set ede-constructing to the thing being
1003 constructed, instead of t. 1012 constructed, instead of t.
1004 (ede-project-force-load): Deleted. 1013 (ede-project-force-load): Delete.
1005 1014
1006 * ede/base.el: 1015 * ede/base.el:
1007 * ede/auto.el: 1016 * ede/auto.el:
@@ -1011,7 +1020,7 @@
1011 (autoconf-parameters-for-macro): Parse multiline parameters of 1020 (autoconf-parameters-for-macro): Parse multiline parameters of
1012 macros. Optionally ignore case and at bol for macro. 1021 macros. Optionally ignore case and at bol for macro.
1013 (autoconf-parameter-strip): Use greedy match for newlines. 1022 (autoconf-parameter-strip): Use greedy match for newlines.
1014 (autoconf-new-automake-string): Deleted. 1023 (autoconf-new-automake-string): Delete.
1015 (autoconf-new-program): Use SRecode to fill an empty file. 1024 (autoconf-new-program): Use SRecode to fill an empty file.
1016 1025
1017 * ede/cpp-root.el (ede-create-lots-of-projects-under-dir): 1026 * ede/cpp-root.el (ede-create-lots-of-projects-under-dir):
@@ -1046,7 +1055,7 @@
1046 (project-am-scan-for-targets): Scan also over 1055 (project-am-scan-for-targets): Scan also over
1047 project-am-meta-type-alist. 1056 project-am-meta-type-alist.
1048 (ede-system-include-path): Simple implementation. 1057 (ede-system-include-path): Simple implementation.
1049 (ede-find-target): Deleted. EDE core takes care of this. 1058 (ede-find-target): Delete. EDE core takes care of this.
1050 (ede-buffer-mine): Create the searched filename as relative. 1059 (ede-buffer-mine): Create the searched filename as relative.
1051 (project-am-load): Simplify, using autoconf-edit. 1060 (project-am-load): Simplify, using autoconf-edit.
1052 (project-am-extract-package-info): Fix separators. 1061 (project-am-extract-package-info): Fix separators.
@@ -1063,7 +1072,7 @@
1063 (ede-proj-target-makefile-objectcode): Quote initforms. 1072 (ede-proj-target-makefile-objectcode): Quote initforms.
1064 Support lex and yacc. 1073 Support lex and yacc.
1065 1074
1066 * ede/proj-prog.el (ede-proj-makefile-insert-rules): Removed. 1075 * ede/proj-prog.el (ede-proj-makefile-insert-rules): Remove.
1067 (ede-proj-makefile-insert-variables): New, add LDDEPS. 1076 (ede-proj-makefile-insert-variables): New, add LDDEPS.
1068 (ede-proj-makefile-insert-automake-post-variables): Add LDADD 1077 (ede-proj-makefile-insert-automake-post-variables): Add LDADD
1069 variable. Use ldlibs-local slot. Add a -l to ldlibs strings. 1078 variable. Use ldlibs-local slot. Add a -l to ldlibs strings.
@@ -1158,7 +1167,7 @@
1158 1167
1159 * semantic/util.el (semantic-hack-search) 1168 * semantic/util.el (semantic-hack-search)
1160 (semantic-recursive-find-nonterminal-by-name) 1169 (semantic-recursive-find-nonterminal-by-name)
1161 (semantic-current-tag-interactive): Deleted. 1170 (semantic-current-tag-interactive): Delete.
1162 (semantic-describe-buffer): Fix expand-nonterminal. 1171 (semantic-describe-buffer): Fix expand-nonterminal.
1163 Add lex-syntax-mods, type relation separator char, and command 1172 Add lex-syntax-mods, type relation separator char, and command
1164 separation char. 1173 separation char.
@@ -1191,7 +1200,7 @@
1191 (semantic-idle-truncate-long-summaries): New option. 1200 (semantic-idle-truncate-long-summaries): New option.
1192 1201
1193 * semantic/ia.el (semantic-ia-cache) 1202 * semantic/ia.el (semantic-ia-cache)
1194 (semantic-ia-get-completions): Deleted. Callers changed. 1203 (semantic-ia-get-completions): Delete. Callers changed.
1195 (semantic-ia-show-variants): New command. 1204 (semantic-ia-show-variants): New command.
1196 (semantic-ia-show-doc): If doc is empty, don't make a temp buffer. 1205 (semantic-ia-show-doc): If doc is empty, don't make a temp buffer.
1197 (semantic-ia-show-summary): If there isn't anything to show, say so. 1206 (semantic-ia-show-summary): If there isn't anything to show, say so.
diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el
index 7b4a47bd260..4f8e93dc391 100644
--- a/lisp/cedet/semantic/db-file.el
+++ b/lisp/cedet/semantic/db-file.el
@@ -70,7 +70,9 @@ passes a list of predicates in `semanticdb-project-predicate-functions'."
70 :group 'semanticdb 70 :group 'semanticdb
71 :type nil) 71 :type nil)
72 72
73(defcustom semanticdb-save-database-hooks nil 73(define-obsolete-variable-alias 'semanticdb-save-database-hooks
74 'semanticdb-save-database-functions "24.3")
75(defcustom semanticdb-save-database-functions nil
74 "Abnormal hook run after a database is saved. 76 "Abnormal hook run after a database is saved.
75Each function is called with one argument, the object representing 77Each function is called with one argument, the object representing
76the database recently written." 78the database recently written."
@@ -251,7 +253,7 @@ If DB is not specified, then use the current database."
251 (message "Save Error: %S: %s" (car (cdr foo)) 253 (message "Save Error: %S: %s" (car (cdr foo))
252 objname) 254 objname)
253 (error "%S" (car (cdr foo)))))))) 255 (error "%S" (car (cdr foo))))))))
254 (run-hook-with-args 'semanticdb-save-database-hooks 256 (run-hook-with-args 'semanticdb-save-database-functions
255 (or DB semanticdb-current-database)) 257 (or DB semanticdb-current-database))
256 ;;(message "Saving tag summary for %s...done" objname) 258 ;;(message "Saving tag summary for %s...done" objname)
257 ) 259 )
diff --git a/lisp/cedet/semantic/edit.el b/lisp/cedet/semantic/edit.el
index 23b6784fe2a..5b39dec2628 100644
--- a/lisp/cedet/semantic/edit.el
+++ b/lisp/cedet/semantic/edit.el
@@ -72,7 +72,9 @@ updated in the current buffer.
72 72
73For language specific hooks, make sure you define this as a local hook.") 73For language specific hooks, make sure you define this as a local hook.")
74 74
75(defvar semantic-change-hooks 75(define-obsolete-variable-alias 'semantic-change-hooks
76 'semantic-change-functions "24.3")
77(defvar semantic-change-functions
76 '(semantic-edits-change-function-handle-changes) 78 '(semantic-edits-change-function-handle-changes)
77 "Abnormal hook run when semantic detects a change in a buffer. 79 "Abnormal hook run when semantic detects a change in a buffer.
78Each hook function must take three arguments, identical to the 80Each 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.
89For language specific hooks, make sure you define this as a local hook. 91For language specific hooks, make sure you define this as a local hook.
90Not used yet; part of the next generation reparse mechanism.") 92Not used yet; part of the next generation reparse mechanism.")
91 93
92(defvar semantic-edits-new-change-hooks nil 94(define-obsolete-variable-alias 'semantic-edits-new-change-hooks
95 'semantic-edits-new-change-functions "24.3")
96(defvar semantic-edits-new-change-functions nil
93 "Abnormal hook run when a new change is found. 97 "Abnormal hook run when a new change is found.
94Functions must take one argument representing an overlay on that change.") 98Functions must take one argument representing an overlay on that change.")
95 99
96(defvar semantic-edits-delete-change-hooks nil 100(define-obsolete-variable-alias 'semantic-edits-delete-change-hooks
101 'semantic-edits-delete-change-functions "24.3")
102(defvar semantic-edits-delete-change-functions nil
97 "Abnormal hook run before a change overlay is deleted. 103 "Abnormal hook run before a change overlay is deleted.
98Deleted changes occur when multiple changes are merged. 104Deleted changes occur when multiple changes are merged.
99Functions must take one argument representing an overlay being deleted.") 105Functions 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
104will be moved. 110will be moved.
105Functions must take one argument representing an overlay being moved.") 111Functions must take one argument representing an overlay being moved.")
106 112
107(defvar semantic-edits-reparse-change-hooks nil 113(define-obsolete-variable-alias 'semantic-edits-reparse-change-hooks
114 'semantic-edits-reparse-change-functions "24.3")
115(defvar semantic-edits-reparse-change-functions nil
108 "Abnormal hook run after a change results in a reparse. 116 "Abnormal hook run after a change results in a reparse.
109Functions are called before the overlay is deleted, and after the 117Functions are called before the overlay is deleted, and after the
110incremental reparse.") 118incremental reparse.")
@@ -133,7 +141,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
133 (setq semantic-unmatched-syntax-cache-check t) 141 (setq semantic-unmatched-syntax-cache-check t)
134 (let ((inhibit-point-motion-hooks t) 142 (let ((inhibit-point-motion-hooks t)
135 ) 143 )
136 (run-hook-with-args 'semantic-change-hooks start end length) 144 (run-hook-with-args 'semantic-change-functions start end length)
137 )) 145 ))
138 146
139(defun semantic-changes-in-region (start end &optional buffer) 147(defun semantic-changes-in-region (start end &optional buffer)
@@ -168,7 +176,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
168 ;; function will be removed from the list of active change 176 ;; function will be removed from the list of active change
169 ;; functions. 177 ;; functions.
170 (condition-case nil 178 (condition-case nil
171 (run-hook-with-args 'semantic-edits-new-change-hooks o) 179 (run-hook-with-args 'semantic-edits-new-change-functions o)
172 (error nil))) 180 (error nil)))
173 (let ((tmp changes-in-change)) 181 (let ((tmp changes-in-change))
174 ;; Find greatest bounds of all changes 182 ;; Find greatest bounds of all changes
@@ -188,7 +196,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
188 ;; Delete other changes. They are now all bound here. 196 ;; Delete other changes. They are now all bound here.
189 (while changes-in-change 197 (while changes-in-change
190 (condition-case nil 198 (condition-case nil
191 (run-hook-with-args 'semantic-edits-delete-change-hooks 199 (run-hook-with-args 'semantic-edits-delete-change-functions
192 (car changes-in-change)) 200 (car changes-in-change))
193 (error nil)) 201 (error nil))
194 (semantic-overlay-delete (car changes-in-change)) 202 (semantic-overlay-delete (car changes-in-change))
@@ -198,7 +206,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
198(defsubst semantic-edits-flush-change (change) 206(defsubst semantic-edits-flush-change (change)
199 "Flush the CHANGE overlay." 207 "Flush the CHANGE overlay."
200 (condition-case nil 208 (condition-case nil
201 (run-hook-with-args 'semantic-edits-delete-change-hooks 209 (run-hook-with-args 'semantic-edits-delete-change-functions
202 change) 210 change)
203 (error nil)) 211 (error nil))
204 (semantic-overlay-delete change)) 212 (semantic-overlay-delete change))
diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el
index d7ab5911a67..274df355901 100644
--- a/lisp/cedet/semantic/lex.el
+++ b/lisp/cedet/semantic/lex.el
@@ -729,7 +729,9 @@ This is an alist of (ANCHOR . STREAM) elements where ANCHOR is the
729start position of the block, and STREAM is the list of tokens in that 729start position of the block, and STREAM is the list of tokens in that
730block.") 730block.")
731 731
732(defvar semantic-lex-reset-hooks nil 732(define-obsolete-variable-alias 'semantic-lex-reset-hooks
733 'semantic-lex-reset-functions "24.3")
734(defvar semantic-lex-reset-functions nil
733 "Abnormal hook used by major-modes to reset lexical analyzers. 735 "Abnormal hook used by major-modes to reset lexical analyzers.
734Hook functions are called with START and END values for the 736Hook functions are called with START and END values for the
735current lexical pass. Should be set with `add-hook', specifying 737current lexical pass. Should be set with `add-hook', specifying
@@ -771,7 +773,7 @@ analyzer which might mistake a number for as a symbol."
771 ;; Make sure the state of block parsing starts over. 773 ;; Make sure the state of block parsing starts over.
772 (setq semantic-lex-block-streams nil) 774 (setq semantic-lex-block-streams nil)
773 ;; Allow specialty reset items. 775 ;; Allow specialty reset items.
774 (run-hook-with-args 'semantic-lex-reset-hooks start end) 776 (run-hook-with-args 'semantic-lex-reset-functions start end)
775 ;; Lexing state. 777 ;; Lexing state.
776 (let* (;(starttime (current-time)) 778 (let* (;(starttime (current-time))
777 (starting-position (point)) 779 (starting-position (point))
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 579551c9a91..2279dc2bf20 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -487,7 +487,6 @@ since it could result in memory overflow and make Emacs crash."
487 (hourglass-delay cursor number) 487 (hourglass-delay cursor number)
488 488
489 ;; xfaces.c 489 ;; xfaces.c
490 (font-list-limit display integer)
491 (scalable-fonts-allowed display boolean "22.1") 490 (scalable-fonts-allowed display boolean "22.1")
492 ;; xfns.c 491 ;; xfns.c
493 (x-bitmap-file-path installation 492 (x-bitmap-file-path installation
diff --git a/lisp/delsel.el b/lisp/delsel.el
index a6435672201..2ed82676189 100644
--- a/lisp/delsel.el
+++ b/lisp/delsel.el
@@ -44,9 +44,12 @@
44;; `kill-region' is used on the selection, rather than 44;; `kill-region' is used on the selection, rather than
45;; `delete-region'. (Text selected with the mouse will typically 45;; `delete-region'. (Text selected with the mouse will typically
46;; be yankable anyhow.) 46;; be yankable anyhow.)
47;; non-nil 47;; t
48;; The normal case: delete the active region prior to executing 48;; The normal case: delete the active region prior to executing
49;; the command which will insert replacement text. 49;; the command which will insert replacement text.
50;; <function>
51;; For commands which need to dynamically determine this behaviour.
52;; The function should return one of the above values or nil.
50 53
51;;; Code: 54;;; Code:
52 55
@@ -71,65 +74,96 @@ any selection."
71 (transient-mark-mode t))) 74 (transient-mark-mode t)))
72 75
73(defun delete-active-region (&optional killp) 76(defun delete-active-region (&optional killp)
77 "Delete the active region.
78If KILLP in not-nil, the active region is killed instead of deleted."
74 (if killp 79 (if killp
75 (kill-region (point) (mark)) 80 (kill-region (point) (mark))
76 (delete-region (point) (mark))) 81 (delete-region (point) (mark)))
77 t) 82 t)
78 83
84(defun delete-selection-helper (type)
85 "Delete selection according to TYPE:
86 `yank'
87 For commands which do a yank; ensures the region about to be
88 deleted isn't yanked.
89 `supersede'
90 Delete the active region and ignore the current command,
91 i.e. the command will just delete the region.
92 `kill'
93 `kill-region' is used on the selection, rather than
94 `delete-region'. (Text selected with the mouse will typically
95 be yankable anyhow.)
96 t
97 The normal case: delete the active region prior to executing
98 the command which will insert replacement text.
99 FUNCTION
100 For commands which need to dynamically determine this behaviour.
101 FUNCTION should take no argument and return one of the above values or nil."
102 (condition-case data
103 (cond ((eq type 'kill)
104 (delete-active-region t))
105 ((eq type 'yank)
106 ;; Before a yank command, make sure we don't yank the
107 ;; head of the kill-ring that really comes from the
108 ;; currently active region we are going to delete.
109 ;; That would make yank a no-op.
110 (when (and (string= (buffer-substring-no-properties
111 (point) (mark))
112 (car kill-ring))
113 (fboundp 'mouse-region-match)
114 (mouse-region-match))
115 (current-kill 1))
116 (delete-active-region))
117 ((eq type 'supersede)
118 (let ((empty-region (= (point) (mark))))
119 (delete-active-region)
120 (unless empty-region
121 (setq this-command 'ignore))))
122 ((functionp type) (delete-selection-helper (funcall type)))
123 (type
124 (delete-active-region)
125 (if (and overwrite-mode
126 (eq this-command 'self-insert-command))
127 (let ((overwrite-mode nil))
128 (self-insert-command
129 (prefix-numeric-value current-prefix-arg))
130 (setq this-command 'ignore)))))
131 ;; If ask-user-about-supersession-threat signals an error,
132 ;; stop safe_run_hooks from clearing out pre-command-hook.
133 (file-supersession (message "%s" (cadr data)) (ding))
134 (text-read-only
135 ;; This signal may come either from `delete-active-region' or
136 ;; `self-insert-command' (when `overwrite-mode' is non-nil).
137 ;; To avoid clearing out `pre-command-hook' we handle this case
138 ;; by issuing a simple message. Note, however, that we do not
139 ;; handle all related problems: When read-only text ends before
140 ;; the end of the region, the latter is not deleted but any
141 ;; subsequent insertion will succeed. We could avoid this case
142 ;; by doing a (setq this-command 'ignore) here. This would,
143 ;; however, still not handle the case where read-only text ends
144 ;; precisely where the region starts: In that case the deletion
145 ;; would succeed but the subsequent insertion would fail with a
146 ;; text-read-only error. To handle that case we would have to
147 ;; investigate text properties at both ends of the region and
148 ;; skip the deletion when inserting text is forbidden there.
149 (message "Text is read-only") (ding))))
150
79(defun delete-selection-pre-hook () 151(defun delete-selection-pre-hook ()
80 (when (and delete-selection-mode transient-mark-mode mark-active 152 "Function run before commands that delete selections are executed.
153Commands which will delete the selection need a `delete-selection'
154property on their symbol; commands which insert text but don't
155have this property won't delete the selection.
156See `delete-selection-helper'."
157 (when (and delete-selection-mode (use-region-p)
81 (not buffer-read-only)) 158 (not buffer-read-only))
82 (let ((type (and (symbolp this-command) 159 (delete-selection-helper (and (symbolp this-command)
83 (get this-command 'delete-selection)))) 160 (get this-command 'delete-selection)))))
84 (condition-case data 161
85 (cond ((eq type 'kill) 162(put 'self-insert-command 'delete-selection
86 (delete-active-region t)) 163 (lambda ()
87 ((eq type 'yank) 164 (not (run-hook-with-args-until-success
88 ;; Before a yank command, make sure we don't yank the 165 'self-insert-uses-region-functions))))
89 ;; head of the kill-ring that really comes from the 166
90 ;; currently active region we are going to delete.
91 ;; That would make yank a no-op.
92 (when (and (string= (buffer-substring-no-properties
93 (point) (mark))
94 (car kill-ring))
95 (fboundp 'mouse-region-match)
96 (mouse-region-match))
97 (current-kill 1))
98 (delete-active-region))
99 ((eq type 'supersede)
100 (let ((empty-region (= (point) (mark))))
101 (delete-active-region)
102 (unless empty-region
103 (setq this-command 'ignore))))
104 (type
105 (delete-active-region)
106 (if (and overwrite-mode
107 (eq this-command 'self-insert-command))
108 (let ((overwrite-mode nil))
109 (self-insert-command
110 (prefix-numeric-value current-prefix-arg))
111 (setq this-command 'ignore)))))
112 ;; If ask-user-about-supersession-threat signals an error,
113 ;; stop safe_run_hooks from clearing out pre-command-hook.
114 (file-supersession (message "%s" (cadr data)) (ding))
115 (text-read-only
116 ;; This signal may come either from `delete-active-region' or
117 ;; `self-insert-command' (when `overwrite-mode' is non-nil).
118 ;; To avoid clearing out `pre-command-hook' we handle this case
119 ;; by issuing a simple message. Note, however, that we do not
120 ;; handle all related problems: When read-only text ends before
121 ;; the end of the region, the latter is not deleted but any
122 ;; subsequent insertion will succeed. We could avoid this case
123 ;; by doing a (setq this-command 'ignore) here. This would,
124 ;; however, still not handle the case where read-only text ends
125 ;; precisely where the region starts: In that case the deletion
126 ;; would succeed but the subsequent insertion would fail with a
127 ;; text-read-only error. To handle that case we would have to
128 ;; investigate text properties at both ends of the region and
129 ;; skip the deletion when inserting text is forbidden there.
130 (message "Text is read-only") (ding))))))
131
132(put 'self-insert-command 'delete-selection t)
133(put 'self-insert-iso 'delete-selection t) 167(put 'self-insert-iso 'delete-selection t)
134 168
135(put 'yank 'delete-selection 'yank) 169(put 'yank 'delete-selection 'yank)
diff --git a/lisp/electric.el b/lisp/electric.el
index 3108a0ed4c0..abf5a72ecaf 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -301,14 +301,17 @@ This can be convenient for people who find it easier to hit ) than C-f."
301 :version "24.1" 301 :version "24.1"
302 :type 'boolean) 302 :type 'boolean)
303 303
304(defun electric-pair-syntax (command-event)
305 (and electric-pair-mode
306 (let ((x (assq command-event electric-pair-pairs)))
307 (cond
308 (x (if (eq (car x) (cdr x)) ?\" ?\())
309 ((rassq command-event electric-pair-pairs) ?\))
310 (t (char-syntax command-event))))))
311
304(defun electric-pair-post-self-insert-function () 312(defun electric-pair-post-self-insert-function ()
305 (let* ((syntax (and (eq (char-before) last-command-event) ; Sanity check. 313 (let* ((syntax (and (eq (char-before) last-command-event) ; Sanity check.
306 electric-pair-mode 314 (electric-pair-syntax last-command-event)))
307 (let ((x (assq last-command-event electric-pair-pairs)))
308 (cond
309 (x (if (eq (car x) (cdr x)) ?\" ?\())
310 ((rassq last-command-event electric-pair-pairs) ?\))
311 (t (char-syntax last-command-event))))))
312 ;; FIXME: when inserting the closer, we should maybe use 315 ;; FIXME: when inserting the closer, we should maybe use
313 ;; self-insert-command, although it may prove tricky running 316 ;; self-insert-command, although it may prove tricky running
314 ;; post-self-insert-hook recursively, and we wouldn't want to trigger 317 ;; 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."
355 (eq (char-syntax (following-char)) ?w))) 358 (eq (char-syntax (following-char)) ?w)))
356 (save-excursion (insert closer)))))) 359 (save-excursion (insert closer))))))
357 360
361(defun electric-pair-will-use-region ()
362 (and (use-region-p)
363 (memq (electric-pair-syntax last-command-event) '(?\( ?\" ?\$))))
364
358;;;###autoload 365;;;###autoload
359(define-minor-mode electric-pair-mode 366(define-minor-mode electric-pair-mode
360 "Toggle automatic parens pairing (Electric Pair mode). 367 "Toggle automatic parens pairing (Electric Pair mode).
@@ -370,10 +377,15 @@ See options `electric-pair-pairs' and `electric-pair-skip-self'."
370 :global t 377 :global t
371 :group 'electricity 378 :group 'electricity
372 (if electric-pair-mode 379 (if electric-pair-mode
373 (add-hook 'post-self-insert-hook 380 (progn
374 #'electric-pair-post-self-insert-function) 381 (add-hook 'post-self-insert-hook
382 #'electric-pair-post-self-insert-function)
383 (add-hook 'self-insert-uses-region-functions
384 #'electric-pair-will-use-region))
375 (remove-hook 'post-self-insert-hook 385 (remove-hook 'post-self-insert-hook
376 #'electric-pair-post-self-insert-function))) 386 #'electric-pair-post-self-insert-function)
387 (remove-hook 'self-insert-uses-region-functions
388 #'electric-pair-will-use-region)))
377 389
378;; Automatically add newlines after/before/around some chars. 390;; Automatically add newlines after/before/around some chars.
379 391
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index ee8cbd2c3bc..6250edc8792 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -124,7 +124,7 @@
124;; Adding your own checks: 124;; Adding your own checks:
125;; 125;;
126;; You can experiment with adding your own checks by setting the 126;; You can experiment with adding your own checks by setting the
127;; hooks `checkdoc-style-hooks' and `checkdoc-comment-style-hooks'. 127;; hooks `checkdoc-style-functions' and `checkdoc-comment-style-hooks'.
128;; Return a string which is the error you wish to report. The cursor 128;; Return a string which is the error you wish to report. The cursor
129;; position should be preserved. 129;; position should be preserved.
130;; 130;;
@@ -274,17 +274,21 @@ made in the style guide relating to order."
274 :type 'boolean) 274 :type 'boolean)
275;;;###autoload(put 'checkdoc-arguments-in-order-flag 'safe-local-variable 'booleanp) 275;;;###autoload(put 'checkdoc-arguments-in-order-flag 'safe-local-variable 'booleanp)
276 276
277(defvar checkdoc-style-hooks nil 277(define-obsolete-variable-alias 'checkdoc-style-hooks
278 "Hooks called after the standard style check is completed. 278 'checkdoc-style-functions "24.3")
279All hooks must return nil or a string representing the error found. 279(defvar checkdoc-style-functions nil
280 "Hook run after the standard style check is completed.
281All functions must return nil or a string representing the error found.
280Useful for adding new user implemented commands. 282Useful for adding new user implemented commands.
281 283
282Each hook is called with two parameters, (DEFUNINFO ENDPOINT). 284Each hook is called with two parameters, (DEFUNINFO ENDPOINT).
283DEFUNINFO is the return value of `checkdoc-defun-info'. ENDPOINT is the 285DEFUNINFO is the return value of `checkdoc-defun-info'. ENDPOINT is the
284location of end of the documentation string.") 286location of end of the documentation string.")
285 287
286(defvar checkdoc-comment-style-hooks nil 288(define-obsolete-variable-alias 'checkdoc-comment-style-hooks
287 "Hooks called after the standard comment style check is completed. 289 checkdoc-comment-style-functions "24.3")
290(defvar checkdoc-comment-style-functions nil
291 "Hook run after the standard comment style check is completed.
288Must return nil if no errors are found, or a string describing the 292Must return nil if no errors are found, or a string describing the
289problem discovered. This is useful for adding additional checks.") 293problem discovered. This is useful for adding additional checks.")
290 294
@@ -1843,7 +1847,7 @@ Replace with \"%s\"? " original replace)
1843 ;; and reliance on the Ispell program. 1847 ;; and reliance on the Ispell program.
1844 (checkdoc-ispell-docstring-engine e) 1848 (checkdoc-ispell-docstring-engine e)
1845 ;; User supplied checks 1849 ;; User supplied checks
1846 (save-excursion (checkdoc-run-hooks 'checkdoc-style-hooks fp e)) 1850 (save-excursion (checkdoc-run-hooks 'checkdoc-style-functions fp e))
1847 ;; Done! 1851 ;; Done!
1848 ))) 1852 )))
1849 1853
@@ -2353,7 +2357,7 @@ Code:, and others referenced in the style guide."
2353 err 2357 err
2354 (or 2358 (or
2355 ;; Generic Full-file checks (should be comment related) 2359 ;; Generic Full-file checks (should be comment related)
2356 (checkdoc-run-hooks 'checkdoc-comment-style-hooks) 2360 (checkdoc-run-hooks 'checkdoc-comment-style-functions)
2357 err)) 2361 err))
2358 ;; Done with full file comment checks 2362 ;; Done with full file comment checks
2359 err))) 2363 err)))
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 5f8cbea7c27..608134bd54f 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -2066,7 +2066,9 @@ Keys are a number representing :before, :primary, and :after methods.")
2066During executions, the list is first generated, then as each next method 2066During executions, the list is first generated, then as each next method
2067is called, the next method is popped off the stack.") 2067is called, the next method is popped off the stack.")
2068 2068
2069(defvar eieio-pre-method-execution-hooks nil 2069(define-obsolete-variable-alias 'eieio-pre-method-execution-hooks
2070 'eieio-pre-method-execution-functions "24.3")
2071(defvar eieio-pre-method-execution-functions nil
2070 "Abnormal hook run just before an EIEIO method is executed. 2072 "Abnormal hook run just before an EIEIO method is executed.
2071The hook function must accept one argument, the list of forms 2073The hook function must accept one argument, the list of forms
2072about to be executed.") 2074about to be executed.")
@@ -2172,7 +2174,7 @@ This should only be called from a generic function."
2172 (eieiomt-method-list method method-primary nil))) 2174 (eieiomt-method-list method method-primary nil)))
2173 ) 2175 )
2174 2176
2175 (run-hook-with-args 'eieio-pre-method-execution-hooks 2177 (run-hook-with-args 'eieio-pre-method-execution-functions
2176 primarymethodlist) 2178 primarymethodlist)
2177 2179
2178 ;; Now loop through all occurrences forms which we must execute 2180 ;; Now loop through all occurrences forms which we must execute
@@ -2277,7 +2279,7 @@ for this common case to improve performance."
2277 2279
2278 ;; Do the regular implementation here. 2280 ;; Do the regular implementation here.
2279 2281
2280 (run-hook-with-args 'eieio-pre-method-execution-hooks 2282 (run-hook-with-args 'eieio-pre-method-execution-functions
2281 lambdas) 2283 lambdas)
2282 2284
2283 (setq lastval (apply (car lambdas) newargs)) 2285 (setq lastval (apply (car lambdas) newargs))
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 5a10721387b..e6e89d83b7c 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -484,20 +484,22 @@ implemented via rewriting, rather than as a function."
484 (let ((body (car (last terms)))) 484 (let ((body (car (last terms))))
485 (setcdr (last terms 2) nil) 485 (setcdr (last terms 2) nil)
486 `(let ((for-items 486 `(let ((for-items
487 (append 487 (copy-tree
488 ,@(mapcar 488 (append
489 (lambda (elem) 489 ,@(mapcar
490 (if (listp elem) 490 (lambda (elem)
491 elem 491 (if (listp elem)
492 `(list ,elem))) 492 elem
493 (cdr (cddr terms))))) 493 `(list ,elem)))
494 (eshell-command-body '(nil)) 494 (cdr (cddr terms))))))
495 (eshell-command-body '(nil))
495 (eshell-test-body '(nil))) 496 (eshell-test-body '(nil)))
496 (while (consp for-items) 497 (while (car for-items)
497 (let ((,(intern (cadr terms)) (car for-items))) 498 (let ((,(intern (cadr terms)) (car for-items)))
498 (eshell-protect 499 (eshell-protect
499 ,(eshell-invokify-arg body t))) 500 ,(eshell-invokify-arg body t)))
500 (setq for-items (cdr for-items))) 501 (setcar for-items (cadr for-items))
502 (setcdr for-items (cddr for-items)))
501 (eshell-close-handles 503 (eshell-close-handles
502 eshell-last-command-status 504 eshell-last-command-status
503 (list 'quote eshell-last-command-result)))))) 505 (list 'quote eshell-last-command-result))))))
diff --git a/lisp/faces.el b/lisp/faces.el
index 08aa800c067..f5ef88d08b0 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2572,6 +2572,12 @@ also the same size as FACE on FRAME, or fail."
2572 (car fonts)) 2572 (car fonts))
2573 (cdr (assq 'font (frame-parameters (selected-frame)))))) 2573 (cdr (assq 'font (frame-parameters (selected-frame))))))
2574 2574
2575(defcustom font-list-limit 100
2576 "This variable is obsolete and has no effect."
2577 :type 'integer
2578 :group 'display)
2579(make-obsolete-variable 'font-list-limit nil "24.3")
2580
2575(provide 'faces) 2581(provide 'faces)
2576 2582
2577;;; faces.el ends here 2583;;; faces.el ends here
diff --git a/lisp/filesets.el b/lisp/filesets.el
index a91d8cf0fcb..7f695cf33dd 100644
--- a/lisp/filesets.el
+++ b/lisp/filesets.el
@@ -403,8 +403,10 @@ Don't forget to check out `filesets-menu-ensure-use-cached'."
403 (sexp :tag "Other" :value nil))) 403 (sexp :tag "Other" :value nil)))
404 :group 'filesets) 404 :group 'filesets)
405 405
406(defcustom filesets-cache-fill-content-hooks nil 406(define-obsolete-variable-alias 'filesets-cache-fill-content-hooks
407 "Hooks to run when writing the contents of filesets' cache file. 407 'filesets-cache-fill-content-hook "24.3")
408(defcustom filesets-cache-fill-content-hook nil
409 "Hook run when writing the contents of filesets' cache file.
408 410
409The hook is called with the cache file as current buffer and the cursor 411The hook is called with the cache file as current buffer and the cursor
410at the last position. I.e. each hook has to make sure that the cursor is 412at 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."
2414 (when filesets-cache-hostname-flag 2416 (when filesets-cache-hostname-flag
2415 (insert (format "(setq filesets-cache-hostname %S)" (system-name))) 2417 (insert (format "(setq filesets-cache-hostname %S)" (system-name)))
2416 (newline 2)) 2418 (newline 2))
2417 (run-hooks 'filesets-cache-fill-content-hooks) 2419 (run-hooks 'filesets-cache-fill-content-hook)
2418 (write-file filesets-menu-cache-file)) 2420 (write-file filesets-menu-cache-file))
2419 (setq filesets-has-changed-flag nil) 2421 (setq filesets-has-changed-flag nil)
2420 (setq filesets-update-cache-file-flag nil))) 2422 (setq filesets-update-cache-file-flag nil)))
diff --git a/lisp/frame.el b/lisp/frame.el
index b7b61bcc576..7a54efc23e7 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -655,6 +655,8 @@ the new frame according to its own rules."
655 (error "Don't know how to create a frame on window system %s" w)) 655 (error "Don't know how to create a frame on window system %s" w))
656 656
657 (unless (get w 'window-system-initialized) 657 (unless (get w 'window-system-initialized)
658 (unless x-display-name
659 (setq x-display-name display))
658 (funcall (cdr (assq w window-system-initialization-alist))) 660 (funcall (cdr (assq w window-system-initialization-alist)))
659 (put w 'window-system-initialized t)) 661 (put w 'window-system-initialized t))
660 662
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index dade2b4bbe5..8cb53de85fa 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,11 @@
12012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * nndiary.el (nndiary-request-create-group-functions)
4 (nndiary-request-update-info-functions)
5 (nndiary-request-accept-article-functions):
6 * gnus-start.el (gnus-subscribe-newsgroup-functions): Don't use
7 "-hooks" suffix.
8
12012-10-17 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change) 92012-10-17 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
2 10
3 * starttls.el (starttls-extra-arguments): Doc fix. 11 * starttls.el (starttls-extra-arguments): Doc fix.
@@ -110,7 +118,7 @@
110 118
1112012-09-05 Martin Stjernholm <mast@lysator.liu.se> 1192012-09-05 Martin Stjernholm <mast@lysator.liu.se>
112 120
113 * gnus-demon.el (gnus-demon-init): Fixed regression when IDLE is t and 121 * gnus-demon.el (gnus-demon-init): Fix regression when IDLE is t and
114 TIME is set. 122 TIME is set.
115 123
1162012-09-05 Juri Linkov <juri@jurta.org> 1242012-09-05 Juri Linkov <juri@jurta.org>
@@ -571,7 +579,7 @@
571 * gnus.el: Register gnus-registry functions. 579 * gnus.el: Register gnus-registry functions.
572 580
573 * gnus-registry.el (gnus-try-warping-via-registry): 581 * gnus-registry.el (gnus-try-warping-via-registry):
574 Moved here and indent. 582 Move here and indent.
575 583
576 * gnus-int.el (gnus-warp-to-article): 584 * gnus-int.el (gnus-warp-to-article):
577 Check whether the registry is enabled before warping. 585 Check whether the registry is enabled before warping.
@@ -703,7 +711,7 @@
703 (message-multi-smtp-send-mail): Respect the X-Message-SMTP-Method 711 (message-multi-smtp-send-mail): Respect the X-Message-SMTP-Method
704 header to implement multi-SMTP functionality. 712 header to implement multi-SMTP functionality.
705 713
706 * gnus-agent.el (gnus-agent-send-mail-function): Removed. 714 * gnus-agent.el (gnus-agent-send-mail-function): Remove.
707 (gnus-agentize): Don't set it. 715 (gnus-agentize): Don't set it.
708 (gnus-agent-send-mail): Don't use it. 716 (gnus-agent-send-mail): Don't use it.
709 717
@@ -844,8 +852,8 @@
844 852
8452012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> 8532012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
846 854
847 * gnus-group.el (gnus-group-get-new-news): Respect 855 * gnus-group.el (gnus-group-get-new-news):
848 `gnus-group-use-permanent-levels', as documented (bug#11638). 856 Respect `gnus-group-use-permanent-levels', as documented (bug#11638).
849 857
8502012-06-10 Dave Abrahams <dave@boostpro.com> 8582012-06-10 Dave Abrahams <dave@boostpro.com>
851 859
@@ -985,7 +993,7 @@
985 (shr-insert): Allow the natural width to be computed for tables again. 993 (shr-insert): Allow the natural width to be computed for tables again.
986 (shr-tag-table-1): Rework how the natural widths are computed by 994 (shr-tag-table-1): Rework how the natural widths are computed by
987 rendering the table a third time. 995 rendering the table a third time.
988 (shr-natural-width): Removed. 996 (shr-natural-width): Remove.
989 (shr-buffer-width): New function. 997 (shr-buffer-width): New function.
990 (shr-expand-newlines): Use it. 998 (shr-expand-newlines): Use it.
991 999
@@ -1396,8 +1404,8 @@
1396 1404
13972012-01-04 Wolfgang Jenkner <wjenkner@inode.at> (tiny change) 14052012-01-04 Wolfgang Jenkner <wjenkner@inode.at> (tiny change)
1398 1406
1399 * gnus-agent.el (gnus-agent-load-local): Recompute 1407 * gnus-agent.el (gnus-agent-load-local):
1400 gnus-agent-article-local on changing method. 1408 Recompute gnus-agent-article-local on changing method.
1401 1409
14022012-01-04 Lars Magne Ingebrigtsen <larsi@gnus.org> 14102012-01-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
1403 1411
@@ -1689,8 +1697,8 @@
1689 1697
16902011-09-27 Daiki Ueno <ueno@unixuser.org> 16982011-09-27 Daiki Ueno <ueno@unixuser.org>
1691 1699
1692 * plstore.el (plstore-select-keys, plstore-encrypt-to): Clarify 1700 * plstore.el (plstore-select-keys, plstore-encrypt-to):
1693 documentation. 1701 Clarify documentation.
1694 1702
16952011-09-27 Lars Magne Ingebrigtsen <larsi@gnus.org> 17032011-09-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
1696 1704
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 40ee78bb695..eaf17d9e579 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -291,7 +291,9 @@ claim them."
291 function 291 function
292 (repeat function))) 292 (repeat function)))
293 293
294(defcustom gnus-subscribe-newsgroup-hooks nil 294(define-obsolete-variable-alias 'gnus-subscribe-newsgroup-hooks
295 'gnus-subscribe-newsgroup-functions "24.3")
296(defcustom gnus-subscribe-newsgroup-functions nil
295 "*Hooks run after you subscribe to a new group. 297 "*Hooks run after you subscribe to a new group.
296The hooks will be called with new group's name as argument." 298The hooks will be called with new group's name as argument."
297 :version "22.1" 299 :version "22.1"
@@ -639,7 +641,7 @@ the first newsgroup."
639 gnus-level-killed (gnus-group-entry (or next "dummy.group"))) 641 gnus-level-killed (gnus-group-entry (or next "dummy.group")))
640 (gnus-request-update-group-status newsgroup 'subscribe) 642 (gnus-request-update-group-status newsgroup 'subscribe)
641 (gnus-message 5 "Subscribe newsgroup: %s" newsgroup) 643 (gnus-message 5 "Subscribe newsgroup: %s" newsgroup)
642 (run-hook-with-args 'gnus-subscribe-newsgroup-hooks newsgroup) 644 (run-hook-with-args 'gnus-subscribe-newsgroup-functions newsgroup)
643 t)) 645 t))
644 646
645(defun gnus-read-active-file-p () 647(defun gnus-read-active-file-p ()
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el
index 8752972c3c8..73dd2921b68 100644
--- a/lisp/gnus/nndiary.el
+++ b/lisp/gnus/nndiary.el
@@ -179,22 +179,28 @@ In order to make this clear, here are some examples:
179 :group 'nndiary) 179 :group 'nndiary)
180 180
181 181
182(defcustom nndiary-request-create-group-hooks nil 182(define-obsolete-variable-alias 'nndiary-request-create-group-hooks
183 "*Hooks to run after `nndiary-request-create-group' is executed. 183 'nndiary-request-create-group-functions "24.3")
184The hooks will be called with the full group name as argument." 184(defcustom nndiary-request-create-group-functions nil
185 "*Hook run after `nndiary-request-create-group' is executed.
186The hook functions will be called with the full group name as argument."
185 :group 'nndiary 187 :group 'nndiary
186 :type 'hook) 188 :type 'hook)
187 189
188(defcustom nndiary-request-update-info-hooks nil 190(define-obsolete-variable-alias 'nndiary-request-update-info-hooks
189 "*Hooks to run after `nndiary-request-update-info-group' is executed. 191 'nndiary-request-update-info-functions "24.3")
190The hooks will be called with the full group name as argument." 192(defcustom nndiary-request-update-info-functions nil
193 "*Hook run after `nndiary-request-update-info-group' is executed.
194The hook functions will be called with the full group name as argument."
191 :group 'nndiary 195 :group 'nndiary
192 :type 'hook) 196 :type 'hook)
193 197
194(defcustom nndiary-request-accept-article-hooks nil 198(define-obsolete-variable-alias 'nndiary-request-accept-article-hooks
195 "*Hooks to run before accepting an article. 199 'nndiary-request-accept-article-functions "24.3")
200(defcustom nndiary-request-accept-article-functions nil
201 "*Hook run before accepting an article.
196Executed near the beginning of `nndiary-request-accept-article'. 202Executed near the beginning of `nndiary-request-accept-article'.
197The hooks will be called with the article in the current buffer." 203The hook functions will be called with the article in the current buffer."
198 :group 'nndiary 204 :group 'nndiary
199 :type 'hook) 205 :type 'hook)
200 206
@@ -541,7 +547,7 @@ all. This may very well take some time.")
541 (setcar active (apply 'min articles)) 547 (setcar active (apply 'min articles))
542 (setcdr active (apply 'max articles)))) 548 (setcdr active (apply 'max articles))))
543 (nnmail-save-active nndiary-group-alist nndiary-active-file) 549 (nnmail-save-active nndiary-group-alist nndiary-active-file)
544 (run-hook-with-args 'nndiary-request-create-group-hooks 550 (run-hook-with-args 'nndiary-request-create-group-functions
545 (gnus-group-prefixed-name group 551 (gnus-group-prefixed-name group
546 (list "nndiary" server))) 552 (list "nndiary" server)))
547 t)) 553 t))
@@ -633,7 +639,7 @@ all. This may very well take some time.")
633(deffoo nndiary-request-accept-article (group &optional server last) 639(deffoo nndiary-request-accept-article (group &optional server last)
634 (nndiary-possibly-change-directory group server) 640 (nndiary-possibly-change-directory group server)
635 (nnmail-check-syntax) 641 (nnmail-check-syntax)
636 (run-hooks 'nndiary-request-accept-article-hooks) 642 (run-hooks 'nndiary-request-accept-article-functions)
637 (when (nndiary-schedule) 643 (when (nndiary-schedule)
638 (let (result) 644 (let (result)
639 (when nnmail-cache-accepted-message-ids 645 (when nnmail-cache-accepted-message-ids
@@ -804,7 +810,7 @@ all. This may very well take some time.")
804 (gnus-info-set-read info (gnus-update-read-articles 810 (gnus-info-set-read info (gnus-update-read-articles
805 (gnus-info-group info) unread t))) 811 (gnus-info-group info) unread t)))
806 )) 812 ))
807 (run-hook-with-args 'nndiary-request-update-info-hooks 813 (run-hook-with-args 'nndiary-request-update-info-functions
808 (gnus-info-group info)) 814 (gnus-info-group info))
809 t)) 815 t))
810 816
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index b0bc5b6b3b3..a1853a6e04b 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -249,7 +249,8 @@ when not running under a window system."
249 :tag "init-kludge-hooks" 249 :tag "init-kludge-hooks"
250 :type '(hook)) 250 :type '(hook))
251 251
252(defcustom hfy-post-html-hooks nil 252(define-obsolete-variable-alias 'hfy-post-html-hooks 'hfy-post-html-hook "24.3")
253(defcustom hfy-post-html-hook nil
253 "List of functions to call after creating and filling the HTML buffer. 254 "List of functions to call after creating and filling the HTML buffer.
254These functions will be called with the HTML buffer as the current buffer." 255These functions will be called with the HTML buffer as the current buffer."
255 :group 'htmlfontify 256 :group 'htmlfontify
@@ -1786,7 +1787,7 @@ FILE, if set, is the file name."
1786 ;;(message "inserting footer") 1787 ;;(message "inserting footer")
1787 (insert (funcall hfy-page-footer file))) 1788 (insert (funcall hfy-page-footer file)))
1788 ;; call any post html-generation hooks: 1789 ;; call any post html-generation hooks:
1789 (run-hooks 'hfy-post-html-hooks) 1790 (run-hooks 'hfy-post-html-hook)
1790 ;; return the html buffer 1791 ;; return the html buffer
1791 (set-buffer-modified-p nil) 1792 (set-buffer-modified-p nil)
1792 html-buffer)) 1793 html-buffer))
diff --git a/lisp/image.el b/lisp/image.el
index 72dc654757a..aef44fc3701 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -308,8 +308,17 @@ be determined."
308 "Determine the type of image file FILE from its name. 308 "Determine the type of image file FILE from its name.
309Value is a symbol specifying the image type, or nil if type cannot 309Value is a symbol specifying the image type, or nil if type cannot
310be determined." 310be determined."
311 (assoc-default file image-type-file-name-regexps 'string-match-p)) 311 (let (type first)
312 312 (or
313 (catch 'found
314 (dolist (elem image-type-file-name-regexps)
315 (when (string-match-p (car elem) file)
316 (setq type (cdr elem))
317 (or first (setq first type))
318 (if (image-type-available-p type)
319 (throw 'found type)))))
320 ;; If nothing seems to be supported, return the first type that matched.
321 first)))
313 322
314;;;###autoload 323;;;###autoload
315(defun image-type (source &optional type data-p) 324(defun image-type (source &optional type data-p)
@@ -798,7 +807,7 @@ to enable all types that ImageMagick supports.
798 807
799The variable `imagemagick-types-inhibit' overrides this variable. 808The variable `imagemagick-types-inhibit' overrides this variable.
800 809
801If you change this without outside of Customize, you must call 810If you change this without using customize, you must call
802`imagemagick-register-types' afterwards. 811`imagemagick-register-types' afterwards.
803 812
804If Emacs is compiled without ImageMagick support, this variable 813If Emacs is compiled without ImageMagick support, this variable
diff --git a/lisp/loadup.el b/lisp/loadup.el
index e0f5c6265b9..e5f2cb014d3 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -38,7 +38,8 @@
38;; doc strings in the dumped Emacs.) Because of this: 38;; doc strings in the dumped Emacs.) Because of this:
39 39
40;; ii) If the file is loaded uncompiled, it should (where possible) 40;; ii) If the file is loaded uncompiled, it should (where possible)
41;; obey the doc-string conventions expected by make-docfile. 41;; obey the doc-string conventions expected by make-docfile. It
42;; should also be added to the uncompiled[] list in make-docfile.c.
42 43
43;;; Code: 44;;; Code:
44 45
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 331754fb1b5..afa13fe4e04 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -243,15 +243,14 @@ Used by `mail-yank-original' via `mail-indent-citation'."
243 :type 'integer 243 :type 'integer
244 :group 'sendmail) 244 :group 'sendmail)
245 245
246;; FIXME make it really obsolete.
247(defvar mail-yank-hooks nil 246(defvar mail-yank-hooks nil
248 "Obsolete hook for modifying a citation just inserted in the mail buffer. 247 "Obsolete hook for modifying a citation just inserted in the mail buffer.
249Each hook function can find the citation between (point) and (mark t). 248Each hook function can find the citation between (point) and (mark t).
250And each hook function should leave point and mark around the citation 249And each hook function should leave point and mark around the citation
251text as modified. 250text as modified.
252
253This is a normal hook, misnamed for historical reasons. 251This is a normal hook, misnamed for historical reasons.
254It is semi-obsolete and mail agents should no longer use it.") 252It is obsolete and mail agents should no longer use it.")
253(make-obsolete-variable 'mail-yank-hooks 'mail-citation-hook "19.34")
255 254
256;;;###autoload 255;;;###autoload
257(defcustom mail-citation-hook nil 256(defcustom mail-citation-hook nil
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index 6eedef1980e..adc8707f011 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,7 @@
12012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * mh-letter.el (mh-yank-hooks): Use make-obsolete-variable.
4
12012-04-25 Stefan Monnier <monnier@iro.umontreal.ca> 52012-04-25 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * mh-utils.el (minibuffer-completing-file-name): Don't declare, unused. 7 * mh-utils.el (minibuffer-completing-file-name): Don't declare, unused.
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 2723fb5e684..705c92b0b4c 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -3189,7 +3189,9 @@ function used to insert the signature with
3189 :group 'mh-letter 3189 :group 'mh-letter
3190 :package-version '(MH-E . "8.0")) 3190 :package-version '(MH-E . "8.0"))
3191 3191
3192(defcustom-mh mh-kill-folder-suppress-prompt-hooks '(mh-search-p) 3192(define-obsolete-variable-alias 'mh-kill-folder-suppress-prompt-hooks
3193 'mh-kill-folder-suppress-prompt-functions "24.3")
3194(defcustom-mh mh-kill-folder-suppress-prompt-functions '(mh-search-p)
3193 "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder]. 3195 "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder].
3194 3196
3195The hook functions are called with no arguments and should return 3197The hook functions are called with no arguments and should return
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index 8aed1873348..490bfc07560 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -66,8 +66,9 @@ Each hook function can find the citation between point and mark.
66And each hook function should leave point and mark around the 66And each hook function should leave point and mark around the
67citation text as modified. 67citation text as modified.
68 68
69This is a normal hook, misnamed for historical reasons. It is 69This is a normal hook, misnamed for historical reasons.
70semi-obsolete and is only used if `mail-citation-hook' is nil.") 70It is obsolete and is only used if `mail-citation-hook' is nil.")
71(make-obsolete-variable 'mh-yank-hooks 'mail-citation-hook "19.34")
71 72
72 73
73 74
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index f464b42182d..f865a0269d4 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1134,7 +1134,23 @@ Repeated uses step through the possible completions."
1134 ;; through the previous possible completions. 1134 ;; through the previous possible completions.
1135 (let ((last (last all))) 1135 (let ((last (last all)))
1136 (setcdr last (cons (car all) (cdr last))) 1136 (setcdr last (cons (car all) (cdr last)))
1137 (completion--cache-all-sorted-completions (cdr all))))))) 1137 (completion--cache-all-sorted-completions (cdr all)))
1138 ;; Make sure repeated uses cycle, even though completion--done might
1139 ;; have added a space or something that moved us outside of the field.
1140 ;; (bug#12221).
1141 (let* ((table minibuffer-completion-table)
1142 (pred minibuffer-completion-predicate)
1143 (extra-prop completion-extra-properties)
1144 (cmd
1145 (lambda () "Cycle through the possible completions."
1146 (interactive)
1147 (let ((completion-extra-properties extra-prop))
1148 (completion-in-region start (point) table pred)))))
1149 (set-temporary-overlay-map
1150 (let ((map (make-sparse-keymap)))
1151 (define-key map [remap completion-at-point] cmd)
1152 (define-key map (vector last-command-event) cmd)
1153 map)))))))
1138 1154
1139(defvar minibuffer-confirm-exit-commands 1155(defvar minibuffer-confirm-exit-commands
1140 '(completion-at-point minibuffer-complete 1156 '(completion-at-point minibuffer-complete
@@ -1557,7 +1573,6 @@ variables.")
1557 (let* ((exit-fun (plist-get completion-extra-properties :exit-function)) 1573 (let* ((exit-fun (plist-get completion-extra-properties :exit-function))
1558 (pre-msg (and exit-fun (current-message)))) 1574 (pre-msg (and exit-fun (current-message))))
1559 (cl-assert (memq finished '(exact sole finished unknown))) 1575 (cl-assert (memq finished '(exact sole finished unknown)))
1560 ;; FIXME: exit-fun should receive `finished' as a parameter.
1561 (when exit-fun 1576 (when exit-fun
1562 (when (eq finished 'unknown) 1577 (when (eq finished 'unknown)
1563 (setq finished 1578 (setq finished
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 772a0a9c626..c95e901c39d 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -152,7 +152,9 @@ Otherwise, return result of last form in BODY, or all other errors."
152 (dbus-error (when dbus-debug (signal (car err) (cdr err)))))) 152 (dbus-error (when dbus-debug (signal (car err) (cdr err))))))
153(font-lock-add-keywords 'emacs-lisp-mode '("\\<dbus-ignore-errors\\>")) 153(font-lock-add-keywords 'emacs-lisp-mode '("\\<dbus-ignore-errors\\>"))
154 154
155(defvar dbus-event-error-hooks nil 155(define-obsolete-variable-alias 'dbus-event-error-hooks
156 'dbus-event-error-functions "24.3")
157(defvar dbus-event-error-functions nil
156 "Functions to be called when a D-Bus error happens in the event handler. 158 "Functions to be called when a D-Bus error happens in the event handler.
157Every function must accept two arguments, the event and the error variable 159Every function must accept two arguments, the event and the error variable
158caught in `condition-case' by `dbus-error'.") 160caught in `condition-case' by `dbus-error'.")
@@ -947,7 +949,7 @@ If the HANDLER returns a `dbus-error', it is propagated as return message."
947 (dbus-method-error-internal 949 (dbus-method-error-internal
948 (nth 1 event) (nth 4 event) (nth 3 event) (cadr err)))) 950 (nth 1 event) (nth 4 event) (nth 3 event) (cadr err))))
949 ;; Propagate D-Bus error messages. 951 ;; Propagate D-Bus error messages.
950 (run-hook-with-args 'dbus-event-error-hooks event err) 952 (run-hook-with-args 'dbus-event-error-functions event err)
951 (when (or dbus-debug (= dbus-message-type-error (nth 2 event))) 953 (when (or dbus-debug (= dbus-message-type-error (nth 2 event)))
952 (signal (car err) (cdr err)))))) 954 (signal (car err) (cdr err))))))
953 955
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index dd345630b9b..e9828c5f813 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -300,7 +300,9 @@ See `rcirc-dim-nick' face."
300 :type '(repeat string) 300 :type '(repeat string)
301 :group 'rcirc) 301 :group 'rcirc)
302 302
303(defcustom rcirc-print-hooks nil 303(define-obsolete-variable-alias 'rcirc-print-hooks
304 'rcirc-print-functions "24.3")
305(defcustom rcirc-print-functions nil
304 "Hook run after text is printed. 306 "Hook run after text is printed.
305Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT." 307Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT."
306 :type 'hook 308 :type 'hook
@@ -647,7 +649,9 @@ is non-nil."
647 "] " 649 "] "
648 text))))) 650 text)))))
649 651
650(defvar rcirc-sentinel-hooks nil 652(define-obsolete-variable-alias 'rcirc-sentinel-hooks
653 'rcirc-sentinel-functions "24.3")
654(defvar rcirc-sentinel-functions nil
651 "Hook functions called when the process sentinel is called. 655 "Hook functions called when the process sentinel is called.
652Functions are called with PROCESS and SENTINEL arguments.") 656Functions are called with PROCESS and SENTINEL arguments.")
653 657
@@ -664,7 +668,7 @@ Functions are called with PROCESS and SENTINEL arguments.")
664 sentinel 668 sentinel
665 (process-status process)) (not rcirc-target)) 669 (process-status process)) (not rcirc-target))
666 (rcirc-disconnect-buffer))) 670 (rcirc-disconnect-buffer)))
667 (run-hook-with-args 'rcirc-sentinel-hooks process sentinel)))) 671 (run-hook-with-args 'rcirc-sentinel-functions process sentinel))))
668 672
669(defun rcirc-disconnect-buffer (&optional buffer) 673(defun rcirc-disconnect-buffer (&optional buffer)
670 (with-current-buffer (or buffer (current-buffer)) 674 (with-current-buffer (or buffer (current-buffer))
@@ -684,7 +688,9 @@ Functions are called with PROCESS and SENTINEL arguments.")
684 (process-list)) 688 (process-list))
685 ps)) 689 ps))
686 690
687(defvar rcirc-receive-message-hooks nil 691(define-obsolete-variable-alias 'rcirc-receive-message-hooks
692 'rcirc-receive-message-functions "24.3")
693(defvar rcirc-receive-message-functions nil
688 "Hook functions run when a message is received from server. 694 "Hook functions run when a message is received from server.
689Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.") 695Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
690(defun rcirc-filter (process output) 696(defun rcirc-filter (process output)
@@ -738,7 +744,7 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
738 (if (not (fboundp handler)) 744 (if (not (fboundp handler))
739 (rcirc-handler-generic process cmd sender args text) 745 (rcirc-handler-generic process cmd sender args text)
740 (funcall handler process sender args text)) 746 (funcall handler process sender args text))
741 (run-hook-with-args 'rcirc-receive-message-hooks 747 (run-hook-with-args 'rcirc-receive-message-functions
742 process cmd sender args text))) 748 process cmd sender args text)))
743 (message "UNHANDLED: %s" text))) 749 (message "UNHANDLED: %s" text)))
744 750
@@ -1625,7 +1631,7 @@ record activity."
1625 (rcirc-log process sender response target text)) 1631 (rcirc-log process sender response target text))
1626 1632
1627 (sit-for 0) ; displayed text before hook 1633 (sit-for 0) ; displayed text before hook
1628 (run-hook-with-args 'rcirc-print-hooks 1634 (run-hook-with-args 'rcirc-print-functions
1629 process sender response target text))))) 1635 process sender response target text)))))
1630 1636
1631(defun rcirc-generate-log-filename (process target) 1637(defun rcirc-generate-log-filename (process target)
@@ -1927,7 +1933,9 @@ With prefix ARG, go to the next low priority buffer with activity."
1927 (key-description (this-command-keys)) 1933 (key-description (this-command-keys))
1928 " for low priority activity.")))))))) 1934 " for low priority activity."))))))))
1929 1935
1930(defvar rcirc-activity-hooks nil 1936(define-obsolete-variable-alias 'rcirc-activity-hooks
1937 'rcirc-activity-functions "24.3")
1938(defvar rcirc-activity-functions nil
1931 "Hook to be run when there is channel activity. 1939 "Hook to be run when there is channel activity.
1932 1940
1933Functions are called with a single argument, the buffer with the 1941Functions are called with a single argument, the buffer with the
@@ -1950,7 +1958,7 @@ activity. Only run if the buffer is not visible and
1950 (unless (and (equal rcirc-activity old-activity) 1958 (unless (and (equal rcirc-activity old-activity)
1951 (member type old-types)) 1959 (member type old-types))
1952 (rcirc-update-activity-string))))) 1960 (rcirc-update-activity-string)))))
1953 (run-hook-with-args 'rcirc-activity-hooks buffer)) 1961 (run-hook-with-args 'rcirc-activity-functions buffer))
1954 1962
1955(defun rcirc-clear-activity (buffer) 1963(defun rcirc-clear-activity (buffer)
1956 "Clear the BUFFER activity." 1964 "Clear the BUFFER activity."
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 567f8f2969a..f52129919cc 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1677,11 +1677,11 @@ If ARGUMENT is non-nil, use it as argument for
1677 (tramp-set-connection-property 1677 (tramp-set-connection-property
1678 vec "smbserver-version" smbserver-version)))) 1678 vec "smbserver-version" smbserver-version))))
1679 1679
1680 ;; Set chunksize. Otherwise, `tramp-send-string' might 1680 ;; Set chunksize to 1. smbclient reads its input
1681 ;; try it itself. 1681 ;; character by character; if we send the string
1682 ;; at once, it is read painfully slow.
1682 (tramp-set-connection-property p "smb-share" share) 1683 (tramp-set-connection-property p "smb-share" share)
1683 (tramp-set-connection-property 1684 (tramp-set-connection-property p "chunksize" 1))
1684 p "chunksize" tramp-chunksize))
1685 1685
1686 ;; Check for the error reason. If it was due to wrong 1686 ;; Check for the error reason. If it was due to wrong
1687 ;; password, reestablish the connection. We cannot 1687 ;; password, reestablish the connection. We cannot
@@ -1717,7 +1717,7 @@ Returns nil if an error message has appeared."
1717 (while (and (not found) (not err) (memq (process-status p) '(run open))) 1717 (while (and (not found) (not err) (memq (process-status p) '(run open)))
1718 1718
1719 ;; Accept pending output. 1719 ;; Accept pending output.
1720 (tramp-accept-process-output p) 1720 (tramp-accept-process-output p 0.1)
1721 1721
1722 ;; Search for prompt. 1722 ;; Search for prompt.
1723 (goto-char (point-min)) 1723 (goto-char (point-min))
@@ -1731,7 +1731,7 @@ Returns nil if an error message has appeared."
1731 (while (and (not found) (memq (process-status p) '(run open))) 1731 (while (and (not found) (memq (process-status p) '(run open)))
1732 1732
1733 ;; Accept pending output. 1733 ;; Accept pending output.
1734 (tramp-accept-process-output p) 1734 (tramp-accept-process-output p 0.1)
1735 1735
1736 ;; Search for prompt. 1736 ;; Search for prompt.
1737 (goto-char (point-min)) 1737 (goto-char (point-min))
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index a754c89c4ae..2ddfb2439af 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -24,7 +24,13 @@
24 24
25;;; Commentary: 25;;; Commentary:
26 26
27;; A replacement for simple.el's comment-related functions. 27;; This library contains functions and variables for commenting and
28;; uncommenting source code.
29
30;; Prior to calling any `comment-*' function, you should ensure that
31;; `comment-normalize-vars' is first called to set up the appropriate
32;; variables; except for the `comment-*' commands, which call
33;; `comment-normalize-vars' automatically as a subroutine.
28 34
29;;; Bugs: 35;;; Bugs:
30 36
@@ -326,10 +332,11 @@ terminated by the end of line (i.e. `comment-end' is empty)."
326 332
327;;;###autoload 333;;;###autoload
328(defun comment-normalize-vars (&optional noerror) 334(defun comment-normalize-vars (&optional noerror)
329 "Check and setup the variables needed by other commenting functions. 335 "Check and set up variables needed by other commenting functions.
330Any command calling functions from newcomment.el should call this function 336All the `comment-*' commands call this function to set up various
331before any other, so the rest of the code can assume that the variables are 337variables, like `comment-start', to ensure that the commenting
332properly set." 338functions work correctly. Lisp callers of any other `comment-*'
339function should first call this function explicitly."
333 (unless (and (not comment-start) noerror) 340 (unless (and (not comment-start) noerror)
334 (unless comment-start 341 (unless comment-start
335 (let ((cs (read-string "No comment syntax is defined. Use: "))) 342 (let ((cs (read-string "No comment syntax is defined. Use: ")))
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 2a000957589..50eaebe4dec 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1703,7 +1703,9 @@ Key bindings:
1703 (message "Using CC Mode version %s" c-version) 1703 (message "Using CC Mode version %s" c-version)
1704 (c-keep-region-active)) 1704 (c-keep-region-active))
1705 1705
1706(defvar c-prepare-bug-report-hooks nil) 1706(define-obsolete-variable-alias 'c-prepare-bug-report-hooks
1707 'c-prepare-bug-report-hook "24.3")
1708(defvar c-prepare-bug-report-hook nil)
1707 1709
1708;; Dynamic variables used by reporter. 1710;; Dynamic variables used by reporter.
1709(defvar reporter-prompt-for-summary-p) 1711(defvar reporter-prompt-for-summary-p)
@@ -1770,7 +1772,7 @@ Key bindings:
1770 lookup-syntax-properties)) 1772 lookup-syntax-properties))
1771 vars) 1773 vars)
1772 (lambda () 1774 (lambda ()
1773 (run-hooks 'c-prepare-bug-report-hooks) 1775 (run-hooks 'c-prepare-bug-report-hook)
1774 (insert (format "Buffer Style: %s\nc-emacs-features: %s\n" 1776 (insert (format "Buffer Style: %s\nc-emacs-features: %s\n"
1775 style c-features))))))) 1777 style c-features)))))))
1776 1778
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 26d4a399c2d..2614af9ffa4 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1535,10 +1535,11 @@ if ARG is omitted or nil."
1535 (error "Invalid file-name")) 1535 (error "Invalid file-name"))
1536 (or prefix 1536 (or prefix
1537 (setq prefix "flymake")) 1537 (setq prefix "flymake"))
1538 (let* ((temp-name (concat (file-name-sans-extension file-name) 1538 (let* ((ext (file-name-extension file-name))
1539 "_" prefix 1539 (temp-name (file-truename
1540 (and (file-name-extension file-name) 1540 (concat (file-name-sans-extension file-name)
1541 (concat "." (file-name-extension file-name)))))) 1541 "_" prefix
1542 (and ext (concat "." ext))))))
1542 (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name) 1543 (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name)
1543 temp-name)) 1544 temp-name))
1544 1545
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index 4819149bdf6..c2ce12b6ad4 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -182,7 +182,8 @@ and you want to simplify them for the mode line
182(defconst which-func-current 182(defconst which-func-current
183 '(:eval (replace-regexp-in-string 183 '(:eval (replace-regexp-in-string
184 "%" "%%" 184 "%" "%%"
185 (gethash (selected-window) which-func-table which-func-unknown)))) 185 (or (gethash (selected-window) which-func-table)
186 which-func-unknown))))
186;;;###autoload (put 'which-func-current 'risky-local-variable t) 187;;;###autoload (put 'which-func-current 'risky-local-variable t)
187 188
188(defvar which-func-mode nil 189(defvar which-func-mode nil
diff --git a/lisp/startup.el b/lisp/startup.el
index bd75abe5b35..56281a6b164 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -971,7 +971,6 @@ Amongst another things, it parses the command-line arguments."
971 (not (eq 0 (cdr tool-bar-lines))))))) 971 (not (eq 0 (cdr tool-bar-lines)))))))
972 972
973 (let ((old-scalable-fonts-allowed scalable-fonts-allowed) 973 (let ((old-scalable-fonts-allowed scalable-fonts-allowed)
974 (old-font-list-limit font-list-limit)
975 (old-face-ignored-fonts face-ignored-fonts)) 974 (old-face-ignored-fonts face-ignored-fonts))
976 975
977 ;; Run the site-start library if it exists. The point of this file is 976 ;; 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."
1162 ;; face realization, clear the face cache so that new faces will 1161 ;; face realization, clear the face cache so that new faces will
1163 ;; be realized. 1162 ;; be realized.
1164 (unless (and (eq scalable-fonts-allowed old-scalable-fonts-allowed) 1163 (unless (and (eq scalable-fonts-allowed old-scalable-fonts-allowed)
1165 (eq font-list-limit old-font-list-limit)
1166 (eq face-ignored-fonts old-face-ignored-fonts)) 1164 (eq face-ignored-fonts old-face-ignored-fonts))
1167 (clear-face-cache))) 1165 (clear-face-cache)))
1168 1166
diff --git a/lisp/subr.el b/lisp/subr.el
index ec2d16e6529..94012fc47de 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1260,12 +1260,10 @@ is converted into a string by expressing it in decimal."
1260(define-obsolete-variable-alias 'executing-macro 'executing-kbd-macro 1260(define-obsolete-variable-alias 'executing-macro 'executing-kbd-macro
1261 "before 19.34") 1261 "before 19.34")
1262 1262
1263(defvaralias 'x-lost-selection-hooks 'x-lost-selection-functions) 1263(define-obsolete-variable-alias 'x-lost-selection-hooks
1264(make-obsolete-variable 'x-lost-selection-hooks 1264 'x-lost-selection-functions "22.1")
1265 'x-lost-selection-functions "22.1") 1265(define-obsolete-variable-alias 'x-sent-selection-hooks
1266(defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions) 1266 'x-sent-selection-functions "22.1")
1267(make-obsolete-variable 'x-sent-selection-hooks
1268 'x-sent-selection-functions "22.1")
1269 1267
1270;; This was introduced in 21.4 for pre-unicode unification. That 1268;; This was introduced in 21.4 for pre-unicode unification. That
1271;; usage was rendered obsolete in 23.1 which uses Unicode internally. 1269;; usage was rendered obsolete in 23.1 which uses Unicode internally.
@@ -3151,7 +3149,7 @@ in which case `save-window-excursion' cannot help."
3151 (unwind-protect (progn ,@body) 3149 (unwind-protect (progn ,@body)
3152 (set-window-configuration ,c))))) 3150 (set-window-configuration ,c)))))
3153 3151
3154(defun temp-output-buffer-show (buffer) 3152(defun internal-temp-output-buffer-show (buffer)
3155 "Internal function for `with-output-to-temp-buffer'." 3153 "Internal function for `with-output-to-temp-buffer'."
3156 (with-current-buffer buffer 3154 (with-current-buffer buffer
3157 (set-buffer-modified-p nil) 3155 (set-buffer-modified-p nil)
@@ -3235,7 +3233,7 @@ if it uses `temp-buffer-show-function'."
3235 (run-hooks 'temp-buffer-setup-hook))))) 3233 (run-hooks 'temp-buffer-setup-hook)))))
3236 (standard-output ,buf)) 3234 (standard-output ,buf))
3237 (prog1 (progn ,@body) 3235 (prog1 (progn ,@body)
3238 (temp-output-buffer-show ,buf))))) 3236 (internal-temp-output-buffer-show ,buf)))))
3239 3237
3240(defmacro with-temp-file (file &rest body) 3238(defmacro with-temp-file (file &rest body)
3241 "Create a new buffer, evaluate BODY there, and write the buffer to FILE. 3239 "Create a new buffer, evaluate BODY there, and write the buffer to FILE.
diff --git a/lisp/term/sun.el b/lisp/term/sun.el
index 4bd22c1d8da..dfe7a63ac1b 100644
--- a/lisp/term/sun.el
+++ b/lisp/term/sun.el
@@ -123,6 +123,7 @@
123 123
124(defvar sun-raw-prefix-hooks nil 124(defvar sun-raw-prefix-hooks nil
125 "List of forms to evaluate after setting sun-raw-prefix.") 125 "List of forms to evaluate after setting sun-raw-prefix.")
126(make-obsolete-variable 'sun-raw-prefix-hooks 'term-setup-hook "21.1")
126 127
127 128
128 129
diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el
index 9e6f5769c8f..5c471664fdc 100644
--- a/lisp/vc/ediff-mult.el
+++ b/lisp/vc/ediff-mult.el
@@ -217,8 +217,9 @@ This can be toggled with `ediff-toggle-filename-truncation'."
217 :type 'hook 217 :type 'hook
218 :group 'ediff-mult) 218 :group 'ediff-mult)
219 219
220(defcustom ediff-before-session-group-setup-hooks nil 220(defcustom ediff-before-session-group-setup-hooks
221 "Hooks to run before Ediff arranges the window for group-level operations. 221 nil ;FIXME: Bad name (should be -hook or -functions) and never run??
222 "Hook run before Ediff arranges the window for group-level operations.
222It is used by commands such as `ediff-directories'. 223It is used by commands such as `ediff-directories'.
223This hook can be used to save the previous window config, which can be restored 224This hook can be used to save the previous window config, which can be restored
224on `ediff-quit', `ediff-suspend', or `ediff-quit-session-group-hook'." 225on `ediff-quit', `ediff-suspend', or `ediff-quit-session-group-hook'."
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 2da721b41d8..a909aca5bca 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1584,21 +1584,21 @@ Return t if the buffer had changes, nil otherwise."
1584 (let ((vc-disable-async-diff (not async))) 1584 (let ((vc-disable-async-diff (not async)))
1585 (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer)) 1585 (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer))
1586 (set-buffer buffer) 1586 (set-buffer buffer)
1587 (diff-mode)
1588 (set (make-local-variable 'diff-vc-backend) (car vc-fileset))
1589 (set (make-local-variable 'revert-buffer-function)
1590 `(lambda (ignore-auto noconfirm)
1591 (vc-diff-internal ,async ',vc-fileset ,rev1 ,rev2 ,verbose)))
1592 ;; Make the *vc-diff* buffer read only, the diff-mode key
1593 ;; bindings are nicer for read only buffers. pcl-cvs does the
1594 ;; same thing.
1595 (setq buffer-read-only t)
1587 (if (and (zerop (buffer-size)) 1596 (if (and (zerop (buffer-size))
1588 (not (get-buffer-process (current-buffer)))) 1597 (not (get-buffer-process (current-buffer))))
1589 ;; Treat this case specially so as not to pop the buffer. 1598 ;; Treat this case specially so as not to pop the buffer.
1590 (progn 1599 (progn
1591 (message "%s" (cdr messages)) 1600 (message "%s" (cdr messages))
1592 nil) 1601 nil)
1593 (diff-mode)
1594 (set (make-local-variable 'diff-vc-backend) (car vc-fileset))
1595 (set (make-local-variable 'revert-buffer-function)
1596 `(lambda (ignore-auto noconfirm)
1597 (vc-diff-internal ,async ',vc-fileset ,rev1 ,rev2 ,verbose)))
1598 ;; Make the *vc-diff* buffer read only, the diff-mode key
1599 ;; bindings are nicer for read only buffers. pcl-cvs does the
1600 ;; same thing.
1601 (setq buffer-read-only t)
1602 ;; Display the buffer, but at the end because it can change point. 1602 ;; Display the buffer, but at the end because it can change point.
1603 (pop-to-buffer (current-buffer)) 1603 (pop-to-buffer (current-buffer))
1604 ;; The diff process may finish early, so call `vc-diff-finish' 1604 ;; The diff process may finish early, so call `vc-diff-finish'
diff --git a/lisp/window.el b/lisp/window.el
index a17e0adcdfe..fa7b08375ce 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5828,7 +5828,7 @@ buffer with the name BUFFER-OR-NAME and return that buffer."
5828 "If non-nil, `switch-to-buffer' tries to preserve `window-point'. 5828 "If non-nil, `switch-to-buffer' tries to preserve `window-point'.
5829If this is nil, `switch-to-buffer' displays the buffer at that 5829If this is nil, `switch-to-buffer' displays the buffer at that
5830buffer's `point'. If this is `already-displayed', it tries to 5830buffer's `point'. If this is `already-displayed', it tries to
5831display the buffer at its pevious position in the selected 5831display the buffer at its previous position in the selected
5832window, provided the buffer is currently displayed in some other 5832window, provided the buffer is currently displayed in some other
5833window on any visible or iconified frame. If this is t, it 5833window on any visible or iconified frame. If this is t, it
5834unconditionally tries to display the buffer at its previous 5834unconditionally tries to display the buffer at its previous
diff --git a/src/ChangeLog b/src/ChangeLog
index fbf22c35e4c..e59a286110d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -6,6 +6,49 @@
6 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist. 6 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
7 (font_open_for_lface): Handle Vface_font_rescale_alist. 7 (font_open_for_lface): Handle Vface_font_rescale_alist.
8 8
92012-10-23 Chong Yidong <cyd@gnu.org>
10
11 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
12
132012-10-21 Jan Djärv <jan.h.d@swipnet.se>
14
15 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
16 for screen font.
17 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
18
19 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
20 event (Bug#12681).
21
222012-10-21 Glenn Morris <rgm@gnu.org>
23
24 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
25
262012-10-20 Paul Eggert <eggert@cs.ucla.edu>
27
28 Port to OpenBSD 5.1.
29 * frame.c (Fmouse_position, Fmouse_pixel_position):
30 * xdisp.c (produce_stretch_glyph):
31 Declare local vars only when they're needed.
32 This is clearer and avoids a warning on OpenBSD about unused vars.
33 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
34 This is safer, and avoids OpenBSD warnings about unused vars.
35 * keyboard.c (record_menu_key): Remove unnecessary decl.
36 (poll_timer): Define only if POLL_FOR_INPUT is defined.
37 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
38 as our definition clashes with OpenBSD's.
39 * xfaces.c (load_face_colors, check_lface_attrs)
40 (get_lface_attributes_no_remap, get_lface_attributes)
41 (lface_fully_specified_p, x_supports_face_attributes_p)
42 (tty_supports_face_attributes_p, face_fontset, realize_face)
43 (realize_x_face, realize_tty_face):
44 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
45 merely Lisp_Object *. This is more informative and avoids
46 a warning on OpenBSD about accessing beyond an object's size.
47
482012-10-20 Chong Yidong <cyd@gnu.org>
49
50 * lread.c (Fload): Doc fix (Bug#12592).
51
92012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change) 522012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10 53
11 * font.c (Ffont_at): Fix previous change. 54 * font.c (Ffont_at): Fix previous change.
diff --git a/src/frame.c b/src/frame.c
index 017d051fc1d..6478ad1e06f 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1501,10 +1501,7 @@ and returns whatever that function returns. */)
1501{ 1501{
1502 FRAME_PTR f; 1502 FRAME_PTR f;
1503 Lisp_Object lispy_dummy; 1503 Lisp_Object lispy_dummy;
1504 enum scroll_bar_part party_dummy;
1505 Lisp_Object x, y, retval; 1504 Lisp_Object x, y, retval;
1506 int col, row;
1507 Time long_dummy;
1508 struct gcpro gcpro1; 1505 struct gcpro gcpro1;
1509 1506
1510 f = SELECTED_FRAME (); 1507 f = SELECTED_FRAME ();
@@ -1513,14 +1510,19 @@ and returns whatever that function returns. */)
1513#if defined (HAVE_MOUSE) || defined (HAVE_GPM) 1510#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
1514 /* It's okay for the hook to refrain from storing anything. */ 1511 /* It's okay for the hook to refrain from storing anything. */
1515 if (FRAME_TERMINAL (f)->mouse_position_hook) 1512 if (FRAME_TERMINAL (f)->mouse_position_hook)
1516 (*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1, 1513 {
1517 &lispy_dummy, &party_dummy, 1514 enum scroll_bar_part party_dummy;
1518 &x, &y, 1515 Time time_dummy;
1519 &long_dummy); 1516 (*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1,
1517 &lispy_dummy, &party_dummy,
1518 &x, &y,
1519 &time_dummy);
1520 }
1521
1520 if (! NILP (x)) 1522 if (! NILP (x))
1521 { 1523 {
1522 col = XINT (x); 1524 int col = XINT (x);
1523 row = XINT (y); 1525 int row = XINT (y);
1524 pixel_to_glyph_coords (f, col, row, &col, &row, NULL, 1); 1526 pixel_to_glyph_coords (f, col, row, &col, &row, NULL, 1);
1525 XSETINT (x, col); 1527 XSETINT (x, col);
1526 XSETINT (y, row); 1528 XSETINT (y, row);
@@ -1547,9 +1549,7 @@ and nil for X and Y. */)
1547{ 1549{
1548 FRAME_PTR f; 1550 FRAME_PTR f;
1549 Lisp_Object lispy_dummy; 1551 Lisp_Object lispy_dummy;
1550 enum scroll_bar_part party_dummy;
1551 Lisp_Object x, y; 1552 Lisp_Object x, y;
1552 Time long_dummy;
1553 1553
1554 f = SELECTED_FRAME (); 1554 f = SELECTED_FRAME ();
1555 x = y = Qnil; 1555 x = y = Qnil;
@@ -1557,10 +1557,15 @@ and nil for X and Y. */)
1557#if defined (HAVE_MOUSE) || defined (HAVE_GPM) 1557#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
1558 /* It's okay for the hook to refrain from storing anything. */ 1558 /* It's okay for the hook to refrain from storing anything. */
1559 if (FRAME_TERMINAL (f)->mouse_position_hook) 1559 if (FRAME_TERMINAL (f)->mouse_position_hook)
1560 (*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1, 1560 {
1561 &lispy_dummy, &party_dummy, 1561 enum scroll_bar_part party_dummy;
1562 &x, &y, 1562 Time time_dummy;
1563 &long_dummy); 1563 (*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1,
1564 &lispy_dummy, &party_dummy,
1565 &x, &y,
1566 &time_dummy);
1567 }
1568
1564#endif 1569#endif
1565 XSETFRAME (lispy_dummy, f); 1570 XSETFRAME (lispy_dummy, f);
1566 return Fcons (lispy_dummy, Fcons (x, y)); 1571 return Fcons (lispy_dummy, Fcons (x, y));
diff --git a/src/frame.h b/src/frame.h
index 7bf76c21c56..f8c3d99fedd 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -646,7 +646,7 @@ typedef struct frame *FRAME_PTR;
646#define FRAME_WINDOW_P(f) FRAME_NS_P(f) 646#define FRAME_WINDOW_P(f) FRAME_NS_P(f)
647#endif 647#endif
648#ifndef FRAME_WINDOW_P 648#ifndef FRAME_WINDOW_P
649#define FRAME_WINDOW_P(f) (0) 649#define FRAME_WINDOW_P(f) ((void) (f), 0)
650#endif 650#endif
651 651
652/* Return a pointer to the structure holding information about the 652/* Return a pointer to the structure holding information about the
diff --git a/src/keyboard.c b/src/keyboard.c
index d58178b7561..ab20ef71660 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -365,7 +365,6 @@ static Lisp_Object command_loop (void);
365static Lisp_Object Qextended_command_history; 365static Lisp_Object Qextended_command_history;
366EMACS_TIME timer_check (void); 366EMACS_TIME timer_check (void);
367 367
368static void record_menu_key (Lisp_Object c);
369static void echo_now (void); 368static void echo_now (void);
370static ptrdiff_t echo_length (void); 369static ptrdiff_t echo_length (void);
371 370
@@ -1963,12 +1962,12 @@ safe_run_hooks (Lisp_Object hook)
1963 1962
1964int poll_suppress_count; 1963int poll_suppress_count;
1965 1964
1966/* Asynchronous timer for polling. */
1967 1965
1968static struct atimer *poll_timer; 1966#ifdef POLL_FOR_INPUT
1969 1967
1968/* Asynchronous timer for polling. */
1970 1969
1971#ifdef POLL_FOR_INPUT 1970static struct atimer *poll_timer;
1972 1971
1973/* Poll for input, so that we catch a C-g if it comes in. This 1972/* Poll for input, so that we catch a C-g if it comes in. This
1974 function is called from x_make_frame_visible, see comment 1973 function is called from x_make_frame_visible, see comment
diff --git a/src/lisp.h b/src/lisp.h
index 01f6ca5e57c..4cf8fef0de3 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -222,7 +222,9 @@ enum enum_USE_LSB_TAG { USE_LSB_TAG = 0 };
222 222
223/* Define the fundamental Lisp data structures. */ 223/* Define the fundamental Lisp data structures. */
224 224
225/* This is the set of Lisp data types. */ 225/* This is the set of Lisp data types. If you want to define a new
226 data type, read the comments after Lisp_Fwd_Type definition
227 below. */
226 228
227/* Lisp integers use 2 tags, to give them one extra bit, thus 229/* Lisp integers use 2 tags, to give them one extra bit, thus
228 extending their range from, e.g., -2^28..2^28-1 to -2^29..2^29-1. */ 230 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
298 Lisp_Fwd_Kboard_Obj, /* Fwd to a Lisp_Object field of kboards. */ 300 Lisp_Fwd_Kboard_Obj, /* Fwd to a Lisp_Object field of kboards. */
299 }; 301 };
300 302
303/* If you want to define a new Lisp data type, here are some
304 instructions. See the thread at
305 http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00561.html
306 for more info.
307
308 First, there are already a couple of Lisp types that can be used if
309 your new type does not need to be exposed to Lisp programs nor
310 displayed to users. These are Lisp_Save_Value, a Lisp_Misc
311 subtype; and PVEC_OTHER, a kind of vectorlike object. The former
312 is suitable for temporarily stashing away pointers and integers in
313 a Lisp object (see the existing uses of make_save_value and
314 XSAVE_VALUE). The latter is useful for vector-like Lisp objects
315 that need to be used as part of other objects, but which are never
316 shown to users or Lisp code (search for PVEC_OTHER in xterm.c for
317 an example).
318
319 These two types don't look pretty when printed, so they are
320 unsuitable for Lisp objects that can be exposed to users.
321
322 To define a new data type, add one more Lisp_Misc subtype or one
323 more pseudovector subtype. Pseudovectors are more suitable for
324 objects with several slots that need to support fast random access,
325 while Lisp_Misc types are for everything else. A pseudovector object
326 provides one or more slots for Lisp objects, followed by struct
327 members that are accessible only from C. A Lisp_Misc object is a
328 wrapper for a C struct that can contain anything you like.
329
330 To add a new pseudovector type, extend the pvec_type enumeration;
331 to add a new Lisp_Misc, extend the Lisp_Misc_Type enumeration.
332
333 For a Lisp_Misc, you will also need to add your entry to union
334 Lisp_Misc (but make sure the first word has the same structure as
335 the others, starting with a 16-bit member of the Lisp_Misc_Type
336 enumeration and a 1-bit GC markbit) and make sure the overall size
337 of the union is not increased by your addition.
338
339 Then you will need to add switch branches in print.c (in
340 print_object, to print your object, and possibly also in
341 print_preprocess) and to alloc.c, to mark your object (in
342 mark_object) and to free it (in gc_sweep). The latter is also the
343 right place to call any code specific to your data type that needs
344 to run when the object is recycled -- e.g., free any additional
345 resources allocated for it that are not Lisp objects. You can even
346 make a pointer to the function that frees the resources a slot in
347 your object -- this way, the same object could be used to represent
348 several disparate C structures. */
349
301#ifdef CHECK_LISP_OBJECT_TYPE 350#ifdef CHECK_LISP_OBJECT_TYPE
302 351
303typedef struct { EMACS_INT i; } Lisp_Object; 352typedef struct { EMACS_INT i; } Lisp_Object;
diff --git a/src/lisp.mk b/src/lisp.mk
index 3d60e07dea3..1f459d4d5f1 100644
--- a/src/lisp.mk
+++ b/src/lisp.mk
@@ -35,7 +35,8 @@
35## no-byte-compile ones. 35## no-byte-compile ones.
36 36
37## Confusingly, term/internal is not in loadup, but is unconditionally 37## Confusingly, term/internal is not in loadup, but is unconditionally
38## loaded by pc-win, which is. 38## loaded by pc-win, which is. Ditto for international/cp51932 and
39## international/eucjp-ms, loaded from language/japanese.
39 40
40## Note that this list should not include lisp files which might not 41## Note that this list should not include lisp files which might not
41## be present, like site-load.el and site-init.el; this makefile 42## be present, like site-load.el and site-init.el; this makefile
@@ -94,6 +95,8 @@ lisp = \
94 $(lispsource)/language/greek.elc \ 95 $(lispsource)/language/greek.elc \
95 $(lispsource)/language/hebrew.elc \ 96 $(lispsource)/language/hebrew.elc \
96 $(lispsource)/language/japanese.elc \ 97 $(lispsource)/language/japanese.elc \
98 $(lispsource)/international/cp51932.el \
99 $(lispsource)/international/eucjp-ms.el \
97 $(lispsource)/language/korean.elc \ 100 $(lispsource)/language/korean.elc \
98 $(lispsource)/language/lao.elc \ 101 $(lispsource)/language/lao.elc \
99 $(lispsource)/language/tai-viet.elc \ 102 $(lispsource)/language/tai-viet.elc \
diff --git a/src/lread.c b/src/lread.c
index 6d4c0d990af..94744620279 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -996,18 +996,17 @@ If optional fifth arg MUST-SUFFIX is non-nil, insist on
996the suffix `.elc' or `.el'; don't accept just FILE unless 996the suffix `.elc' or `.el'; don't accept just FILE unless
997it ends in one of those suffixes or includes a directory name. 997it ends in one of those suffixes or includes a directory name.
998 998
999If this function fails to find a file, it may look for different 999If NOSUFFIX is nil, then if a file could not be found, try looking for
1000representations of that file before trying another file. 1000a different representation of the file by adding non-empty suffixes to
1001It does so by adding the non-empty suffixes in `load-file-rep-suffixes' 1001its name, before trying another file. Emacs uses this feature to find
1002to the file name. Emacs uses this feature mainly to find compressed 1002compressed versions of files when Auto Compression mode is enabled.
1003versions of files when Auto Compression mode is enabled. 1003If NOSUFFIX is non-nil, disable this feature.
1004 1004
1005The exact suffixes that this function tries out, in the exact order, 1005The suffixes that this function tries out, when NOSUFFIX is nil, are
1006are given by the value of the variable `load-file-rep-suffixes' if 1006given by the return value of `get-load-suffixes' and the values listed
1007NOSUFFIX is non-nil and by the return value of the function 1007in `load-file-rep-suffixes'. If MUST-SUFFIX is non-nil, only the
1008`get-load-suffixes' if MUST-SUFFIX is non-nil. If both NOSUFFIX and 1008return value of `get-load-suffixes' is used, i.e. the file name is
1009MUST-SUFFIX are nil, this function first tries out the latter suffixes 1009required to have a non-empty suffix.
1010and then the former.
1011 1010
1012Loading a file records its definitions, and its `provide' and 1011Loading a file records its definitions, and its `provide' and
1013`require' calls, in an element of `load-history' whose 1012`require' calls, in an element of `load-history' whose
diff --git a/src/nsfont.m b/src/nsfont.m
index 7c9f05aa0bb..4f29d1d54a9 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -797,7 +797,13 @@ nsfont_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size)
797 block_input (); 797 block_input ();
798 798
799 /* for metrics */ 799 /* for metrics */
800#ifdef NS_IMPL_COCOA
801 sfont = [nsfont screenFontWithRenderingMode:
802 NSFontAntialiasedIntegerAdvancementsRenderingMode];
803#else
800 sfont = [nsfont screenFont]; 804 sfont = [nsfont screenFont];
805#endif
806
801 if (sfont == nil) 807 if (sfont == nil)
802 sfont = nsfont; 808 sfont = nsfont;
803 809
@@ -1229,6 +1235,7 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
1229 else 1235 else
1230 CGContextSetShouldAntialias (gcontext, 1); 1236 CGContextSetShouldAntialias (gcontext, 1);
1231 1237
1238 CGContextSetShouldSmoothFonts (gcontext, NO);
1232 CGContextSetTextMatrix (gcontext, fliptf); 1239 CGContextSetTextMatrix (gcontext, fliptf);
1233 1240
1234 if (bgCol != nil) 1241 if (bgCol != nil)
@@ -1372,7 +1379,12 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block)
1372#endif 1379#endif
1373 1380
1374 block_input (); 1381 block_input ();
1375 sfont = [font_info->nsfont screenFont]; 1382#ifdef NS_IMPL_COCOA
1383 sfont = [font_info->nsfont screenFontWithRenderingMode:
1384 NSFontAntialiasedIntegerAdvancementsRenderingMode];
1385#else
1386 sfont = [font_info->nsfont screenFont];
1387#endif
1376 1388
1377 font_info->metrics[block] = xzalloc (0x100 * sizeof (struct font_metrics)); 1389 font_info->metrics[block] = xzalloc (0x100 * sizeof (struct font_metrics));
1378 if (!(font_info->metrics[block])) 1390 if (!(font_info->metrics[block]))
diff --git a/src/unexelf.c b/src/unexelf.c
index f35b53aeab3..121e6042fc9 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -507,10 +507,12 @@ typedef struct {
507 507
508#ifndef ElfW 508#ifndef ElfW
509# define ElfBitsW(bits, type) Elf##bits##_##type 509# define ElfBitsW(bits, type) Elf##bits##_##type
510# ifdef _LP64 510# ifndef ELFSIZE
511# define ELFSIZE 64 511# ifdef _LP64
512# else 512# define ELFSIZE 64
513# define ELFSIZE 32 513# else
514# define ELFSIZE 32
515# endif
514# endif 516# endif
515 /* This macro expands `bits' before invoking ElfBitsW. */ 517 /* This macro expands `bits' before invoking ElfBitsW. */
516# define ElfExpandBitsW(bits, type) ElfBitsW (bits, type) 518# define ElfExpandBitsW(bits, type) ElfBitsW (bits, type)
diff --git a/src/w32fns.c b/src/w32fns.c
index 8dd3eb83c60..28e8ea02e05 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -211,7 +211,7 @@ static void w32_show_hourglass (struct frame *);
211static void w32_hide_hourglass (void); 211static void w32_hide_hourglass (void);
212 212
213#ifdef WINDOWSNT 213#ifdef WINDOWSNT
214/* From w32inevet.c */ 214/* From w32inevt.c */
215extern int faked_key; 215extern int faked_key;
216#endif /* WINDOWSNT */ 216#endif /* WINDOWSNT */
217 217
@@ -7711,4 +7711,3 @@ emacs_abort (void)
7711 break; 7711 break;
7712 } 7712 }
7713} 7713}
7714
diff --git a/src/xdisp.c b/src/xdisp.c
index 6964719f958..b3b08edcd0a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -24076,17 +24076,16 @@ produce_stretch_glyph (struct it *it)
24076 Lisp_Object prop, plist; 24076 Lisp_Object prop, plist;
24077 int width = 0, height = 0, align_to = -1; 24077 int width = 0, height = 0, align_to = -1;
24078 int zero_width_ok_p = 0; 24078 int zero_width_ok_p = 0;
24079 int ascent = 0;
24080 double tem; 24079 double tem;
24081 struct face *face = NULL;
24082 struct font *font = NULL; 24080 struct font *font = NULL;
24083 24081
24084#ifdef HAVE_WINDOW_SYSTEM 24082#ifdef HAVE_WINDOW_SYSTEM
24083 int ascent = 0;
24085 int zero_height_ok_p = 0; 24084 int zero_height_ok_p = 0;
24086 24085
24087 if (FRAME_WINDOW_P (it->f)) 24086 if (FRAME_WINDOW_P (it->f))
24088 { 24087 {
24089 face = FACE_FROM_ID (it->f, it->face_id); 24088 struct face *face = FACE_FROM_ID (it->f, it->face_id);
24090 font = face->font ? face->font : FRAME_FONT (it->f); 24089 font = face->font ? face->font : FRAME_FONT (it->f);
24091 PREPARE_FACE_FOR_DISPLAY (it->f, face); 24090 PREPARE_FACE_FOR_DISPLAY (it->f, face);
24092 } 24091 }
diff --git a/src/xfaces.c b/src/xfaces.c
index 3e6e9dc8ec0..221387c4b6d 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -371,8 +371,6 @@ Lisp_Object Vface_alternative_font_registry_alist;
371 371
372static Lisp_Object Qscalable_fonts_allowed; 372static Lisp_Object Qscalable_fonts_allowed;
373 373
374#define DEFAULT_FONT_LIST_LIMIT 100
375
376/* The symbols `foreground-color' and `background-color' which can be 374/* The symbols `foreground-color' and `background-color' which can be
377 used as part of a `face' property. This is for compatibility with 375 used as part of a `face' property. This is for compatibility with
378 Emacs 20.2. */ 376 Emacs 20.2. */
@@ -1323,7 +1321,8 @@ load_color (struct frame *f, struct face *face, Lisp_Object name,
1323 try to emulate gray colors with a stipple from Vface_default_stipple. */ 1321 try to emulate gray colors with a stipple from Vface_default_stipple. */
1324 1322
1325static void 1323static void
1326load_face_colors (struct frame *f, struct face *face, Lisp_Object *attrs) 1324load_face_colors (struct frame *f, struct face *face,
1325 Lisp_Object attrs[LFACE_VECTOR_SIZE])
1327{ 1326{
1328 Lisp_Object fg, bg; 1327 Lisp_Object fg, bg;
1329 1328
@@ -1802,7 +1801,7 @@ the WIDTH times as wide as FACE on FRAME. */)
1802/* Check consistency of Lisp face attribute vector ATTRS. */ 1801/* Check consistency of Lisp face attribute vector ATTRS. */
1803 1802
1804static void 1803static void
1805check_lface_attrs (Lisp_Object *attrs) 1804check_lface_attrs (Lisp_Object attrs[LFACE_VECTOR_SIZE])
1806{ 1805{
1807 eassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX]) 1806 eassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX])
1808 || IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX]) 1807 || 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)
2049 2048
2050static int 2049static int
2051get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name, 2050get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name,
2052 Lisp_Object *attrs, int signal_p) 2051 Lisp_Object attrs[LFACE_VECTOR_SIZE],
2052 int signal_p)
2053{ 2053{
2054 Lisp_Object lface; 2054 Lisp_Object lface;
2055 2055
@@ -2071,7 +2071,7 @@ get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name,
2071 2071
2072static int 2072static int
2073get_lface_attributes (struct frame *f, Lisp_Object face_name, 2073get_lface_attributes (struct frame *f, Lisp_Object face_name,
2074 Lisp_Object *attrs, int signal_p, 2074 Lisp_Object attrs[LFACE_VECTOR_SIZE], int signal_p,
2075 struct named_merge_point *named_merge_points) 2075 struct named_merge_point *named_merge_points)
2076{ 2076{
2077 Lisp_Object face_remapping; 2077 Lisp_Object face_remapping;
@@ -2108,7 +2108,7 @@ get_lface_attributes (struct frame *f, Lisp_Object face_name,
2108 specified, i.e. are non-nil. */ 2108 specified, i.e. are non-nil. */
2109 2109
2110static int 2110static int
2111lface_fully_specified_p (Lisp_Object *attrs) 2111lface_fully_specified_p (Lisp_Object attrs[LFACE_VECTOR_SIZE])
2112{ 2112{
2113 int i; 2113 int i;
2114 2114
@@ -4760,7 +4760,8 @@ DEFUN ("face-attributes-as-vector", Fface_attributes_as_vector,
4760 \(2) `close in spirit' to what the attributes specify, if not exact. */ 4760 \(2) `close in spirit' to what the attributes specify, if not exact. */
4761 4761
4762static int 4762static int
4763x_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs, 4763x_supports_face_attributes_p (struct frame *f,
4764 Lisp_Object attrs[LFACE_VECTOR_SIZE],
4764 struct face *def_face) 4765 struct face *def_face)
4765{ 4766{
4766 Lisp_Object *def_attrs = def_face->lface; 4767 Lisp_Object *def_attrs = def_face->lface;
@@ -4862,7 +4863,8 @@ x_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs,
4862 substitution of a `dim' face for italic. */ 4863 substitution of a `dim' face for italic. */
4863 4864
4864static int 4865static int
4865tty_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs, 4866tty_supports_face_attributes_p (struct frame *f,
4867 Lisp_Object attrs[LFACE_VECTOR_SIZE],
4866 struct face *def_face) 4868 struct face *def_face)
4867{ 4869{
4868 int weight, slant; 4870 int weight, slant;
@@ -5245,7 +5247,7 @@ be found. Value is ALIST. */)
5245 attribute of ATTRS doesn't name a fontset. */ 5247 attribute of ATTRS doesn't name a fontset. */
5246 5248
5247static int 5249static int
5248face_fontset (Lisp_Object *attrs) 5250face_fontset (Lisp_Object attrs[LFACE_VECTOR_SIZE])
5249{ 5251{
5250 Lisp_Object name; 5252 Lisp_Object name;
5251 5253
@@ -5474,7 +5476,8 @@ realize_named_face (struct frame *f, Lisp_Object symbol, int id)
5474 face. Value is a pointer to the newly created realized face. */ 5476 face. Value is a pointer to the newly created realized face. */
5475 5477
5476static struct face * 5478static struct face *
5477realize_face (struct face_cache *cache, Lisp_Object *attrs, int former_face_id) 5479realize_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE],
5480 int former_face_id)
5478{ 5481{
5479 struct face *face; 5482 struct face *face;
5480 5483
@@ -5551,7 +5554,7 @@ realize_non_ascii_face (struct frame *f, Lisp_Object font_object,
5551 created realized face. */ 5554 created realized face. */
5552 5555
5553static struct face * 5556static struct face *
5554realize_x_face (struct face_cache *cache, Lisp_Object *attrs) 5557realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE])
5555{ 5558{
5556 struct face *face = NULL; 5559 struct face *face = NULL;
5557#ifdef HAVE_WINDOW_SYSTEM 5560#ifdef HAVE_WINDOW_SYSTEM
@@ -5878,7 +5881,8 @@ map_tty_color (struct frame *f, struct face *face,
5878 Value is a pointer to the newly created realized face. */ 5881 Value is a pointer to the newly created realized face. */
5879 5882
5880static struct face * 5883static struct face *
5881realize_tty_face (struct face_cache *cache, Lisp_Object *attrs) 5884realize_tty_face (struct face_cache *cache,
5885 Lisp_Object attrs[LFACE_VECTOR_SIZE])
5882{ 5886{
5883 struct face *face; 5887 struct face *face;
5884 int weight, slant; 5888 int weight, slant;
@@ -6594,12 +6598,6 @@ syms_of_xfaces (void)
6594 defsubr (&Sdump_colors); 6598 defsubr (&Sdump_colors);
6595#endif 6599#endif
6596 6600
6597 DEFVAR_LISP ("font-list-limit", Vfont_list_limit,
6598 doc: /* Limit for font matching.
6599If an integer > 0, font matching functions won't load more than
6600that number of fonts when searching for a matching font. */);
6601 Vfont_list_limit = make_number (DEFAULT_FONT_LIST_LIMIT);
6602
6603 DEFVAR_LISP ("face-new-frame-defaults", Vface_new_frame_defaults, 6601 DEFVAR_LISP ("face-new-frame-defaults", Vface_new_frame_defaults,
6604 doc: /* List of global face definitions (for internal use only.) */); 6602 doc: /* List of global face definitions (for internal use only.) */);
6605 Vface_new_frame_defaults = Qnil; 6603 Vface_new_frame_defaults = Qnil;
diff --git a/src/xterm.c b/src/xterm.c
index a4c3e125d8d..8b005873f4d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3448,7 +3448,8 @@ x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct fra
3448 3448
3449 /* Don't stop displaying the initial startup message 3449 /* Don't stop displaying the initial startup message
3450 for a switch-frame event we don't need. */ 3450 for a switch-frame event we don't need. */
3451 if (NILP (Vterminal_frame) 3451 /* When run as a deamon, Vterminal_frame is always NIL. */
3452 if ((NILP (Vterminal_frame) || EQ (Fdaemonp(), Qt))
3452 && CONSP (Vframe_list) 3453 && CONSP (Vframe_list)
3453 && !NILP (XCDR (Vframe_list))) 3454 && !NILP (XCDR (Vframe_list)))
3454 { 3455 {